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

feat(jstzd): add bootstrap smart rollups to ProtocolParameterBuilder #579

Open
wants to merge 1 commit into
base: huanchengchang-jstz-149-1
Choose a base branch
from

Conversation

huancheng-trili
Copy link
Collaborator

@huancheng-trili huancheng-trili commented Sep 27, 2024

Context

Completes JSTZ-149.

JSTZ-149

Description

Adds bootstrap smart rollups to the base protocol parameter set.

Each BootstrapSmartRollup instance has 4 fields:

pub struct BootstrapSmartRollup {
    /// Rollup address.
    address: SmartRollupHash,
    /// Type of Proof-generating Virtual Machine (PVM) that interprets the kernel.
    pvm_kind: SmartRollupPvmKind,
    /// Smart rollup kernel in hex string.
    kernel: String,
    /// Michelson type of the rollup entrypoint in JSON format.
    parameters_ty: Value,
}

To add a bootstrap rollup, the simplest way imo is to create a sandbox and actually deploy the rollup. The operation where the rollup is originated contains all the information needed to instantiate BootstrapSmartRollup. Added one example file that contains all necessary information of a toy rollup. Note that address can be any valid smart rollup address.

Manually testing the PR

  • Generated one parameter file with the sample smart rollup code attached and tested the file in a sandbox.
  • Unit test: add new test cases
  • Integration test: waiting for other octez-client implementation

Copy link

codecov bot commented Sep 27, 2024

Codecov Report

Attention: Patch coverage is 98.13665% with 3 lines in your changes missing coverage. Please review.

Project coverage is 38.80%. Comparing base (4e6d7db) to head (c050ba0).

Files with missing lines Patch % Lines
crates/jstzd/src/protocol/bootstrap.rs 97.54% 1 Missing and 2 partials ⚠️
Files with missing lines Coverage Δ
crates/jstzd/src/protocol/mod.rs 89.65% <100.00%> (+2.46%) ⬆️
crates/jstzd/src/protocol/bootstrap.rs 97.24% <97.54%> (+0.27%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4e6d7db...c050ba0. Read the comment docs.

@huancheng-trili huancheng-trili marked this pull request as ready for review October 3, 2024 19:25
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