diff --git a/.gitignore b/.gitignore index 385502503..7c223a9d5 100644 --- a/.gitignore +++ b/.gitignore @@ -35,4 +35,4 @@ app/data/* **/.DS_Store - +output_*.dlv diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 775ad3303..37ceafcca 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -132,4 +132,3 @@ To start the disclosure process, please send an email containing all evidence, d #### Public disclosure Once the vulnerability has been patched and deployed to the appropiate environments, the team will create a public disclosure announcement, acknowledging the vulnerability and giving credit to the original discloser or disclosers in case more than one person identifies and discloses the vulnerability. - diff --git a/app/genesis.go b/app/genesis.go index 0f93d5778..e26664120 100644 --- a/app/genesis.go +++ b/app/genesis.go @@ -8754,7 +8754,7 @@ var mainnetGenesis = `{ "jailed": true, "status": 2, "tokens": "4900000000000", - "service_url": "https://node1.poktnodes.com:443", + "service_url": "https://node1.dev.poktnodes.com:443", "chains": [ "0001", "0021" @@ -8767,7 +8767,7 @@ var mainnetGenesis = `{ "jailed": true, "status": 2, "tokens": "4900000000000", - "service_url": "https://node2.poktnodes.com:443", + "service_url": "https://node2.dev.poktnodes.com:443", "chains": [ "0001", "0021" @@ -8780,7 +8780,7 @@ var mainnetGenesis = `{ "jailed": true, "status": 2, "tokens": "200000000000", - "service_url": "https://node3.poktnodes.com:443", + "service_url": "https://node3.dev.poktnodes.com:443", "chains": [ "0001", "0021" @@ -12121,7 +12121,7 @@ var mainnetGenesis = `{ "jailed": true, "status": 2, "tokens": "152527740000", - "service_url": "https://node1.pokt.net:443", + "service_url": "https://node3.dev.pokt.net:443", "chains": [ "0001", "0021" @@ -12134,7 +12134,7 @@ var mainnetGenesis = `{ "jailed": true, "status": 2, "tokens": "148041630000", - "service_url": "https://node2.pokt.net:443", + "service_url": "https://node2.dev.pokt.net:443", "chains": [ "0001", "0021" @@ -12147,7 +12147,7 @@ var mainnetGenesis = `{ "jailed": true, "status": 2, "tokens": "148041630000", - "service_url": "https://node3.pokt.net:4433", + "service_url": "https://node3.dev.pokt.net:4433", "chains": [ "0001", "0021" @@ -14799,7 +14799,7 @@ var mainnetGenesis = `{ "jailed": true, "status": 2, "tokens": "18083175000000", - "service_url": "https://node1.pokt.foundation:443", + "service_url": "https://node3.dev.pokt.foundation:443", "chains": [ "0001", "0021" @@ -14812,7 +14812,7 @@ var mainnetGenesis = `{ "jailed": true, "status": 2, "tokens": "18083175000000", - "service_url": "https://node2.pokt.foundation:443", + "service_url": "https://node2.dev.pokt.foundation:443", "chains": [ "0001", "0021" @@ -14825,7 +14825,7 @@ var mainnetGenesis = `{ "jailed": true, "status": 2, "tokens": "18631150000000", - "service_url": "https://node3.pokt.foundation:443", + "service_url": "https://node3.dev.pokt.foundation:443", "chains": [ "0001", "0021" diff --git a/doc/guides/changesAndfeatures8.md b/doc/guides/changesAndfeatures8.md index b3a714047..5150b49e6 100644 --- a/doc/guides/changesAndfeatures8.md +++ b/doc/guides/changesAndfeatures8.md @@ -21,7 +21,7 @@ pocket nodes stake custodial `: true or false depending if non-custodial upgrade is activated. +- ``: true or false depending if non-custodial upgrade is activated. Before the upgrade is activated be sure to use `true` for `` or the transaction won't go through @@ -33,9 +33,9 @@ pocket nodes stake non-custodial `: operatorAddress is the only valid signer for blocks & relays. Should match the running node. -* ``: outputAddress is where reward and staked funds are directed. -* ``: true or false depending if non custodial upgrade is activated. +- ``: operatorAddress is the only valid signer for blocks & relays. Should match the running node. +- ``: outputAddress is where reward and staked funds are directed. +- ``: true or false depending if non custodial upgrade is activated. Replacing the `` we have the ``, notice the change from using an address to using the public key of the node. Also, we have the ``, where rewards and funds will be delivered after the update @@ -67,17 +67,17 @@ check or update your hosted chains. To use the endpoint: -* First make sure to set `"chains_hot_reload": false` before beginning, hot reloading and the update endpoint can't be +- First make sure to set `"chains_hot_reload": false` before beginning, hot reloading and the update endpoint can't be used at the same time (enabling hot reload disables the update endpoint). -* Locate your `auth.json` file in the config directory, this file contains your `authtoken` you need its value to send +- Locate your `auth.json` file in the config directory, this file contains your `authtoken` you need its value to send request to protected endpoints (../v1/private/..). - ```json - { - "Value": "", - "Issued": "2022-04-08T07:35:35.858373-04:00" - } - ``` -* Copy the token value and replace the placeholder `` with its value on this example call + ```json + { + "Value": "", + "Issued": "2022-04-08T07:35:35.858373-04:00" + } + ``` +- Copy the token value and replace the placeholder `` with its value on this example call ```text curl --location --request POST 'http://localhost:8081/v1/private/updatechains?authtoken=' \ --header 'Content-Type: application/json' \ @@ -85,30 +85,22 @@ To use the endpoint: { "id": "0001", "url": "http://localhost:8081", - "basic_auth": { - "username": "", - "password": "" - } } ]' - ``` -* Check If your request is successful using this other call + ``` +- Check If your request is successful using this other call ``` curl --location --request POST 'http://localhost:8081/v1/private/chains?authtoken=' ``` you should receive a response like this : ```json { - "0001": { - "basic_auth": { - "password": "", - "username": "" - }, - "id": "0001", - "url": "http://localhost:8081" - } + "0001": { + "id": "0001", + "url": "http://localhost:8081" + } } - ``` -* Remember to manually update your chains.json with the desired changes before or after using this method as any changes + ``` +- Remember to manually update your chains.json with the desired changes before or after using this method as any changes done using the `updatechains` endpoint will be overwritten at restart by loading the chains.json -* Also, if you are writing any automations remember the `authtoken` is recreated on every restart. +- Also, if you are writing any automations remember the `authtoken` is recreated on every restart. diff --git a/doc/guides/localnet.md b/doc/guides/localnet.md new file mode 100644 index 000000000..fd794b595 --- /dev/null +++ b/doc/guides/localnet.md @@ -0,0 +1,151 @@ +# V0 LocalNet + + + +- [Prerequisites](#prerequisites) + - [Dependencies](#dependencies) + - [Download Repos](#download-repos) +- [Playground](#playground) + - [Setup E2E Stack Environment](#setup-e2e-stack-environment) + - [Pocket E2E Stack](#pocket-e2e-stack) + - [1. Prepare Stack](#1-prepare-stack) + - [2. Run Stack](#2-run-stack) + - [3. Watch the network](#3-watch-the-network) + - [4. Cleanup Stack](#4-cleanup-stack) + - [5. Cleaning containers](#5-cleaning-containers) + - [Tx Bot](#tx-bot) + - [Configuration changes](#configuration-changes) +- [TODO](#todo) + +## Prerequisites + +### Dependencies + +This repository is intended to be deprecated within the next 12 months as of writing this document. It is only intended for experienced Pocket developers. + +It is intentionally non-exhaustive so newcomers may find it difficult to follow as it is not the intended audience. + +### Download Repos + +```bash +mkdir v0_localnet +cd v0_localnet + +git clone git@github.com:pokt-network/pocket-core.git +git clone git@github.com:pokt-network/tendermint.git +git clone git@github.com:pokt-network/tx-bot.git +git clone --recurse-submodules git@github.com:pokt-network/pocket-e2e-stack.git +``` + +Run `pwd` and identify the current path as it will be referenced to as `POCKET_CORE_REPOS_PATH` below + +## Playground + +### Setup E2E Stack Environment + +1. Copy the template env variables + +```bash +cd pocket-e2e-stack +cp .env.template .env +cp .playground.env.example .playground.env +``` + +2. Update `POCKET_CORE_REPOS_PATH` in the appropriate `.env` variables: + +```bash +# Update `POCKET_CORE_REPOS_PATH` in `.env` to be the full path reflecting where you downloaded all the repos. +sed -i 's|^POCKET_CORE_REPOS_PATH=.*$|POCKET_CORE_REPOS_PATH='$PWD'|' pocket-e2e-stack/.env +# Update `POCKET_CORE_REPOS_PATH` in `.playground.env` to be the full path reflecting the path where you downloaded all the +sed -i 's|^POCKET_CORE_REPOS_PATH=.*$|POCKET_CORE_REPOS_PATH='$PWD'|' pocket-e2e-stack/.playground.env +``` + +3. Update the Ethereum & Polygon altruist nodes + +```bash +# Update `ETH_ALTRUIST` and `POLY_ALTRUIST` appropriately. +sed -i 's|^# ETH_ALTRUIST=.*$|ETH_ALTRUIST=|' pocket-e2e-stack/.env +sed -i 's|^# POLY_ALTRUIST=.*$|POLY_ALTRUIST=|' pocket-e2e-stack/.env +``` + +```bash +source .env +source .playground.env +``` + +### Pocket E2E Stack + +```bash +cd pocket-e2e-stack +``` + +#### 1. Prepare Stack + +```bash +./bin/pokt-net/playground.sh scaffold +``` + +#### 2. Run Stack + +```bash +./bin/pokt-net/playground.sh up +``` + +**What am I running?** + +- Four containerized `Validator` nodes +- A local version of the `Tendermint` library +- Hot reloading code in both `Tendermint` and `Pocket-Core` +- A bot that can be used to send transactions to the network +- Pocket RPC endpoints are exposed at 8082, 8083, 8084, and 8085/tcp on each node respectively +- Tendermint RPC endpoints are exposed at 26658, 26659, 26660, 26661/tcp respectively + +https://user-images.githubusercontent.com/1892194/225497350-3817b262-f5d5-483b-bb8f-47fb0b614321.mov + +**IMPORTANT: Inspect the logs in case something looks abnormal or an error occurred.** + +#### 3. Watch the network + +```bash +watch -n 5 "curl -s -X 'POST' 'http://localhost:8084/v1/query/height'" +``` + +The full RPC spec can be found [here](https://editor.swagger.io/?url=https://github.com/raw/pokt-network/pocket-core/staging/doc/specs/rpc-spec.yaml). + +**IMPORTANT: It might take up to 5 minutes for the first height to start incrementing while the node prepares.** + +#### 4. Cleanup Stack + +```bash +./bin/pokt-net/playground.sh cleanup +``` + +**IMPORTANT: You will need to run `cleanup` every time you create a new setup.** + +#### 5. Cleaning containers + +If you make any changes to the scripts or need a cleaner start, you'll need to remove the containers and docker image: + +```bash +docker rm node1.dev.pokt node2.dev.pokt node3.dev.pokt node4.dev.pokt && docker rmi playground/pocket-core +``` + +### Tx Bot + +```bash +cd tx-bot +make start +# Make a selection +``` + +### Configuration changes + +- We are using the `homogenous` network is in `pokt-net` +- You can update configs by modifying `pocket-e2e-stack/.playground.env` +- You can further update configs by modifying `pocket-e2e-stack/playground/templates/config.template.json` +- Make sure to run `clean, scaffold & up` after changing configs + +## TODO + +- [ ] How to enable the monitoring stack? +- [ ] How to setup a heterogenous network? diff --git a/doc/guides/quickstart.md b/doc/guides/quickstart.md index 396de413e..d064dcb7c 100644 --- a/doc/guides/quickstart.md +++ b/doc/guides/quickstart.md @@ -451,17 +451,13 @@ Use the CLI or Manually Edit: `$HOME/.pocket/config/chains.json` {% hint style="info" %} Relay Chain ID's and docs can be found [here](https://docs.pokt.network/supported-blockchains/). {% endhint %} -These are external blockchain nodes such as ethereum, polygon and harmony. You will need to set these up by following their respective documentation. Once they are synced, you can enter the url and credentials into the following file. +These are external blockchain nodes such as ethereum, polygon and harmony. You will need to set these up by following their respective documentation. Once they are synced, you can enter the url and credentials into the following file. ```text [ { "id": "0002", "url": "http://eth-geth.com", - "basic_auth": { - "username": "", - "password": "" - } } ] ``` diff --git a/doc/releases/changelog.md b/doc/releases/changelog.md index eba6c8226..54bb9a556 100644 --- a/doc/releases/changelog.md +++ b/doc/releases/changelog.md @@ -1,24 +1,30 @@ # Changelog + ======= + ## RC-0.9.2 + - LeanPOKT - Unconfirmed Tx / Txs endpoint for txs on the mempool. ## RC-0.9.1.2 / RC-0.9.1.3 + -Fix for NCUST activation with caching ## RC-0.9.1.1 + -Fix for NCUST activation alongside RSCAL. ## RC-0.9.0 + - Mempool Refinements : - Tx max life in mempool is 2 blocks, after that txs are considered stale and evicted from the mempool - so they won't get to the block. + so they won't get to the block. - Add validation for edge case on cache equals to 0. - Backport tendermint #6068 (terminate broadcastEvidenceRoutine when peer is stopped) - Add new rpc endpoint /query/accounts. - New config.json option to enable/disable authToken generation on start (auth.json). -- Implementation of PIP22 (Stake Weighted Servicer Rewards)[RSCAL][VEDIT]. +- Implementation of PIP22 (Stake Weighted Servicer Rewards)[RSCAL][vedit]. - Customizable Max Block Size bytes and new tendermint evidence age.[BLOCK]. - Fix sync from scratch issue related to handling of new additional parameters. @@ -33,7 +39,7 @@ - Deprecated SessionDB (In Memory GolevelDB only) - Force Unstake now jails -> unstakes (refunds) (Activated with upgrade) - Fixed RPC docs for query/apps -- *RPC API Break* Added total_txs & page_total to block & account txs - deprecated total_count +- _RPC API Break_ Added total_txs & page_total to block & account txs - deprecated total_count - Implemented Relay Replay Error (Activated with upgrade) - Prompt 100 POKT over the minimum stake in CLI for UX - Enable Chains.json to be hot-reloaded every 1 minute @@ -49,11 +55,11 @@ - Enabled Validator/Servicer split on future upgrade height. - Modified upgrade behaviour to allow upcoming upgrades. -## RC-0.6.4.1 +## RC-0.9.2.1 - Fix for block Upgrade Height Testnet. -## RC-0.6.4 +## RC-0.9.2 - Upped V1 Timeout - Introduced Cache layer. Use --UseCache flag to run pocket with cache. @@ -67,279 +73,278 @@ ## RC-0.6.3 -* Implement Max\_Applications parameter \(Consensus Breaking\) -* Implemented Edit Stake \(Consensus Breaking\) +- Implement Max_Applications parameter \(Consensus Breaking\) +- Implemented Edit Stake \(Consensus Breaking\) ## RC-0.6.2 -* Implemented a Custom Transaction Indexer -* Return AllClaims if no address is passed to nodeClaims query -* No ABCI query during newTx\(\) function in pocket core module -* Change StdSignature from Base64 to Hex in RPC -* Added config to drop events from account and blocktxs +- Implemented a Custom Transaction Indexer +- Return AllClaims if no address is passed to nodeClaims query +- No ABCI query during newTx\(\) function in pocket core module +- Change StdSignature from Base64 to Hex in RPC +- Added config to drop events from account and blocktxs ## RC-0.6.1 -* Fixed RelaysToTokensMultiplier bug -* Added utility CLI command to convert evidence from amino to protobuf -* Updated RPC spec to include stdTx -* Return Dispatch for certain failed relay codes to save a hop on client side -* Fix simulate relay to use basic auth -* Updated User Guide to use RC-0.6.0 -* Added unsafe delete command to the keybase -* Added optional flag to bypass interactive prompt for commands that require passphrase input +- Fixed RelaysToTokensMultiplier bug +- Added utility CLI command to convert evidence from amino to protobuf +- Updated RPC spec to include stdTx +- Return Dispatch for certain failed relay codes to save a hop on client side +- Fix simulate relay to use basic auth +- Updated User Guide to use RC-0.6.0 +- Added unsafe delete command to the keybase +- Added optional flag to bypass interactive prompt for commands that require passphrase input ## RC-0.6.0 -* Security patch in merkle sum index -* Security patch for BlockHash -* Security patch for Proposer Selection -* Protobuf Encoding implemented -* Pocketcore module event handler fixed -* Max age of evidence enforced in blocks -* Deleted applications from state after unstake +- Security patch in merkle sum index +- Security patch for BlockHash +- Security patch for Proposer Selection +- Protobuf Encoding implemented +- Pocketcore module event handler fixed +- Max age of evidence enforced in blocks +- Deleted applications from state after unstake ## RC-0.5.2 -* Delete local Relay/Challenge Evidence on Code 66 failures -* Log relay errors to nodes \(don't just return to clients\) -* Added configuration to pre-validate auto transactions -* Sending proofs/claims moved to EndBlock -* Load only Blockmeta for PrevCtx -* Added configurable cache PrevCtx, Validators, and Applications -* Don't broadcast claims/proofs if syncing -* Spread out claims/proofs between non-session blocks -* Added max claim age configuration for proof submission -* Reorganized non-consensus breaking code in Relay/Merkle Verify for efficiency before reads from state -* Configuration to remove ABCILogs -* Fixed \(pseudo\) memory leak in Tendermints RecvPacketMsg\(\) -* Sessions only store addresses and not entire structs -* Only load bare minimum for relay processing -* Add order to AccountTxs query & blockTxsQuery RPC -* Reduce AccountTxsQuery & blockTxsQuery memory footprint -* Nondeterministic hash fix -* Code 89 Fix -* Evidence Seal Fix -* Fixes header.TotalTxs != -* Fixes header.NumTxs != -* Updating TM version and Version Number to BETA-0.5.2.3 -* Upgraded AccountTxs and BlockTxs to use ReducedTxSearch -* Implemented Reduced TxSearch in Tendermint -* Moved IAVL from Tendermint to Pocket Core -* Call LazyLoadVersion/Store for all queries and PrevCtx\(\) -* Reduced Tendermint P2P EnsurePeers actions to prevent leak -* Lowered P2P config to far more conservative numbers -* Updated FastSync to default to V1 -* Exposed default leveldb options -* Switched to only go-leveldb for leak benchmarking/performance reasons -* Child process to run madvdontneed if not set -* Updated P2P configs -* fixed nil txIndexer bug \(Tendermint now sets txindexer and blockstore\) -* removed event type and used Tendermint's abci.Event +- Delete local Relay/Challenge Evidence on Code 66 failures +- Log relay errors to nodes \(don't just return to clients\) +- Added configuration to pre-validate auto transactions +- Sending proofs/claims moved to EndBlock +- Load only Blockmeta for PrevCtx +- Added configurable cache PrevCtx, Validators, and Applications +- Don't broadcast claims/proofs if syncing +- Spread out claims/proofs between non-session blocks +- Added max claim age configuration for proof submission +- Reorganized non-consensus breaking code in Relay/Merkle Verify for efficiency before reads from state +- Configuration to remove ABCILogs +- Fixed \(pseudo\) memory leak in Tendermints RecvPacketMsg\(\) +- Sessions only store addresses and not entire structs +- Only load bare minimum for relay processing +- Add order to AccountTxs query & blockTxsQuery RPC +- Reduce AccountTxsQuery & blockTxsQuery memory footprint +- Nondeterministic hash fix +- Code 89 Fix +- Evidence Seal Fix +- Fixes header.TotalTxs != +- Fixes header.NumTxs != +- Updating TM version and Version Number to BETA-0.5.2.3 +- Upgraded AccountTxs and BlockTxs to use ReducedTxSearch +- Implemented Reduced TxSearch in Tendermint +- Moved IAVL from Tendermint to Pocket Core +- Call LazyLoadVersion/Store for all queries and PrevCtx\(\) +- Reduced Tendermint P2P EnsurePeers actions to prevent leak +- Lowered P2P config to far more conservative numbers +- Updated FastSync to default to V1 +- Exposed default leveldb options +- Switched to only go-leveldb for leak benchmarking/performance reasons +- Child process to run madvdontneed if not set +- Updated P2P configs +- fixed nil txIndexer bug \(Tendermint now sets txindexer and blockstore\) +- removed event type and used Tendermint's abci.Event ## RC-0.5.1 -* Add terminal completions -* AllowDuplicateIP config default value is now true -* Added Relay Metrics Endpoint -* Ensured pocket-evidence is deleted in all lifecycles -* Claims are now not sent if below minimum proofs -* Improved BlockTxs and AccountTxs Endpoint Output with std.msg -* AAT now printing as json string and not bytes -* Enabled exporting of new genesis file command via CLI for Decentralized Reset -* Roll back blocks / Override App Hash in case of non-deterministic state -* Stop CLI when invalid character creating multi signature accounts -* Fixed "superfluous response.WriteHeader" log message showing on the logs -* Merged POSMint into core +- Add terminal completions +- AllowDuplicateIP config default value is now true +- Added Relay Metrics Endpoint +- Ensured pocket-evidence is deleted in all lifecycles +- Claims are now not sent if below minimum proofs +- Improved BlockTxs and AccountTxs Endpoint Output with std.msg +- AAT now printing as json string and not bytes +- Enabled exporting of new genesis file command via CLI for Decentralized Reset +- Roll back blocks / Override App Hash in case of non-deterministic state +- Stop CLI when invalid character creating multi signature accounts +- Fixed "superfluous response.WriteHeader" log message showing on the logs +- Merged POSMint into core ## RC-0.5.0 -* Fixed Incorrect Logging and misleading logging for max\_signed\_blocks -* Remove all receipts to alleviate large state size -* State now doesn't accept claims for under the given param threshold -* AAT now printing as json string and not bytes // not fixed -* Logging fix for unstaked Validator in Handle Validator Signature -* enhanced proof entropy and flush to disk -* Converted `Could not get sessionCtx` in auto send claim tx to an info log +- Fixed Incorrect Logging and misleading logging for max_signed_blocks +- Remove all receipts to alleviate large state size +- State now doesn't accept claims for under the given param threshold +- AAT now printing as json string and not bytes // not fixed +- Logging fix for unstaked Validator in Handle Validator Signature +- enhanced proof entropy and flush to disk +- Converted `Could not get sessionCtx` in auto send claim tx to an info log ## RC-0.4.3 -* Update txIndexer synchronously during commit +- Update txIndexer synchronously during commit ## RC-0.4.2 -* Update timeout configs for 15 minutes -* pocket-core version checking allows greater version strings and not just the exact version -* Export State doesn't export missed blocks -* Default Fees switched to be .01 POKT or 10,000 uPOKT -* Fee multiplier accounted for in autoTX -* Added memo argument to the send-tx CLI command -* Fixed simulate relay flag -* Fixed jailing lifecycle -* Fixed multisig cli params +- Update timeout configs for 15 minutes +- pocket-core version checking allows greater version strings and not just the exact version +- Export State doesn't export missed blocks +- Default Fees switched to be .01 POKT or 10,000 uPOKT +- Fee multiplier accounted for in autoTX +- Added memo argument to the send-tx CLI command +- Fixed simulate relay flag +- Fixed jailing lifecycle +- Fixed multisig cli params ## RC-0.4.1 -* Update default config -* Fixed Slash\(\) allows zero factor slash -* Fixed ValidateValidatorStaking checks wrong structure for isJailed -* Fixed Check Validator Status before jailing -* Fixed Force Unstaked Validators Never Get Removed -* Fixed Val unstaked continue if not found -* Fixed De-escape json from tx.Response -* Fixed Account-txs and block-txs CLI commands not working -* Fixed App unstake requires 4 arguments but only needs 3 -* Fixed DAO Transfer & burn invalid signature +- Update default config +- Fixed Slash\(\) allows zero factor slash +- Fixed ValidateValidatorStaking checks wrong structure for isJailed +- Fixed Check Validator Status before jailing +- Fixed Force Unstaked Validators Never Get Removed +- Fixed Val unstaked continue if not found +- Fixed De-escape json from tx.Response +- Fixed Account-txs and block-txs CLI commands not working +- Fixed App unstake requires 4 arguments but only needs 3 +- Fixed DAO Transfer & burn invalid signature ## RC-0.4.0 -* Separated Validators By Network ID -* Remove EnsureExists from app & node modules, redundnacy with GetAccounts -* Close open connections on TMClients -* Removed all panics from source code -* Added Bloomfilter for efficient uniqueness checkint of proof objects -* Log on debug level upon failure deleting evidence -* Replace wealdtech/go-merkletree/crypto for golang.org/x/crypto -* Add RelaysToTokens as pamater for the nodes module -* removed return on loop from unstakeAllMaturedValidators -* Remove claim from world state after handled replay attack -* Use sdk.Error for app module keeper coinsFromUnstakedToStaked -* Updated minting scheme to mint on the tx handler level -* Fixed minting issue with unused fees -* Updated burning to burn on tx handler level -* Removed slash.go in apps module -* Ensured validator !isJailed in removeValidatorTokens -* Added max chains params to nodes and apps module -* Updated pocket-core to have 1 msg and 1 signature per tx -* Added RemoteCLIURL flag and config -* Removed round trip from tendermint -* Routed CLI through pocket RPC -* Change ClaimSubmissionWindow and BlocksPerSession call on getPseudorandomIndex to use the session context -* Changed getPseudorandomIndex add a new parameter for sessionCtx -* log mint errors -* Catch error writing json for RPC endpoints -* log mint errors -* Fixed denomination issue in CLI POKT to uPOKT -* Updated PopModel so no empty body `{}` is needed in RPC -* Added evidence type to proof message -* Added Node claims and claim queries _RPC_ -* Removed chains prompt and defaults to no chains if none found -* Changed SendClaimTx to use sessionContext for supportedBlockchains -* Refactor ABCI BeginBlock for app module, avoid looping twice on mature applications -* Swapped ExecuteProof and SetReceipt order on handleProofMsg func -* Added prove to queryTx call in _RPC_ and a flag in CLI -* Removed Proof Object From Relay Response in _RPC_ -* Updated regex to allow only hex character. -* Added empty/nil check to claim struct on handleProofMsg -* Added multiple optimization for efficiency and consistency between validations -* Added basic auth to chains.json -* Added pagination to receipts query in pocket core _RPC_ -* Removed .md and json RPC spec -* Removing orphaned jailed nodes after X amount of Blocks jailed. -* Fixed CORS requests on `/v1/client/dispatch`, `/v1/client/relay` and `/v1/client/challenge`. -* Split DAOTx transfer & burn to their own CLI commands to avoid user prone errors -* Added minimum proofs to pocketcore module params -* Split burn and transfer DAO CLI command, avoid error prone errors -* Cache flushes to the database periodically instead of per relay for efficiency -* Added dynamic fees for each message type -* Update RPC Docs with new unified params endpoint +- Separated Validators By Network ID +- Remove EnsureExists from app & node modules, redundnacy with GetAccounts +- Close open connections on TMClients +- Removed all panics from source code +- Added Bloomfilter for efficient uniqueness checkint of proof objects +- Log on debug level upon failure deleting evidence +- Replace wealdtech/go-merkletree/crypto for golang.org/x/crypto +- Add RelaysToTokens as pamater for the nodes module +- removed return on loop from unstakeAllMaturedValidators +- Remove claim from world state after handled replay attack +- Use sdk.Error for app module keeper coinsFromUnstakedToStaked +- Updated minting scheme to mint on the tx handler level +- Fixed minting issue with unused fees +- Updated burning to burn on tx handler level +- Removed slash.go in apps module +- Ensured validator !isJailed in removeValidatorTokens +- Added max chains params to nodes and apps module +- Updated pocket-core to have 1 msg and 1 signature per tx +- Added RemoteCLIURL flag and config +- Removed round trip from tendermint +- Routed CLI through pocket RPC +- Change ClaimSubmissionWindow and BlocksPerSession call on getPseudorandomIndex to use the session context +- Changed getPseudorandomIndex add a new parameter for sessionCtx +- log mint errors +- Catch error writing json for RPC endpoints +- log mint errors +- Fixed denomination issue in CLI POKT to uPOKT +- Updated PopModel so no empty body `{}` is needed in RPC +- Added evidence type to proof message +- Added Node claims and claim queries _RPC_ +- Removed chains prompt and defaults to no chains if none found +- Changed SendClaimTx to use sessionContext for supportedBlockchains +- Refactor ABCI BeginBlock for app module, avoid looping twice on mature applications +- Swapped ExecuteProof and SetReceipt order on handleProofMsg func +- Added prove to queryTx call in _RPC_ and a flag in CLI +- Removed Proof Object From Relay Response in _RPC_ +- Updated regex to allow only hex character. +- Added empty/nil check to claim struct on handleProofMsg +- Added multiple optimization for efficiency and consistency between validations +- Added basic auth to chains.json +- Added pagination to receipts query in pocket core _RPC_ +- Removed .md and json RPC spec +- Removing orphaned jailed nodes after X amount of Blocks jailed. +- Fixed CORS requests on `/v1/client/dispatch`, `/v1/client/relay` and `/v1/client/challenge`. +- Split DAOTx transfer & burn to their own CLI commands to avoid user prone errors +- Added minimum proofs to pocketcore module params +- Split burn and transfer DAO CLI command, avoid error prone errors +- Cache flushes to the database periodically instead of per relay for efficiency +- Added dynamic fees for each message type +- Update RPC Docs with new unified params endpoint ## RC-0.3.0 -* Added governance module from pocket-core - * Multisignature public keys / tx building to cli - * Governance level protocol upgrade signalling - * Access control list for params - * Ability to edit params TX - * Introduced DAO-Owner - * Ability to send and receive from DAO -* Added persistence to Sessions and Evidence through - * LRU cache sessions/evidence - * Sessions/evidence level-db -* Added Start without passphrase on pocket core - * sign msgs with private key or keybase - * removed password from keeper - * Updated pocket-core version -* Removed default genesis and seeds -* Prevent unstaking time reset if not equals 0 \(for vesting\) -* Relay Response now has the entire proof when sent back to the client -* Simplified slashing with static burn for validators and apps \(non consensus burns\) -* Payment for challenge tx -* Added export app command to cli -* Changed Struct used to generate RequestHash to remove empty proof object -* Changed public key field json marshalling - * update pocket-core version - * transitive change in Account JSON response for RPC - * Updated rpc-spec to reflect change -* Updated pocket-core to address duplicated minting logs -* Add pagination to Application Queries for RPC & CLI -* Add pagination to Nodes Queries for RPC & CLI -* Converted NonNative Chains to 128 bit encryption \(MD5\) -* Renamed sessionFrequency to blocksPerSession -* Changed `Proof` field from relayResponse to `proof` -* Changed `Proofs` in genesis struct to `Receipts` -* Changed HostedBlockchain field from `addr` to `id` -* Modified the key generation for receipts and claims by using the header hash -* Added headers back to payload \(affects request hash!\) -* New Dispatch Formula See Spec -* Added configurability for Pocket and Tendermint in a config.json file -* Patch for Fixed April 17, 2020 consensus failure \(0 power consensus failure\) -* Updated RPC call for Querying Validators and Apps \(See Opts in RPC Spec\) -* Updated chains.json to be a slice instead of a mapping -* Chanded defer.body.close\(\) position until after error checking in pocketcore/types/service.go executeHttpRequest -* Added protocol level enforcement of network identifier format -* Added protocol level enforcement of service url `https` -* Updated the import-armored and export commands for better UX keeping backward compatibility with pre RC 0.3.0 . -* Fixed issue querying apps/validators was ignoring the blockchain key -* Added protocol level enforcement of service url `https|http` -* Added `/v1/query/blocktxs` and `/v1/query/acounttxs` to get the list of transactions in a block or sent/received by an +- Added governance module from pocket-core + - Multisignature public keys / tx building to cli + - Governance level protocol upgrade signalling + - Access control list for params + - Ability to edit params TX + - Introduced DAO-Owner + - Ability to send and receive from DAO +- Added persistence to Sessions and Evidence through + - LRU cache sessions/evidence + - Sessions/evidence level-db +- Added Start without passphrase on pocket core + - sign msgs with private key or keybase + - removed password from keeper + - Updated pocket-core version +- Removed default genesis and seeds +- Prevent unstaking time reset if not equals 0 \(for vesting\) +- Relay Response now has the entire proof when sent back to the client +- Simplified slashing with static burn for validators and apps \(non consensus burns\) +- Payment for challenge tx +- Added export app command to cli +- Changed Struct used to generate RequestHash to remove empty proof object +- Changed public key field json marshalling + - update pocket-core version + - transitive change in Account JSON response for RPC + - Updated rpc-spec to reflect change +- Updated pocket-core to address duplicated minting logs +- Add pagination to Application Queries for RPC & CLI +- Add pagination to Nodes Queries for RPC & CLI +- Converted NonNative Chains to 128 bit encryption \(MD5\) +- Renamed sessionFrequency to blocksPerSession +- Changed `Proof` field from relayResponse to `proof` +- Changed `Proofs` in genesis struct to `Receipts` +- Changed HostedBlockchain field from `addr` to `id` +- Modified the key generation for receipts and claims by using the header hash +- Added headers back to payload \(affects request hash!\) +- New Dispatch Formula See Spec +- Added configurability for Pocket and Tendermint in a config.json file +- Patch for Fixed April 17, 2020 consensus failure \(0 power consensus failure\) +- Updated RPC call for Querying Validators and Apps \(See Opts in RPC Spec\) +- Updated chains.json to be a slice instead of a mapping +- Chanded defer.body.close\(\) position until after error checking in pocketcore/types/service.go executeHttpRequest +- Added protocol level enforcement of network identifier format +- Added protocol level enforcement of service url `https` +- Updated the import-armored and export commands for better UX keeping backward compatibility with pre RC 0.3.0 . +- Fixed issue querying apps/validators was ignoring the blockchain key +- Added protocol level enforcement of service url `https|http` +- Added `/v1/query/blocktxs` and `/v1/query/acounttxs` to get the list of transactions in a block or sent/received by an account respectively. -* Added `query account-txs` and `query block-txs` to the CLI matching the above mentioned endpoints. -* Fixed `getTMClient()` function to avoid Tendermint opening files every time a Relay/Dispatch. -* Add flag to to simulate relays, default false. +- Added `query account-txs` and `query block-txs` to the CLI matching the above mentioned endpoints. +- Fixed `getTMClient()` function to avoid Tendermint opening files every time a Relay/Dispatch. +- Add flag to to simulate relays, default false. ## RC-0.2.4 -* Removed trailing slash when performing a relay when there's no path present in the relay payload. +- Removed trailing slash when performing a relay when there's no path present in the relay payload. ## RC-0.2.3 -* Changed Tendermint's dbbackend to cleveldb after multiple validator crashes on April's 20th load test. +- Changed Tendermint's dbbackend to cleveldb after multiple validator crashes on April's 20th load test. ## RC-0.2.2 -* Fixed April 17, 2020 consensus failure \(0 power consensus failure\) +- Fixed April 17, 2020 consensus failure \(0 power consensus failure\) Seed patch to allow more incoming connections -* Changed querySupplyResponse to all string to prevent overflow +- Changed querySupplyResponse to all string to prevent overflow ## RC-0.2.1 -* Add version command to CLI -* Disallow double sign on invalid operations, disallow consensus breaks +- Add version command to CLI +- Disallow double sign on invalid operations, disallow consensus breaks ## RC-0.2.0 -* Renamed RelayProof to Proof \(in JSON\) -* Renamed Invoice \(memory\) to Evidence -* Renamed StoredInvoice \(blockchain persisted\) to Receipt -* Renamed ProofWaitingPeriod to ClaimSubmissionWindow -* Changed RPC and from `node-proof` to `node-receipt` -* Update pocket-core module to use sdk.Ctx interface -* Fix `pseudorandomGenerator` unexported properties would return empty json -* Evidence now holds proof interface to allow for challenge proofs -* Added Relay Request Hash \(Hash of payload + meta\) to RelayProof object -* Added Block to Dispatch Request -* Added Relay Meta field to relay request -* Added Challenge Functionality -* Added Challenge Request to RPC -* Changed dispatch response to an actual structure and not just a session -* Added block height to dispatch response -* Removed all MustGetPrevCtx and used PrevCtx for panic safety -* Changed receipt structure \(added evidence type\) -* Change `querySupplyResponse` struct to use `totalStaked`, `totalUnstaked` & `Total` as `*big.Int` due to memory +- Renamed RelayProof to Proof \(in JSON\) +- Renamed Invoice \(memory\) to Evidence +- Renamed StoredInvoice \(blockchain persisted\) to Receipt +- Renamed ProofWaitingPeriod to ClaimSubmissionWindow +- Changed RPC and from `node-proof` to `node-receipt` +- Update pocket-core module to use sdk.Ctx interface +- Fix `pseudorandomGenerator` unexported properties would return empty json +- Evidence now holds proof interface to allow for challenge proofs +- Added Relay Request Hash \(Hash of payload + meta\) to RelayProof object +- Added Block to Dispatch Request +- Added Relay Meta field to relay request +- Added Challenge Functionality +- Added Challenge Request to RPC +- Changed dispatch response to an actual structure and not just a session +- Added block height to dispatch response +- Removed all MustGetPrevCtx and used PrevCtx for panic safety +- Changed receipt structure \(added evidence type\) +- Change `querySupplyResponse` struct to use `totalStaked`, `totalUnstaked` & `Total` as `*big.Int` due to memory overflow -* Added RPC SPEC doc in yaml and json with swagger support -* Add off chain relay RPC for testing purposes, wont' create proof & does not affect validator - +- Added RPC SPEC doc in yaml and json with swagger support +- Add off chain relay RPC for testing purposes, wont' create proof & does not affect validator diff --git a/go.mod b/go.mod index 696210053..82bfa35a7 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,10 @@ module github.com/pokt-network/pocket-core go 1.18 +replace github.com/tendermint/tendermint => github.com/pokt-network/tendermint v0.32.11-0.20220824215059-3214a152d8d4 + +replace github.com/tendermint/tm-db => github.com/pokt-network/tm-db v0.5.2-0.20220118210553-9b2300f289ba + require ( github.com/cucumber/godog v0.12.5 github.com/go-kit/kit v0.12.0 @@ -20,7 +24,7 @@ require ( github.com/tendermint/tendermint v0.33.7 github.com/tendermint/tm-db v0.5.1 github.com/willf/bloom v2.0.3+incompatible - golang.org/x/crypto v0.0.0-20210915214749-c084706c2272 + golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 google.golang.org/protobuf v1.27.1 gopkg.in/h2non/gock.v1 v1.1.2 gopkg.in/yaml.v2 v2.4.0 @@ -69,15 +73,11 @@ require ( github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/willf/bitset v1.1.10 // indirect go.etcd.io/bbolt v1.3.3 // indirect - golang.org/x/net v0.0.0-20210917221730-978cfadd31cf // indirect - golang.org/x/sys v0.0.0-20210917161153-d61c044b1678 // indirect - golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect - golang.org/x/text v0.3.7 // indirect + golang.org/x/net v0.1.0 // indirect + golang.org/x/sys v0.1.0 // indirect + golang.org/x/term v0.1.0 // indirect + golang.org/x/text v0.4.0 // indirect google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4 // indirect google.golang.org/grpc v1.40.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) - -replace github.com/tendermint/tendermint => github.com/pokt-network/tendermint v0.32.11-0.20220824215059-3214a152d8d4 - -replace github.com/tendermint/tm-db => github.com/pokt-network/tm-db v0.5.2-0.20220118210553-9b2300f289ba diff --git a/go.sum b/go.sum index b0a57f4b4..91a0202cd 100644 --- a/go.sum +++ b/go.sum @@ -454,8 +454,8 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210915214749-c084706c2272 h1:3erb+vDS8lU1sxfDHF4/hhWyaXnhIaO+7RgL4fDZORA= -golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -526,8 +526,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210917221730-978cfadd31cf h1:R150MpwJIv1MpS0N/pc+NhTM8ajzvlmxlY5OYsrevXQ= -golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -594,10 +594,11 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210917161153-d61c044b1678 h1:J27LZFQBFoihqXoegpscI10HpjZ7B5WQLLKL2FZXQKw= -golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= +golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.1.0 h1:g6Z6vPFA9dYBAF7DWcH6sCcOntplXsDKcliusYijMlw= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -605,8 +606,8 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/types/module/module.go b/types/module/module.go index dadd60098..d65ec16de 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -299,7 +299,7 @@ func (m *Manager) EndBlock(ctx sdk.Ctx, req abci.RequestEndBlock) abci.ResponseE defer sdk.TimeTrack(time.Now()) ctx = ctx.WithEventManager(sdk.NewEventManager()) validatorUpdates := []abci.ValidatorUpdate{} - UpdateToApply := &abci.ConsensusParams{} + updateToApply := &abci.ConsensusParams{} for _, moduleName := range m.OrderEndBlockers { moduleValUpdates := m.Modules[moduleName].EndBlock(ctx, req) @@ -316,12 +316,12 @@ func (m *Manager) EndBlock(ctx sdk.Ctx, req abci.RequestEndBlock) abci.ResponseE //Currently its only a non empty struct on pocketcore module consensusParamUpdate := m.Modules[moduleName].ConsensusParamsUpdate(ctx) if !consensusParamUpdate.Equal(&abci.ConsensusParams{}) { - UpdateToApply = consensusParamUpdate + updateToApply = consensusParamUpdate } } //not adding empty struct saves us from updating consensus params every block if there are no updates. - if UpdateToApply.Equal(&abci.ConsensusParams{}) { + if updateToApply.Equal(&abci.ConsensusParams{}) { return abci.ResponseEndBlock{ ValidatorUpdates: validatorUpdates, Events: ctx.EventManager().ABCIEvents(), @@ -331,7 +331,7 @@ func (m *Manager) EndBlock(ctx sdk.Ctx, req abci.RequestEndBlock) abci.ResponseE return abci.ResponseEndBlock{ ValidatorUpdates: validatorUpdates, Events: ctx.EventManager().ABCIEvents(), - ConsensusParamUpdates: UpdateToApply, + ConsensusParamUpdates: updateToApply, } } diff --git a/x/pocketcore/types/hostedBlockchain.go b/x/pocketcore/types/hostedBlockchain.go index fc339a14a..e98ccf897 100644 --- a/x/pocketcore/types/hostedBlockchain.go +++ b/x/pocketcore/types/hostedBlockchain.go @@ -1,17 +1,20 @@ package types import ( - sdk "github.com/pokt-network/pocket-core/types" "sync" + + sdk "github.com/pokt-network/pocket-core/types" ) // HostedBlockchain" - An object that represents a local hosted non-native blockchain type HostedBlockchain struct { ID string `json:"id"` // network identifier of the hosted blockchain URL string `json:"url"` // url of the hosted blockchain - BasicAuth BasicAuth `json:"basic_auth"` // basic http auth optinal + BasicAuth BasicAuth `json:"basic_auth"` // Optional; basic http auth } +// BasicAuth is an optional http auth mechanism if the URL does not embed the secrets directly. +// Removed from examples & documentation for clarity. type BasicAuth struct { Username string `json:"username"` Password string `json:"password"`