anoma / namada

Rust implementation of Namada, a Proof-of-Stake L1 for interchain asset-agnostic privacy
https://namada.net
GNU General Public License v3.0
2.4k stars 956 forks source link

MASP txs do not respect tx expiration date set in args #3586

Closed sug0 closed 2 months ago

sug0 commented 3 months ago

In gen_shielded_transfer, MASP txs do not pull in the tx expiration set by users in args::Tx. If a user requests no tx expiration, the tx might unexpectedly timeout when it should have been validated by the MASP VP.

grarco commented 3 months ago

Isn't it done here?

https://github.com/anoma/namada/blob/6d3fc90c510a62f9da610ee682db747af9af5d0f/crates/sdk/src/masp.rs#L1588-L1626

sug0 commented 3 months ago

That uses context.tx_builder(), which returns TxExpiration::Default, not some specific value set by the user in args::Tx. In essence, gen_shielded_transfer needs an additional expiration arg.