diff --git a/itests/eth_transactions_test.go b/itests/eth_transactions_test.go index 0c8f1baa5..6ba63608a 100644 --- a/itests/eth_transactions_test.go +++ b/itests/eth_transactions_test.go @@ -83,6 +83,11 @@ func TestValueTransferValidSignature(t *testing.T) { // Success. require.EqualValues(t, ethtypes.EthUint64(0x1), receipt.Status) + + ethTx, err := client.EthGetTransactionByHash(ctx, &hash) + require.Nil(t, err) + require.EqualValues(t, ethAddr, ethTx.From) + } func TestLegacyTransaction(t *testing.T) { diff --git a/node/impl/full/eth.go b/node/impl/full/eth.go index 938631d43..a9e5a1cb4 100644 --- a/node/impl/full/eth.go +++ b/node/impl/full/eth.go @@ -1569,8 +1569,15 @@ func newEthTxFromSignedMessage(ctx context.Context, smsg *types.SignedMessage, s tx.Hash, err = tx.TxHash() if err != nil { - return ethtypes.EthTx{}, err + return ethtypes.EthTx{}, xerrors.Errorf("failed to calculate hash for ethTx: %w", err) } + + fromAddr, err := lookupEthAddress(ctx, smsg.Message.From, sa) + if err != nil { + return ethtypes.EthTx{}, xerrors.Errorf("failed to resolve Ethereum address: %w", err) + } + + tx.From = fromAddr } else if smsg.Signature.Type == crypto.SigTypeSecp256k1 { // Secp Filecoin Message tx = ethTxFromNativeMessage(ctx, smsg.VMMessage(), sa) tx.Hash, err = ethtypes.EthHashFromCid(smsg.Cid())