This commit is contained in:
Nicholas Ward 2022-06-13 14:37:29 -07:00
parent 3aaab765dd
commit 7c2cfebdee
4 changed files with 22 additions and 0 deletions

View File

@ -12,6 +12,7 @@ pub mod cross_table_lookup;
mod get_challenges;
pub mod keccak;
pub mod logic;
pub mod memory;
pub mod permutation;
pub mod proof;
pub mod prover;

View File

@ -0,0 +1,16 @@
#[derive(Default)]
pub struct TransactionMemory {
pub calls: Vec<ContractMemory>,
}
/// A virtual memory space specific to the current contract call.
pub struct ContractMemory {
pub code: MemorySegment,
pub main: MemorySegment,
pub calldata: MemorySegment,
pub returndata: MemorySegment,
}
pub struct MemorySegment {
pub content: Vec<u8>,
}

2
evm/src/memory/mod.rs Normal file
View File

@ -0,0 +1,2 @@
pub mod memory_stark;
pub mod registers;

View File

@ -0,0 +1,3 @@
//! Memory unit.
pub(super) const END: usize = super::START_MEMORY;