From d3a2a40b76ea66e9cf8f494e412a1b68596227b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Kripalani?= Date: Tue, 14 Feb 2023 13:57:46 +0000 Subject: [PATCH] fix: make eth_sendRawTransaction emit correct pre-nv20 messages. --- node/impl/full/eth.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/node/impl/full/eth.go b/node/impl/full/eth.go index 428f56d80..918e458b0 100644 --- a/node/impl/full/eth.go +++ b/node/impl/full/eth.go @@ -750,6 +750,13 @@ func (a *EthModule) EthSendRawTransaction(ctx context.Context, rawTx ethtypes.Et return ethtypes.EmptyEthHash, err } + // Prior to nv20, delegated signature messages with no parameters carried MethodSend. + // Reset the value so the signature will roundtrip. + nv := a.StateManager.GetNetworkVersion(ctx, a.Chain.GetHeaviestTipSet().Height()) + if nv < network.Version20 && smsg.Message.Method == builtintypes.MethodsEVM.InvokeContract && len(smsg.Message.Params) == 0 { + smsg.Message.Method = builtintypes.MethodSend + } + _, err = a.MpoolAPI.MpoolPush(ctx, smsg) if err != nil { return ethtypes.EmptyEthHash, err