Skip to content

Commit

Permalink
[genesis] Release framework v9 and reset main genesis (#2599)
Browse files Browse the repository at this point in the history
  • Loading branch information
jolestar authored Sep 9, 2024
1 parent 9d1aed7 commit 2f45981
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 3 deletions.
Binary file modified crates/rooch-genesis/released/main
Binary file not shown.
2 changes: 1 addition & 1 deletion crates/rooch-types/src/genesis_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ pub static G_MAIN_CONFIG: Lazy<GenesisConfig> = Lazy::new(|| GenesisConfig {
RoochToBitcoinAddressMapping::type_layout(),
),
],
stdlib_version: StdlibVersion::Version(8),
stdlib_version: StdlibVersion::Version(9),
});

#[cfg(test)]
Expand Down
28 changes: 28 additions & 0 deletions frameworks/framework-release/released/8/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Rooch Move Framework v8

** Note: This version contains breaking changes and is not compatible with the previous version.**

## Major changes

1. Bitcoin-related improvements:
- Implemented Bitcoin consensus encode/decode
- Added support for TempStateDropEvent for UTXO and Inscription
- Refactored ordinals inscription updater
- Fixed inscription bugs and skipped op return
- Fixed Taproot leaf node serialize bug.

2. Framework enhancements:
- Introduced oracle functionality and admin capabilities
- Renamed Rooch GasCoin symbol to RGas and Set gas coin icon
- Added onchain_config::ConfigUpdateCap
- Refactored package publishing, Implemented new framework upgrade function and `UpgradeCap`
- Cleaned up deprecated functions and TODOs
- Cleaned up transaction sequence info compatible code
- SignData use bitcoin consensus encode to serialize.
- Added support for TypeTag and StructTag to canonical string with prefix
- Init rooch dao multisign account when genesis init.

3. Miscellaneous updates:
- Migrated wasm library from moveos_std to rooch_nursery
- Refactored sort function in moveos_std
- Added unpack_transfer_utxo_event function
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions frameworks/framework-release/released/9/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Rooch Move Framework v9

* Mint `500000000_00000000` RGas to RoochDAO when genesis init.
Binary file added frameworks/framework-release/released/9/stdlib
Binary file not shown.
9 changes: 9 additions & 0 deletions frameworks/rooch-framework/doc/genesis.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,12 @@ GenesisContext is a genesis init parameters in the TxContext.

<pre><code><b>const</b> <a href="genesis.md#0x3_genesis_ErrorGenesisInit">ErrorGenesisInit</a>: u64 = 1;
</code></pre>



<a name="0x3_genesis_GENESIS_INIT_GAS_AMOUNT"></a>



<pre><code><b>const</b> <a href="genesis.md#0x3_genesis_GENESIS_INIT_GAS_AMOUNT">GENESIS_INIT_GAS_AMOUNT</a>: <a href="">u256</a> = 50000000000000000;
</code></pre>
11 changes: 9 additions & 2 deletions frameworks/rooch-framework/sources/genesis.move
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ module rooch_framework::genesis {

const ErrorGenesisInit: u64 = 1;

const GENESIS_INIT_GAS_AMOUNT: u256 = 500000000_00000000u256;

/// GenesisContext is a genesis init parameters in the TxContext.
struct GenesisContext has copy,store,drop{
chain_id: u64,
Expand Down Expand Up @@ -68,8 +70,13 @@ module rooch_framework::genesis {
module_store::issue_upgrade_cap_by_system(genesis_account, addr, rooch_dao_address);
});

// give some gas coin to the rooch dao
gas_coin::faucet(rooch_dao_address, 1000000_00000000u256);
// give initial gas to the rooch dao
gas_coin::faucet(rooch_dao_address, GENESIS_INIT_GAS_AMOUNT);

// give initial gas to the sequencer if it's local or dev
if(chain_id::is_local_or_dev()){
gas_coin::faucet(sequencer_addr, GENESIS_INIT_GAS_AMOUNT);
}
}


Expand Down

0 comments on commit 2f45981

Please sign in to comment.