-
Notifications
You must be signed in to change notification settings - Fork 266
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
Warm up contract cache with bytecode from current transaction #2509
Comments
4 tasks
alexghr
added a commit
that referenced
this issue
Oct 3, 2023
This PR aims to enable calling of public functions in Noir contract constructors. In order to fix this issue this PR does the following two changes: - previously the `PublicExecutor` only looked at deployed contracts. Now it also looks at the contracts being deployed in the current block - the public kernel simulator 'lost' the contract's address so when publishing the block it would have contract data as all zeros. This PR updates the common initialisation function to pass on `new_contracts`. Fix #2509 Related to #2249 # Checklist: Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge. - [ ] If the pull request requires a cryptography review (e.g. cryptographic algorithm implementations) I have added the 'crypto' tag. - [x] I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code. - [x] Every change is related to the PR description. - [x] I have [linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) this pull request to relevant issues (if any exist).
Maddiaa0
pushed a commit
that referenced
this issue
Oct 6, 2023
This PR aims to enable calling of public functions in Noir contract constructors. In order to fix this issue this PR does the following two changes: - previously the `PublicExecutor` only looked at deployed contracts. Now it also looks at the contracts being deployed in the current block - the public kernel simulator 'lost' the contract's address so when publishing the block it would have contract data as all zeros. This PR updates the common initialisation function to pass on `new_contracts`. Fix #2509 Related to #2249 # Checklist: Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge. - [ ] If the pull request requires a cryptography review (e.g. cryptographic algorithm implementations) I have added the 'crypto' tag. - [x] I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code. - [x] Every change is related to the PR description. - [x] I have [linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) this pull request to relevant issues (if any exist).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently if a a contract tries to call a public function in its constructor the transaction fails because the Sequencer can not find the contract's bytecode on the blockchain (it hasn't been deployed yet).
This issue is about prefilling the contract data store with the bytecode in the current transaction. There may be other issues before public calls can be made in contract constructors (see #2249)
The text was updated successfully, but these errors were encountered: