Skip to content

Commit

Permalink
Fix base config & migrate op to V2 methods (#6317)
Browse files Browse the repository at this point in the history
* fix base config & engineV2 methods

* Disable gc
  • Loading branch information
deffrian authored and kamilchodola committed Dec 4, 2023
1 parent 3d74bf9 commit 72bb5bb
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Nethermind/Chains/base-mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"Optimism": {
"params": {
"regolithTimestamp": "0x0",
"bedrockBlockNumber": "0x0"
"bedrockBlockNumber": "0x0",
"l1FeeRecipient": "0x420000000000000000000000000000000000001A",
"l1BlockAddress": "0x4200000000000000000000000000000000000015"
}
}
},
Expand Down
18 changes: 18 additions & 0 deletions src/Nethermind/Nethermind.Optimism/IOptimismEngineRpcModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,22 @@ public interface IOptimismEngineRpcModule : IRpcModule
IsSharable = true,
IsImplemented = true)]
Task<ResultWrapper<PayloadStatusV1>> engine_newPayloadV1(ExecutionPayload executionPayload);

[JsonRpcMethod(
Description = "Verifies the payload according to the execution environment rules and returns the verification status and hash of the last valid block.",
IsSharable = true,
IsImplemented = true)]
Task<ResultWrapper<ForkchoiceUpdatedV1Result>> engine_forkchoiceUpdatedV2(ForkchoiceStateV1 forkchoiceState, OptimismPayloadAttributes? payloadAttributes = null);

[JsonRpcMethod(
Description = "Returns the most recent version of an execution payload with respect to the transaction set contained by the mempool.",
IsSharable = true,
IsImplemented = true)]
Task<ResultWrapper<GetPayloadV2Result?>> engine_getPayloadV2(byte[] payloadId);

[JsonRpcMethod(
Description = "Verifies the payload according to the execution environment rules and returns the verification status and hash of the last valid block.",
IsSharable = true,
IsImplemented = true)]
Task<ResultWrapper<PayloadStatusV1>> engine_newPayloadV2(ExecutionPayload executionPayload);
}
15 changes: 15 additions & 0 deletions src/Nethermind/Nethermind.Optimism/OptimismEngineRpcModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,21 @@ public Task<ResultWrapper<PayloadStatusV1>> engine_newPayloadV1(ExecutionPayload
return _engineRpcModule.engine_newPayloadV1(executionPayload);
}

public async Task<ResultWrapper<ForkchoiceUpdatedV1Result>> engine_forkchoiceUpdatedV2(ForkchoiceStateV1 forkchoiceState, OptimismPayloadAttributes? payloadAttributes = null)
{
return await _engineRpcModule.engine_forkchoiceUpdatedV2(forkchoiceState, payloadAttributes);
}

public Task<ResultWrapper<GetPayloadV2Result?>> engine_getPayloadV2(byte[] payloadId)
{
return _engineRpcModule.engine_getPayloadV2(payloadId);
}

public Task<ResultWrapper<PayloadStatusV1>> engine_newPayloadV2(ExecutionPayload executionPayload)
{
return _engineRpcModule.engine_newPayloadV2(executionPayload);
}

public OptimismEngineRpcModule(IEngineRpcModule engineRpcModule)
{
_engineRpcModule = engineRpcModule;
Expand Down
3 changes: 2 additions & 1 deletion src/Nethermind/Nethermind.Runner/configs/base-mainnet.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"ChainSpecPath" : "chainspec/base-mainnet.json",
"GenesisHash" : "0xf712aa9241cc24369b143cf6dce85f0902a9731e70d66818a3a5845b296c73dd",
"BaseDbPath" : "nethermind_db/base-mainnet",
"LogFileName" : "base-mainnet.logs.txt"
"LogFileName" : "base-mainnet.logs.txt",
"DisableGcOnNewPayload": false
},
"JsonRpc" : {
"Enabled" : true,
Expand Down

0 comments on commit 72bb5bb

Please sign in to comment.