Skip to content

Commit

Permalink
Refactor into consistent block production cycles (#498)
Browse files Browse the repository at this point in the history
* Refactor into consistent block production cycles

* Cleanup build_block

* Warn when falling behind

* Remove L2 block mode

* Add empty line separator

* Fix redundant error messages

* Pass lints

* wip

* Account for parent block execution time

* Submit empty blocks for missed DA blocks

* Add additional comment

* Resolve udeps

* Add guards to block production

* Remove redundant check

* Fix typos

* Fix wrong merge

* Decrease the number of DA service requests

* Add additional information to panic

* Set value for skipped_blocks

* Satisfy clippy

* WIP

* some changes

* more sequencer configs  + change handling of last_l1_hieght

* merge fixes

* Use the spawned commitment thread

* Incorporate submitting commitments into the loop

* Fix clippy warning

* Remove unwraps

* Clean up

* Fix sleep duration

* Filter out postgres logging

* Remove wait_until_eth_block_number

* Disable logging for tests

* Fix tests

* Adding missing interval configs

* WIP

* Add missing params

* Resolve sequencer commitments tests

* Fix more tests

* Fix reopen prover

* Cleanup

* Update reopen prover

* Make reopen prover multithreaded

* Remove flakiness from reopen prover test

* Fix full_node_verify_proof_and_store

* Fix unwrap call

* Improve timeout error messages

* Fix test_all_flow and test_db_get_proof

* If test fails, show backtrace

* Add nextest config for e2e tests

* Introduce wait_for_proof

* Wait just until block 8 in prover

* Update nextest configs

* Fix sequencer crash test

* Fix test_all_flow

* Remove nextest configs

* Fix PR feedback

* Add TODO

* Get rid of the flakiness of reopen prover

* Update last_used_l1_height as a result

---------

Co-authored-by: eyusufatik <[email protected]>
  • Loading branch information
rakanalh and eyusufatik authored Jun 7, 2024
1 parent 6f2b620 commit 50e322d
Show file tree
Hide file tree
Showing 17 changed files with 653 additions and 339 deletions.
1 change: 1 addition & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ jobs:
- name: Run nextest
run: make test
env:
RUST_BACKTRACE: 1
BONSAI_API_URL: ${{ secrets.BONSAI_API_URL }} # TODO: remove this once we don't use the client on tests
BONSAI_API_KEY: ${{ secrets.BONSAI_API_KEY }} # TODO: remove this once we don't use the client on tests

Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
sha2 = { version = "0.10.8", default-features = false }
thiserror = "1.0.50"
tracing = { version = "0.1.40", default-features = false }
tracing-subscriber = { version = "0.3.17", features = ["env-filter", "json", "fmt"] }
bech32 = { version = "0.9.1", default-features = false }
derive_more = { version = "0.99.11", default-features = false }
clap = { version = "4.4.10", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion bin/citrea/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ log-panics = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
hex = { workspace = true, optional = true }
tokio = { workspace = true }
reth-primitives = { workspace = true }
reth-transaction-pool = { workspace = true }
reth-rpc-types = { workspace = true }
tracing-subscriber = { version = "0.3.17", features = ["env-filter", "json"] }

soft-confirmation-rule-enforcer = { path = "../../crates/soft-confirmation-rule-enforcer" }
sov-db = { path = "../../crates/sovereign-sdk/full-node/db/sov-db" }
Expand Down
10 changes: 5 additions & 5 deletions bin/citrea/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ pub use bitcoin_rollup::*;

/// Default initialization of logging
pub fn initialize_logging() {
let env_filter =
EnvFilter::from_str(&env::var("RUST_LOG").unwrap_or_else(|_| {
"debug,hyper=info,risc0_zkvm=info,guest_execution=debug".to_string()
}))
.unwrap();
let env_filter = EnvFilter::from_str(&env::var("RUST_LOG").unwrap_or_else(|_| {
"debug,jmt=info,hyper=info,risc0_zkvm=info,guest_execution=debug,tokio_postgres=info"
.to_string()
}))
.unwrap();
if std::env::var("JSON_LOGS").is_ok() {
tracing_subscriber::registry()
.with(fmt::layer().json())
Expand Down
Loading

0 comments on commit 50e322d

Please sign in to comment.