Skip to content

Commit

Permalink
Clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
4l0n50 committed Aug 5, 2024
1 parent 73164c0 commit dd872e2
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 35 deletions.
3 changes: 0 additions & 3 deletions Cargo.lock

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

4 changes: 1 addition & 3 deletions evm_arithmetization/src/cpu/kernel/asm/main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,7 @@ global perform_final_checks:
%pop3
PUSH 1 // initial trie data length
global check_state_trie:
%mpt_hash_state_trie %mload_global_metadata(@GLOBAL_METADATA_STATE_TRIE_DIGEST_AFTER)
global check_state_trie_before_eq:
%assert_eq
%mpt_hash_state_trie %mload_global_metadata(@GLOBAL_METADATA_STATE_TRIE_DIGEST_AFTER) %assert_eq
global check_txn_trie:
%mpt_hash_txn_trie %mload_global_metadata(@GLOBAL_METADATA_TXN_TRIE_DIGEST_AFTER) %assert_eq
global check_receipt_trie:
Expand Down
10 changes: 1 addition & 9 deletions evm_arithmetization/src/generation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,7 @@ fn simulate_cpu<F: Field>(state: &mut GenerationState<F>) -> anyhow::Result<()>
/// This will do nothing if the CPU execution failed outside of the final trie
/// root checks.
pub(crate) fn output_debug_tries<F: RichField>(state: &GenerationState<F>) -> anyhow::Result<()> {
println!("Yapo, quieros los tries");
if !log_enabled!(log::Level::Debug) {
println!("Santa cachucha!");
return Ok(());
}

Expand All @@ -348,15 +346,9 @@ pub(crate) fn output_debug_tries<F: RichField>(state: &GenerationState<F>) -> an
.read_global_metadata(GlobalMetadata::StateTrieRoot),
)
.map_err(|_| anyhow!("State trie pointer is too large to fit in a usize."))?;
let state_trie = get_state_trie::<HashedPartialTrie>(&state.memory, state_trie_ptr).unwrap();
log::debug!(
"Computed state trie hash: {:?}",
state_trie.hash()
);

log::debug!(
"Computed state trie: {:?}",
state_trie
get_state_trie::<HashedPartialTrie>(&state.memory, state_trie_ptr)
);

let txn_trie_ptr = u256_to_usize(
Expand Down
16 changes: 0 additions & 16 deletions evm_arithmetization/tests/simple_transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,6 @@ type C = KeccakGoldilocksConfig;
fn test_simple_transfer() -> anyhow::Result<()> {
init_logger();

let computed_account: AccountRlp = rlp::decode(&[
248, 77, 130, 1, 40, 135, 21, 148, 123, 150, 5, 119, 156, 160, 86, 232, 31, 23, 27, 204,
85, 166, 255, 131, 69, 230, 146, 192, 248, 110, 91, 72, 224, 27, 153, 108, 173, 192, 1, 98,
47, 181, 227, 99, 180, 33, 160, 197, 210, 70, 1, 134, 247, 35, 60, 146, 126, 125, 178, 220,
199, 3, 192, 229, 0, 182, 83, 202, 130, 39, 59, 123, 250, 216, 4, 93, 133, 164, 112,
])
.unwrap();

let expected_account: AccountRlp = rlp::decode(&[
248, 77, 130, 1, 40, 135, 21, 148, 123, 150, 5, 119, 156, 160, 86, 232, 31, 23, 27, 204,
85, 166, 255, 131, 69, 230, 146, 192, 248, 110, 91, 72, 224, 27, 153, 108, 173, 192, 1, 98,
47, 181, 227, 99, 180, 33, 160, 197, 210, 70, 1, 134, 247, 35, 60, 146, 126, 125, 178, 220,
199, 3, 192, 229, 0, 182, 83, 202, 130, 39, 59, 123, 250, 216, 4, 93, 133, 164, 112,
])
.unwrap();

let all_stark = AllStark::<F, D>::default();
let config = StarkConfig::standard_fast_config();

Expand Down
1 change: 0 additions & 1 deletion trace_decoder/src/decoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,6 @@ impl ProcessedBlockTrace {
)?;

let trie_roots_after = calculate_trie_input_hashes(curr_block_tries);

let gen_inputs = GenerationInputs {
txn_number_before: extra_data.txn_number_before,
gas_used_before: extra_data.gas_used_before,
Expand Down
3 changes: 0 additions & 3 deletions zero_bin/prover/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ ruint = { workspace = true, features = ["num-traits", "primitive-types"] }
ops = { workspace = true }
zero_bin_common = { workspace = true }
num-traits = { workspace = true }
evm_arithmetization = { workspace = true }
mpt_trie = {workspace = true}
keccak-hash = { workspace = true }

[features]
default = []
Expand Down

0 comments on commit dd872e2

Please sign in to comment.