Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
stompesi committed Jan 17, 2025
1 parent d56f0cb commit 96009b0
Show file tree
Hide file tree
Showing 10 changed files with 333 additions and 329 deletions.
4 changes: 2 additions & 2 deletions config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ StateConsistencyCheckInterval = "5s"
SequentialBatchSanityCheck = false
SequentialProcessL2Block = true
UseExternalSequencer = true
RollupId = "radius_rollup"
RollupId = "radius_rollup_sign"
Platform = "ethereum"
PlatformUrl = "https://ethereum-holesky-rpc.publicnode.com"
LivenessContractAddress = "0xF05D4533801F921ae57f244EfD15B48f6E60a0ba"
LivenessContractAddress = "0xBE32Ae8d955747FD4Ab0818C927c3926F373E05E"
ServiceType = "radius"
ClusterId = "radius"
SeedNodeURI = "http://34.47.85.214:6000"
Expand Down
196 changes: 98 additions & 98 deletions config/environments/local/local.genesis.config.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions config/environments/local/local.node.config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ StateConsistencyCheckInterval = "5s"
SequentialBatchSanityCheck = false
SequentialProcessL2Block = true
UseExternalSequencer = true
RollupId = "radius_rollup"
RollupId = "radius_rollup_sign"
Platform = "ethereum"
PlatformUrl = "https://ethereum-holesky-rpc.publicnode.com"
LivenessContractAddress = "0xF05D4533801F921ae57f244EfD15B48f6E60a0ba"
LivenessContractAddress = "0xBE32Ae8d955747FD4Ab0818C927c3926F373E05E"
ServiceType = "radius"
ClusterId = "radius"
SeedNodeURI = "http://34.47.85.214:6000"
Expand Down
4 changes: 2 additions & 2 deletions config/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestLoadCustomNetworkConfig(t *testing.T) {
"contractName": "PolygonZkEVMGlobalExitRootL2 proxy"
},
{
"balance": "100000000000000000000000",
"balance": "10000000000000000000000000000000",
"nonce": "2",
"address": "0x9d98deabc42dd696deb9e40b4f1cab7ddbf55988",
"bytecode": "0xbeef2",
Expand Down Expand Up @@ -105,7 +105,7 @@ func TestLoadCustomNetworkConfig(t *testing.T) {
{
Address: "0x9d98deabc42dd696deb9e40b4f1cab7ddbf55988",
Type: int(merkletree.LeafTypeBalance),
Value: "100000000000000000000000",
Value: "10000000000000000000000000000000",
},
{
Address: "0x9d98deabc42dd696deb9e40b4f1cab7ddbf55988",
Expand Down
26 changes: 15 additions & 11 deletions sequencer/l2block.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,11 @@ func (f *finalizer) finalizeWIPL2Block(ctx context.Context) error {

for _, txString := range getRawTxListResponse.RawTransactionList {
tx, _ := hexToTx(txString)
processBatchResponse, _ := f.stateIntf.PreProcessTransaction(ctx, tx, nil)
processBatchResponse, err := f.stateIntf.PreProcessTransaction(ctx, tx, nil)

if err != nil {
continue
}

poolTx := pool.NewTransaction(*tx, "", false)
poolTx.ZKCounters = processBatchResponse.UsedZkCounters
Expand Down Expand Up @@ -731,27 +735,27 @@ func (f *finalizer) GetSequencerUrlList() (uint64, []SequencerInfo, error) {
return 0, nil, err
}

getSequencerListFunctionName := "getSequencerList"
getSequencersFunctionName := "getSequencers"

contractABI, err := abi.JSON(strings.NewReader(`[
{
"type": "function",
"name": "getSequencers",
"inputs": [
{
"internalType": "string",
"name": "clusterId",
"type": "string"
"type": "string",
"internalType": "string"
}
],
"name": "getSequencerList",
"outputs": [
{
"internalType": "address[]",
"name": "",
"type": "address[]"
"type": "address[]",
"internalType": "address[]"
}
],
"stateMutability": "view",
"type": "function"
"stateMutability": "view"
}
]`))
if err != nil {
Expand All @@ -764,7 +768,7 @@ func (f *finalizer) GetSequencerUrlList() (uint64, []SequencerInfo, error) {
fmt.Println("platform", f.cfg.PlatformUrl)
fmt.Println("clusterId", f.cfg.ClusterId)

data, err := contractABI.Pack(getSequencerListFunctionName, f.cfg.ClusterId)
data, err := contractABI.Pack(getSequencersFunctionName, f.cfg.ClusterId)
if err != nil {
return 0, nil, err
}
Expand All @@ -779,7 +783,7 @@ func (f *finalizer) GetSequencerUrlList() (uint64, []SequencerInfo, error) {
}

var sequencerList []common.Address
err = contractABI.UnpackIntoInterface(&sequencerList, getSequencerListFunctionName, result)
err = contractABI.UnpackIntoInterface(&sequencerList, getSequencersFunctionName, result)
if err != nil {
return 0, nil, err
}
Expand Down
22 changes: 11 additions & 11 deletions state/test/forkid_dragonfruit/dragonfruit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func TestExecutorUnsignedTransactions(t *testing.T) {
{
Address: sequencerAddress.Hex(),
Type: int(merkletree.LeafTypeBalance),
Value: "100000000000000000000000",
Value: "10000000000000000000000000000000",
},
}
_, err = testState.SetGenesis(ctx, state.Block{}, test.Genesis, metrics.SynchronizerCallerLabel, dbTx)
Expand Down Expand Up @@ -215,17 +215,17 @@ func TestExecutorEstimateGas(t *testing.T) {
{
Address: "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
Type: int(merkletree.LeafTypeBalance),
Value: "100000000000000000000000",
Value: "10000000000000000000000000000000",
},
{
Address: "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
Type: int(merkletree.LeafTypeBalance),
Value: "100000000000000000000000",
Value: "10000000000000000000000000000000",
},
{
Address: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
Type: int(merkletree.LeafTypeBalance),
Value: "100000000000000000000000",
Value: "10000000000000000000000000000000",
},
}

Expand Down Expand Up @@ -368,17 +368,17 @@ func TestExecutorGasRefund(t *testing.T) {
{
Address: "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
Type: int(merkletree.LeafTypeBalance),
Value: "100000000000000000000000",
Value: "10000000000000000000000000000000",
},
{
Address: "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
Type: int(merkletree.LeafTypeBalance),
Value: "100000000000000000000000",
Value: "10000000000000000000000000000000",
},
{
Address: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
Type: int(merkletree.LeafTypeBalance),
Value: "100000000000000000000000",
Value: "10000000000000000000000000000000",
},
},
}
Expand Down Expand Up @@ -534,17 +534,17 @@ func TestExecutorGasEstimationMultisig(t *testing.T) {
{
Address: "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
Type: int(merkletree.LeafTypeBalance),
Value: "100000000000000000000000",
Value: "10000000000000000000000000000000",
},
{
Address: "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
Type: int(merkletree.LeafTypeBalance),
Value: "100000000000000000000000",
Value: "10000000000000000000000000000000",
},
{
Address: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
Type: int(merkletree.LeafTypeBalance),
Value: "100000000000000000000000",
Value: "10000000000000000000000000000000",
},
}

Expand Down Expand Up @@ -882,7 +882,7 @@ func TestExecutorUnsignedTransactionsWithCorrectL2BlockStateRoot(t *testing.T) {
{
Address: operations.DefaultSequencerAddress,
Type: int(merkletree.LeafTypeBalance),
Value: "100000000000000000000000",
Value: "10000000000000000000000000000000",
},
}
_, err = testState.SetGenesis(ctx, state.Block{}, test.Genesis, metrics.SynchronizerCallerLabel, dbTx)
Expand Down
4 changes: 2 additions & 2 deletions test/config/debug.node.config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ StateConsistencyCheckInterval = "5s"
SequentialBatchSanityCheck = false
SequentialProcessL2Block = true
UseExternalSequencer = true
RollupId = "radius_rollup"
RollupId = "radius_rollup_sign"
Platform = "ethereum"
PlatformUrl = "https://ethereum-holesky-rpc.publicnode.com"
LivenessContractAddress = "0xF05D4533801F921ae57f244EfD15B48f6E60a0ba"
LivenessContractAddress = "0xBE32Ae8d955747FD4Ab0818C927c3926F373E05E"
ServiceType = "radius"
ClusterId = "radius"
SeedNodeURI = "http://34.47.85.214:6000"
Expand Down
Loading

0 comments on commit 96009b0

Please sign in to comment.