Skip to content

Conversation

@s1na
Copy link
Contributor

@s1na s1na commented Mar 24, 2025

Issue statement: when user requests eth_simulateV1 to return full transaction objects, these objects always had an empty from field. The reason is we lose the sender when translation the message into a types.Transaction which is then later on serialized.

I did think of an alternative but opted to keep with this approach as it keeps complexity at the edge. The alternative would be to pass down a signer object to RPCMarshal* methods and define a custom signer which keeps the senders in its state and doesn't attempt the signature recovery.

@s1na s1na requested review from fjl and lightclient as code owners March 24, 2025 17:50
Copy link
Member

@gballet gballet left a comment

Choose a reason for hiding this comment

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

Looks good to me overall but I think it would make sense to expand the test a little bit. Have a look at the comment below.

}
require.Len(t, summary, 1, "expected 1 transaction in simulated block")
require.Len(t, summary[0].Transactions, 1, "expected 1 transaction in simulated block")
require.Equal(t, sender, summary[0].Transactions[0].From, "sender address mismatch")
Copy link
Member

Choose a reason for hiding this comment

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

You're only having a single sender and a single transaction, it would make sense to have a few and check that the order is correct, lest they get mixed up somehow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have now address this comment, sorry for the delay.

@gballet gballet added this to the 1.15.11 milestone May 5, 2025
@gballet gballet merged commit bca0646 into ethereum:master May 5, 2025
3 of 4 checks passed
jakub-freebit pushed a commit to fblch/go-ethereum that referenced this pull request Jul 3, 2025
Issue statement: when user requests eth_simulateV1 to return full
transaction objects, these objects always had an empty `from` field. The
reason is we lose the sender when translation the message into a
types.Transaction which is then later on serialized.

I did think of an alternative but opted to keep with this approach as it
keeps complexity at the edge. The alternative would be to pass down a
signer object to RPCMarshal* methods and define a custom signer which
keeps the senders in its state and doesn't attempt the signature
recovery.
howjmay pushed a commit to iotaledger/go-ethereum that referenced this pull request Aug 27, 2025
Issue statement: when user requests eth_simulateV1 to return full
transaction objects, these objects always had an empty `from` field. The
reason is we lose the sender when translation the message into a
types.Transaction which is then later on serialized.

I did think of an alternative but opted to keep with this approach as it
keeps complexity at the edge. The alternative would be to pass down a
signer object to RPCMarshal* methods and define a custom signer which
keeps the senders in its state and doesn't attempt the signature
recovery.
gballet pushed a commit to gballet/go-ethereum that referenced this pull request Sep 11, 2025
Issue statement: when user requests eth_simulateV1 to return full
transaction objects, these objects always had an empty `from` field. The
reason is we lose the sender when translation the message into a
types.Transaction which is then later on serialized.

I did think of an alternative but opted to keep with this approach as it
keeps complexity at the edge. The alternative would be to pass down a
signer object to RPCMarshal* methods and define a custom signer which
keeps the senders in its state and doesn't attempt the signature
recovery.
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