Skip to content

Commit

Permalink
Merge pull request #764 from anoma/james/ethbridge/fix-e2e
Browse files Browse the repository at this point in the history
Add more logging around vote extensions
  • Loading branch information
james-chf authored Nov 15, 2022
2 parents fdd211a + b0f0088 commit 707cdf3
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 13 deletions.
15 changes: 13 additions & 2 deletions apps/src/lib/node/ledger/shell/vote_extensions/eth_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ where
.map_err(|err| {
tracing::error!(
?err,
?ext.sig,
?pk,
%validator,
"Failed to verify the signature of an Ethereum events vote \
extension issued by some validator"
Expand Down Expand Up @@ -261,13 +263,22 @@ where
);
}

let key = (addr, block_height);
tracing::debug!(
?key,
?sig,
?validator_addr,
"Inserting signature into ethereum_events::VextDigest"
);
#[cfg(not(feature = "abcipp"))]
if let Some(sig) = signatures.insert((addr, block_height), sig) {
if let Some(existing_sig) = signatures.insert(key, sig.clone()) {
tracing::warn!(
?sig,
?existing_sig,
?validator_addr,
"Overwrote old signature from validator while \
constructing ethereum_events::VextDigest"
constructing ethereum_events::VextDigest - maybe private \
key of validator is being used by multiple nodes?"
);
}
}
Expand Down
16 changes: 13 additions & 3 deletions apps/src/lib/node/ledger/shell/vote_extensions/val_set_update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ where
.map_err(|err| {
tracing::error!(
?err,
?ext.sig,
?pk,
%validator,
"Failed to verify the signature of a valset upd vote \
extension issued by some validator"
Expand Down Expand Up @@ -263,14 +265,22 @@ where
constructing validator_set_update::VextDigest"
);
}

let key = (addr, block_height);
tracing::debug!(
?key,
?sig,
?validator_addr,
"Inserting signature into validator_set_update::VextDigest"
);
#[cfg(not(feature = "abcipp"))]
if let Some(sig) = signatures.insert((addr, block_height), sig) {
if let Some(existing_sig) = signatures.insert(key, sig.clone()) {
tracing::warn!(
?sig,
?existing_sig,
?validator_addr,
"Overwrote old signature from validator while \
constructing validator_set_update::VextDigest"
constructing validator_set_update::VextDigest - maybe \
private key of validator is being used by multiple nodes?"
);
}
}
Expand Down
16 changes: 8 additions & 8 deletions wasm/checksums.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"tx_bond.wasm": "tx_bond.a2d03adca103b0acc5997b926990ff4de4650268203e9d3350e004eab074634a.wasm",
"tx_bridge_pool.wasm": "tx_bridge_pool.e21563260c03cfdab1f195878f49bf93722027ad26fcd097cfebbc5c4d279082.wasm",
"tx_ibc.wasm": "tx_ibc.2b467845c55820345ce48e2da4f7c2606566555eac12ee64f8baeb5b63dfae83.wasm",
"tx_init_account.wasm": "tx_init_account.86e02762f60428966c7ab4f780fc4dbcc794ae0aa791930f27e246c2c289e045.wasm",
"tx_init_proposal.wasm": "tx_init_proposal.f654f0e4610e03c9ffcc36225f67822200aa89f3633f16a9eb0b47813f8ec15a.wasm",
"tx_init_validator.wasm": "tx_init_validator.b4e6713e69aa341339a836de6901c7c29a532849577514255ecb3092882a12c3.wasm",
"tx_transfer.wasm": "tx_transfer.e3c687a17173af07b4be0fc0af06ebe6dbba1d5195b8e3015c955eeaaa53e59e.wasm",
"tx_bond.wasm": "tx_bond.4e64b7884c8df422fc00db221fbe0eb48bfb494c2baf385c5552e041cacdea64.wasm",
"tx_bridge_pool.wasm": "tx_bridge_pool.233f790468cc70489111201f6f066280d7bc579b2884d94448e357bf243d0a14.wasm",
"tx_ibc.wasm": "tx_ibc.e4dccee1e462e84f2b2a5c2cdbc06dc1570679363d7480e37c86e505583ca6fa.wasm",
"tx_init_account.wasm": "tx_init_account.db84fb031ffac56b59dc0383f0ad3e528e5d7635292de02e7cda4c4545b2cbe5.wasm",
"tx_init_proposal.wasm": "tx_init_proposal.3227005afc52c2f002fee13de88ea6b4e1b26ab5e53d66453bda45230f670565.wasm",
"tx_init_validator.wasm": "tx_init_validator.419ce3750a8a70087cb5b4010418570f73534e68ebb918a16d93b346c5189de5.wasm",
"tx_transfer.wasm": "tx_transfer.a0fe87d8e4b48ed679d8e16a8800085cb3d7ac9556fb5fe4b37cff4cd66fee81.wasm",
"tx_unbond.wasm": "tx_unbond.4480c046edf32bf97d2d40d45b2bd05547049cae22df48f3fc433f151b495e2b.wasm",
"tx_update_vp.wasm": "tx_update_vp.b057de2c9f17a634aaf011f6bf6bb0bac198ae522c5a24a44dec71d9b649c7e7.wasm",
"tx_vote_proposal.wasm": "tx_vote_proposal.4625c309121620a10b9b87b4f4622b8a899f758c08d5ae0341a6f80ce932e089.wasm",
"tx_withdraw.wasm": "tx_withdraw.6ee49918852f375271a444c111b73ddcf20e237af852579b4fcc4caab17a2715.wasm",
"tx_withdraw.wasm": "tx_withdraw.98503dc2b6d931e9303567567de4d395ae7689f0ef852810e75a904953684d08.wasm",
"vp_testnet_faucet.wasm": "vp_testnet_faucet.e417000da4f7640a5fb5f124755ed02b8654aa67db600bea6e93e1f04e6d71a3.wasm",
"vp_token.wasm": "vp_token.37749e16d9fcd17dc2cf3351b0a140b5821668f80d6cc805caeb3e8e9af06cd9.wasm",
"vp_user.wasm": "vp_user.8c117faa94e44833fb7a16d13067f7626ecfca6a70fec1b7822c7d9a6c3e909e.wasm"
Expand Down

0 comments on commit 707cdf3

Please sign in to comment.