Skip to content

Commit b26825d

Browse files
committed
wip
1 parent c76d30d commit b26825d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+278
-361
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ members = [
1010
"common-rs/arithmetic",
1111

1212
# prt
13-
"prt/client-rs",
14-
"prt/tests/compute-rs",
13+
"prt/client-rs/core",
14+
"prt/client-rs/executable",
1515

1616
# rollups-node
1717
"cartesi-rollups/node/blockchain-reader",
18+
"cartesi-rollups/node/prt-runner",
1819
"cartesi-rollups/node/dave-rollups",
1920
"cartesi-rollups/node/epoch-manager",
2021
"cartesi-rollups/node/machine-runner",
@@ -48,7 +49,7 @@ cartesi-prt-contracts = { path = "prt/contracts/bindings-rs" }
4849

4950
# rollups-node
5051
rollups-blockchain-reader = { version = "0.1", path = "cartesi-rollups/node/blockchain-reader" }
51-
rollups-compute-runner = { version = "0.1", path = "cartesi-rollups/node/compute-runner" }
52+
rollups-prt-runner = { version = "0.1", path = "cartesi-rollups/node/prt-runner" }
5253
rollups-epoch-manager = { version = "0.1", path = "cartesi-rollups/node/epoch-manager" }
5354
rollups-machine-runner = { version = "0.1", path = "cartesi-rollups/node/machine-runner" }
5455
rollups-state-manager = { version = "0.1", path = "cartesi-rollups/node/state-manager" }
@@ -58,7 +59,7 @@ cartesi-dave-arithmetic = { path = "common-rs/arithmetic" }
5859
cartesi-dave-merkle = { path = "common-rs/merkle" }
5960

6061
# prt
61-
cartesi-prt-core = { path = "prt/client-rs" }
62+
cartesi-prt-core = { path = "prt/client-rs/core" }
6263

6364

6465
## Dependencies
@@ -80,6 +81,11 @@ async-trait = "0.1"
8081
futures = "0.3"
8182
tokio = { version = "1", features = ["full"] }
8283

84+
# sqlite
85+
lazy_static = "1.4"
86+
rusqlite = { version = "0.31.0", features = ["bundled"] }
87+
rusqlite_migration = "1.2.0"
88+
8389
clap = { version = "4.5", features = ["derive", "env"] }
8490
hex = "0.4"
8591
log = "0.4"

cartesi-rollups/contracts/justfile

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,39 @@ default: build
1111

1212
build: build-smart-contracts bind
1313

14+
fmt:
15+
forge fmt
16+
1417
# compile smart contracts
1518
build-smart-contracts:
16-
forge build
19+
forge build
1720

1821
# clean smart contracts artifacts
1922
clean-smart-contracts:
20-
forge clean
23+
forge clean
2124

2225
# clean generated bindings
2326
clean-bindings:
24-
rm -rf {{BINDINGS_DIR}}
27+
rm -rf {{BINDINGS_DIR}}
2528

2629
# generate Rust bindings from Solidity code
2730
bind: clean-bindings
28-
forge bind --alloy --select {{BINDINGS_FILTER}} \
29-
--module --bindings-path {{BINDINGS_DIR}} \
30-
--root {{SRC_DIR}}
31+
forge bind --alloy --select {{BINDINGS_FILTER}} \
32+
--module --bindings-path {{BINDINGS_DIR}} \
33+
--root {{SRC_DIR}}
3134

3235
deploy-dev INITIAL_HASH:
33-
forge script \
34-
script/InputBox.s.sol \
35-
--fork-url {{ANVIL_ENDPOINT}} \
36-
--broadcast \
37-
--sig 'run()' \
38-
-vvvv 2>&1
39-
forge script \
40-
script/DaveConsensus.s.sol \
41-
--fork-url {{ANVIL_ENDPOINT}} \
42-
--broadcast \
43-
--sig 'run(bytes32,address)' \
44-
{{INITIAL_HASH}} \
45-
$(jq -r '.transactions[] | select(.transactionType=="CREATE").contractAddress' broadcast/InputBox.s.sol/{{ANVIL_CHAIN_ID}}/run-latest.json) \
46-
-vvvv 2>&1
36+
forge script \
37+
script/InputBox.s.sol \
38+
--fork-url {{ANVIL_ENDPOINT}} \
39+
--broadcast \
40+
--sig 'run()' \
41+
-vvvv 2>&1
42+
forge script \
43+
script/DaveConsensus.s.sol \
44+
--fork-url {{ANVIL_ENDPOINT}} \
45+
--broadcast \
46+
--sig 'run(bytes32,address)' \
47+
{{INITIAL_HASH}} \
48+
$(jq -r '.transactions[] | select(.transactionType=="CREATE").contractAddress' broadcast/InputBox.s.sol/{{ANVIL_CHAIN_ID}}/run-latest.json) \
49+
-vvvv 2>&1

cartesi-rollups/node/Dockerfile.test

Lines changed: 0 additions & 37 deletions
This file was deleted.

cartesi-rollups/node/blockchain-reader/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ cartesi-dave-merkle = { workspace = true }
3030
cartesi-prt-core = { workspace = true }
3131
cartesi-prt-contracts = { workspace = true }
3232

33+
rusqlite = { workspace = true }
34+
rusqlite_migration = { workspace = true }
35+
3336
clap = { workspace = true }
34-
rusqlite = { version = "0.31.0", features = ["bundled"] }
35-
rusqlite_migration = "1.2.0"

cartesi-rollups/node/dave-rollups/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repository = { workspace = true }
1212

1313
[dependencies]
1414
rollups-blockchain-reader = { workspace = true }
15-
rollups-compute-runner = { workspace = true }
15+
rollups-prt-runner = { workspace = true }
1616
rollups-epoch-manager = { workspace = true }
1717
rollups-machine-runner = { workspace = true }
1818
rollups-state-manager = { workspace = true }
@@ -26,5 +26,5 @@ clap = { workspace = true }
2626
futures = { workspace = true }
2727
tokio = { workspace = true }
2828
log = { workspace = true }
29-
rusqlite = { version = "0.31.0", features = ["bundled"] }
29+
rusqlite = { workspace = true }
3030
env_logger = "0.11.5"

cartesi-rollups/node/dave-rollups/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use cartesi_prt_core::arena::{BlockchainConfig, EthArenaSender, SenderFiller};
33
use clap::Parser;
44
use log::error;
55
use rollups_blockchain_reader::{AddressBook, BlockchainReader};
6-
use rollups_compute_runner::ComputeRunner;
6+
use rollups_prt_runner::ComputeRunner;
77
use rollups_epoch_manager::EpochManager;
88
use rollups_machine_runner::MachineRunner;
99
use rollups_state_manager::persistent_state_access::PersistentStateAccess;

cartesi-rollups/node/machine-runner/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use cartesi_machine::{
1818
use cartesi_prt_core::machine::constants::{LOG2_EMULATOR_SPAN, LOG2_INPUT_SPAN, LOG2_UARCH_SPAN};
1919
use rollups_state_manager::{InputId, StateManager};
2020

21-
// gap of each leaf in the commitment tree, should use the same value as CanonicalConstants.sol:log2step(0)a
21+
// gap of each leaf in the commitment tree, should use the same value as CanonicalConstants.sol:log2step(0)
2222
const LOG2_STRIDE: u64 = 44;
2323

2424
pub struct MachineRunner<SM: StateManager> {

cartesi-rollups/node/machine-runner/test-files/inputs.test

Lines changed: 0 additions & 10 deletions
This file was deleted.

cartesi-rollups/node/machine-runner/test-files/machine_state_hashes.test

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)