Skip to content

Add InitiatorAddr::Eoa#5427

Open
mpapierski wants to merge 1 commit into
casper-network:feat-evmfrom
mpapierski:evm-initiator-addr-eoa
Open

Add InitiatorAddr::Eoa#5427
mpapierski wants to merge 1 commit into
casper-network:feat-evmfrom
mpapierski:evm-initiator-addr-eoa

Conversation

@mpapierski

Copy link
Copy Markdown
Collaborator

This is the first of several changes discussed during our EVM review session.

EvmTransaction currently stores an InitiatorAddr even though the transaction already contains the Ethereum sender in from. This is awkward for casper-sidecar, especially for eth_call jsonrpc, because it has an EVM address but no meaningful Casper account hash to provide.

This PR adds InitiatorAddr::Eoa(Address) and derives the EVM transaction initiator directly from from field. This simplifies some flows i.e. identity link resolution etc.

@mpapierski mpapierski changed the title Reject EOA initiators for V1 transactions Add InitiatorAddr::Eoa Jul 14, 2026
Comment on lines +79 to +84
let Some(account_hash) = initiator_addr.account_hash() else {
return WasmV1Result::precondition_failure(
gas_limit,
Error::TrackingCopy(TrackingCopyError::Authorization),
);
};

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good thinking. Auth error is the right call.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i like this a lot better than the initial version, well done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants