From 3123382b121def7b306022ab06396ef066610cc3 Mon Sep 17 00:00:00 2001 From: "xingqiang.yuan" Date: Tue, 25 Jun 2024 16:24:22 +0800 Subject: [PATCH] update --- test/Makefile | 27 +-- ...nfig.json => test.mock.prover.config.json} | 0 test/config/test.node2.config.toml | 221 ------------------ test/docker-compose.yml | 29 +-- 4 files changed, 5 insertions(+), 272 deletions(-) rename test/config/{test.prover2.config.json => test.mock.prover.config.json} (100%) delete mode 100644 test/config/test.node2.config.toml diff --git a/test/Makefile b/test/Makefile index 90cbf49917..56fc104f92 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,6 +1,5 @@ DOCKERCOMPOSE := docker-compose -f docker-compose.yml DOCKERCOMPOSEAPPSEQ := xlayer-sequencer -DOCKERCOMPOSEAPPSEQ2 := xlayer-sequencer2 DOCKERCOMPOSEAPPSEQSENDER := xlayer-sequence-sender DOCKERCOMPOSEAPPSIGNER := xlayer-signer DOCKERCOMPOSEAPPL2GASP := xlayer-l2gaspricer @@ -55,7 +54,6 @@ RUNEVENTDB := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEEVENTDB) RUNDACDB := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEDACDB) RUNDACNODE := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEDACNODE) RUNSEQUENCER := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEAPPSEQ) -RUNSEQUENCER2 := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEAPPSEQ2) RUNV1TOV2SEQUENCER := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEAPPSEQV1TOV2) RUNSEQUENCESENDER := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEAPPSEQSENDER) RUNSIGNER := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEAPPSIGNER) @@ -697,39 +695,16 @@ 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) $(RUNMOCKPROVER2) $(RUNMOCKPROVER3) $(RUNMOCKPROVER4) - $(RUNEXECUTOR) $(RUNAPPROVE) sleep 3 $(RUNSYNC) sleep 4 $(RUNDACNODE) $(RUNETHTXMANAGER) - $(RUNSEQUENCER2) + $(RUNSEQUENCER) #$(RUNSIGNER) $(RUNSEQUENCESENDER) $(RUNL2GASPRICER) diff --git a/test/config/test.prover2.config.json b/test/config/test.mock.prover.config.json similarity index 100% rename from test/config/test.prover2.config.json rename to test/config/test.mock.prover.config.json diff --git a/test/config/test.node2.config.toml b/test/config/test.node2.config.toml deleted file mode 100644 index 4a52c58582..0000000000 --- a/test/config/test.node2.config.toml +++ /dev/null @@ -1,221 +0,0 @@ -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 diff --git a/test/docker-compose.yml b/test/docker-compose.yml index f28e3b7931..52f0acaee7 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -66,27 +66,6 @@ services: - "-c" - "/app/xlayer-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components sequencer" - xlayer-sequencer2: - container_name: xlayer-sequencer2 - image: xlayer-node - ports: - - 9092:9091 # needed if metrics enabled - - 6060:6060 - - 6900:6900 # Data stream server - environment: - - ZKEVM_NODE_STATE_DB_HOST=xlayer-state-db - - ZKEVM_NODE_POOL_DB_HOST=xlayer-pool-db - - ZKEVM_NODE_MTCLIENT_URI=${ZKEVM_NODE_MTCLIENT_URI:-} - - ZKEVM_NODE_EXECUTOR_URI=${ZKEVM_NODE_EXECUTOR_URI:-} - volumes: - - ./config/test.node2.config.toml:/app/config.toml - - ./config/test.genesis.config.json:/app/genesis.json - - ./:/datastreamer - command: - - "/bin/sh" - - "-c" - - "/app/xlayer-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components sequencer" - xlayer-sequencer-v1tov2: container_name: xlayer-sequencer-v1tov2 image: xlayer-node @@ -553,7 +532,7 @@ services: # - 50051:50051 # Prover - 50052:50052 # Mock prover volumes: - - ./config/test.prover2.config.json:/usr/src/app/config.json + - ./config/test.mock.prover.config.json:/usr/src/app/config.json command: > zkProver -c /usr/src/app/config.json @@ -564,7 +543,7 @@ services: # - 50051:50051 # Prover - 50252:50052 # Mock prover volumes: - - ./config/test.prover2.config.json:/usr/src/app/config.json + - ./config/test.mock.prover.config.json:/usr/src/app/config.json command: > zkProver -c /usr/src/app/config.json @@ -575,7 +554,7 @@ services: # - 50051:50051 # Prover - 50352:50052 # Mock prover volumes: - - ./config/test.prover2.config.json:/usr/src/app/config.json + - ./config/test.mock.prover.config.json:/usr/src/app/config.json command: > zkProver -c /usr/src/app/config.json @@ -586,7 +565,7 @@ services: # - 50051:50051 # Prover - 50452:50052 # Mock prover volumes: - - ./config/test.prover2.config.json:/usr/src/app/config.json + - ./config/test.mock.prover.config.json:/usr/src/app/config.json command: > zkProver -c /usr/src/app/config.json