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

Framework upgrade #1229

Merged
merged 8 commits into from
Dec 22, 2023
Merged

Framework upgrade #1229

merged 8 commits into from
Dec 22, 2023

Conversation

pause125
Copy link
Collaborator

@pause125 pause125 commented Dec 13, 2023

Summary

  1. Add an onchain_config module and store sequencer address onchain when genesis init.
  2. Sequencer can upgrade framework
  3. Optimize account_storage::publish_modules for gas saving.

How to test

  1. After update framework code, run cargo run --package rooch-framework-release --bin rooch-framework-release -- -v 1 to build framework and save package to disk. Package binary will be saved at path: crates/rooch-framework-release/compiled/1/
  2. Use sequencer account to run rooch move framework -p crates/rooch-framework-release/compiled/1/stdlib to publish framework binary. If not sequencer account, the txn will fail. This command will submit txn to call rooch_framework::upgrade::upgrade_entry function.

TODO

  • Version management. Currently, a framework_version number is recorded onchain, every invoking rooch_framework::upgrade::upgrade_entry will increment this number, ignoring the version set in command cargo run --package rooch-framework-release --bin rooch-framework-release -- -v <version_number>

  • Find an appropriate way to test framework upgrades in CI.

  • Closes [Framework] Framework upgrade #1219

Copy link

vercel bot commented Dec 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
rooch ⬜️ Ignored (Inspect) Visit Preview Dec 22, 2023 0:24am

@pause125 pause125 marked this pull request as ready for review December 21, 2023 15:14
entry fun upgrade_entry(ctx: &mut Context, account: &signer,
move_std_bundles: vector<vector<u8>>,
moveos_std_bundles: vector<vector<u8>>,
rooch_framework_bundles: vector<vector<u8>>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Also need the bitcoin_move_bundles

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!

@jolestar jolestar merged commit 6a3797f into rooch-network:main Dec 22, 2023
5 checks passed
@pause125 pause125 deleted the framework-upgrade1 branch May 23, 2024 14:46
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.

[Framework] Framework upgrade
3 participants