Skip to content

Commit 188268f

Browse files
committed
fix: reject blocks that exceed the actual limit
1 parent 1ab1147 commit 188268f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

services/api/service.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1785,6 +1785,10 @@ func (api *RelayAPI) handleSubmitNewBlock(w http.ResponseWriter, req *http.Reque
17851785
}
17861786
}
17871787

1788+
// Refuse blocks outside the specified gas limit
1789+
if payload.Capella.ExecutionPayload.GasLimit > RelayActualGasLimit {
1790+
return
1791+
}
17881792
// Overwrite the builder's gasLimit with the relay-set fictitious limit
17891793
payload.Capella.ExecutionPayload.GasLimit = RelayFictitiousGasLimit
17901794

0 commit comments

Comments
 (0)