Releases: pokt-network/pocket-core
BETA-0.6.3.11
NOTE:
This is a BETA release. Please ensure you deploy it to your fleet in a slow pace. We recommend you update a small batch of nodes first, and increase your deployment over time as certainty of stability in your environment cements itself. If you run into issues, please communicate with us via discord so that we can work together to gather information and face any edge cases that escaped our quality assurance efforts.
This is a continuation of the effort started in BETA-0.6.3.8, BETA-0.6.3.9, and BETA-0.6.3.10, and contains fixes for issues that were infrequent and others that could cause widespread problems in the future.
In addition to the fixes, we added some quality of life enhancements to the release, including the removal of the mandatory LegacyCodec parameter on the CLI: you are now able to send the CLI commands without using the true/false parameter at the end.
Full list of fixes and enhancements available when the release is vetted and we bump it to RC.
Thank you for your collaboration.
Upgrade: (Same as previous releases)
-
Shutdown Pocket Core
-
!!! Ensure golang version 1.16 !!! or > golang upgrade NOTE: This version is new so please ensure you are on 1.16 or later
### Startup script linux users might find this useful (BenVan's Validator Script Only) sudo apt-get update g install 1.16
-
Build from source, Homebrew or Docker:
To build the latest binary from source, follow these steps:
Navigate into your pocket-core directory:
Example: cd ~/go/src/github.com/pokt-network/pocket-coreEnter: pocket version
You should see anything exceptBETA-0.6.3.11
To grab the latest packages and tags we are going to clean the cache, swap branches to the latest tag using:
go clean --cache
git pull
git checkout tags/BETA-0.6.3.11
Once you checked out the latest tag and branch, we are going to rebuild the binary by entering in:
go build -o $GOPATH/bin/pocket ./app/cmd/pocket_core/main.go
After it builds, make sure you are on the latest release version by entering in:
pocket version
Output will be
BETA-0.6.3.11
If you built your binary using Homebrew, follow these steps to upgrade your binary:
In a terminal window, we are going to pull the latest tap by entering:
$ brew upgrade pokt-network/pocket-core/pocketAfter it builds, make sure you are on the latest version by entering in:
pocket versionOutput will be
BETA-0.6.3.11
For individuals using Docker, all you will need to do to get the new container image is run:
docker pull poktnetwork/pocket-core:BETA-0.6.3.11
or
docker pull poktnetwork/pocket:BETA-0.6.3.11
Depending on which of the 2 Docker images you want to use.
-
Enable the Cache:
The cache is the centerpiece for this release, and is opt-in only. It can be enabled by using the flag--useCache
in the start command. It increases the use of RAM to reduce the use of CPU. Make sure to have around 512MB of RAM above the normal usage. When running in a container, ensure a strict RAM limit, otherwise consumption will rise until the orchestrator resets the container. Startup times can increase significantly depending on your hardware. Please allow time for the cache to warm.
Example usage with cache:
pocket start --mainnet --useCache
BETA-0.6.3.10
NOTE:
This is a BETA release. Please ensure you deploy it to your fleet in a slow pace. We recommend you update a small batch of nodes first, and increase your deployment over time as certainty of stability in your environment cements itself. If you run into issues, please communicate with us via discord so that we can work together to gather information and face any edge cases that escaped our quality assurance efforts.
This is a continuation of the effort started in BETA-0.6.3.8 and BETA-0.6.3.9, and fixes an issue that happened on a particular scenario: when the relay had an issue that merited a dispatch, such as receiving a request with the wrong height, the response was built with data that might have been fetched from the cache; in this scenario, the cache was not being shared with the version of the store used in building the context, resulting in an attempt to dereference a nil pointer - an issue also known as a "Null Pointer Exception" in other languages.
Thank you for your collaboration.
Upgrade: (Same as previous releases)
-
Shutdown Pocket Core
-
!!! Ensure golang version 1.16 !!! or > golang upgrade NOTE: This version is new so please ensure you are on 1.16 or later
### Startup script linux users might find this useful (BenVan's Validator Script Only) sudo apt-get update g install 1.16
-
Build from source, Homebrew or Docker:
To build the latest binary from source, follow these steps:
Navigate into your pocket-core directory:
Example: cd ~/go/src/github.com/pokt-network/pocket-coreEnter: pocket version
You should see:BETA-0.6.3.10
To grab the latest packages and tags we are going to clean the cache, swap branches to the latest tag using:
go clean --cache
git pull
git checkout tags/BETA-0.6.3.10
Once you checked out the latest tag and branch, we are going to rebuild the binary by entering in:
go build -o $GOPATH/bin/pocket ./app/cmd/pocket_core/main.go
After it builds, make sure you are on the latest release version by entering in:
pocket version
Output will be
BETA-0.6.3.10
If you built your binary using Homebrew, follow these steps to upgrade your binary:
In a terminal window, we are going to pull the latest tap by entering:
$ brew upgrade pokt-network/pocket-core/pocketAfter it builds, make sure you are on the latest version by entering in:
pocket versionOutput will be
BETA-0.6.3.10
For individuals using Docker, all you will need to do to get the new container image is run:
docker pull poktnetwork/pocket-core:BETA-0.6.3.10
or
docker pull poktnetwork/pocket:BETA-0.6.3.10
Depending on which of the 2 Docker images you want to use.
-
Enable the Cache:
The cache is the centerpiece for this release, and is opt-in only. It can be enabled by using the flag--useCache
in the start command. It increases the use of RAM to reduce the use of CPU. Make sure to have around 512MB of RAM above the normal usage. When running in a container, ensure a strict RAM limit, otherwise consumption will rise until the orchestrator resets the container. Startup times can increase significantly depending on your hardware. Please allow time for the cache to warm.
Example usage with cache:
pocket start --mainnet --useCache
BETA-0.6.3.9
NOTE:
This is a BETA release. Please ensure you deploy it to your fleet in a slow pace. We recommend you update a small batch of nodes first, and increase your deployment over time as certainty of stability in your environment cements itself. If you run into issues, please communicate with us via discord so that we can work together to gather information and face any edge cases that escaped our quality assurance efforts.
This is a continuation of the BETA-0.6.3.8 effort, and fixes an issue that was identified shortly after release and may be the cause of a small number of crashes among node runner fleets (we currently estimate about 1 crash per 72 node-hours). Please grow your deployments carefully, as you have done up to this point.
Thank you for your collaboration.
Upgrade: (Same as previous releases)
-
Shutdown Pocket Core
-
!!! Ensure golang version 1.16 !!! or > golang upgrade NOTE: This version is new so please ensure you are on 1.16 or later
### Startup script linux users might find this useful (BenVan's Validator Script Only) sudo apt-get update g install 1.16
-
Build from source, Homebrew or Docker:
To build the latest binary from source, follow these steps:
Navigate into your pocket-core directory:
Example: cd ~/go/src/github.com/pokt-network/pocket-coreEnter: pocket version
You should see:BETA-0.6.3.9
To grab the latest packages and tags we are going to clean the cache, swap branches to the latest tag using:
go clean --cache
git pull
git checkout tags/BETA-0.6.3.9
Once you checked out the latest tag and branch, we are going to rebuild the binary by entering in:
go build -o $GOPATH/bin/pocket ./app/cmd/pocket_core/main.go
After it builds, make sure you are on the latest release version by entering in:
pocket version
Output will be
BETA-0.6.3.9
If you built your binary using Homebrew, follow these steps to upgrade your binary:
In a terminal window, we are going to pull the latest tap by entering:
$ brew upgrade pokt-network/pocket-core/pocketAfter it builds, make sure you are on the latest version by entering in:
pocket versionOutput will be
BETA-0.6.3.9
For individuals using Docker, all you will need to do to get the new container image is run:
docker pull poktnetwork/pocket-core:BETA-0.6.3.9
or
docker pull poktnetwork/pocket:BETA-0.6.3.9
Depending on which of the 2 Docker images you want to use.
-
Enable the Cache:
The cache is the centerpiece for this release, and is opt-in only. It can be enabled by using the flag--useCache
in the start command. It increases the use of RAM to reduce the use of CPU. Make sure to have around 512MB of RAM above the normal usage. When running in a container, ensure a strict RAM limit, otherwise consumption will rise until the orchestrator resets the container. Startup times can increase significantly depending on your hardware. Please allow time for the cache to warm.
Example usage with cache:
pocket start --mainnet --useCache
BETA-0.6.3.8
NOTE:
This is a BETA release. Please ensure you deploy it to your fleet in a slow pace. We recommend you update a small batch of nodes first, and increase your deployment over time as certainty of stability in your environment cements itself. If you run into issues, please communicate with us via discord so that we can work together to gather information and face any edge cases that escaped our quality assurance efforts.
Upgrade: (Same as previous releases)
-
Shutdown Pocket Core
-
!!! Ensure golang version 1.16 !!! or > golang upgrade NOTE: This version is new so please ensure you are on 1.16 or later
### Startup script linux users might find this useful (BenVan's Validator Script Only) sudo apt-get update g install 1.16
-
Build from source, Homebrew or Docker:
To build the latest binary from source, follow these steps:
Navigate into your pocket-core directory:
Example: cd ~/go/src/github.com/pokt-network/pocket-coreEnter: pocket version
You should see:BETA-0.6.3.8
To grab the latest packages and tags we are going to clean the cache, swap branches to the latest tag using:
go clean --cache
git pull
git checkout tags/BETA-0.6.3.8
Once you checked out the latest tag and branch, we are going to rebuild the binary by entering in:
go build -o $GOPATH/bin/pocket ./app/cmd/pocket_core/main.go
After it builds, make sure you are on the latest release version by entering in:
pocket version
Output will be
BETA-0.6.3.8
If you built your binary using Homebrew, follow these steps to upgrade your binary:
In a terminal window, we are going to pull the latest tap by entering:
$ brew upgrade pokt-network/pocket-core/pocketAfter it builds, make sure you are on the latest version by entering in:
pocket versionOutput will be
BETA-0.6.3.8
For individuals using Docker, all you will need to do to get the new container image is run:
docker pull poktnetwork/pocket-core:BETA-0.6.3.8
or
docker pull poktnetwork/pocket:BETA-0.6.3.8
Depending on which of the 2 Docker images you want to use.
-
Enable the Cache:
The cache is the centerpiece for this release, and is opt-in only. It can be enabled by using the flag--useCache
in the start command. It increases the use of RAM to reduce the use of CPU. Make sure to have around 512MB of RAM above the normal usage. When running in a container, ensure a strict RAM limit, otherwise consumption will rise until the orchestrator resets the container. Startup times can increase significantly depending on your hardware. Please allow time for the cache to warm.
Example usage with cache:
pocket start --mainnet --useCache
RC-0.6.3.7
This Release aims to help with network stability issues.
Please change your fast sync configuration on the config.json file from V0 to V1.
"FastSync": {
"Version": "v1"
},
You can do this manually or by running pocket util update-configs
to get the default values.
Quick Reminder :
Don't restart all your nodes at once.
RC-0.6.3.6
30K Zip:
https://storage.googleapis.com/blockchains-data/data30045.zip
30K Backup Directory :
# You need the gsutil command
wget https://storage.googleapis.com/pub/gsutil.tar.gz
tar xfz gsutil.tar.gz -C $HOME
echo export PATH=${PATH}:$HOME/gsutil >> ~/.bashrc
# Download the datadir or pieces of it
gsutil -m cp -r gs://pocket-network-data/* <DATADIR>/data/
Upgrade: (Same as previous releases)
-
Shutdown Pocket Core
-
!!! Ensure golang version 1.16 !!! or > golang upgrade NOTE: This version is new so please ensure you are on 1.16 or later
### Startup script linux users might find this useful (BenVan's Validator Script Only) sudo apt-get update g install 1.16
-
Build from source, Homebrew or Docker:
To build the latest binary from source, follow these steps:
Navigate into your pocket-core directory:
Example: cd ~/go/src/github.com/pokt-network/pocket-coreEnter: pocket version
You should see:RC-0.6.3.5
(or older)To grab the latest packages and tags we are going to swap branches to the latest tag using:
git pull
git checkout tags/RC-0.6.3.6
Once you checked out the latest tag and branch, we are going to rebuild the binary by entering in:
go build -o $GOPATH/bin/pocket ./app/cmd/pocket_core/main.go
After it builds, make sure you are on the latest release version by entering in:
pocket version
Output will be
RC-0.6.3.6
If you built your binary using Homebrew, follow these steps to upgrade your binary:
In a terminal window, we are going to pull the latest tap by entering:
$ brew upgrade pokt-network/pocket-core/pocketAfter it builds, make sure you are on the latest version by entering in:
pocket versionOutput will be
RC-0.6.3.6
For individuals using Docker, all you will need to do to get the new container image is run:
docker pull poktnetwork/pocket-core:RC-0.6.3.6
or
docker pull poktnetwork/pocket:RC-0.6.3.6
Depending on which of the 2 Docker images you want to use.
RC-0.6.3.5
!!DANGER!!: REWARD ISSUES FOUND ON THIS REV
Upgrade: (Same as previous releases)
-
Shutdown Pocket Core
-
!!! Ensure golang version 1.16 !!! or > golang upgrade NOTE: This version is new so please ensure you are on 1.16 or later
### Startup script linux users might find this useful (BenVan's Validator Script Only) sudo apt-get update g install 1.16
-
Build from source, Homebrew or Docker:
To build the latest binary from source, follow these steps:
Navigate into your pocket-core directory:
Example: cd ~/go/src/github.com/pokt-network/pocket-coreEnter: pocket version
You should see:RC-0.6.3.4
(or older)To grab the latest packages and tags we are going to swap branches to the latest tag using:
git pull
git checkout tags/RC-0.6.3.5
Once you checked out the latest tag and branch, we are going to rebuild the binary by entering in:
go build -o $GOPATH/bin/pocket ./app/cmd/pocket_core/main.go
After it builds, make sure you are on the latest release version by entering in:
pocket version
Output will be
RC-0.6.3.5
If you built your binary using Homebrew, follow these steps to upgrade your binary:
In a terminal window, we are going to pull the latest tap by entering:
$ brew upgrade pokt-network/pocket-core/pocketAfter it builds, make sure you are on the latest version by entering in:
pocket versionOutput will be
RC-0.6.3.5
For individuals using Docker, all you will need to do to get the new container image is run:
docker pull poktnetwork/pocket-core:RC-0.6.3.5
or
docker pull poktnetwork/pocket:RC-0.6.3.5
Depending on which of the 2 Docker images you want to use.
RC-0.6.3.2
Hotfix for May 28 Chainhalt
RC-0.6.3
NOTE: This release requires using a backup datadir (provided below) or syncing from scratch due to the new custom transaction indexer
RC-0.6.3
- UpdateStake Transaction
- MaxApplications Bug Fix
NOTE: The above features are only enabled after the DAO 0.6.X upgrade height
Upgrade:
-
Shutdown Pocket Core (NOTE: Validators will not be jailed until they have been offline for 6 blocks. You have more than one hour to complete this upgrade. 15 to 30 minutes should be sufficient.)
-
!!! Ensure golang version 1.16 !!! or > golang upgrade NOTE: This version is new so please ensure you are on 1.16 or later
# Startup script linux users might find this useful (BenVan's Validator Script Only) sudo apt-get update g install 1.16
-
Build from source, Homebrew or Docker:
To build the latest binary from source, follow these steps:
Navigate into your pocket-core directory:
Example: cd ~/go/src/github.com/pokt-network/pocket-coreEnter: pocket version
You should see:RC-0.6.2
(or older)To grab the latest packages and tags we are going to swap branches to the latest tag using:
git pull
git checkout tags/RC-0.6.3
Once you checked out the latest tag and branch, we are going to rebuild the binary by entering in:
go build -o $GOPATH/bin/pocket ./app/cmd/pocket_core/main.go
After it builds, make sure you are on the latest release version by entering in:
pocket version
Output will be
RC-0.6.3
If you built your binary using Homebrew, follow these steps to upgrade your binary:
In a terminal window, we are going to pull the latest tap by entering:
$ brew upgrade pokt-network/pocket-core/pocketAfter it builds, make sure you are on the latest version by entering in:
pocket versionOutput will be
RC-0.6.3
For individuals using Docker, all you will need to do to get the new container image is run:
docker pull poktnetwork/pocket-core:RC-0.6.3
or
docker pull poktnetwork/pocket:RC-0.6.3
Depending on which of the 2 Docker images you want to use.
-
Upgrade your config.json
Use the default config for all options (except unique configurations like moniker, external addr, etc).You have two options:
OPTION 1 (RECOMENDED)Run pocket util update-configs command (creates a new config file and backs up old config file)
In order to use the most performant values, you will need to upgrade your config.json file in within your /config directory
Run the pocket util update-configs command to backup your old config and generate a new default one.
Manually go over your DATADIR/config/config.json.bk file and update your new DATADIR/config/config.json with any custom changes that you use.OPTION 2
Backup and remove your existing config.json file (mv DATADIR/config/config.json DATADIR/config/config.json.bk)
Execute a CLI command, (this will cause a default config.json to be created), then update the custom configurations.
Manually go over your datadir/config/config.json.bk file and update your new datadir/config/config.json with any pertinent values such as moniker, external addr, etc. -
NOTE: **Step 5 and 6 IS ONLY NEEDED IF RUNNING VERSION EARLIER THAN RC-0.6.0:
Delete Session.DB before upgradingrm -rf <datadir>/session.db
-
Convert pocket_evidence.DB before upgrading
pocket util convert-pocket-evidence-db
Successfully Converted Pocket Evidence DB
If the command Failed and success message not shown, delete pocket_evidence.DB
-
NOTE: Step 7 IS NEEDED FOR ANY VERSION BEFORE RC-0.6.2 DUE TO THE NEW TRANSACTION INDEXER
- PNI temporarily will provide a backup datadir to download to avoid syncing from scratch (MAINNET ONLY):
27K .tar.gz
After uncompressing the file, replace the DATADIR/data folder with the new data folder.
- PNI temporarily will provide a backup datadir to download to avoid syncing from scratch (MAINNET ONLY):
Release Details:
MaxApplications Param:
- Applications cannot stake (no matter what amount) if this parameter is enabled and MaxApplications threshold is reached.
- If an Application unstakes a slot will open up.
UpdateStake
- Apps
- Applications can up their stake amount (but cannot lessen stake amount)
- Applications can updated their RelayChains they are staked for
- Nodes
-
Nodes can up their stake amount (but cannot lessen stake amount)
-
Nodes can update their service url
-
Nodes can update their RelayChains
Rules:
1) Must be after upgrade height
2) You should ONLY be able to execute this transaction while status = staked
3) You should be able to execute this transaction while in jail
4) Only can modify certain parts of the structuretype Application struct { Address sdk.Address // SHOULD NOT CHANGE PublicKey crypto.PublicKey // SHOULD NOT CHANGE Jailed bool // SHOULD NOT CHANGE Status sdk.StakeStatus // SHOULD NOT CHANGE Chains []string // CAN CHANGE StakedTokens sdk.BigInt // CAN GO UP ONLY MaxRelays sdk.BigInt // CAN GO UP ONLY UnstakingCompletionTime time.Time // SHOULD NOT CHANGE } type Validator struct { Address sdk.Address // SHOULD NOT CHANGE PublicKey crypto.PublicKey // SHOULD NOT CHANGE Jailed bool // SHOULD NOT CHANGE Status sdk.StakeStatus // SHOULD NOT CHANGE Chains []string // CAN CHANGE ServiceURL string // CAN CHANGE StakedTokens sdk.BigInt // CAN GO UP ONLY UnstakingCompletionTime time.Time // SHOULD NOT CHANGE }
-
How?
Simply execute the stake transaction again with updated values:
pocket node stake <fromAddr> <amount> <relayChainIDs> <serviceURI> <chainID> <fee> <legacyCodec=(true | false)>
pocket app stake <fromAddr> <amount> <relayChainIDs> <chainID> <fee> <legacyCodec=(true | false)>
As long as the new parameters adhere to the rules described above, the transaction will successfully update staked values.
Details in the CLI Spec and the Architecture guide.
Testing and QA considerations:
- Stake should be working as normal.
- Unstake should be working as normal.
- Update stake should only work after upgradeHeight (validate that it’s not possible before)
- Update stake should only work for staked entities.
- Update stake should still match original rulings.
- If executed a change mid session (while servicing), there are some other behaviors that are expected
A) if a node removes that chain from their list they will not get paid for that claim / proof - PASSED
B) the v1/dispatch sequence should not show the node anymore - PASSED (it’s removed after the session ends tho)
C) if an app removes the chain from the list, a node should stop servicing the app // this might not be true
D) a node should get paid for an app that changed mid session
E) If an app updates stake and Max relays the node cannot do more than previous max relays // this might not be true
F) if a node changes service url the change should happen right away in the v1/dispatch sequence - Happened in the next block (different than with chain IDs) - Tendermint’s behavour:
- Depending on the stake updated, node/Apps should be removed/added under the same rules, correct?
- Document tests in the testing documentation framework
If UpdateStake is executed mid session (while servicing), there are some other behaviors that are expected:
A) If a node removes that chain from their list they will not get paid for that claim/proof
B) The v1/dispatch sequence should not show the node anymore
C) If an app removes the chain from the list, a node should stop servicing the APP
D) A node should get paid for an app that changed mid session
E) If an app updates stake and Max relays the node cannot do more than previous max relays
F) If a node changes service url the change should happen right away in the v1/dispatch sequence
MaxApplications - make sure is enabled after upgradeHeight.
MaxApplications - make sure N quantity of APPs can be staked before the upgradeHeight.
MaxApplications - Enabled - Block new exceeding APPs to stake.
MaxApplications - Enabled and Reached - Unstaking APPs allow new staking APP to be staked.
MaxApplications - Enabled and Decreased - Existing staked APPs remain staked.
MaxApplications - Enabled and Decreased - Existing staked APPs remain staked (if they are greater than maxAPP)
MaxApplications - UpgradeHeight occurs - Existing staked APPs remain staked (if they are greater than maxAPP)
For more information on test results/details, this spreadsheet stated them:
https://docs.google.com/spreadsheets/d/1OPzsIxMs6FdxocYujgh_WHs3ohbjNKIHzH0xy8w57Y8/edit#gid=285455087
For steps by steps and procedural details on each scenario, please refer to the following repo (in which latest scenarios are still being updated):
https://github.com/pokt-network/pocket-core-func-tests
**Attached, please find the setups used for this fu...
RC-0.6.2
NOTE: This release requires using a backup datadir (provided below) or syncing from scratch due to the new custom transaction indexer
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
Upgrade
-
Shutdown Pocket Core (NOTE: Validators will not be jailed until they have been offline for 6 blocks. You have more than one hour to complete this upgrade. 15 to 30 minutes should be sufficient.)
-
!!! Ensure golang version 1.16 !!! or > golang upgrade NOTE: This version is new so please ensure you are on 1.16 or later
# Startup script linux users might find this useful (BenVan's Validator Script Only) sudo apt-get update g install 1.16
-
Build from source, Homebrew or Docker:
To build the latest binary from source, follow these steps:
Navigate into your pocket-core directory:
Example: cd ~/go/src/github.com/pokt-network/pocket-coreEnter: pocket version
You should see:RC-0.6.1
(or older)To grab the latest packages and tags we are going to swap branches to the latest tag using:
git pull
git checkout tags/RC-0.6.2
Once you checked out the latest tag and branch, we are going to rebuild the binary by entering in:
go build -o $GOPATH/bin/pocket ./app/cmd/pocket_core/main.go
After it builds, make sure you are on the latest release version by entering in:
pocket version
Output will be
RC-0.6.2
If you built your binary using Homebrew, follow these steps to upgrade your binary:
In a terminal window, we are going to pull the latest tap by entering:
$ brew upgrade pokt-network/pocket-core/pocketAfter it builds, make sure you are on the latest version by entering in:
pocket versionOutput will be
RC-0.6.2
For individuals using Docker, all you will need to do to get the new container image is run:
docker pull poktnetwork/pocket-core:RC-0.6.2
or
docker pull poktnetwork/pocket:RC-0.6.2
Depending on which of the 2 Docker images you want to use.
-
Upgrade your config.json
Use the default config for all options (except unique configurations like moniker, external addr, etc).You have two options:
OPTION 1 (RECOMENDED)Run pocket util update-configs command (creates a new config file and backs up old config file)
In order to use the most performant values, you will need to upgrade your config.json file in within your /config directory.
The following example assumes your config.json to be ~/.pocket/config, but feel free to swap out your actual with the location in your system.
Run the pocket util update-configs command to backup your old config and generate a new default one.
Manually go over your /config/config.json.bk file and update your new /config/config.json with any custom changes that you use.OPTION 2
Backup and remove your existing config.json file (mv ~/.pocket/config/config.json ~/.pocket/config/config.json.bk)
Execute a CLI command, (this will cause a default config.json to be created), then update the custom configurations.
Manually go over your datadir/config/config.json.bk file and update your new datadir/config/config.json with any pertinent values such as moniker, external addr, etc. -
NOTE: **Step 5 and 6 IS ONLY NEEDED IF RUNNING VERSION EARLIER THAN RC-0.6.0:
Delete Session.DB before upgradingrm -rf <datadir>/session.db
-
Convert pocket_evidence.DB before upgrading
pocket util convert-pocket-evidence-db
Successfully Converted Pocket Evidence DB
If the command Failed and success message not shown, delete pocket_evidence.DB
-
NOTE: Step 7 IS NEEDED FOR ANY VERSION DUE TO THE NEW TRANSACTION INDEXER
- PNI temporarily will provide a backup datadir to download to avoid syncing from scratch:
24K .tar.gz - After uncompressing theses files, place the contents in the
<datadir>/data
folder
- PNI temporarily will provide a backup datadir to download to avoid syncing from scratch:
TXIndexer
Pocket Core uses a custom transaction indexer for optimal usage of resources. Tendermint's default TxIndexer paginates
and sorts transactions during time of query, resulting in a large consumption of resources. Tendermint's default TxIndexer
also relies on events to index transactions, and due to a bug in RC-0.5.X pocket core module events are all concatenated
together. This makes indexing a nightmare.
Custom Indexer
Since LevelDB comparators order lexicongraphically, the implementation uses ELEN to encode numbers to ensure alphanumerical
ordering at insertion time. https://www.zanopha.com/docs/elen.pdf
Since the keys are sorted alphanumerically from the start, we don't have to:
- Load all results to memory
- Paginate and sort transactions after
This indexer inserts in sorted order so it can paginate and return based on the db iterator resulting in a significant
reduction in resource consumption
The custom pocket core transaction indexer also reduces the scope of the Search() functionality to optimize strictly for
the following use cases:
- BlockTxs (Get transactions at a certain height)
- AccountTxs (Get transactions for a certain account (sent and received))
The custom pocket core transaction indexer also injects the message_type into the struct to provide an easier method of
parsing the transactions. json:"message_type"