Skip to content

sequencer: use address bytes directly in handle_check_tx() logic  #1620

@lobstergrindset

Description

@lobstergrindset

In the handle_check_tx() logic we're using a heavy weight address computation instead of using the address bytes directly. We should change this to just use the bytes. We should also remove the associated metric when making the change.

// TODO: change rest of code to allow just using bytes instead of having to
// generate this function
let address = match state
        .try_base_prefixed(signed_tx.verification_key().address_bytes())
        .await
        .context("failed to generate address for signed transaction")
    {
        Err(err) => {
            return Err(response::CheckTx {
                code: Code::Err(AbciErrorCode::INTERNAL_ERROR.value()),
                info: AbciErrorCode::INTERNAL_ERROR.info(),
                log: format!("failed to generate address because: {err:#}"),
                ..response::CheckTx::default()
            });
        }
        Ok(address) => address,
    };

┆Issue Number: ENG-903

Metadata

Metadata

Assignees

Labels

ignore-staleOverride for issues or PRs which should not be removed if stale.performancesequencerpertaining to the astria-sequencer cratestale

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions