Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
yann-sjtu committed Jun 25, 2024
1 parent f977e37 commit 67fc276
Show file tree
Hide file tree
Showing 6 changed files with 356 additions and 10 deletions.
24 changes: 24 additions & 0 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ DOCKERCOMPOSEEXPLORERL2DB := xlayer-explorer-l2-db
DOCKERCOMPOSEEXPLORERRPC := xlayer-explorer-json-rpc
DOCKERCOMPOSEDACNODE := xlayer-data-availability
DOCKERCOMPOSEZKPROVER := xlayer-prover
DOCKERCOMPOSEMOCKPROVER := xlayer-mock-prover
DOCKERCOMPOSEEXECUTOR := xlayer-executor
DOCKERCOMPOSEPERMISSIONLESSDB := xlayer-permissionless-db
DOCKERCOMPOSEPERMISSIONLESSNODE := xlayer-permissionless-node
Expand Down Expand Up @@ -74,6 +75,7 @@ RUNEXPLORERL2 := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEEXPLORERL2)
RUNEXPLORERL2DB := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEEXPLORERL2DB)
RUNEXPLORERJSONRPC := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEEXPLORERRPC)
RUNZKPROVER := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEZKPROVER)
RUNMOCKPROVER := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEMOCKPROVER)
RUNEXECUTOR := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEEXECUTOR)

RUNPERMISSIONLESSDB := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEPERMISSIONLESSDB)
Expand Down Expand Up @@ -687,6 +689,28 @@ run: ## Runs a full node
$(RUNL1NETWORK)
sleep 1
$(RUNZKPROVER)
$(RUNAPPROVE)
sleep 3
$(RUNSYNC)
sleep 4
$(RUNDACNODE)
$(RUNETHTXMANAGER)
$(RUNSEQUENCER)
#$(RUNSIGNER)
$(RUNSEQUENCESENDER)
$(RUNL2GASPRICER)
$(RUNAGGREGATOR)
$(RUNJSONRPC)

.PHONY: run2
run2: ## Runs a full node
$(RUNSTATEDB)
$(RUNPOOLDB)
$(RUNEVENTDB)
$(RUNDACDB)
$(RUNL1NETWORK)
sleep 1
$(RUNMOCKPROVER)
$(RUNEXECUTOR)
$(RUNAPPROVE)
sleep 3
Expand Down
10 changes: 4 additions & 6 deletions test/config/test.node.config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ StateConsistencyCheckInterval = "5s"
ForcedBatchesCheckInterval = "10s"
L1InfoTreeL1BlockConfirmations = 0
L1InfoTreeCheckInterval = "10s"
BatchMaxDeltaTimestamp = "5s"
L2BlockMaxDeltaTimestamp = "2s"
BatchMaxDeltaTimestamp = "20s"
L2BlockMaxDeltaTimestamp = "4s"
ResourceExhaustedMarginPct = 10
StateRootSyncInterval = "60s"
HaltOnBatchNumber = 0
Expand Down Expand Up @@ -155,8 +155,6 @@ PrivateKey = {Path = "/pk/sequencer.keystore", Password = "testonly"}
[Aggregator]
Host = "0.0.0.0"
Port = 50081
Parallel = true
ParaCount = 2
RetryTime = "5s"
VerifyProofInterval = "10s"
TxProfitabilityCheckerType = "acceptall"
Expand Down Expand Up @@ -187,10 +185,10 @@ DefaultGasPriceWei = 1000000000
MaxGasPriceWei = 0

[MTClient]
URI = "xlayer-executor:50061"
URI = "xlayer-prover:50061"

[Executor]
URI = "xlayer-executor:50071"
URI = "xlayer-prover:50071"
MaxGRPCMessageSize = 100000000

[Metrics]
Expand Down
221 changes: 221 additions & 0 deletions test/config/test.node2.config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
IsTrustedSequencer = true

