Conversation
| publicContractClass.packedBytecode, | ||
| Math.ceil(publicContractClass.packedBytecode.length / 32) + 1, | ||
| Math.ceil(publicContractClass.packedBytecode.length / 31) + 1, | ||
| ), |
There was a problem hiding this comment.
I copied this code only to realize that this 32 was wrong. Doesn't matter here because the bytecode is fake, but it mattered for real bytecode.
spalladino
left a comment
There was a problem hiding this comment.
LGTM! One question though: are the ContractsDataSourcePublicDB getters for classes and instances used from both public setup and public app? If so, should we disallow loading a contract class/instance created in a private revertible phase in the public setup? Otherwise, if the app logic reverts, the contract will never have been deployed, and public setup would be running on unpublished code. Does this make sense?
| const siloedNonRevertibleContractClassLogs = tx.data.forPublic | ||
| ? await tx.filterContractClassLogs( | ||
| tx.data.forPublic!.nonRevertibleAccumulatedData.contractClassLogsHashes, | ||
| /*siloed=*/ true, | ||
| ) | ||
| : await tx.filterContractClassLogs(tx.data.forRollup!.end.contractClassLogsHashes, /*siloed=*/ true); | ||
| const siloedRevertibleContractClassLogs = tx.data.forPublic | ||
| ? await tx.filterContractClassLogs( | ||
| tx.data.forPublic!.revertibleAccumulatedData.contractClassLogsHashes, | ||
| /*siloed=*/ true, | ||
| ) | ||
| : []; |
There was a problem hiding this comment.
This looks good! If it's easier/cleaner I can change tx.data.getNonEmptyContractClassLogsHashes() to a pair of fns like get(Non)RevertibleContractClassLogsHashes()? IIRC I added the original to make this code clearer, and have some cc log cleanup to do anyway (#12325). LMK!
There was a problem hiding this comment.
I think that would help clean this up! Can be done after this PR though
@spalladino good catch! I updated it so that we can add non-revertible contract infos separately from revertibles. Also note that before this PR, none of the contract classes/instances from a private-only TX were ever added to |
* master: (229 commits) feat: Sync from noir (#12315) fix: Only use debug logging for ENR mismatch (#12439) yolo upadate test pattern owners for kind tests fix: Don't exit on error when querying secret (#12438) fix: consolidate sepoliaETH job condition (#12437) chore: add `yq` to `bootstrap.sh check` (#12436) fix: ignition-testnet values & bot count (#12433) chore(archiver): l2proven number not required (#12424) chore: PXE oracle refactor (#12410) fix: txes handle sigint and sigterm, use dump fail to see any txe errors (#12427) git subrepo push --branch=master noir-projects/aztec-nr git_subrepo.sh: Fix parent in .gitrepo file. [skip ci] chore: replace relative paths to noir-protocol-circuits git subrepo push --branch=master barretenberg chore: set enrs and contract addresses in ignition-testnet (#12417) chore: reenable public teardown in orchestrator test (#12428) feat: add wasm mode for profiler (#12407) feat: contract instance/class cache for current tx - ensure that later txs in block cannot wipe out contracts created earlier (#12261) chore: pull out formatter changes from sync (#12426) chore: calculate available memory for noir-projects/bootstrap.sh memsuspend (#12419) ...
Ensures that contracts only get wiped out of the cache when they really should.
What's included
ContractDataSourcePublicDBas follows:TxContractCache.simulator/src/publicinto subfoldersIssues
I discovered during this work, that if you run certain test-cases in

deploy_method.test.tson their own (without running earlier test cases, they fail as follows (happens on master):This holds true for the new test. This might mean that contracts cannot be properly called after deployment in the same block! More investigation is needed in another ticket/pr.
Also, I can run all of the

deploy_method.test.tstests locally and they pass, but in CI, the new one fails: