From 33735bcca55f4a3d5d604c9c0ffcd800cbb9356a Mon Sep 17 00:00:00 2001 From: Barry Date: Tue, 19 Nov 2024 13:01:47 +0800 Subject: [PATCH] Add all components for private network (#173) --- test/Makefile | 24 ++- test/config/cdk.config.toml | 247 ++++++++++++------------ test/config/ds-config.toml | 4 + test/config/test.erigon.rpc.config.yaml | 2 +- test/docker-compose.yml | 41 ++-- test/e2e/smoke_test.go | 2 +- test/readme.md | 2 +- test/sql/init_event_db.sql | 14 -- test/sql/init_prover_db.sql | 15 -- test/sql/single_db_server.sql | 19 -- 10 files changed, 164 insertions(+), 206 deletions(-) create mode 100644 test/config/ds-config.toml delete mode 100644 test/sql/init_event_db.sql delete mode 100644 test/sql/init_prover_db.sql delete mode 100644 test/sql/single_db_server.sql diff --git a/test/Makefile b/test/Makefile index 3c3956f589e..888957f94fc 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,6 +1,5 @@ DOCKER_COMPOSE := docker compose -f docker-compose.yml DOCKER_STATELESS_EXECUTOR := xlayer-executor -DOCKER_STATE_DB := xlayer-state-db DOCKER_SEQ_SENDER := xlayer-seqs DOCKER_AGGREGATOR := xlayer-agg DOCKER_AGGREGATOR_DB := xlayer-agg-db @@ -20,9 +19,9 @@ DOCKER_DATA_AVAILABILITY_DB := xlayer-da-db DOCKER_POOL_DB := xlayer-pool-db DOCKER_POOL_MANAGER := xlayer-pool-manager DOCKER_SIGNER := xlayer-signer +DOCKER_DS := xlayer-ds RUN_DOCKER_STATELESS_EXECUTOR := $(DOCKER_COMPOSE) up -d $(DOCKER_STATELESS_EXECUTOR) -RUN_DOCKER_STATE_DB := $(DOCKER_COMPOSE) up -d $(DOCKER_STATE_DB) RUN_DOCKER_SEQ_SENDER := $(DOCKER_COMPOSE) up -d $(DOCKER_SEQ_SENDER) RUN_DOCKER_AGGREGATOR := $(DOCKER_COMPOSE) up -d $(DOCKER_AGGREGATOR) RUN_DOCKER_AGGREGATOR_DB := $(DOCKER_COMPOSE) up -d $(DOCKER_AGGREGATOR_DB) @@ -42,6 +41,7 @@ RUN_DOCKER_DATA_AVAILABILITY_DB := $(DOCKER_COMPOSE) up -d $(DOCKER_DATA_AVAILAB RUN_DOCKER_POOL_DB := $(DOCKER_COMPOSE) up -d $(DOCKER_POOL_DB) RUN_DOCKER_POOL_MANAGER := $(DOCKER_COMPOSE) up -d $(DOCKER_POOL_MANAGER) RUN_DOCKER_SIGNER := $(DOCKER_COMPOSE) up -d $(DOCKER_SIGNER) +RUN_DOCKER_DS := $(DOCKER_COMPOSE) up -d $(DOCKER_DS) STOP := $(DOCKER_COMPOSE) down --remove-orphans; rm -rf sqlite @@ -51,18 +51,18 @@ run: ## Runs a full node $(RUN_DOCKER_L1_NETWORK) $(RUN_DOCKER_DATA_AVAILABILITY_DB) $(RUN_DOCKER_POOL_DB) - $(RUN_DOCKER_STATE_DB) $(RUN_DOCKER_AGGREGATOR_DB) sleep 3 $(RUN_DOCKER_DATA_AVAILABILITY) $(RUN_DOCKER_APPROVE) + $(RUN_DOCKER_STATELESS_EXECUTOR) # app services - $(RUN_DOCKER_STATELESS_EXECUTOR) sleep 3 $(RUN_DOCKER_SEQ) $(RUN_DOCKER_PROVER) sleep 10 + $(RUN_DOCKER_DS) $(RUN_DOCKER_SIGNER) $(RUN_DOCKER_SEQ_SENDER) $(RUN_DOCKER_AGGREGATOR) @@ -75,7 +75,6 @@ all: ## Runs a full node $(RUN_DOCKER_L1_NETWORK) $(RUN_DOCKER_DATA_AVAILABILITY_DB) $(RUN_DOCKER_POOL_DB) - $(RUN_DOCKER_STATE_DB) $(RUN_DOCKER_AGGREGATOR_DB) $(RUN_DOCKER_BRIDGE_DB) $(RUN_DOCKER_BRIDGE_REDIS) @@ -83,13 +82,15 @@ all: ## Runs a full node $(RUN_DOCKER_BRIDGE_COIN_KAFKA) sleep 3 $(RUN_DOCKER_DATA_AVAILABILITY) + $(RUN_DOCKER_APPROVE) + $(RUN_DOCKER_STATELESS_EXECUTOR) # app services - #sleep 3 - #$(RUN_DOCKER_STATELESS_EXECUTOR) + sleep 3 $(RUN_DOCKER_SEQ) $(RUN_DOCKER_PROVER) sleep 10 + $(RUN_DOCKER_DS) $(RUN_DOCKER_SIGNER) $(RUN_DOCKER_SEQ_SENDER) $(RUN_DOCKER_AGGREGATOR) @@ -97,7 +98,7 @@ all: ## Runs a full node $(RUN_DOCKER_RPC) # bridge services - sleep 3 + sleep 30 $(RUN_DOCKER_BRIDGE_SERVICE) sleep 3 $(RUN_DOCKER_BRIDGE_UI) @@ -109,9 +110,12 @@ stop: ## Stops all services .PHONY: min-run min-run: ## Runs a minimal node $(RUN_DOCKER_L1_NETWORK) - sleep 3 + $(RUN_DOCKER_STATELESS_EXECUTOR) + sleep 10 $(RUN_DOCKER_SEQ) - sleep 20 + sleep 10 + $(RUN_DOCKER_DS) + sleep 10 $(RUN_DOCKER_RPC) diff --git a/test/config/cdk.config.toml b/test/config/cdk.config.toml index 33d2a7c67bc..2f26c9b80d8 100644 --- a/test/config/cdk.config.toml +++ b/test/config/cdk.config.toml @@ -6,6 +6,13 @@ Environment = "development" # "production" or "development" Level = "info" Outputs = ["stderr"] +[NetworkConfig.L1] +L1ChainID = 1337 +PolAddr = "0x5FbDB2315678afecb367f032d93F642f64180aa3" +ZkEVMAddr = "0xeb173087729c88a47568AF87b17C653039377BA6" +RollupManagerAddr = "0x2d42E2899662EFf08b13eeb65b154b904C7a1c8a" +GlobalExitRootManagerAddr = "0xB8cedD4B9eF683f0887C44a6E4312dC7A6e2fcdB" + [Etherman] URL="http://xlayer-mock-l1-network:8545" ForkIDChunkSize=100 @@ -49,7 +56,7 @@ GetBatchWaitInterval = "10s" ForcedGas = 0 GasPriceMarginFactor = 1 MaxGasPriceLimit = 0 - StoragePath = "ethtxmanager.sqlite" + StoragePath = "tmp/cdk/ethtxmanager.sqlite" ReadPendingL1Txs = false SafeStatusL1NumberOfBlocks = 0 FinalizedStatusL1NumberOfBlocks = 0 @@ -124,7 +131,7 @@ SyncModeOnlyEnabled = false Outputs = ["stderr"] [Aggregator.Synchronizer.SQLDB] DriverName = "sqlite3" - DataSource = "file:/tmp/cdk/aggregator_sync_db.sqlite" + DataSource = "/tmp/cdk/aggregator_sync_db.sqlite" [Aggregator.Synchronizer.Synchronizer] SyncInterval = "10s" SyncChunkSize = 1000 @@ -153,13 +160,14 @@ SyncModeOnlyEnabled = false NumRequests = 1000 Interval = "1s" [ReorgDetectorL1] -DBPath = "/tmp/cdk/reorgdetectorl1" +DBPath = "/tmp/cdk/reorg_detector_l1.sqlite" -[ReorgDetectorL2] -DBPath = "/tmp/cdk/reorgdetectorl2" +# Only for AGGORACLE, RPC, AGGSENDER +#[ReorgDetectorL2] +#DBPath = "/tmp/cdk/reorg_detector_l2.sqlite" [L1InfoTreeSync] -DBPath = "/tmp/cdk/L1InfoTreeSync.sqlite" +DBPath = "/tmp/cdk/l1_info_tree_sync.sqlite" GlobalExitRootAddr="0xB8cedD4B9eF683f0887C44a6E4312dC7A6e2fcdB" RollupManagerAddr = "0x2d42E2899662EFf08b13eeb65b154b904C7a1c8a" SyncBlockChunkSize=10 @@ -168,123 +176,122 @@ URLRPCL1="http://xlayer-rpc:8545" WaitForNewBlocksPeriod="100ms" InitialBlock= 353 -[AggOracle] -TargetChainType="EVM" -URLRPCL1="" -BlockFinality="FinalizedBlock" -WaitPeriodNextGER="100ms" - [AggOracle.EVMSender] - GlobalExitRootL2="0xa40d5f56745a118d0906a34e69aec8c0db1cb8fa" - URLRPCL2="" - ChainIDL2=195 - GasOffset=0 - WaitPeriodMonitorTx="100ms" - SenderAddr="0x70997970c51812dc3a010c7d01b50e0d17dc79c8" - [AggOracle.EVMSender.EthTxManager] - FrequencyToMonitorTxs = "1s" - WaitTxToBeMined = "2s" - GetReceiptMaxTime = "250ms" - GetReceiptWaitInterval = "1s" - PrivateKeys = [ - {Path = "/app/keystore/aggoracle.keystore", Password = "testonly"}, - ] - ForcedGas = 0 - GasPriceMarginFactor = 1 - MaxGasPriceLimit = 0 - StoragePath = "/tmp/cdk/ethtxmanager-sequencesender.sqlite" - ReadPendingL1Txs = false - SafeStatusL1NumberOfBlocks = 5 - FinalizedStatusL1NumberOfBlocks = 10 - [AggOracle.EVMSender.EthTxManager.Etherman] - URL = "http://xlayer-mock-l1-network:8545" - MultiGasProvider = false - L1ChainID = 1337 - HTTPHeaders = [] +# Only for AGGORACLE, RPC, AGGSENDER +#[AggOracle] +#TargetChainType="EVM" +#URLRPCL1="" +#BlockFinality="FinalizedBlock" +#WaitPeriodNextGER="100ms" +# [AggOracle.EVMSender] +# GlobalExitRootL2="0xa40d5f56745a118d0906a34e69aec8c0db1cb8fa" +# URLRPCL2="" +# ChainIDL2=195 +# GasOffset=0 +# WaitPeriodMonitorTx="100ms" +# SenderAddr="0x70997970c51812dc3a010c7d01b50e0d17dc79c8" +# [AggOracle.EVMSender.EthTxManager] +# FrequencyToMonitorTxs = "1s" +# WaitTxToBeMined = "2s" +# GetReceiptMaxTime = "250ms" +# GetReceiptWaitInterval = "1s" +# PrivateKeys = [ +# {Path = "/app/keystore/aggoracle.keystore", Password = "testonly"}, +# ] +# ForcedGas = 0 +# GasPriceMarginFactor = 1 +# MaxGasPriceLimit = 0 +# StoragePath = "/tmp/cdk/ethtxmanager-sequencesender.sqlite" +# ReadPendingL1Txs = false +# SafeStatusL1NumberOfBlocks = 5 +# FinalizedStatusL1NumberOfBlocks = 10 +# [AggOracle.EVMSender.EthTxManager.Etherman] +# URL = "http://xlayer-mock-l1-network:8545" +# MultiGasProvider = false +# L1ChainID = 1337 +# HTTPHeaders = [] -[RPC] -Host = "0.0.0.0" -Port = 5576 -ReadTimeout = "2s" -WriteTimeout = "2s" -MaxRequestsPerIPAndSecond = 10 - -[ClaimSponsor] -DBPath = "/tmp/cdk/claimsopnsor.sqlite" -Enabled = true -SenderAddr = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266" -BridgeAddrL2 = "0x3a277Fa4E78cc1266F32E26c467F99A8eAEfF7c3" -MaxGas = 200000 -RetryAfterErrorPeriod = "1s" -MaxRetryAttemptsAfterError = -1 -WaitTxToBeMinedPeriod = "3s" -WaitOnEmptyQueue = "3s" -GasOffset = 0 - [ClaimSponsor.EthTxManager] - FrequencyToMonitorTxs = "1s" - WaitTxToBeMined = "2s" - GetReceiptMaxTime = "250ms" - GetReceiptWaitInterval = "1s" - PrivateKeys = [ - {Path = "/app/keystore/claimsopnsor.keystore", Password = "testonly"}, - ] - ForcedGas = 0 - GasPriceMarginFactor = 1 - MaxGasPriceLimit = 0 - StoragePath = "/tmp/cdk/ethtxmanager-claimsponsor.sqlite" - ReadPendingL1Txs = false - SafeStatusL1NumberOfBlocks = 5 - FinalizedStatusL1NumberOfBlocks = 10 - [ClaimSponsor.EthTxManager.Etherman] - URL = "http://xlayer-mock-l1-network:8545" - MultiGasProvider = false - L1ChainID = 1337 - HTTPHeaders = [] +# Only for RPC +#[RPC] +#Host = "0.0.0.0" +#Port = 5576 +#ReadTimeout = "2s" +#WriteTimeout = "2s" +#MaxRequestsPerIPAndSecond = 10 -[BridgeL1Sync] -DBPath = "/tmp/cdk/bridgel1sync.sqlite" -BlockFinality = "LatestBlock" -InitialBlockNum = 0 -BridgeAddr = "0x3a277Fa4E78cc1266F32E26c467F99A8eAEfF7c3" -SyncBlockChunkSize = 100 -RetryAfterErrorPeriod = "1s" -MaxRetryAttemptsAfterError = -1 -WaitForNewBlocksPeriod = "3s" -OriginNetwork=0 +# Only for RPC +#[ClaimSponsor] +#DBPath = "/tmp/cdk/claimsopnsor.sqlite" +#Enabled = true +#SenderAddr = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266" +#BridgeAddrL2 = "0x3a277Fa4E78cc1266F32E26c467F99A8eAEfF7c3" +#MaxGas = 200000 +#RetryAfterErrorPeriod = "1s" +#MaxRetryAttemptsAfterError = -1 +#WaitTxToBeMinedPeriod = "3s" +#WaitOnEmptyQueue = "3s" +#GasOffset = 0 +# [ClaimSponsor.EthTxManager] +# FrequencyToMonitorTxs = "1s" +# WaitTxToBeMined = "2s" +# GetReceiptMaxTime = "250ms" +# GetReceiptWaitInterval = "1s" +# PrivateKeys = [ +# {Path = "/app/keystore/claimsopnsor.keystore", Password = "testonly"}, +# ] +# ForcedGas = 0 +# GasPriceMarginFactor = 1 +# MaxGasPriceLimit = 0 +# StoragePath = "/tmp/cdk/ethtxmanager-claimsponsor.sqlite" +# ReadPendingL1Txs = false +# SafeStatusL1NumberOfBlocks = 5 +# FinalizedStatusL1NumberOfBlocks = 10 +# [ClaimSponsor.EthTxManager.Etherman] +# URL = "http://xlayer-mock-l1-network:8545" +# MultiGasProvider = false +# L1ChainID = 1337 +# HTTPHeaders = [] -[BridgeL2Sync] -DBPath = "/tmp/cdk/bridgel2sync.sqlite" -BlockFinality = "LatestBlock" -InitialBlockNum = 0 -BridgeAddr = "0x3a277Fa4E78cc1266F32E26c467F99A8eAEfF7c3" -SyncBlockChunkSize = 100 -RetryAfterErrorPeriod = "1s" -MaxRetryAttemptsAfterError = -1 -WaitForNewBlocksPeriod = "3s" -OriginNetwork=1 +# Only for RPC +#[BridgeL1Sync] +#DBPath = "/tmp/cdk/bridgel1sync.sqlite" +#BlockFinality = "LatestBlock" +#InitialBlockNum = 0 +#BridgeAddr = "0x3a277Fa4E78cc1266F32E26c467F99A8eAEfF7c3" +#SyncBlockChunkSize = 100 +#RetryAfterErrorPeriod = "1s" +#MaxRetryAttemptsAfterError = -1 +#WaitForNewBlocksPeriod = "3s" +#OriginNetwork=0 -[LastGERSync] -# MDBX database path -DBPath = "/tmp/cdk/lastgersync.sqlite" -BlockFinality = "LatestBlock" -InitialBlockNum = 0 -GlobalExitRootL2Addr = "0xa40d5f56745a118d0906a34e69aec8c0db1cb8fa" -RetryAfterErrorPeriod = "1s" -MaxRetryAttemptsAfterError = -1 -WaitForNewBlocksPeriod = "1s" -DownloadBufferSize = 100 +# For RPC and aggsender +#[BridgeL2Sync] +#DBPath = "/tmp/cdk/bridgel2sync.sqlite" +#BlockFinality = "LatestBlock" +#InitialBlockNum = 0 +#BridgeAddr = "0x3a277Fa4E78cc1266F32E26c467F99A8eAEfF7c3" +#SyncBlockChunkSize = 100 +#RetryAfterErrorPeriod = "1s" +#MaxRetryAttemptsAfterError = -1 +#WaitForNewBlocksPeriod = "3s" +#OriginNetwork=1 -[NetworkConfig.L1] -L1ChainID = 1337 -PolAddr = "0x5FbDB2315678afecb367f032d93F642f64180aa3" -ZkEVMAddr = "0xeb173087729c88a47568AF87b17C653039377BA6" -RollupManagerAddr = "0x2d42E2899662EFf08b13eeb65b154b904C7a1c8a" -GlobalExitRootManagerAddr = "0xB8cedD4B9eF683f0887C44a6E4312dC7A6e2fcdB" +# Only for RPC +#[LastGERSync] +## MDBX database path +#DBPath = "/tmp/cdk/lastgersync.sqlite" +#BlockFinality = "LatestBlock" +#InitialBlockNum = 0 +#GlobalExitRootL2Addr = "0xa40d5f56745a118d0906a34e69aec8c0db1cb8fa" +#RetryAfterErrorPeriod = "1s" +#MaxRetryAttemptsAfterError = -1 +#WaitForNewBlocksPeriod = "1s" +#DownloadBufferSize = 100 -[AggSender] -StoragePath = "/tmp/cdk/aggsender.sqlite" -AggLayerURL = "" -AggsenderPrivateKey = {Path = "/pk/sequencer.keystore", Password = "testonly"} -BlockGetInterval = "2s" -URLRPCL2="http://xlayer-rpc:8545" -CheckSettledInterval = "2s" -SaveCertificatesToFiles = false +#[AggSender] +#StoragePath = "/tmp/cdk/aggsender.sqlite" +#AggLayerURL = "" +#AggsenderPrivateKey = {Path = "/pk/sequencer.keystore", Password = "testonly"} +#BlockGetInterval = "2s" +#URLRPCL2="http://xlayer-rpc:8545" +#CheckSettledInterval = "2s" +#SaveCertificatesToFiles = false diff --git a/test/config/ds-config.toml b/test/config/ds-config.toml new file mode 100644 index 00000000000..44615d44bf9 --- /dev/null +++ b/test/config/ds-config.toml @@ -0,0 +1,4 @@ +Server = "xlayer-seq:6900" +Port = 7900 +File = "/home/dsrelay/datarelay.bin" +Log = "info" \ No newline at end of file diff --git a/test/config/test.erigon.rpc.config.yaml b/test/config/test.erigon.rpc.config.yaml index 326a278b71b..147e8a6680d 100644 --- a/test/config/test.erigon.rpc.config.yaml +++ b/test/config/test.erigon.rpc.config.yaml @@ -4,7 +4,7 @@ http: true private.api.addr: localhost:9091 zkevm.l2-chain-id: 195 zkevm.l2-sequencer-rpc-url: http://xlayer-seq:8545 -zkevm.l2-datastreamer-url: xlayer-seq:6900 +zkevm.l2-datastreamer-url: xlayer-ds:7900 zkevm.l1-chain-id: 1337 zkevm.l1-rpc-url: http://xlayer-mock-l1-network:8545 diff --git a/test/docker-compose.yml b/test/docker-compose.yml index 411f6e53b50..983b54ac5e0 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -17,28 +17,6 @@ services: command: > zkProver -c /usr/src/app/config.json - xlayer-state-db: - container_name: xlayer-state-db - image: postgres - ports: - - 5432:5432 - volumes: - - ./sql/init_prover_db.sql:/docker-entrypoint-initdb.d/init.sql - environment: - - POSTGRES_USER=state_user - - POSTGRES_PASSWORD=state_password - - POSTGRES_DB=state_db - command: - - "postgres" - - "-N" - - "500" - healthcheck: - test: ["CMD-SHELL", "pg_isready -U state_user -d state_db"] - interval: 5s - timeout: 5s - retries: 5 - start_period: 5s - xlayer-seqs: container_name: xlayer-seqs image: zjg555543/cdk:v0.4.0-beta10 @@ -104,9 +82,6 @@ services: - ./config/test.prover.config.json:/usr/src/app/config.json command: > zkProver -c /usr/src/app/config.json - depends_on: - xlayer-state-db: - condition: service_healthy xlayer-approve: container_name: xlayer-approve @@ -360,3 +335,19 @@ services: - "/bin/sh" - "-c" - "/app/xlayer-signer http -cfg /app/config.toml" + + xlayer-ds: + container_name: xlayer-ds + build: + context: . + dockerfile: Dockerfile + restart: unless-stopped + image: zjg555543/xlayer-ds:basedev-merge-upstream-v0.2.7 + ports: + - 7900:7900 + volumes: + - ./config/ds-config.toml:/app/config.toml + command: + - "/bin/sh" + - "-c" + - "/app/dsrelay --cfg /app/config.toml" diff --git a/test/e2e/smoke_test.go b/test/e2e/smoke_test.go index 66bc4b76bf4..c97887161bc 100644 --- a/test/e2e/smoke_test.go +++ b/test/e2e/smoke_test.go @@ -44,7 +44,7 @@ func TestGetBatchSealTime(t *testing.T) { batchSealTime, err = operations.GetBatchSealTime(new(big.Int).SetUint64(batchNum)) require.Equal(t, batchSealTime, uint64(0)) log.Infof("Batch number: %d, times:%v", batchNum, i) - if batchNum > 0 { + if batchNum > 1 { break } time.Sleep(1 * time.Second) diff --git a/test/readme.md b/test/readme.md index 5849484e6bc..eb07c7d6dd9 100644 --- a/test/readme.md +++ b/test/readme.md @@ -26,7 +26,7 @@ make all; http://127.0.0.1:8090/ L1 OKB Token: 0x5FbDB2315678afecb367f032d93F642f64180aa3 -L2 WETH Token: 0x5d7AF92af4FF5a35323250D6ee174C23CCBe00EF +L2 WETH Token: 0x17a2a2e444a7f3446877d1b71eaa2b2ae7533baf L2 admin: 0x8f8E2d6cF621f30e9a11309D6A56A876281Fd534 ``` diff --git a/test/sql/init_event_db.sql b/test/sql/init_event_db.sql deleted file mode 100644 index c45a6ba1c0b..00000000000 --- a/test/sql/init_event_db.sql +++ /dev/null @@ -1,14 +0,0 @@ -CREATE TYPE level_t AS ENUM ('emerg', 'alert', 'crit', 'err', 'warning', 'notice', 'info', 'debug'); - -CREATE TABLE public.event ( - id BIGSERIAL PRIMARY KEY, - received_at timestamp WITH TIME ZONE default CURRENT_TIMESTAMP, - ip_address inet, - source varchar(32) not null, - component varchar(32), - level level_t not null, - event_id varchar(32) not null, - description text, - data bytea, - json jsonb -); diff --git a/test/sql/init_prover_db.sql b/test/sql/init_prover_db.sql deleted file mode 100644 index a4f8616c35c..00000000000 --- a/test/sql/init_prover_db.sql +++ /dev/null @@ -1,15 +0,0 @@ -CREATE DATABASE prover_db; -\connect prover_db; - -CREATE SCHEMA state; - -CREATE TABLE state.nodes (hash BYTEA PRIMARY KEY, data BYTEA NOT NULL); -CREATE TABLE state.program (hash BYTEA PRIMARY KEY, data BYTEA NOT NULL); - -CREATE USER prover_user with password 'prover_pass'; -ALTER DATABASE prover_db OWNER TO prover_user; -ALTER SCHEMA state OWNER TO prover_user; -ALTER SCHEMA public OWNER TO prover_user; -ALTER TABLE state.nodes OWNER TO prover_user; -ALTER TABLE state.program OWNER TO prover_user; -ALTER USER prover_user SET SEARCH_PATH=state; diff --git a/test/sql/single_db_server.sql b/test/sql/single_db_server.sql deleted file mode 100644 index 008bbb4c056..00000000000 --- a/test/sql/single_db_server.sql +++ /dev/null @@ -1,19 +0,0 @@ -CREATE DATABASE state_db; -CREATE DATABASE pool_db; -CREATE DATABASE rpc_db; - -CREATE DATABASE prover_db; -\connect prover_db; - -CREATE SCHEMA state; - -CREATE TABLE state.nodes (hash BYTEA PRIMARY KEY, data BYTEA NOT NULL); -CREATE TABLE state.program (hash BYTEA PRIMARY KEY, data BYTEA NOT NULL); - -CREATE USER prover_user with password 'prover_pass'; -ALTER DATABASE prover_db OWNER TO prover_user; -ALTER SCHEMA state OWNER TO prover_user; -ALTER SCHEMA public OWNER TO prover_user; -ALTER TABLE state.nodes OWNER TO prover_user; -ALTER TABLE state.program OWNER TO prover_user; -ALTER USER prover_user SET SEARCH_PATH=state;