[Log]
Environment = "development" # "production" or "development"
Level = "debug"
Outputs = ["stderr"]

[State]
[State.DB]
User = "state_user"
Password = "state_password"
Name = "state_db"
Host = "xlayer-state-db"
Port = "5432"
EnableLog = false
MaxConns = 200
[State.Batch]
[State.Batch.Constraints]
MaxTxsPerBatch = 300
MaxBatchBytesSize = 120000
MaxCumulativeGasUsed = 1125899906842624
MaxKeccakHashes = 2145
MaxPoseidonHashes = 252357
MaxPoseidonPaddings = 135191
MaxMemAligns = 236585
MaxArithmetics = 236585
MaxBinaries = 473170
MaxSteps = 7570538
MaxSHA256Hashes = 1596

[Pool]
EnableFreeGasByNonce = false
FreeGasExAddress = []
FreeGasCountPerAddr = 3
FreeGasLimit = 1500000
FreeClaimGasLimit = 1500000
IntervalToRefreshBlockedAddresses = "5m"
EnableWhitelist = false
IntervalToRefreshWhiteAddresses = "1m"
IntervalToRefreshGasPrices = "5s"
MaxTxBytesSize=100132
MaxTxDataBytesSize=100000
DefaultMinGasPriceAllowed = 1000000000
MinAllowedGasPriceInterval = "5m"
PollMinAllowedGasPriceInterval = "15s"
AccountQueue = 0
GlobalQueue = 0
[Pool.EffectiveGasPrice]
Enabled = false
L1GasPriceFactor = 0.25
ByteGasCost = 16
ZeroByteGasCost = 4
NetProfit = 1
BreakEvenFactor = 1.1
FinalDeviationPct = 10
EthTransferGasPrice = 0
EthTransferL1GasPriceFactor = 0
L2GasPriceSuggesterFactor = 0.5
[Pool.DB]
User = "pool_user"
Password = "pool_password"
Name = "pool_db"
Host = "xlayer-pool-db"
Port = "5432"
EnableLog = false
MaxConns = 200

[Etherman]
URL = "http://xlayer-mock-l1-network:8545"
ForkIDChunkSize = 20000
MultiGasProvider = false
[Etherscan]
ApiKey = ""

[RPC]
Host = "0.0.0.0"
Port = 8123
ReadTimeout = "60s"
WriteTimeout = "60s"
MaxRequestsPerIPAndSecond = 5000
SequencerNodeURI = ""
EnableL2SuggestedGasPricePolling = true
BatchRequestsEnabled = true
BatchRequestsLimit = 20
GasLimitFactor = 1
DisableAPIs = []
[RPC.WebSockets]
Enabled = true
Port = 8133

[Synchronizer]
SyncInterval = "1s"
SyncChunkSize = 100
TrustedSequencerURL = "" # If it is empty or not specified, then the value is read from the smc.
SyncBlockProtection = "latest" # latest, finalized, safe
L1SynchronizationMode = "sequential"
[Synchronizer.L1ParallelSynchronization]
MaxClients = 10
MaxPendingNoProcessedBlocks = 25
RequestLastBlockPeriod = "5s"
RequestLastBlockTimeout = "5s"
RequestLastBlockMaxRetries = 3
StatisticsPeriod = "5m"
TimeoutMainLoop = "5m"
RollupInfoRetriesSpacing= "5s"
FallbackToSequentialModeOnSynchronized = false
[Synchronizer.L1ParallelSynchronization.PerformanceWarning]
AceptableInacctivityTime = "5s"
ApplyAfterNumRollupReceived = 10

