Skip to content

Commit

Permalink
Now produce test-vectors of signed transactions as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
murisi committed Nov 16, 2023
1 parent 5b24e82 commit ece850b
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 25 deletions.
44 changes: 44 additions & 0 deletions apps/src/lib/client/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ pub async fn submit_reveal_aux<'a>(

sign(context, &mut tx, &args, signing_data).await?;

signing::generate_test_vector(context, &tx).await?;

context.submit(tx, &args).await?;
}
}
Expand All @@ -250,6 +252,8 @@ pub async fn submit_bridge_pool_tx<'a, N: Namada<'a>>(

sign(namada, &mut tx, &tx_args, signing_data).await?;

signing::generate_test_vector(namada, &tx).await?;

namada.submit(tx, &tx_args).await?;
}

Expand All @@ -274,6 +278,8 @@ where
} else {
sign(namada, &mut tx, &args.tx, signing_data).await?;

signing::generate_test_vector(namada, &tx).await?;

namada.submit(tx, &args.tx).await?;
}

Expand All @@ -296,6 +302,8 @@ where
} else {
sign(namada, &mut tx, &args.tx, signing_data).await?;

signing::generate_test_vector(namada, &tx).await?;

namada.submit(tx, &args.tx).await?;
}

Expand All @@ -319,6 +327,8 @@ where
} else {
sign(namada, &mut tx, &args.tx, signing_data).await?;

signing::generate_test_vector(namada, &tx).await?;

namada.submit(tx, &args.tx).await?;
}

Expand Down Expand Up @@ -572,6 +582,8 @@ pub async fn submit_init_validator<'a>(
} else {
sign(namada, &mut tx, &tx_args, signing_data).await?;

signing::generate_test_vector(namada, &tx).await?;

let result = namada.submit(tx, &tx_args).await?.initialized_accounts();

if !tx_args.dry_run {
Expand Down Expand Up @@ -693,6 +705,8 @@ pub async fn submit_transfer<'a>(
} else {
sign(namada, &mut tx, &args.tx, signing_data).await?;

signing::generate_test_vector(namada, &tx).await?;

let result = namada.submit(tx, &args.tx).await?;

let submission_epoch = rpc::query_and_print_epoch(namada).await;
Expand Down Expand Up @@ -739,6 +753,8 @@ where
} else {
sign(namada, &mut tx, &args.tx, signing_data).await?;

signing::generate_test_vector(namada, &tx).await?;

namada.submit(tx, &args.tx).await?;
}

Expand Down Expand Up @@ -866,6 +882,8 @@ where
} else {
sign(namada, &mut tx_builder, &args.tx, signing_data).await?;

signing::generate_test_vector(namada, &tx_builder).await?;

namada.submit(tx_builder, &args.tx).await?;
}

Expand Down Expand Up @@ -944,6 +962,8 @@ where
} else {
sign(namada, &mut tx_builder, &args.tx, signing_data).await?;

signing::generate_test_vector(namada, &tx_builder).await?;

namada.submit(tx_builder, &args.tx).await?;
}

Expand Down Expand Up @@ -1062,6 +1082,8 @@ where
} else {
sign(namada, &mut tx, &args.tx, signing_data).await?;

signing::generate_test_vector(namada, &tx).await?;

namada.submit(tx, &args.tx).await?;
}

Expand All @@ -1084,6 +1106,8 @@ where
} else {
sign(namada, &mut tx, &args.tx, signing_data).await?;

signing::generate_test_vector(namada, &tx).await?;

namada.submit(tx, &args.tx).await?;

tx::query_unbonds(namada, args.clone(), latest_withdrawal_pre).await?;
Expand All @@ -1108,6 +1132,8 @@ where
} else {
sign(namada, &mut tx, &args.tx, signing_data).await?;

signing::generate_test_vector(namada, &tx).await?;

namada.submit(tx, &args.tx).await?;
}

