Skip to content

Commit

Permalink
[migration] tools for migrating v6 chain state (#219)
Browse files Browse the repository at this point in the history
Co-authored-by: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com>
Co-authored-by: coin1111 <celticsnow123@gmail.com>
Co-authored-by: sirouk <8901571+sirouk@users.noreply.github.com>
Co-authored-by: 0xzoz <zeroexzoz@gmail.com>
  • Loading branch information
5 people committed Aug 8, 2024
1 parent 4d0183d commit 0be57b1
Show file tree
Hide file tree
Showing 226 changed files with 438,577 additions and 11,388 deletions.
27 changes: 2 additions & 25 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: debian-latest
steps:
- uses: actions/checkout@v3

- name: setup env
uses: ./.github/actions/build_env

Expand Down Expand Up @@ -159,30 +159,7 @@ jobs:
working-directory: ./tools/genesis
run: cargo test --no-fail-fast

tower:
timeout-minutes: 60
needs: [build-framework]
runs-on: debian-latest
steps:
- uses: actions/checkout@v3

- name: setup env
uses: ./.github/actions/build_env

- uses: Swatinem/rust-cache@v2.7.3
with:
shared-key: "libra-framework"
cache-all-crates: true

- uses: actions/download-artifact@v4.1.2
with:
name: framework-build
path: framework/

- name: tower
if: always()
working-directory: ./tools/tower
run: cargo test --no-fail-fast
# tower sleeps tonight

txs:
timeout-minutes: 60
Expand Down
85 changes: 75 additions & 10 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,91 @@
"version": "0.2.0",
// target/debug/ol-genesis-tools --fork --output-path /opt/genesis_from_snapshot.blob --snapshot-path /Users/gsimsek/code/libra-main/ol/devnet/snapshot/state_ver_267.54ab`
"configurations": [
{
"name": "restore-bootstrap",
"type": "lldb",
"request": "launch",
"cargo": {
"args": [
"build",
"-p",
"storage"
],
},
// cd ${ARCHIVE_PATH} && ${BIN_PATH}/${BIN_FILE} restore bootstrap-db --target-db-dir ${DB_PATH} --metadata-cache-dir ${REPO_PATH}/metacache --command-adapter-config ${REPO_PATH}/epoch-archive.yaml

"args": [
"restore",
"bootstrap-db",
"epoch-ending",
"--metadata-cache-dir",
"${workspaceFolder}/tools/storage/fixtures/epoch_ending.manifest",
"--command-adapter-config",
"${workspaceFolder}/tools/storage/fixtures",
"--target-db-dir",
"${workspaceFolder}/test_db",
],
"env": {
"RUST_LOG": "warn"
},
"cwd": "${workspaceFolder}"
},
{
"name": "rescue-script",
"name": "restore-epoch",
"type": "lldb",
"request": "launch",
"cargo": {
"args": [
"build",
"-p",
"rescue"
"storage"
],
},
"args": [
"rescue-tx",
"--data-path",
// "/root/test-db/db",
"/root/dbarchive/data_bak_2023-12-11/db",
// "--script-path",
// "${workspaceFolder}/tools/rescue/fixtures/rescue_framework_script",
"--framework-upgrade"
"restore",
"oneoff",
"epoch-ending",
"--epoch-ending-manifest",
"${workspaceFolder}/tools/storage/fixtures/epoch_ending_79-.166d/epoch_ending.manifest.unzip",
"--local-fs-dir",
"${workspaceFolder}/test_db",
"--target-db-dir",
"${workspaceFolder}/test_db",
],
"env": {
"RUST_LOG": "warn"
},
"cwd": "${workspaceFolder}"
},
{
"name": "restore-state",
"type": "lldb",
"request": "launch",
"cargo": {
"args": [
"build",
"-p",
"storage"
],
},
"args": [
"restore",
"oneoff",
"state-snapshot",
"--state-manifest",
"${workspaceFolder}/tools/storage/fixtures/state.manifest",
"--restore-mode",
"default",
"--state-into-version",
"1",
"--local-fs-dir",
"${workspaceFolder}/test_db",
"--target-db-dir",
"${workspaceFolder}/test_db",
],
"env": {
"RUST_LOG": "warn"
},
"cwd": "${workspaceFolder}"
},
{
Expand Down Expand Up @@ -389,4 +454,4 @@
"cwd": "${workspaceFolder}"
},
]
}
}
Loading

0 comments on commit 0be57b1

Please sign in to comment.