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

Draft 0.30.2 #2444

Closed
wants to merge 123 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
5874962
Removed the dependency on address::tokens by assuming that tokens wit…
murisi Jan 16, 2024
a214f19
Allow scenarioo where non-native token receives rewards while native …
murisi Jan 17, 2024
4432167
Precompute asset types wherever possible to increase the chances that…
murisi Jan 17, 2024
ff50d75
Stop silently discarding undecoded asset types in MASP. Instead print…
murisi Jan 17, 2024
830d8ac
Test that unconverted notes can be spent in MASP
grarco Jan 16, 2024
8a0e714
Updates masp proofs
grarco Jan 16, 2024
9cf1488
Changelog #2406
grarco Jan 16, 2024
ebf714f
Fixed wrapper signing and added the writing module
batconjurer Jan 3, 2024
038075f
Adds support to call the light sdk from an async runtime
grarco Jan 15, 2024
8d210ae
Updates crate documentation of light sdk
grarco Jan 17, 2024
d72d32f
Changelog #2399
grarco Jan 15, 2024
b8e67de
Fix: undo erroneous changes in wallet introduced in 0.28.0 rc1
karbyshev Jan 12, 2024
0222bfb
Purpose constant
karbyshev Jan 15, 2024
d438cf7
Refactor: rename derivation path methods
karbyshev Jan 15, 2024
e492d48
Add derivation paths for zip32
karbyshev Jan 15, 2024
e2cd7b2
Fix zip32 import
karbyshev Jan 15, 2024
8f498c4
Rename key gen error struct
karbyshev Jan 15, 2024
4d18b5a
Add doc comment
karbyshev Jan 15, 2024
98228ea
Implement zip32 key generation in wallet
karbyshev Jan 15, 2024
5921031
Refactor: rename function
karbyshev Jan 16, 2024
84c4aad
Derive and store maps spending key in the wallet
karbyshev Jan 16, 2024
9a9340f
Fix return code
karbyshev Jan 16, 2024
9eff7ea
Store derivation path when adding zip32 key
karbyshev Jan 16, 2024
6568af0
Simplify some SDK interfaces
karbyshev Jan 16, 2024
0a171d9
Fix e2e test cases
karbyshev Jan 17, 2024
f9361d7
Derivation path compliancy checks
karbyshev Jan 17, 2024
7e1a1a0
Fix comment
karbyshev Jan 17, 2024
a7440f6
Introduce flag to allow non-compliant derivation paths
karbyshev Jan 17, 2024
8120ab7
Add changelog
karbyshev Jan 18, 2024
383a813
fix: token::burn storage api
Jan 16, 2024
29361fa
another fix and a test
brentstone Jan 17, 2024
5b12fa4
changelog: add #2408
brentstone Jan 17, 2024
cd04e97
test/apps: fix the height of the first epoch to start at 1
tzemanovic Jan 11, 2024
33fa15c
test/apps: fix test_jail_validator_for_inactivity
tzemanovic Jan 11, 2024
9d47d91
Minor refactoring of wallet e2e
karbyshev Jan 18, 2024
f372aae
test/wasm: checks for panics in tx_read host_env fn
tzemanovic Jan 15, 2024
d90582b
host_env: fix tx_result_buffer to handle a missing result value
tzemanovic Jan 15, 2024
444ef6b
host_env: fix vp_result_buffer to handle missing value
tzemanovic Jan 15, 2024
8affeda
avoid overflow panic in debug log call
tzemanovic Jan 15, 2024
14317ea
test: test more tx host env fns for panic
tzemanovic Jan 16, 2024
90612e4
changelog: add #2401
tzemanovic Jan 18, 2024
23dde75
better var names
tzemanovic Jan 18, 2024
82682fa
governance tally fix, added some tests
Jan 17, 2024
a5fa9f5
minor fixes
Jan 22, 2024
0549401
disable eth oracle test
Jan 22, 2024
48a0a62
minor refactor governance
Jan 22, 2024
bedc1d8
fix two third over two third nay
Jan 22, 2024
6f5f42a
add the fns to check tx and VP allowlist in parameters crate
tzemanovic Jan 18, 2024
014a59e
namada/protocol: check tx allowlist before running wasm code
tzemanovic Jan 18, 2024
fc9d7cf
test/protocol: test tx wasm allowlist
tzemanovic Jan 18, 2024
ab14c06
changelog: add #2419
tzemanovic Jan 18, 2024
8984b52
wasm: remove unused vp_testnet_faucet
tzemanovic Jan 19, 2024
9d0a410
move VP code allowlist check from WASM to host env
tzemanovic Jan 19, 2024
6c375f0
tests: add tests for VP allowlist
tzemanovic Jan 19, 2024
05dbb28
Now generating arbitrary ShieldedTransfer.
murisi Jan 12, 2024
801fd2b
added changelog
Jan 23, 2024
2cf8178
Increased usage of prop_oneof macro.
murisi Jan 19, 2024
c977734
Now generating binding test vectors binding signatures correctly.
murisi Jan 19, 2024
80388ea
Constrained the range of MASP test vectors generated for correctness.
murisi Jan 22, 2024
982a985
Hashed the token denomination into AssetTypes to tighten HW wallet si…
murisi Jan 22, 2024
0ef4b6c
Adds shielded commit to transfer in `gen_ibc_shielded_transfer`
grarco Jan 23, 2024
69fa0ff
Check balance key change in masp vp
grarco Jan 23, 2024
b6bc0e9
Add comment on path compliance check
karbyshev Jan 23, 2024
a58cead
Reified the pre-image of AssetTypes.
murisi Jan 23, 2024
3a3cd92
Added changelog entry.
murisi Jan 23, 2024
d1b87e2
Changelog #2428
grarco Jan 23, 2024
1275343
reformat e2e test, fix pgf inflation computation
brentstone Jan 23, 2024
6346e11
rework masp shielded set parameters
Jan 23, 2024
b46bf58
better errors for `masp_reward_tokens`
brentstone Jan 23, 2024
2d39f61
fixes from comments
brentstone Jan 23, 2024
8ba2456
changelog: add #2424
brentstone Jan 23, 2024
f528c0b
change target locked ratio for NAM in MASP
brentstone Jan 23, 2024
fc407d4
chnage MASP inflation gain params for all tokens
brentstone Jan 23, 2024
3e9a9c3
enable rocksdb jemalloc only for `make build-release`
tzemanovic Jan 24, 2024
060efa9
check diffs
yito88 Jan 25, 2024
db5702b
fix all tokens
yito88 Jan 25, 2024
f5c9257
Make BIP39 passphrase optional
karbyshev Jan 25, 2024
0f6335b
merkle tree filter
tzemanovic Jan 24, 2024
d68809f
ibc: storage keys refactor
tzemanovic Jan 19, 2024
37acb7a
use consts instead of string literals
brentstone Jan 17, 2024
a751e1a
bypass merklization and amend diff writing for specified keys
brentstone Jan 24, 2024
0aed742
tests
brentstone Jan 24, 2024
24b47a5
abstract instances of `write_bytes` to `write`
brentstone Jan 17, 2024
1e60959
fix ibc storage init
brentstone Jan 24, 2024
2ac37f0
fix imports
brentstone Jan 24, 2024
343f27f
handle non-merklized values in `State` methods
brentstone Jan 18, 2024
790acb7
edit comments
brentstone Jan 24, 2024
050b5e8
fix spelling of `merkelized`
brentstone Jan 24, 2024
f56e9f0
changelog: add #2438
tzemanovic Jan 25, 2024
54feb0c
Merge branch 'fraccaman+brent/fix-burn-function' (#2408)
tzemanovic Jan 25, 2024
6afef0b
Merge branch 'grarco/async-light-sdk' (#2399)
tzemanovic Jan 25, 2024
aa1889d
Merge branch 'murisi/masp-fixes-with-init' (#2409)
tzemanovic Jan 25, 2024
a14943b
Merge branch 'tomas/fix-fst-epoch-start' (#2380)
tzemanovic Jan 25, 2024
28c9af2
Update wallet e2e tests
karbyshev Jan 25, 2024
92e2b0d
Add changelog
karbyshev Jan 25, 2024
f7b7844
Merge branch 'tomas/tx-host-env' (#2401)
tzemanovic Jan 25, 2024
9a54a81
Merge branch 'aleks/wallet-zip32-0.30.1' (#2417)
tzemanovic Jan 25, 2024
91d615c
Merge branch 'aleks/bip39-optional-0.30.1' (#2442)
tzemanovic Jan 25, 2024
87fbdbc
Merge branch 'grarco/masp-unconverted-test' (#2406)
tzemanovic Jan 25, 2024
41ba7c2
Merge branch 'tomas/protocol-tx-allowlist' (#2419)
tzemanovic Jan 25, 2024
8bf2360
Merge branch 'fraccaman+tomas/governance-tally' (#2415)
tzemanovic Jan 25, 2024
c108160
Merge branch 'murisi/masp-test-vectors-rebased' (#2427)
tzemanovic Jan 25, 2024
5845bc1
add changelog
yito88 Jan 25, 2024
65898ff
fixup! Merge branch 'murisi/masp-test-vectors-rebased' (#2427)
tzemanovic Jan 25, 2024
a88f293
fixup! Merge branch 'murisi/masp-test-vectors-rebased' (#2427)
tzemanovic Jan 25, 2024
0b0bd08
Merge branch 'brent/change-shielded-rewards' (#2424)
tzemanovic Jan 25, 2024
4ac346e
fixup! Merge branch 'brent/change-shielded-rewards' (#2424)
tzemanovic Jan 25, 2024
1687491
Merge branch 'brent/parameters-change' (#2432)
tzemanovic Jan 25, 2024
b2bb4d7
Merge branch 'grarco/fix-shielded-actions' (#2428)
tzemanovic Jan 25, 2024
2f75690
fixup! Merge branch 'grarco/fix-shielded-actions' (#2428)
tzemanovic Jan 25, 2024
31e83a4
Merge branch 'brent/new-storage-write-REDO' (#2438)
tzemanovic Jan 25, 2024
bcf4d5d
vp/multitoken: refactor maps and sets usage
tzemanovic Jan 25, 2024
1b6ccfe
use the old params for integration tests
tzemanovic Jan 25, 2024
fcf7f97
test/integration: fix the genesis templates dir
tzemanovic Jan 25, 2024
c3deee8
Merge branch 'brent/parameters-change' (#2432)
tzemanovic Jan 25, 2024
1db2d72
changelog: add #2435
tzemanovic Jan 16, 2024
4b2fd19
added reward distribution limit for stewards, minors
Jan 25, 2024
7d8a60b
fixup! Merge branch 'brent/parameters-change' (#2432)
tzemanovic Jan 25, 2024
0bbb4a0
added changelog
Jan 25, 2024
45a160f
Merge branch 'tomas/opt-jemalloc' (#2435)
tzemanovic Jan 25, 2024
abe0d9f
Merge branch 'fraccaman/pgf-minors' (#2440)
tzemanovic Jan 25, 2024
c39dba5
Merge branch 'yuji/fix-multitoken-vp' (#2443)
tzemanovic Jan 25, 2024
da851e7
fixup! Merge branch 'yuji/fix-multitoken-vp' (#2443)
tzemanovic Jan 25, 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
2 changes: 2 additions & 0 deletions .changelog/unreleased/SDK/2399-async-light-sdk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Both the `reading` and `writing` modules of the light SDK can now be used from
within an async runtime. ([\#2399](https://github.com/anoma/namada/pull/2399))
2 changes: 2 additions & 0 deletions .changelog/unreleased/bug-fixes/2401-tx-host-env.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Fixed possible panics in transaction host environment functions.
([\#2401](https://github.com/anoma/namada/pull/2401))
2 changes: 2 additions & 0 deletions .changelog/unreleased/bug-fixes/2408-fix-burn-function.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Fix the token burn function.
([\#2408](https://github.com/anoma/namada/pull/2408))
2 changes: 2 additions & 0 deletions .changelog/unreleased/bug-fixes/2415-governance-tally.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Improving code around governance tally computations.
([\#2415](https://github.com/anoma/namada/pull/2415))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Fix the MASP VP to enable changes to the shielded set max reward rate for a
token. ([\#2424](https://github.com/anoma/namada/pull/2424))
2 changes: 2 additions & 0 deletions .changelog/unreleased/bug-fixes/2428-fix-shielded-actions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Validates changes to the balance key in masp vp.
([\#2428](https://github.com/anoma/namada/pull/2428))
2 changes: 2 additions & 0 deletions .changelog/unreleased/bug-fixes/2440-pgf-minors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Restrict the reward distribution of a steward to a maximum of 100.
([\#2440](https://github.com/anoma/namada/pull/2440))
2 changes: 2 additions & 0 deletions .changelog/unreleased/bug-fixes/2443-fix-multitoken-vp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Avoid diff overflow in Multitoken VP
([\#2443](https://github.com/anoma/namada/issues/2443))
2 changes: 2 additions & 0 deletions .changelog/unreleased/features/2417-wallet-zip32-0.30.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Implemented ZIP32 functionality for shielded pool keys.
([\#2417](https://github.com/anoma/namada/pull/2417))
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Added tx WASM code allowlist at protocol level and VP WASM code allowlist in
the host environment functions.
([\#2419](https://github.com/anoma/namada/pull/2419))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- The test vector generator now supports generating MASP transactions.
([\#2427](https://github.com/anoma/namada/pull/2427))
2 changes: 2 additions & 0 deletions .changelog/unreleased/improvements/2435-opt-jemalloc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Disabled RocksDB jemalloc feature by default for non-release builds.
([\#2404](https://github.com/anoma/namada/pull/2404))
2 changes: 2 additions & 0 deletions .changelog/unreleased/improvements/2438-new-storage-write.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Skip writing some MASP and IBC storage keys to merkle tree and DB diffs.
([\#2438](https://github.com/anoma/namada/pull/2438))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- BIP39 passphrase made optional.
([\#2442](https://github.com/anoma/namada/pull/2442))
2 changes: 2 additions & 0 deletions .changelog/unreleased/testing/2406-masp-unconverted-test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Added an integration test to verify that unconverted asset types can be spent
in the MASP. ([\#2406](https://github.com/anoma/namada/pull/2406))
4 changes: 3 additions & 1 deletion .github/workflows/scripts/e2e.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"e2e::ledger_tests::proposal_offline": 21,
"e2e::ledger_tests::pgf_governance_proposal": 320,
"e2e::ledger_tests::proposal_submission": 200,
"e2e::ledger_tests::proposal_change_shielded_reward": 200,
"e2e::pgf_steward_change_commissions": 30,
"e2e::ledger_tests::run_ledger": 5,
"e2e::ledger_tests::run_ledger_load_state_and_reset": 23,
"e2e::ledger_tests::test_namada_shuts_down_if_tendermint_dies": 2,
Expand All @@ -34,4 +36,4 @@
"e2e::wallet_tests::wallet_encrypted_key_cmds": 1,
"e2e::wallet_tests::wallet_encrypted_key_cmds_env_var": 1,
"e2e::wallet_tests::wallet_unencrypted_key_cmds": 1
}
}
6 changes: 6 additions & 0 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ bech32 = "0.8.0"
bimap = {version = "0.6.2", features = ["serde"]}
bit-set = "0.5.2"
blake2b-rs = "0.2.0"
bls12_381 = "0.8"
byte-unit = "4.0.13"
byteorder = "1.4.2"
borsh = {version = "1.2.0", features = ["unstable__schema", "derive"]}
Expand Down Expand Up @@ -105,6 +106,7 @@ ibc-testkit = {version = "0.48.1", default-features = false}
ics23 = "0.11.0"
index-set = { git = "https://github.com/heliaxdev/index-set", tag = "v0.8.1", features = ["serialize-borsh", "serialize-serde"] }
itertools = "0.10.0"
jubjub = "0.10"
k256 = { version = "0.13.0", default-features = false, features = ["ecdsa", "pkcs8", "precomputed-tables", "serde", "std"]}
lazy_static = "1.4.0"
ledger-namada-rs = { git = "https://github.com/Zondax/ledger-namada", tag = "v0.0.12" }
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ build-test:
$(cargo) +$(nightly) build --tests $(jobs)

build-release:
$(cargo) build $(jobs) --release --timings --package namada_apps --manifest-path Cargo.toml
$(cargo) build $(jobs) --release --timings --package namada_apps \
--manifest-path Cargo.toml \
--no-default-features \
--features jemalloc

build-debug:
$(cargo) build --package namada_apps --manifest-path Cargo.toml
Expand Down Expand Up @@ -169,6 +172,7 @@ test-e2e:
-Z unstable-options \
-- \
--test-threads=1 \
--nocapture \
-Z unstable-options --report-time

# Run integration tests with pre-built MASP proofs
Expand Down
14 changes: 11 additions & 3 deletions crates/apps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ name = "namadar"
path = "src/bin/namada-relayer/main.rs"

[features]
default = []
default = ["no_jemalloc"]
mainnet = [
"namada/mainnet",
]
Expand All @@ -59,6 +59,11 @@ testing = ["namada_test_utils"]
benches = ["testing", "namada_test_utils"]
integration = []

# RocksDB's "jemalloc" disabled by default as it takes a long time to build.
# Note that only exactly one of these features has to be enabled at a time.
# Jemalloc is enabled in `make build-release`.
no_jemalloc = ["dep:rocksdb"]
jemalloc = ["rocksdb_with_jemalloc"]

[dependencies]
namada = {path = "../namada", features = ["multicore", "http-client", "tendermint-rpc", "std"]}
Expand Down Expand Up @@ -142,10 +147,13 @@ warp = "0.3.2"
bytes = "1.1.0"

[target.'cfg(not(windows))'.dependencies]
rocksdb = { workspace = true, features = ['jemalloc'] } # jemalloc is not supported on windows
rocksdb = { workspace = true, optional = true }
rocksdb_with_jemalloc = { package = "rocksdb", version = "0.21.0", default-features = false, features = ['zstd', 'jemalloc'], optional = true }

[target.'cfg(windows)'.dependencies]
rocksdb = { workspace = true }
rocksdb = { workspace = true, optional = true }
# jemalloc is not supported on windows
rocksdb_with_jemalloc = { package = "rocksdb", version = "0.21.0", default-features = false, features = ['zstd'], optional = true }

[dev-dependencies]
assert_matches = "1.5.0"
Expand Down
87 changes: 71 additions & 16 deletions crates/apps/src/lib/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2975,8 +2975,11 @@ pub mod args {
arg("validator");
pub const HALT_ACTION: ArgFlag = flag("halt");
pub const HASH_LIST: Arg<String> = arg("hash-list");
pub const HD_WALLET_DERIVATION_PATH: ArgDefault<String> =
pub const HD_DERIVATION_PATH: ArgDefault<String> =
arg_default("hd-path", DefaultFn(|| "default".to_string()));
pub const HD_ALLOW_NON_COMPLIANT_DERIVATION_PATH: ArgFlag =
flag("allow-non-compliant");
pub const HD_PROMPT_BIP39_PASSPHRASE: ArgFlag = flag("bip39-passphrase");
pub const HISTORIC: ArgFlag = flag("historic");
pub const IBC_TRANSFER_MEMO_PATH: ArgOpt<PathBuf> = arg_opt("memo-path");
pub const INPUT_OPT: ArgOpt<PathBuf> = arg_opt("input");
Expand Down Expand Up @@ -6196,7 +6199,11 @@ pub mod args {
let alias_force = ALIAS_FORCE.parse(matches);
let unsafe_dont_encrypt = UNSAFE_DONT_ENCRYPT.parse(matches);
let use_device = USE_DEVICE.parse(matches);
let derivation_path = HD_WALLET_DERIVATION_PATH.parse(matches);
let derivation_path = HD_DERIVATION_PATH.parse(matches);
let allow_non_compliant =
HD_ALLOW_NON_COMPLIANT_DERIVATION_PATH.parse(matches);
let prompt_bip39_passphrase =
HD_PROMPT_BIP39_PASSPHRASE.parse(matches);
Self {
scheme,
shielded,
Expand All @@ -6205,6 +6212,8 @@ pub mod args {
unsafe_dont_encrypt,
use_device,
derivation_path,
allow_non_compliant,
prompt_bip39_passphrase,
}
}

Expand Down Expand Up @@ -6234,14 +6243,34 @@ pub mod args {
"Derive an address and public key from the seed stored on the \
connected hardware wallet.",
))
.arg(HD_WALLET_DERIVATION_PATH.def().help(
.arg(HD_DERIVATION_PATH.def().help(
"HD key derivation path. Use keyword `default` to refer to a \
scheme default path:\n- m/44'/60'/0'/0/0 for secp256k1 \
scheme\n- m/44'/877'/0'/0'/0' for ed25519 scheme.\nFor \
ed25519, all path indices will be promoted to hardened \
indexes. If none is specified, the scheme default path is \
used.",
scheme default path:\n- m/44'/60'/0'/0/0 for the transparent \
secp256k1 scheme\n- m/44'/877'/0'/0'/0' for the transparent \
ed25519 scheme\n- m/32'/877'/0' for the shielded \
setting\nFor ed25519 scheme, all path indices will be \
promoted to hardened indexes. If none is specified, the \
scheme default path is used.",
))
.arg(HD_ALLOW_NON_COMPLIANT_DERIVATION_PATH.def().help(
"Allow non-compliant HD derivation path. The compliant \
derivation path schemes include:\n- \
m/44'/60'/account'/change/address_index for the transparent \
secp256k1 scheme\n- \
m/44'/877'/account'/change'/address_index' for the \
transparent ed25519 scheme\n- m/32'/877'/account' and\n- \
m/32'/877'/account'/address_index for the shielded setting",
))
.group(
ArgGroup::new("requires_group")
.args([HD_ALLOW_NON_COMPLIANT_DERIVATION_PATH.name])
.requires(HD_DERIVATION_PATH.name),
)
.arg(
HD_PROMPT_BIP39_PASSPHRASE.def().help(
"Use an additional passphrase for HD-key generation.",
),
)
}
}

Expand All @@ -6253,7 +6282,11 @@ pub mod args {
let alias = ALIAS.parse(matches);
let alias_force = ALIAS_FORCE.parse(matches);
let unsafe_dont_encrypt = UNSAFE_DONT_ENCRYPT.parse(matches);
let derivation_path = HD_WALLET_DERIVATION_PATH.parse(matches);
let derivation_path = HD_DERIVATION_PATH.parse(matches);
let allow_non_compliant =
HD_ALLOW_NON_COMPLIANT_DERIVATION_PATH.parse(matches);
let prompt_bip39_passphrase =
HD_PROMPT_BIP39_PASSPHRASE.parse(matches);
Self {
scheme,
shielded,
Expand All @@ -6262,6 +6295,8 @@ pub mod args {
alias_force,
unsafe_dont_encrypt,
derivation_path,
allow_non_compliant,
prompt_bip39_passphrase,
}
}

Expand All @@ -6280,7 +6315,7 @@ pub mod args {
.arg(
RAW_KEY_GEN
.def()
.conflicts_with(HD_WALLET_DERIVATION_PATH.name)
.conflicts_with(HD_DERIVATION_PATH.name)
.help(
"Generate a random non-HD secret / spending key. No \
mnemonic code is generated.",
Expand All @@ -6294,14 +6329,34 @@ pub mod args {
"UNSAFE: Do not encrypt the keypair. Do not use this for keys \
used in a live network.",
))
.arg(HD_WALLET_DERIVATION_PATH.def().help(
.arg(HD_DERIVATION_PATH.def().help(
"HD key derivation path. Use keyword `default` to refer to a \
scheme default path:\n- m/44'/60'/0'/0/0 for secp256k1 \
scheme\n- m/44'/877'/0'/0'/0' for ed25519 scheme.\nFor \
ed25519, all path indices will be promoted to hardened \
indexes. If none is specified, the scheme default path is \
used.",
scheme default path:\n- m/44'/60'/0'/0/0 for the transparent \
secp256k1 scheme\n- m/44'/877'/0'/0'/0' for the transparent \
ed25519 scheme\n- m/32'/877'/0' for the shielded \
setting\nFor ed25519 scheme, all path indices will be \
promoted to hardened indexes. If none is specified, the \
scheme default path is used.",
))
.arg(HD_ALLOW_NON_COMPLIANT_DERIVATION_PATH.def().help(
"Allow non-compliant HD derivation path. The compliant \
derivation path schemes include:\n- \
m/44'/60'/account'/change/address_index for the transparent \
secp256k1 scheme\n- \
m/44'/877'/account'/change'/address_index' for the \
transparent ed25519 scheme\n- m/32'/877'/account' and\n- \
m/32'/877'/account'/address_index for the shielded setting",
))
.group(
ArgGroup::new("requires_group")
.args([HD_ALLOW_NON_COMPLIANT_DERIVATION_PATH.name])
.requires(HD_DERIVATION_PATH.name),
)
.arg(
HD_PROMPT_BIP39_PASSPHRASE.def().help(
"Use an additional passphrase for HD-key generation.",
),
)
}
}

Expand Down
Loading
Loading