Skip to content

Commit

Permalink
Merge branch 'tomas/combine-user-validator-vp' (#2202)
Browse files Browse the repository at this point in the history
* tomas/combine-user-validator-vp:
  changelog: add #2202
  genesis/localnet: regen validator
  remove vp_validator and replace usage with vp_user
  wasm: add validator support to vp_user
  • Loading branch information
tzemanovic committed Nov 23, 2023
2 parents 50bb937 + 7de6427 commit beccd83
Show file tree
Hide file tree
Showing 21 changed files with 346 additions and 1,232 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Combined the user and the validator VP into one.
([\#2202](https://github.com/anoma/namada/pull/2202))
2 changes: 1 addition & 1 deletion apps/src/lib/bench_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub use namada_sdk::tx::{
TX_RESIGN_STEWARD, TX_REVEAL_PK as TX_REVEAL_PK_WASM, TX_TRANSFER_WASM,
TX_UNBOND_WASM, TX_UNJAIL_VALIDATOR_WASM, TX_UPDATE_ACCOUNT_WASM,
TX_UPDATE_STEWARD_COMMISSION, TX_VOTE_PROPOSAL as TX_VOTE_PROPOSAL_WASM,
TX_WITHDRAW_WASM, VP_USER_WASM, VP_VALIDATOR_WASM,
TX_WITHDRAW_WASM, VP_USER_WASM,
};
use namada_sdk::wallet::Wallet;
use namada_sdk::NamadaImpl;
Expand Down
2 changes: 1 addition & 1 deletion apps/src/lib/config/genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ pub fn make_dev_genesis(
address,
tx: transactions::ValidatorAccountTx {
alias: alias.clone(),
vp: "vp_validator".to_string(),
vp: "vp_user".to_string(),
commission_rate: Dec::new(5, 2).expect("This can't fail"),
max_commission_rate_change: Dec::new(1, 2)
.expect("This can't fail"),
Expand Down
2 changes: 1 addition & 1 deletion apps/src/lib/config/genesis/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ pub fn init_validator(
validator_wallet.eth_cold_key.ref_to(),
),
// No custom validator VPs yet
vp: "vp_validator".to_string(),
vp: "vp_user".to_string(),
commission_rate,
max_commission_rate_change,
email,
Expand Down
4 changes: 2 additions & 2 deletions benches/host_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use namada::proto::Signature;
use namada::vm::wasm::TxCache;
use namada_apps::bench_utils::{
BenchShell, TX_INIT_PROPOSAL_WASM, TX_REVEAL_PK_WASM, TX_TRANSFER_WASM,
TX_UPDATE_ACCOUNT_WASM, VP_VALIDATOR_WASM, WASM_DIR,
TX_UPDATE_ACCOUNT_WASM, VP_USER_WASM, WASM_DIR,
};
use namada_apps::wallet::defaults;
use namada_apps::wasm_loader;
Expand Down Expand Up @@ -68,7 +68,7 @@ fn compile_wasm(c: &mut Criterion) {
TX_INIT_PROPOSAL_WASM,
TX_REVEAL_PK_WASM,
TX_UPDATE_ACCOUNT_WASM,
VP_VALIDATOR_WASM,
VP_USER_WASM,
] {
let wasm_code = wasm_loader::read_wasm_or_exit(WASM_DIR, tx);
txs.insert(tx, wasm_code);
Expand Down
14 changes: 7 additions & 7 deletions benches/txs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ use namada_apps::bench_utils::{
TX_REACTIVATE_VALIDATOR_WASM, TX_REDELEGATE_WASM, TX_RESIGN_STEWARD,
TX_REVEAL_PK_WASM, TX_UNBOND_WASM, TX_UNJAIL_VALIDATOR_WASM,
TX_UPDATE_ACCOUNT_WASM, TX_UPDATE_STEWARD_COMMISSION,
TX_VOTE_PROPOSAL_WASM, TX_WITHDRAW_WASM, VP_VALIDATOR_WASM,
TX_VOTE_PROPOSAL_WASM, TX_WITHDRAW_WASM, VP_USER_WASM,
};
use namada_apps::wallet::defaults;
use sha2::Digest;
Expand Down Expand Up @@ -369,11 +369,11 @@ fn reveal_pk(c: &mut Criterion) {
fn update_account(c: &mut Criterion) {
let shell = BenchShell::default();
let vp_code_hash: Hash = shell
.read_storage_key(&Key::wasm_hash(VP_VALIDATOR_WASM))
.read_storage_key(&Key::wasm_hash(VP_USER_WASM))
.unwrap();
let extra_section = Section::ExtraData(Code::from_hash(
vp_code_hash,
Some(VP_VALIDATOR_WASM.to_string()),
Some(VP_USER_WASM.to_string()),
));
let data = UpdateAccount {
addr: defaults::albert_address(),
Expand Down Expand Up @@ -412,11 +412,11 @@ fn init_account(c: &mut Criterion) {

let shell = BenchShell::default();
let vp_code_hash: Hash = shell
.read_storage_key(&Key::wasm_hash(VP_VALIDATOR_WASM))
.read_storage_key(&Key::wasm_hash(VP_USER_WASM))
.unwrap();
let extra_section = Section::ExtraData(Code::from_hash(
vp_code_hash,
Some(VP_VALIDATOR_WASM.to_string()),
Some(VP_USER_WASM.to_string()),
));
let extra_hash = Hash(
extra_section
Expand Down Expand Up @@ -613,11 +613,11 @@ fn init_validator(c: &mut Criterion) {

let shell = BenchShell::default();
let validator_vp_code_hash: Hash = shell
.read_storage_key(&Key::wasm_hash(VP_VALIDATOR_WASM))
.read_storage_key(&Key::wasm_hash(VP_USER_WASM))
.unwrap();
let extra_section = Section::ExtraData(Code::from_hash(
validator_vp_code_hash,
Some(VP_VALIDATOR_WASM.to_string()),
Some(VP_USER_WASM.to_string()),
));
let extra_hash = Hash(
extra_section
Expand Down
10 changes: 5 additions & 5 deletions benches/vps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use namada_apps::bench_utils::{
generate_foreign_key_tx, BenchShell, TX_BOND_WASM,
TX_CHANGE_VALIDATOR_COMMISSION_WASM, TX_REVEAL_PK_WASM, TX_TRANSFER_WASM,
TX_UNBOND_WASM, TX_UPDATE_ACCOUNT_WASM, TX_VOTE_PROPOSAL_WASM,
VP_USER_WASM, VP_VALIDATOR_WASM,
VP_USER_WASM,
};
use namada_apps::wallet::defaults;
use sha2::Digest;
Expand Down Expand Up @@ -70,11 +70,11 @@ fn vp_user(c: &mut Criterion) {
);

let vp_validator_hash = shell
.read_storage_key(&Key::wasm_hash(VP_VALIDATOR_WASM))
.read_storage_key(&Key::wasm_hash(VP_USER_WASM))
.unwrap();
let extra_section = Section::ExtraData(Code::from_hash(
vp_validator_hash,
Some(VP_VALIDATOR_WASM.to_string()),
Some(VP_USER_WASM.to_string()),
));
let data = UpdateAccount {
addr: defaults::albert_address(),
Expand Down Expand Up @@ -322,7 +322,7 @@ fn vp_implicit(c: &mut Criterion) {
fn vp_validator(c: &mut Criterion) {
let shell = BenchShell::default();
let vp_code_hash: Hash = shell
.read_storage_key(&Key::wasm_hash(VP_VALIDATOR_WASM))
.read_storage_key(&Key::wasm_hash(VP_USER_WASM))
.unwrap();
let mut group = c.benchmark_group("vp_validator");

Expand Down Expand Up @@ -361,7 +361,7 @@ fn vp_validator(c: &mut Criterion) {

let extra_section = Section::ExtraData(Code::from_hash(
vp_code_hash,
Some(VP_VALIDATOR_WASM.to_string()),
Some(VP_USER_WASM.to_string()),
));
let data = UpdateAccount {
addr: defaults::validator_address(),
Expand Down
2 changes: 1 addition & 1 deletion genesis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ An unsigned `validator_account` tx example:
```toml
[[validator_account]]
alias = "validator-0"
vp = "vp_validator"
vp = "vp_user"
commission_rate = "0.05"
max_commission_rate_change = "0.01"
net_address = "127.0.0.1:27656"
Expand Down
28 changes: 14 additions & 14 deletions genesis/localnet/src/pre-genesis/validator-0/transactions.toml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
[[validator_account]]
alias = "validator-0"
vp = "vp_validator"
vp = "vp_user"
commission_rate = "0.05"
max_commission_rate_change = "0.01"
email = "[email protected]"
net_address = "127.0.0.1:27656"

[validator_account.account_key]
pk = "tpknam1qzuaykg8nrmzuaefut39aaxl0gl66y62285cnwe37gq0a96qaf4qgp5yqtw"
authorization = "signam1qpcvzjdqkvhud9lez3exq3vy7dnp4kyjgsk92yx5cslwzjs0q9czx8ajxztx5pftx9hsf9w2shh6rt0uv6xeyu30ljqkrqj6hnrwn5gqfd9pwf"
pk = "tpknam1qpg2tsrplvhu3fd7z7tq5ztc2ne3s7e2ahjl2a2cddufrzdyr752g666ytj"
authorization = "signam1qzyc89wynvm4n7eq7jglv4d8upaxu38mkkktykjjtgqygmk4sq97ffxermz5wpur4rqr8gk6fze5uvc4u7q4qzqsr285gungdyhv2acgna2ltq"

[validator_account.consensus_key]
pk = "tpknam1qpudpptwfh9u5mhvksrguyqk6wvyhus0kf2cs9qr0xuq9k4fepldgqv3ztq"
authorization = "signam1qpuhmvgl330cr3acugaddhn6q9xdw3577h3mv9yszau2smxmn7yvmn2yplfym4sk30r2hz943989sd68umu70e4wsk5q6j2gzzjfg4q0qjvz6f"
pk = "tpknam1qr9u5py97pdmcvnrxhzuuv79ydv5rw7r9z402sucwt6h0lvmmmwqy2wrweg"
authorization = "signam1qzt7ww0q00punp93jrvtkq62n4rk8y5d90tllmlkzr0z7urwfdkn7z8ttne92utwskl6ves4qp66r60tg2xqr568ranwfhcm0665wncqq4t5gx"

[validator_account.protocol_key]
pk = "tpknam1qzxs6kchkustgjxld3xz0u3c8gfnkvda042vp06auk6zfrru5hhxqqvyxq6"
authorization = "signam1qztaxmfgncmv5jn9tak0au2ryzxwxrlhn2qyfx4fgewuv5p7jelpfpqe9mlp7y73vsw7r8hu509swj8mumgryswu38m7mvxn9asqn0cq7aqvjp"
pk = "tpknam1qrenhfdphzpszlr7fzand6qgmppge430g3a2lquqzhz64fkve5mq2hdfjaa"
authorization = "signam1qqeaqzj9fu0xsu7pvrkwla5asxde2wak7fslst0p79vxxydt40tzdj54js7dmjvqs2quygqqwup8z2cfffvm86ff8cud6gzel9g40ycw25wp5d"

[validator_account.tendermint_node_key]
pk = "tpknam1qzckzn2rc4pr26e0clxajgcllasr6tke4yqrsu7wskw89uka29zykram505"
authorization = "signam1qrgvyj39ljlequl20hx2mz9wpuyjl8lj826c0upy9agt4txuyyusuqkhdmm2aajglupssqcsx8nv62etua6vn0duzrucut4m74nmhscwy3knc3"
pk = "tpknam1qpgcgptcjl22hl2te2uqnp33aqjmvfaud3a3f3sgtxezg7uu5rsv6d2flr3"
authorization = "signam1qrq7x5e7svuddy8dyr3xpcdt6a07u6sky0n5qnv5z757g33t5zm3jnnh9uhh073g05n8jx8rmdu5r2djhwh6few6u329u9cld4c7ynsw2592h8"

[validator_account.eth_hot_key]
pk = "tpknam1qyp8znkp023autwqh2cy6c6vhnz8vsm4p6w9ngpnnamqk6dj5w6ktxqjnd0qj"
authorization = "signam1q9fd4nkz8df5ajh6jrsn6mrt0apvn4266walr8pnczl0xtn847u6usdemslvusseerhrd6hftse8zfch5tlpmqp4y9xz3563mu0d26hnqq942mt2"
pk = "tpknam1qypnh98mexms8edj8rcwu0cayx0459p39dwzsffxrr394mf4cse707qcctyrx"
authorization = "signam1qyrvwveg76nrz2ppnsl0em82gcl4p90cqw8eadyzcvk59e2dx0jqja8ln9l9j79sxzhhh5gdggduz78vtthzj5nzs0xvpwhjuh3hymapqq07qxzm"

[validator_account.eth_cold_key]
pk = "tpknam1qyp4aw7a07f4ltuq3f0c4sgyq3kzgh6z40w8jt40wl7uhfj7e3m3u9qr792xg"
authorization = "signam1qyqcc7wstsnuadu75jnwg8hxz34nglxj9h9yqyx2c4qqdpxw50ff60hu0swfj7xdkz34tgl9e50jlmzphkgtpw3gg0hsgp35lhsl6rmeqqq28kph"
pk = "tpknam1qypz8zr0w8lsz3s98vh4p974xuxeedpecj9s2l3326r3kdz4tc0snrcpnc8yv"
authorization = "signam1q992kq4ymfl6v8arc2s2tn0w7c4f48wx6fxry9qxv2qk8zvjan8q7j9rxg73cx0f5l56fy53x2jgwv7vy8jtxzucckdzgnxc5tpzajs4qq8r02r2"

[[transfer]]
token = "nam"
Expand All @@ -41,4 +41,4 @@ signature = "signam1qz8ch7n6jp7g7hvnzkhmprhqc5umd0gatarlttm7gpcdx6g8hmgqffdq67fn
source = "validator-0"
validator = "validator-0"
amount = "100000"
signature = "signam1qrd7wg2sdla73z7626r2ep8895d9ed4ljq37nz6kmy2rcm36yqjugw6vle7kl70l0d585t382s9vd28k2duwz0lu7ux0vua6aaarjssgdf46n2"
signature = "signam1qqukrz3js2pgzrne90u5f7y4mstrzvmzcq7eelml9m3lzrh9zwpf0vhgjq0rsw4ufj4ffdx8ew74uxkk4df649pg6qq5fgwyqa9mpfcyvskk67"
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
account_key = "unencrypted:00eaa8829ff8932ffad86c4b0ad1ed2f2870c12ca49f03b50e4b34d360daa24268"
consensus_key = "unencrypted:00aabd79879fce99cb528f92d8ea4593241dd49507ff456be52ca2aee98c728338"
eth_cold_key = "unencrypted:0181901af21f92e997c78c61337475d1975c8d29591601e36ace3952d7094d9447"
tendermint_node_key = "unencrypted:00afc7747d1e6d76293553864bbf482d061f1932f83b978b24ba4957dcfcda987c"
account_key = "unencrypted:0024204e13c51b26ed9b42c05647bc46b3821bb453e53d194962ede57ce5ec66ac"
consensus_key = "unencrypted:0037a44681b64d42497e2229516479f83e5344a7a30e8316bde45881a1ec745359"
eth_cold_key = "unencrypted:010d34fcb42383f0babe7c86203f07bf4134f0756a630eb07923f21c90cc068602"
tendermint_node_key = "unencrypted:002f2e94bb5834e18433343345baf47b2b5d4e1ef4d46ba0f876d3d2c89d831419"

[validator_keys]
protocol_keypair = "ED25519_SK_PREFIX00b0da066a528a0e1221e6453f9d10143b07a675a250c66603e8a7e98bdbb8cf19"
eth_bridge_keypair = "SECP256K1_SK_PREFIX0133deb418af6af5c62aecbde3dc3a0ff62ea20c0c8e33cf703d0f5e35248e5ab1"
protocol_keypair = "ED25519_SK_PREFIX00610677d4c52ab8ca5e8abe7dfb40246a271a03069fded6099763cbc41e04df02"
eth_bridge_keypair = "SECP256K1_SK_PREFIX01a81af251a711382d6b649a44b36ac5d4f41106f356e1f2fb33c001e91ffaa169"
29 changes: 15 additions & 14 deletions genesis/localnet/transactions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,35 @@

[[validator_account]]
alias = "validator-0"
vp = "vp_validator"
vp = "vp_user"
commission_rate = "0.05"
max_commission_rate_change = "0.01"
email = "[email protected]"
net_address = "127.0.0.1:27656"

[validator_account.account_key]
pk = "tpknam1qzuaykg8nrmzuaefut39aaxl0gl66y62285cnwe37gq0a96qaf4qgp5yqtw"
authorization = "signam1qpcvzjdqkvhud9lez3exq3vy7dnp4kyjgsk92yx5cslwzjs0q9czx8ajxztx5pftx9hsf9w2shh6rt0uv6xeyu30ljqkrqj6hnrwn5gqfd9pwf"
pk = "tpknam1qpg2tsrplvhu3fd7z7tq5ztc2ne3s7e2ahjl2a2cddufrzdyr752g666ytj"
authorization = "signam1qzyc89wynvm4n7eq7jglv4d8upaxu38mkkktykjjtgqygmk4sq97ffxermz5wpur4rqr8gk6fze5uvc4u7q4qzqsr285gungdyhv2acgna2ltq"

[validator_account.consensus_key]
pk = "tpknam1qpudpptwfh9u5mhvksrguyqk6wvyhus0kf2cs9qr0xuq9k4fepldgqv3ztq"
authorization = "signam1qpuhmvgl330cr3acugaddhn6q9xdw3577h3mv9yszau2smxmn7yvmn2yplfym4sk30r2hz943989sd68umu70e4wsk5q6j2gzzjfg4q0qjvz6f"
pk = "tpknam1qr9u5py97pdmcvnrxhzuuv79ydv5rw7r9z402sucwt6h0lvmmmwqy2wrweg"
authorization = "signam1qzt7ww0q00punp93jrvtkq62n4rk8y5d90tllmlkzr0z7urwfdkn7z8ttne92utwskl6ves4qp66r60tg2xqr568ranwfhcm0665wncqq4t5gx"

[validator_account.protocol_key]
pk = "tpknam1qzxs6kchkustgjxld3xz0u3c8gfnkvda042vp06auk6zfrru5hhxqqvyxq6"
authorization = "signam1qztaxmfgncmv5jn9tak0au2ryzxwxrlhn2qyfx4fgewuv5p7jelpfpqe9mlp7y73vsw7r8hu509swj8mumgryswu38m7mvxn9asqn0cq7aqvjp"
pk = "tpknam1qrenhfdphzpszlr7fzand6qgmppge430g3a2lquqzhz64fkve5mq2hdfjaa"
authorization = "signam1qqeaqzj9fu0xsu7pvrkwla5asxde2wak7fslst0p79vxxydt40tzdj54js7dmjvqs2quygqqwup8z2cfffvm86ff8cud6gzel9g40ycw25wp5d"

[validator_account.tendermint_node_key]
pk = "tpknam1qzckzn2rc4pr26e0clxajgcllasr6tke4yqrsu7wskw89uka29zykram505"
authorization = "signam1qrgvyj39ljlequl20hx2mz9wpuyjl8lj826c0upy9agt4txuyyusuqkhdmm2aajglupssqcsx8nv62etua6vn0duzrucut4m74nmhscwy3knc3"
pk = "tpknam1qpgcgptcjl22hl2te2uqnp33aqjmvfaud3a3f3sgtxezg7uu5rsv6d2flr3"
authorization = "signam1qrq7x5e7svuddy8dyr3xpcdt6a07u6sky0n5qnv5z757g33t5zm3jnnh9uhh073g05n8jx8rmdu5r2djhwh6few6u329u9cld4c7ynsw2592h8"

[validator_account.eth_hot_key]
pk = "tpknam1qyp8znkp023autwqh2cy6c6vhnz8vsm4p6w9ngpnnamqk6dj5w6ktxqjnd0qj"
authorization = "signam1q9fd4nkz8df5ajh6jrsn6mrt0apvn4266walr8pnczl0xtn847u6usdemslvusseerhrd6hftse8zfch5tlpmqp4y9xz3563mu0d26hnqq942mt2"
pk = "tpknam1qypnh98mexms8edj8rcwu0cayx0459p39dwzsffxrr394mf4cse707qcctyrx"
authorization = "signam1qyrvwveg76nrz2ppnsl0em82gcl4p90cqw8eadyzcvk59e2dx0jqja8ln9l9j79sxzhhh5gdggduz78vtthzj5nzs0xvpwhjuh3hymapqq07qxzm"

[validator_account.eth_cold_key]
pk = "tpknam1qyp4aw7a07f4ltuq3f0c4sgyq3kzgh6z40w8jt40wl7uhfj7e3m3u9qr792xg"
authorization = "signam1qyqcc7wstsnuadu75jnwg8hxz34nglxj9h9yqyx2c4qqdpxw50ff60hu0swfj7xdkz34tgl9e50jlmzphkgtpw3gg0hsgp35lhsl6rmeqqq28kph"
pk = "tpknam1qypz8zr0w8lsz3s98vh4p974xuxeedpecj9s2l3326r3kdz4tc0snrcpnc8yv"
authorization = "signam1q992kq4ymfl6v8arc2s2tn0w7c4f48wx6fxry9qxv2qk8zvjan8q7j9rxg73cx0f5l56fy53x2jgwv7vy8jtxzucckdzgnxc5tpzajs4qq8r02r2"

[[transfer]]
token = "nam"
Expand All @@ -48,7 +48,8 @@ signature = "signam1qz8ch7n6jp7g7hvnzkhmprhqc5umd0gatarlttm7gpcdx6g8hmgqffdq67fn
source = "validator-0"
validator = "validator-0"
amount = "100000"
signature = "signam1qrd7wg2sdla73z7626r2ep8895d9ed4ljq37nz6kmy2rcm36yqjugw6vle7kl70l0d585t382s9vd28k2duwz0lu7ux0vua6aaarjssgdf46n2"
signature = "signam1qqukrz3js2pgzrne90u5f7y4mstrzvmzcq7eelml9m3lzrh9zwpf0vhgjq0rsw4ufj4ffdx8ew74uxkk4df649pg6qq5fgwyqa9mpfcyvskk67"


# 2.

Expand Down
4 changes: 0 additions & 4 deletions genesis/localnet/validity-predicates.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,3 @@ filename = "vp_implicit.wasm"
[wasm.vp_user]
filename = "vp_user.wasm"

# Default validator VP
[wasm.vp_validator]
filename = "vp_validator.wasm"

4 changes: 0 additions & 4 deletions genesis/starter/validity-predicates.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ filename = "vp_implicit.wasm"
[wasm.vp_user]
filename = "vp_user.wasm"

# Default validator VP
[wasm.vp_validator]
filename = "vp_validator.wasm"

# Token VP
[wasm.vp_token]
filename = "vp_token.wasm"
Expand Down
11 changes: 5 additions & 6 deletions sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ extern crate alloc;
pub use namada_core::{ibc, ibc_proto, proto, tendermint, tendermint_proto};
#[cfg(feature = "tendermint-rpc")]
pub use tendermint_rpc;
use tx::{TX_INIT_ACCOUNT_WASM, VP_VALIDATOR_WASM};
pub use {
bip39, borsh, masp_primitives, masp_proofs, namada_core as core,
namada_proof_of_stake as proof_of_stake, zeroize,
Expand Down Expand Up @@ -55,10 +54,10 @@ use crate::tx::{
ProcessTxResponse, TX_BOND_WASM, TX_BRIDGE_POOL_WASM,
TX_CHANGE_COMMISSION_WASM, TX_CHANGE_CONSENSUS_KEY_WASM,
TX_CHANGE_METADATA_WASM, TX_CLAIM_REWARDS_WASM,
TX_DEACTIVATE_VALIDATOR_WASM, TX_IBC_WASM, TX_INIT_PROPOSAL,
TX_INIT_VALIDATOR_WASM, TX_REACTIVATE_VALIDATOR_WASM, TX_REDELEGATE_WASM,
TX_RESIGN_STEWARD, TX_REVEAL_PK, TX_TRANSFER_WASM, TX_UNBOND_WASM,
TX_UNJAIL_VALIDATOR_WASM, TX_UPDATE_ACCOUNT_WASM,
TX_DEACTIVATE_VALIDATOR_WASM, TX_IBC_WASM, TX_INIT_ACCOUNT_WASM,
TX_INIT_PROPOSAL, TX_INIT_VALIDATOR_WASM, TX_REACTIVATE_VALIDATOR_WASM,
TX_REDELEGATE_WASM, TX_RESIGN_STEWARD, TX_REVEAL_PK, TX_TRANSFER_WASM,
TX_UNBOND_WASM, TX_UNJAIL_VALIDATOR_WASM, TX_UPDATE_ACCOUNT_WASM,
TX_UPDATE_STEWARD_COMMISSION, TX_VOTE_PROPOSAL, TX_WITHDRAW_WASM,
VP_USER_WASM,
};
Expand Down Expand Up @@ -366,7 +365,7 @@ pub trait Namada<'a>: Sized {
eth_cold_key: None,
eth_hot_key: None,
protocol_key: None,
validator_vp_code_path: PathBuf::from(VP_VALIDATOR_WASM),
validator_vp_code_path: PathBuf::from(VP_USER_WASM),
unsafe_dont_encrypt: false,
tx_code_path: PathBuf::from(TX_INIT_VALIDATOR_WASM),
tx: self.tx_builder(),
Expand Down
7 changes: 0 additions & 7 deletions sdk/src/signing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ use crate::tx::{
TX_INIT_PROPOSAL, TX_INIT_VALIDATOR_WASM, TX_REACTIVATE_VALIDATOR_WASM,
TX_REVEAL_PK, TX_TRANSFER_WASM, TX_UNBOND_WASM, TX_UNJAIL_VALIDATOR_WASM,
TX_UPDATE_ACCOUNT_WASM, TX_VOTE_PROPOSAL, TX_WITHDRAW_WASM, VP_USER_WASM,
VP_VALIDATOR_WASM,
};
pub use crate::wallet::store::AddressVpType;
use crate::wallet::{Wallet, WalletIo};
Expand Down Expand Up @@ -1067,8 +1066,6 @@ pub async fn to_ledger_vector<'a>(
})?;
let vp_code = if extra.tag == Some(VP_USER_WASM.to_string()) {
"User".to_string()
} else if extra.tag == Some(VP_VALIDATOR_WASM.to_string()) {
"Validator".to_string()
} else {
HEXLOWER.encode(&extra.code.hash().0)
};
Expand Down Expand Up @@ -1113,8 +1110,6 @@ pub async fn to_ledger_vector<'a>(
})?;
let vp_code = if extra.tag == Some(VP_USER_WASM.to_string()) {
"User".to_string()
} else if extra.tag == Some(VP_VALIDATOR_WASM.to_string()) {
"Validator".to_string()
} else {
HEXLOWER.encode(&extra.code.hash().0)
};
Expand Down Expand Up @@ -1314,8 +1309,6 @@ pub async fn to_ledger_vector<'a>(
})?;
let vp_code = if extra.tag == Some(VP_USER_WASM.to_string()) {
"User".to_string()
} else if extra.tag == Some(VP_VALIDATOR_WASM.to_string()) {
"Validator".to_string()
} else {
HEXLOWER.encode(&extra.code.hash().0)
};
Expand Down
2 changes: 0 additions & 2 deletions sdk/src/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ pub const TX_TRANSFER_WASM: &str = "tx_transfer.wasm";
pub const TX_IBC_WASM: &str = "tx_ibc.wasm";
/// User validity predicate WASM path
pub const VP_USER_WASM: &str = "vp_user.wasm";
/// Validator validity predicate WASM path
pub const VP_VALIDATOR_WASM: &str = "vp_validator.wasm";
/// Bond WASM path
pub const TX_BOND_WASM: &str = "tx_bond.wasm";
/// Unbond WASM path
Expand Down
1 change: 0 additions & 1 deletion wasm/wasm_source/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ tx_resign_steward = ["namada_tx_prelude"]
vp_implicit = ["namada_vp_prelude", "once_cell"]
vp_token = ["namada_vp_prelude"]
vp_user = ["namada_vp_prelude", "once_cell"]
vp_validator = ["namada_vp_prelude", "once_cell"]

[dependencies]
namada_tx_prelude = {path = "../../tx_prelude", optional = true}
Expand Down
1 change: 0 additions & 1 deletion wasm/wasm_source/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ wasms += tx_update_steward_commission
wasms += tx_resign_steward
wasms += vp_implicit
wasms += vp_user
wasms += vp_validator

# Build all wasms in release mode
all: $(wasms)
Expand Down
2 changes: 0 additions & 2 deletions wasm/wasm_source/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,3 @@ pub mod tx_withdraw;
pub mod vp_implicit;
#[cfg(feature = "vp_user")]
pub mod vp_user;
#[cfg(feature = "vp_validator")]
pub mod vp_validator;
Loading

0 comments on commit beccd83

Please sign in to comment.