Expand All @@ -1130,6 +1156,8 @@ where
} else {
sign(namada, &mut tx, &args.tx, signing_data).await?;

signing::generate_test_vector(namada, &tx).await?;

namada.submit(tx, &args.tx).await?;
}

Expand All @@ -1151,6 +1179,8 @@ where
} else {
sign(namada, &mut tx, &args.tx, signing_data).await?;

signing::generate_test_vector(namada, &tx).await?;

namada.submit(tx, &args.tx).await?;
}

Expand All @@ -1173,6 +1203,8 @@ where
} else {
sign(namada, &mut tx, &args.tx, signing_data).await?;

signing::generate_test_vector(namada, &tx).await?;

namada.submit(tx, &args.tx).await?;
}

Expand All @@ -1195,6 +1227,8 @@ where
} else {
sign(namada, &mut tx, &args.tx, signing_data).await?;

signing::generate_test_vector(namada, &tx).await?;

namada.submit(tx, &args.tx).await?;
}

Expand All @@ -1217,6 +1251,8 @@ where
} else {
sign(namada, &mut tx, &args.tx, signing_data).await?;

signing::generate_test_vector(namada, &tx).await?;

namada.submit(tx, &args.tx).await?;
}

Expand All @@ -1239,6 +1275,8 @@ where
} else {
sign(namada, &mut tx, &args.tx, signing_data).await?;

signing::generate_test_vector(namada, &tx).await?;

namada.submit(tx, &args.tx).await?;
}

Expand All @@ -1261,6 +1299,8 @@ where
} else {
sign(namada, &mut tx, &args.tx, signing_data).await?;

signing::generate_test_vector(namada, &tx).await?;

namada.submit(tx, &args.tx).await?;
}

Expand All @@ -1284,6 +1324,8 @@ where
} else {
sign(namada, &mut tx, &args.tx, signing_data).await?;

signing::generate_test_vector(namada, &tx).await?;

namada.submit(tx, &args.tx).await?;
}

Expand All @@ -1306,6 +1348,8 @@ where
} else {
sign(namada, &mut tx, &args.tx, signing_data).await?;

signing::generate_test_vector(namada, &tx).await?;

namada.submit(tx, &args.tx).await?;
}

