Skip to content

Commit

Permalink
fix(revert): "feat(avm): storage" (#5019)
Browse files Browse the repository at this point in the history
Reverts AztecProtocol/aztec-packages#4673 due to an uncaught issue with
end-to-end tests
  • Loading branch information
superstar0402 committed Mar 19, 2024
1 parent de11d65 commit 3be81ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
11 changes: 3 additions & 8 deletions aztec/src/context.nr
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,18 @@ use avm::AVMContext;
struct Context {
private: Option<&mut PrivateContext>,
public: Option<&mut PublicContext>,
public_vm: Option<&mut AVMContext>,
}

impl Context {
pub fn private(context: &mut PrivateContext) -> Context {
Context { private: Option::some(context), public: Option::none(), public_vm: Option::none() }
Context { private: Option::some(context), public: Option::none() }
}

pub fn public(context: &mut PublicContext) -> Context {
Context { public: Option::some(context), private: Option::none(), public_vm: Option::none() }
}

pub fn public_vm(context: &mut AVMContext) -> Context {
Context { public_vm: Option::some(context), public: Option::none(), private: Option::none() }
Context { public: Option::some(context), private: Option::none() }
}

pub fn none() -> Context {
Context { public: Option::none(), private: Option::none(), public_vm: Option::none() }
Context { public: Option::none(), private: Option::none() }
}
}
4 changes: 2 additions & 2 deletions aztec/src/oracle/storage.nr
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ pub fn storage_read<N>(storage_slot: Field) -> [Field; N] {
}

#[oracle(storageWrite)]
fn storage_write_oracle<N>(_storage_slot: Field, _values: [Field; N]) -> Field {}
fn storage_write_oracle<N>(_storage_slot: Field, _values: [Field; N]) -> [Field; N] {}

unconstrained pub fn storage_write<N>(storage_slot: Field, fields: [Field; N]) {
let _ = storage_write_oracle(storage_slot, fields);
let _hash = storage_write_oracle(storage_slot, fields);
}

0 comments on commit 3be81ab

Please sign in to comment.