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

hack: Allow skipping bytecode propagation when registering contract classes to support Sepolia #10000

Closed
spalladino opened this issue Nov 15, 2024 · 2 comments · Fixed by #10009
Assignees

Comments

@spalladino
Copy link
Collaborator

spalladino commented Nov 15, 2024

We cannot deploy public contracts to Sepolia because bytecode size is too large, which exceeds L1 tx maximum calldata size. To unblock us until we get blobs or reduced AVM public bytecode, we can hack the contract class registerer so it does not broadcast public bytecode if it goes over a configurable threshold, and manually register that bytecode into nodes in order to use it.

@spalladino spalladino self-assigned this Nov 15, 2024
spalladino added a commit that referenced this issue Nov 15, 2024
Skips emitting the event with the contract public bytecode when
registering the contract class. This allows for smaller L1 txs so they
fit in Sepolia. This is a temporary hack to be reverted.

To get bytecode into the nodes, we push it forcefully from the PXE
whenever we register a new contract. However, this only gets the
bytecode into the node that the PXE is connected to. To avoid nodes or
prover nodes from missing bytecode that is to be used for known
deployments, such as the token or token bridge contracts, we now
manually register them on initialization.

Reverting this is logged as issue #10007

Fixes #10000
@fcarreiro
Copy link
Contributor

Hmm, this is interesting. Public bytecode is not expected to get any smaller anytime soon. What's the calldata size? I think the token contract would now be between 30kB and 55kB?

@spalladino
Copy link
Collaborator Author

@fcarreiro I understand we should be fine when we move to blobs

spalladino added a commit that referenced this issue Nov 20, 2024
Skips emitting the event with the contract public bytecode when
registering the contract class. This allows for smaller L1 txs so they
fit in Sepolia. This is a temporary hack to be reverted.

To get bytecode into the nodes, we push it forcefully from the PXE
whenever we register a new contract. However, this only gets the
bytecode into the node that the PXE is connected to. To avoid nodes or
prover nodes from missing bytecode that is to be used for known
deployments, such as the token or token bridge contracts, we now
manually register them on initialization.

Reverting this is logged as issue #10007

Fixes #10000

Please read [contributing guidelines](CONTRIBUTING.md) and remove this
line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants