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

Grarco/draft #2437

Closed
wants to merge 114 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 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
a943c71
deliberately empty
tzemanovic 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
2e053b4
Merge branch 'fraccaman+brent/fix-burn-function' (#2408)
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
9035af3
Merge branch 'grarco/async-light-sdk' (#2399)
grarco Jan 19, 2024
41404bf
storage write/delete options for inclusion in merkle tree and diffs
brentstone Jan 17, 2024
bf98939
masp writes without merklization or diffs
brentstone Jan 17, 2024
39db0a7
abstract instances of `write_bytes` to `write`
brentstone Jan 17, 2024
6e23f4b
use consts instead of string literals
brentstone Jan 17, 2024
85d08e5
tests for writing without merklization or diffs
brentstone Jan 17, 2024
3599fa9
ibc writes without merklization or diffs
brentstone Jan 18, 2024
52a2f3f
remake wasms for tests
brentstone Jan 18, 2024
1ddf8ae
some TODOs and another comment
brentstone Jan 18, 2024
0b2085c
handle non-merklized values in `State` methods
brentstone Jan 18, 2024
ef90ed1
ibc: storage keys refactor
tzemanovic Jan 19, 2024
bd42d4e
changelog: add #2355
tzemanovic Jan 19, 2024
5e53551
No merkle/diffs for remaining masp keys
grarco Jan 19, 2024
82682fa
governance tally fix, added some tests
Jan 17, 2024
7038e64
prune non-persisted DB diffs
tzemanovic Jan 19, 2024
89bb67d
rename new fns
tzemanovic Jan 22, 2024
29e87f9
Merge branch 'brent/new-storage-write' (#2355)
tzemanovic Jan 22, 2024
6ebbcb7
Merge branch 'murisi/masp-fixes-with-init' (#2409)
tzemanovic Jan 22, 2024
24f1bba
fixup! Merge branch 'murisi/masp-fixes-with-init' (#2409)
tzemanovic Jan 22, 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
0de20bc
fixup! Merge branch 'murisi/masp-fixes-with-init' (#2409)
tzemanovic Jan 22, 2024
f0ad853
Merge branch 'tomas/fix-fst-epoch-start' (#2380)
tzemanovic Jan 22, 2024
d6abc9f
Merge branch 'tomas/tx-host-env' (#2401)
tzemanovic Jan 22, 2024
7141d87
fixup! Merge branch 'tomas/tx-host-env' (#2401)
tzemanovic Jan 22, 2024
ff6a15d
Merge branch 'aleks/wallet-zip32-0.30.1' (#2417)
tzemanovic Jan 22, 2024
eba797c
Merge branch 'grarco/masp-unconverted-test' (#2406)
tzemanovic Jan 22, 2024
6f5f42a
add the fns to check tx and VP allowlist in parameters crate
tzemanovic Jan 18, 2024
a087b60
namada/protocol: check tx allowlist before running wasm code
tzemanovic Jan 18, 2024
56c5332
test/protocol: test tx wasm allowlist
tzemanovic Jan 18, 2024
1efc564
changelog: add #2419
tzemanovic Jan 18, 2024
e64736e
wasm: remove unused vp_testnet_faucet
tzemanovic Jan 19, 2024
944cb51
move VP code allowlist check from WASM to host env
tzemanovic Jan 19, 2024
9976c23
tests: add tests for VP allowlist
tzemanovic Jan 19, 2024
b741104
Merge branch 'tomas/protocol-tx-allowlist' (#2419)
tzemanovic Jan 22, 2024
b41a238
Merge branch 'fraccaman+tomas/governance-tally' (#2415)
tzemanovic Jan 22, 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
36d3267
Merge branch 'tomas/protocol-tx-allowlist' (#2419)
tzemanovic Jan 22, 2024
9358fb6
fixup! Merge branch 'grarco/masp-unconverted-test' (#2406)
tzemanovic Jan 22, 2024
05dbb28
Now generating arbitrary ShieldedTransfer.
murisi Jan 12, 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
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
c60ee01
Merge branch 'murisi/masp-test-vectors-rebased' (#2427)
tzemanovic Jan 23, 2024
e81948d
fixup! Merge branch 'murisi/masp-test-vectors-rebased' (#2427)
tzemanovic 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
ecf2089
fixup! Merge branch 'murisi/masp-test-vectors-rebased' (#2427)
tzemanovic Jan 24, 2024
e90ce08
Merge branch 'brent/change-shielded-rewards' (#2430)
Jan 24, 2024
6f19470
Merge branch 'origin/brent/parameters-change' (#2432)
Jan 24, 2024
037a46e
Merge branch 'grarco/fix-shielded-actions' (#2428)
grarco Jan 24, 2024
5d3799a
evil: #2428
grarco Jan 24, 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))
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/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))
2 changes: 2 additions & 0 deletions .changelog/unreleased/improvements/2355-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.
([\#2355](https://github.com/anoma/namada/pull/2355))
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/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))
1 change: 1 addition & 0 deletions .github/workflows/scripts/e2e.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"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::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 Down
21 changes: 14 additions & 7 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ base58 = "0.2.0"
base64 = "0.13.0"
bech32 = "0.8.0"
bimap = {version = "0.6.2", features = ["serde"]}
bitflags = "2.4.2"
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 +107,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
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,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
70 changes: 54 additions & 16 deletions crates/apps/src/lib/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2975,8 +2975,10 @@ 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 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 +6198,9 @@ 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);
Self {
scheme,
shielded,
Expand All @@ -6205,6 +6209,7 @@ pub mod args {
unsafe_dont_encrypt,
use_device,
derivation_path,
allow_non_compliant,
}
}

Expand Down Expand Up @@ -6234,14 +6239,29 @@ 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),
)
}
}

Expand All @@ -6253,7 +6273,9 @@ 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);
Self {
scheme,
shielded,
Expand All @@ -6262,6 +6284,7 @@ pub mod args {
alias_force,
unsafe_dont_encrypt,
derivation_path,
allow_non_compliant,
}
}

Expand All @@ -6280,7 +6303,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 +6317,29 @@ 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),
)
}
}

Expand Down
Loading
Loading