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

Update the Move library to the latest version from the upstream. #1222

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
636 changes: 248 additions & 388 deletions Cargo.lock

Large diffs are not rendered by default.

68 changes: 34 additions & 34 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ bitcoin = { version = "0.31.0", features = ["rand-std"] }
bitcoincore-rpc = "0.18.0"
bip32 = "0.4.0"
byteorder = "1.4.3"
clap = { version = "4.4.1", features = ["derive", "env"] }
brotli = "3.4.0"
clap = { version = "3.2.23", features = ["derive", "env"] }
chrono = "0.4.23"
coerce = "0.8"
datatest-stable = "0.1.3"
Expand Down Expand Up @@ -232,39 +232,39 @@ sized-chunks = { version = "0.6" }

# Note: the BEGIN and END comments below are required for external tooling. Do not remove.
# BEGIN MOVE DEPENDENCIES
move-abigen = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-binary-format = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-bytecode-verifier = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-bytecode-utils = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-cli = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-command-line-common = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-compiler ={ git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-core-types = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9", features = ["address32"] }
move-coverage = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-disassembler = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-docgen = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-errmapgen = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-ir-compiler = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-model = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-package = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-prover = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-prover-boogie-backend = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-stackless-bytecode = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-prover-test-utils = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-resource-viewer = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-stackless-bytecode-interpreter = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-stdlib = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9", features = ["address32", "testing"] }
move-symbol-pool = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
#move-table-extension = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-transactional-test-runner = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-unit-test = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9", features = ["table-extension"] }
move-vm-runtime = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9", features = ["lazy_natives"] }
move-vm-test-utils = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9", features = ["table-extension"] }
move-vm-types = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
read-write-set = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
read-write-set-dynamic = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-bytecode-source-map = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }
move-ir-types = { git = "https://github.com/rooch-network/move", rev = "f7e7cc8e0521e5325caaae90c9de5de409d291a9" }# END MOVE DEPENDENCIES
move-abigen = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-binary-format = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-bytecode-verifier = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-bytecode-utils = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-cli = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-command-line-common = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-compiler ={ git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-core-types = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f"}
move-coverage = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-disassembler = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-docgen = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-errmapgen = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-ir-compiler = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-model = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-package = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-prover = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-prover-boogie-backend = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-stackless-bytecode = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-prover-test-utils = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-resource-viewer = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-stackless-bytecode-interpreter = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-stdlib = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f", features = ["testing"] }
move-symbol-pool = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
#move-table-extension = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-transactional-test-runner = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-unit-test = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f", features = ["table-extension"] }
move-vm-runtime = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-vm-test-utils = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f", features = ["table-extension"] }
move-vm-types = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
read-write-set = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
read-write-set-dynamic = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-bytecode-source-map = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }
move-ir-types = { git = "https://github.com/rooch-network/move", rev = "fcddf3f9711ae60f80bca7032dd0afa8e1d7694f" }# END MOVE DEPENDENCIES

