From a0d8263f7d2bee159c0878a54bb71a1cb43fd0aa Mon Sep 17 00:00:00 2001 From: Rakan Al-Huneiti Date: Wed, 26 Jun 2024 11:59:54 +0300 Subject: [PATCH] Reorganize repo (#779) * Move to resources * Move hive * Update config paths * Move genesis files * Update Hive build * Rename constants crate to primitives * Update storage & DA db path * Update integration tests genesis path * Fix tests * Fix clean-node * Expect instead of unwrap for start_rollup * Move genesis files * Fix genesis paths * Fix path of integration test files * Fix constant import * Create an empty resources/dbs directory --- .dockerignore | 5 +- .github/workflows/checks.yml | 18 ++-- .github/workflows/docker_hive.yml | 2 +- .gitignore | 8 +- Cargo.lock | 10 +-- Cargo.toml | 2 +- Makefile | 9 +- README.md | 4 +- bin/citrea/Cargo.toml | 2 +- .../provers/risc0/guest-bitcoin/Cargo.lock | 10 +-- .../provers/risc0/guest-bitcoin/Cargo.toml | 2 +- .../risc0/guest-bitcoin/src/bin/bitcoin_da.rs | 2 +- bin/citrea/src/main.rs | 8 +- bin/citrea/src/rollup/bitcoin.rs | 2 +- bin/citrea/tests/all_tests.rs | 1 + bin/citrea/tests/e2e/mod.rs | 84 +++++++++--------- bin/citrea/tests/evm/archival_state.rs | 7 +- bin/citrea/tests/evm/gas_price.rs | 7 +- bin/citrea/tests/evm/mod.rs | 13 +-- bin/citrea/tests/evm/tracing.rs | 7 +- bin/citrea/tests/mempool/mod.rs | 7 +- bin/citrea/tests/sequencer_commitments/mod.rs | 16 ++-- .../soft_confirmation_rule_enforcer/mod.rs | 2 +- bin/citrea/tests/test_helpers/mod.rs | 2 +- .../primitives}/Cargo.toml | 2 +- .../primitives}/README.md | 0 .../primitives/src/constants.rs | 0 crates/primitives/src/lib.rs | 3 + .../examples/demo-stf/src/tests/mod.rs | 2 +- docker-compose.postgres.yml | 2 +- docker-compose.yml | 4 +- docs/run.md | 10 +-- {assets => resources/assets}/banner.png | Bin .../bitcoin-regtest/prover_config.toml | 0 .../bitcoin-regtest/prover_rollup_config.toml | 2 +- .../bitcoin-regtest/rollup_config.toml | 2 +- .../bitcoin-regtest/sequencer_config.toml | 0 .../sequencer_rollup_config.toml | 2 +- .../configs}/devnet/rollup_config.toml | 2 +- .../mock-dockerized/publish_da_block.sh | 0 .../mock-dockerized/rollup_config.toml | 4 +- .../mock-dockerized/sequencer_config.toml | 0 .../configs}/mock/prover_config.toml | 0 .../configs}/mock/rollup_config.toml | 4 +- .../configs}/mock/sequencer_config.toml | 0 .../mock/sequencer_rollup_config.toml | 4 +- resources/dbs/.gitkeep | 0 .../genesis}/bitcoin-regtest/accounts.json | 0 .../genesis/bitcoin-regtest}/evm.json | 0 .../soft_confirmation_rule_enforcer.json | 0 .../genesis/devnet}/accounts.json | 0 .../genesis/devnet}/evm.json | 0 .../soft_confirmation_rule_enforcer.json | 0 .../genesis/mock-dockerized}/accounts.json | 0 .../genesis/mock-dockerized}/evm.json | 0 .../soft_confirmation_rule_enforcer.json | 0 .../genesis/mock}/accounts.json | 0 .../genesis/mock}/evm.json | 0 .../soft_confirmation_rule_enforcer.json | 0 {hive => resources/hive}/.dockerignore | 0 {hive => resources/hive}/Dockerfile | 2 +- {hive => resources/hive}/genesis.hive.json | 0 .../hive}/hive_publish_block.sh | 0 .../demo-tests/bitcoin-regtest}/accounts.json | 0 .../demo-tests/bitcoin-regtest/evm.json | 0 .../soft_confirmation_rule_enforcer.json | 0 .../test-data/demo-tests/mock}/accounts.json | 0 .../test-data/demo-tests/mock}/evm.json | 0 .../soft_confirmation_rule_enforcer.json | 0 .../accounts.json | 0 .../evm.json | 0 .../soft_confirmation_rule_enforcer.json | 0 .../accounts.json | 0 .../evm.json | 0 .../soft_confirmation_rule_enforcer.json | 0 .../integration-tests}/accounts.json | 0 .../test-data}/integration-tests/evm.json | 0 .../soft_confirmation_rule_enforcer.json | 0 test-da-dbs/.gitignore | 1 - 79 files changed, 147 insertions(+), 129 deletions(-) rename {bin/rollup-constants => crates/primitives}/Cargo.toml (84%) rename {bin/rollup-constants => crates/primitives}/README.md (100%) rename bin/rollup-constants/src/lib.rs => crates/primitives/src/constants.rs (100%) create mode 100644 crates/primitives/src/lib.rs rename {assets => resources/assets}/banner.png (100%) rename {configs => resources/configs}/bitcoin-regtest/prover_config.toml (100%) rename {configs => resources/configs}/bitcoin-regtest/prover_rollup_config.toml (95%) rename {configs => resources/configs}/bitcoin-regtest/rollup_config.toml (94%) rename {configs => resources/configs}/bitcoin-regtest/sequencer_config.toml (100%) rename {configs => resources/configs}/bitcoin-regtest/sequencer_rollup_config.toml (94%) rename {configs => resources/configs}/devnet/rollup_config.toml (95%) rename {configs => resources/configs}/mock-dockerized/publish_da_block.sh (100%) rename {configs => resources/configs}/mock-dockerized/rollup_config.toml (89%) rename {configs => resources/configs}/mock-dockerized/sequencer_config.toml (100%) rename {configs => resources/configs}/mock/prover_config.toml (100%) rename {configs => resources/configs}/mock/rollup_config.toml (89%) rename {configs => resources/configs}/mock/sequencer_config.toml (100%) rename {configs => resources/configs}/mock/sequencer_rollup_config.toml (88%) create mode 100644 resources/dbs/.gitkeep rename {bin/test-data/genesis/demo-tests => resources/genesis}/bitcoin-regtest/accounts.json (100%) rename {bin/test-data/genesis/demo-tests/mock => resources/genesis/bitcoin-regtest}/evm.json (100%) rename {bin/test-data/genesis/demo-tests => resources/genesis}/bitcoin-regtest/soft_confirmation_rule_enforcer.json (100%) rename {bin/test-data/genesis/demo-tests/mock => resources/genesis/devnet}/accounts.json (100%) rename {configs/devnet/genesis-files => resources/genesis/devnet}/evm.json (100%) rename {configs/devnet/genesis-files => resources/genesis/devnet}/soft_confirmation_rule_enforcer.json (100%) rename {bin/test-data/genesis/integration-tests-low-block-gas-limit => resources/genesis/mock-dockerized}/accounts.json (100%) rename {configs/mock-dockerized/genesis-files => resources/genesis/mock-dockerized}/evm.json (100%) rename {bin/test-data/genesis/demo-tests/mock => resources/genesis/mock-dockerized}/soft_confirmation_rule_enforcer.json (100%) rename {bin/test-data/genesis/integration-tests-low-max-l2-blocks-per-l1 => resources/genesis/mock}/accounts.json (100%) rename {configs/bitcoin-regtest/genesis-files => resources/genesis/mock}/evm.json (100%) rename {bin/test-data/genesis/integration-tests-low-block-gas-limit => resources/genesis/mock}/soft_confirmation_rule_enforcer.json (100%) rename {hive => resources/hive}/.dockerignore (100%) rename {hive => resources/hive}/Dockerfile (55%) rename {hive => resources/hive}/genesis.hive.json (100%) rename {hive => resources/hive}/hive_publish_block.sh (100%) rename {bin/test-data/genesis/integration-tests => resources/test-data/demo-tests/bitcoin-regtest}/accounts.json (100%) rename {bin/test-data/genesis => resources/test-data}/demo-tests/bitcoin-regtest/evm.json (100%) rename {configs/bitcoin-regtest/genesis-files => resources/test-data/demo-tests/bitcoin-regtest}/soft_confirmation_rule_enforcer.json (100%) rename {configs/bitcoin-regtest/genesis-files => resources/test-data/demo-tests/mock}/accounts.json (100%) rename {configs/mock/genesis-files => resources/test-data/demo-tests/mock}/evm.json (100%) rename {configs/mock-dockerized/genesis-files => resources/test-data/demo-tests/mock}/soft_confirmation_rule_enforcer.json (100%) rename {configs/devnet/genesis-files => resources/test-data/integration-tests-low-block-gas-limit}/accounts.json (100%) rename {bin/test-data/genesis => resources/test-data}/integration-tests-low-block-gas-limit/evm.json (100%) rename {configs/mock/genesis-files => resources/test-data/integration-tests-low-block-gas-limit}/soft_confirmation_rule_enforcer.json (100%) rename {configs/mock-dockerized/genesis-files => resources/test-data/integration-tests-low-max-l2-blocks-per-l1}/accounts.json (100%) rename {bin/test-data/genesis => resources/test-data}/integration-tests-low-max-l2-blocks-per-l1/evm.json (100%) rename {bin/test-data/genesis => resources/test-data}/integration-tests-low-max-l2-blocks-per-l1/soft_confirmation_rule_enforcer.json (100%) rename {configs/mock/genesis-files => resources/test-data/integration-tests}/accounts.json (100%) rename {bin/test-data/genesis => resources/test-data}/integration-tests/evm.json (100%) rename {bin/test-data/genesis => resources/test-data}/integration-tests/soft_confirmation_rule_enforcer.json (100%) delete mode 100644 test-da-dbs/.gitignore diff --git a/.dockerignore b/.dockerignore index 2a46626cf..58f2c33fa 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,10 +3,9 @@ # include source files !/bin -!/configs +!/resources/configs !/crates -!/hive -!/test-da-dbs +!/resources/hive !Cargo.lock !Cargo.toml !deny.toml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index b29cdf771..fa983925b 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -221,11 +221,11 @@ jobs: run: npm install - name: Run uniswap tests run: | - RUST_LOG=off ./target/debug/citrea --da-layer mock --rollup-config-path configs/mock/sequencer_rollup_config.toml --sequencer-config-path configs/mock/sequencer_config.toml --genesis-paths configs/mock/genesis-files & + RUST_LOG=off ./target/debug/citrea --da-layer mock --rollup-config-path resources/configs/mock/sequencer_rollup_config.toml --sequencer-config-path resources/configs/mock/sequencer_config.toml --genesis-paths resources/genesis/mock/ & sleep 2 - RUST_LOG=off ./target/debug/citrea --rollup-config-path configs/mock/rollup_config.toml --genesis-paths configs/mock/genesis-files & + RUST_LOG=off ./target/debug/citrea --rollup-config-path resources/configs/mock/rollup_config.toml --genesis-paths resources/genesis/mock/ & sleep 2 - ./configs/mock-dockerized/publish_da_block.sh & + ./resources/configs/mock-dockerized/publish_da_block.sh & cd ./bin/citrea/tests/evm/uniswap npx hardhat run --network citrea scripts/01_deploy.js npx hardhat run --network citrea scripts/02_swap.js @@ -270,11 +270,11 @@ jobs: run: pip install -r requirements.txt - name: Run web3.py tests run: | - RUST_LOG=off ./target/debug/citrea --da-layer mock --rollup-config-path configs/mock/sequencer_rollup_config.toml --sequencer-config-path configs/mock/sequencer_config.toml --genesis-paths configs/mock/genesis-files & + RUST_LOG=off ./target/debug/citrea --da-layer mock --rollup-config-path resources/configs/mock/sequencer_rollup_config.toml --sequencer-config-path resources/configs/mock/sequencer_config.toml --genesis-paths resources/genesis/mock/ & sleep 2 - RUST_LOG=off ./target/debug/citrea --rollup-config-path configs/mock/rollup_config.toml --genesis-paths configs/mock/genesis-files & + RUST_LOG=off ./target/debug/citrea --rollup-config-path resources/configs/mock/rollup_config.toml --genesis-paths resources/genesis/mock/ & sleep 2 - ./configs/mock-dockerized/publish_da_block.sh & + ./resources/configs/mock-dockerized/publish_da_block.sh & cd ./bin/citrea/tests/evm/web3_py python test.py @@ -305,11 +305,11 @@ jobs: run: npm install - name: Run ethers_js tests run: | - RUST_LOG=off ./target/debug/citrea --da-layer mock --rollup-config-path configs/mock/sequencer_rollup_config.toml --sequencer-config-path configs/mock/sequencer_config.toml --genesis-paths configs/mock/genesis-files & + RUST_LOG=off ./target/debug/citrea --da-layer mock --rollup-config-path resources/configs/mock/sequencer_rollup_config.toml --sequencer-config-path resources/configs/mock/sequencer_config.toml --genesis-paths resources/genesis/mock/ & sleep 2 - RUST_LOG=off ./target/debug/citrea --rollup-config-path configs/mock/rollup_config.toml --genesis-paths configs/mock/genesis-files & + RUST_LOG=off ./target/debug/citrea --rollup-config-path resources/configs/mock/rollup_config.toml --genesis-paths resources/genesis/mock/ & sleep 2 - ./configs/mock-dockerized/publish_da_block.sh & + ./resources/configs/mock-dockerized/publish_da_block.sh & cd ./bin/citrea/tests/evm/ethers_js npx mocha test.js diff --git a/.github/workflows/docker_hive.yml b/.github/workflows/docker_hive.yml index fc2c43544..4aea8b0d5 100644 --- a/.github/workflows/docker_hive.yml +++ b/.github/workflows/docker_hive.yml @@ -35,6 +35,6 @@ jobs: uses: docker/build-push-action@v5.3.0 with: context: . - file: ./hive/Dockerfile + file: ./resources/hive/Dockerfile push: true tags: ${{ secrets.DOCKERHUB_USERNAME }}/citrea:latest diff --git a/.gitignore b/.gitignore index cc847937e..317183248 100644 --- a/.gitignore +++ b/.gitignore @@ -10,9 +10,9 @@ fuzz/Cargo.lock .DS_Store demo_data/ -sequencer-db/ -full-node-db/ -prover-db/ +resources/dbs/sequencer-db/ +resources/dbs/full-node-db/ +resources/dbs/prover-db/ /.vscode/* /docker/credentials/* @@ -22,5 +22,3 @@ prover-db/ adapters/solana/libyellowstone_grpc_geyser.dylib adapters/bitcoin/reveal_*.tx - -data diff --git a/Cargo.lock b/Cargo.lock index cf384a96e..17ee5c388 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1796,6 +1796,7 @@ dependencies = [ "borsh", "citrea-evm", "citrea-fullnode", + "citrea-primitives", "citrea-prover", "citrea-risc0-bonsai-adapter", "citrea-sequencer", @@ -1815,7 +1816,6 @@ dependencies = [ "reth-transaction-pool", "revm", "risc0", - "rollup-constants", "rs_merkle", "rustc_version_runtime", "secp256k1", @@ -1908,6 +1908,10 @@ dependencies = [ "tracing", ] +[[package]] +name = "citrea-primitives" +version = "0.4.0-rc.3" + [[package]] name = "citrea-prover" version = "0.4.0-rc.3" @@ -7674,10 +7678,6 @@ dependencies = [ "chrono", ] -[[package]] -name = "rollup-constants" -version = "0.4.0-rc.3" - [[package]] name = "route-recognizer" version = "0.3.1" diff --git a/Cargo.toml b/Cargo.toml index 2888bbdf4..54f3cd4d0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ resolver = "2" members = [ # Citrea "bin/citrea", - "bin/rollup-constants", + "crates/primitives", "crates/bitcoin-da", "crates/evm", "crates/ethereum-rpc", diff --git a/Makefile b/Makefile index 08b2ef632..be19d6721 100644 --- a/Makefile +++ b/Makefile @@ -17,11 +17,10 @@ clean: ## Cleans compiled @cargo clean clean-node: ## Cleans local dbs needed for sequencer and nodes - sudo rm -rf data/postgres - rm -rf sequencer-db - rm -rf prover-db - rm -rf full-node-db - rm test-da-dbs/*.db + sudo rm -rf resources/dbs/postgres + rm -rf resources/dbs/sequencer-db + rm -rf resources/dbs/prover-db + rm -rf resources/dbs/full-node-db test-legacy: ## Runs test suite with output from tests printed @cargo test -- --nocapture -Zunstable-options --report-time diff --git a/README.md b/README.md index cacbef1a0..ebbe9f020 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **The first rollup that enhances the capabilities of Bitcoin blockspace with zero-knowledge technology, now [live on Devnet](https://www.blog.citrea.xyz/citrea-public-devnet-live/)! 🎉🍊🍋** -![](assets/banner.png) +![](resources/assets/banner.png) > [!WARNING] > Citrea is still work-in-progress as a public devnet. While it's launched as a public devnet (on top of a custom Bitcoin Signet), it has not been audited and many features are under heavy development. Citrea's proper integration with [Bitcoin](https://github.com/bitcoin/bitcoin) and [Clementine](https://github.com/chainwayxyz/clementine) is still ongoing. \ @@ -40,4 +40,4 @@ Citrea's vision is to build scalable infrastructure that advances Bitcoin into i ## Acknowledgments - [Sovereign SDK](https://github.com/Sovereign-Labs/sovereign-sdk): Citrea is built on a forked version of the Sovereign SDK. We're deeply thankful to the development & support of Sovereign Labs through our journey. -- [Reth](https://github.com/paradigmxyz/reth): We use Reth crates in various components in Citrea. We're grateful for their rapid development & contribution to the Rust-Ethereum ecosystem. \ No newline at end of file +- [Reth](https://github.com/paradigmxyz/reth): We use Reth crates in various components in Citrea. We're grateful for their rapid development & contribution to the Rust-Ethereum ecosystem. diff --git a/bin/citrea/Cargo.toml b/bin/citrea/Cargo.toml index f579f2bcb..12f470828 100644 --- a/bin/citrea/Cargo.toml +++ b/bin/citrea/Cargo.toml @@ -15,11 +15,11 @@ resolver = "2" # Citrea deps bitcoin-da = { path = "../../crates/bitcoin-da", features = ["native"] } citrea-fullnode = { path = "../../crates/fullnode" } +citrea-primitives = { path = "../../crates/primitives" } citrea-prover = { path = "../../crates/prover" } citrea-sequencer = { path = "../../crates/sequencer" } citrea-stf = { path = "../../crates/citrea-stf", features = ["native"] } ethereum-rpc = { path = "../../crates/ethereum-rpc" } -rollup-constants = { path = "../rollup-constants" } sequencer-client = { path = "../../crates/sequencer-client" } # Sovereign-SDK deps diff --git a/bin/citrea/provers/risc0/guest-bitcoin/Cargo.lock b/bin/citrea/provers/risc0/guest-bitcoin/Cargo.lock index b744d0b4b..4c158a1be 100644 --- a/bin/citrea/provers/risc0/guest-bitcoin/Cargo.lock +++ b/bin/citrea/provers/risc0/guest-bitcoin/Cargo.lock @@ -886,11 +886,11 @@ dependencies = [ "alloy-trie", "anyhow", "bitcoin-da", + "citrea-primitives", "citrea-stf", "reth-primitives", "risc0-zkvm", "risc0-zkvm-platform", - "rollup-constants", "sov-modules-api", "sov-modules-stf-blueprint", "sov-risc0-adapter", @@ -915,6 +915,10 @@ dependencies = [ "thiserror", ] +[[package]] +name = "citrea-primitives" +version = "0.4.0-rc.3" + [[package]] name = "citrea-stf" version = "0.4.0-rc.3" @@ -2601,10 +2605,6 @@ dependencies = [ "byteorder", ] -[[package]] -name = "rollup-constants" -version = "0.4.0-rc.3" - [[package]] name = "rrs-lib" version = "0.1.0" diff --git a/bin/citrea/provers/risc0/guest-bitcoin/Cargo.toml b/bin/citrea/provers/risc0/guest-bitcoin/Cargo.toml index 9c0d7a348..4257b612f 100644 --- a/bin/citrea/provers/risc0/guest-bitcoin/Cargo.toml +++ b/bin/citrea/provers/risc0/guest-bitcoin/Cargo.toml @@ -17,8 +17,8 @@ risc0-zkvm-platform = { version = "0.21" } anyhow = "1.0.68" bitcoin-da = { path = "../../../../../crates/bitcoin-da", default-features = false } +citrea-primitives = { path = "../../../../../crates/primitives" } citrea-stf = { path = "../../../../../crates/citrea-stf" } -rollup-constants = { path = "../../../../rollup-constants" } sov-modules-api = { path = "../../../../../crates/sovereign-sdk/module-system/sov-modules-api", default-features = false } sov-modules-stf-blueprint = { path = "../../../../../crates/sovereign-sdk/module-system/sov-modules-stf-blueprint" } sov-risc0-adapter = { path = "../../../../../crates/sovereign-sdk/adapters/risc0" } diff --git a/bin/citrea/provers/risc0/guest-bitcoin/src/bin/bitcoin_da.rs b/bin/citrea/provers/risc0/guest-bitcoin/src/bin/bitcoin_da.rs index 9f31bb29a..5ad2b19df 100644 --- a/bin/citrea/provers/risc0/guest-bitcoin/src/bin/bitcoin_da.rs +++ b/bin/citrea/provers/risc0/guest-bitcoin/src/bin/bitcoin_da.rs @@ -2,11 +2,11 @@ use bitcoin_da::spec::RollupParams; use bitcoin_da::verifier::BitcoinVerifier; +use citrea_primitives::{DA_TX_ID_LEADING_ZEROS, ROLLUP_NAME}; use citrea_stf::runtime::Runtime; use citrea_stf::StfVerifier; #[cfg(feature = "bench")] use risc0_zkvm::guest::env; -use rollup_constants::{DA_TX_ID_LEADING_ZEROS, ROLLUP_NAME}; use sov_modules_api::default_context::ZkDefaultContext; use sov_modules_stf_blueprint::StfBlueprint; use sov_risc0_adapter::guest::Risc0Guest; diff --git a/bin/citrea/src/main.rs b/bin/citrea/src/main.rs index fa5d9a8de..ba9347f5f 100644 --- a/bin/citrea/src/main.rs +++ b/bin/citrea/src/main.rs @@ -33,7 +33,7 @@ struct Args { da_layer: SupportedDaLayer, /// The path to the rollup config. - #[arg(long, default_value = "configs/mock/rollup_config.toml")] + #[arg(long, default_value = "resources/configs/mock/rollup_config.toml")] rollup_config_path: String, /// The path to the sequencer config. If set, runs the node in sequencer mode, otherwise in full node mode. @@ -144,7 +144,7 @@ where let sequencer_rollup = rollup_blueprint .create_new_sequencer(rt_genesis_paths, rollup_config.clone(), sequencer_config) .await - .unwrap(); + .expect("Could not start sequencer"); if let Err(e) = sequencer_rollup.run().await { error!("Error: {}", e); } @@ -156,7 +156,7 @@ where prover_config, ) .await - .unwrap(); + .expect("Coult not start prover"); if let Err(e) = prover.run().await { error!("Error: {}", e); } @@ -167,7 +167,7 @@ where rollup_config, ) .await - .unwrap(); + .expect("Could not start full-node"); if let Err(e) = rollup.run().await { error!("Error: {}", e); } diff --git a/bin/citrea/src/rollup/bitcoin.rs b/bin/citrea/src/rollup/bitcoin.rs index 0fb80be21..6a62ed6fa 100644 --- a/bin/citrea/src/rollup/bitcoin.rs +++ b/bin/citrea/src/rollup/bitcoin.rs @@ -2,11 +2,11 @@ use async_trait::async_trait; use bitcoin_da::service::{BitcoinService, DaServiceConfig}; use bitcoin_da::spec::{BitcoinSpec, RollupParams}; use bitcoin_da::verifier::BitcoinVerifier; +use citrea_primitives::{DA_TX_ID_LEADING_ZEROS, ROLLUP_NAME}; use citrea_risc0_bonsai_adapter::host::Risc0BonsaiHost; use citrea_risc0_bonsai_adapter::Digest; use citrea_stf::genesis_config::StorageConfig; use citrea_stf::runtime::Runtime; -use rollup_constants::{DA_TX_ID_LEADING_ZEROS, ROLLUP_NAME}; use sov_db::ledger_db::LedgerDB; use sov_modules_api::default_context::{DefaultContext, ZkDefaultContext}; use sov_modules_api::{Address, Spec}; diff --git a/bin/citrea/tests/all_tests.rs b/bin/citrea/tests/all_tests.rs index f42b8d590..373e30e7e 100644 --- a/bin/citrea/tests/all_tests.rs +++ b/bin/citrea/tests/all_tests.rs @@ -11,3 +11,4 @@ mod test_helpers; const DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT: u64 = 1000; const DEFAULT_DEPOSIT_MEMPOOL_FETCH_LIMIT: usize = 10; const DEFAULT_PROOF_WAIT_DURATION: u64 = 300; // 5 minutes +const TEST_DATA_GENESIS_PATH: &str = "../../resources/test-data/integration-tests"; diff --git a/bin/citrea/tests/e2e/mod.rs b/bin/citrea/tests/e2e/mod.rs index 715674dbf..c779ec6bd 100644 --- a/bin/citrea/tests/e2e/mod.rs +++ b/bin/citrea/tests/e2e/mod.rs @@ -10,11 +10,11 @@ use alloy_rlp::{BytesMut, Decodable, Encodable}; use citrea_evm::smart_contracts::SimpleStorageContract; use citrea_evm::system_contracts::BitcoinLightClient; use citrea_evm::SYSTEM_SIGNER; +use citrea_primitives::TEST_PRIVATE_KEY; use citrea_sequencer::{SequencerConfig, SequencerMempoolConfig}; use citrea_stf::genesis_config::GenesisPaths; use ethereum_rpc::CitreaStatus; use reth_primitives::{Address, BlockNumberOrTag, TxHash, U256}; -use rollup_constants::TEST_PRIVATE_KEY; use shared_backup_db::{PostgresConnector, ProofType, SharedBackupDbConfig}; use sov_mock_da::{MockAddress, MockDaService, MockDaSpec, MockHash}; use sov_rollup_interface::da::{DaData, DaSpec}; @@ -33,7 +33,7 @@ use crate::test_helpers::{ }; use crate::{ DEFAULT_DEPOSIT_MEMPOOL_FETCH_LIMIT, DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT, - DEFAULT_PROOF_WAIT_DURATION, + DEFAULT_PROOF_WAIT_DURATION, TEST_DATA_GENESIS_PATH, }; struct TestConfig { @@ -75,7 +75,7 @@ async fn initialize_test( let seq_task = tokio::spawn(async move { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_path, @@ -99,7 +99,7 @@ async fn initialize_test( let full_node_task = tokio::spawn(async move { start_rollup( full_node_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::FullNode(seq_port), fullnode_path, @@ -147,7 +147,7 @@ async fn test_soft_batch_save() -> Result<(), anyhow::Error> { let seq_task = tokio::spawn(async move { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, @@ -171,7 +171,7 @@ async fn test_soft_batch_save() -> Result<(), anyhow::Error> { let full_node_task = tokio::spawn(async move { start_rollup( full_node_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::FullNode(seq_port), fullnode_db_dir, @@ -195,7 +195,7 @@ async fn test_soft_batch_save() -> Result<(), anyhow::Error> { let full_node_task_2 = tokio::spawn(async move { start_rollup( full_node_port_tx_2, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::FullNode(full_node_port), fullnode2_db_dir, @@ -311,7 +311,7 @@ async fn test_delayed_sync_ten_blocks() -> Result<(), anyhow::Error> { let seq_task = tokio::spawn(async { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, @@ -347,7 +347,7 @@ async fn test_delayed_sync_ten_blocks() -> Result<(), anyhow::Error> { let full_node_task = tokio::spawn(async move { start_rollup( full_node_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::FullNode(seq_port), fullnode_db_dir, @@ -426,7 +426,7 @@ async fn test_close_and_reopen_full_node() -> Result<(), anyhow::Error> { let seq_task = tokio::spawn(async { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, @@ -451,7 +451,7 @@ async fn test_close_and_reopen_full_node() -> Result<(), anyhow::Error> { let rollup_task = tokio::spawn(async move { start_rollup( full_node_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::FullNode(seq_port), fullnode_db_dir_cloned, @@ -531,7 +531,7 @@ async fn test_close_and_reopen_full_node() -> Result<(), anyhow::Error> { let rollup_task = tokio::spawn(async move { start_rollup( full_node_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::FullNode(seq_port), fullnode_db_dir, @@ -591,7 +591,7 @@ async fn test_get_transaction_by_hash() -> Result<(), anyhow::Error> { let seq_task = tokio::spawn(async { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, @@ -614,7 +614,7 @@ async fn test_get_transaction_by_hash() -> Result<(), anyhow::Error> { let rollup_task = tokio::spawn(async move { start_rollup( full_node_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::FullNode(seq_port), fullnode_db_dir, @@ -865,7 +865,7 @@ async fn test_reopen_sequencer() -> Result<(), anyhow::Error> { let seq_task = tokio::spawn(async { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir_cloned, @@ -911,7 +911,7 @@ async fn test_reopen_sequencer() -> Result<(), anyhow::Error> { let seq_task = tokio::spawn(async { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, @@ -1247,7 +1247,7 @@ async fn test_prover_sync_with_commitments() -> Result<(), anyhow::Error> { let seq_task = tokio::spawn(async move { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, @@ -1271,7 +1271,7 @@ async fn test_prover_sync_with_commitments() -> Result<(), anyhow::Error> { let prover_node_task = tokio::spawn(async move { start_rollup( prover_node_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), Some(ProverConfig { proving_mode: sov_stf_runner::ProverGuestRunConfig::Execute, db_config: Some(SharedBackupDbConfig::default()), @@ -1394,7 +1394,7 @@ async fn test_reopen_prover() -> Result<(), anyhow::Error> { let seq_task = tokio::spawn(async move { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), Some(ProverConfig::default()), NodeMode::SequencerNode, sequencer_db_dir, @@ -1419,7 +1419,7 @@ async fn test_reopen_prover() -> Result<(), anyhow::Error> { let prover_node_task = tokio::spawn(async move { start_rollup( prover_node_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), Some(ProverConfig::default()), NodeMode::Prover(seq_port), prover_db_dir_cloned, @@ -1483,7 +1483,7 @@ async fn test_reopen_prover() -> Result<(), anyhow::Error> { let prover_node_task = tokio::spawn(async move { start_rollup( prover_node_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), Some(ProverConfig::default()), NodeMode::Prover(seq_port), prover_copy_db_dir, @@ -1523,7 +1523,7 @@ async fn test_reopen_prover() -> Result<(), anyhow::Error> { let prover_node_task = tokio::spawn(async move { start_rollup( prover_node_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), Some(ProverConfig::default()), NodeMode::Prover(seq_port), prover_copy2_dir_cloned, @@ -1744,7 +1744,9 @@ async fn test_system_tx_effect_on_block_gas_limit() -> Result<(), anyhow::Error> let seq_task = tokio::spawn(async move { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests-low-block-gas-limit"), + GenesisPaths::from_dir( + "../../resources/test-data/integration-tests-low-block-gas-limit", + ), None, NodeMode::SequencerNode, sequencer_db_dir, @@ -1929,7 +1931,7 @@ async fn sequencer_crash_and_replace_full_node() -> Result<(), anyhow::Error> { let seq_task = tokio::spawn(async move { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir_cloned, @@ -1956,7 +1958,7 @@ async fn sequencer_crash_and_replace_full_node() -> Result<(), anyhow::Error> { let full_node_task = tokio::spawn(async move { start_rollup( full_node_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::FullNode(seq_port), fullnode_db_dir_cloned, @@ -2019,7 +2021,7 @@ async fn sequencer_crash_and_replace_full_node() -> Result<(), anyhow::Error> { let seq_task = tokio::spawn(async move { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, @@ -2212,7 +2214,7 @@ async fn sequencer_crash_restore_mempool() -> Result<(), anyhow::Error> { let seq_task = tokio::spawn(async move { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir_cloned, @@ -2281,7 +2283,7 @@ async fn sequencer_crash_restore_mempool() -> Result<(), anyhow::Error> { let seq_task = tokio::spawn(async move { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, @@ -2361,7 +2363,7 @@ async fn test_db_get_proof() { let seq_task = tokio::spawn(async { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, @@ -2386,7 +2388,7 @@ async fn test_db_get_proof() { let prover_node_task = tokio::spawn(async move { start_rollup( prover_node_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), Some(ProverConfig { proving_mode: sov_stf_runner::ProverGuestRunConfig::Execute, proof_sampling_number: 0, @@ -2484,7 +2486,7 @@ async fn full_node_verify_proof_and_store() { let seq_task = tokio::spawn(async { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, @@ -2510,7 +2512,7 @@ async fn full_node_verify_proof_and_store() { let prover_node_task = tokio::spawn(async move { start_rollup( prover_node_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), Some(ProverConfig { proving_mode: sov_stf_runner::ProverGuestRunConfig::Execute, proof_sampling_number: 0, @@ -2539,7 +2541,7 @@ async fn full_node_verify_proof_and_store() { let full_node_task = tokio::spawn(async move { start_rollup( full_node_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::FullNode(seq_port), fullnode_db_dir, @@ -2684,7 +2686,7 @@ async fn test_all_flow() { let seq_task = tokio::spawn(async { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, @@ -2709,7 +2711,7 @@ async fn test_all_flow() { let prover_node_task = tokio::spawn(async move { start_rollup( prover_node_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), Some(ProverConfig { proving_mode: sov_stf_runner::ProverGuestRunConfig::Execute, proof_sampling_number: 0, @@ -2738,7 +2740,7 @@ async fn test_all_flow() { let full_node_task = tokio::spawn(async move { start_rollup( full_node_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::FullNode(seq_port), fullnode_db_dir, @@ -3034,7 +3036,7 @@ async fn test_gas_limit_too_high() { let seq_task = tokio::spawn(async move { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, @@ -3071,7 +3073,7 @@ async fn test_gas_limit_too_high() { let full_node_task = tokio::spawn(async move { start_rollup( full_node_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::FullNode(seq_port), full_node_db_dir, @@ -3168,7 +3170,7 @@ async fn test_ledger_get_head_soft_batch() { let seq_task = tokio::spawn(async move { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, @@ -3230,7 +3232,7 @@ async fn test_full_node_sync_status() { let seq_task = tokio::spawn(async { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, @@ -3266,7 +3268,7 @@ async fn test_full_node_sync_status() { let full_node_task = tokio::spawn(async move { start_rollup( full_node_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::FullNode(seq_port), fullnode_db_dir, diff --git a/bin/citrea/tests/evm/archival_state.rs b/bin/citrea/tests/evm/archival_state.rs index 59f80464c..8ea9a7de4 100644 --- a/bin/citrea/tests/evm/archival_state.rs +++ b/bin/citrea/tests/evm/archival_state.rs @@ -9,7 +9,10 @@ use tokio::time::sleep; use crate::evm::init_test_rollup; use crate::test_client::TestClient; use crate::test_helpers::{start_rollup, tempdir_with_children, wait_for_l2_block, NodeMode}; -use crate::{DEFAULT_DEPOSIT_MEMPOOL_FETCH_LIMIT, DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT}; +use crate::{ + DEFAULT_DEPOSIT_MEMPOOL_FETCH_LIMIT, DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT, + TEST_DATA_GENESIS_PATH, +}; #[tokio::test(flavor = "multi_thread")] async fn test_archival_state() -> Result<(), anyhow::Error> { @@ -25,7 +28,7 @@ async fn test_archival_state() -> Result<(), anyhow::Error> { let seq_task = tokio::spawn(async { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, diff --git a/bin/citrea/tests/evm/gas_price.rs b/bin/citrea/tests/evm/gas_price.rs index a6d0efa9a..f5def33a5 100644 --- a/bin/citrea/tests/evm/gas_price.rs +++ b/bin/citrea/tests/evm/gas_price.rs @@ -10,7 +10,10 @@ use reth_primitives::{BlockNumberOrTag, U256}; use crate::evm::init_test_rollup; use crate::test_client::TestClient; use crate::test_helpers::{start_rollup, tempdir_with_children, wait_for_l2_block, NodeMode}; -use crate::{DEFAULT_DEPOSIT_MEMPOOL_FETCH_LIMIT, DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT}; +use crate::{ + DEFAULT_DEPOSIT_MEMPOOL_FETCH_LIMIT, DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT, + TEST_DATA_GENESIS_PATH, +}; #[tokio::test(flavor = "multi_thread")] async fn test_gas_price_increase() -> Result<(), anyhow::Error> { @@ -27,7 +30,7 @@ async fn test_gas_price_increase() -> Result<(), anyhow::Error> { // Don't provide a prover since the EVM is not currently provable start_rollup( port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, diff --git a/bin/citrea/tests/evm/mod.rs b/bin/citrea/tests/evm/mod.rs index 8d29ad821..9be4c1b92 100644 --- a/bin/citrea/tests/evm/mod.rs +++ b/bin/citrea/tests/evm/mod.rs @@ -14,7 +14,10 @@ use sov_rollup_interface::CITREA_VERSION; // use sov_demo_rollup::initialize_logging; use crate::test_client::TestClient; use crate::test_helpers::{start_rollup, tempdir_with_children, wait_for_l2_block, NodeMode}; -use crate::{DEFAULT_DEPOSIT_MEMPOOL_FETCH_LIMIT, DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT}; +use crate::{ + DEFAULT_DEPOSIT_MEMPOOL_FETCH_LIMIT, DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT, + TEST_DATA_GENESIS_PATH, +}; mod archival_state; mod gas_price; @@ -33,7 +36,7 @@ async fn web3_rpc_tests() -> Result<(), anyhow::Error> { let rollup_task = tokio::spawn(async { start_rollup( port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, @@ -89,7 +92,7 @@ async fn evm_tx_tests() -> Result<(), anyhow::Error> { let rollup_task = tokio::spawn(async { start_rollup( port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, @@ -130,7 +133,7 @@ async fn test_eth_get_logs() -> Result<(), anyhow::Error> { let rollup_task = tokio::spawn(async { start_rollup( port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, @@ -168,7 +171,7 @@ async fn test_genesis_contract_call() -> Result<(), Box> let seq_task = tokio::spawn(async move { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../../configs/mock-dockerized/genesis-files"), + GenesisPaths::from_dir("../../resources/genesis/mock-dockerized/"), None, NodeMode::SequencerNode, sequencer_db_dir, diff --git a/bin/citrea/tests/evm/tracing.rs b/bin/citrea/tests/evm/tracing.rs index e19af3137..0a7da1bf1 100644 --- a/bin/citrea/tests/evm/tracing.rs +++ b/bin/citrea/tests/evm/tracing.rs @@ -13,7 +13,10 @@ use serde_json::{self, json}; use crate::evm::make_test_client; use crate::test_helpers::{start_rollup, tempdir_with_children, NodeMode}; -use crate::{DEFAULT_DEPOSIT_MEMPOOL_FETCH_LIMIT, DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT}; +use crate::{ + DEFAULT_DEPOSIT_MEMPOOL_FETCH_LIMIT, DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT, + TEST_DATA_GENESIS_PATH, +}; #[tokio::test(flavor = "multi_thread")] async fn tracing_tests() -> Result<(), Box> { @@ -27,7 +30,7 @@ async fn tracing_tests() -> Result<(), Box> { // Don't provide a prover since the EVM is not currently provable start_rollup( port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, diff --git a/bin/citrea/tests/mempool/mod.rs b/bin/citrea/tests/mempool/mod.rs index 2b69fe9b2..7294eca52 100644 --- a/bin/citrea/tests/mempool/mod.rs +++ b/bin/citrea/tests/mempool/mod.rs @@ -10,7 +10,10 @@ use tokio::task::JoinHandle; use crate::evm::make_test_client; use crate::test_client::{TestClient, MAX_FEE_PER_GAS}; use crate::test_helpers::{start_rollup, tempdir_with_children, wait_for_l2_block, NodeMode}; -use crate::{DEFAULT_DEPOSIT_MEMPOOL_FETCH_LIMIT, DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT}; +use crate::{ + DEFAULT_DEPOSIT_MEMPOOL_FETCH_LIMIT, DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT, + TEST_DATA_GENESIS_PATH, +}; async fn initialize_test( sequencer_path: PathBuf, @@ -21,7 +24,7 @@ async fn initialize_test( let seq_task = tokio::spawn(async { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_path, diff --git a/bin/citrea/tests/sequencer_commitments/mod.rs b/bin/citrea/tests/sequencer_commitments/mod.rs index ecbab1c27..086018111 100644 --- a/bin/citrea/tests/sequencer_commitments/mod.rs +++ b/bin/citrea/tests/sequencer_commitments/mod.rs @@ -17,7 +17,9 @@ use crate::test_helpers::{ create_default_sequencer_config, start_rollup, tempdir_with_children, wait_for_l1_block, wait_for_l2_block, wait_for_postgres_commitment, wait_for_prover_l1_height, NodeMode, }; -use crate::{DEFAULT_DEPOSIT_MEMPOOL_FETCH_LIMIT, DEFAULT_PROOF_WAIT_DURATION}; +use crate::{ + DEFAULT_DEPOSIT_MEMPOOL_FETCH_LIMIT, DEFAULT_PROOF_WAIT_DURATION, TEST_DATA_GENESIS_PATH, +}; #[tokio::test(flavor = "multi_thread")] async fn sequencer_sends_commitments_to_da_layer() { @@ -33,7 +35,7 @@ async fn sequencer_sends_commitments_to_da_layer() { let seq_task = tokio::spawn(async move { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, @@ -230,7 +232,7 @@ async fn check_commitment_in_offchain_db() { let seq_task = tokio::spawn(async move { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, @@ -300,7 +302,7 @@ async fn test_ledger_get_commitments_on_slot() { let seq_task = tokio::spawn(async { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, @@ -324,7 +326,7 @@ async fn test_ledger_get_commitments_on_slot() { let full_node_task = tokio::spawn(async move { start_rollup( full_node_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::FullNode(seq_port), fullnode_db_dir, @@ -406,7 +408,7 @@ async fn test_ledger_get_commitments_on_slot_prover() { let seq_task = tokio::spawn(async { start_rollup( seq_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), None, NodeMode::SequencerNode, sequencer_db_dir, @@ -430,7 +432,7 @@ async fn test_ledger_get_commitments_on_slot_prover() { let prover_node_task = tokio::spawn(async move { start_rollup( prover_node_port_tx, - GenesisPaths::from_dir("../test-data/genesis/integration-tests"), + GenesisPaths::from_dir(TEST_DATA_GENESIS_PATH), Some(ProverConfig { proving_mode: sov_stf_runner::ProverGuestRunConfig::Execute, proof_sampling_number: 0, diff --git a/bin/citrea/tests/soft_confirmation_rule_enforcer/mod.rs b/bin/citrea/tests/soft_confirmation_rule_enforcer/mod.rs index 502168f0b..ff0d11aaa 100644 --- a/bin/citrea/tests/soft_confirmation_rule_enforcer/mod.rs +++ b/bin/citrea/tests/soft_confirmation_rule_enforcer/mod.rs @@ -27,7 +27,7 @@ async fn too_many_l2_block_per_l1_block() { start_rollup( seq_port_tx, GenesisPaths::from_dir( - "../test-data/genesis/integration-tests-low-max-l2-blocks-per-l1", + "../../resources/test-data/integration-tests-low-max-l2-blocks-per-l1", ), None, NodeMode::SequencerNode, diff --git a/bin/citrea/tests/test_helpers/mod.rs b/bin/citrea/tests/test_helpers/mod.rs index 14b477317..cf293f289 100644 --- a/bin/citrea/tests/test_helpers/mod.rs +++ b/bin/citrea/tests/test_helpers/mod.rs @@ -3,10 +3,10 @@ use std::path::{Path, PathBuf}; use std::time::{Duration, SystemTime}; use citrea::{CitreaRollupBlueprint, MockDemoRollup}; +use citrea_primitives::TEST_PRIVATE_KEY; use citrea_sequencer::SequencerConfig; use citrea_stf::genesis_config::GenesisPaths; use reth_rpc_types::BlockNumberOrTag; -use rollup_constants::TEST_PRIVATE_KEY; use shared_backup_db::PostgresConnector; use sov_mock_da::{MockAddress, MockDaConfig, MockDaService}; use sov_modules_api::default_signature::private_key::DefaultPrivateKey; diff --git a/bin/rollup-constants/Cargo.toml b/crates/primitives/Cargo.toml similarity index 84% rename from bin/rollup-constants/Cargo.toml rename to crates/primitives/Cargo.toml index 11cc2b4fd..e9f7a2715 100644 --- a/bin/rollup-constants/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "rollup-constants" +name = "citrea-primitives" version = { workspace = true } authors = { workspace = true } edition = { workspace = true } diff --git a/bin/rollup-constants/README.md b/crates/primitives/README.md similarity index 100% rename from bin/rollup-constants/README.md rename to crates/primitives/README.md diff --git a/bin/rollup-constants/src/lib.rs b/crates/primitives/src/constants.rs similarity index 100% rename from bin/rollup-constants/src/lib.rs rename to crates/primitives/src/constants.rs diff --git a/crates/primitives/src/lib.rs b/crates/primitives/src/lib.rs new file mode 100644 index 000000000..27aa6cccc --- /dev/null +++ b/crates/primitives/src/lib.rs @@ -0,0 +1,3 @@ +mod constants; + +pub use constants::*; diff --git a/crates/sovereign-sdk/examples/demo-stf/src/tests/mod.rs b/crates/sovereign-sdk/examples/demo-stf/src/tests/mod.rs index 1fdac01e4..505d6593b 100644 --- a/crates/sovereign-sdk/examples/demo-stf/src/tests/mod.rs +++ b/crates/sovereign-sdk/examples/demo-stf/src/tests/mod.rs @@ -39,7 +39,7 @@ // pub(crate) fn get_genesis_config_for_tests( // ) -> GenesisParams, BasicKernelGenesisConfig> // { -// let integ_test_conf_dir: &Path = "../test-data/genesis/integration-tests".as_ref(); +// let integ_test_conf_dir: &Path = "../resources/test-data/integration-tests".as_ref(); // let rt_params = // get_genesis_config::(&GenesisPaths::from_dir(integ_test_conf_dir)) // .unwrap(); diff --git a/docker-compose.postgres.yml b/docker-compose.postgres.yml index 448e49749..9443d3240 100644 --- a/docker-compose.postgres.yml +++ b/docker-compose.postgres.yml @@ -4,7 +4,7 @@ services: ports: - 5432:5432 volumes: - - ./data/postgres:/var/lib/postgresql/data + - ./resources/dbs/postgres:/var/lib/postgresql/data environment: - POSTGRES_PASSWORD=postgres - POSTGRES_USER=postgres diff --git a/docker-compose.yml b/docker-compose.yml index f6476816a..874f589b9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: - RPCPASSWORD=citrea - ADDNODE=signet.citrea.xyz:38333 volumes: - - citrea-bitcoin-signet-data:/mnt/task/btc-data + - resources/dbs/citrea-bitcoin-signet-data:/mnt/task/btc-data ports: - "38332:38332" - "38333:38333" @@ -38,7 +38,7 @@ services: - ROLLUP__RUNNER__INCLUDE_TX_BODY=true - RUST_LOG=info volumes: - - citrea-full-node-data:/mnt/task/citrea-db + - resources/dbs/citrea-full-node-data:/mnt/task/citrea-db ports: - "8080:8080" networks: diff --git a/docs/run.md b/docs/run.md index 566612503..5f59e44ce 100644 --- a/docs/run.md +++ b/docs/run.md @@ -28,14 +28,14 @@ Run on a local da layer, sharable between nodes that run on your computer. Run sequencer on Mock DA: ```sh -./target/debug/citrea --da-layer mock --rollup-config-path configs/mock/sequencer_rollup_config.toml --sequencer-config-path configs/mock/sequencer_config.toml --genesis-paths configs/mock/genesis-files +./target/debug/citrea --da-layer mock --rollup-config-path resources/configs/mock/sequencer_rollup_config.toml --sequencer-config-path resources/configs/mock/sequencer_config.toml --genesis-paths resources/genesis/mock/ ``` Sequencer RPC is accessible at `127.0.0.1:12345` _Optional_: Run full node on Mock DA: ```sh -./target/debug/citrea --rollup-config-path configs/mock/sequencer_rollup_config.toml --genesis-paths bin/test-data/genesis/demo-tests/mock +./target/debug/citrea --rollup-config-path resources/configs/mock/sequencer_rollup_config.toml --genesis-paths resources/test-data/demo-tests/mock ``` Full node RPC is accessible at `127.0.0.1:12346` @@ -66,7 +66,7 @@ Mine blocks so that the wallet has BTC: bitcoin-cli -regtest -generate 201 ``` -Edit `configs/bitcoin-regtest/sequencer_rollup_config.toml` and `configs/bitcoin-regtest/sequencer_config.toml` files and put in your rpc url, username and password: +Edit `resources/configs/bitcoin-regtest/sequencer_rollup_config.toml` and `resources/configs/bitcoin-regtest/sequencer_config.toml` files and put in your rpc url, username and password: ```toml [da] @@ -80,7 +80,7 @@ node_password = "" Run sequencer: ```sh -./target/debug/citrea --da-layer bitcoin --rollup-config-path configs/bitcoin-regtest/sequencer_rollup_config.toml --sequencer-config-path configs/bitcoin-regtest/sequencer_config.toml --genesis-paths configs/bitcoin-regtest/genesis-files +./target/debug/citrea --da-layer bitcoin --rollup-config-path resources/configs/bitcoin-regtest/sequencer_rollup_config.toml --sequencer-config-path resources/configs/bitcoin-regtest/sequencer_config.toml --genesis-paths resources/genesis/bitcoin-regtest/ ``` Sequencer RPC is accessible at `127.0.0.1:12345` @@ -89,7 +89,7 @@ _Optional_: Run full node Run full node: ```sh -./target/debug/citrea --da-layer bitcoin --rollup-config-path configs/bitcoin-regtest/rollup_config.toml --genesis-paths configs/bitcoin-regtest/genesis-files +./target/debug/citrea --da-layer bitcoin --rollup-config-path resources/configs/bitcoin-regtest/rollup_config.toml --genesis-paths resources/genesis/bitcoin-regtest/ ``` Full node RPC is accessible at `127.0.0.1:12346` diff --git a/assets/banner.png b/resources/assets/banner.png similarity index 100% rename from assets/banner.png rename to resources/assets/banner.png diff --git a/configs/bitcoin-regtest/prover_config.toml b/resources/configs/bitcoin-regtest/prover_config.toml similarity index 100% rename from configs/bitcoin-regtest/prover_config.toml rename to resources/configs/bitcoin-regtest/prover_config.toml diff --git a/configs/bitcoin-regtest/prover_rollup_config.toml b/resources/configs/bitcoin-regtest/prover_rollup_config.toml similarity index 95% rename from configs/bitcoin-regtest/prover_rollup_config.toml rename to resources/configs/bitcoin-regtest/prover_rollup_config.toml index 1b31d8cf8..98a326f7f 100644 --- a/configs/bitcoin-regtest/prover_rollup_config.toml +++ b/resources/configs/bitcoin-regtest/prover_rollup_config.toml @@ -14,7 +14,7 @@ network = "regtest" [storage] # The path to the rollup's data directory. Paths that do not begin with `/` are interpreted as relative paths. -path = "prover-db" +path = "resources/dbs/prover-db" [rpc] # the host and port to bind the rpc server for diff --git a/configs/bitcoin-regtest/rollup_config.toml b/resources/configs/bitcoin-regtest/rollup_config.toml similarity index 94% rename from configs/bitcoin-regtest/rollup_config.toml rename to resources/configs/bitcoin-regtest/rollup_config.toml index e833bff5e..5ef41ca40 100644 --- a/configs/bitcoin-regtest/rollup_config.toml +++ b/resources/configs/bitcoin-regtest/rollup_config.toml @@ -14,7 +14,7 @@ network = "regtest" [storage] # The path to the rollup's data directory. Paths that do not begin with `/` are interpreted as relative paths. -path = "full-node-db" +path = "resources/dbs/full-node-db" [rpc] # the host and port to bind the rpc server for diff --git a/configs/bitcoin-regtest/sequencer_config.toml b/resources/configs/bitcoin-regtest/sequencer_config.toml similarity index 100% rename from configs/bitcoin-regtest/sequencer_config.toml rename to resources/configs/bitcoin-regtest/sequencer_config.toml diff --git a/configs/bitcoin-regtest/sequencer_rollup_config.toml b/resources/configs/bitcoin-regtest/sequencer_rollup_config.toml similarity index 94% rename from configs/bitcoin-regtest/sequencer_rollup_config.toml rename to resources/configs/bitcoin-regtest/sequencer_rollup_config.toml index 081ceb4a7..065e6b1d9 100644 --- a/configs/bitcoin-regtest/sequencer_rollup_config.toml +++ b/resources/configs/bitcoin-regtest/sequencer_rollup_config.toml @@ -14,7 +14,7 @@ network = "regtest" da_private_key = "E9873D79C6D87DC0FB6A5778633389F4453213303DA61F20BD67FC233AA33262" [storage] # The path to the rollup's data directory. Paths that do not begin with `/` are interpreted as relative paths. -path = "sequencer-db" +path = "resources/dbs/sequencer-db" [rpc] # the host and port to bind the rpc server for diff --git a/configs/devnet/rollup_config.toml b/resources/configs/devnet/rollup_config.toml similarity index 95% rename from configs/devnet/rollup_config.toml rename to resources/configs/devnet/rollup_config.toml index cd339e0cf..430b69bd4 100644 --- a/configs/devnet/rollup_config.toml +++ b/resources/configs/devnet/rollup_config.toml @@ -14,7 +14,7 @@ network = "signet" [storage] # The path to the rollup's data directory. Paths that do not begin with `/` are interpreted as relative paths. -path = "full-node-db" +path = "resources/dbs/full-node-db" [rpc] # the host and port to bind the rpc server for diff --git a/configs/mock-dockerized/publish_da_block.sh b/resources/configs/mock-dockerized/publish_da_block.sh similarity index 100% rename from configs/mock-dockerized/publish_da_block.sh rename to resources/configs/mock-dockerized/publish_da_block.sh diff --git a/configs/mock-dockerized/rollup_config.toml b/resources/configs/mock-dockerized/rollup_config.toml similarity index 89% rename from configs/mock-dockerized/rollup_config.toml rename to resources/configs/mock-dockerized/rollup_config.toml index 865918fd6..93e55cdc0 100644 --- a/configs/mock-dockerized/rollup_config.toml +++ b/resources/configs/mock-dockerized/rollup_config.toml @@ -5,11 +5,11 @@ prover_da_pub_key = "" [da] sender_address = "0000000000000000000000000000000000000000000000000000000000000000" -db_path = "da-db" +db_path = "resources/dbs/da-db" [storage] # The path to the rollup's data directory. Paths that do not begin with `/` are interpreted as relative paths. -path = "full-node-db" +path = "resources/dbs/full-node-db" [rpc] # the host and port to bind the rpc server for diff --git a/configs/mock-dockerized/sequencer_config.toml b/resources/configs/mock-dockerized/sequencer_config.toml similarity index 100% rename from configs/mock-dockerized/sequencer_config.toml rename to resources/configs/mock-dockerized/sequencer_config.toml diff --git a/configs/mock/prover_config.toml b/resources/configs/mock/prover_config.toml similarity index 100% rename from configs/mock/prover_config.toml rename to resources/configs/mock/prover_config.toml diff --git a/configs/mock/rollup_config.toml b/resources/configs/mock/rollup_config.toml similarity index 89% rename from configs/mock/rollup_config.toml rename to resources/configs/mock/rollup_config.toml index 4878c45cc..d2b6f7dd6 100644 --- a/configs/mock/rollup_config.toml +++ b/resources/configs/mock/rollup_config.toml @@ -5,11 +5,11 @@ prover_da_pub_key = "" [da] sender_address = "0000000000000000000000000000000000000000000000000000000000000000" -db_path = "da-db" +db_path = "resources/dbs/da-db" [storage] # The path to the rollup's data directory. Paths that do not begin with `/` are interpreted as relative paths. -path = "full-node-db" +path = "resources/dbs/full-node-db" [rpc] # the host and port to bind the rpc server for diff --git a/configs/mock/sequencer_config.toml b/resources/configs/mock/sequencer_config.toml similarity index 100% rename from configs/mock/sequencer_config.toml rename to resources/configs/mock/sequencer_config.toml diff --git a/configs/mock/sequencer_rollup_config.toml b/resources/configs/mock/sequencer_rollup_config.toml similarity index 88% rename from configs/mock/sequencer_rollup_config.toml rename to resources/configs/mock/sequencer_rollup_config.toml index c4f8335ec..83700ba16 100644 --- a/configs/mock/sequencer_rollup_config.toml +++ b/resources/configs/mock/sequencer_rollup_config.toml @@ -5,11 +5,11 @@ prover_da_pub_key = "" [da] sender_address = "0000000000000000000000000000000000000000000000000000000000000000" -db_path = "da-db" +db_path = "resources/dbs/da-db" [storage] # The path to the rollup's data directory. Paths that do not begin with `/` are interpreted as relative paths. -path = "sequencer-db" +path = "resources/dbs/sequencer-db" [rpc] # the host and port to bind the rpc server for diff --git a/resources/dbs/.gitkeep b/resources/dbs/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/bin/test-data/genesis/demo-tests/bitcoin-regtest/accounts.json b/resources/genesis/bitcoin-regtest/accounts.json similarity index 100% rename from bin/test-data/genesis/demo-tests/bitcoin-regtest/accounts.json rename to resources/genesis/bitcoin-regtest/accounts.json diff --git a/bin/test-data/genesis/demo-tests/mock/evm.json b/resources/genesis/bitcoin-regtest/evm.json similarity index 100% rename from bin/test-data/genesis/demo-tests/mock/evm.json rename to resources/genesis/bitcoin-regtest/evm.json diff --git a/bin/test-data/genesis/demo-tests/bitcoin-regtest/soft_confirmation_rule_enforcer.json b/resources/genesis/bitcoin-regtest/soft_confirmation_rule_enforcer.json similarity index 100% rename from bin/test-data/genesis/demo-tests/bitcoin-regtest/soft_confirmation_rule_enforcer.json rename to resources/genesis/bitcoin-regtest/soft_confirmation_rule_enforcer.json diff --git a/bin/test-data/genesis/demo-tests/mock/accounts.json b/resources/genesis/devnet/accounts.json similarity index 100% rename from bin/test-data/genesis/demo-tests/mock/accounts.json rename to resources/genesis/devnet/accounts.json diff --git a/configs/devnet/genesis-files/evm.json b/resources/genesis/devnet/evm.json similarity index 100% rename from configs/devnet/genesis-files/evm.json rename to resources/genesis/devnet/evm.json diff --git a/configs/devnet/genesis-files/soft_confirmation_rule_enforcer.json b/resources/genesis/devnet/soft_confirmation_rule_enforcer.json similarity index 100% rename from configs/devnet/genesis-files/soft_confirmation_rule_enforcer.json rename to resources/genesis/devnet/soft_confirmation_rule_enforcer.json diff --git a/bin/test-data/genesis/integration-tests-low-block-gas-limit/accounts.json b/resources/genesis/mock-dockerized/accounts.json similarity index 100% rename from bin/test-data/genesis/integration-tests-low-block-gas-limit/accounts.json rename to resources/genesis/mock-dockerized/accounts.json diff --git a/configs/mock-dockerized/genesis-files/evm.json b/resources/genesis/mock-dockerized/evm.json similarity index 100% rename from configs/mock-dockerized/genesis-files/evm.json rename to resources/genesis/mock-dockerized/evm.json diff --git a/bin/test-data/genesis/demo-tests/mock/soft_confirmation_rule_enforcer.json b/resources/genesis/mock-dockerized/soft_confirmation_rule_enforcer.json similarity index 100% rename from bin/test-data/genesis/demo-tests/mock/soft_confirmation_rule_enforcer.json rename to resources/genesis/mock-dockerized/soft_confirmation_rule_enforcer.json diff --git a/bin/test-data/genesis/integration-tests-low-max-l2-blocks-per-l1/accounts.json b/resources/genesis/mock/accounts.json similarity index 100% rename from bin/test-data/genesis/integration-tests-low-max-l2-blocks-per-l1/accounts.json rename to resources/genesis/mock/accounts.json diff --git a/configs/bitcoin-regtest/genesis-files/evm.json b/resources/genesis/mock/evm.json similarity index 100% rename from configs/bitcoin-regtest/genesis-files/evm.json rename to resources/genesis/mock/evm.json diff --git a/bin/test-data/genesis/integration-tests-low-block-gas-limit/soft_confirmation_rule_enforcer.json b/resources/genesis/mock/soft_confirmation_rule_enforcer.json similarity index 100% rename from bin/test-data/genesis/integration-tests-low-block-gas-limit/soft_confirmation_rule_enforcer.json rename to resources/genesis/mock/soft_confirmation_rule_enforcer.json diff --git a/hive/.dockerignore b/resources/hive/.dockerignore similarity index 100% rename from hive/.dockerignore rename to resources/hive/.dockerignore diff --git a/hive/Dockerfile b/resources/hive/Dockerfile similarity index 55% rename from hive/Dockerfile rename to resources/hive/Dockerfile index 75e7bdf9e..86bea8dad 100644 --- a/hive/Dockerfile +++ b/resources/hive/Dockerfile @@ -18,4 +18,4 @@ RUN SKIP_GUEST_BUILD=1 cargo build --release --bin citrea EXPOSE 8545 -ENTRYPOINT ["sh", "-c", "./configs/mock-dockerized/publish_da_block.sh & ./target/release/citrea --genesis-paths ./configs/mock-dockerized/genesis-files --rollup-config-path ./configs/mock-dockerized/rollup_config.toml --sequencer-config-path ./configs/mock-dockerized/sequencer_config.toml"] +ENTRYPOINT ["sh", "-c", "./resources/configs/mock-dockerized/publish_da_block.sh & ./target/release/citrea --genesis-paths ./resources/genesis/mock-dockerized --rollup-config-path ./configs/mock-dockerized/rollup_config.toml --sequencer-config-path ./configs/mock-dockerized/sequencer_config.toml"] diff --git a/hive/genesis.hive.json b/resources/hive/genesis.hive.json similarity index 100% rename from hive/genesis.hive.json rename to resources/hive/genesis.hive.json diff --git a/hive/hive_publish_block.sh b/resources/hive/hive_publish_block.sh similarity index 100% rename from hive/hive_publish_block.sh rename to resources/hive/hive_publish_block.sh diff --git a/bin/test-data/genesis/integration-tests/accounts.json b/resources/test-data/demo-tests/bitcoin-regtest/accounts.json similarity index 100% rename from bin/test-data/genesis/integration-tests/accounts.json rename to resources/test-data/demo-tests/bitcoin-regtest/accounts.json diff --git a/bin/test-data/genesis/demo-tests/bitcoin-regtest/evm.json b/resources/test-data/demo-tests/bitcoin-regtest/evm.json similarity index 100% rename from bin/test-data/genesis/demo-tests/bitcoin-regtest/evm.json rename to resources/test-data/demo-tests/bitcoin-regtest/evm.json diff --git a/configs/bitcoin-regtest/genesis-files/soft_confirmation_rule_enforcer.json b/resources/test-data/demo-tests/bitcoin-regtest/soft_confirmation_rule_enforcer.json similarity index 100% rename from configs/bitcoin-regtest/genesis-files/soft_confirmation_rule_enforcer.json rename to resources/test-data/demo-tests/bitcoin-regtest/soft_confirmation_rule_enforcer.json diff --git a/configs/bitcoin-regtest/genesis-files/accounts.json b/resources/test-data/demo-tests/mock/accounts.json similarity index 100% rename from configs/bitcoin-regtest/genesis-files/accounts.json rename to resources/test-data/demo-tests/mock/accounts.json diff --git a/configs/mock/genesis-files/evm.json b/resources/test-data/demo-tests/mock/evm.json similarity index 100% rename from configs/mock/genesis-files/evm.json rename to resources/test-data/demo-tests/mock/evm.json diff --git a/configs/mock-dockerized/genesis-files/soft_confirmation_rule_enforcer.json b/resources/test-data/demo-tests/mock/soft_confirmation_rule_enforcer.json similarity index 100% rename from configs/mock-dockerized/genesis-files/soft_confirmation_rule_enforcer.json rename to resources/test-data/demo-tests/mock/soft_confirmation_rule_enforcer.json diff --git a/configs/devnet/genesis-files/accounts.json b/resources/test-data/integration-tests-low-block-gas-limit/accounts.json similarity index 100% rename from configs/devnet/genesis-files/accounts.json rename to resources/test-data/integration-tests-low-block-gas-limit/accounts.json diff --git a/bin/test-data/genesis/integration-tests-low-block-gas-limit/evm.json b/resources/test-data/integration-tests-low-block-gas-limit/evm.json similarity index 100% rename from bin/test-data/genesis/integration-tests-low-block-gas-limit/evm.json rename to resources/test-data/integration-tests-low-block-gas-limit/evm.json diff --git a/configs/mock/genesis-files/soft_confirmation_rule_enforcer.json b/resources/test-data/integration-tests-low-block-gas-limit/soft_confirmation_rule_enforcer.json similarity index 100% rename from configs/mock/genesis-files/soft_confirmation_rule_enforcer.json rename to resources/test-data/integration-tests-low-block-gas-limit/soft_confirmation_rule_enforcer.json diff --git a/configs/mock-dockerized/genesis-files/accounts.json b/resources/test-data/integration-tests-low-max-l2-blocks-per-l1/accounts.json similarity index 100% rename from configs/mock-dockerized/genesis-files/accounts.json rename to resources/test-data/integration-tests-low-max-l2-blocks-per-l1/accounts.json diff --git a/bin/test-data/genesis/integration-tests-low-max-l2-blocks-per-l1/evm.json b/resources/test-data/integration-tests-low-max-l2-blocks-per-l1/evm.json similarity index 100% rename from bin/test-data/genesis/integration-tests-low-max-l2-blocks-per-l1/evm.json rename to resources/test-data/integration-tests-low-max-l2-blocks-per-l1/evm.json diff --git a/bin/test-data/genesis/integration-tests-low-max-l2-blocks-per-l1/soft_confirmation_rule_enforcer.json b/resources/test-data/integration-tests-low-max-l2-blocks-per-l1/soft_confirmation_rule_enforcer.json similarity index 100% rename from bin/test-data/genesis/integration-tests-low-max-l2-blocks-per-l1/soft_confirmation_rule_enforcer.json rename to resources/test-data/integration-tests-low-max-l2-blocks-per-l1/soft_confirmation_rule_enforcer.json diff --git a/configs/mock/genesis-files/accounts.json b/resources/test-data/integration-tests/accounts.json similarity index 100% rename from configs/mock/genesis-files/accounts.json rename to resources/test-data/integration-tests/accounts.json diff --git a/bin/test-data/genesis/integration-tests/evm.json b/resources/test-data/integration-tests/evm.json similarity index 100% rename from bin/test-data/genesis/integration-tests/evm.json rename to resources/test-data/integration-tests/evm.json diff --git a/bin/test-data/genesis/integration-tests/soft_confirmation_rule_enforcer.json b/resources/test-data/integration-tests/soft_confirmation_rule_enforcer.json similarity index 100% rename from bin/test-data/genesis/integration-tests/soft_confirmation_rule_enforcer.json rename to resources/test-data/integration-tests/soft_confirmation_rule_enforcer.json diff --git a/test-da-dbs/.gitignore b/test-da-dbs/.gitignore deleted file mode 100644 index 98e6ef67f..000000000 --- a/test-da-dbs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.db