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

fix: Use RunContext to avoid cargo_metadata in production context #260

Merged
merged 4 commits into from
Dec 6, 2024

Conversation

ratankaliani
Copy link
Member

@ratankaliani ratankaliani commented Dec 6, 2024

  • Introduce RunContext to delineate binary paths in the development context vs production (Docker) context.
  • Only include the necessary binaries in the Docker image.
  • GetSpanBatches -> GetRangeProofBoundaries.

For a more optimized build, we can use a path that is not reliant on the binary being in a cargo workspace. This means that we can keep only the binaries we need and nothing else.

cargo_metadata should not be used in a production context, because it requires bloated builds in order to execute.

In a future PR, we can optimize the Docker build in the second stage. We should verify if some of the dependencies (e.g. SP1, Rust) are necessary, along with the installed Ubuntu libraries.

@ratankaliani ratankaliani changed the title fix: cherry pick off of ratan debug deployments fix: docker cache Dec 6, 2024
@ratankaliani ratankaliani changed the title fix: docker cache feat: RunContext Dec 6, 2024
@ratankaliani ratankaliani changed the title feat: RunContext fix: Use RunContext to avoid cargo_metadata in production contexts Dec 6, 2024
@ratankaliani ratankaliani changed the title fix: Use RunContext to avoid cargo_metadata in production contexts fix: Use RunContext to avoid cargo_metadata in production context Dec 6, 2024
Copy link

github-actions bot commented Dec 6, 2024

Metric Value
Batch Start 20,822,130
Batch End 20,822,135
Witness Generation (seconds) 117
Execution Duration (seconds) 79
Total Instruction Count 1,800,206,699
Oracle Verify Cycles 411,910,799
Derivation Cycles 837,780,659
Block Execution Cycles 480,162,174
Blob Verification Cycles 168,284,637
Total SP1 Gas 2,118,806,822
Number of Blocks 6
Number of Transactions 57
Ethereum Gas Used 24,700,568
Cycles per Block 300,034,449
Cycles per Transaction 31,582,573
Transactions per Block 9
Gas Used per Block 4,116,761
Gas Used per Transaction 433,343
BN Pair Cycles 0
BN Add Cycles 0
BN Mul Cycles 0
KZG Eval Cycles 0
EC Recover Cycles 1,128,154

@ratankaliani ratankaliani merged commit c019e92 into main Dec 6, 2024
14 checks passed
@ratankaliani ratankaliani deleted the ratan/docker-cache-fix branch December 6, 2024 01:41
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 this pull request may close these issues.

1 participant