# keep this for convenient debug Move in local repo
# [patch.'https://github.com/rooch-network/move']
Expand Down
9 changes: 5 additions & 4 deletions crates/rooch-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub static R_OPT_NET_HELP: &str = r#"Chain Network
#[derive(Clone, Debug, Parser, Default, Serialize, Deserialize)]
pub struct RoochOpt {
#[serde(skip_serializing_if = "Option::is_none")]
#[clap(long = "data-dir", short = 'd', parse(from_os_str))]
#[clap(long = "data-dir", short = 'd')]
/// Path to data dir, this dir is base dir, the final data_dir is base_dir/chain_network_name
pub base_data_dir: Option<PathBuf>,

Expand Down Expand Up @@ -97,11 +97,11 @@ pub struct RoochOpt {
pub btc_rpc_url: Option<String>,

#[serde(skip_serializing_if = "Option::is_none")]
#[clap(long, env = "BTC_RPC_USERNAME")]
#[clap(long, id = "btc-rpc-username", env = "BTC_RPC_USERNAME")]
pub btc_rpc_username: Option<String>,

#[serde(skip_serializing_if = "Option::is_none")]
#[clap(long, env = "BTC_RPC_PASSWORD")]
#[clap(long, id = "btc-rpc-password", env = "BTC_RPC_PASSWORD")]
pub btc_rpc_password: Option<String>,

#[serde(skip_serializing_if = "Option::is_none")]
Expand Down Expand Up @@ -226,7 +226,8 @@ pub trait ConfigModule: Sized {
}
}

#[derive(Debug, Parser, Default, Serialize, Deserialize)]
// #[derive(Debug, Parser, Default, Serialize, Deserialize)]
#[derive(Debug, Default, Serialize, Deserialize)]
pub struct ServerOpt {
/// Sequencer, proposer and relayer keypair
pub sequencer_keypair: Option<RoochKeyPair>,
Expand Down
6 changes: 4 additions & 2 deletions crates/rooch-framework/doc/account_authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ max authentication key length
This function is used to rotate a resource account's authentication key, only the module which define the <code>ValidatorType</code> can call this function.


<pre><code><b>public</b> <b>fun</b> <a href="account_authentication.md#0x3_account_authentication_rotate_authentication_key">rotate_authentication_key</a>&lt;ValidatorType&gt;(ctx: &<b>mut</b> <a href="_Context">context::Context</a>, account_addr: <b>address</b>, new_auth_key: <a href="">vector</a>&lt;u8&gt;)
<pre><code>#[private_generics(#[ValidatorType])]
<b>public</b> <b>fun</b> <a href="account_authentication.md#0x3_account_authentication_rotate_authentication_key">rotate_authentication_key</a>&lt;ValidatorType&gt;(ctx: &<b>mut</b> <a href="_Context">context::Context</a>, account_addr: <b>address</b>, new_auth_key: <a href="">vector</a>&lt;u8&gt;)
</code></pre>


Expand All @@ -174,7 +175,8 @@ This function is used to rotate a resource account's authentication key, only th
This function is used to remove a resource account's authentication key, only the module which define the <code>ValidatorType</code> can call this function.


<pre><code><b>public</b> <b>fun</b> <a href="account_authentication.md#0x3_account_authentication_remove_authentication_key">remove_authentication_key</a>&lt;ValidatorType&gt;(ctx: &<b>mut</b> <a href="_Context">context::Context</a>, account_addr: <b>address</b>): <a href="account_authentication.md#0x3_account_authentication_AuthenticationKey">account_authentication::AuthenticationKey</a>&lt;ValidatorType&gt;
<pre><code>#[private_generics(#[ValidatorType])]
<b>public</b> <b>fun</b> <a href="account_authentication.md#0x3_account_authentication_remove_authentication_key">remove_authentication_key</a>&lt;ValidatorType&gt;(ctx: &<b>mut</b> <a href="_Context">context::Context</a>, account_addr: <b>address</b>): <a href="account_authentication.md#0x3_account_authentication_AuthenticationKey">account_authentication::AuthenticationKey</a>&lt;ValidatorType&gt;
</code></pre>


Expand Down
9 changes: 6 additions & 3 deletions crates/rooch-framework/doc/account_coin_store.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ Withdraw specifed <code>amount</code> of coin <code>CoinType</code> from any add
This function is only called by the <code>CoinType</code> module, for the developer to extend custom withdraw logic


<pre><code><b>public</b> <b>fun</b> <a href="account_coin_store.md#0x3_account_coin_store_withdraw_extend">withdraw_extend</a>&lt;CoinType: key&gt;(ctx: &<b>mut</b> <a href="_Context">context::Context</a>, addr: <b>address</b>, amount: u256): <a href="coin.md#0x3_coin_Coin">coin::Coin</a>&lt;CoinType&gt;
<pre><code>#[private_generics(#[CoinType])]
<b>public</b> <b>fun</b> <a href="account_coin_store.md#0x3_account_coin_store_withdraw_extend">withdraw_extend</a>&lt;CoinType: key&gt;(ctx: &<b>mut</b> <a href="_Context">context::Context</a>, addr: <b>address</b>, amount: u256): <a href="coin.md#0x3_coin_Coin">coin::Coin</a>&lt;CoinType&gt;
</code></pre>


Expand All @@ -289,7 +290,8 @@ Deposit the coin into the recipient's account and emit an event.
This function is only called by the <code>CoinType</code> module, for the developer to extend custom deposit logic


<pre><code><b>public</b> <b>fun</b> <a href="account_coin_store.md#0x3_account_coin_store_deposit_extend">deposit_extend</a>&lt;CoinType: key&gt;(ctx: &<b>mut</b> <a href="_Context">context::Context</a>, addr: <b>address</b>, <a href="coin.md#0x3_coin">coin</a>: <a href="coin.md#0x3_coin_Coin">coin::Coin</a>&lt;CoinType&gt;)
<pre><code>#[private_generics(#[CoinType])]
<b>public</b> <b>fun</b> <a href="account_coin_store.md#0x3_account_coin_store_deposit_extend">deposit_extend</a>&lt;CoinType: key&gt;(ctx: &<b>mut</b> <a href="_Context">context::Context</a>, addr: <b>address</b>, <a href="coin.md#0x3_coin">coin</a>: <a href="coin.md#0x3_coin_Coin">coin::Coin</a>&lt;CoinType&gt;)
</code></pre>


Expand All @@ -302,7 +304,8 @@ Transfer <code>amount</code> of coins <code>CoinType</code> from <code>from</cod
This function is only called by the <code>CoinType</code> module, for the developer to extend custom transfer logic


<pre><code><b>public</b> <b>fun</b> <a href="account_coin_store.md#0x3_account_coin_store_transfer_extend">transfer_extend</a>&lt;CoinType: key&gt;(ctx: &<b>mut</b> <a href="_Context">context::Context</a>, from: <b>address</b>, <b>to</b>: <b>address</b>, amount: u256)
<pre><code>#[private_generics(#[CoinType])]
<b>public</b> <b>fun</b> <a href="account_coin_store.md#0x3_account_coin_store_transfer_extend">transfer_extend</a>&lt;CoinType: key&gt;(ctx: &<b>mut</b> <a href="_Context">context::Context</a>, from: <b>address</b>, <b>to</b>: <b>address</b>, amount: u256)
</code></pre>


Expand Down
3 changes: 2 additions & 1 deletion crates/rooch-framework/doc/auth_validator_registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ Init function called by genesis.



<pre><code><b>public</b> <b>fun</b> <a href="auth_validator_registry.md#0x3_auth_validator_registry_register">register</a>&lt;ValidatorType: store&gt;(ctx: &<b>mut</b> <a href="_Context">context::Context</a>): u64
<pre><code>#[private_generics(#[ValidatorType])]
<b>public</b> <b>fun</b> <a href="auth_validator_registry.md#0x3_auth_validator_registry_register">register</a>&lt;ValidatorType: store&gt;(ctx: &<b>mut</b> <a href="_Context">context::Context</a>): u64
</code></pre>


Expand Down
3 changes: 2 additions & 1 deletion crates/rooch-framework/doc/bitcoin_address.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ BTCAddress is a struct that represents a Bitcoin address.
We just keep the raw bytes of the address and do care about the network.


<pre><code><b>struct</b> <a href="bitcoin_address.md#0x3_bitcoin_address_BTCAddress">BTCAddress</a> <b>has</b> <b>copy</b>, drop, store
<pre><code>#[data_struct]
<b>struct</b> <a href="bitcoin_address.md#0x3_bitcoin_address_BTCAddress">BTCAddress</a> <b>has</b> <b>copy</b>, drop, store
</code></pre>


Expand Down
3 changes: 2 additions & 1 deletion crates/rooch-framework/doc/bitcoin_script_buf.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@



<pre><code><b>struct</b> <a href="bitcoin_script_buf.md#0x3_bitcoin_script_buf_ScriptBuf">ScriptBuf</a> <b>has</b> <b>copy</b>, drop, store
<pre><code>#[data_struct]
<b>struct</b> <a href="bitcoin_script_buf.md#0x3_bitcoin_script_buf_ScriptBuf">ScriptBuf</a> <b>has</b> <b>copy</b>, drop, store
</code></pre>


Expand Down
21 changes: 14 additions & 7 deletions crates/rooch-framework/doc/bitcoin_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@



<pre><code><b>struct</b> <a href="bitcoin_types.md#0x3_bitcoin_types_Block">Block</a> <b>has</b> <b>copy</b>, drop, store
<pre><code>#[data_struct]
<b>struct</b> <a href="bitcoin_types.md#0x3_bitcoin_types_Block">Block</a> <b>has</b> <b>copy</b>, drop, store
</code></pre>


Expand All @@ -65,7 +66,8 @@



<pre><code><b>struct</b> <a href="bitcoin_types.md#0x3_bitcoin_types_Header">Header</a> <b>has</b> <b>copy</b>, drop, store
<pre><code>#[data_struct]
<b>struct</b> <a href="bitcoin_types.md#0x3_bitcoin_types_Header">Header</a> <b>has</b> <b>copy</b>, drop, store
</code></pre>


Expand All @@ -76,7 +78,8 @@



<pre><code><b>struct</b> <a href="bitcoin_types.md#0x3_bitcoin_types_Transaction">Transaction</a> <b>has</b> <b>copy</b>, drop, store
<pre><code>#[data_struct]
<b>struct</b> <a href="bitcoin_types.md#0x3_bitcoin_types_Transaction">Transaction</a> <b>has</b> <b>copy</b>, drop, store
</code></pre>


Expand All @@ -87,7 +90,8 @@



<pre><code><b>struct</b> <a href="bitcoin_types.md#0x3_bitcoin_types_TxIn">TxIn</a> <b>has</b> <b>copy</b>, drop, store
<pre><code>#[data_struct]
<b>struct</b> <a href="bitcoin_types.md#0x3_bitcoin_types_TxIn">TxIn</a> <b>has</b> <b>copy</b>, drop, store
</code></pre>


Expand All @@ -98,7 +102,8 @@



<pre><code><b>struct</b> <a href="bitcoin_types.md#0x3_bitcoin_types_Witness">Witness</a> <b>has</b> <b>copy</b>, drop, store
<pre><code>#[data_struct]
<b>struct</b> <a href="bitcoin_types.md#0x3_bitcoin_types_Witness">Witness</a> <b>has</b> <b>copy</b>, drop, store
</code></pre>


Expand All @@ -109,7 +114,8 @@



<pre><code><b>struct</b> <a href="bitcoin_types.md#0x3_bitcoin_types_OutPoint">OutPoint</a> <b>has</b> <b>copy</b>, drop, store
<pre><code>#[data_struct]
<b>struct</b> <a href="bitcoin_types.md#0x3_bitcoin_types_OutPoint">OutPoint</a> <b>has</b> <b>copy</b>, drop, store
</code></pre>


Expand All @@ -120,7 +126,8 @@



<pre><code><b>struct</b> <a href="bitcoin_types.md#0x3_bitcoin_types_TxOut">TxOut</a> <b>has</b> <b>copy</b>, drop, store
<pre><code>#[data_struct]
<b>struct</b> <a href="bitcoin_types.md#0x3_bitcoin_types_TxOut">TxOut</a> <b>has</b> <b>copy</b>, drop, store
</code></pre>


Expand Down
Loading
Loading