Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test framework for restartability #1610

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
66b5745
Test framework for restartability
jbearer Jun 17, 2024
4a56525
Add hotshot-query-service/testing feature, remove `testing` from defa…
jbearer Jun 18, 2024
9cab8f8
Configure libp2p in restart tests
jbearer Jun 27, 2024
8385e05
Return an error instead of panicking if node initialization fails
jbearer Jul 10, 2024
61d9e8d
Adjust timeouts and thresholds so tests consistently pass
jbearer Jul 10, 2024
efb5233
Deterministically avoid port collisions
jbearer Jul 11, 2024
537a8cd
Improve debug logging for event handling tasks
jbearer Jul 11, 2024
58481f5
Update API database in sync with consensus storage
jbearer Jul 12, 2024
05efffc
Bug fixes
jbearer Jul 16, 2024
b3774f3
Improved logging around decide events
jbearer Jul 16, 2024
de7ea85
Use a more robust method for deciding which leaves have already been …
jbearer Jul 17, 2024
ee1ab80
Disable "restart all" tests
jbearer Jul 17, 2024
8d2b6ad
update the cdn
rob-maron Jul 19, 2024
331da9f
Move event back-processing to async task so it doesn't block startup
jbearer Jul 30, 2024
21622f4
Document restart function
jbearer Aug 12, 2024
9f607ff
Avoid blocking drop with task cancellation if shut_down is explicitly…
jbearer Aug 12, 2024
6c15478
Avoid blocking drop at end of restart tests
jbearer Aug 13, 2024
5bda27e
Mark restart tests slow
jbearer Aug 15, 2024
9a941af
Mark restart tests as heavy
jbearer Aug 16, 2024
8271254
Increase slow test timeout
jbearer Aug 16, 2024
045f862
Don't capture test output so I can debug timing out job
jbearer Aug 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# The restart tests run an entire sequencing network, and so are quite resource intensive.
[[profile.default.overrides]]
filter = 'test(slow_test_restart)'
threads-required = 'num-cpus'
4 changes: 2 additions & 2 deletions .github/workflows/slowtest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ jobs:
run: |
export RUSTFLAGS="$RUSTFLAGS --cfg hotshot_example"
export PATH="$PWD/target/release:$PATH"
cargo nextest run --locked --release --workspace --all-features --verbose -E 'test(slow_)'
timeout-minutes: 25
cargo nextest run --locked --release --workspace --all-features --verbose -E 'test(slow_)' --nocapture
timeout-minutes: 40
94 changes: 12 additions & 82 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ clap = { version = "4.4", features = ["derive", "env", "string"] }
cld = "0.5"
derive_more = "0.99.17"
dotenvy = "0.15"
dyn-clone = "1.0"
ethers = { version = "2.0", features = ["solc"] }
futures = "0.3"

Expand All @@ -73,11 +74,11 @@ hotshot-example-types = { git = "https://github.com/EspressoSystems/hotshot", ta
cdn-broker = { git = "https://github.com/EspressoSystems/Push-CDN", features = [
"runtime-async-std",
"global-permits",
], tag = "0.4.3", package = "cdn-broker" }
], tag = "0.4.4", package = "cdn-broker" }
cdn-marshal = { git = "https://github.com/EspressoSystems/Push-CDN", features = [
"runtime-async-std",
"global-permits",
], tag = "0.4.3", package = "cdn-marshal" }
], tag = "0.4.4", package = "cdn-marshal" }

jf-plonk = { git = "https://github.com/EspressoSystems/jellyfish", tag = "0.4.5", features = [
"test-apis",
Expand Down Expand Up @@ -120,6 +121,7 @@ rand_distr = "0.4"
reqwest = "0.12"
serde = { version = "1.0.195", features = ["derive"] }
serde_json = "^1.0.113"
tempfile = "3.9"
toml = "0.8"
url = "2.3"
vbs = "0.1"
Expand Down
10 changes: 8 additions & 2 deletions sequencer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ edition = "2021"

[features]
default = ["libp2p"]
testing = ["hotshot-testing"]
testing = [
"hotshot-query-service/testing",
"hotshot-testing",
"tempfile",
]
libp2p = []
benchmarking = []

Expand All @@ -23,7 +27,7 @@ hotshot-testing = { workspace = true }
pretty_assertions = { workspace = true }
rand = "0.8.5"
reqwest = { workspace = true }
tempfile = "3.9.0"
tempfile = { workspace = true }

[build-dependencies]
anyhow = { workspace = true }
Expand Down Expand Up @@ -52,6 +56,7 @@ csv = "1"
derivative = "2.2"
derive_more = { workspace = true }
dotenvy = { workspace = true }
dyn-clone = { workspace = true }
espresso-types = { path = "../types", features = ["testing"] }
ethers = { workspace = true }
futures = { workspace = true }
Expand All @@ -73,6 +78,7 @@ itertools = { workspace = true }
jf-crhf = { workspace = true }
jf-merkle-tree = { workspace = true }
jf-rescue = { workspace = true }
tempfile = { workspace = true, optional = true }

jf-signature = { workspace = true, features = ["bls", "schnorr"] }
jf-vid = { workspace = true }
Expand Down
9 changes: 9 additions & 0 deletions sequencer/api/migrations/V37__anchor_leaf_chain.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ALTER TABLE anchor_leaf
DROP COLUMN id,
DROP COLUMN height,
ADD CONSTRAINT anchor_leaf_pk PRIMARY KEY (view);

CREATE TABLE event_stream (
id SERIAL PRIMARY KEY,
last_processed_view BIGINT
);
Loading
Loading