Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standalone node MPS DB Upgrade #1240

Conversation

nicolae-leonte-go
Copy link
Contributor

@nicolae-leonte-go nicolae-leonte-go commented Aug 20, 2021

Introduction

Since the release of the multiple private states feature the only way to switch from a standalone node to an MPS enabled configuration was to do a full node resync. This feature introduces a new geth command that allows a more expedient upgrade.

MPS DB Upgrade Command

MPS can be enabled on a standalone node by executing the mpsdbupgrade command. It should be significantly faster than a normal sync from block 0 (especially if the network has reached a significant number of blocks).
The effect of the mpsdbupgrade command is to restructure/upgrade the existing database to present itself as an MPS enabled database with a single private state (and to set the chain config.isMPS to true).
Once the upgrade completes additional private states can be introduced but only from the current block height (you can't introduce private states at historic block heights).

Command parameters:

  • --datadir - the directory containing the GoQuorum node database

Example:

$ geth mpsdbupgrade --datadir data
Processing block 1 with hash 0xf668e8b8320040a0cabd1b6ec963a79a08536409d82b9ccaa31f62b0a1a4dc10
...
Processing block 1232739 with hash 0x2423b5d0f4c2883172f657f08d7d359b81f144b8cb8393ee24ef285058d55ce8
MPS DB upgrade finished successfully.

Related PRs

Docs: Consensys/doc.goquorum#109
QAT: Consensys/quorum-acceptance-tests#134

@nicolae-leonte-go nicolae-leonte-go marked this pull request as ready for review August 23, 2021 10:17
@nicolae-leonte-go nicolae-leonte-go changed the title Feature/standalone node mps db upgrade Standalone node MPS DB Upgrade Aug 23, 2021
cmd/geth/chaincmd.go Show resolved Hide resolved
core/mps/multiple_psr.go Show resolved Hide resolved
core/mps/upgrade_db.go Outdated Show resolved Hide resolved
@Krish1979 Krish1979 merged commit ccfc426 into Consensys:master Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants