Skip to content

Commit 16e155b

Browse files
committed
feat: add input-reader module
1 parent 607d781 commit 16e155b

13 files changed

Lines changed: 2675 additions & 101 deletions

File tree

Cargo.lock

Lines changed: 2035 additions & 64 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sequencer/Cargo.toml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,25 @@ authors.workspace = true
1111

1212
[dependencies]
1313
app-core = { path = "../app-core" }
14+
alloy = { version = "1.4", default-features = false, features = ["contract", "provider-http", "rpc-types", "eips"] }
15+
alloy-primitives = { version = "1.4.1", features = ["serde", "k256"] }
16+
cartesi-rollups-contracts = "2.1.1"
17+
alloy-sol-types = "1.4.1"
18+
async-recursion = "1.0"
1419
axum = "0.8.8"
15-
tokio = { version = "1.35", features = ["macros", "rt-multi-thread", "sync", "time", "net"] }
20+
rusqlite = { version = "0.38.0", features = ["bundled"] }
21+
rusqlite_migration = "2.3.0"
1622
serde = { version = "1", features = ["derive"] }
1723
serde_json = "1"
24+
ssz = { package = "ethereum_ssz", version = "0.10" }
25+
ssz_derive = { package = "ethereum_ssz_derive", version = "0.10" }
26+
thiserror = "1"
27+
tokio = { version = "1.35", features = ["macros", "rt-multi-thread", "sync", "time", "net"] }
28+
url = "2"
1829
tracing = "0.1"
1930
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
2031
tower-http = { version = "0.6.8", features = ["trace"] }
21-
rusqlite = { version = "0.38.0", features = ["bundled"] }
22-
rusqlite_migration = "2.3.0"
23-
alloy-primitives = { version = "1.4.1", features = ["serde", "k256"] }
24-
alloy-sol-types = "1.4.1"
25-
thiserror = "1"
26-
ssz = { package = "ethereum_ssz", version = "0.10" }
27-
ssz_derive = { package = "ethereum_ssz_derive", version = "0.10" }
32+
33+
[dev-dependencies]
34+
alloy = { version = "1.4", default-features = false, features = ["contract", "provider-http", "rpc-types", "eips", "node-bindings"] }
35+
tempfile = "3"

sequencer/src/inclusion_lane/lane.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,7 @@ mod tests {
541541
.append_safe_direct_inputs(&[crate::storage::IndexedDirectInput {
542542
index: 0,
543543
payload: vec![0xaa],
544+
block_number: 0,
544545
}])
545546
.expect("append safe direct input");
546547

@@ -568,6 +569,7 @@ mod tests {
568569
directs.push(crate::storage::IndexedDirectInput {
569570
index,
570571
payload: vec![index as u8],
572+
block_number: 0,
571573
});
572574
}
573575
feeder_storage

sequencer/src/input_reader/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// (c) Cartesi and individual authors (see AUTHORS)
2+
// SPDX-License-Identifier: Apache-2.0 (see LICENSE)
3+
4+
//! Reads safe (direct) inputs from a reference source (e.g. InputBox contract) and appends them
5+
//! to sequencer storage. Minimal design: no epochs or consensus; flat contiguous indices only.
6+
7+
mod reader;
8+
9+
pub use reader::{InputReader, InputReaderConfig, InputReaderError};

0 commit comments

Comments
 (0)