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

Warm up contract cache with bytecode from current transaction #2509

Closed
alexghr opened this issue Sep 25, 2023 · 0 comments · Fixed by #2549
Closed

Warm up contract cache with bytecode from current transaction #2509

alexghr opened this issue Sep 25, 2023 · 0 comments · Fixed by #2549
Assignees

Comments

@alexghr
Copy link
Contributor

alexghr commented Sep 25, 2023

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)

@github-project-automation github-project-automation bot moved this to Todo in A3 Sep 25, 2023
@alexghr alexghr self-assigned this Sep 25, 2023
@alexghr alexghr moved this from Todo to In Progress in A3 Sep 25, 2023
@alexghr alexghr moved this from In Progress to In Review in A3 Sep 27, 2023
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).
@github-project-automation github-project-automation bot moved this from In Review to Done in A3 Oct 3, 2023
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
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant