Polygon RPC: "only replay-protected (EIP-155) transactions allowed over RPC"

I am trying to broadcast a transaction via a https://polygon-mainnet.infura.io/v3 endpoint that normally succeeds on Ethereum public networks like mainnet, rinkeby, kovan etc. However, I receive this error response:

only replay-protected (EIP-155) transactions allowed over RPC

I was able to fix this by reading this thread and hardcoding chainId: 137 into my transaction config.

If Infura’s polygon nodes do enforce transaction replay-protection, like geth does by default as of v1.10, then this is confusing for users because the ethereum nodes empirically do not enforce this because I can send ethereum transactions without specifying chainId.

1 Like

you need to start passing chainId in your raw transactions

Yeah, minor inconvenience. Hopefully someone else finds this thread helpful. Does Infura plan to start enforcing replay-protection for its Ethereum nodes also?

Hi @nicholaspai - we’re currently reviewing this as a team to see what the potential best way to roll it out would be. We don’t have any updates yet, but when we do, we’ll be sure to inform the community.

my first time using Polygon, faced the same issue. But where is this Transaction config file? I’m using truffle, can you help please?

Hi @Amit_Raina, and welcome to the Infura community! Check out this tutorial - it should have all the info you need :slight_smile: