Skip to content

Commit

Permalink
Release v0.3.0 (#494)
Browse files Browse the repository at this point in the history
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰
v    Before smashing the submit button please review the checkboxes.
v If a checkbox is n/a - please still include it but + a little note why
v If your PR doesn't close an issue, that's OK! Just remove the Closes:
#XXX line!
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

Closes: #XXX

## What is the purpose of the change

> Add a description of the overall background and high level changes
that this PR introduces

*(E.g.: This pull request improves documentation of area A by adding
....)*

## Testing and Verifying

*(Please pick one of the following options)*

This change is a trivial rework / code cleanup without any test
coverage.

*(or)*

This change is already covered by existing tests, such as *(please
describe tests)*.

*(or)*

This change added tests and can be verified as follows:

*(example:)*
  - *Added unit test that validates ...*
  - *Added integration tests for end-to-end deployment with ...*
  - *Extended integration test for ...*
  - *Manually verified the change by ...*

## Documentation and Release Note

- [ ] Does this pull request introduce a new feature or user-facing
behavior changes?


Where is the change documented?
  - [ ] Specification (`x/{module}/README.md`)
- [ ] Allora documentation site `docs.allora.network` source code at:
`https://github.com/allora-network/docs`
  - [ ] Code comments?
  - [ ] N/A

---------

Signed-off-by: Budalebah <[email protected]>
Signed-off-by: Kenny P <[email protected]>
Signed-off-by: Jack <[email protected]>
Co-authored-by: Diego C <[email protected]>
Co-authored-by: br4e <[email protected]>
Co-authored-by: T <[email protected]>
Co-authored-by: Guilherme Brandão <[email protected]>
Co-authored-by: vladupshot <[email protected]>
Co-authored-by: Budalebah <[email protected]>
Co-authored-by: Tobi Okedeji <[email protected]>
Co-authored-by: RedBird96 <[email protected]>
Co-authored-by: Tyler <[email protected]>
Co-authored-by: michael <[email protected]>
Co-authored-by: RedBird96 <[email protected]>
Co-authored-by: Fernando Campos <[email protected]>
Co-authored-by: Guilherme Brandão <[email protected]>
Co-authored-by: Jack <[email protected]>
  • Loading branch information
15 people authored Aug 8, 2024
1 parent 2c6adf2 commit c4dfaf5
Show file tree
Hide file tree
Showing 225 changed files with 96,049 additions and 38,509 deletions.
47 changes: 10 additions & 37 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,18 @@
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v ✰ Thanks for creating a PR! ✰
v Before smashing the submit button please review the checkboxes.
v If a checkbox is n/a - please still include it but + a little note why
v If your PR doesn't close an issue, that's OK! Just remove the Closes: #XXX line!
v ✰ Thanks for creating a PR! You're awesome! ✰
v Please note that maintainers will only review those PRs with a completed PR template.
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -->

Closes: #XXX
## Purpose of Changes and their Description

## What is the purpose of the change
## Link(s) to Ticket(s) or Issue(s) resolved by this PR

> Add a description of the overall background and high level changes that this PR introduces
## Are these changes tested and documented?

*(E.g.: This pull request improves documentation of area A by adding ....)*
- [ ] If tested, please describe how. If not, why tests are not needed.
- [ ] If documented, please describe where. If not, describe why docs are not needed.
- [ ] Added to `Unreleased` section of `CHANGELOG.md`?

## Testing and Verifying
## Still Left Todo

*(Please pick one of the following options)*

This change is a trivial rework / code cleanup without any test coverage.

*(or)*

This change is already covered by existing tests, such as *(please describe tests)*.

*(or)*

This change added tests and can be verified as follows:

*(example:)*
- *Added unit test that validates ...*
- *Added integration tests for end-to-end deployment with ...*
- *Extended integration test for ...*
- *Manually verified the change by ...*

## Documentation and Release Note

- [ ] Does this pull request introduce a new feature or user-facing behavior changes?


Where is the change documented?
- [ ] Specification (`x/{module}/README.md`)
- [ ] Allora documentation site `docs.allora.network` source code at: `https://github.com/allora-network/docs`
- [ ] Code comments?
- [ ] N/A
*Fill this out if this is a Draft PR so others can help.*
3 changes: 2 additions & 1 deletion .github/workflows/build_push_docker_hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Login to Docker Hub
uses: docker/login-action@v1
Expand Down Expand Up @@ -55,3 +55,4 @@ jobs:
docker tag $DOCKERHUB_USERNAME/$DOCKERHUB_REPOSITORY:$IMAGE_TAG $DOCKERHUB_USERNAME/$DOCKERHUB_REPOSITORY:$tag
docker push $DOCKERHUB_USERNAME/$DOCKERHUB_REPOSITORY:$tag
done
21 changes: 19 additions & 2 deletions .github/workflows/format_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,28 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Run clang-format style check for C/C++/Protobuf programs.
uses: jidicula/clang-format-action@v4.11.0
uses: jidicula/clang-format-action@v4.13.0
with:
clang-format-version: '17'
include-regex: '^.*\.proto$'

staticcheck-linter:
name: "Go staticcheck Lint Tool"
runs-on : ubuntu-latest
needs: [clang-format]
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: 1.22.x

- name: "Install staticcheck"
run: go install 'honnef.co/go/tools/cmd/staticcheck@latest'

- name: Run staticcheck linter
run: staticcheck ./... | grep -E -v "(.*\.pb\.go|.*\.pb\.gw\.go|.*\.pulsar\.go)" && exit 1 || exit 0

test:
runs-on: ubuntu-latest
timeout-minutes: 10
Expand All @@ -38,7 +55,7 @@ jobs:
go-version: 1.22.x

- name: Test
uses: robherley/go-test-action@v0.1.0
uses: robherley/go-test-action@v0.4.1

integration-test:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
*.out

# Dependency directories (remove the comment below to include it)
# vendor/
vendor/

# Go workspace file
go.work

# Data folder
data/
data_head/
data_validator/
# Account info
*.account_info

Expand All @@ -36,3 +38,5 @@ coverage_raw.lcov
coverage.lcov

build/

tokenomics_output.csv
140 changes: 140 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
<!--
Guiding Principles:
Changelogs are for humans, not machines.
There should be an entry for every single version.
The same types of changes should be grouped.
Versions and sections should be linkable.
The latest version comes first.
The release date of each version is displayed.
Mention whether you follow Semantic Versioning (we do at and after v1.0.0).
Usage:
Change log entries are to be added to the Unreleased section
under the appropriate stanza (see below).
Each entry should ideally include the Github issue or PR reference.
The issue numbers will later be link-ified during the
release process so you do not have to worry about including
a link manually, but you can if you wish.
Types of changes (Stanzas):
* __Added__ for new features.
* __Changed__ for changes in existing functionality that did not aim to resolve bugs.
* __Deprecated__ for soon-to-be removed features.
* __Removed__ for now removed features.
* __Fixed__ for any bug fixes that did not threaten user funds or chain continuity.
* __Security__ for any bug fixes that did threaten user funds or chain continuity.
Breaking changes affecting client, API, and state should be mentioned in the release notes.
Ref: https://keepachangelog.com/en/1.0.0/
Ref: https://github.com/osmosis-labs/osmosis/blob/main/CHANGELOG.md
-->

# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) for all versions `v1.0.0` and beyond (still considered experimental prior to v1.0.0).

## [Unreleased]
<!-- ## v0.3.0 -->

### Added

* Changelog added (this), improved [contribution guidelines](./CONTRIBUTING.md), and simplified [PR template](./.github/pull_request_template.md)
* [#443](https://github.com/allora-network/allora-chain/pull/443) Create mechanism to import and export state with `initGenesis` and `exportGenesis`
* [#461](https://github.com/allora-network/allora-chain/pull/461) Create index of topics by block height at which their open worker nonce closes
* [#432](https://github.com/allora-network/allora-chain/pull/432) State sync enabled for faster validator syncing
* [#478](https://github.com/allora-network/allora-chain/pull/478) Create and apply abstraction for augmenting topic fee revenue that is sure to check for topic activation criteria for both funding events, fee payments, and stake additions
* [#482](https://github.com/allora-network/allora-chain/pull/482) Creation of an official Upgrade Flow

### Removed

* [#458](https://github.com/allora-network/allora-chain/pull/458) Removal of Blockless and batch processing; Introduction of online, individual payload processing. This resolves many security, performance, and scalability issues.
* A number of PRs were merged prior to v0.3.0 that improved upon our usage of Blockless, however that has been removed in favor of its removal in #458. Hence, we are not listing those PRs here.
* [#462](https://github.com/allora-network/allora-chain/pull/462) Add individual payload processing
* [#470](https://github.com/allora-network/allora-chain/pull/470) Skim of top performers per topic as they submit payloads ("online skimming")
* [#464](https://github.com/allora-network/allora-chain/pull/464) Remove libp2p peer ids from chain
* [#459](https://github.com/allora-network/allora-chain/pull/459) Revamp nonce management

### Fixed

* [#486](https://github.com/allora-network/allora-chain/pull/486) Correctly set initial emission per unit staked token
* [#460](https://github.com/allora-network/allora-chain/pull/460) Apply a number of bugfixes and high-precision unit tests that ensure our implementation matches our simulation of Allora and therefore the original intentions of the whitepaper and Foundation.
* [#487](https://github.com/allora-network/allora-chain/pull/487) Patch to have the single `allorad` home folder in Docker
* [#437](https://github.com/allora-network/allora-chain/pull/437) Fix issue for excessive effective revenue dripping
* [#441](https://github.com/allora-network/allora-chain/pull/441) Prevent DoS from attempting to withdraw negative stake amounts
* [#472](https://github.com/allora-network/allora-chain/pull/472) Prevent topics to be created with a ground truth lag too big so that the reputation nonce could be dropped when the ground truth is revealed
* [#484](https://github.com/allora-network/allora-chain/pull/484) Fix issue with permissions within Docker container
* [#477](https://github.com/allora-network/allora-chain/pull/477) Fix issue arising from no forecasts being sent in worker payload
* [#436](https://github.com/allora-network/allora-chain/pull/436/files) Fix bug related to excessive usage of topic ground truth lag and misleading error message
* Additional bugfixes and improvements

### Security

* [#454](https://github.com/allora-network/allora-chain/pull/454) Bump CometBFT version
* [#465](https://github.com/allora-network/allora-chain/pull/465) Catch and avert error leading to inappropriate transfer of funds
* [#440](https://github.com/allora-network/allora-chain/pull/440) Remove parallelization to avert nonuniform executions between hardwares

## v0.2.14

* Added many new queries
* [#430](https://github.com/allora-network/allora-chain/pull/430)
* [#399](https://github.com/allora-network/allora-chain/pull/399)
* [#353](https://github.com/allora-network/allora-chain/pull/353)
* Added confidence interval to network inference query
* [#402](https://github.com/allora-network/allora-chain/pull/402)
* New actors are incorporated more smoothly instead of ignored then included in their next round
* [#420](https://github.com/allora-network/allora-chain/pull/420)
* Created fuzzer so anyone can help find vulnerabilities (tell them how they can submit)
* [#407](https://github.com/allora-network/allora-chain/pull/407)
* Parallelized tests for faster CI
* [#394](https://github.com/allora-network/allora-chain/pull/394)
* Formally adopted gitflow with improved contributor experience
* Simplified nonce semantics
* [#416](https://github.com/allora-network/allora-chain/pull/416)
* More reliable fetching of previous data
* [#412](https://github.com/allora-network/allora-chain/pull/412)
* [#409](https://github.com/allora-network/allora-chain/pull/409)
* Added validations for safer data ingress
* [#398](https://github.com/allora-network/allora-chain/pull/398)
* Update forecast utiity function
* [#382](https://github.com/allora-network/allora-chain/pull/382)
* Automatically expire stake removals instead of requiring a 2nd tx
* [#362](https://github.com/allora-network/allora-chain/pull/362)
* Added min bound on epoch length to prevent topics from hogging too many resources
* [#376](https://github.com/allora-network/allora-chain/pull/376)
* Add restore from snapshot
* [#352](https://github.com/allora-network/allora-chain/pull/352)
* Version updates to all docker files and deployment scripts
* Removed duplicate computations for increased efficiency
* [#367](https://github.com/allora-network/allora-chain/pull/367)
* Bugixes, improved error handling, way more coverage, and simplifications including:
* [#327](https://github.com/allora-network/allora-chain/pull/327)
* [#318](https://github.com/allora-network/allora-chain/pull/318)
* [#401](https://github.com/allora-network/allora-chain/pull/401)
* [#272](https://github.com/allora-network/allora-chain/pull/272)
* More efficient state pruning
* [#319](https://github.com/allora-network/allora-chain/pull/319)
* Way more validator logging
* [#305](https://github.com/allora-network/allora-chain/pull/305)
* Removed print statements so more efficient logging
* [#298](https://github.com/allora-network/allora-chain/pull/298)
* Tuned default global parameters
* Self-delegation disallowed (security patch)
* [#269](https://github.com/allora-network/allora-chain/pull/269)
* Added stress tests
* Improved [README](./README.md)
* Move expensive logarithm and exponentiation operations to offchain nodes when possible
* [#258](https://github.com/allora-network/allora-chain/pull/258)


## v0.1.0

*Versions below `v0.2.14` were associated with our "Alpha Testnet" and "Edgenet" deployments, before formal versioning was adopted.*

71 changes: 61 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Contribution Guidelines

*Borrowed from Osmosis's [contribution guidelines](https://github.com/osmosis-labs/osmosis/blob/main/CONTRIBUTING.md)*

Any contribution that you make to this repository will
be under the Apache 2 License, as dictated by that
[license](http://www.apache.org/licenses/LICENSE-2.0.html):
Expand All @@ -17,15 +21,62 @@ line to commit messages to certify that they have the right to submit
the code they are contributing to the project according to the
[Developer Certificate of Origin (DCO)](https://developercertificate.org/).

Contributors are encouraged to enable our pre-commit hooks to facilitate
teh passage of CI/CD-related checks in our repositories. To enable them,
please run the following command in the root of the repository:

```bash
chmod +x .hooks/pre-commit
git config core.hooksPath .hooks/pre-commit
```
## Checklist for updating global parameters

When updating global parameters, you must update the following files:

For `x/emissions`:

1. `x/emissions/types/params.go`
1. Set the default values for the new params
2. Add a new function to return the default values
3. Add validation for the new params
2. `x/emissions/proto/emissions/v1/params.proto`
1. Add to the `Params` proto, tracking all global params
3. x/emissions/proto/emissions/v1/tx.proto
1. Add to the proto of the tx that allows us to set new params
4. `x/emissions/keeper/msgserver/msg_server_params.go`
1. Add code to the tx that allows us to set new params
5. Update any tests where all params need to be specified
6. Update any external docs here:
1. https://docs.allora.network/docs/chain-parameters

For `x/mint`:
__TBD__


## Checklist for updating the state machine

When updating the state machine, you must update the following files:

1. `x/emissions/keeper/keeper.go`
2. `x/emissions/keeper/keeper_test.go` as needed
3. `x/emissions/types/keys.go`
4. `x/emissions/keeper/genesis.go`
5. `x/emissions/keeper/genesis_test.go`
6. `x/emissions/proto/emissions/v1/genesis.proto`


## Secondary Limitations To Keep In Mind

#### Network Requests to External Services

It is critical to avoid performing network requests to external services since it is common for services to be unavailable or rate-limit.

Imagine a service that returns exchange rates when clients query its HTTP endpoint. This service might experience downtime or be restricted in some geographical areas.

As a result, nodes may get diverging responses where some get successful responses while others errors, leading to state breakage.

#### Randomness

Randomness cannot be used in the state machine, as the state machine definitionally must be deterministic. Any time you'd consider using it, instead seed a CSPRNG off of some seed.

One thing to note is that in golang, iteration order over maps is non-deterministic, so to be deterministic you must gather the keys, and sort them all prior to iterating over all values.

#### Parallelism and Shared State

Threads and Goroutines might preempt differently in different hardware. Therefore, they should be avoided for the sake of determinism. Additionally, it is hard to predict when the multi-threaded state can be updated.

This will enable the pre-commit hooks for the repository and ensure that
all commits are checked for compliance with our formatter and other
checks before they are accepted into the repository.
#### Hardware Errors
This is out of the developer's control but is mentioned for completeness.
Loading

0 comments on commit c4dfaf5

Please sign in to comment.