oasisprotocol / oasis-core

Performant and Confidentiality-Preserving Smart Contracts + Blockchains
https://oasisprotocol.org
Apache License 2.0
332 stars 109 forks source link

distributable node snapshot #4370

Open pro-wh opened 2 years ago

pro-wh commented 2 years ago

suppose I have a "serverdir" of a node that's synced. Someone wants to get my copy of that.

goal:

  1. formulate instructions for how to prepare a distributable (i.e. no secret information) bundle of a synced node's state so that recipient can get chain history from a trusted source done
  2. possibly make a tool that can prepare this bundle
kostko commented 2 years ago

You mean something like this https://docs.oasis.dev/general/run-a-node/advanced/copy-state-from-one-node-to-the-other?

pro-wh commented 2 years ago

oh ok yeah. since we have that written up, let's go ahead and check that first item off the list then

valentinbud commented 2 years ago

One of the validators, @Bambarello, is already providing such a snapshot.

See https://github.com/Bambarello/cosmos-snapshots and http://snapshots.alexvalidator.com:8081/. Is this what you mean @pro-wh?

pro-wh commented 2 years ago

Yeah, I think those are the kind of snapshot. Thanks for sharing the links.

The remaining item in this issue is about adding a tool for creating those snapshots.

tjanez commented 9 months ago

We now also have Oasis Snapshots (https://snapshots.oasis.io/), an official service providing Oasis Network snapshots.

blocknodehub commented 9 months ago

However, there is no snapshot data for the latest version (oasis-4)

kostko commented 9 months ago

You should be able to sync the latest version from genesis very quickly so no snapshot is needed yet ;)

blocknodehub commented 9 months ago

I used statesync to start up, but I couldn't sync the data Config: mode: client common: data_dir: /mnt/rosemain/node/data log: format: JSON level: cometbft: info cometbft/context: error default: info consensus: state_sync: enabled: true trust_height: 16824024 trust_hash: "14e2c486579a1c03b5109a7acf86e2c65c497ed6210caa2e99179541e5cb4eda" prune: num_kept: 302400 strategy: keep_n genesis: file: /mnt/rosemain/node/etc/genesis.json p2p: seeds:

Log: {"caller":"syncer.go:173","level":"info","module":"cometbft:statesync","msg":"Discovering snapshots for 15s","ts":"2023-11-30T11:44:49.414325124Z"} {"caller":"syncer.go:173","level":"info","module":"cometbft:statesync","msg":"Discovering snapshots for 15s","ts":"2023-11-30T11:45:04.415034754Z"} {"book":"/mnt/rosemain/node/data/consensus/config/addrbook.json","caller":"file.go:22","level":"info","module":"cometbft:p2p","msg":"Saving AddrBook to file","size":1085,"ts":"2023-11-30T11:45:18.727013682Z"} {"caller":"pex_reactor.go:458","level":"info","module":"cometbft:pex","msg":"Ensure peers","numDialing":0,"numInPeers":0,"numOutPeers":20,"numToDial":0,"ts":"2023-11-30T11:45:18.735701348Z"} {"caller":"syncer.go:173","level":"info","module":"cometbft:statesync","msg":"Discovering snapshots for 15s","ts":"2023-11-30T11:45:19.416151182Z"} {"caller":"syncer.go:173","level":"info","module":"cometbft:statesync","msg":"Discovering snapshots for 15s","ts":"2023-11-30T11:45:34.416845845Z"} {"caller":"pex_reactor.go:458","level":"info","module":"cometbft:pex","msg":"Ensure peers","numDialing":0,"numInPeers":0,"numOutPeers":20,"numToDial":0,"ts":"2023-11-30T11:45:48.735306778Z"} {"caller":"syncer.go:173","level":"info","module":"cometbft:statesync","msg":"Discovering snapshots for 15s","ts":"2023-11-30T11:45:49.417094676Z"} {"caller":"syncer.go:173","level":"info","module":"cometbft:statesync","msg":"Discovering snapshots for 15s","ts":"2023-11-30T11:46:04.41752527Z"} {"caller":"pex_reactor.go:458","level":"info","module":"cometbft:pex","msg":"Ensure peers","numDialing":0,"numInPeers":0,"numOutPeers":20,"numToDial":0,"ts":"2023-11-30T11:46:18.73557099Z"} {"caller":"syncer.go:173","level":"info","module":"cometbft:statesync","msg":"Discovering snapshots for 15s","ts":"2023-11-30T11:46:19.41792175Z"} {"caller":"syncer.go:173","level":"info","module":"cometbft:statesync","msg":"Discovering snapshots for 15s","ts":"2023-11-30T11:46:34.418528888Z"} {"caller":"pex_reactor.go:458","level":"info","module":"cometbft:pex","msg":"Ensure peers","numDialing":0,"numInPeers":0,"numOutPeers":20,"numToDial":0,"ts":"2023-11-30T11:46:48.735823202Z"} {"caller":"syncer.go:173","level":"info","module":"cometbft:statesync","msg":"Discovering snapshots for 15s","ts":"2023-11-30T11:46:49.419576246Z"} {"caller":"syncer.go:173","level":"info","module":"cometbft:statesync","msg":"Discovering snapshots for 15s","ts":"2023-11-30T11:47:04.419907974Z"} {"book":"/mnt/rosemain/node/data/consensus/config/addrbook.json","caller":"file.go:22","level":"info","module":"cometbft:p2p","msg":"Saving AddrBook to file","size":1085,"ts":"2023-11-30T11:47:18.72664222Z"} {"caller":"pex_reactor.go:458","level":"info","module":"cometbft:pex","msg":"Ensure peers","numDialing":0,"numInPeers":0,"numOutPeers":20,"numToDial":0,"ts":"2023-11-30T11:47:18.735879611Z"} {"caller":"syncer.go:173","level":"info","module":"cometbft:statesync","msg":"Discovering snapshots for 15s","ts":"2023-11-30T11:47:19.421371376Z"} {"caller":"syncer.go:173","level":"info","module":"cometbft:statesync","msg":"Discovering snapshots for 15s","ts":"2023-11-30T11:47:34.421647047Z"} {"caller":"pex_reactor.go:458","level":"info","module":"cometbft:pex","msg":"Ensure peers","numDialing":0,"numInPeers":0,"numOutPeers":20,"numToDial":0,"ts":"2023-11-30T11:47:48.736150056Z"} {"caller":"syncer.go:173","level":"info","module":"cometbft:statesync","msg":"Discovering snapshots for 15s","ts":"2023-11-30T11:47:49.421772657Z"}

kostko commented 9 months ago

It is too early for the new network for there to be any snapshots available. Just sync from genesis, it should be quite fast.

blocknodehub commented 9 months ago

I see what this means, the pre-V4 data is almost completely discarded, but the block height does not start at 0. Thank you very much