Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simulate should simulate full transactions not only private part #1377

Closed
LHerskind opened this issue Aug 2, 2023 · 1 comment
Closed

Simulate should simulate full transactions not only private part #1377

LHerskind opened this issue Aug 2, 2023 · 1 comment
Assignees
Labels
A-ux/devex Area: relates to external ux / devex. (Users typically are devs) (See also A-internal-devex)

Comments

@LHerskind
Copy link
Contributor

If running simulate as below, the full transaction will NOT be simulated. Instead, only the private part will be executed, and the public part merely added to enqueuedPublicFunctionCalls in the transaction object. The user won't know if their transaction will always fail and need to send it to figure it out.

await contract
    .methods
    .deposit_private(account.secret, 0n, 420n)
    .simulate({ origin: recipient });

The simulation should simulate the transaction in its entirety.

Fixing essentially sets up a new simulator that contains the two part, the private execution and the public execution and can execute them full from the point of view of the users state.

Fixing this might lead to #1375 being easier to implement as it essentially needs both databases for full execution

@LHerskind LHerskind added the A-internal-devex Area: Relates to the devex of internal teams building Aztec. label Aug 2, 2023
@github-project-automation github-project-automation bot moved this to Todo in A3 Aug 2, 2023
@LHerskind LHerskind removed this from the 🚀 Initial Aztec Sandbox Release milestone Aug 7, 2023
@iAmMichaelConnor iAmMichaelConnor added A-ux/devex Area: relates to external ux / devex. (Users typically are devs) (See also A-internal-devex) and removed A-internal-devex Area: Relates to the devex of internal teams building Aztec. labels Aug 25, 2023
@sirasistant sirasistant self-assigned this Aug 29, 2023
sirasistant added a commit that referenced this issue Aug 30, 2023
…ts on them (#1853)

Resolves #1813 and
#1377
- Simulates the public part of transactions before submission to the
node.
- Introduces a SimulationError to show complete call stacks (aztec
function calls and noir function calls)
- Reconstructs public function errors to show noir call stacks on public
functions after simulation
- Fixes a bug where the public tx processor was mutating Tx objects in
place.
@sirasistant
Copy link
Collaborator

Done in #1853

@github-project-automation github-project-automation bot moved this from Todo to Done in A3 Sep 5, 2023
codygunton pushed a commit that referenced this issue Jan 23, 2024
* Audit preperation (#1305)

* compiler warnings

* add solhint + fix small linter issues

* remove skipped tests

* update rollup address

* add underscores on arguments in IVerifier

* JB/Move global error to toast group (#1251)

* Move global error message inside toast group

* Mini refactor

* Mini refactor

* Add deferrals

* Blockchain test jest -> mocha update (#1314)

* run jest-to-mocha script

* Manually fix the last test + add coverage + formatting

* extend mocha timeout + bump optimizer runs

* decrease optimizer runs to deploy old rollup processor in testing

* remove coverage package, install on demand

* make solidity-coverage import a comment in hardhat config

* JB/Fix settlement times (#1315)

Fix batched time, fix button regression

* JB/Allow for debug to be exportable (#1313)

* Allow for debug to be exportable

* Remove exportable debug

* Rollback

* Refactor

* Tweak export logs

* Upgrade to latest bridge clients (#1319)

- Align with interface on latest bridge-clients
- Correct stETH address
- Calc element ROI via getTermAPR
- Calc stETH via getUnderlyingAsset

* Explain when to squash vs merge (#1302)

* Zw/update aztec connect specs (#1048)

* updated account circuit

* updated account circuit formatting

* updated schnorr spec

* updated intro

* fix typo

* updates in line with PR comments and rebase

Co-authored-by: Josh <[email protected]>
Co-authored-by: iAmMichaelConnor <[email protected]>

* Implemented rate limiting of deposits and address blacklist (#1323)

* Implemented rate limiting of deposits and address blacklist

* Cleanup

* Additionally check num deposits in tx receiver (#1326)

* Additionally check num deposits in tx receiver

* Sanity check input

* Additional tests (#1327)

* JB/Connect yearn bridge (#1334)

* Add yearn recipe

* Connect yearn bridge

* Fix toast z-index

* Fix price estimation for yearn bridge

* Take out console log

* Set up yvDAI bridge config

* Add styling for yearn (wip)

* Add price fetcher for yvDAI and yvETH

* Fix icon

* Fix exit modal

* Fixes and improvements

* Add collapse button to Toast component (#1322)

* don't expose blacklist (#1352)

* don't expose blacklist

* don't use delete keyword

* fix status endpoint types

* format

* fix server

* fix server

* Expose blacklist as undefined from public api.

Co-authored-by: Leila Wang <[email protected]>

* Jcf/hotfix yearn exit (#1356)

* - allow exiting via a different bridgeAddressId
- fix incorrect batch info shown for exiting
- more explicit name: useDefaultEnterBridgeCallData
- fix wstETH price fetch regression

* upgrade bridge clients

* explicitly upgrade ethers

* Jcf/element hotfixes (#1377)

- safe number to bigint conversion
- fix default element term apr when entering
- infer async from recipe, not interaction result

Co-authored-by: joss-aztec <[email protected]>
Co-authored-by: Lasse Herskind <[email protected]>
Co-authored-by: Jonathan Bursztyn <[email protected]>
Co-authored-by: Zachary James Williamson <[email protected]>
Co-authored-by: Josh <[email protected]>
Co-authored-by: iAmMichaelConnor <[email protected]>
Co-authored-by: Joe Andrews <[email protected]>
Co-authored-by: Leila Wang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ux/devex Area: relates to external ux / devex. (Users typically are devs) (See also A-internal-devex)
Projects
Archived in project
Development

No branches or pull requests

3 participants