Skip to content

Commit

Permalink
Merge branch 'master' into configure-maxcodesize-chainconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
ganeshvanahalli authored Sep 29, 2023
2 parents 3353e50 + abfeebc commit cce2dec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 38 deletions.
35 changes: 0 additions & 35 deletions params/config_arbitrum.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,6 @@ func ArbitrumRollupGoerliTestnetParams() ArbitrumChainParams {
}
}

func ArbitrumRinkebyTestParams() ArbitrumChainParams {
return ArbitrumChainParams{
EnableArbOS: true,
AllowDebugPrecompiles: false,
DataAvailabilityCommittee: false,
InitialArbOSVersion: 3,
InitialChainOwner: common.HexToAddress("0x06C7DBC804D7BcD881D7b86b667893736b8e0Be2"),
}
}

func ArbitrumDevTestParams() ArbitrumChainParams {
return ArbitrumChainParams{
EnableArbOS: true,
Expand Down Expand Up @@ -299,36 +289,11 @@ func ArbitrumAnytrustGoerliTestnetChainConfig() *ChainConfig {
}
}

func ArbitrumRinkebyTestnetChainConfig() *ChainConfig {
return &ChainConfig{
ChainID: big.NewInt(421611),
HomesteadBlock: big.NewInt(0),
DAOForkBlock: nil,
DAOForkSupport: true,
EIP150Block: big.NewInt(0),
EIP155Block: big.NewInt(0),
EIP158Block: big.NewInt(0),
ByzantiumBlock: big.NewInt(0),
ConstantinopleBlock: big.NewInt(0),
PetersburgBlock: big.NewInt(0),
IstanbulBlock: big.NewInt(0),
MuirGlacierBlock: big.NewInt(0),
BerlinBlock: big.NewInt(0),
LondonBlock: big.NewInt(0),
ArbitrumChainParams: ArbitrumRinkebyTestParams(),
Clique: &CliqueConfig{
Period: 0,
Epoch: 0,
},
}
}

var ArbitrumSupportedChainConfigs = []*ChainConfig{
ArbitrumOneChainConfig(),
ArbitrumNovaChainConfig(),
ArbitrumRollupGoerliTestnetChainConfig(),
ArbitrumDevTestChainConfig(),
ArbitrumDevTestDASChainConfig(),
ArbitrumAnytrustGoerliTestnetChainConfig(),
ArbitrumRinkebyTestnetChainConfig(),
}
10 changes: 7 additions & 3 deletions rpc/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,19 @@ func (b *batchCallBuffer) write(ctx context.Context, conn jsonWriter) {
// timeout sends the responses added so far. For the remaining unanswered call
// messages, it sends a timeout error response.
func (b *batchCallBuffer) timeout(ctx context.Context, conn jsonWriter) {
b.respondWithError(ctx, conn, &internalServerError{errcodeTimeout, errMsgTimeout})
}

func (b *batchCallBuffer) respondWithError(ctx context.Context, conn jsonWriter, err error) {
b.mutex.Lock()
defer b.mutex.Unlock()

for _, msg := range b.calls {
if !msg.isNotification() {
resp := msg.errorResponse(&internalServerError{errcodeTimeout, errMsgTimeout})
resp := msg.errorResponse(err)
serialized, err := json.Marshal(resp)
if err != nil {
conn.writeJSON(ctx, errorMessage(&parseError{"error serializing timeout error: " + err.Error()}), true)
conn.writeJSON(ctx, errorMessage(&parseError{"error serializing response error: " + err.Error()}), true)
b.wrote = true
return
}
Expand Down Expand Up @@ -237,7 +241,7 @@ func (h *handler) handleBatch(msgs []*jsonrpcMessage) {
resp := h.handleCallMsg(cp, msg)
err := callBuffer.pushResponse(resp)
if err != nil {
h.conn.writeJSON(cp.ctx, errorMessage(err), true)
callBuffer.respondWithError(cp.ctx, h.conn, err)
return
}
}
Expand Down

0 comments on commit cce2dec

Please sign in to comment.