mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 21:31:02 +00:00
add warp_sync_params (#1909)
* wait for relay chain to sync then get parachain header * Spawn new thread to wait for the target block * second round of comments from the PR on substrate * third round of pr comments * add zombienet tests * rebase issues * refactor tests based on pr comments * rebase issues * pr comments * passing zombienet test * cargo +nightly fmt * Update client/network/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/service/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/service/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/service/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/service/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/network/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/network/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/network/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/network/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * use cargo lock from master * pr comments * cargo fmt * use finalised block instead of best block * use import notification stream * rebase changes * Update client/network/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/network/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/network/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/network/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/network/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/service/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/relay-chain-interface/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/relay-chain-interface/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * pr comments * use new file names * db snaphots moved to google cloud storage * Update client/network/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/service/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/service/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/service/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/service/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/service/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/service/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/service/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/service/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/service/src/lib.rs Co-authored-by: Sebastian Kunert <skunert49@gmail.com> * pr comments * Update zombienet/tests/0007-full_node_warp_sync.toml Co-authored-by: Sebastian Kunert <skunert49@gmail.com> * Update zombienet/tests/0007-full_node_warp_sync.toml Co-authored-by: Sebastian Kunert <skunert49@gmail.com> * Scenario 1 Parachain node and in-node relay chain both start with --sync warp. This ensures that the waiting logic works as expected. Scenario 2 Parachain node starts with warp sync, relay chain points to a node already synced up scenario 3 Parachain node starts with warp sync, relay chain points to a node that uses warp sync * Use test-parachain * use test-parachain chainspecs * remove relay chain spec as it is no longer required * add back relaychain spec file * pr comments * Upload snapshots to google cloud * Update zombienet/tests/0007-prepare-warp-sync-db-snapshot.md Co-authored-by: Sebastian Kunert <skunert49@gmail.com> * update documentation * Fix snapshot URLs * use master lock file * add finalized_block_hash * Patch diener for CI * Bump Zombienet * Add 0007 zombienet test * Bump zombienet * Revert "Patch diener for CI" This reverts commit 9ece6c9fc9b17058b61cd7e9dee29d3a9af87841. * merge fixes * use master lock file * Update Substrate & Polkadot --------- Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com> Co-authored-by: Sebastian Kunert <skunert49@gmail.com> Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
# Database snapshot guide
|
||||
|
||||
For this guide we will be taking a snapshot of a parachain and relay chain. Please note we are using a local chain here `rococo_local_testnet` and `local_testnet`. Live chains will have different values
|
||||
|
||||
*Please ensure that the database is not in current use, i.e no nodes are writing to it*
|
||||
|
||||
# How to prepare database for a relaychain
|
||||
To prepare snapshot for a relay chain we need to copy the database.
|
||||
|
||||
```
|
||||
mkdir -p relaychain-snapshot/alice/data/chains/rococo_local_testnet/db/
|
||||
|
||||
cp -r chain-data/alice/data/chains/rococo_local_testnet/db/. relaychain-snapshot/alice/data/chains/rococo_local_testnet/db/
|
||||
|
||||
tar -C relaychain-snapshot/alice/ -czf relaychain.tgz data
|
||||
```
|
||||
# How to prepare database for a parachain
|
||||
|
||||
To prepare snapshot for a parachain we need to copy the database for both the collator node (parachain data) and validator (relay data)
|
||||
|
||||
```
|
||||
#Parachain data
|
||||
mkdir -p parachain-snapshot/charlie/data/chains/local_testnet/db/
|
||||
|
||||
# Relay data
|
||||
mkdir -p parachain-snapshot/charlie/relay-data/chains/rococo_local_testnet/db/
|
||||
|
||||
cp -r chain-data/charlie/data/chains/local_testnet/db/. parachain-snapshot/charlie/data/chains/local_testnet/db/
|
||||
|
||||
cp -r chain-data/charlie/relay-data/chains/rococo_local_testnet/db/. parachain-snapshot/charlie/relay-data/chains/rococo_local_testnet/db/
|
||||
|
||||
tar -C parachain-snapshot/charlie/ -czf parachain.tgz data relay-data
|
||||
```
|
||||
|
||||
# Restoring a snapshot
|
||||
Zombienet will automatically download the `*.tgz` file to the respective folder for a run. However you can also download it manually, just ensure you extract the tar file in the correct directory, i.e. the root directory
|
||||
`chain-data/charlie/`
|
||||
Reference in New Issue
Block a user