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

Refine IBC parts for masp ibc replay protection #3422

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e02fe43
Now hash the TransferTarget into Transaction transparent outputs.
murisi May 28, 2024
6cbe813
Modified the MASP VP to check the IBC receivers.
murisi May 31, 2024
20d113b
Created a separate type that is either an Address or IBC receiver.
murisi Jun 1, 2024
2b49dc0
Now check that the IBC events are valid with respect to storage changes.
murisi Jun 4, 2024
abbf3b2
Split up the IBC validation logic in MASP.
murisi Jun 7, 2024
b55f5bc
Centralized the construction of TransparentAddresses to ensure that e…
murisi Jun 11, 2024
5547f09
Handle the is_sender_chain_source case in the MASP VP.
murisi Jun 11, 2024
423ee7f
Ensure that native tokens can always be decoded.
murisi Jun 12, 2024
0ae6f2b
Reduced the dependence on IBC events.
murisi Jun 12, 2024
438a4ab
Merge branch 'base' into murisi/masp-ibc-replay-protection-using-txda…
murisi Jun 12, 2024
08e5664
Subdivided some functions involved in processing IBC packets.
murisi Jun 14, 2024
a2854e7
Now map denominations to tokens using ibc_token instead of reverse_qu…
murisi Jun 19, 2024
6739f0b
Removed is_any_shielded_action_balance_key and related code since tha…
murisi Jun 19, 2024
18fe989
Simplify checking packet acknowledgement by assuming the uniqueness o…
murisi Jun 19, 2024
8de2ec0
Added more comments and improved function naming.
murisi Jun 19, 2024
0c999bd
Start using IBC ports to determine message formats.
murisi Jun 19, 2024
d0b4f3d
Now charge gas in IBC denom query.
murisi Jun 19, 2024
0a5d480
Update balances in the MASP using a non-mutating style.
murisi Jun 19, 2024
7ff94bd
Added changelog entry.
murisi Jun 20, 2024
d44fc56
support NftTransfer
yito88 Jun 18, 2024
320e9ed
fix for apply_recv_msg
yito88 Jun 19, 2024
60ea876
refactoring: add trace.rs
yito88 Jun 20, 2024
a942176
reduce assumptions for IBC VP
yito88 Jun 21, 2024
9c51728
add ibc trace file
yito88 Jun 21, 2024
fb19c25
fix convert_to_address
yito88 Jun 21, 2024
210f34b
fix tests
yito88 Jun 21, 2024
5c3b3ab
fix the port and channel for is_receiving_success
yito88 Jun 24, 2024
61db5a4
add changelog
yito88 Jul 1, 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Add replay protection to MASP-IBC transactions.
([\#3409](https://github.com/anoma/namada/pull/3409))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Refine IBC parts for masp ibc replay protection
([\#3422](https://github.com/anoma/namada/issues/3422))
127 changes: 52 additions & 75 deletions Cargo.lock

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

3 changes: 1 addition & 2 deletions crates/apps_lib/src/cli/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ use namada::core::chain::ChainId;
use namada::core::ethereum_events::EthAddress;
use namada::core::key::*;
use namada::core::masp::*;
use namada::ibc::{is_ibc_denom, is_nft_trace};
use namada::ibc::trace::{ibc_token, is_ibc_denom, is_nft_trace};
use namada::io::Io;
use namada::ledger::ibc::storage::ibc_token;
use namada_sdk::masp::fs::FsShieldedUtils;
use namada_sdk::masp::ShieldedContext;
use namada_sdk::wallet::Wallet;
Expand Down
2 changes: 1 addition & 1 deletion crates/benches/native_vps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ fn prepare_ibc_tx_and_ctx(bench_name: &str) -> (BenchShieldedCtx, BatchedTx) {
shielded_ctx.generate_shielded_action(
Amount::native_whole(10),
TransferSource::ExtendedSpendingKey(albert_spending_key),
TransferTarget::Address(defaults::bertha_address()),
defaults::bertha_address().to_string(),
)
}
_ => panic!("Unexpected bench test"),
Expand Down
1 change: 1 addition & 0 deletions crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ proptest = {workspace = true, optional = true}
prost-types.workspace = true
rand = {version = "0.8", optional = true}
rand_core = {version = "0.6", optional = true}
ripemd.workspace = true
serde.workspace = true
serde_json.workspace = true
sha2.workspace = true
Expand Down
Loading
Loading