Commit 9d1ff999 authored by Mark Tyneway's avatar Mark Tyneway

l2geth: allow RPC transactions to go to `address(0)`

When the custom batch serialization was being used instead of RLP, a
transaction being sent to `address(0)` was not allowed because that
meant that it was a contract creation because there is no abi encoding
for `nil`. To prevent collisions, transactions sent via RPC to
`address(0)` were banned. Now the RLP transactions are being used, this
check can be removed. It helps to reduce the diff from upstream geth.
parent b4d98828
---
'@eth-optimism/l2geth': patch
---
Allow transactions via RPC to `address(0)`
...@@ -304,9 +304,6 @@ func (b *EthAPIBackend) SendTx(ctx context.Context, signedTx *types.Transaction) ...@@ -304,9 +304,6 @@ func (b *EthAPIBackend) SendTx(ctx context.Context, signedTx *types.Transaction)
if b.UsingOVM { if b.UsingOVM {
to := signedTx.To() to := signedTx.To()
if to != nil { if to != nil {
if *to == (common.Address{}) {
return errors.New("Cannot send transaction to zero address")
}
// Prevent QueueOriginSequencer transactions that are too large to // Prevent QueueOriginSequencer transactions that are too large to
// be included in a batch. The `MaxCallDataSize` should be set to // be included in a batch. The `MaxCallDataSize` should be set to
// the layer one consensus max transaction size in bytes minus the // the layer one consensus max transaction size in bytes minus the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment