Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
835fdc0
Adding a shielding fee for normal shielding txs. Still need to check IBC
batconjurer Jul 8, 2025
5b27b61
Fixing tests
batconjurer Jul 10, 2025
5187a62
Formatting
batconjurer Jul 11, 2025
9ef5631
Add changelog
batconjurer Jul 14, 2025
3ec74e1
Added shielding fee to an e2e test
batconjurer Jul 14, 2025
cd35e30
Fixing e2e tests
batconjurer Jul 14, 2025
61f34b7
Update crates/tests/src/e2e/ledger_tests.rs
batconjurer Jul 14, 2025
521ae10
Fixed benches
batconjurer Jul 15, 2025
929d320
Fixing pr comments
batconjurer Jul 15, 2025
cae58a6
Added fee shielding checks to masp vp
batconjurer Jul 15, 2025
8fdc6df
typo
batconjurer Jul 15, 2025
249b89c
Strengthened vp checks and add some test cases
batconjurer Jul 16, 2025
ff00f67
Fixing masp vp
batconjurer Jul 17, 2025
20346b9
Added new flow for shielding over ibc
batconjurer Jul 24, 2025
6754f06
Fix bug in finding authorizers masp vp must check from the actions
batconjurer Jul 25, 2025
41cda8f
Formatting
batconjurer Jul 25, 2025
6e71d14
Merge branch 'main' into bat/add-shielding-fee-section
batconjurer Jul 25, 2025
ba86de7
Formatting
batconjurer Jul 25, 2025
e331c61
Fixed an import mistake
batconjurer Jul 28, 2025
6b49a2d
Fixed test vp env
batconjurer Jul 28, 2025
528aaaf
Added balance check to shielding fee payer when call gen_ibc_transfer
batconjurer Jul 28, 2025
05f285e
Forgot a goddamn await ofc
batconjurer Jul 28, 2025
f39cea7
Formatting
batconjurer Jul 28, 2025
fa08fed
Some light renaming in anticipation of unshielding fees
batconjurer Jul 28, 2025
3bd65a3
Fixed a silly assertion error in integration test
batconjurer Jul 29, 2025
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
12 changes: 3 additions & 9 deletions crates/sdk/src/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2747,15 +2747,9 @@ pub async fn build_ibc_transfer(
Some(source.clone()),
Some(source.clone()),
vec![],
if let Some(IbcShieldingData {
shielding_fee_payer: payer,
..
}) = &args.ibc_shielding_data
{
Some(payer.clone())
} else {
None
},
args.ibc_shielding_data
.as_ref()
.map(|shielding_data| shielding_data.shielding_fee_payer.clone()),
args.source.spending_key().is_some(),
vec![],
None,
Expand Down
19 changes: 15 additions & 4 deletions crates/shielded_token/src/vp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -624,20 +624,31 @@ where
return Err(error);
}
}
let masp_tx_id = shielded_tx.txid().into();
let has_trans_inputs = shielded_tx
.transparent_bundle()
.map(|b| !b.vin.empty())
.unwrap_or(false);
// The transaction shall not push masp authorizer actions that are not
// needed because this might lead vps to run a wrong validation logic
if !actions_authorizers.is_empty()
&& shielded_tx
.transparent_bundle()
.map(|b| b.vin.is_empty())
.unwrap_or(true)
&& !has_trans_inputs
{
let error = Error::new_const(
"Found masp authorizer actions that are not required",
);
tracing::debug!("{error}");
return Err(error);
}
// check that the tx has a shielding fee section
if has_trans_inputs && batched_tx.tx.get_shielding_fee_section(&masp_tx_id).is_none()
{
let error = Error::new_const(
"Found a shielding transaction with a shielding fee section",
);
tracing::debug!("{error}");
return Err(error);
}

// Verify the proofs
verify_shielded_tx(&shielded_tx, |gas| ctx.charge_gas(gas))
Expand Down
Loading