Skip to content

Commit

Permalink
Change name
Browse files Browse the repository at this point in the history
  • Loading branch information
otaliptus committed Mar 25, 2024
1 parent 30fbbe9 commit e3807a5
Show file tree
Hide file tree
Showing 21 changed files with 46 additions and 47 deletions.
2 changes: 1 addition & 1 deletion examples/demo-rollup/bitcoin_rollup_config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sequencer_public_key = "0000000000000000000000000000000000000000000000000000000000000000"
min_soft_confirmations_per_commitment = 1000
ignore_tx_body = true
include_tx_body = false

[da]
node_url = "http://localhost:38332"
Expand Down
2 changes: 1 addition & 1 deletion examples/demo-rollup/celestia_rollup_config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ignore_tx_body = true
include_tx_body = false

[da]
# The JWT used to authenticate with the celestia light client. Instructions for generating this token can be found in the README
Expand Down
2 changes: 1 addition & 1 deletion examples/demo-rollup/mock_dockerized_rollup_config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sequencer_public_key = "204040e364c10f2bec9c1fe500a1cd4c247c89d650a01ed7e82caba867877c21"
ignore_tx_body = true
include_tx_body = false

[da]
sender_address = "0000000000000000000000000000000000000000000000000000000000000000"
Expand Down
2 changes: 1 addition & 1 deletion examples/demo-rollup/mock_rollup_config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sequencer_public_key = "204040e364c10f2bec9c1fe500a1cd4c247c89d650a01ed7e82caba867877c21"
ignore_tx_body = true
include_tx_body = false

[da]
sender_address = "0000000000000000000000000000000000000000000000000000000000000000"
Expand Down
2 changes: 1 addition & 1 deletion examples/demo-rollup/mocknet_rollup_config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sequencer_public_key = "204040e364c10f2bec9c1fe500a1cd4c247c89d650a01ed7e82caba867877c21"
min_soft_confirmations_per_commitment = 1000
ignore_tx_body = true
include_tx_body = false

