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"