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: build deterministic runtime #425

Merged
merged 110 commits into from
Mar 7, 2025

Conversation

AlexD10S
Copy link
Collaborator

@AlexD10S AlexD10S commented Feb 24, 2025

This is the second step in a larger PR: #404. It prepares the chain spec for a production-ready environment by building the runtime deterministically.

How to test it
This functionality is integrated into the pop up logic and runs automatically when deploying a parachain.
To test only the deterministic chain spec build separately, run:

pop build spec --deterministic

[sc-1032]

@AlexD10S AlexD10S force-pushed the feat/pop-up-for-parachain branch from 550102a to 7d3028f Compare March 3, 2025 10:08
Copy link
Collaborator

@Daanvdplas Daanvdplas left a comment

Choose a reason for hiding this comment

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

PR looking good! Left a few small final comments

@Daanvdplas
Copy link
Collaborator

Daanvdplas commented Mar 5, 2025

Can we not reuse the logic that Tin has made for the benchmarking feature. It locates the runtime packages from looking at the diagram bottom left

@AlexD10S AlexD10S force-pushed the feat/build-deterministic-runtime branch 2 times, most recently from 621cb9c to 005a822 Compare March 5, 2025 20:05
Base automatically changed from feat/pop-up-for-parachain to feat/deploy-parachain March 5, 2025 21:45
@AlexD10S AlexD10S force-pushed the feat/deploy-parachain branch from 4f594c4 to 75896e8 Compare March 5, 2025 21:47
@AlexD10S
Copy link
Collaborator Author

AlexD10S commented Mar 6, 2025

Can we not reuse the logic that Tin has made for the benchmarking feature. It locates the runtime packages from looking at the diagram bottom left

The link isn't working. Do you mean to prompt the user for the list of runtimes? It's a nice feature to have, once Tin's PR is merged, we can reuse the code in this feature.

@AlexD10S AlexD10S requested a review from Daanvdplas March 6, 2025 08:01
@Daanvdplas
Copy link
Collaborator

The link isn't working. Do you mean to prompt the user for the list of runtimes? It's a nice feature to have, once Tin's PR is merged, we can reuse the code in this feature.

Yes lets do that!

Copy link
Collaborator

@Daanvdplas Daanvdplas left a comment

Choose a reason for hiding this comment

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

Nice work!

@AlexD10S AlexD10S merged commit b413add into feat/deploy-parachain Mar 7, 2025
11 of 13 checks passed
@AlexD10S AlexD10S deleted the feat/build-deterministic-runtime branch March 7, 2025 13:26
AlexD10S added a commit that referenced this pull request Mar 10, 2025
* test: detects_project_type_correctly

* feat: parachain deployment in pop up

* fix: parachain feature

* docs: improve comments

* feat: deploy a parachain commands

* feat: build specs in pop up

* feat: logic to interact with a chain

* feat: register parachain

* refactor: clean code and improve docs

* test: unit tests for pop up methods

* refactor: small fixes with visibility and removing logs

* feat: return events in submit_signed_extrinsic

* feat: get para_id from event

* test: fix detects_parachain_correctly

* refactor: improve docs and code

* test: fix change_working_directory_works

* fix: clippy warnings

* refactor: move submit_extrinsic_with_wallet in a common file

* refactor: remove unnecesary code

* refactor: UpChainCommand structure

* test: adjust tests to refactored struct

* refactor: renaming prepare_register_parachain_call_data and prepare_rerve_parachain_call_data

* refactor: move events module

* fix: submit_extrinsic_with_wallet under parachain feature

* refactor: remove unnecesary code

* test: increase coverage with reserve_parachain_id_fails_wrong_chain and resolve_genesis_files_fails_wrong_path

* refactor: remove unnecesary clones

* refactor: minor improvements

* test: refactor tests and include comments

* refactor: map errors in submit_extrinsic_with_wallet

* test: fix prepare_register_parachain_call_data_works

* feat: container_engine to detect container to use

* feat: generate_deterministic_runtime logic

* feat: srtool logic

* feat: build deterministic runtime in build spec command

* feat: update_runtime_code

* test: include tests for updateing code

* refactor: clean unnecesary code

* test: in container_engine

* refactor: docker warning in container_engine

* chore: improve screen messaging

* refactor: use profile picked by the user

* refactor: docs in ContainerEngine and clean prints

* fix: generate_deterministic_runtime parameter

* refactor: rename, improve messages and clean empty lines

* feat: extract package name automatically from runtime dir

* docs: change broken link

* refactor: update srtool_lib crate and remove unnecesary code

* docs: include srtool in Acknowledgements

* refactor: remove unnecesary Error

* test: detects_project_type_correctly

* feat: parachain deployment in pop up

* fix: parachain feature

* docs: improve comments

* feat: replace index.html with summary costs in ui (#430)

* refactor: rename parachain to rollup

* docs: improve deprecation message

* refactor: rename parachain to rollup in up help

* feat: deploy a parachain commands

* feat: build specs in pop up

* feat: logic to interact with a chain

* feat: register parachain

* refactor: clean code and improve docs

* test: unit tests for pop up methods

* refactor: small fixes with visibility and removing logs

* feat: return events in submit_signed_extrinsic

* feat: get para_id from event

* test: fix detects_parachain_correctly

* refactor: improve docs and code

* test: fix change_working_directory_works

* fix: clippy warnings

* refactor: move submit_extrinsic_with_wallet in a common file

* refactor: remove unnecesary code

* refactor: UpChainCommand structure

* test: adjust tests to refactored struct

* refactor: renaming prepare_register_parachain_call_data and prepare_rerve_parachain_call_data

* refactor: move events module

* fix: submit_extrinsic_with_wallet under parachain feature

* refactor: remove unnecesary code

* test: increase coverage with reserve_parachain_id_fails_wrong_chain and resolve_genesis_files_fails_wrong_path

* refactor: remove unnecesary clones

* refactor: minor improvements

* test: refactor tests and include comments

* refactor: map errors in submit_extrinsic_with_wallet

* test: fix prepare_register_parachain_call_data_works

* refactor: move configure_chain into a common folder

* refactor: function visibility

* fix: error message and include test for it

* refactor: build specs removing repetitive code

* refactor: use prepare_extrinsic from Call module to prepare a call

* docs: improve comments and messages

* refactor: rename variables and structs

* refactor: relay_chain_url

* refactor: rename prepare_reserve_call_data and prepare_register_call_data

* test: remove unnecesary test

* refactor: remove events module

* refactor: rename parachain to rollup

* chore: improve succesful message

* chore: change intro title to use rollup

* docs: comments for Reserved event

* chore: always prompt the user to build runtime deterministacally and improve message

* docs: improve and add missing comments

* refactor: clean code to prompt for the package and runtime dir

* docs: improve warning message

* refactor: rename variables and structs

* fix: throw error message when build deterministic runtime fail

* feat: include skip_deterministic_build flag to avoid prompting the user

* docs: improve comments
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.

4 participants