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): spwan rollup in jstzd server #666

Conversation

ryutamago
Copy link
Collaborator

@ryutamago ryutamago commented Nov 14, 2024

Context

Spawn rollup in jstzd

Description

  • jstzd now spawns rollup
  • add util functions to wait for the block to reach certain level. Needed because we can't start the rollup until the block level 3 when the alpha protocol is enabled

NOTE: it could be helpful to have a script that will generate the jstzd binaries in the future but for now we can just manually add them.

Manually testing the PR

integration test:

cargo test --package jstzd --test jstzd_test       

@ryutamago ryutamago marked this pull request as ready for review November 14, 2024 17:27
@@ -164,18 +280,12 @@ async fn read_bootstrap_contracts() -> Vec<BootstrapContract> {
contracts
}

async fn check_bootstrap_contracts(octez_client: &OctezClient) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can move this function back to this position from above so that there are fewer lines modified

rollup_parameters_ty: &Path,
) -> ProtocolParameter {
ProtocolParameterBuilder::new()
// this is the activator account
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment here needs to be updated

let baker_destroyed = retry(30, 1000, || async {
Ok(!run_ps().await.contains("octez-baker"))
})
.await;
assert!(baker_destroyed);

let rollup_destroyed = retry(30, 1000, || async {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might not always work. See #664.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will use the health check method for now and can use the approach later

use std::path::{Path, PathBuf};
use tezos_crypto_rs::hash::{BlockHash, OperationHash, SmartRollupHash};
use tokio::io::AsyncReadExt;

pub const ACTIVATOR_SECRET_KEY: &str =
"unencrypted:edsk31vznjHSSpGExDMHYASz45VZqXN4DPxvsa4hAyY8dHM28cZzp6";
pub const ROLLUP_ADDRESS: &str = "sr1PuFMgaRUN12rKQ3J2ae5psNtwCxPNmGNK";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the address need to change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, i've changed the toy rollup address in sandbox-params.json due to the conflict w JSTZ_ROLLUP_ADDRESS

@ryutamago ryutamago force-pushed the leounoki-jstz-164/spawn-rollup-1 branch from ebde2de to cb07043 Compare November 15, 2024 09:35
@ryutamago ryutamago force-pushed the leounoki-jstz-164/spawn-rollup-2 branch 2 times, most recently from 3dcf8bc to 97468a0 Compare November 15, 2024 09:52
@ryutamago ryutamago force-pushed the leounoki-jstz-164/spawn-rollup-2 branch from 97468a0 to 0c16731 Compare November 15, 2024 10:11
@ryutamago
Copy link
Collaborator Author

closing for this

@ryutamago ryutamago closed this Nov 21, 2024
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.

2 participants