Thank you for the reply!
I am testing on my laptop, which is not a perfect benchmarking tool
I redid it again today after switching off my browser and all other processes and I got a better time of 22 minutes. I confirm my machine was swapping during this process, even though I have 16Gi of RAM.
Oct 7 12:00:38.737 - node.protocol: 011-PtHangzH: flattening the context storage: this operation may take several minutes
Oct 7 12:08:36.126 - node.protocol: 011-PtHangzH: context storage flattening completed
Oct 7 12:08:36.612 - validation: initializing protocol PtHangzHogok...
Oct 7 12:08:36.614 - node.protocol: 011-PtHangzH: flattening the context storage: this operation may take several minutes
Oct 7 12:22:56.429 - node.protocol: 011-PtHangzH: context storage flattening completed
Oct 7 12:22:56.458 - validator.block: block BM39PsHtZVbc4vm1Ez5EWuEtuuTjutbMYVcMaiy8oWkmwJDvfT5 successfully validated
Oct 7 12:22:56.458 - validator.block: Request pushed on 2021-10-07T19:08:36.402-00:00, treated in 13.840us, completed in 14min20s
Oct 7 12:25:11.495 - node.store: the protocol table was updated: protocol PtHangzHogok (level 11) was
Oct 7 12:25:11.496 - node.store: activated on block BM39PsHtZVbc4vm1Ez5EWuEtuuTjutbMYVcMaiy8oWkmwJDvfT5
Oct 7 12:25:11.496 - node.store: (level 1752598)
Oct 7 12:25:11.500 - validator.chain: Update current head to BM39PsHtZVbc4vm1Ez5EWuEtuuTjutbMYVcMaiy8oWkmwJDvfT5 (level 1752598, timestamp 2021-10-06T03:00:02-00:00, fitness 01::000000000010be16), same branch
Oct 7 12:25:11.500 - validator.chain: Request pushed on 2021-10-07T19:22:56.452-00:00, treated in 6.435ms, completed in 2min15s
nochem@peck ~/workspace/tezos () $ time ./tezos-client -d /tmp/yes-wallet bake for foundation1 --minimal-timestamp
The Tezos network is a new blockchain technology.
Users are solely responsible for any risks associated
with usage of the Tezos network. Users should do their
own research to determine if Tezos is the appropriate
platform for their needs and should apply judgement and
care in their network interactions.
Oct 7 12:08:36.137 - 010-PtGRANAD.delegate.baking_forge: found 0 valid operations (0 refused) for timestamp
Oct 7 12:08:36.137 - 010-PtGRANAD.delegate.baking_forge: 2021-10-06T03:00:02.000-00:00 (fitness 01::000000000010be16)
Injected block BM39PsHtZVbc
- Intel(R) Core™ i7-7600U CPU @ 2.80GHz
- 16Gi RAM
- NVMe SSD
Here is how to replicate the problem:
# Download a rolling snapshot
# I downloaded the file tezos-mainnet-1752596.rolling
# check out tezos master branch and build
eval $(opam env)
# force upgrade of the protocol 2 blocks after the snapshot level (1752596+2 = 1752598)
./scripts/user_activated_upgrade.sh src/proto_011_PtHangzH 1752598
# create yes-node and yes-wallet
patch -p1 < scripts/yes-node.patch
dune exec scripts/yes-wallet/yes_wallet.exe -- create minimal in /tmp/yes-wallet
# create temp data dir for yes-node
# import snapshot
./tezos-node snapshot import tezos-mainnet-1752596.rolling --data-dir ~/.tezos-yes-node/
# back it up in case you do this several times
cp -r ~/.tezos-yes-node ~/.tezos-yes-node-orig
# start node without connections
./tezos-node run --connections 0 --data-dir ~/.tezos-yes-node --rpc-addr localhost
# bake twice (if foundation1 does not work, try foundation2, foundation3 etc... until it works)
./tezos-client -d /tmp/yes-wallet bake for foundation1 --minimal-timestamp
# on second bake, it will perform hangzhou storage flattening
Could you please address my two other questions: (1) what happens if the node shuts down in the middle of this and (2) is there any way to do this flattening at an other time so the proto migration is quicker?