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

split up node lib code #3265

Merged
merged 256 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
256 commits
Select commit Hold shift + click to select a range
5853fb1
Introduces `OwnedBatchedTx` for benchmarks. Fixes benches and tests
grarco Apr 21, 2024
6374f1a
Improves handling of txs' results in `dispatch_tx` and `finalize_block`
grarco Apr 22, 2024
3a846bd
Updates `WriteLog` to support tx batches
grarco Apr 23, 2024
8fdea42
Misc updates to write log. Updates tx result handling in `finalize_bl…
grarco Apr 24, 2024
7267a43
Renames batched txs structs
grarco Apr 26, 2024
da34ab9
Updates wasm interface and codes
grarco Apr 26, 2024
af4513d
Fixes wasm for test. Clippy + fmt
grarco Apr 26, 2024
eace62f
Updates `VpEval`
grarco Apr 26, 2024
c4d19fa
Recomputes genesis signatures. Fixes missing commitments in tests
grarco Apr 28, 2024
b4176e9
Rebuilds wasm for tests
grarco Apr 28, 2024
55dae06
Fixes serialization of tx result and unit tests
grarco Apr 28, 2024
2fd7f4c
Refactors test envs
grarco Apr 28, 2024
b342781
Fixes wasm tests
grarco Apr 28, 2024
aaf26c4
Fixes integration tests
grarco Apr 29, 2024
07ec96e
Fixes benchmarks
grarco Apr 29, 2024
14287ed
added clone to transaction structs
bengtlofgren Mar 5, 2024
f3765ee
Changelog #2817
grarco Apr 29, 2024
baac8ec
Misc refactoring
grarco Apr 29, 2024
593be95
More refactoring
grarco Apr 30, 2024
a50b4d8
Removes custom borsh impls for `BatchedTx` and `BatchedTxRef`
grarco Apr 30, 2024
25bb28c
Refactors tx result handling in `finalize_block`
grarco Apr 30, 2024
dc364c6
Refactors the batch write log
grarco Apr 30, 2024
db3e688
Renames `Commitments` and update docs
grarco Apr 30, 2024
4d0d34e
Adds an SDK function to construct tx batches
grarco Apr 30, 2024
3ec07af
Updates comments
grarco Apr 30, 2024
39ae3e9
Fixes tx interface to attach a new inner tx
grarco Apr 30, 2024
fedccfa
Adds new `mk_tx_batch` for unit testing
grarco Apr 30, 2024
74d11f8
Updates `add_inner_tx` to avoid duplicated sections
grarco May 1, 2024
245c702
Removes unused `Ciphertext` section
grarco May 1, 2024
0798717
Merge branch 'v0.34.0' into grarco/tx-batch
grarco May 1, 2024
2a55ca4
Clippy fix
grarco May 1, 2024
709de20
Recomputes signatures for localnet genesis
grarco May 1, 2024
6665cb1
Fixes fee payemnt logic and unit tests
grarco May 1, 2024
502efc5
Fixes bug in wrapper keys
grarco May 2, 2024
32d2888
Merge branch 'base' into grarco/tx-batch
grarco May 2, 2024
f6448d3
Updates error message in ibc test
grarco May 2, 2024
704ce45
Updates tx types comparisons and avoid duplicated signatures for batches
grarco May 2, 2024
e8090ed
Adds unit tests for tx batches
grarco May 2, 2024
08c93e4
Changelog #1356
grarco May 2, 2024
c918b37
Reverts `TryFrom` impls for ethereum data to `Tx`
grarco May 3, 2024
77326c7
Refactors stats accounting
grarco May 3, 2024
4be5dbc
Renames `TxInfo` and fixes write log commit in `finalize_block`
grarco May 4, 2024
6b1a5e1
Refactors `evaluate_tx_result`. Updates stats
grarco May 4, 2024
047a00d
Changes error code for batches. Fixes missing events
grarco May 5, 2024
2bd903d
Extracts ok tx result evaluation to a separate function
grarco May 5, 2024
d5c50c9
Removes broken batch section optimization
grarco May 6, 2024
93376c7
Reverts wrong shielded sync cli changes
grarco May 6, 2024
d5b4bb5
Restores shielded sync struct in the sdk
grarco May 6, 2024
cfb6cc3
Better handling of batch errors
grarco May 6, 2024
86515cf
Appends inner tx result even in case of out of gas
grarco May 6, 2024
c4410f2
More unit tests for tx batching
grarco May 6, 2024
678f029
Drops duplicated events for errored batch
grarco May 6, 2024
47ccfd3
Preserve txs order when constructing batch in the sdk
grarco May 7, 2024
7874576
Refactors match on inner tx result
grarco May 7, 2024
c1e7f7e
Improves unit tests for batches
grarco May 7, 2024
7b26560
Misc refactors, fixes typo
grarco May 7, 2024
9422864
Refactors buckets in write log with iterator chains
grarco May 7, 2024
525d044
Refactors validity booleans into a `ValidityFlags` struct
grarco May 7, 2024
0a40071
Implements a `get_tx_data` method on `Ctx`
grarco May 7, 2024
8ab0f38
Short-circuit atomic batches at the first failure
grarco May 7, 2024
01510ea
Refactors masp events to avoid dynamic attributes
grarco May 8, 2024
db8fa36
Refactors `dispatch_tx` to return a result
grarco May 8, 2024
47123bc
deliberatly empty
tzemanovic May 9, 2024
e67308a
namada/vm: disable floats in wasm
tzemanovic May 9, 2024
7f3a04c
changelog: add #3209
tzemanovic May 9, 2024
7eb5a92
replay_protection: add lints
tzemanovic May 8, 2024
61a5661
events: add lints
tzemanovic May 8, 2024
6c1c993
events: use checked arith
tzemanovic May 8, 2024
6270249
crates: update for checked events gas
tzemanovic May 8, 2024
4ad1799
merkle_tree: add lints
tzemanovic May 8, 2024
20a449a
merkle_tree: fix lints warning
tzemanovic May 8, 2024
c95b5c4
gas: add lints
tzemanovic May 8, 2024
0e70ede
gas: fix lints warning
tzemanovic May 8, 2024
1b35096
tx: add lints
tzemanovic May 9, 2024
8f108b6
tx: fix lints warnings
tzemanovic May 9, 2024
34c0c13
vote_ext: add lints
tzemanovic May 9, 2024
8e06346
storage: add lints
tzemanovic May 9, 2024
a8e20f5
Package wasm artifacts with chain dist
sug0 May 7, 2024
5c01709
Stop copying wasm checksums twice to chain dist archive
sug0 May 7, 2024
6ad0237
Do not include base dir in chain dist archive
sug0 May 7, 2024
229502b
Only emit chain dist archive from `init-network`
sug0 May 7, 2024
611ae38
Skip nonexistent wasm artifacts in `init-network`
sug0 May 7, 2024
5d56cb7
Return path to release archive from `init-network`
sug0 May 7, 2024
11ae122
Fix `init-network` in integration tests
sug0 May 7, 2024
2a3cf72
Fix `join-network` in light of `init-network` changes
sug0 May 8, 2024
2cbba3e
Rework `fetch-wasms` command
sug0 May 8, 2024
010aeb9
Introduce helper fns to fetch wasm artifacts dir
sug0 May 8, 2024
7658ae2
Optionally add persistent peers to CometBFT
sug0 May 8, 2024
7697796
upgrade docker images base version to bookworm
0x4r45h Mar 29, 2024
e15a3cf
add changelog
0x4r45h Mar 30, 2024
d28a0e8
remove unused dependencies
brentstone May 9, 2024
7bf6772
Merge branch 'feat/upgrade-docker-images' (#2975)
brentstone May 9, 2024
afeef6d
Merge branch 'bengt/light-sdk-clone' (#2817)
brentstone May 9, 2024
70200db
Merge branch 'tomas/disable-wasm-floats' (#3209)
brentstone May 9, 2024
b10fac9
update eyre
brentstone May 9, 2024
da6e92c
update h2
brentstone May 9, 2024
af818ee
update libgit2-sys
brentstone May 9, 2024
d114dcc
update mio
brentstone May 9, 2024
04d8086
update rustls
brentstone May 9, 2024
e207d43
update shlex
brentstone May 9, 2024
6c6a7fa
deps: update tower-abci to v0.12
tzemanovic May 9, 2024
4a55777
changelog: add #3216
tzemanovic May 10, 2024
bcffea5
Remove fetch wasms CLI cmd
sug0 May 10, 2024
5a96cae
scripts/gen_localnet.py: Format code
sug0 May 8, 2024
004d1ba
scripts/gen_localnet.py: Move code to main function
sug0 May 8, 2024
4a43c4b
scripts/gen_localnet.py: Refactor to improve code quality
sug0 May 8, 2024
ff687dd
scripts/gen_localnet.py: Make script executable
sug0 May 8, 2024
33c8485
scripts/gen_localnet.py: Generalize `join-network`
sug0 May 9, 2024
824f9e4
scripts/gen_localnet.py: Copy pre-genesis wallet to validator dir
sug0 May 9, 2024
cff5ec3
scripts/gen_localnet.py: Move `init-network` to fn
sug0 May 9, 2024
ca275fc
scripts/gen_localnet.py: Use modified templates
sug0 May 9, 2024
31c0b34
scripts/gen_localnet.py: Add colored output
sug0 May 9, 2024
313d5a6
scripts/gen_localnet.py: Log which validator is joining network
sug0 May 9, 2024
39836d7
scripts/gen_localnet.py: Remove chain id from cmd str
sug0 May 9, 2024
0a2d646
scripts/gen_localnet.py: Support multiple validators
sug0 May 9, 2024
b93426e
scripts/gen_localnet.py: Organize CLI args
sug0 May 9, 2024
b8bd8f2
scripts/gen_localnet.py: Parse epoch duration
sug0 May 9, 2024
7659854
Emit CLI warning log msg on non 64-bit hardware
sug0 May 9, 2024
355785f
Changelog for #3215
sug0 May 10, 2024
fd58288
Remove unused global args in `init-network`
sug0 May 10, 2024
a61cbed
Changelog for #3196
sug0 May 9, 2024
7f4b6c1
Merge branch 'v0.35.1' into grarco/tx-batch
grarco May 10, 2024
192ff1e
Validate borsh deserialization of ProposalBytes
sug0 May 10, 2024
3f581ab
Avoid using hardcoded values when configuring CometBFT
sug0 May 10, 2024
d8f959c
Changelog for #3220
sug0 May 10, 2024
b2ca880
storage: fix lint warnings
tzemanovic May 9, 2024
0103ec0
controller: add lints
tzemanovic May 9, 2024
9bd7fac
controller: fix lint warnings
tzemanovic May 9, 2024
c0e4ae7
parameters: add lints
tzemanovic May 9, 2024
5134a6d
trans_token: add lints
tzemanovic May 9, 2024
e0e16b2
shielded_token: add lints
tzemanovic May 10, 2024
1487ad7
shielded_token: fix lint warnings
tzemanovic May 10, 2024
a4c1edf
account: add lints
tzemanovic May 10, 2024
a9783e4
account: fix lint warnings
tzemanovic May 10, 2024
f779c9d
governance: add lints
tzemanovic May 10, 2024
3092e93
Merge branch 'tiago/warn-on-non-64bit-arch' (#3215)
brentstone May 10, 2024
fedecea
Merge branch 'tiago/chain-init-cleanup' (#3196)
brentstone May 10, 2024
8605a18
replace dep `parse_duration` with `duration-str`
brentstone May 10, 2024
78edf75
Merge branch 'tomas/update-tower-abci' (#3216)
brentstone May 10, 2024
a713f55
[fix]: Add line wrapping to the cli commands
batconjurer May 13, 2024
0f4bbca
[chore]: changelog
batconjurer May 13, 2024
e4e630b
Address block rejections resulting from lower validator gas prices
sug0 May 13, 2024
9092fe1
Test `compute_min_gas_price`
sug0 May 13, 2024
c2b111a
Changelog for #3228
sug0 May 13, 2024
023c74a
Update crates/apps/src/lib/cli.rs
batconjurer May 13, 2024
6fccf89
bump to tendermint-rs 0.36
yito88 May 13, 2024
e550054
Merge branch 'tiago/fix-validator-gas-prices' (#3228)
brentstone May 13, 2024
35d9e85
upgrade ed25519-consensus
brentstone May 14, 2024
0eeb52b
de-duplicate itertools by upgrading itself and tonic-build
brentstone May 14, 2024
963eaae
use regex workspace
brentstone May 14, 2024
158d4b2
[fix]: Make the internals of ValueSum private so we know that invaria…
batconjurer May 8, 2024
3720555
[chore]: changelog
batconjurer May 8, 2024
f45a513
rebasing
batconjurer May 14, 2024
446354d
[chore]: Upgrade masp deps
batconjurer May 14, 2024
386b243
[fix]: Perform the cli help wrapping at comp time
batconjurer May 14, 2024
c6d20b0
Cleans up ferveo-related things
grarco May 14, 2024
25880ab
Changelog #3241
grarco May 14, 2024
cde6070
empty commit
brentstone May 14, 2024
ff19367
governance: fix lint warnings
tzemanovic May 10, 2024
c0938a0
proof_of_stake: add lints
tzemanovic May 10, 2024
7d9b4c5
proof_of_stake: fix lint warnings
tzemanovic May 10, 2024
9b344a5
token: add lints
tzemanovic May 10, 2024
3008e1a
token: fix lint warnings
tzemanovic May 10, 2024
2f7ed72
state: add lints
tzemanovic May 10, 2024
9ee3016
state: fix lint warnings
tzemanovic May 10, 2024
293b5ca
vm_env: add lints
tzemanovic May 10, 2024
8a31264
vm_env: fix lint warnings
tzemanovic May 10, 2024
c68d7c0
ibc: add lints
tzemanovic May 10, 2024
2a488d7
ibc: fix lint warnings
tzemanovic May 10, 2024
fb7e337
ethereum_bridge: add lints
tzemanovic May 13, 2024
9457d73
ethereum_bridge: fix lint warnings
tzemanovic May 13, 2024
1a6b619
tx_env: add lints
tzemanovic May 13, 2024
ee6f0c7
vp_env: add lints
tzemanovic May 13, 2024
2083ae4
vp_env: fix lint warnings
tzemanovic May 13, 2024
97cc412
namada: add lints
tzemanovic May 13, 2024
2563b46
namada: fix lint warnings
tzemanovic May 13, 2024
2d1fb65
apps: add lints
tzemanovic May 13, 2024
ffc35de
apps: fix lint warnings
tzemanovic May 13, 2024
12b2c2d
update lock files
tzemanovic May 14, 2024
dc88353
Merge branch 'bat/fix/value-sum-invariants' (#3195)
tzemanovic May 14, 2024
bccbef0
doc/gas: fix broken link
tzemanovic May 14, 2024
c05ca33
doc/sdk: fix bare urls
tzemanovic May 14, 2024
860132b
changelog: add #3214
tzemanovic May 13, 2024
3fe20e3
Merge branch 'tomas/more-checked-arith' (#3214)
tzemanovic May 14, 2024
253676e
fixup! Merge branch 'tomas/more-checked-arith' (#3214)
tzemanovic May 14, 2024
d65e355
ibc-rs 0.53
yito88 May 14, 2024
4770f5d
for clippy
yito88 May 14, 2024
d1ed590
add changelog
yito88 May 14, 2024
46d2c75
Merge branch 'tiago/max-proposal-bytes-validation' (#3220)
tzemanovic May 14, 2024
4cafd2c
fixup! Merge branch 'tiago/max-proposal-bytes-validation' (#3220)
tzemanovic May 14, 2024
7e7d452
Merge branch 'bat/fix/issue-1796' (#3226)
brentstone May 15, 2024
db61290
use updated fork of tiny-hderive
brentstone May 14, 2024
94fd0ed
upgrade tracing-log
brentstone May 15, 2024
8c0b9e4
Updates wrapper tx constructor documentation
grarco May 15, 2024
14df790
update masp
yito88 May 15, 2024
00008b7
fixup! Merge branch 'bat/fix/issue-1796' (#3226)
brentstone May 15, 2024
e7a9f80
fix test
yito88 May 15, 2024
97a2d8d
Restores `batch_size` arg for `fetch`
grarco May 16, 2024
d460c09
Removes `unshield_section_hash` from `WrapperTx`. Updates the relativ…
grarco May 8, 2024
747e2f6
Removes fee unshielding cli and tx args
grarco May 8, 2024
01de2ab
Removes redundandt wrapper types
grarco May 9, 2024
8572a1e
Removes `descriptions_limit` protocol param
grarco May 9, 2024
cd834a3
Removes error/functions related to fee unshielding
grarco May 9, 2024
9b7351b
Renames `wrapper_fee_check`
grarco May 9, 2024
bd14c9d
Reworks sdk fee validation
grarco May 9, 2024
57d2cbe
Updates TODO comments
grarco May 9, 2024
8ab87d4
Recomputes wasm for tests modules
grarco May 9, 2024
732d3f2
Recomputes tx test fixture
grarco May 9, 2024
da6b779
Removes fee unshielding integration tests
grarco May 9, 2024
3fa05cd
Removes fee unshielding e2e test
grarco May 9, 2024
268adf0
Removes `wrapper_changed_keys` from `TxResult`
grarco May 13, 2024
6fe09f3
Assigns issues to TODOs
grarco May 15, 2024
c2e98ab
Changelog #3217
grarco May 9, 2024
c1f27ab
add lints for dbg and prints (except for in tests)
tzemanovic May 16, 2024
805f099
fix lint warnings
tzemanovic May 16, 2024
a1c534c
changelog: add #3257
tzemanovic May 16, 2024
88a3319
Remove unused WASM memory export
sug0 May 16, 2024
8362b9a
Changelog for #3258
sug0 May 16, 2024
112db3b
Merge branch 'grarco/ferveo-cleanup' (#3241)
brentstone May 16, 2024
9da7e5d
Merge branch 'tomas/lint-dbg-and-prints' (#3257)
brentstone May 16, 2024
a8c3d66
respond to comments
brentstone May 16, 2024
e93db4a
changelog: add #3218
brentstone May 16, 2024
d7d053a
Merge branch 'brent/cleanup-dependencies' (#3218)
tzemanovic May 17, 2024
6747f02
Merge branch 'tiago/dont-export-wasm-mem' (#3258)
tzemanovic May 17, 2024
9087cac
check event attribute parsing result
yito88 May 17, 2024
70be851
Merge branch 'yuji/tendermint-0.36' (#3233)
tzemanovic May 20, 2024
d5dd8a3
Merge branch 'grarco/tx-batch' (#3103)
tzemanovic May 20, 2024
30bb889
fixup! Merge branch 'grarco/tx-batch' (#3103)
brentstone May 16, 2024
1dfa217
fixup! Merge branch 'grarco/tx-batch' (#3103)
grarco May 17, 2024
56781ad
Merge branch 'grarco/masp-fees' (#3217)
tzemanovic May 20, 2024
b0321a5
fixup! Merge branch 'grarco/masp-fees' (#3217)
tzemanovic May 20, 2024
7eb526d
apps_lib: add a new crate for apps lib crate
tzemanovic May 16, 2024
3695771
`mv crates/apps/src/lib crates/apps_lib/src`
tzemanovic May 16, 2024
439af18
`mv crates/apps_lib/src/lib/mod.rs crates/apps_lib/src/lib.rs`
tzemanovic May 16, 2024
27be402
`mv crates/apps/build.rs crates/apps_lib/`
tzemanovic May 16, 2024
5c72b01
symlink proto from `apps_lib`
tzemanovic May 16, 2024
1d61b35
git: ignore the new generated version.rs path
tzemanovic May 16, 2024
1d788cb
fix paths for split up namada_apps_lib
tzemanovic May 16, 2024
15f7da2
test/apps_lib: fix the top-level dir check
tzemanovic May 16, 2024
b132a3a
changelog: add #3259
tzemanovic May 17, 2024
15b8faf
node: add a new crate for node lib crate
tzemanovic May 16, 2024
a8ae5b0
`mv crates/apps_lib/src/node crates/node/src`
tzemanovic May 16, 2024
2867ae4
`mv crates/node/src/mod.rs crates/node/src/lib.rs`
tzemanovic May 16, 2024
9a0a87d
`mv crates/node/src/ledger/* crates/node/src/`
tzemanovic May 16, 2024
0cde0c2
`mv crates/node/src/tendermint_node.rs crates/apps_lib/src/`
tzemanovic May 17, 2024
17ba4ca
`mv crates/apps_lib/src/bench_utils.rs crates/node/src/`
tzemanovic May 17, 2024
d7ca694
`rm crates/node/src/lib.rs`
tzemanovic May 17, 2024
1a4de82
`mv crates/node/src/mod.rs crates/node/src/lib.rs`
tzemanovic May 17, 2024
4295161
post node split-up fixes
tzemanovic May 17, 2024
f18adaa
changelog: add #3265
tzemanovic May 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 64 additions & 36 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ members = [
"crates/parameters",
"crates/proof_of_stake",
"crates/replay_protection",
"crates/sdk",
"crates/namada",
"crates/node",
"crates/sdk",
"crates/shielded_token",
"crates/state",
"crates/storage",
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ crates += namada_merkle_tree
crates += namada_parameters
crates += namada_proof_of_stake
crates += namada_replay_protection
crates += namada_node
crates += namada_sdk
crates += namada_shielded_token
crates += namada_state
Expand Down
3 changes: 2 additions & 1 deletion crates/apps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@ path = "src/bin/namada-relayer/main.rs"
[features]
default = ["namada/mainnet", "migrations"]
mainnet = ["namada_apps_lib/mainnet"]
jemalloc = ["namada_apps_lib/jemalloc"]
jemalloc = ["namada_node/jemalloc"]
migrations = ["namada/migrations", "namada_apps_lib/migrations"]
namada-eth-bridge = ["namada_apps_lib/namada-eth-bridge"]

[dependencies]
namada = {path = "../namada"}
namada_apps_lib = {path = "../apps_lib"}
namada_node = {path = "../node"}

color-eyre.workspace = true
eyre.workspace = true
Expand Down
24 changes: 15 additions & 9 deletions crates/apps/src/bin/namada-node/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

use eyre::{Context, Result};
use namada::core::time::{DateTimeUtc, Utc};
use namada_apps_lib::cli::cmds::TestGenesis;
use namada_apps_lib::cli::{self, cmds};
use namada_apps_lib::config::{Action, ActionAtHeight, ValidatorLocalConfig};
use namada_apps_lib::node::ledger;
use namada_node as node;
#[cfg(not(feature = "migrations"))]
use namada_sdk::display_line;

Expand All @@ -16,28 +17,28 @@ pub fn main() -> Result<()> {
let chain_ctx = ctx.take_chain_or_exit();
let wasm_dir = chain_ctx.wasm_dir();
sleep_until(args.start_time);
ledger::run(chain_ctx.config.ledger, wasm_dir);
node::run(chain_ctx.config.ledger, wasm_dir);
}
cmds::Ledger::RunUntil(cmds::LedgerRunUntil(args)) => {
let mut chain_ctx = ctx.take_chain_or_exit();
let wasm_dir = chain_ctx.wasm_dir();
sleep_until(args.time);
chain_ctx.config.ledger.shell.action_at_height =
Some(args.action_at_height);
ledger::run(chain_ctx.config.ledger, wasm_dir);
node::run(chain_ctx.config.ledger, wasm_dir);
}
cmds::Ledger::Reset(_) => {
let chain_ctx = ctx.take_chain_or_exit();
ledger::reset(chain_ctx.config.ledger)
node::reset(chain_ctx.config.ledger)
.wrap_err("Failed to reset Namada node")?;
}
cmds::Ledger::DumpDb(cmds::LedgerDumpDb(args)) => {
let chain_ctx = ctx.take_chain_or_exit();
ledger::dump_db(chain_ctx.config.ledger, args);
node::dump_db(chain_ctx.config.ledger, args);
}
cmds::Ledger::RollBack(_) => {
let chain_ctx = ctx.take_chain_or_exit();
ledger::rollback(chain_ctx.config.ledger)
node::rollback(chain_ctx.config.ledger)
.wrap_err("Failed to rollback the Namada node")?;
}
cmds::Ledger::UpdateDB(cmds::LedgerUpdateDB(args)) => {
Expand All @@ -50,7 +51,7 @@ pub fn main() -> Result<()> {
}
let mut chain_ctx = ctx.take_chain_or_exit();
#[cfg(feature = "migrations")]
ledger::update_db_keys(
node::update_db_keys(
chain_ctx.config.ledger.clone(),
args.updates,
args.dry_run,
Expand All @@ -68,7 +69,7 @@ pub fn main() -> Result<()> {
);
// don't stop on panics
let handle = std::thread::spawn(|| {
ledger::run(chain_ctx.config.ledger, wasm_dir)
node::run(chain_ctx.config.ledger, wasm_dir)
});
_ = handle.join();
std::env::remove_var("NAMADA_INITIAL_HEIGHT");
Expand All @@ -84,7 +85,7 @@ pub fn main() -> Result<()> {
}
let chain_ctx = ctx.take_chain_or_exit();
#[cfg(feature = "migrations")]
ledger::query_db(
node::query_db(
chain_ctx.config.ledger,
&args.key,
&args.hash,
Expand Down Expand Up @@ -129,6 +130,11 @@ pub fn main() -> Result<()> {
std::fs::write(config_path, updated_config).unwrap();
}
},
cmds::NamadaNode::Utils(sub) => match sub {
cmds::NodeUtils::TestGenesis(TestGenesis(args)) => {
node::utils::test_genesis(args)
}
},
}
Ok(())
}
Expand Down
Loading
Loading