diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 56b47a1..2eb068f 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -18,12 +18,12 @@ jobs: persist-credentials: false fetch-depth: 0 - uses: technote-space/get-diff-action@v6.0.1 - id: git_diff with: PATTERNS: | - docs/* - SUFFIX_FILTER: | - .md + docs/**/*.md + x/**/*.md - name: Install dependencies and build docs 🧱 run: | - make build-docs \ No newline at end of file + make build-docs + # Check only if there are differences in the source code + if: env.GIT_DIFF \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 07cb700..48cb547 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,10 +23,10 @@ jobs: - uses: technote-space/get-diff-action@v6.0.1 id: git_diff with: - SUFFIX_FILTER: | - .go - .mod - .sum + PATTERNS: | + **/**.go + go.mod + go.sum - run: | make build - if: "env.GIT_DIFF != ''" + if: env.GIT_DIFF diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 6e67a0c..05bede0 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -39,7 +39,16 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + - uses: actions/checkout@v3 + - uses: technote-space/get-diff-action@v6.0.1 + with: + PATTERNS: | + **/**.sol + **/**.go + **/**.ts + **/**.js + go.mod + go.sum # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL @@ -50,9 +59,10 @@ jobs: # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. # queries: ./path/to/local/query, your-org/your-repo/queries@main - + if: env.GIT_DIFF # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild uses: github/codeql-action/autobuild@v1 @@ -69,3 +79,4 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v1 + if: env.GIT_DIFF diff --git a/.github/workflows/linkchecker.yml b/.github/workflows/linkchecker.yml deleted file mode 100644 index b3dff79..0000000 --- a/.github/workflows/linkchecker.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Check Markdown links -on: - schedule: - - cron: "* */24 * * *" -jobs: - markdown-link-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: gaurav-nelson/github-action-markdown-link-check@1.0.13 - with: - folder-path: "docs" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3a657bd..7ef84bc 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,10 +16,10 @@ jobs: - uses: actions/checkout@v3 - uses: technote-space/get-diff-action@v6.0.1 with: - SUFFIX_FILTER: | - .go - .mod - .sum + PATTERNS: | + **/**.go + go.mod + go.sum - uses: golangci/golangci-lint-action@v3 with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. @@ -28,3 +28,17 @@ jobs: github-token: ${{ secrets.github_token }} # Check only if there are differences in the source code if: "env.GIT_DIFF" + markdown-lint: + name: Run markdown-lint + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + - uses: technote-space/get-diff-action@v6.0.1 + with: + PATTERNS: | + docs/**/*.md + README.md + - uses: articulate/actions-markdownlint@v1.1.0 + # Check only if there are differences in the source code + if: env.GIT_DIFF diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 9095437..414e377 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -10,8 +10,7 @@ jobs: - uses: actions/stale@v4 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-pr-message: "This pull request has been automatically marked as stale because it has not had - recent activity. It will be closed in 7 days-before-close if no further activity occurs." + stale-pr-message: "This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days-before-close if no further activity occurs." stale-issue-message: "This issue is stale because it has been open 45 days with no activity. Remove `Status: Stale` label or comment or this will be closed in 7 days." days-before-stale: 45 days-before-close: 7 diff --git a/.markdownlint.yml b/.markdownlint.yml index 0978bcb..332e4df 100644 --- a/.markdownlint.yml +++ b/.markdownlint.yml @@ -15,4 +15,6 @@ "MD036": false "MD040": false "MD041": false +"MD049": + "style": "asterisk" "no-hard-tabs": false diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 93d92d9..1968683 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,11 +9,11 @@ * [Testing](#testing) * [Updating Documentation](#updating_doc) * [Branching Model and Release](#braching_model_and_release) - * [PR Targeting](#pr_targeting) - * [Pull Requests](#pull_requests) - * [Process for reviewing PRs](#reviewing_prs) - * [Pull Merge Procedure](#pull_merge_procedure) - * [Release Procedure](#release_procedure) + * [PR Targeting](#pr_targeting) + * [Pull Requests](#pull_requests) + * [Process for reviewing PRs](#reviewing_prs) + * [Pull Merge Procedure](#pull_merge_procedure) + * [Release Procedure](#release_procedure) ## General Procedure @@ -203,7 +203,7 @@ All PRs require two Reviews before merge. When reviewing PRs, please use the fol 2. Create the release candidate branch `rc/v*` (going forward known as `RC`) and ensure it's protected against pushing from anyone except the release manager/coordinator. No PRs targeting this branch should be merged unless exceptional circumstances arise. -3. On the `RC` branch, prepare a new version section in the `CHANGELOG.md`. All links must be link-ified: +3. On the `RC` branch, prepare a new version section in the `CHANGELOG.md`. All links must be link-ified: `$ python ./scripts/linkify_changelog.py CHANGELOG.md` Copy the entries into a `RELEASE_CHANGELOG.md`. This is needed so the bot knows which entries to add to the release page on github. diff --git a/README.md b/README.md index 356ec53..d988a68 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ The following chat channels and forums are a great spot to ask questions about E - [Evmos Twitter](https://twitter.com/EvmosOrg) - [Evmos Discord](https://discord.gg/evmos) -- [Evmos Forum](https://forum.cosmos.network/c/ethermint) +- [Evmos Forum](https://commonwealth.im/evmos) - [Tharsis Twitter](https://twitter.com/TharsisHQ) ## Contributing diff --git a/SECURITY.md b/SECURITY.md index 891ab58..ff0acf5 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -5,7 +5,6 @@ bounty. See the policy for more details on submissions and rewards, and see "Example Vulnerabilities" (below) for examples of the kinds of bugs the team is most interested in. - ## Guidelines We require that all researchers: @@ -113,4 +112,4 @@ Attacks may come through the P2P network or the RPC layer: ### Light Client * Core verification -* Bisection/sequential algorithms \ No newline at end of file +* Bisection/sequential algorithms diff --git a/docs/api/json-rpc/endpoints.md b/docs/api/json-rpc/endpoints.md index d13f7d2..dcf61e2 100644 --- a/docs/api/json-rpc/endpoints.md +++ b/docs/api/json-rpc/endpoints.md @@ -214,7 +214,7 @@ Returns Keccak-256 (not the standardized SHA3-256) of the given data. - Required: βœ“ Yes -#### Result +#### Result ```json {"jsonrpc":"2.0","id":1,"result":"0x1b84adea42d5b7d192fd8a61a85b25abe0757e9a65cab1da470258914053823f"} @@ -597,7 +597,7 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":[ Returns the block info given the hash found in the command above and a bool. -#### Parameters +#### Parameters - Hash of a block. @@ -813,7 +813,6 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getProof","params":["0x12345 {"jsonrpc": "2.0", "id": 1, "result": {"address": "0x1234567890123456789012345678901234567890", "accountProof": ["0xf90211a090dcaf88c40c7bbc95a912cbdde67c175767b31173df9ee4b0d733bfdd511c43a0babe369f6b12092f49181ae04ca173fb68d1a5456f18d20fa32cba73954052bda0473ecf8a7e36a829e75039a3b055e51b8332cbf03324ab4af2066bbd6fbf0021a0bbda34753d7aa6c38e603f360244e8f59611921d9e1f128372fec0d586d4f9e0a04e44caecff45c9891f74f6a2156735886eedf6f1a733628ebc802ec79d844648a0a5f3f2f7542148c973977c8a1e154c4300fec92f755f7846f1b734d3ab1d90e7a0e823850f50bf72baae9d1733a36a444ab65d0a6faaba404f0583ce0ca4dad92da0f7a00cbe7d4b30b11faea3ae61b7f1f2b315b61d9f6bd68bfe587ad0eeceb721a07117ef9fc932f1a88e908eaead8565c19b5645dc9e5b1b6e841c5edbdfd71681a069eb2de283f32c11f859d7bcf93da23990d3e662935ed4d6b39ce3673ec84472a0203d26456312bbc4da5cd293b75b840fc5045e493d6f904d180823ec22bfed8ea09287b5c21f2254af4e64fca76acc5cd87399c7f1ede818db4326c98ce2dc2208a06fc2d754e304c48ce6a517753c62b1a9c1d5925b89707486d7fc08919e0a94eca07b1c54f15e299bd58bdfef9741538c7828b5d7d11a489f9c20d052b3471df475a051f9dd3739a927c89e357580a4c97b40234aa01ed3d5e0390dc982a7975880a0a089d613f26159af43616fd9455bb461f4869bfede26f2130835ed067a8b967bfb80", "0xf90211a0395d87a95873cd98c21cf1df9421af03f7247880a2554e20738eec2c7507a494a0bcf6546339a1e7e14eb8fb572a968d217d2a0d1f3bc4257b22ef5333e9e4433ca012ae12498af8b2752c99efce07f3feef8ec910493be749acd63822c3558e6671a0dbf51303afdc36fc0c2d68a9bb05dab4f4917e7531e4a37ab0a153472d1b86e2a0ae90b50f067d9a2244e3d975233c0a0558c39ee152969f6678790abf773a9621a01d65cd682cc1be7c5e38d8da5c942e0a73eeaef10f387340a40a106699d494c3a06163b53d956c55544390c13634ea9aa75309f4fd866f312586942daf0f60fb37a058a52c1e858b1382a8893eb9c1f111f266eb9e21e6137aff0dddea243a567000a037b4b100761e02de63ea5f1fcfcf43e81a372dafb4419d126342136d329b7a7ba032472415864b08f808ba4374092003c8d7c40a9f7f9fe9cc8291f62538e1cc14a074e238ff5ec96b810364515551344100138916594d6af966170ff326a092fab0a0d31ac4eef14a79845200a496662e92186ca8b55e29ed0f9f59dbc6b521b116fea090607784fe738458b63c1942bba7c0321ae77e18df4961b2bc66727ea996464ea078f757653c1b63f72aff3dcc3f2a2e4c8cb4a9d36d1117c742833c84e20de994a0f78407de07f4b4cb4f899dfb95eedeb4049aeb5fc1635d65cf2f2f4dfd25d1d7a0862037513ba9d45354dd3e36264aceb2b862ac79d2050f14c95657e43a51b85c80", "0xf90171a04ad705ea7bf04339fa36b124fa221379bd5a38ffe9a6112cb2d94be3a437b879a08e45b5f72e8149c01efcb71429841d6a8879d4bbe27335604a5bff8dfdf85dcea00313d9b2f7c03733d6549ea3b810e5262ed844ea12f70993d87d3e0f04e3979ea0b59e3cdd6750fa8b15164612a5cb6567cdfb386d4e0137fccee5f35ab55d0efda0fe6db56e42f2057a071c980a778d9a0b61038f269dd74a0e90155b3f40f14364a08538587f2378a0849f9608942cf481da4120c360f8391bbcc225d811823c6432a026eac94e755534e16f9552e73025d6d9c30d1d7682a4cb5bd7741ddabfd48c50a041557da9a74ca68da793e743e81e2029b2835e1cc16e9e25bd0c1e89d4ccad6980a041dda0a40a21ade3a20fcd1a4abb2a42b74e9a32b02424ff8db4ea708a5e0fb9a09aaf8326a51f613607a8685f57458329b41e938bb761131a5747e066b81a0a16808080a022e6cef138e16d2272ef58434ddf49260dc1de1f8ad6dfca3da5d2a92aaaadc58080", "0xf851808080a009833150c367df138f1538689984b8a84fc55692d3d41fe4d1e5720ff5483a6980808080808080808080a0a319c1c415b271afc0adcb664e67738d103ac168e0bc0b7bd2da7966165cb9518080"], "balance": "0x0", "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "nonce": "0x0", "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "storageProof": [{"key": "0x0000000000000000000000000000000000000000000000000000000000000000", "value": "0x0", "proof": []}, {"key": "0x0000000000000000000000000000000000000000000000000000000000000001", "value": "0x0", "proof": []}]}} ``` - ## WebSocket Methods Read about websockets in [events](./events.md) @@ -876,8 +875,6 @@ Returns the address of the new account. - Required: βœ“ Yes - - ```json // Request curl -X POST --data '{"jsonrpc":"2.0","method":"personal_importRawKey","params":["c5bd76cd0cd948de17a31261567d219576e992d9066fe1a6bca97496dec634e2c8e06f8949773b300b9f73fabbbc7710d5d6691e96bcf3c9145e15daf6fe07b9", "the key is this"],"id":1}' -H "Content-Type: application/json" http://localhost:8545 @@ -1062,7 +1059,7 @@ Parameters must be given by position. 1: url `string` -- Required: βœ“ Yes +- Required: βœ“ Yes #### Client Examples @@ -1090,7 +1087,6 @@ personal.initializeWallet(url); ::: :::: - ### `personal_unpair` ::: tip @@ -1131,8 +1127,6 @@ personal.unpair(url,pin); ::: :::: - - ## Debug Methods ### `debug_traceTransaction` @@ -1167,7 +1161,6 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"debug_traceBlockByNumber","param {"jsonrpc":"2.0","id":1,"result":[{"result":["68410", "51470"]}]} ``` - ## Miner Methods ### `miner_getHashrate` @@ -1297,19 +1290,7 @@ Unsupported. This endpoint always returns `false` ```json // Request -curl -X POST --data '{"jsonrpc":"2.0","method":"miner_start","params":["0x10000"],"id":1}' -H "Content-Type: application/json" http://localhost:8545 - -// Result -{"jsonrpc":"2.0","id":1,"result":false} -``` - -#### Parameters - -- Hex Number of threads - -```json -// Request -curl -X POST --data '{"jsonrpc":"2.0","method":"miner_start","params":["0x1"],"id":1}' -H "Content-Type: application/json" http://localhost:8545 +curl -X POST --data '{"jsonrpc":"2.0","method":"miner_setGasLimit","params":["0x10000"],"id":1}' -H "Content-Type: application/json" http://localhost:8545 // Result {"jsonrpc":"2.0","id":1,"result":false} diff --git a/docs/clients/apis.md b/docs/clients/apis.md index 0f64fec..b35191f 100644 --- a/docs/clients/apis.md +++ b/docs/clients/apis.md @@ -2,11 +2,11 @@ # Evmos APIs ::: tip -🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 +🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 This documentation page is currently under work in progress. -🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 +🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 ::: ## Public Testnet Nodes diff --git a/docs/clients/evmosjs.md b/docs/clients/evmosjs.md index 0a561fe..978b9a7 100644 --- a/docs/clients/evmosjs.md +++ b/docs/clients/evmosjs.md @@ -9,11 +9,11 @@ Use the evmosjs library for connecting clients to Evmos {synopsis} [`evmosjs`](https://github.com/tharsis/evmosjs) is a JavaScript and TypeScript client library for [Evmos](https://github.com/tharsis/evmos) and [Ethermint](https://github.com/tharsis/ethermint) nodes. ::: tip -🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 +🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 This documentation page is currently under work in progress. -🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 +🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 ::: ## Cosmjs diff --git a/docs/guides/keys-wallets/keyring.md b/docs/guides/keys-wallets/keyring.md index 6b4579a..506e920 100644 --- a/docs/guides/keys-wallets/keyring.md +++ b/docs/guides/keys-wallets/keyring.md @@ -37,8 +37,8 @@ is a list of the most popular operating systems and their respective passwords m - macOS (since Mac OS 8.6): [Keychain](https://support.apple.com/en-gb/guide/keychain-access/welcome/mac) - Windows: [Credentials Management API](https://docs.microsoft.com/en-us/windows/win32/secauthn/credentials-management) - GNU/Linux: - - [libsecret](https://gitlab.gnome.org/GNOME/libsecret) - - [kwallet](https://api.kde.org/frameworks/kwallet/html/index.html) + - [libsecret](https://gitlab.gnome.org/GNOME/libsecret) + - [kwallet](https://api.kde.org/frameworks/kwallet/html/index.html) GNU/Linux distributions that use GNOME as default desktop environment typically come with [Seahorse](https://wiki.gnome.org/Apps/Seahorse). Users of KDE based distributions are diff --git a/docs/guides/upgrades/upgrade_node.md b/docs/guides/upgrades/upgrade_node.md index 047f371..2fdc747 100644 --- a/docs/guides/upgrades/upgrade_node.md +++ b/docs/guides/upgrades/upgrade_node.md @@ -85,6 +85,7 @@ cp $GOPATH/bin/evmosd ~/.evmosd/cosmovisor/genesis/bin ``` To check that you did this correctly, ensure your versions of cosmovisor and evmosd are the same: + ``` cosmovisor version evmosd version @@ -100,13 +101,12 @@ It is possible to have Cosmovisor automatically download the new binary. To do t echo "export DAEMON_ALLOW_DOWNLOAD_BINARIES=true" >> ~/.profile ``` - #### Download Genesis File You can now download the "genesis" file for the chain. It is pre-filled with the entire genesis state and gentxs. ```bash -$ curl https://raw.githubusercontent.com/tharsis/testnets/main/olympus_mons/genesis.json > ~/.evmosd/config/genesis.json +curl https://raw.githubusercontent.com/tharsis/testnets/main/olympus_mons/genesis.json > ~/.evmosd/config/genesis.json ``` We recommend using `sha256sum` to check the hash of the genesis. @@ -204,6 +204,7 @@ systemctl status evmosd #### Update Cosmosvisor to V2 If you're not yet on the latest V1 release (`v1.1.2`) please upgrade your current version first: + ```bash cd $HOME/evmos git pull @@ -215,8 +216,8 @@ systemctl start evmosd.service cd $HOME ``` - If you are on the latest V1 release (`v1.1.2`) and you want evmosd to upgrade automatically from V1 to V2, do the following steps prior to the upgrade height: + ```bash mkdir -p ~/.evmosd/cosmovisor/upgrades/v2/bin cd $HOME/evmos @@ -253,7 +254,6 @@ cp -f genesis.json new_genesis.json mv new_genesis.json genesis.json ``` - #### Export State Evmos can dump the entire application state to a JSON file. This, besides upgrades, can be diff --git a/docs/guides/validators/faq.md b/docs/guides/validators/faq.md index e255400..175bc79 100644 --- a/docs/guides/validators/faq.md +++ b/docs/guides/validators/faq.md @@ -40,11 +40,11 @@ Delegators play a critical role in the system, as they are responsible for choos Any participant in the network can signal their intent to become a validator by creating a validator and registering its validator profile. To do so, the candidate broadcasts a `create-validator` transaction, in which they must submit the following information: -- **Validator's PubKey**: Validator operators can have different accounts for validating and holding liquid funds. The PubKey submitted must be associated with the private key with which the validator intends to sign _prevotes_ and _precommits_. +- **Validator's PubKey**: Validator operators can have different accounts for validating and holding liquid funds. The PubKey submitted must be associated with the private key with which the validator intends to sign *prevotes* and *precommits*. - **Validator's Address**: `evmosvaloper1-` address. This is the address used to identify your validator publicly. The private key associated with this address is used to bond, unbond, and claim rewards. - **Validator's name** (also known as the **moniker**) -- **Validator's website** _(optional)_ -- **Validator's description** _(optional)_ +- **Validator's website** *(optional)* +- **Validator's description** *(optional)* - **Initial commission rate**: The commission rate on block provisions, block rewards and fees charged to delegators. - **Maximum commission**: The maximum commission rate which this validator will be allowed to charge. - **Commission change rate**: The maximum daily increase of the validator commission. @@ -77,8 +77,8 @@ Once a validator is created and registered, EVMOS holders can delegate EVMOS to In short, there are two types of keys: - **Tendermint Key**: This is a unique key used to sign block hashes. It is associated with a public key `evmosvalconspub`. - - Generated when the node is created with `evmosd init`. - - Get this value with `evmosd tendermint show-validator` + - Generated when the node is created with `evmosd init`. + - Get this value with `evmosd tendermint show-validator` e.g. `evmosvalconspub1zcjduc3qcyj09qc03elte23zwshdx92jm6ce88fgc90rtqhjx8v0608qh5ssp0w94c` - **Application keys**: These keys are created from the application and used to sign transactions. As a validator, you will probably use one key to sign staking-related transactions, and another key to sign oracle-related transactions. Application keys are associated with a public key `evmospub-` and an address `evmos-`. Both are derived from account keys generated by `evmosd keys add`. @@ -145,13 +145,13 @@ Additionally, validators are expected to be active members of the community. The ### What does staking imply? -Staking EVMOS can be thought of as a safety deposit on validation activities. When a validator or a delegator wants to retrieve part or all of their deposit, they send an unbonding transaction. Then, EVMOS undergo a _three weeks unbonding period_ during which they are liable to being slashed for potential misbehaviors committed by the validator before the unbonding process started. +Staking EVMOS can be thought of as a safety deposit on validation activities. When a validator or a delegator wants to retrieve part or all of their deposit, they send an unbonding transaction. Then, EVMOS undergo a *three weeks unbonding period* during which they are liable to being slashed for potential misbehaviors committed by the validator before the unbonding process started. Validators, and by association delegators, receive block provisions, block rewards, and fee rewards. If a validator misbehaves, a certain portion of its total stake is slashed (the severity of the penalty depends on the type of misbehavior). This means that every user that bonded EVMOS to this validator gets penalized in proportion to its stake. Delegators are therefore incentivized to delegate to validators that they anticipate will function safely. ### Can a validator run away with its delegators' EVMOS? -By delegating to a validator, a user delegates staking power. The more staking power a validator has, the more weight it has in the consensus and processes. This does not mean that the validator has custody of its delegators' EVMOS. _By no means can a validator run away with its delegator's funds_. +By delegating to a validator, a user delegates staking power. The more staking power a validator has, the more weight it has in the consensus and processes. This does not mean that the validator has custody of its delegators' EVMOS. *By no means can a validator run away with its delegator's funds*. Even though delegated funds cannot be stolen by their validators, delegators are still liable if their validators misbehave. In such case, each delegators' stake will be partially slashed in proportion to their relative stake. @@ -208,15 +208,15 @@ $$9R ~ + ~ R ~ + ~ 5\%(R) ~ = ~ 1005 ~ \Leftrightarrow ~ R ~ = ~ 1005 ~/ ~10.05 - For the proposer validator: - - The pool obtains $R ~ + ~ 5\%(R)$: 105 EVMOS - - Commission: $105 ~ * ~ 80\% ~ * ~ 1\%$ = 0.84 EVMOS - - Validator's reward: $105 ~ * ~ 20\% ~ + ~ Commission$ = 21.84 EVMOS - - Delegators' rewards: $105 ~ * ~ 80\% ~ - ~ Commission$ = 83.16 EVMOS \(each delegator will be able to claim its portion of these rewards in proportion to their stake\) + - The pool obtains $R ~ + ~ 5\%(R)$: 105 EVMOS + - Commission: $105 ~ *~ 80\% ~* ~ 1\%$ = 0.84 EVMOS + - Validator's reward: $105 ~ * ~ 20\% ~ + ~ Commission$ = 21.84 EVMOS + - Delegators' rewards: $105 ~ * ~ 80\% ~ - ~ Commission$ = 83.16 EVMOS \(each delegator will be able to claim its portion of these rewards in proportion to their stake\) - - The pool obtains $R$: 100 EVMOS - - Commission: $100 ~ * ~ 80\% ~ * ~ 1\%$ = 0.8 EVMOS - - Validator's reward: $100 ~ * ~ 20\% ~ + ~ Commission$ = 20.8 EVMOS - - Delegators' rewards: $100 ~ * ~ 80\% ~ - ~ Commission$ = 79.2 EVMOS \(each delegator will be able to claim its portion of these rewards in proportion to their stake\) + - The pool obtains $R$: 100 EVMOS + - Commission: $100 ~ *~ 80\% ~* ~ 1\%$ = 0.8 EVMOS + - Validator's reward: $100 ~ * ~ 20\% ~ + ~ Commission$ = 20.8 EVMOS + - Delegators' rewards: $100 ~ * ~ 80\% ~ - ~ Commission$ = 79.2 EVMOS \(each delegator will be able to claim its portion of these rewards in proportion to their stake\) ### What are the slashing conditions? diff --git a/docs/guides/validators/setup.md b/docs/guides/validators/setup.md index 5347bf2..46c98be 100644 --- a/docs/guides/validators/setup.md +++ b/docs/guides/validators/setup.md @@ -64,7 +64,7 @@ evmosd tx staking create-validator \ ``` ::: tip -When specifying commission parameters, the `commission-max-change-rate` is used to measure % _point_ change over the `commission-rate`. E.g. 1% to 2% is a 100% rate increase, but only 1 percentage point. +When specifying commission parameters, the `commission-max-change-rate` is used to measure % *point* change over the `commission-rate`. E.g. 1% to 2% is a 100% rate increase, but only 1 percentage point. ::: ::: tip @@ -101,7 +101,7 @@ evmosd gentx \ ``` ::: tip -When specifying commission parameters, the `commission-max-change-rate` is used to measure % _point_ change over the `commission-rate`. E.g. 1% to 2% is a 100% rate increase, but only 1 percentage point. +When specifying commission parameters, the `commission-max-change-rate` is used to measure % *point* change over the `commission-rate`. E.g. 1% to 2% is a 100% rate increase, but only 1 percentage point. ::: You can then submit your `gentx` on the [launch repository](https://github.com/cosmos/launch). These `gentx` will be used to form the final genesis file. @@ -131,7 +131,7 @@ __Note__: The `commission-rate` value must adhere to the following invariants: - Must be between 0 and the validator's `commission-max-rate` - Must not exceed the validator's `commission-max-change-rate` which is maximum - % point change rate **per day**. In other words, a validator can only change + % point change rate __per day__. In other words, a validator can only change its commission once per day and within `commission-max-change-rate` bounds. ## View Validator Description diff --git a/docs/quickstart/run_node.md b/docs/quickstart/run_node.md index e92f147..5056483 100644 --- a/docs/quickstart/run_node.md +++ b/docs/quickstart/run_node.md @@ -118,8 +118,10 @@ rm -rf ~/.evmosd To clear all data except key storage (if keyring backend chosen) and then you can rerun the full node installation commands from above to start the node again. ## Recording Transactions Per Second (TPS) + In order to get a progressive value of the transactions per second, we use Prometheus to return the values. The Prometheus exporter runs at address "http://localhost:8877" so please add this section to your [Prometheus installation](https://opencensus.io/codelabs/prometheus/#1) config.yaml file like this + ```yaml global: scrape_interval: 10s @@ -137,6 +139,7 @@ scrape_configs: ``` and then run Prometheus like this + ```shell prometheus --config.file=prom_config.yaml ``` diff --git a/x/README.md b/x/README.md index 9ef64b0..3e13c52 100644 --- a/x/README.md +++ b/x/README.md @@ -7,8 +7,7 @@ order: 0 Here are some production-grade modules that can be used in Evmos applications, along with their respective documentation: - [claims](claims/spec/README.md) - Rewards status and claiming process for the mainnet release. -- [erc20](erc20/spec/README.md) - Trustless, on-chain bidirectional internal relaying (_aka_ intrarelaying) of tokens between Evmos' EVM and Cosmos runtimes. +- [erc20](erc20/spec/README.md) - Trustless, on-chain bidirectional internal relaying (*aka* intrarelaying) of tokens between Evmos' EVM and Cosmos runtimes. - [evm](evm/spec/README.md) - Smart Contract deployment and execution on Cosmos - [incentives](incentives/spec/README.md) - Incentivize user interaction with governance-approved smart contracts. - [inflation](inflation/spec/README.md) - Mint tokens and allocate them to staking rewards, usage incentives and community pool. - diff --git a/x/epochs/spec/03_events.md b/x/epochs/spec/03_events.md index 96f40f3..d97ecd2 100644 --- a/x/epochs/spec/03_events.md +++ b/x/epochs/spec/03_events.md @@ -17,4 +17,4 @@ The `epochs` module emits the following events: | Type | Attribute Key | Attribute Value | | ----------- | ------------- | --------------- | -| epoch_end | epoch_number | {epoch_number} | \ No newline at end of file +| epoch_end | epoch_number | {epoch_number} | diff --git a/x/epochs/spec/04_keeper.md b/x/epochs/spec/04_keeper.md index 5b3973a..96ef146 100644 --- a/x/epochs/spec/04_keeper.md +++ b/x/epochs/spec/04_keeper.md @@ -22,4 +22,4 @@ type Keeper interface { // Get all epoch infos AllEpochInfos(ctx sdk.Context) []types.EpochInfo } -``` \ No newline at end of file +``` diff --git a/x/epochs/spec/05_hooks.md b/x/epochs/spec/05_hooks.md index e98d8c1..c7e0ef9 100644 --- a/x/epochs/spec/05_hooks.md +++ b/x/epochs/spec/05_hooks.md @@ -5,6 +5,7 @@ order: 5 # Hooks ## Hooks + ```go // the first block whose timestamp is after the duration is counted as the end of the epoch AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64) @@ -16,4 +17,4 @@ order: 5 On hook receiver function of other modules, they need to filter `epochIdentifier` and only do executions for only specific epochIdentifier. Filtering epochIdentifier could be in `Params` of other modules so that they can be modified by governance. -Governance can change epoch from `week` to `day` as their need. \ No newline at end of file +Governance can change epoch from `week` to `day` as their need. diff --git a/x/epochs/spec/06_queries.md b/x/epochs/spec/06_queries.md index 2b27521..ac6b2ca 100644 --- a/x/epochs/spec/06_queries.md +++ b/x/epochs/spec/06_queries.md @@ -13,4 +13,4 @@ service Query { // CurrentEpoch provide current epoch of specified identifier rpc CurrentEpoch(QueryCurrentEpochRequest) returns (QueryCurrentEpochResponse) {} } -``` \ No newline at end of file +``` diff --git a/x/epochs/spec/07_future_improvements.md b/x/epochs/spec/07_future_improvements.md index 6817173..3a6e775 100644 --- a/x/epochs/spec/07_future_improvements.md +++ b/x/epochs/spec/07_future_improvements.md @@ -21,4 +21,4 @@ For instance, we have an epoch of 100 units that ends at t=100, if we have a blo And new epoch start at t=110. There are time drifts here, for around 1-2 blocks time. It will slow down epochs. -It's going to slow down epoch by 10-20s per week when epoch duration is 1 week. This should be resolved after launch. \ No newline at end of file +It's going to slow down epoch by 10-20s per week when epoch duration is 1 week. This should be resolved after launch. diff --git a/x/erc20/spec/02_state.md b/x/erc20/spec/02_state.md index 6167c02..f9dcf48 100644 --- a/x/erc20/spec/02_state.md +++ b/x/erc20/spec/02_state.md @@ -86,4 +86,4 @@ type GenesisState struct { // registered token pairs TokenPairs []TokenPair `protobuf:"bytes,2,rep,name=token_pairs,json=tokenPairs,proto3" json:"token_pairs"` } -``` \ No newline at end of file +``` diff --git a/x/incentives/spec/01_concepts.md b/x/incentives/spec/01_concepts.md index fa5c800..88c23d5 100644 --- a/x/incentives/spec/01_concepts.md +++ b/x/incentives/spec/01_concepts.md @@ -4,7 +4,6 @@ order: 1 # Concepts - ## Incentive The purpose of the `x/incentives` module is to provide incentives to users who interact with smart contracts. An incentive allows users to earn rewards up to `rewards = k * sum(tx fees)`, where `k` defines a reward scaler parameter that caps the incentives allocated to a single user by multiplying it with the sum of transaction fees that they’ve spent in the current epoch. diff --git a/x/incentives/spec/02_state.md b/x/incentives/spec/02_state.md index 1412d7e..7d72c3d 100644 --- a/x/incentives/spec/02_state.md +++ b/x/incentives/spec/02_state.md @@ -11,7 +11,7 @@ The `x/incentives` module keeps the following objects in state: | State Object | Description | Key | Value | Store | | --------------- | --------------------------------------------- | ------------------------------------------------------ | ------------------- | ----- | | Incentive | Incentive bytecode | `[]byte{1} + []byte(contract)` | `[]byte{incentive}` | KV | -| GasMeter | Incentive id bytecode by erc20 contract bytes | `[]byte{2} + []byte(contract) + []byte(participant) ` | `[]byte{gasMeter}` | KV | +| GasMeter | Incentive id bytecode by erc20 contract bytes | `[]byte{2} + []byte(contract) + []byte(participant)` | `[]byte{gasMeter}` | KV | | AllocationMeter | Total allocation bytes by denom bytes | `[]byte{3} + []byte(denom)` | `[]byte{sdk.Dec}` | KV | ### Incentive diff --git a/x/inflation/spec/04_events.md b/x/inflation/spec/04_events.md index f24d1a8..0348701 100644 --- a/x/inflation/spec/04_events.md +++ b/x/inflation/spec/04_events.md @@ -12,4 +12,4 @@ The `x/inflation` module emits the following events: | ----------- | -------------------- | --------------------------------------------- | | `inflation` | `"epoch_provisions"` | `{fmt.Sprintf("%d", epochNumber)}` | | `inflation` | `"epoch_number"` | `{strconv.FormatUint(uint64(in.Epochs), 10)}` | -| `inflation` | `"amount"` | `{mintedCoin.Amount.String()}` | \ No newline at end of file +| `inflation` | `"amount"` | `{mintedCoin.Amount.String()}` | diff --git a/x/inflation/spec/05_parameters.md b/x/inflation/spec/05_parameters.md index 56eec3d..7e92fde 100644 --- a/x/inflation/spec/05_parameters.md +++ b/x/inflation/spec/05_parameters.md @@ -20,7 +20,6 @@ can be modified via governance. | | | `CommunityPool: sdk.NewDecWithPrec(133333333, 9)` // 0.13 = 10% / (1 - 25%) | | `EnableInflation` | bool | `true` | - ## Mint Denom The `MintDenom` parameter sets the denomination in which new coins are minted. @@ -56,4 +55,3 @@ stakingRewards = evmosTokenModelDistribution / (1 - teamVestingDistribution) The `EnableInflation` parameter enables the daily inflation. If it is disabled, no tokens are minted and the number of skipped epochs increases for each passed epoch. - diff --git a/x/inflation/spec/06_clients.md b/x/inflation/spec/06_clients.md index aaeb8bc..85962e9 100644 --- a/x/inflation/spec/06_clients.md +++ b/x/inflation/spec/06_clients.md @@ -14,7 +14,6 @@ can obtain the full list by using theΒ `evmosd -h`Β command. ### Queries - TheΒ `query`Β commands allow users to queryΒ `inflation`Β state. **`period`** diff --git a/x/inflation/spec/README.md b/x/inflation/spec/README.md index 15e6b42..a6c205e 100644 --- a/x/inflation/spec/README.md +++ b/x/inflation/spec/README.md @@ -12,6 +12,7 @@ parent: The `x/inflation` module mints new Evmos tokens and allocates them in daily epochs according to the [Evmos Token Model](https://evmos.blog/the-evmos-token-model-edc07014978b) distribution to + * Staking Rewards `40%`, * Team Vesting `25%`, * Usage Incentives: `25%`,