[da]
sender_address = "0000000000000000000000000000000000000000000000000000000000000000"
Expand Down
28 changes: 14 additions & 14 deletions examples/demo-rollup/tests/e2e/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async fn initialize_test(
NodeMode::SequencerNode,
None,
config.seq_min_soft_confirmations,
false,
true,
)
.await;
});
Expand All @@ -76,7 +76,7 @@ async fn initialize_test(
NodeMode::FullNode(seq_port),
None,
DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT,
false,
true,
)
.await;
});
Expand Down Expand Up @@ -110,7 +110,7 @@ async fn test_soft_batch_save() -> Result<(), anyhow::Error> {
NodeMode::SequencerNode,
None,
config.seq_min_soft_confirmations,
false,
true,
)
.await;
});
Expand Down Expand Up @@ -140,7 +140,7 @@ async fn test_soft_batch_save() -> Result<(), anyhow::Error> {
NodeMode::FullNode(seq_port),
None,
DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT,
false,
true,
)
.await;
});
Expand All @@ -163,7 +163,7 @@ async fn test_soft_batch_save() -> Result<(), anyhow::Error> {
NodeMode::FullNode(full_node_port),
None,
DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT,
true,
false,
)
.await;
});
Expand Down Expand Up @@ -246,7 +246,7 @@ async fn test_delayed_sync_ten_blocks() -> Result<(), anyhow::Error> {
NodeMode::SequencerNode,
None,
DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT,
false,
true,
)
.await;
});
Expand Down Expand Up @@ -277,7 +277,7 @@ async fn test_delayed_sync_ten_blocks() -> Result<(), anyhow::Error> {
NodeMode::FullNode(seq_port),
None,
DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT,
false,
true,
)
.await;
});
Expand Down Expand Up @@ -339,7 +339,7 @@ async fn test_close_and_reopen_full_node() -> Result<(), anyhow::Error> {
NodeMode::SequencerNode,
None,
DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT,
false,
true,
)
.await;
});
Expand All @@ -360,7 +360,7 @@ async fn test_close_and_reopen_full_node() -> Result<(), anyhow::Error> {
NodeMode::FullNode(seq_port),
Some("demo_data_test_close_and_reopen_full_node"),
DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT,
false,
true,
)
.await;
});
Expand Down Expand Up @@ -440,7 +440,7 @@ async fn test_close_and_reopen_full_node() -> Result<(), anyhow::Error> {
NodeMode::FullNode(seq_port),
Some("demo_data_test_close_and_reopen_full_node_copy"),
DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT,
false,
true,
)
.await;
});
Expand Down Expand Up @@ -493,7 +493,7 @@ async fn test_get_transaction_by_hash() -> Result<(), anyhow::Error> {
NodeMode::SequencerNode,
None,
DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT,
false,
true,
)
.await;
});
Expand All @@ -513,7 +513,7 @@ async fn test_get_transaction_by_hash() -> Result<(), anyhow::Error> {
NodeMode::FullNode(seq_port),
None,
DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT,
false,
true,
)
.await;
});
Expand Down Expand Up @@ -747,7 +747,7 @@ async fn test_reopen_sequencer() -> Result<(), anyhow::Error> {
NodeMode::SequencerNode,
Some("demo_data_test_reopen_sequencer"),
DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT,
false,
true,
)
.await;
});
Expand Down Expand Up @@ -791,7 +791,7 @@ async fn test_reopen_sequencer() -> Result<(), anyhow::Error> {
NodeMode::SequencerNode,
Some("demo_data_test_reopen_sequencer_copy"),
DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT,
false,
true,
)
.await;
});
Expand Down
2 changes: 1 addition & 1 deletion examples/demo-rollup/tests/evm/archival_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async fn test_archival_state() -> Result<(), anyhow::Error> {
NodeMode::SequencerNode,
None,
DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT,
false,
true,
)
.await;
});
Expand Down
2 changes: 1 addition & 1 deletion examples/demo-rollup/tests/evm/gas_price.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async fn test_gas_price_increase() -> Result<(), anyhow::Error> {
NodeMode::SequencerNode,
None,
DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT,
false,
true,
)
.await;
});
Expand Down
6 changes: 3 additions & 3 deletions examples/demo-rollup/tests/evm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async fn web3_rpc_tests() -> Result<(), anyhow::Error> {
NodeMode::SequencerNode,
None,
DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT,
false,
true,
)
.await;
});
Expand Down Expand Up @@ -81,7 +81,7 @@ async fn evm_tx_tests() -> Result<(), anyhow::Error> {
NodeMode::SequencerNode,
None,
DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT,
false,
true,
)
.await;
});
Expand Down Expand Up @@ -116,7 +116,7 @@ async fn test_eth_get_logs() -> Result<(), anyhow::Error> {
NodeMode::SequencerNode,
None,
DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT,
false,
true,
)
.await;
});
Expand Down
2 changes: 1 addition & 1 deletion examples/demo-rollup/tests/evm/tracing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async fn tracing_tests() -> Result<(), Box<dyn std::error::Error>> {
NodeMode::SequencerNode,
None,
DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT,
false,
true,
)
.await;
});
Expand Down
2 changes: 1 addition & 1 deletion examples/demo-rollup/tests/mempool/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async fn initialize_test() -> (JoinHandle<()>, Box<TestClient>) {
NodeMode::SequencerNode,
None,
DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT,
false,
true,
)
.await;
});
Expand Down
2 changes: 1 addition & 1 deletion examples/demo-rollup/tests/sequencer_commitments/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async fn sequencer_sends_commitments_to_da_layer() {
NodeMode::SequencerNode,
None,
4,
false,
true,
)
.await;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async fn too_many_l2_block_per_l1_block() {
NodeMode::SequencerNode,
None,
DEFAULT_MIN_SOFT_CONFIRMATIONS_PER_COMMITMENT,
false,
true,
)
.await;
});
Expand Down
4 changes: 2 additions & 2 deletions examples/demo-rollup/tests/test_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub async fn start_rollup(
node_mode: NodeMode,
db_path: Option<&str>,
min_soft_confirmations_per_commitment: u64,
ignore_tx_body: bool,
include_tx_body: bool,
) {
let mut path = db_path.map(Path::new);
let mut temp_dir: Option<tempfile::TempDir> = None;
Expand Down Expand Up @@ -75,7 +75,7 @@ pub async fn start_rollup(
}
NodeMode::SequencerNode => None,
},
ignore_tx_body,
include_tx_body,
};