Expand Down
50 changes: 25 additions & 25 deletions wasm/checksums.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"tx_bond.wasm": "tx_bond.c764778bda95a9b6ad61a4087c285da4729e82cfdcb83fbbe519cb0ea4f57487.wasm",
"tx_bridge_pool.wasm": "tx_bridge_pool.3fef7b0ad87d848fedc2a726eb6a9bc5d31a7060ef7414687ffb2d17f39c0a80.wasm",
"tx_change_validator_commission.wasm": "tx_change_validator_commission.e4efe82856947cd1cc51bbf6170d5747ec80a5200dec5e6f07f59ca1521fe86f.wasm",
"tx_change_validator_metadata.wasm": "tx_change_validator_metadata.001738a710660fa3b389f5bb72624a087701976c3835e95ce42f33f5fe4c58ff.wasm",
"tx_claim_rewards.wasm": "tx_claim_rewards.4ffc421dd4550c296a4d088dff1e95deab233616da69cbaa38546a6826b14693.wasm",
"tx_deactivate_validator.wasm": "tx_deactivate_validator.72aed9a2b92a28ea2d2a1a3c4f4baecdbb6db6b1c293566cd13d0791bcee258a.wasm",
"tx_ibc.wasm": "tx_ibc.f5201ad3af6ec12bfe139d8add11728ab6dc04b4fd35f8f8cba8742e3213df8d.wasm",
"tx_init_account.wasm": "tx_init_account.5444c7eb05ae0959e55f260f134758a6b99838668b932380daed794af6476c07.wasm",
"tx_init_proposal.wasm": "tx_init_proposal.95c94fb51e3fa742ffdeec67f6f37b9cffd4f16ca0e6754a6f891292aa6593ad.wasm",
"tx_init_validator.wasm": "tx_init_validator.7d9a1b1df2309c45a9679d221eb2eea45f1295f54a50481486ae34119c0b9873.wasm",
"tx_reactivate_validator.wasm": "tx_reactivate_validator.323035b39673fdb03d2d7e6dec5cd43a8518c4c1a0ab0b35d22a933d1c3d2fd5.wasm",
"tx_redelegate.wasm": "tx_redelegate.a71bac0a80ac99e3ead9ece9c2bd6a452c90582cf84ae58791dc7ec81e118810.wasm",
"tx_resign_steward.wasm": "tx_resign_steward.ebec8e181b7027a41b2a75bc814ca051af582dc3ce62c181ed0b4ae5e91fbcfb.wasm",
"tx_reveal_pk.wasm": "tx_reveal_pk.c2e86f15843e87cf1ed58d92afd419f112284c38972052b98e18a9e04fa72eff.wasm",
"tx_transfer.wasm": "tx_transfer.f11c5044ebe5765d7ea0244d62c156c37f4fc0e3828a57911d9051313f9cb17a.wasm",
"tx_unbond.wasm": "tx_unbond.c76734ccdc43c2b84b919ac360424d69ddae837155a4dfda6339623d0f829deb.wasm",
"tx_unjail_validator.wasm": "tx_unjail_validator.20fe000d59c62f73a76ce6d20295b17591a9b1aa42b4bd10e31171d3e37891c0.wasm",
"tx_update_account.wasm": "tx_update_account.aa85f5fa3f5e6ebb730a6d07a833711b1941590114fd9fe4271803a90231e4ec.wasm",
"tx_update_steward_commission.wasm": "tx_update_steward_commission.804e167b397dcce9e7c31f26489915410f5e0e2e537510784bb15133338ae506.wasm",
"tx_vote_proposal.wasm": "tx_vote_proposal.6b0c70377504d37feb8e829db2333804e0198e6bd09d6e980d329a9ec87575cd.wasm",
"tx_withdraw.wasm": "tx_withdraw.cf1125de7b05258ebaf04adf4e7565b6eed43e7e82be18000ae415d08d02ef21.wasm",
"vp_implicit.wasm": "vp_implicit.e0efdec20562330de942a28a3a57bf13d656f92de07a04a3409075987d90efb8.wasm",
"vp_masp.wasm": "vp_masp.1f665ea39c94652c85a596dee7376bfd935b1b6e6d643beb1b456a34c27b916d.wasm",
"vp_user.wasm": "vp_user.7e99ceb244b9ffb7e4c5e0a1acba1923d5e5a38f40378e2c4212c23fab0f8ae9.wasm",
"vp_validator.wasm": "vp_validator.af2364fb0a7d54ef62ae096e2b6b045a7d96746db777786c01ee2175435f6805.wasm"
"tx_bond.wasm": "tx_bond.7c7a739c83e943d4a56a0fd4e4c52a9edc0d66d9105324bcc909619857a6683b.wasm",
"tx_bridge_pool.wasm": "tx_bridge_pool.07dbca64ec0f79d2bb174fad28e36b767ee0e3b925ba4eaeb422b184a0efc9e5.wasm",
"tx_change_validator_commission.wasm": "tx_change_validator_commission.9f056a815aead18dc845dd919aa2d450cc4069615080467050125cf4bf6a2ca5.wasm",
"tx_change_validator_metadata.wasm": "tx_change_validator_metadata.6ec07c03ca064b66cc61028a0615b4064db7ce189fdce0497b2fe9d4de27cc81.wasm",
"tx_claim_rewards.wasm": "tx_claim_rewards.b3113cfec3345d0906a50f9cdd10b8271eace8ca067559b69c4d1e88be7337b1.wasm",
"tx_deactivate_validator.wasm": "tx_deactivate_validator.9648b85a039151794064d80726d5fedb53661bab9a28ac81dc94b91cce5ca180.wasm",
"tx_ibc.wasm": "tx_ibc.013c3d8e7dcbbd77c764bf021f381c7046222070927bb64c54894192f78e78c1.wasm",
"tx_init_account.wasm": "tx_init_account.9be7a5bd72e628dbe8ad002cf03a104e819daa49b53501a68839d654b1abd1ef.wasm",
"tx_init_proposal.wasm": "tx_init_proposal.d81ff4dba9b1316576360dc94fcd611f9b228b040eaefb5157819d692eb4ef50.wasm",
"tx_init_validator.wasm": "tx_init_validator.aa3b3dd227cd3199b3cef164b679fc62a4e6531ffce547eadb766c050d5fabfd.wasm",
"tx_reactivate_validator.wasm": "tx_reactivate_validator.d0812736aba942501922b876b2ec3ca28ded42056f6ed1e2cb0fc668d7912d7c.wasm",
"tx_redelegate.wasm": "tx_redelegate.c11feffb2826d53e5b6d288ed881cf186f83c787d59eb413102a554f68d61937.wasm",
"tx_resign_steward.wasm": "tx_resign_steward.46298559f5c238c2da5c767647bbc71ae059407b020de9a25ed0f626b8ea356c.wasm",
"tx_reveal_pk.wasm": "tx_reveal_pk.82c689174b80b69e385985be62af822c52813cf6698229aafa039995750b1ee8.wasm",
"tx_transfer.wasm": "tx_transfer.09f3b3d196b51a7ee4f43115559540523c6a9ee640b0b3bf4ab301bf9dc38af6.wasm",
"tx_unbond.wasm": "tx_unbond.b1b5b8490591fbe68ad384cc53b5ee636a2c619e5b5d84b3e8ebead0b6e996e2.wasm",
"tx_unjail_validator.wasm": "tx_unjail_validator.1f92cbaf42131daff05ea4540fc170cc16db297bd45d506eb5a11afa1fb2bcaa.wasm",
"tx_update_account.wasm": "tx_update_account.49a9b2023b4858255845bfa3949e314f241858949214950471b0b598febd7248.wasm",
"tx_update_steward_commission.wasm": "tx_update_steward_commission.862d32896f2f108b8f84089b09bec2d02bd76f62b82c8b8709037f3c86d6398b.wasm",
"tx_vote_proposal.wasm": "tx_vote_proposal.428e82b0d21c8dc92bd2431b95efbb8a475d56cad0b4ce05e7787d7b560f5311.wasm",
"tx_withdraw.wasm": "tx_withdraw.225af750859bdb467eeacea9845744d073be9da3719215b036876572d81b5e0d.wasm",
"vp_implicit.wasm": "vp_implicit.41e18b94ec1a8a1b84589f86ef928f96c48f3d1f923048983c4c3ef94848781e.wasm",
"vp_masp.wasm": "vp_masp.553abd74ba3fc88ae2ed1d2a508275978444c5d35d3095f782a99199786b3e35.wasm",
"vp_user.wasm": "vp_user.53e9023f2edc55e90bdcf6024760140a91a7904cb4a529cb1707ea3d34ee685a.wasm",
"vp_validator.wasm": "vp_validator.51765681ccaf7d76236c4b9a1470543c1ea9050e24e32fe8c19ada05f67075e1.wasm"
}
Binary file modified wasm_for_tests/tx_memory_limit.wasm
Binary file not shown.
Binary file modified wasm_for_tests/tx_mint_tokens.wasm
Binary file not shown.
Binary file modified wasm_for_tests/tx_read_storage_key.wasm
Binary file not shown.
Binary file modified wasm_for_tests/tx_write.wasm
Binary file not shown.
Binary file modified wasm_for_tests/tx_write_storage_key.wasm
Binary file not shown.
Binary file modified wasm_for_tests/vp_eval.wasm
Binary file not shown.
Binary file modified wasm_for_tests/vp_memory_limit.wasm
Binary file not shown.
Binary file modified wasm_for_tests/vp_read_storage_key.wasm
Binary file not shown.

0 comments on commit ece850b

Please sign in to comment.