Skip to content

Commit 72bb5bb

Browse files
deffriankamilchodola
authored andcommitted
Fix base config & migrate op to V2 methods (#6317)
* fix base config & engineV2 methods * Disable gc
1 parent 3d74bf9 commit 72bb5bb

File tree

4 files changed

+38
-2
lines changed

4 files changed

+38
-2
lines changed

src/Nethermind/Chains/base-mainnet.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"Optimism": {
66
"params": {
77
"regolithTimestamp": "0x0",
8-
"bedrockBlockNumber": "0x0"
8+
"bedrockBlockNumber": "0x0",
9+
"l1FeeRecipient": "0x420000000000000000000000000000000000001A",
10+
"l1BlockAddress": "0x4200000000000000000000000000000000000015"
911
}
1012
}
1113
},

src/Nethermind/Nethermind.Optimism/IOptimismEngineRpcModule.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,22 @@ public interface IOptimismEngineRpcModule : IRpcModule
3030
IsSharable = true,
3131
IsImplemented = true)]
3232
Task<ResultWrapper<PayloadStatusV1>> engine_newPayloadV1(ExecutionPayload executionPayload);
33+
34+
[JsonRpcMethod(
35+
Description = "Verifies the payload according to the execution environment rules and returns the verification status and hash of the last valid block.",
36+
IsSharable = true,
37+
IsImplemented = true)]
38+
Task<ResultWrapper<ForkchoiceUpdatedV1Result>> engine_forkchoiceUpdatedV2(ForkchoiceStateV1 forkchoiceState, OptimismPayloadAttributes? payloadAttributes = null);
39+
40+
[JsonRpcMethod(
41+
Description = "Returns the most recent version of an execution payload with respect to the transaction set contained by the mempool.",
42+
IsSharable = true,
43+
IsImplemented = true)]
44+
Task<ResultWrapper<GetPayloadV2Result?>> engine_getPayloadV2(byte[] payloadId);
45+
46+
[JsonRpcMethod(
47+
Description = "Verifies the payload according to the execution environment rules and returns the verification status and hash of the last valid block.",
48+
IsSharable = true,
49+
IsImplemented = true)]
50+
Task<ResultWrapper<PayloadStatusV1>> engine_newPayloadV2(ExecutionPayload executionPayload);
3351
}

src/Nethermind/Nethermind.Optimism/OptimismEngineRpcModule.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,21 @@ public Task<ResultWrapper<PayloadStatusV1>> engine_newPayloadV1(ExecutionPayload
2828
return _engineRpcModule.engine_newPayloadV1(executionPayload);
2929
}
3030

31+
public async Task<ResultWrapper<ForkchoiceUpdatedV1Result>> engine_forkchoiceUpdatedV2(ForkchoiceStateV1 forkchoiceState, OptimismPayloadAttributes? payloadAttributes = null)
32+
{
33+
return await _engineRpcModule.engine_forkchoiceUpdatedV2(forkchoiceState, payloadAttributes);
34+
}
35+
36+
public Task<ResultWrapper<GetPayloadV2Result?>> engine_getPayloadV2(byte[] payloadId)
37+
{
38+
return _engineRpcModule.engine_getPayloadV2(payloadId);
39+
}
40+
41+
public Task<ResultWrapper<PayloadStatusV1>> engine_newPayloadV2(ExecutionPayload executionPayload)
42+
{
43+
return _engineRpcModule.engine_newPayloadV2(executionPayload);
44+
}
45+
3146
public OptimismEngineRpcModule(IEngineRpcModule engineRpcModule)
3247
{
3348
_engineRpcModule = engineRpcModule;

src/Nethermind/Nethermind.Runner/configs/base-mainnet.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"ChainSpecPath" : "chainspec/base-mainnet.json",
44
"GenesisHash" : "0xf712aa9241cc24369b143cf6dce85f0902a9731e70d66818a3a5845b296c73dd",
55
"BaseDbPath" : "nethermind_db/base-mainnet",
6-
"LogFileName" : "base-mainnet.logs.txt"
6+
"LogFileName" : "base-mainnet.logs.txt",
7+
"DisableGcOnNewPayload": false
78
},
89
"JsonRpc" : {
910
"Enabled" : true,

0 commit comments

Comments
 (0)