[Sequencer]
InitGasPriceMultiple = 1
DeletePoolTxsL1BlockConfirmations = 100
DeletePoolTxsCheckInterval = "12h"
TxLifetimeCheckInterval = "10m"
TxLifetimeMax = "3h"
LoadPoolTxsCheckInterval = "500ms"
StateConsistencyCheckInterval = "5s"
[Sequencer.Finalizer]
NewTxsWaitInterval = "100ms"
ForcedBatchesTimeout = "5s"
ForcedBatchesL1BlockConfirmations = 0
ForcedBatchesCheckInterval = "10s"
L1InfoTreeL1BlockConfirmations = 0
L1InfoTreeCheckInterval = "10s"
BatchMaxDeltaTimestamp = "5s"
L2BlockMaxDeltaTimestamp = "2s"
ResourceExhaustedMarginPct = 10
StateRootSyncInterval = "60s"
HaltOnBatchNumber = 0
SequentialBatchSanityCheck = false
SequentialProcessL2Block = false
[Sequencer.Finalizer.Metrics]
Interval = "60m"
EnableLog = true
[Sequencer.StreamServer]
Port = 6900
Filename = "/datastreamer/datastream.bin"
Version = 1
ChainID = 195
Enabled = true

[SequenceSender]
WaitPeriodSendSequence = "15s"
LastBatchVirtualizationTimeMaxWaitPeriod = "10s"
L1BlockTimestampMargin = "5s"
MaxTxSizeForL1 = 131072
MaxBatchesForL1 = 10
SenderAddress = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"
L2Coinbase = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"
PrivateKey = {Path = "/pk/sequencer.keystore", Password = "testonly"}
[SequenceSender.StreamClient]
Server = "xlayer-sequencer:6900"

[Aggregator]
Host = "0.0.0.0"
Port = 50081
Parallel = true
ParaCount = 2
RetryTime = "1s"
VerifyProofInterval = "10s"
TxProfitabilityCheckerType = "acceptall"
TxProfitabilityMinReward = "1.1"
ProofStatePollingInterval = "5s"
SenderAddress = "0x70997970c51812dc3a010c7d01b50e0d17dc79c8"
CleanupLockedProofsInterval = "2m"
GeneratingProofCleanupThreshold = "10m"
UpgradeEtrogBatchNumber = 0
BatchProofL1BlockConfirmations = 2
SettlementBackend = "l1"
AggLayerTxTimeout = "5m"
AggLayerURL = ""
SequencerPrivateKey = {}

[EthTxManager]
ForcedGas = 0
PrivateKeys = [
{Path = "/pk/sequencer.keystore", Password = "testonly"},
{Path = "/pk/aggregator.keystore", Password = "testonly"}
]

[L2GasPriceSuggester]
Type = "default"
UpdatePeriod = "10s"
Factor = 0.5
DefaultGasPriceWei = 1000000000
MaxGasPriceWei = 0

[MTClient]
URI = "xlayer-executor:50061"

[Executor]
URI = "xlayer-executor:50071"
MaxGRPCMessageSize = 100000000

[Metrics]
Host = "0.0.0.0"
Port = 9091
Enabled = true
ProfilingHost = "0.0.0.0"
ProfilingPort = 6060
ProfilingEnabled = true

[EventLog]
[EventLog.DB]
User = "event_user"
Password = "event_password"
Name = "event_db"
Host = "xlayer-event-db"
Port = "5432"
EnableLog = false
MaxConns = 200

[HashDB]
User = "prover_user"
Password = "prover_pass"
Name = "prover_db"
Host = "xlayer-state-db"
Port = "5432"
EnableLog = false
MaxConns = 200
6 changes: 3 additions & 3 deletions test/config/test.prover.config.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"runExecutorServer": false,
"runExecutorServer": true,
"runExecutorClient": false,
"runExecutorClientMultithread": false,

"runHashDBServer": false,
"runHashDBServer": true,
"runHashDBTest": false,

"runAggregatorServer": false,
"runAggregatorClient": false,
"runAggregatorClientMock": true,
"aggregatorClientMockTimeout": 10,
"aggregatorClientMockTimeout": 1,
"proverName": "test-prover",

"runFileGenBatchProof": false,
Expand Down
Loading

0 comments on commit 67fc276

Please sign in to comment.