let sequencer_config = SequencerConfig {
Expand Down
3 changes: 1 addition & 2 deletions full-node/chainway-sequencer/src/sequencer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,7 @@ where

self.state_root = next_state_root;

self.ledger_db
.commit_soft_batch(soft_batch_receipt, false)?;
self.ledger_db.commit_soft_batch(soft_batch_receipt, true)?;

self.mempool
.remove_transactions(self.db_provider.last_block_tx_hashes());
Expand Down
4 changes: 2 additions & 2 deletions full-node/db/sov-db/src/ledger_db/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ impl LedgerDB {
pub fn commit_soft_batch<B: Serialize, T: Serialize, DS: DaSpec>(
&self,
batch_receipt: SoftBatchReceipt<B, T, DS>,
ignore_tx_body: bool,
include_tx_body: bool,
) -> Result<(), anyhow::Error> {
// Create a scope to ensure that the lock is released before we commit to the db
let mut current_item_numbers = {
Expand Down Expand Up @@ -284,7 +284,7 @@ impl LedgerDB {

// Rollup full nodes don't need to store the tx body as they already store evm body
// Sequencer full nodes need to store the tx body as they are the only ones that have it
if ignore_tx_body {
if !include_tx_body {
tx_to_store.body = None;
}

Expand Down
8 changes: 4 additions & 4 deletions full-node/sov-stf-runner/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ pub struct RollupConfig<DaServiceConfig> {
pub sequencer_public_key: Vec<u8>,
/// Prover service configuration.
pub prover_service: ProverServiceConfig,
/// Saves sequencer soft batches if set to false
pub ignore_tx_body: bool,
/// Saves sequencer soft batches if set to true
pub include_tx_body: bool,
}

/// Reads toml file as a specific type.
Expand Down Expand Up @@ -99,7 +99,7 @@ mod tests {
fn test_correct_config() {
let config = r#"
sequencer_public_key = "0000000000000000000000000000000000000000000000000000000000000000"
ignore_tx_body = false
include_tx_body = true
[da]
celestia_rpc_auth_token = "SECRET_RPC_TOKEN"
celestia_rpc_address = "http://localhost:11111/"
Expand Down Expand Up @@ -146,7 +146,7 @@ mod tests {
prover_service: ProverServiceConfig {
aggregated_proof_block_jump: 22,
},
ignore_tx_body: false,
include_tx_body: true,
};
assert_eq!(config, expected);
}
Expand Down
8 changes: 4 additions & 4 deletions full-node/sov-stf-runner/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ where
sequencer_client: Option<SequencerClient>,
sequencer_pub_key: Vec<u8>,
phantom: std::marker::PhantomData<C>,
ignore_tx_body: bool,
include_tx_body: bool,
}

/// Represents the possible modes of execution for a zkVM program
Expand Down Expand Up @@ -123,7 +123,7 @@ where
prover_service: Option<Ps>,
sequencer_client: Option<SequencerClient>,
sequencer_pub_key: Vec<u8>,
ignore_tx_body: bool,
include_tx_body: bool,
) -> Result<Self, anyhow::Error> {
let rpc_config = runner_config.rpc_config;

Expand Down Expand Up @@ -172,7 +172,7 @@ where
sequencer_client,
sequencer_pub_key,
phantom: std::marker::PhantomData,
ignore_tx_body,
include_tx_body,
})
}

Expand Down Expand Up @@ -499,7 +499,7 @@ where
};

self.ledger_db
.commit_soft_batch(soft_batch_receipt, self.ignore_tx_body)?;
.commit_soft_batch(soft_batch_receipt, self.include_tx_body)?;
self.ledger_db
.extend_l2_range_of_l1_slot(
SlotNumber(filtered_block.header().height()),
Expand Down
4 changes: 2 additions & 2 deletions full-node/sov-stf-runner/tests/runner_initialization_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fn initialize_runner(
aggregated_proof_block_jump: 1,
},
sequencer_client: None,
ignore_tx_body: false,
include_tx_body: true,
};

let da_service = MockDaService::new(address);
Expand Down Expand Up @@ -123,7 +123,7 @@ fn initialize_runner(
Some(prover_service),
None,
vec![0u8; 32],
false,
true,
)
.unwrap()
}
4 changes: 2 additions & 2 deletions full-node/sov-stf-runner/tests/runner_reorg_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ async fn runner_execution(
aggregated_proof_block_jump: 1,
},
sequencer_client: None,
ignore_tx_body: false,
include_tx_body: true,
};

let ledger_db = LedgerDB::with_path(path).unwrap();
Expand Down Expand Up @@ -177,7 +177,7 @@ async fn runner_execution(
Some(prover_service),
None,
vec![0u8; 32],
false,
true,
)
.unwrap();

Expand Down
2 changes: 1 addition & 1 deletion module-system/sov-modules-rollup-blueprint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ pub trait RollupBlueprint: Sized + Send + Sync {
prover_service,
sequencer_client,
rollup_config.sequencer_public_key,
rollup_config.ignore_tx_body,
rollup_config.include_tx_body,
)?;

Ok(Rollup {
Expand Down

0 comments on commit e3807a5

Please sign in to comment.