Sequencer currently imposes that the field astria.protocol.transactions.v1alpha1.BridgeUnlockAction.rollup_withdrawal_event_id has a length no more than 64 bytes.
This creates an issue when wanting to write the native formatting of a eth TX hash into this field, which is of the form 0x<hex-of-64-bytes>, for a total length of 130 bytes.
Very likely the restriction on the memo length is similarly too strict.
|
impl ActionHandler for BridgeUnlockAction { |
|
// TODO(https://github.com/astriaorg/astria/issues/1430): move checks to the `BridgeUnlock` parsing. |
|
async fn check_stateless(&self) -> Result<()> { |
|
ensure!(self.amount > 0, "amount must be greater than zero",); |
|
ensure!(self.memo.len() <= 64, "memo must not be more than 64 bytes"); |
|
ensure!( |
|
!self.rollup_withdrawal_event_id.is_empty(), |
|
"rollup withdrawal event id must be non-empty", |
|
); |
|
ensure!( |
|
self.rollup_withdrawal_event_id.len() <= 64, |
|
"rollup withdrawal event id must not be more than 64 bytes", |
|
); |
|
ensure!( |
|
self.rollup_block_number > 0, |
|
"rollup block number must be greater than zero", |
|
); |
|
Ok(()) |
|
} |
┆Issue Number: ENG-802
Sequencer currently imposes that the field
astria.protocol.transactions.v1alpha1.BridgeUnlockAction.rollup_withdrawal_event_idhas a length no more than 64 bytes.This creates an issue when wanting to write the native formatting of a eth TX hash into this field, which is of the form
0x<hex-of-64-bytes>, for a total length of 130 bytes.Very likely the restriction on the memo length is similarly too strict.
astria/crates/astria-sequencer/src/bridge/bridge_unlock_action.rs
Lines 28 to 46 in fc9f225
┆Issue Number: ENG-802