diff --git a/Cargo.lock b/Cargo.lock index 40ed9bc26..4aecbb67f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1599,7 +1599,7 @@ dependencies = [ [[package]] name = "diem" version = "2.0.2" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "async-trait", @@ -1680,7 +1680,7 @@ dependencies = [ [[package]] name = "diem-accumulator" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "diem-crypto", @@ -1690,7 +1690,7 @@ dependencies = [ [[package]] name = "diem-aggregator" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -1708,7 +1708,7 @@ dependencies = [ [[package]] name = "diem-api" version = "0.2.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "async-trait", @@ -1749,7 +1749,7 @@ dependencies = [ [[package]] name = "diem-api-types" version = "0.0.1" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "async-trait", @@ -1776,7 +1776,7 @@ dependencies = [ [[package]] name = "diem-backup-cli" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "async-trait", @@ -1823,7 +1823,7 @@ dependencies = [ [[package]] name = "diem-backup-service" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -1845,7 +1845,7 @@ dependencies = [ [[package]] name = "diem-bitvec" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "serde 1.0.163", "serde_bytes", @@ -1854,7 +1854,7 @@ dependencies = [ [[package]] name = "diem-block-executor" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "arc-swap", @@ -1879,7 +1879,7 @@ dependencies = [ [[package]] name = "diem-block-partitioner" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -1899,7 +1899,7 @@ dependencies = [ [[package]] name = "diem-bounded-executor" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "futures", "tokio", @@ -1908,7 +1908,7 @@ dependencies = [ [[package]] name = "diem-build-info" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "shadow-rs", ] @@ -1916,7 +1916,7 @@ dependencies = [ [[package]] name = "diem-cached-packages" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "diem-framework", @@ -1929,7 +1929,7 @@ dependencies = [ [[package]] name = "diem-channels" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "diem-infallible", @@ -1941,7 +1941,7 @@ dependencies = [ [[package]] name = "diem-cli-common" version = "1.0.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anstyle", "clap 4.4.2", @@ -1951,7 +1951,7 @@ dependencies = [ [[package]] name = "diem-compression" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "diem-logger", "diem-metrics-core", @@ -1963,7 +1963,7 @@ dependencies = [ [[package]] name = "diem-config" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -1993,7 +1993,7 @@ dependencies = [ [[package]] name = "diem-consensus" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "arc-swap", @@ -2055,7 +2055,7 @@ dependencies = [ [[package]] name = "diem-consensus-notifications" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "async-trait", "diem-crypto", @@ -2070,7 +2070,7 @@ dependencies = [ [[package]] name = "diem-consensus-types" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -2093,7 +2093,7 @@ dependencies = [ [[package]] name = "diem-crash-handler" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "backtrace", "diem-logger", @@ -2105,7 +2105,7 @@ dependencies = [ [[package]] name = "diem-crypto" version = "0.0.3" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "ark-ec", @@ -2142,7 +2142,7 @@ dependencies = [ [[package]] name = "diem-crypto-derive" version = "0.0.3" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "proc-macro2 1.0.59", "quote 1.0.28", @@ -2152,7 +2152,7 @@ dependencies = [ [[package]] name = "diem-data-client" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "async-trait", "diem-config", @@ -2179,7 +2179,7 @@ dependencies = [ [[package]] name = "diem-data-streaming-service" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "async-trait", "diem-channels", @@ -2205,7 +2205,7 @@ dependencies = [ [[package]] name = "diem-db" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "arc-swap", @@ -2253,7 +2253,7 @@ dependencies = [ [[package]] name = "diem-db-indexer" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -2279,7 +2279,7 @@ dependencies = [ [[package]] name = "diem-db-tool" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "async-trait", @@ -2303,7 +2303,7 @@ dependencies = [ [[package]] name = "diem-debugger" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "clap 4.4.2", @@ -2334,7 +2334,7 @@ dependencies = [ [[package]] name = "diem-enum-conversion-derive" version = "0.0.3" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "proc-macro2 1.0.59", "quote 1.0.28", @@ -2344,7 +2344,7 @@ dependencies = [ [[package]] name = "diem-event-notifications" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "async-trait", "diem-channels", @@ -2361,7 +2361,7 @@ dependencies = [ [[package]] name = "diem-executor" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "arr_macro", @@ -2392,7 +2392,7 @@ dependencies = [ [[package]] name = "diem-executor-test-helpers" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "diem-cached-packages", @@ -2416,7 +2416,7 @@ dependencies = [ [[package]] name = "diem-executor-types" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -2437,7 +2437,7 @@ dependencies = [ [[package]] name = "diem-fallible" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "thiserror", ] @@ -2445,7 +2445,7 @@ dependencies = [ [[package]] name = "diem-faucet-core" version = "2.0.1" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "async-trait", @@ -2479,7 +2479,7 @@ dependencies = [ [[package]] name = "diem-faucet-metrics-server" version = "2.0.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "diem-logger", @@ -2494,7 +2494,7 @@ dependencies = [ [[package]] name = "diem-forge" version = "0.0.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "again", "anyhow", @@ -2549,7 +2549,7 @@ dependencies = [ [[package]] name = "diem-framework" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "ark-bls12-381", @@ -2615,7 +2615,7 @@ dependencies = [ [[package]] name = "diem-gas" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -2638,7 +2638,7 @@ dependencies = [ [[package]] name = "diem-gas-algebra-ext" version = "0.0.1" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "move-core-types", ] @@ -2646,7 +2646,7 @@ dependencies = [ [[package]] name = "diem-gas-profiling" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "diem-framework", @@ -2664,7 +2664,7 @@ dependencies = [ [[package]] name = "diem-genesis" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -2690,7 +2690,7 @@ dependencies = [ [[package]] name = "diem-github-client" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "diem-proxy", "serde 1.0.163", @@ -2702,17 +2702,17 @@ dependencies = [ [[package]] name = "diem-global-constants" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" [[package]] name = "diem-id-generator" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" [[package]] name = "diem-indexer" version = "0.0.1" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "async-trait", @@ -2751,7 +2751,7 @@ dependencies = [ [[package]] name = "diem-indexer-grpc-fullnode" version = "1.0.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "base64 0.13.0", @@ -2788,12 +2788,12 @@ dependencies = [ [[package]] name = "diem-infallible" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" [[package]] name = "diem-inspection-service" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "diem-build-info", @@ -2816,7 +2816,7 @@ dependencies = [ [[package]] name = "diem-jellyfish-merkle" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -2842,7 +2842,7 @@ dependencies = [ [[package]] name = "diem-keygen" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "diem-crypto", "diem-types", @@ -2852,7 +2852,7 @@ dependencies = [ [[package]] name = "diem-language-e2e-tests" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -2890,7 +2890,7 @@ dependencies = [ [[package]] name = "diem-log-derive" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "proc-macro2 1.0.59", "quote 1.0.28", @@ -2900,7 +2900,7 @@ dependencies = [ [[package]] name = "diem-logger" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "backtrace", "chrono", @@ -2924,7 +2924,7 @@ dependencies = [ [[package]] name = "diem-mempool" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "async-trait", @@ -2964,7 +2964,7 @@ dependencies = [ [[package]] name = "diem-mempool-notifications" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "async-trait", "diem-runtimes", @@ -2978,7 +2978,7 @@ dependencies = [ [[package]] name = "diem-memsocket" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "bytes", "diem-infallible", @@ -2989,7 +2989,7 @@ dependencies = [ [[package]] name = "diem-metrics-core" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "prometheus", @@ -2998,7 +2998,7 @@ dependencies = [ [[package]] name = "diem-move-stdlib" version = "0.1.1" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "hex", @@ -3021,7 +3021,7 @@ dependencies = [ [[package]] name = "diem-moving-average" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "chrono", ] @@ -3029,7 +3029,7 @@ dependencies = [ [[package]] name = "diem-mvhashmap" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -3044,7 +3044,7 @@ dependencies = [ [[package]] name = "diem-netcore" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "bytes", "diem-memsocket", @@ -3061,7 +3061,7 @@ dependencies = [ [[package]] name = "diem-network" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "async-trait", @@ -3104,7 +3104,7 @@ dependencies = [ [[package]] name = "diem-network-builder" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "async-trait", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -3130,7 +3130,7 @@ dependencies = [ [[package]] name = "diem-network-checker" version = "0.0.1" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "clap 4.4.2", @@ -3147,7 +3147,7 @@ dependencies = [ [[package]] name = "diem-network-discovery" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -3173,7 +3173,7 @@ dependencies = [ [[package]] name = "diem-node" version = "1.6.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -3238,7 +3238,7 @@ dependencies = [ [[package]] name = "diem-node-identity" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "claims", @@ -3250,7 +3250,7 @@ dependencies = [ [[package]] name = "diem-num-variants" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "proc-macro2 1.0.59", "quote 1.0.28", @@ -3260,7 +3260,7 @@ dependencies = [ [[package]] name = "diem-openapi" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "async-trait", "percent-encoding", @@ -3273,7 +3273,7 @@ dependencies = [ [[package]] name = "diem-package-builder" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "diem-framework", @@ -3286,7 +3286,7 @@ dependencies = [ [[package]] name = "diem-peer-monitoring-service-client" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "async-trait", "diem-channels", @@ -3312,7 +3312,7 @@ dependencies = [ [[package]] name = "diem-peer-monitoring-service-server" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "bytes", @@ -3339,7 +3339,7 @@ dependencies = [ [[package]] name = "diem-peer-monitoring-service-types" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "cfg_block", @@ -3352,7 +3352,7 @@ dependencies = [ [[package]] name = "diem-proptest-helpers" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "crossbeam", "proptest", @@ -3362,7 +3362,7 @@ dependencies = [ [[package]] name = "diem-protos" version = "1.0.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "pbjson", "prost", @@ -3373,7 +3373,7 @@ dependencies = [ [[package]] name = "diem-proxy" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "ipnet", ] @@ -3381,7 +3381,7 @@ dependencies = [ [[package]] name = "diem-push-metrics" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "diem-logger", "diem-metrics-core", @@ -3392,7 +3392,7 @@ dependencies = [ [[package]] name = "diem-rate-limiter" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "diem-infallible", "diem-logger", @@ -3406,7 +3406,7 @@ dependencies = [ [[package]] name = "diem-release-builder" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -3442,7 +3442,7 @@ dependencies = [ [[package]] name = "diem-resource-viewer" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "diem-types", @@ -3454,7 +3454,7 @@ dependencies = [ [[package]] name = "diem-rest-client" version = "0.0.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -3480,7 +3480,7 @@ dependencies = [ [[package]] name = "diem-retrier" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "diem-logger", "tokio", @@ -3489,7 +3489,7 @@ dependencies = [ [[package]] name = "diem-rocksdb-options" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "diem-config", "rocksdb", @@ -3498,7 +3498,7 @@ dependencies = [ [[package]] name = "diem-rosetta" version = "0.0.1" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -3532,7 +3532,7 @@ dependencies = [ [[package]] name = "diem-runtimes" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "tokio", ] @@ -3540,7 +3540,7 @@ dependencies = [ [[package]] name = "diem-safety-rules" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "diem-config", "diem-consensus-types", @@ -3564,7 +3564,7 @@ dependencies = [ [[package]] name = "diem-schemadb" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "diem-infallible", @@ -3578,7 +3578,7 @@ dependencies = [ [[package]] name = "diem-scratchpad" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "bitvec 0.19.6", "diem-crypto", @@ -3595,7 +3595,7 @@ dependencies = [ [[package]] name = "diem-sdk" version = "0.0.3" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -3615,7 +3615,7 @@ dependencies = [ [[package]] name = "diem-sdk-builder" version = "0.2.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -3634,7 +3634,7 @@ dependencies = [ [[package]] name = "diem-secure-net" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "diem-logger", "diem-metrics-core", @@ -3646,7 +3646,7 @@ dependencies = [ [[package]] name = "diem-secure-storage" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "base64 0.13.0", @@ -3668,7 +3668,7 @@ dependencies = [ [[package]] name = "diem-short-hex-str" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "mirai-annotations", "serde 1.0.163", @@ -3679,7 +3679,7 @@ dependencies = [ [[package]] name = "diem-speculative-state-helper" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "crossbeam", @@ -3691,7 +3691,7 @@ dependencies = [ [[package]] name = "diem-state-sync-driver" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "async-trait", @@ -3724,7 +3724,7 @@ dependencies = [ [[package]] name = "diem-state-view" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -3738,7 +3738,7 @@ dependencies = [ [[package]] name = "diem-storage-interface" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "arr_macro", @@ -3765,7 +3765,7 @@ dependencies = [ [[package]] name = "diem-storage-service-client" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "async-trait", "diem-channels", @@ -3779,7 +3779,7 @@ dependencies = [ [[package]] name = "diem-storage-service-server" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "bytes", @@ -3805,7 +3805,7 @@ dependencies = [ [[package]] name = "diem-storage-service-types" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "diem-compression", @@ -3820,7 +3820,7 @@ dependencies = [ [[package]] name = "diem-temppath" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "hex", "rand 0.7.3", @@ -3829,7 +3829,7 @@ dependencies = [ [[package]] name = "diem-time-service" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "diem-infallible", "enum_dispatch", @@ -3842,7 +3842,7 @@ dependencies = [ [[package]] name = "diem-transaction-emitter-lib" version = "0.0.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "again", "anyhow", @@ -3873,7 +3873,7 @@ dependencies = [ [[package]] name = "diem-transaction-generator-lib" version = "0.0.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "again", "anyhow", @@ -3903,7 +3903,7 @@ dependencies = [ [[package]] name = "diem-transactional-test-harness" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -3935,7 +3935,7 @@ dependencies = [ [[package]] name = "diem-types" version = "0.0.3" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "arr_macro", @@ -3968,12 +3968,12 @@ dependencies = [ [[package]] name = "diem-utils" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" [[package]] name = "diem-validator-interface" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "async-trait", @@ -3994,7 +3994,7 @@ dependencies = [ [[package]] name = "diem-vault-client" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "base64 0.13.0", "chrono", @@ -4010,7 +4010,7 @@ dependencies = [ [[package]] name = "diem-vm" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -4057,7 +4057,7 @@ dependencies = [ [[package]] name = "diem-vm-genesis" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -4078,7 +4078,7 @@ dependencies = [ [[package]] name = "diem-vm-logging" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "arc-swap", "diem-crypto", @@ -4094,7 +4094,7 @@ dependencies = [ [[package]] name = "diem-vm-types" version = "0.0.1" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "diem-aggregator", @@ -4107,7 +4107,7 @@ dependencies = [ [[package]] name = "diem-vm-validator" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "diem-gas", @@ -4122,7 +4122,7 @@ dependencies = [ [[package]] name = "diem-warp-webserver" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -6179,7 +6179,7 @@ checksum = "5474f8732dc7e0635ae9df6595bcd39cd30e3cfe8479850d4fa3e69306c19712" [[package]] name = "move-abigen" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -6196,7 +6196,7 @@ dependencies = [ [[package]] name = "move-binary-format" version = "0.0.3" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "arbitrary", @@ -6213,12 +6213,12 @@ dependencies = [ [[package]] name = "move-borrow-graph" version = "0.0.1" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" [[package]] name = "move-bytecode-source-map" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -6233,7 +6233,7 @@ dependencies = [ [[package]] name = "move-bytecode-utils" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "move-binary-format", @@ -6245,7 +6245,7 @@ dependencies = [ [[package]] name = "move-bytecode-verifier" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "fail 0.4.0", @@ -6259,7 +6259,7 @@ dependencies = [ [[package]] name = "move-bytecode-viewer" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "clap 4.4.2", @@ -6276,7 +6276,7 @@ dependencies = [ [[package]] name = "move-cli" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -6320,7 +6320,7 @@ dependencies = [ [[package]] name = "move-command-line-common" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "difference", @@ -6337,7 +6337,7 @@ dependencies = [ [[package]] name = "move-compiler" version = "0.0.1" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -6366,7 +6366,7 @@ dependencies = [ [[package]] name = "move-core-types" version = "0.0.4" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "arbitrary", @@ -6388,7 +6388,7 @@ dependencies = [ [[package]] name = "move-coverage" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -6408,7 +6408,7 @@ dependencies = [ [[package]] name = "move-disassembler" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "clap 4.4.2", @@ -6426,7 +6426,7 @@ dependencies = [ [[package]] name = "move-docgen" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "codespan", @@ -6445,7 +6445,7 @@ dependencies = [ [[package]] name = "move-errmapgen" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -6459,7 +6459,7 @@ dependencies = [ [[package]] name = "move-ir-compiler" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -6478,7 +6478,7 @@ dependencies = [ [[package]] name = "move-ir-to-bytecode" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "codespan-reporting", @@ -6497,7 +6497,7 @@ dependencies = [ [[package]] name = "move-ir-to-bytecode-syntax" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "hex", @@ -6510,7 +6510,7 @@ dependencies = [ [[package]] name = "move-ir-types" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "hex", @@ -6524,7 +6524,7 @@ dependencies = [ [[package]] name = "move-model" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "codespan", @@ -6551,7 +6551,7 @@ dependencies = [ [[package]] name = "move-package" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -6587,7 +6587,7 @@ dependencies = [ [[package]] name = "move-prover" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "async-trait", @@ -6624,7 +6624,7 @@ dependencies = [ [[package]] name = "move-prover-boogie-backend" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "async-trait", @@ -6653,7 +6653,7 @@ dependencies = [ [[package]] name = "move-resource-viewer" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -6668,7 +6668,7 @@ dependencies = [ [[package]] name = "move-stackless-bytecode" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "codespan", "codespan-reporting", @@ -6694,7 +6694,7 @@ dependencies = [ [[package]] name = "move-stdlib" version = "0.1.1" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "hex", @@ -6717,7 +6717,7 @@ dependencies = [ [[package]] name = "move-symbol-pool" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "once_cell", "serde 1.0.163", @@ -6726,7 +6726,7 @@ dependencies = [ [[package]] name = "move-table-extension" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", @@ -6743,7 +6743,7 @@ dependencies = [ [[package]] name = "move-transactional-test-runner" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "clap 4.4.2", @@ -6774,7 +6774,7 @@ dependencies = [ [[package]] name = "move-unit-test" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "better_any", @@ -6804,7 +6804,7 @@ dependencies = [ [[package]] name = "move-vm-runtime" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "better_any", "fail 0.4.0", @@ -6821,7 +6821,7 @@ dependencies = [ [[package]] name = "move-vm-test-utils" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "move-binary-format", @@ -6835,7 +6835,7 @@ dependencies = [ [[package]] name = "move-vm-types" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "move-binary-format", @@ -9030,7 +9030,7 @@ checksum = "f67ad224767faa3c7d8b6d91985b78e70a1324408abcb1cfcc2be4c06bc06043" [[package]] name = "smoke-test" version = "0.1.0" -source = "git+https://github.com/0LNetworkCommunity/diem.git?branch=release#5b5c097872fb9e7bd50a5be1360e3e5f02d9e996" +source = "git+https://github.com/0LNetworkCommunity/diem.git?rev=839afb1#839afb12b716ea7f683d5464efdaa4259074369a" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 5f0418a7f..6476ca6ac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,37 +41,37 @@ libra-txs = { path = "tools/txs" } libra-wallet = { path = "tools/wallet" } vdf = { git = "https://github.com/0o-de-lally/verifiable_delay.git" } -diem-api-types = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-debugger = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-db = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-forge = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-transactional-test-harness = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -smoke-test = { package = "smoke-test", git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } +diem-api-types = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-debugger = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-db = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-forge = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-transactional-test-harness = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +smoke-test = { package = "smoke-test", git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } -diem = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-build-info = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-node = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-rest-client = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-sdk = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-config = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-crypto = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-genesis = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-global-constants = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-keygen = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-logger = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-types = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-gas = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-vm = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-vm-genesis = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-executor = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-framework = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-cached-packages = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-github-client = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-release-builder = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-language-e2e-tests = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-state-view = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-storage-interface = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -diem-temppath = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } +diem = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-build-info = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-node = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-rest-client = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-sdk = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-config = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-crypto = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-genesis = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-global-constants = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-keygen = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-logger = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-types = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-gas = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-vm = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-vm-genesis = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-executor = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-framework = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-cached-packages = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-github-client = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-release-builder = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-language-e2e-tests = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-state-view = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-storage-interface = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +diem-temppath = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } ### External crate dependencies. # 0L NOTE: most of these are not used. But we leave the entire block here @@ -314,12 +314,12 @@ serde_with = "^3" # move-abigen = { path = "third_party/move/move-prover/move-abigen" } # move-binary-format = { path = "third_party/move/move-binary-format" } # ... see full list in Aptos repo -move-binary-format = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -move-core-types = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -move-command-line-common = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -move-compiler = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -move-model = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } -move-vm-test-utils = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } +move-binary-format = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +move-core-types = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +move-command-line-common = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +move-compiler = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +move-model = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } +move-vm-test-utils = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } # uses a profile similar to `cli` in Diem/Cargo.toml # optimized for performance and size diff --git a/framework/cached-packages/Cargo.toml b/framework/cached-packages/Cargo.toml index 9674e4e46..f4cab0de2 100644 --- a/framework/cached-packages/Cargo.toml +++ b/framework/cached-packages/Cargo.toml @@ -15,7 +15,7 @@ rust-version = { workspace = true } [dependencies] bcs = { workspace = true } # Note the generated SDK code uses hard coded `diemtypes` -diem-types = { git = "https://github.com/0LNetworkCommunity/diem.git", branch = "release" } +diem-types = { git = "https://github.com/0LNetworkCommunity/diem.git", rev = "839afb1" } move-core-types = { workspace = true } once_cell = { workspace = true } diff --git a/framework/cached-packages/src/libra_framework_sdk_builder.rs b/framework/cached-packages/src/libra_framework_sdk_builder.rs index 6e00fdd5d..b506801c1 100644 --- a/framework/cached-packages/src/libra_framework_sdk_builder.rs +++ b/framework/cached-packages/src/libra_framework_sdk_builder.rs @@ -258,17 +258,17 @@ pub enum EntryFunctionCall { /// Only callable in tests and testnets where the core resources account exists. /// Claim the delegated mint capability and destroy the delegated token. - GasCoinClaimMintCapability {}, + LibraCoinClaimMintCapability {}, /// Only callable in tests and testnets where the core resources account exists. /// Create delegated token for the address so the account could claim MintCapability later. - GasCoinDelegateMintCapability { + LibraCoinDelegateMintCapability { to: AccountAddress, }, /// Root account can mint to an address. Only used for genesis and tests. /// The "root" account in smoke tests has some privileges. - GasCoinMintToImpl { + LibraCoinMintToImpl { dst_addr: AccountAddress, amount: u64, }, @@ -705,9 +705,9 @@ impl EntryFunctionCall { id, } => donor_voice_vote_veto_tx(multisig_address, id), JailUnjailByVoucher { addr } => jail_unjail_by_voucher(addr), - GasCoinClaimMintCapability {} => gas_coin_claim_mint_capability(), - GasCoinDelegateMintCapability { to } => gas_coin_delegate_mint_capability(to), - GasCoinMintToImpl { dst_addr, amount } => gas_coin_mint_to_impl(dst_addr, amount), + LibraCoinClaimMintCapability {} => libra_coin_claim_mint_capability(), + LibraCoinDelegateMintCapability { to } => libra_coin_delegate_mint_capability(to), + LibraCoinMintToImpl { dst_addr, amount } => libra_coin_mint_to_impl(dst_addr, amount), MultisigAccountAddOwner { new_owner } => multisig_account_add_owner(new_owner), MultisigAccountAddOwners { new_owners } => multisig_account_add_owners(new_owners), MultisigAccountApproveTransaction { @@ -1515,14 +1515,14 @@ pub fn jail_unjail_by_voucher(addr: AccountAddress) -> TransactionPayload { /// Only callable in tests and testnets where the core resources account exists. /// Claim the delegated mint capability and destroy the delegated token. -pub fn gas_coin_claim_mint_capability() -> TransactionPayload { +pub fn libra_coin_claim_mint_capability() -> TransactionPayload { TransactionPayload::EntryFunction(EntryFunction::new( ModuleId::new( AccountAddress::new([ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, ]), - ident_str!("gas_coin").to_owned(), + ident_str!("libra_coin").to_owned(), ), ident_str!("claim_mint_capability").to_owned(), vec![], @@ -1532,14 +1532,14 @@ pub fn gas_coin_claim_mint_capability() -> TransactionPayload { /// Only callable in tests and testnets where the core resources account exists. /// Create delegated token for the address so the account could claim MintCapability later. -pub fn gas_coin_delegate_mint_capability(to: AccountAddress) -> TransactionPayload { +pub fn libra_coin_delegate_mint_capability(to: AccountAddress) -> TransactionPayload { TransactionPayload::EntryFunction(EntryFunction::new( ModuleId::new( AccountAddress::new([ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, ]), - ident_str!("gas_coin").to_owned(), + ident_str!("libra_coin").to_owned(), ), ident_str!("delegate_mint_capability").to_owned(), vec![], @@ -1549,14 +1549,14 @@ pub fn gas_coin_delegate_mint_capability(to: AccountAddress) -> TransactionPaylo /// Root account can mint to an address. Only used for genesis and tests. /// The "root" account in smoke tests has some privileges. -pub fn gas_coin_mint_to_impl(dst_addr: AccountAddress, amount: u64) -> TransactionPayload { +pub fn libra_coin_mint_to_impl(dst_addr: AccountAddress, amount: u64) -> TransactionPayload { TransactionPayload::EntryFunction(EntryFunction::new( ModuleId::new( AccountAddress::new([ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, ]), - ident_str!("gas_coin").to_owned(), + ident_str!("libra_coin").to_owned(), ), ident_str!("mint_to_impl").to_owned(), vec![], @@ -2723,21 +2723,21 @@ mod decoder { } } - pub fn gas_coin_claim_mint_capability( + pub fn libra_coin_claim_mint_capability( payload: &TransactionPayload, ) -> Option { if let TransactionPayload::EntryFunction(_script) = payload { - Some(EntryFunctionCall::GasCoinClaimMintCapability {}) + Some(EntryFunctionCall::LibraCoinClaimMintCapability {}) } else { None } } - pub fn gas_coin_delegate_mint_capability( + pub fn libra_coin_delegate_mint_capability( payload: &TransactionPayload, ) -> Option { if let TransactionPayload::EntryFunction(script) = payload { - Some(EntryFunctionCall::GasCoinDelegateMintCapability { + Some(EntryFunctionCall::LibraCoinDelegateMintCapability { to: bcs::from_bytes(script.args().get(0)?).ok()?, }) } else { @@ -2745,9 +2745,9 @@ mod decoder { } } - pub fn gas_coin_mint_to_impl(payload: &TransactionPayload) -> Option { + pub fn libra_coin_mint_to_impl(payload: &TransactionPayload) -> Option { if let TransactionPayload::EntryFunction(script) = payload { - Some(EntryFunctionCall::GasCoinMintToImpl { + Some(EntryFunctionCall::LibraCoinMintToImpl { dst_addr: bcs::from_bytes(script.args().get(0)?).ok()?, amount: bcs::from_bytes(script.args().get(1)?).ok()?, }) @@ -3335,16 +3335,16 @@ static SCRIPT_FUNCTION_DECODER_MAP: once_cell::sync::Lazy(); //////// 0L //////// + let total_voting_token_supply = coin::supply(); //////// 0L //////// let early_resolution_vote_threshold = option::none(); if (option::is_some(&total_voting_token_supply)) { let total_supply = *option::borrow(&total_voting_token_supply); @@ -440,7 +440,7 @@ module diem_framework::diem_governance { // stake::get_lockup_secs(stake_pool) >= proposal_expiration, // error::invalid_argument(EINSUFFICIENT_STAKE_LOCKUP), // ); - let voting_power = coin::balance(voter_address); + let voting_power = coin::balance(voter_address); voting::vote( &governance_proposal::create_empty_proposal(), @diem_framework, @@ -590,7 +590,7 @@ module diem_framework::diem_governance { // core_resources: &signer, signer_address: address): signer acquires GovernanceResponsbility { // system_addresses::assert_core_resource(core_resources); // // Core resources account only has mint capability in tests/testnets. - // assert!(gas_Coin::has_mint_capability(core_resources), error::unauthenticated(EUNAUTHORIZED)); + // assert!(libra_coin::has_mint_capability(core_resources), error::unauthenticated(EUNAUTHORIZED)); // get_signer(signer_address) // } @@ -909,21 +909,21 @@ module diem_framework::diem_governance { // let pks = vector[pk_1, pk_2, pk_3]; // stake::create_validator_set(diem_framework, active_validators, pks); - let (burn_cap, mint_cap) = gas_coin::initialize_for_test(diem_framework); - coin::register(proposer); - coin::register(yes_voter); - coin::register(no_voter); + let (burn_cap, mint_cap) = libra_coin::initialize_for_test(diem_framework); + coin::register(proposer); + coin::register(yes_voter); + coin::register(no_voter); - gas_coin::test_mint_to(diem_framework, signer::address_of(proposer), 50); - gas_coin::test_mint_to(diem_framework, signer::address_of(yes_voter), 10); - gas_coin::test_mint_to(diem_framework, signer::address_of(no_voter), 5); + libra_coin::test_mint_to(diem_framework, signer::address_of(proposer), 50); + libra_coin::test_mint_to(diem_framework, signer::address_of(yes_voter), 10); + libra_coin::test_mint_to(diem_framework, signer::address_of(no_voter), 5); // // Spread stake among active and pending_inactive because both need to be accounted for when computing voting // // power. // stake::create_stake_pool(proposer, coin::mint(50, &mint_cap), coin::mint(50, &mint_cap), 10000); // stake::create_stake_pool(yes_voter, coin::mint(10, &mint_cap), coin::mint(10, &mint_cap), 10000); // stake::create_stake_pool(no_voter, coin::mint(5, &mint_cap), coin::mint(5, &mint_cap), 10000); - coin::destroy_mint_cap(mint_cap); - coin::destroy_burn_cap(burn_cap); + coin::destroy_mint_cap(mint_cap); + coin::destroy_burn_cap(burn_cap); } // #[test(diem_framework = @diem_framework)] diff --git a/framework/libra-framework/sources/modified_source/diem_governance.spec.move b/framework/libra-framework/sources/modified_source/diem_governance.spec.move index feee5fb65..5dc8abdd6 100644 --- a/framework/libra-framework/sources/modified_source/diem_governance.spec.move +++ b/framework/libra-framework/sources/modified_source/diem_governance.spec.move @@ -246,7 +246,7 @@ spec diem_framework::diem_governance { spec reconfigure(diem_framework: &signer) { use diem_framework::chain_status; use diem_framework::coin::CoinInfo; - use diem_framework::gas_coin::LibraCoin as GasCoin; + use diem_framework::libra_coin::LibraCoin; use diem_framework::transaction_fee; // use diem_framework::staking_config; @@ -259,7 +259,7 @@ spec diem_framework::diem_governance { requires chain_status::is_operating(); requires timestamp::spec_now_microseconds() >= reconfiguration::last_reconfiguration_time(); requires exists(@diem_framework); - requires exists>(@diem_framework); + requires exists>(@diem_framework); } // /// Signer address must be @core_resources. @@ -267,7 +267,7 @@ spec diem_framework::diem_governance { // /// Address @diem_framework must exist GovernanceResponsbility. // spec get_signer_testnet_only(core_resources: &signer, signer_address: address): signer { // aborts_if signer::address_of(core_resources) != @core_resources; - // aborts_if !exists(signer::address_of(core_resources)); + // aborts_if !exists(signer::address_of(core_resources)); // include GetSignerAbortsIf; // } diff --git a/framework/libra-framework/sources/modified_source/genesis.move b/framework/libra-framework/sources/modified_source/genesis.move index 9e4987251..29abe19fe 100644 --- a/framework/libra-framework/sources/modified_source/genesis.move +++ b/framework/libra-framework/sources/modified_source/genesis.move @@ -31,7 +31,7 @@ module diem_framework::genesis { use ol_framework::musical_chairs; use ol_framework::proof_of_fee; use ol_framework::slow_wallet; - use ol_framework::gas_coin; + use ol_framework::libra_coin; use ol_framework::infra_escrow; use ol_framework::tower_state; use ol_framework::safe; @@ -45,7 +45,7 @@ module diem_framework::genesis { use ol_framework::epoch_boundary; use ol_framework::sacred_cows; #[test_only] - use ol_framework::gas_coin::LibraCoin as GasCoin; + use ol_framework::libra_coin::LibraCoin; //////// end 0L //////// @@ -174,7 +174,7 @@ module diem_framework::genesis { /// Genesis step 2: Initialize Diem coin. fun initialize_diem_coin(diem_framework: &signer) { // NOTE 0L: genesis ceremony is calling this - gas_coin::initialize(diem_framework); + libra_coin::initialize(diem_framework); transaction_fee::initialize_fee_collection_and_distribution(diem_framework, 0); } @@ -190,16 +190,16 @@ module diem_framework::genesis { account::rotate_authentication_key_internal(&core_resources, core_resources_auth_key); // initialize gas - let (burn_cap_two, mint_cap_two) = gas_coin::initialize_for_core(diem_framework); + let (burn_cap_two, mint_cap_two) = libra_coin::initialize_for_core(diem_framework); // give coins to the 'core_resources' account, which has sudo // core_resources is a temporary account, not the same as framework account. - gas_coin::configure_accounts_for_test(diem_framework, &core_resources, mint_cap_two); + libra_coin::configure_accounts_for_test(diem_framework, &core_resources, mint_cap_two); // NOTE: smoke tests will fail without initializing tx fees as in genesis transaction_fee::initialize_fee_collection_and_distribution(diem_framework, 0); // NOTE: 0L: the commented code below shows that we are destroying - // there capabilities elsewhere, at gas_coin::initialize + // there capabilities elsewhere, at libra_coin::initialize coin::destroy_mint_cap(mint_cap_two); coin::destroy_burn_cap(burn_cap_two); @@ -444,7 +444,7 @@ module diem_framework::genesis { let test_signer_before = create_account(diem_framework, addr, 15); let test_signer_after = create_account(diem_framework, addr, 500); assert!(test_signer_before == test_signer_after, 0); - assert!(coin::balance(addr) == 0, 1); //////// 0L //////// + assert!(coin::balance(addr) == 0, 1); //////// 0L //////// } #[test(diem_framework = @0x1)] @@ -468,10 +468,10 @@ module diem_framework::genesis { ]; create_accounts(diem_framework, accounts); - assert!(coin::balance(addr0) == 0, 0); //////// 0L //////// no coins minted at genesis - assert!(coin::balance(addr1) == 0, 1); //////// 0L //////// + assert!(coin::balance(addr0) == 0, 0); //////// 0L //////// no coins minted at genesis + assert!(coin::balance(addr1) == 0, 1); //////// 0L //////// create_account(diem_framework, addr0, 23456); - assert!(coin::balance(addr0) == 0, 2); //////// 0L //////// + assert!(coin::balance(addr0) == 0, 2); //////// 0L //////// } } diff --git a/framework/libra-framework/sources/modified_source/reconfiguration.spec.move b/framework/libra-framework/sources/modified_source/reconfiguration.spec.move index fc01b4c3f..850b3cf6c 100644 --- a/framework/libra-framework/sources/modified_source/reconfiguration.spec.move +++ b/framework/libra-framework/sources/modified_source/reconfiguration.spec.move @@ -63,14 +63,14 @@ spec diem_framework::reconfiguration { spec reconfigure { use diem_framework::coin::CoinInfo; - use diem_framework::gas_coin::LibraCoin as GasCoin; + use diem_framework::libra_coin::LibraCoin; use diem_framework::transaction_fee; // use diem_framework::staking_config; pragma verify_duration_estimate = 120; // TODO: set because of timeout (property proved) requires exists(@diem_framework); - requires exists>(@diem_framework); + requires exists>(@diem_framework); include transaction_fee::RequiresCollectedFeesPerValueLeqBlockDiemSupply; // include staking_config::StakingRewardsConfigRequirement; diff --git a/framework/libra-framework/sources/modified_source/stake.move b/framework/libra-framework/sources/modified_source/stake.move index 9d4fa304b..851a2f9e4 100644 --- a/framework/libra-framework/sources/modified_source/stake.move +++ b/framework/libra-framework/sources/modified_source/stake.move @@ -7,7 +7,7 @@ module diem_framework::stake { use diem_std::bls12381; use diem_std::table::Table; use diem_std::comparator; - use diem_framework::gas_coin::LibraCoin as GasCoin; + use diem_framework::libra_coin::LibraCoin; use diem_framework::account; use diem_framework::coin::{Coin}; use diem_framework::event::{Self, EventHandle}; @@ -181,7 +181,7 @@ module diem_framework::stake { /// Stores transaction fees assigned to validators. All fees are distributed to validators /// at the end of the epoch. struct ValidatorFees has key { - fees_table: Table>, + fees_table: Table>, } diff --git a/framework/libra-framework/sources/modified_source/transaction_fee.move b/framework/libra-framework/sources/modified_source/transaction_fee.move index 95cbbe821..855e340bf 100644 --- a/framework/libra-framework/sources/modified_source/transaction_fee.move +++ b/framework/libra-framework/sources/modified_source/transaction_fee.move @@ -5,7 +5,7 @@ module diem_framework::transaction_fee { use std::error; use std::vector; use std::option::{Self, Option}; - use ol_framework::gas_coin::LibraCoin as GasCoin; + use ol_framework::libra_coin::LibraCoin; use ol_framework::fee_maker; use ol_framework::slow_wallet; use ol_framework::ol_account; @@ -30,13 +30,13 @@ module diem_framework::transaction_fee { /// Stores burn capability to burn the gas fees. struct GasCoinCapabilities has key { - burn_cap: BurnCapability, + burn_cap: BurnCapability, } /// Stores information about the block proposer and the amount of fees /// collected when executing the block. struct CollectedFeesPerBlock has key { - amount: AggregatableCoin, + amount: AggregatableCoin, proposer: Option
, burn_percentage: u8, } @@ -97,7 +97,7 @@ module diem_framework::transaction_fee { } // /// Burns a specified fraction of the coin. - // fun burn_coin_fraction(coin: &mut Coin, burn_percentage: u8) acquires GasCoinCapabilities { + // fun burn_coin_fraction(coin: &mut Coin, burn_percentage: u8) acquires GasCoinCapabilities { // assert!(burn_percentage <= 100, error::out_of_range(EINVALID_BURN_PERCENTAGE)); // let collected_amount = coin::value(coin); @@ -166,7 +166,7 @@ module diem_framework::transaction_fee { // /// Burn transaction fees in epilogue. // public(friend) fun burn_fee(account: address, fee: u64) acquires GasCoinCapabilities { - // coin::burn_from( + // coin::burn_from( // account, // fee, // &borrow_global(@diem_framework).burn_cap, @@ -181,14 +181,14 @@ module diem_framework::transaction_fee { // or we cannot redistribute fees later for some reason (e.g. account cannot receive AptoCoin) // we burn them all at once. This way we avoid having a check for every transaction epilogue. let collected_amount = &mut collected_fees.amount; - coin::collect_into_aggregatable_coin(account, fee, collected_amount); + coin::collect_into_aggregatable_coin(account, fee, collected_amount); // must adjust slow wallet tracker for all transactions slow_wallet::maybe_track_unlocked_withdraw(account, fee); } //////// 0L //////// /// a user can pay a fee directly - public fun user_pay_fee(sender: &signer, fee: Coin) acquires CollectedFeesPerBlock { + public fun user_pay_fee(sender: &signer, fee: Coin) acquires CollectedFeesPerBlock { // Need to track who is making payments to Fee Maker fee_maker::track_user_fee(sender, coin::value(&fee)); pay_fee_impl(fee); @@ -196,7 +196,7 @@ module diem_framework::transaction_fee { /// root account will pay a fee on behalf of a user account. // if VM is not going to track the tx it will just add a system address here - public fun vm_pay_fee(sender: &signer, account: address, fee: Coin) acquires CollectedFeesPerBlock { + public fun vm_pay_fee(sender: &signer, account: address, fee: Coin) acquires CollectedFeesPerBlock { // Need to track who is making payments to Fee Maker // don't track system transfers into transaction fee if (!system_addresses::is_framework_reserved_address(account)) { @@ -206,7 +206,7 @@ module diem_framework::transaction_fee { } /// implementation - fun pay_fee_impl(fee: Coin) acquires CollectedFeesPerBlock { + fun pay_fee_impl(fee: Coin) acquires CollectedFeesPerBlock { let collected_fees = borrow_global_mut(@diem_framework); @@ -214,7 +214,7 @@ module diem_framework::transaction_fee { // or we cannot redistribute fees later for some reason (e.g. account cannot receive AptoCoin) // we burn them all at once. This way we avoid having a check for every transaction epilogue. let collected_amount = &mut collected_fees.amount; - coin::merge_aggregatable_coin(collected_amount, fee); + coin::merge_aggregatable_coin(collected_amount, fee); } #[view] @@ -251,29 +251,29 @@ module diem_framework::transaction_fee { /////// 0L //////// /// withdraw from system transaction account. // belt and suspenders - public(friend) fun root_withdraw_all(root: &signer): Coin acquires CollectedFeesPerBlock { + public(friend) fun root_withdraw_all(root: &signer): Coin acquires CollectedFeesPerBlock { system_addresses::assert_ol(root); withdraw_all_impl(root) } // belt and suspenders implementation - fun withdraw_all_impl(root: &signer): Coin acquires CollectedFeesPerBlock { + fun withdraw_all_impl(root: &signer): Coin acquires CollectedFeesPerBlock { system_addresses::assert_ol(root); let collected_fees = borrow_global_mut(@diem_framework); - coin::drain_aggregatable_coin(&mut collected_fees.amount) + coin::drain_aggregatable_coin(&mut collected_fees.amount) } /// Only called during genesis. - public(friend) fun store_diem_coin_burn_cap(diem_framework: &signer, burn_cap: BurnCapability) { + public(friend) fun store_diem_coin_burn_cap(diem_framework: &signer, burn_cap: BurnCapability) { system_addresses::assert_diem_framework(diem_framework); move_to(diem_framework, GasCoinCapabilities { burn_cap }) } #[test_only] - public fun test_root_withdraw_all(root: &signer): Coin acquires CollectedFeesPerBlock { + public fun test_root_withdraw_all(root: &signer): Coin acquires CollectedFeesPerBlock { system_addresses::assert_ol(root); withdraw_all_impl(root) } @@ -298,35 +298,35 @@ module diem_framework::transaction_fee { // #[test(diem_framework = @diem_framework)] // fun test_burn_fraction_calculation(diem_framework: signer) acquires GasCoinCapabilities { - // use ol_framework::gas_coin; - // let (burn_cap, mint_cap) = gas_coin::initialize_for_test(&diem_framework); + // use ol_framework::libra_coin; + // let (burn_cap, mint_cap) = libra_coin::initialize_for_test(&diem_framework); // store_diem_coin_burn_cap(&diem_framework, burn_cap); - // let c1 = coin::mint(100, &mint_cap); - // assert!(*option::borrow(&coin::supply()) == 100, 0); + // let c1 = coin::mint(100, &mint_cap); + // assert!(*option::borrow(&coin::supply()) == 100, 0); // // Burning 25%. // burn_coin_fraction(&mut c1, 25); // assert!(coin::value(&c1) == 75, 0); - // assert!(*option::borrow(&coin::supply()) == 75, 0); + // assert!(*option::borrow(&coin::supply()) == 75, 0); // // Burning 0%. // burn_coin_fraction(&mut c1, 0); // assert!(coin::value(&c1) == 75, 0); - // assert!(*option::borrow(&coin::supply()) == 75, 0); + // assert!(*option::borrow(&coin::supply()) == 75, 0); // // Burning remaining 100%. // burn_coin_fraction(&mut c1, 100); // assert!(coin::value(&c1) == 0, 0); - // assert!(*option::borrow(&coin::supply()) == 0, 0); + // assert!(*option::borrow(&coin::supply()) == 0, 0); // coin::destroy_zero(c1); - // let c2 = coin::mint(10, &mint_cap); - // assert!(*option::borrow(&coin::supply()) == 10, 0); + // let c2 = coin::mint(10, &mint_cap); + // assert!(*option::borrow(&coin::supply()) == 10, 0); // burn_coin_fraction(&mut c2, 5); // assert!(coin::value(&c2) == 10, 0); - // assert!(*option::borrow(&coin::supply()) == 10, 0); + // assert!(*option::borrow(&coin::supply()) == 10, 0); // burn_coin_fraction(&mut c2, 100); // coin::destroy_zero(c2); @@ -342,14 +342,14 @@ module diem_framework::transaction_fee { // carol: signer, // ) acquires GasCoinCapabilities, CollectedFeesPerBlock { // //////// 0L //////// - // // changed to use GasCoin for fees + // // changed to use LibraCoin for fees // use std::signer; // use ol_framework::ol_account; - // use ol_framework::gas_coin; + // use ol_framework::libra_coin; // // Initialization. - // let (burn_cap, mint_cap) = gas_coin::initialize_for_test(&root); - // gas_coin::test_set_final_supply(&root, 100); + // let (burn_cap, mint_cap) = libra_coin::initialize_for_test(&root); + // libra_coin::test_set_final_supply(&root, 100); // store_diem_coin_burn_cap(&root, burn_cap); // initialize_fee_collection_and_distribution(&root, 10); @@ -363,7 +363,7 @@ module diem_framework::transaction_fee { // coin::deposit(alice_addr, coin::mint(10000, &mint_cap)); // coin::deposit(bob_addr, coin::mint(10000, &mint_cap)); // coin::deposit(carol_addr, coin::mint(10000, &mint_cap)); - // assert!(*option::borrow(&coin::supply()) == 30000, 0); + // assert!(*option::borrow(&coin::supply()) == 30000, 0); // // Block 1 starts. // process_collected_fees(); @@ -373,7 +373,7 @@ module diem_framework::transaction_fee { // let collected_fees = borrow_global(@ol_framework); // assert!(coin::is_aggregatable_coin_zero(&collected_fees.amount), 0); // assert!(*option::borrow(&collected_fees.proposer) == alice_addr, 0); - // assert!(*option::borrow(&coin::supply()) == 30000, 0); + // assert!(*option::borrow(&coin::supply()) == 30000, 0); // // Simulate transaction fee collection - here we simply collect some fees from Bob. // collect_fee(bob_addr, 100); @@ -381,9 +381,9 @@ module diem_framework::transaction_fee { // collect_fee(bob_addr, 400); // // Now Bob must have 1000 less in his account. Alice and Carol have the same amounts. - // assert!(coin::balance(alice_addr) == 10000, 0); - // assert!(coin::balance(bob_addr) == 9000, 0); - // assert!(coin::balance(carol_addr) == 10000, 0); + // assert!(coin::balance(alice_addr) == 10000, 0); + // assert!(coin::balance(bob_addr) == 9000, 0); + // assert!(coin::balance(carol_addr) == 10000, 0); // // Block 2 starts. // process_collected_fees(); @@ -391,23 +391,23 @@ module diem_framework::transaction_fee { // // Collected fees from Bob must have been assigned to Alice. // // assert!(stake::get_validator_fee(alice_addr) == 900, 0); - // assert!(coin::balance(alice_addr) == 10000, 0); - // assert!(coin::balance(bob_addr) == 9000, 0); - // assert!(coin::balance(carol_addr) == 10000, 0); + // assert!(coin::balance(alice_addr) == 10000, 0); + // assert!(coin::balance(bob_addr) == 9000, 0); + // assert!(coin::balance(carol_addr) == 10000, 0); // // Also, aggregator coin is drained and total supply is slightly changed (10% of 1000 is burnt). // let collected_fees = borrow_global(@ol_framework); // assert!(coin::is_aggregatable_coin_zero(&collected_fees.amount), 0); // assert!(*option::borrow(&collected_fees.proposer) == bob_addr, 0); - // // assert!(*option::borrow(&coin::supply()) == 29900, 0); + // // assert!(*option::borrow(&coin::supply()) == 29900, 0); // // Simulate transaction fee collection one more time. // collect_fee(bob_addr, 5000); // collect_fee(bob_addr, 4000); - // assert!(coin::balance(alice_addr) == 10000, 0); - // assert!(coin::balance(bob_addr) == 0, 0); - // assert!(coin::balance(carol_addr) == 10000, 0); + // assert!(coin::balance(alice_addr) == 10000, 0); + // assert!(coin::balance(bob_addr) == 0, 0); + // assert!(coin::balance(carol_addr) == 10000, 0); // // Block 3 starts. // process_collected_fees(); @@ -415,16 +415,16 @@ module diem_framework::transaction_fee { // // Collected fees should have been assigned to Bob because he was the peoposer. // // assert!(stake::get_validator_fee(alice_addr) == 900, 0); - // assert!(coin::balance(alice_addr) == 10000, 0); + // assert!(coin::balance(alice_addr) == 10000, 0); // // assert!(stake::get_validator_fee(bob_addr) == 8100, 0); - // assert!(coin::balance(bob_addr) == 0, 0); - // assert!(coin::balance(carol_addr) == 10000, 0); + // assert!(coin::balance(bob_addr) == 0, 0); + // assert!(coin::balance(carol_addr) == 10000, 0); // // Again, aggregator coin is drained and total supply is changed by 10% of 9000. // let collected_fees = borrow_global(@diem_framework); // assert!(coin::is_aggregatable_coin_zero(&collected_fees.amount), 0); // assert!(*option::borrow(&collected_fees.proposer) == carol_addr, 0); - // // assert!(*option::borrow(&coin::supply()) == 29000, 0); + // // assert!(*option::borrow(&coin::supply()) == 29000, 0); // // Simulate transaction fee collection one last time. // collect_fee(alice_addr, 1000); @@ -435,15 +435,15 @@ module diem_framework::transaction_fee { // register_proposer_for_fee_collection(alice_addr); // // Check that 2000 was collected from Alice. - // assert!(coin::balance(alice_addr) == 8000, 0); - // assert!(coin::balance(bob_addr) == 0, 0); + // assert!(coin::balance(alice_addr) == 8000, 0); + // assert!(coin::balance(bob_addr) == 0, 0); // // Carol must have some fees assigned now. // let collected_fees = borrow_global(@diem_framework); // // assert!(stake::get_validator_fee(carol_addr) == 1800, 0); // assert!(coin::is_aggregatable_coin_zero(&collected_fees.amount), 0); // assert!(*option::borrow(&collected_fees.proposer) == alice_addr, 0); - // // assert!(*option::borrow(&coin::supply()) == 28800, 0); + // // assert!(*option::borrow(&coin::supply()) == 28800, 0); // coin::destroy_burn_cap(burn_cap); // coin::destroy_mint_cap(mint_cap); diff --git a/framework/libra-framework/sources/modified_source/transaction_fee.spec.move b/framework/libra-framework/sources/modified_source/transaction_fee.spec.move index 716d1ca47..63c577f7d 100644 --- a/framework/libra-framework/sources/modified_source/transaction_fee.spec.move +++ b/framework/libra-framework/sources/modified_source/transaction_fee.spec.move @@ -27,45 +27,45 @@ spec diem_framework::transaction_fee { option::spec_borrow(global(@diem_framework).proposer) == proposer_addr; } - // spec burn_coin_fraction(coin: &mut Coin, burn_percentage: u8) { + // spec burn_coin_fraction(coin: &mut Coin, burn_percentage: u8) { // use diem_framework::optional_aggregator; // use diem_framework::aggregator; // use diem_framework::coin::CoinInfo; - // use ol_framework::gas_coin::LibraCoin as GasCoin; + // use ol_framework::libra_coin::LibraCoin; // requires burn_percentage <= 100; // requires exists(@diem_framework); - // requires exists>(@diem_framework); + // requires exists>(@diem_framework); // let amount_to_burn = (burn_percentage * coin::value(coin)) / 100; - // let maybe_supply = coin::get_coin_supply_opt(); + // let maybe_supply = coin::get_coin_supply_opt(); // aborts_if amount_to_burn > 0 && option::is_some(maybe_supply) && optional_aggregator::is_parallelizable(option::borrow(maybe_supply)) // && aggregator::spec_aggregator_get_val(option::borrow(option::borrow(maybe_supply).aggregator)) < // amount_to_burn; // aborts_if option::is_some(maybe_supply) && !optional_aggregator::is_parallelizable(option::borrow(maybe_supply)) // && option::borrow(option::borrow(maybe_supply).integer).value < // amount_to_burn; - // include (amount_to_burn > 0) ==> coin::AbortsIfNotExistCoinInfo; + // include (amount_to_burn > 0) ==> coin::AbortsIfNotExistCoinInfo; // } - spec fun collectedFeesAggregator(): AggregatableCoin { + spec fun collectedFeesAggregator(): AggregatableCoin { global(@diem_framework).amount } spec schema RequiresCollectedFeesPerValueLeqBlockDiemSupply { use diem_framework::optional_aggregator; use diem_framework::aggregator; - let maybe_supply = coin::get_coin_supply_opt(); + let maybe_supply = coin::get_coin_supply_opt(); requires (is_fees_collection_enabled() && option::is_some(maybe_supply)) ==> (aggregator::spec_aggregator_get_val(global(@diem_framework).amount.value) <= - optional_aggregator::optional_aggregator_value(option::spec_borrow(coin::get_coin_supply_opt()))); + optional_aggregator::optional_aggregator_value(option::spec_borrow(coin::get_coin_supply_opt()))); } // spec process_collected_fees() { // use diem_framework::coin::CoinInfo; - // use ol_framework::gas_coin::LibraCoin as GasCoin; + // use ol_framework::libra_coin::LibraCoin; // requires exists(@diem_framework); // // requires exists(@diem_framework); - // requires exists>(@diem_framework); + // requires exists>(@diem_framework); // include RequiresCollectedFeesPerValueLeqBlockDiemSupply; // } @@ -81,8 +81,8 @@ spec diem_framework::transaction_fee { let collected_fees = global(@diem_framework).amount; let aggr = collected_fees.value; aborts_if !exists(@diem_framework); - aborts_if fee > 0 && !exists>(account); - aborts_if fee > 0 && global>(account).coin.value < fee; + aborts_if fee > 0 && !exists>(account); + aborts_if fee > 0 && global>(account).coin.value < fee; aborts_if fee > 0 && aggregator::spec_aggregator_get_val(aggr) + fee > aggregator::spec_get_limit(aggr); aborts_if fee > 0 && aggregator::spec_aggregator_get_val(aggr) @@ -91,7 +91,7 @@ spec diem_framework::transaction_fee { /// Ensure caller is admin. /// Aborts if `GasCoinCapabilities` already exists. - spec store_diem_coin_burn_cap(diem_framework: &signer, burn_cap: BurnCapability) { + spec store_diem_coin_burn_cap(diem_framework: &signer, burn_cap: BurnCapability) { use std::signer; let addr = signer::address_of(diem_framework); aborts_if !system_addresses::is_diem_framework_address(addr); diff --git a/framework/libra-framework/sources/modified_source/transaction_validation.move b/framework/libra-framework/sources/modified_source/transaction_validation.move index dad6e2edc..2c9739240 100644 --- a/framework/libra-framework/sources/modified_source/transaction_validation.move +++ b/framework/libra-framework/sources/modified_source/transaction_validation.move @@ -6,7 +6,7 @@ module diem_framework::transaction_validation { use diem_framework::account; // use diem_framework::diem_coin::DiemCoin; - use ol_framework::gas_coin::LibraCoin as GasCoin; + use ol_framework::libra_coin::LibraCoin; use diem_framework::chain_id; use diem_framework::coin; use diem_framework::system_addresses; @@ -108,10 +108,10 @@ module diem_framework::transaction_validation { let max_transaction_fee = txn_gas_price * txn_max_gas_units; assert!( - coin::is_account_registered(transaction_sender), + coin::is_account_registered(transaction_sender), error::invalid_argument(PROLOGUE_ECANT_PAY_GAS_DEPOSIT), ); - let balance = coin::balance(transaction_sender); + let balance = coin::balance(transaction_sender); assert!(balance >= max_transaction_fee, error::invalid_argument(PROLOGUE_ECANT_PAY_GAS_DEPOSIT)); } @@ -195,7 +195,7 @@ module diem_framework::transaction_validation { // it's important to maintain the error code consistent with vm // to do failed transaction cleanup. assert!( - coin::balance(addr) >= transaction_fee_amount, + coin::balance(addr) >= transaction_fee_amount, error::out_of_range(PROLOGUE_ECANT_PAY_GAS_DEPOSIT), ); diff --git a/framework/libra-framework/sources/modified_source/transaction_validation.spec.move b/framework/libra-framework/sources/modified_source/transaction_validation.spec.move index ae25157d1..b9e37235b 100644 --- a/framework/libra-framework/sources/modified_source/transaction_validation.spec.move +++ b/framework/libra-framework/sources/modified_source/transaction_validation.spec.move @@ -48,8 +48,8 @@ spec diem_framework::transaction_validation { let max_transaction_fee = txn_gas_price * txn_max_gas_units; aborts_if max_transaction_fee > MAX_U64; aborts_if !(txn_sequence_number == global(transaction_sender).sequence_number); - aborts_if !exists>(transaction_sender); - aborts_if !(global>(transaction_sender).coin.value >= max_transaction_fee); + aborts_if !exists>(transaction_sender); + aborts_if !(global>(transaction_sender).coin.value >= max_transaction_fee); } spec prologue_common( @@ -128,7 +128,7 @@ spec diem_framework::transaction_validation { ) { use diem_framework::coin::{CoinStore}; use diem_framework::account::{Account}; - use diem_framework::gas_coin::LibraCoin as GasCoin; + use diem_framework::libra_coin::LibraCoin; // TODO: Can't verify `burn_fee`, complex aborts conditions. pragma aborts_if_is_partial; @@ -139,14 +139,14 @@ spec diem_framework::transaction_validation { let transaction_fee_amount = txn_gas_price * gas_used; let addr = signer::address_of(account); - aborts_if !exists>(addr); - aborts_if !(global>(addr).coin.value >= transaction_fee_amount); + aborts_if !exists>(addr); + aborts_if !(global>(addr).coin.value >= transaction_fee_amount); aborts_if !exists(addr); aborts_if !(global(addr).sequence_number < MAX_U64); - let pre_balance = global>(addr).coin.value; - let post balance = global>(addr).coin.value; + let pre_balance = global>(addr).coin.value; + let post balance = global>(addr).coin.value; let pre_account = global(addr); let post account = global(addr); ensures balance == pre_balance - transaction_fee_amount; diff --git a/framework/libra-framework/sources/modified_specs_only/block.spec.move b/framework/libra-framework/sources/modified_specs_only/block.spec.move index 1b340b54a..b99793ff3 100644 --- a/framework/libra-framework/sources/modified_specs_only/block.spec.move +++ b/framework/libra-framework/sources/modified_specs_only/block.spec.move @@ -8,7 +8,7 @@ spec diem_framework::block { spec block_prologue { use diem_framework::chain_status; use diem_framework::coin::CoinInfo; - use diem_framework::gas_coin::LibraCoin as GasCoin; + use diem_framework::libra_coin::LibraCoin; use diem_framework::transaction_fee; // use diem_framework::staking_config; @@ -21,7 +21,7 @@ spec diem_framework::block { requires (proposer == @vm_reserved) ==> (timestamp::spec_now_microseconds() == timestamp); requires (proposer != @vm_reserved) ==> (timestamp::spec_now_microseconds() < timestamp); requires exists(@diem_framework); - requires exists>(@diem_framework); + requires exists>(@diem_framework); include transaction_fee::RequiresCollectedFeesPerValueLeqBlockDiemSupply; // include staking_config::StakingRewardsConfigRequirement; diff --git a/framework/libra-framework/sources/modified_specs_only/consensus_config.spec.move b/framework/libra-framework/sources/modified_specs_only/consensus_config.spec.move index 5e77c756a..678d06ff0 100644 --- a/framework/libra-framework/sources/modified_specs_only/consensus_config.spec.move +++ b/framework/libra-framework/sources/modified_specs_only/consensus_config.spec.move @@ -22,7 +22,7 @@ spec diem_framework::consensus_config { use std::signer; use diem_framework::stake; use diem_framework::coin::CoinInfo; - use diem_framework::gas_coin::LibraCoin as GasCoin; + use diem_framework::libra_coin::LibraCoin; use diem_framework::transaction_fee; // use diem_framework::staking_config; @@ -38,6 +38,6 @@ spec diem_framework::consensus_config { requires chain_status::is_operating(); requires timestamp::spec_now_microseconds() >= reconfiguration::last_reconfiguration_time(); requires exists(@diem_framework); - requires exists>(@diem_framework); + requires exists>(@diem_framework); } } diff --git a/framework/libra-framework/sources/modified_specs_only/gas_schedule.spec.move b/framework/libra-framework/sources/modified_specs_only/gas_schedule.spec.move index 7ef6fad0f..9045ef1be 100644 --- a/framework/libra-framework/sources/modified_specs_only/gas_schedule.spec.move +++ b/framework/libra-framework/sources/modified_specs_only/gas_schedule.spec.move @@ -18,12 +18,12 @@ spec diem_framework::gas_schedule { use diem_framework::util; use diem_framework::stake; use diem_framework::coin::CoinInfo; - use diem_framework::gas_coin::LibraCoin as GasCoin; + use diem_framework::libra_coin::LibraCoin; use diem_framework::transaction_fee; // use diem_framework::staking_config; requires exists(@diem_framework); - requires exists>(@diem_framework); + requires exists>(@diem_framework); include transaction_fee::RequiresCollectedFeesPerValueLeqBlockDiemSupply; // include staking_config::StakingRewardsConfigRequirement; @@ -38,14 +38,14 @@ spec diem_framework::gas_schedule { spec set_storage_gas_config(diem_framework: &signer, config: StorageGasConfig) { use diem_framework::stake; use diem_framework::coin::CoinInfo; - use diem_framework::gas_coin::LibraCoin as GasCoin; + use diem_framework::libra_coin::LibraCoin; use diem_framework::transaction_fee; // use diem_framework::staking_config; pragma timeout = 100; requires exists(@diem_framework); - requires exists>(@diem_framework); + requires exists>(@diem_framework); include system_addresses::AbortsIfNotDiemFramework{ account: diem_framework }; include transaction_fee::RequiresCollectedFeesPerValueLeqBlockDiemSupply; // include staking_config::StakingRewardsConfigRequirement; diff --git a/framework/libra-framework/sources/modified_specs_only/version.spec.move b/framework/libra-framework/sources/modified_specs_only/version.spec.move index f1d87c263..865b66c2c 100644 --- a/framework/libra-framework/sources/modified_specs_only/version.spec.move +++ b/framework/libra-framework/sources/modified_specs_only/version.spec.move @@ -10,7 +10,7 @@ spec diem_framework::version { use diem_framework::timestamp; use diem_framework::stake; use diem_framework::coin::CoinInfo; - use diem_framework::gas_coin::LibraCoin as GasCoin; + use diem_framework::libra_coin::LibraCoin; use diem_framework::transaction_fee; // use diem_framework::staking_config; // Not verified when verify_duration_estimate > vc_timeout @@ -20,7 +20,7 @@ spec diem_framework::version { requires chain_status::is_operating(); requires timestamp::spec_now_microseconds() >= reconfiguration::last_reconfiguration_time(); requires exists(@diem_framework); - requires exists>(@diem_framework); + requires exists>(@diem_framework); aborts_if !exists(signer::address_of(account)); aborts_if !exists(@diem_framework); diff --git a/framework/libra-framework/sources/multisig_account.move b/framework/libra-framework/sources/multisig_account.move index acefbf95d..f6582c7ac 100644 --- a/framework/libra-framework/sources/multisig_account.move +++ b/framework/libra-framework/sources/multisig_account.move @@ -37,7 +37,7 @@ /// and implement the governance voting logic on top. module diem_framework::multisig_account { use diem_framework::account::{Self, SignerCapability, new_event_handle, create_resource_address}; - use diem_framework::gas_coin::LibraCoin as GasCoin; + use diem_framework::libra_coin::LibraCoin; use diem_framework::chain_id; use diem_framework::create_signer::create_signer; use diem_framework::coin; @@ -889,8 +889,8 @@ module diem_framework::multisig_account { account::create_resource_account(owner, create_multisig_account_seed(to_bytes(&owner_nonce))); // Register the account to receive APT as this is not done by default as part of the resource account creation // flow. - if (!coin::is_account_registered(address_of(&multisig_signer))) { - coin::register(&multisig_signer); + if (!coin::is_account_registered(address_of(&multisig_signer))) { + coin::register(&multisig_signer); }; (multisig_signer, multisig_signer_cap) diff --git a/framework/libra-framework/sources/ol_sources/burn.move b/framework/libra-framework/sources/ol_sources/burn.move index c0977e022..24754ddb3 100644 --- a/framework/libra-framework/sources/ol_sources/burn.move +++ b/framework/libra-framework/sources/ol_sources/burn.move @@ -17,7 +17,7 @@ module ol_framework::burn { use std::vector; // use ol_framework::ol_account; use ol_framework::system_addresses; - use ol_framework::gas_coin::LibraCoin as GasCoin; + use ol_framework::libra_coin::LibraCoin; // use ol_framework::transaction_fee; use ol_framework::coin::{Self, Coin}; use ol_framework::match_index; @@ -57,7 +57,7 @@ module ol_framework::burn { /// 1: U64, how many coins burned public fun epoch_burn_fees( vm: &signer, - coins: &mut Coin, + coins: &mut Coin, ): (bool, u64) acquires UserBurnPreference, BurnCounter { system_addresses::assert_ol(vm); @@ -128,7 +128,7 @@ module ol_framework::burn { /// NOTE: this is unchecked, any user can perform this. /// the user should call this function and not burn methods on coin.move /// since those methods do not track the lifetime_burned - public fun burn_and_track(coin: Coin) acquires BurnCounter { + public fun burn_and_track(coin: Coin) acquires BurnCounter { let value_sent = coin::value(&coin); let state = borrow_global_mut(@ol_framework); coin::user_burn(coin); @@ -137,7 +137,7 @@ module ol_framework::burn { /// performs a burn or recycle according to the attributed user's preference public fun burn_with_user_preference( - vm: &signer, payer: address, user_share: Coin + vm: &signer, payer: address, user_share: Coin ) acquires BurnCounter, UserBurnPreference { system_addresses::assert_ol(vm); let value_sent = coin::value(&user_share); diff --git a/framework/libra-framework/sources/ol_sources/epoch_boundary.move b/framework/libra-framework/sources/ol_sources/epoch_boundary.move index a8f51bbb0..fb31fd4a2 100644 --- a/framework/libra-framework/sources/ol_sources/epoch_boundary.move +++ b/framework/libra-framework/sources/ol_sources/epoch_boundary.move @@ -4,7 +4,7 @@ module diem_framework::epoch_boundary { use ol_framework::musical_chairs; use ol_framework::proof_of_fee; use ol_framework::stake; - use ol_framework::gas_coin::LibraCoin as GasCoin; + use ol_framework::libra_coin::LibraCoin; use ol_framework::rewards; use ol_framework::jail; // use ol_framework::grade; @@ -22,7 +22,7 @@ module diem_framework::epoch_boundary { use std::vector; use std::error; - use diem_std::debug::print; + // use diem_std::debug::print; friend diem_framework::block; @@ -191,9 +191,6 @@ module diem_framework::epoch_boundary { // drip coins let (s_success, s_amount) = slow_wallet::on_new_epoch(root); - print(&33333); - print(&s_success); - print(&s_amount); status.slow_wallet_drip_amount = s_amount; status.slow_wallet_drip_success = s_success; @@ -279,7 +276,7 @@ module diem_framework::epoch_boundary { /// NOTE: receives from reconfiguration.move a mutable borrow of a coin to pay reward /// NOTE: burn remaining fees from transaction fee account happens in reconfiguration.move (it's not a validator_universe concern) // Returns (compliant_vals, reward_deposited) - fun process_outgoing_validators(root: &signer, reward_budget: &mut Coin, reward_per: u64, compliant_vals: vector
): (vector
, u64){ + fun process_outgoing_validators(root: &signer, reward_budget: &mut Coin, reward_per: u64, compliant_vals: vector
): (vector
, u64){ system_addresses::assert_ol(root); let vals = stake::get_current_validators(); let reward_deposited = 0; diff --git a/framework/libra-framework/sources/ol_sources/genesis_migration.move b/framework/libra-framework/sources/ol_sources/genesis_migration.move index 42d9bd35f..09ba28c49 100644 --- a/framework/libra-framework/sources/ol_sources/genesis_migration.move +++ b/framework/libra-framework/sources/ol_sources/genesis_migration.move @@ -13,8 +13,8 @@ module ol_framework::genesis_migration { use diem_framework::coin; use ol_framework::ol_account; use ol_framework::validator_universe; - use ol_framework::gas_coin; - use ol_framework::gas_coin::LibraCoin as GasCoin; + use ol_framework::libra_coin; + use ol_framework::libra_coin::LibraCoin; use ol_framework::transaction_fee; use ol_framework::pledge_accounts; use diem_framework::system_addresses; @@ -55,15 +55,15 @@ module ol_framework::genesis_migration { // Genesis validators should not receive ANY coins from MINT during testing, testnet, nor mainnet up to this point. // they will receive some from the infra escrow. - let genesis_balance = coin::balance(user_addr); + let genesis_balance = coin::balance(user_addr); assert!(expected_initial_balance >= genesis_balance, error::invalid_state(EGENESIS_BALANCE_TOO_HIGH)); let coins_to_mint = expected_initial_balance - genesis_balance; - let c = coin::vm_mint(vm, coins_to_mint); + let c = coin::vm_mint(vm, coins_to_mint); ol_account::deposit_coins(user_addr, c); - let new_balance = coin::balance(user_addr); + let new_balance = coin::balance(user_addr); assert!(new_balance == expected_initial_balance, error::invalid_state(EBALANCE_MISMATCH)); @@ -75,7 +75,7 @@ module ol_framework::genesis_migration { } fun rounding_mint(root: &signer, target_supply: u64) { - let existing_supply = gas_coin::supply(); + let existing_supply = libra_coin::supply(); // we should not ever have migrated more coins than expected // this should abort the genesis process @@ -83,7 +83,7 @@ module ol_framework::genesis_migration { error::invalid_state(EMINTED_OVER_TARGET)); if (target_supply > existing_supply) { - let coin = coin::vm_mint(root, target_supply - existing_supply); + let coin = coin::vm_mint(root, target_supply - existing_supply); transaction_fee::vm_pay_fee(root, @ol_framework, coin); }; } diff --git a/framework/libra-framework/sources/ol_sources/infra_escrow.move b/framework/libra-framework/sources/ol_sources/infra_escrow.move index 24f2f69c3..82817aca7 100644 --- a/framework/libra-framework/sources/ol_sources/infra_escrow.move +++ b/framework/libra-framework/sources/ol_sources/infra_escrow.move @@ -12,7 +12,7 @@ module ol_framework::infra_escrow{ use std::option::{Self, Option}; use diem_framework::system_addresses; - use ol_framework::gas_coin::LibraCoin as GasCoin; + use ol_framework::libra_coin::LibraCoin; use ol_framework::pledge_accounts; // use ol_framework::slow_wallet; use ol_framework::ol_account; @@ -42,7 +42,7 @@ module ol_framework::infra_escrow{ /// VM can call down pledged funds. // NOTE: the signer MUST_BE 0x0 address - fun infra_pledge_withdraw(vm: &signer, amount: u64): Option> { + fun infra_pledge_withdraw(vm: &signer, amount: u64): Option> { system_addresses::assert_ol(vm); pledge_accounts::withdraw_from_all_pledge_accounts(vm, amount) } diff --git a/framework/libra-framework/sources/ol_sources/libra_coin.move b/framework/libra-framework/sources/ol_sources/libra_coin.move index 72440f3fb..101641d2b 100644 --- a/framework/libra-framework/sources/ol_sources/libra_coin.move +++ b/framework/libra-framework/sources/ol_sources/libra_coin.move @@ -6,115 +6,8 @@ // Original Commit: // https://github.com/diem/diem/commit/782b31cb08eeb717ea2b6f3edbf616b13fd4cae8 -module 0x1::LibraCoin { - use std::signer; - - // A representing the Libra coin - // The value of the coin. May be zero - struct LibraCoin has store { value: u64 } - - // A singleton that grants access to `LibraCoin.mint`. Only the Association has one. - struct MintCapability has store, key {} - - // The sum of the values of all LibraCoin resources in the system - struct MarketCap has store, key { total_value: u64 } - - // Return a reference to the MintCapability published under the sender's account. Fails if the - // sender does not have a MintCapability. - // Since only the Association account has a mint capability, this will only succeed if it is - // invoked by a transaction sent by that account. - public fun mint_with_default_capability(sender: &signer, amount: u64): LibraCoin acquires MintCapability, MarketCap { - mint(amount, borrow_global(signer::address_of(sender))) - } - - // Mint a new LibraCoin worth `value`. The caller must have a reference to a MintCapability. - // Only the Association account can acquire such a reference, and it can do so only via - // `borrow_sender_mint_capability` - public fun mint(value: u64, _capability: &MintCapability): LibraCoin acquires MarketCap { - // TODO: temporary measure for testnet only: limit minting to 1B Libra at a time. - // this is to prevent the market cap's total value from hitting u64_max due to excessive - // minting. This will not be a problem in the production Libra system because coins will - // be backed with real-world assets, and thus minting will be correspondingly rarer. - // * 1000000 because the unit is microlibra - assert!(value <= 1000000000 * 1000000, 11); - - // update market cap to reflect minting - let market_cap = borrow_global_mut(@0xA550C18); - market_cap.total_value = market_cap.total_value + value; - - LibraCoin { value } - } - - // This can only be invoked by the Association address, and only a single time. - // Currently, it is invoked in the genesis transaction - public fun initialize(sender: &signer) { - // Only callable by the Association address - assert!(signer::address_of(sender) == @0xA550C18, 1); - - move_to(sender, MintCapability{}); - move_to(sender, MarketCap { total_value: 0 }); - } - - // Return the total value of all Libra in the system - public fun market_cap(): u64 acquires MarketCap { - borrow_global(@0xA550C18).total_value - } - - // Create a new LibraCoin with a value of 0 - public fun zero(): LibraCoin { - LibraCoin { value: 0 } - } - - // Public accessor for the value of a coin - public fun value(coin: &LibraCoin): u64 { - coin.value - } - - // Splits the given coin into two and returns them both - // It leverages `Self.withdraw` for any verifications of the values - public fun split(coin: &mut LibraCoin, amount: u64): LibraCoin { - let other = withdraw(coin, amount); - other - } - - // "Divides" the given coin into two, where original coin is modified in place - // The original coin will have value = original value - `amount` - // The new coin will have a value = `amount` - // Fails if the coins value is less than `amount` - public fun withdraw(coin: &mut LibraCoin, amount: u64): LibraCoin { - // Check that `amount` is less than the coin's value - assert!(coin.value >= amount, 10); - // Split the coin - coin.value = value(coin) - amount; - LibraCoin { value: amount } - } - - // Merges two coins and returns a new coin whose value is equal to the sum of the two inputs - public fun join(coin1: &mut LibraCoin, coin2: LibraCoin) { - deposit(coin1, coin2); - } - - // "Merges" the two coins - // The coin passed in by reference will have a value equal to the sum of the two coins - // The `check` coin is consumed in the process - public fun deposit(coin: &mut LibraCoin, check: LibraCoin) { - let LibraCoin { value } = check; - coin.value = value(coin) + value - } - - // Destroy a coin - // Fails if the value is non-zero - // The amount of LibraCoin in the system is a tightly controlled property, - // so you cannot "burn" any non-zero amount of LibraCoin - public fun destroy_zero(coin: LibraCoin) { - let LibraCoin { value } = coin; - assert!(value == 0, 11) - } - -} - -module ol_framework::gas_coin { +module ol_framework::libra_coin { use std::string; use std::error; use std::signer; @@ -141,7 +34,7 @@ module ol_framework::gas_coin { /// Supply somehow above MAX_U64 const ESUPPLY_OVERFLOW: u64 = 4; - struct LibraCoin has key {} + struct LibraCoin has key { /* new games for society */} struct FinalMint has key { value: u64, diff --git a/framework/libra-framework/sources/ol_sources/libra_coin.orig b/framework/libra-framework/sources/ol_sources/libra_coin.orig new file mode 100644 index 000000000..7a4b6d402 --- /dev/null +++ b/framework/libra-framework/sources/ol_sources/libra_coin.orig @@ -0,0 +1,117 @@ +// Copyright (c) The Libra Core Contributors +// SPDX-License-Identifier: Apache-2.0 +// Licensed under the Apache License, Version 2.0 +// Original source: +// https://github.com/diem/diem/blob/782b31cb08eeb717ea2b6f3edbf616b13fd4cae8/language/move-lang/stdlib/modules/libra_coin.move +// Original Commit: +// https://github.com/diem/diem/commit/782b31cb08eeb717ea2b6f3edbf616b13fd4cae8 + +address 0x0: + +module LibraCoin { + use 0x0.Transaction; + + // A resource representing the Libra coin + // The value of the coin. May be zero + resource struct T { value: u64 } + + // A singleton resource that grants access to `LibraCoin.mint`. Only the Association has one. + resource struct MintCapability {} + + // The sum of the values of all LibraCoin.T resources in the system + resource struct MarketCap { total_value: u64 } + + // Return a reference to the MintCapability published under the sender's account. Fails if the + // sender does not have a MintCapability. + // Since only the Association account has a mint capability, this will only succeed if it is + // invoked by a transaction sent by that account. + public mint_with_default_capability(amount: u64): T acquires MintCapability, MarketCap { + mint(amount, borrow_global(Transaction.sender())) + } + + // Mint a new LibraCoin.T worth `value`. The caller must have a reference to a MintCapability. + // Only the Association account can acquire such a reference, and it can do so only via + // `borrow_sender_mint_capability` + public mint(value: u64, capability: &MintCapability): T acquires MarketCap { + // TODO: temporary measure for testnet only: limit minting to 1B Libra at a time. + // this is to prevent the market cap's total value from hitting u64_max due to excessive + // minting. This will not be a problem in the production Libra system because coins will + // be backed with real-world assets, and thus minting will be correspondingly rarer. + // * 1000000 because the unit is microlibra + Transaction.assert(value <= 1000000000 * 1000000, 11); + + // update market cap resource to reflect minting + let market_cap = borrow_global_mut(0xA550C18); + market_cap.total_value = market_cap.total_value + value; + + T { value } + } + + // This can only be invoked by the Association address, and only a single time. + // Currently, it is invoked in the genesis transaction + public initialize() { + // Only callable by the Association address + Transaction.assert(Transaction.sender() == 0xA550C18, 1); + + move_to_sender(MintCapability{}); + move_to_sender(MarketCap { total_value: 0 }); + } + + // Return the total value of all Libra in the system + public market_cap(): u64 acquires MarketCap { + borrow_global(0xA550C18).total_value + } + + // Create a new LibraCoin.T with a value of 0 + public zero(): T { + T { value: 0 } + } + + // Public accessor for the value of a coin + public value(coin: &T): u64 { + coin.value + } + + // Splits the given coin into two and returns them both + // It leverages `Self.withdraw` for any verifications of the values + public split(coin: T, amount: u64): (T, T) { + let other = coin.withdraw(amount); + (coin, other) + } + + // "Divides" the given coin into two, where original coin is modified in place + // The original coin will have value = original value - `amount` + // The new coin will have a value = `amount` + // Fails if the coins value is less than `amount` + public withdraw(coin: &mut T, amount: u64): T { + // Check that `amount` is less than the coin's value + Transaction.assert(coin.value >= amount, 10); + // Split the coin + coin.value = coin.value - amount; + T { value: amount } + } + + // Merges two coins and returns a new coin whose value is equal to the sum of the two inputs + public join(coin1: T, coin2: T): T { + coin1.deposit(coin2); + coin1 + } + + // "Merges" the two coins + // The coin passed in by reference will have a value equal to the sum of the two coins + // The `check` coin is consumed in the process + public deposit(coin: &mut T, check: T) { + let T { value } = check; + coin.value = coin.value + value + } + + // Destroy a coin + // Fails if the value is non-zero + // The amount of LibraCoin.T in the system is a tightly controlled property, + // so you cannot "burn" any non-zero amount of LibraCoin.T + public destroy_zero(coin: Self.T) { + let T { value } = coin; + Transaction.assert(value == 0, 11) + } + +} \ No newline at end of file diff --git a/framework/libra-framework/sources/ol_sources/libra_coin.ported b/framework/libra-framework/sources/ol_sources/libra_coin.ported new file mode 100644 index 000000000..c91534669 --- /dev/null +++ b/framework/libra-framework/sources/ol_sources/libra_coin.ported @@ -0,0 +1,107 @@ +// libraCoin module original ported to update Move Lang v1.5 spec +module 0x1::LibraCoin { + use std::signer; + + // A representing the Libra coin + // The value of the coin. May be zero + struct LibraCoin has store { value: u64 } + + // A singleton that grants access to `LibraCoin.mint`. Only the Association has one. + struct MintCapability has store, key {} + + // The sum of the values of all LibraCoin resources in the system + struct MarketCap has store, key { total_value: u64 } + + // Return a reference to the MintCapability published under the sender's account. Fails if the + // sender does not have a MintCapability. + // Since only the Association account has a mint capability, this will only succeed if it is + // invoked by a transaction sent by that account. + public fun mint_with_default_capability(sender: &signer, amount: u64): LibraCoin acquires MintCapability, MarketCap { + mint(amount, borrow_global(signer::address_of(sender))) + } + + // Mint a new LibraCoin worth `value`. The caller must have a reference to a MintCapability. + // Only the Association account can acquire such a reference, and it can do so only via + // `borrow_sender_mint_capability` + public fun mint(value: u64, _capability: &MintCapability): LibraCoin acquires MarketCap { + // TODO: temporary measure for testnet only: limit minting to 1B Libra at a time. + // this is to prevent the market cap's total value from hitting u64_max due to excessive + // minting. This will not be a problem in the production Libra system because coins will + // be backed with real-world assets, and thus minting will be correspondingly rarer. + // * 1000000 because the unit is microlibra + assert!(value <= 1000000000 * 1000000, 11); + + // update market cap to reflect minting + let market_cap = borrow_global_mut(@0xA550C18); + market_cap.total_value = market_cap.total_value + value; + + LibraCoin { value } + } + + // This can only be invoked by the Association address, and only a single time. + // Currently, it is invoked in the genesis transaction + public fun initialize(sender: &signer) { + // Only callable by the Association address + assert!(signer::address_of(sender) == @0xA550C18, 1); + + move_to(sender, MintCapability{}); + move_to(sender, MarketCap { total_value: 0 }); + } + + // Return the total value of all Libra in the system + public fun market_cap(): u64 acquires MarketCap { + borrow_global(@0xA550C18).total_value + } + + // Create a new LibraCoin with a value of 0 + public fun zero(): LibraCoin { + LibraCoin { value: 0 } + } + + // Public accessor for the value of a coin + public fun value(coin: &LibraCoin): u64 { + coin.value + } + + // Splits the given coin into two and returns them both + // It leverages `Self.withdraw` for any verifications of the values + public fun split(coin: &mut LibraCoin, amount: u64): LibraCoin { + let other = withdraw(coin, amount); + other + } + + // "Divides" the given coin into two, where original coin is modified in place + // The original coin will have value = original value - `amount` + // The new coin will have a value = `amount` + // Fails if the coins value is less than `amount` + public fun withdraw(coin: &mut LibraCoin, amount: u64): LibraCoin { + // Check that `amount` is less than the coin's value + assert!(coin.value >= amount, 10); + // Split the coin + coin.value = value(coin) - amount; + LibraCoin { value: amount } + } + + // Merges two coins and returns a new coin whose value is equal to the sum of the two inputs + public fun join(coin1: &mut LibraCoin, coin2: LibraCoin) { + deposit(coin1, coin2); + } + + // "Merges" the two coins + // The coin passed in by reference will have a value equal to the sum of the two coins + // The `check` coin is consumed in the process + public fun deposit(coin: &mut LibraCoin, check: LibraCoin) { + let LibraCoin { value } = check; + coin.value = value(coin) + value + } + + // Destroy a coin + // Fails if the value is non-zero + // The amount of LibraCoin in the system is a tightly controlled property, + // so you cannot "burn" any non-zero amount of LibraCoin + public fun destroy_zero(coin: LibraCoin) { + let LibraCoin { value } = coin; + assert!(value == 0, 11) + } + +} \ No newline at end of file diff --git a/framework/libra-framework/sources/ol_sources/match_index.move b/framework/libra-framework/sources/ol_sources/match_index.move index 466470479..81492ca8d 100644 --- a/framework/libra-framework/sources/ol_sources/match_index.move +++ b/framework/libra-framework/sources/ol_sources/match_index.move @@ -2,7 +2,7 @@ module ol_framework::match_index { use diem_framework::system_addresses; use ol_framework::cumulative_deposits; - use ol_framework::gas_coin::LibraCoin as GasCoin; + use ol_framework::libra_coin::LibraCoin; use ol_framework::ol_account; use diem_framework::coin::{Self, Coin}; use diem_framework::transaction_fee; @@ -93,7 +93,7 @@ module ol_framework::match_index { /// the root account can take a user coin, and match with accounts in index. // Note, this leave NO REMAINDER, and burns any rounding. // TODO: When the coin is sent, an attribution is also made to the payer. - public fun match_and_recycle(vm: &signer, coin: &mut Coin) acquires MatchIndex { + public fun match_and_recycle(vm: &signer, coin: &mut Coin) acquires MatchIndex { match_impl(vm, coin); // if there is anything remaining it's a superman 3 issue @@ -110,7 +110,7 @@ module ol_framework::match_index { /// the root account can take a user coin, and match with accounts in index. // TODO: When the coin is sent, an attribution is also made to the payer. - fun match_impl(vm: &signer, coin: &mut Coin) acquires MatchIndex { + fun match_impl(vm: &signer, coin: &mut Coin) acquires MatchIndex { system_addresses::assert_ol(vm); let list = { get_address_list() }; // NOTE devs, the added scope drops the borrow which is used below. let len = vector::length
(&list); @@ -177,4 +177,4 @@ module ol_framework::match_index { calc_ratios(root, addr_list); } -} \ No newline at end of file +} diff --git a/framework/libra-framework/sources/ol_sources/mock.move b/framework/libra-framework/sources/ol_sources/mock.move index c48b39e57..115d71e01 100644 --- a/framework/libra-framework/sources/ol_sources/mock.move +++ b/framework/libra-framework/sources/ol_sources/mock.move @@ -15,7 +15,7 @@ module ol_framework::mock { use diem_framework::system_addresses; use ol_framework::epoch_boundary; use diem_framework::coin; - use ol_framework::gas_coin::{Self, LibraCoin as GasCoin}; + use ol_framework::libra_coin::{Self, LibraCoin}; use diem_framework::transaction_fee; use ol_framework::ol_account; use ol_framework::tower_state; @@ -153,7 +153,7 @@ module ol_framework::mock { genesis::test_end_genesis(root); let mint_cap = init_coin_impl(root); - gas_coin::restore_mint_cap(root, mint_cap); + libra_coin::restore_mint_cap(root, mint_cap); assert!(!chain_status::is_genesis(), 0); } @@ -164,7 +164,7 @@ module ol_framework::mock { let mint_cap = init_coin_impl(root); - gas_coin::restore_mint_cap(root, mint_cap); + libra_coin::restore_mint_cap(root, mint_cap); } #[test_only] @@ -173,8 +173,8 @@ module ol_framework::mock { system_addresses::assert_ol(root); - let mint_cap = if (coin::is_coin_initialized()) { - gas_coin::extract_mint_cap(root) + let mint_cap = if (coin::is_coin_initialized()) { + libra_coin::extract_mint_cap(root) } else { init_coin_impl(root) }; @@ -187,7 +187,7 @@ module ol_framework::mock { let c = coin::test_mint(amount, &mint_cap); ol_account::deposit_coins(*addr, c); - let b = coin::balance(*addr); + let b = coin::balance(*addr); assert!(b == amount, 0001); @@ -197,14 +197,14 @@ module ol_framework::mock { if (drip) { slow_wallet::slow_wallet_epoch_drip(root, amount); }; - gas_coin::restore_mint_cap(root, mint_cap); + libra_coin::restore_mint_cap(root, mint_cap); } #[test_only] - fun init_coin_impl(root: &signer): coin::MintCapability { + fun init_coin_impl(root: &signer): coin::MintCapability { system_addresses::assert_ol(root); - let (burn_cap, mint_cap) = gas_coin::initialize_for_test_without_aggregator_factory(root); + let (burn_cap, mint_cap) = libra_coin::initialize_for_test_without_aggregator_factory(root); coin::destroy_burn_cap(burn_cap); transaction_fee::initialize_fee_collection_and_distribution(root, 0); @@ -212,9 +212,9 @@ module ol_framework::mock { let initial_fees = 1000000 * 100; // coin scaling * 100 coins let tx_fees = coin::test_mint(initial_fees, &mint_cap); transaction_fee::vm_pay_fee(root, @ol_framework, tx_fees); - let supply_pre = gas_coin::supply(); + let supply_pre = libra_coin::supply(); assert!(supply_pre == initial_fees, ESUPPLY_MISMATCH); - gas_coin::test_set_final_supply(root, initial_fees); + libra_coin::test_set_final_supply(root, initial_fees); mint_cap } @@ -342,7 +342,7 @@ module ol_framework::mock { let _vals = genesis_n_vals(root, n_vals); // need to include eve to init funds let genesis_mint = 1000000; ol_initialize_coin_and_fund_vals(root, genesis_mint, true); - let supply_pre = gas_coin::supply(); + let supply_pre = libra_coin::supply(); let mocked_tx_fees = 1000000 * 100; assert!(supply_pre == mocked_tx_fees + (n_vals * genesis_mint), 73570001); } diff --git a/framework/libra-framework/sources/ol_sources/ol_account.move b/framework/libra-framework/sources/ol_sources/ol_account.move index 0c3ff1ae2..dc40a986c 100644 --- a/framework/libra-framework/sources/ol_sources/ol_account.move +++ b/framework/libra-framework/sources/ol_sources/ol_account.move @@ -12,7 +12,7 @@ module ol_framework::ol_account { use diem_std::math64; - use ol_framework::gas_coin::{Self, LibraCoin as GasCoin}; + use ol_framework::libra_coin::{Self, LibraCoin}; use ol_framework::slow_wallet; use ol_framework::receipts; use ol_framework::cumulative_deposits; @@ -81,13 +81,13 @@ module ol_framework::ol_account { /// A wrapper to create a resource account and register it to receive GAS. public fun ol_create_resource_account(user: &signer, seed: vector): (signer, account::SignerCapability) { let (resource_account_sig, cap) = account::create_resource_account(user, seed); - coin::register(&resource_account_sig); + coin::register(&resource_account_sig); (resource_account_sig, cap) } fun create_impl(auth_key: address) { let new_signer = account::create_account(auth_key); - coin::register(&new_signer); + coin::register(&new_signer); receipts::user_init(&new_signer); init_burn_tracker(&new_signer); } @@ -123,7 +123,7 @@ module ol_framework::ol_account { error::invalid_state(ECANT_MATCH_ADDRESS_IN_LOOKUP) ); - coin::register(&new_signer); + coin::register(&new_signer); init_burn_tracker(&new_signer); new_signer } @@ -175,7 +175,7 @@ module ol_framework::ol_account { /// Withdraw a coin while tracking the unlocked withdraw public fun withdraw_with_capability(cap: &WithdrawCapability, amount: u64): - Coin acquires BurnTracker { + Coin acquires BurnTracker { let payer = account::get_withdraw_cap_address(cap); let limit = slow_wallet::unlocked_amount(payer); assert!(amount < limit, error::invalid_state(EINSUFFICIENT_BALANCE)); @@ -190,7 +190,7 @@ module ol_framework::ol_account { } /// Withdraw funds while respecting the transfer limits - public fun withdraw(sender: &signer, amount: u64): Coin acquires + public fun withdraw(sender: &signer, amount: u64): Coin acquires BurnTracker { spec { assume !system_addresses::signer_is_ol_root(sender); @@ -198,7 +198,7 @@ module ol_framework::ol_account { }; // never abort when its a system address // if (system_addresses::signer_is_ol_root(sender)) return - // coin::zero(); // and VM needs to figure this out. + // coin::zero(); // and VM needs to figure this out. let addr = signer::address_of(sender); assert!(amount > 0, error::invalid_argument(EZERO_TRANSFER)); @@ -206,7 +206,7 @@ module ol_framework::ol_account { let limit = slow_wallet::unlocked_amount(addr); assert!(amount <= limit, error::invalid_state(EINSUFFICIENT_BALANCE)); slow_wallet::maybe_track_unlocked_withdraw(addr, amount); - let coin = coin::withdraw(sender, amount); + let coin = coin::withdraw(sender, amount); // the outgoing coins should trigger an update on this account // order matters here maybe_update_burn_tracker_impl(addr); @@ -226,7 +226,7 @@ module ol_framework::ol_account { // TODO: Check if Resource Accounts can register here, since they // may be created without any coin registration. - assert!(coin::is_account_registered(recipient), error::invalid_argument(EACCOUNT_NOT_REGISTERED_FOR_GAS)); + assert!(coin::is_account_registered(recipient), error::invalid_argument(EACCOUNT_NOT_REGISTERED_FOR_GAS)); // must track the slow wallet on both sides of the transfer slow_wallet::maybe_track_slow_transfer(payer, recipient, amount); @@ -249,12 +249,12 @@ module ol_framework::ol_account { system_addresses::assert_ol(vm); let amount_transferred = 0; // should not halt - if (!coin::is_account_registered(from)) return (0, false); - if (!coin::is_account_registered(to)) return (0, false); + if (!coin::is_account_registered(from)) return (0, false); + if (!coin::is_account_registered(to)) return (0, false); - if(amount > coin::balance(from)) return (0, false); + if(amount > coin::balance(from)) return (0, false); - let coin_option = coin::vm_withdraw(vm, from, amount); + let coin_option = coin::vm_withdraw(vm, from, amount); if (option::is_some(&coin_option)) { let c = option::extract(&mut coin_option); @@ -279,35 +279,35 @@ module ol_framework::ol_account { #[test_only] public fun test_vm_withdraw(vm: &signer, from: address, amount: u64): - Option> acquires BurnTracker { + Option> acquires BurnTracker { system_addresses::assert_ol(vm); // should not halt - if (!coin::is_account_registered(from)) return option::none(); - if(amount > coin::balance(from)) return option::none(); + if (!coin::is_account_registered(from)) return option::none(); + if(amount > coin::balance(from)) return option::none(); maybe_update_burn_tracker_impl(from); - coin::vm_withdraw(vm, from, amount) + coin::vm_withdraw(vm, from, amount) } /// vm can transfer between account to settle. /// THIS FUNCTION CAN BYPASS SLOW WALLET WITHDRAW RESTRICTIONS /// used to withdraw and track the withdrawal public(friend) fun vm_withdraw_unlimited(vm: &signer, from: address, amount: - u64): Option> acquires + u64): Option> acquires BurnTracker { system_addresses::assert_ol(vm); // should not halt - if(amount > coin::balance(from)) return option::none(); + if(amount > coin::balance(from)) return option::none(); // since the VM can withdraw more than what is unlocked // it needs to adjust the unlocked amount, which may end up zero // if it goes over the limit - let c_opt = coin::vm_withdraw(vm, from, amount); + let c_opt = coin::vm_withdraw(vm, from, amount); // we're not always sure what's in the option if (option::is_some(&c_opt)) { let coin = option::borrow(&c_opt); - let value = coin::value(coin); + let value = coin::value(coin); if (value > 0) { maybe_update_burn_tracker_impl(from); slow_wallet::maybe_track_unlocked_withdraw(from, value); @@ -318,14 +318,14 @@ module ol_framework::ol_account { } - // public fun withdraw_with_capability(cap: &WithdrawCapability, amount: u64): Coin { + // public fun withdraw_with_capability(cap: &WithdrawCapability, amount: u64): Coin { // coin::withdraw_with_capability(cap, amount) // } //////// 0L //////// #[view] - /// return the GasCoin balance as tuple (unlocked, total) + /// return the LibraCoin balance as tuple (unlocked, total) // TODO v7: consolidate balance checks here, not in account, slow_wallet, or coin public fun balance(addr: address): (u64, u64) { slow_wallet::balance(addr) @@ -338,7 +338,7 @@ module ol_framework::ol_account { let (_, unscaled_value) = balance(owner); if (unscaled_value == 0) return (0,0); - let decimal_places = coin::decimals(); + let decimal_places = coin::decimals(); let scaling = math64::pow(10, (decimal_places as u64)); let value = fixed_point32::create_from_rational(unscaled_value, scaling); // multply will TRUNCATE. @@ -356,9 +356,9 @@ module ol_framework::ol_account { if (exists(addr)) return; let prev_supply = if (chain_status::is_genesis()) { - gas_coin::get_final_supply() + libra_coin::get_final_supply() } else { - gas_coin::supply() + libra_coin::supply() }; let (_, current_user_balance) = balance(addr); @@ -384,8 +384,8 @@ module ol_framework::ol_account { // 1. how much burn happened in between // this must be true but we // don't abort since the VM may be calling this - let current_supply = gas_coin::supply(); - let original_supply = gas_coin::get_final_supply(); + let current_supply = libra_coin::supply(); + let original_supply = libra_coin::get_final_supply(); if (original_supply > current_supply) { // update if there was a change in supply let burn_in_period = original_supply - current_supply; @@ -435,31 +435,31 @@ module ol_framework::ol_account { /// A coin which is split or extracted can be sent to an account without a sender signing. /// TODO: cumulative tracker will not work here. - public fun deposit_coins(to: address, coins: Coin) acquires + public fun deposit_coins(to: address, coins: Coin) acquires BurnTracker { - assert!(coin::is_account_registered(to), error::invalid_state(EACCOUNT_NOT_REGISTERED_FOR_GAS)); + assert!(coin::is_account_registered(to), error::invalid_state(EACCOUNT_NOT_REGISTERED_FOR_GAS)); slow_wallet::maybe_track_unlocked_deposit(to, coin::value(&coins)); - coin::deposit(to, coins); + coin::deposit(to, coins); // the incoming coins should trigger an update in tracker maybe_update_burn_tracker_impl(to); } /// for validator rewards and community wallet transfers, /// the SlowWallet.unlocked DOES NOT get updated. - public fun vm_deposit_coins_locked(vm: &signer, to: address, coins: Coin) acquires + public fun vm_deposit_coins_locked(vm: &signer, to: address, coins: Coin) acquires BurnTracker { system_addresses::assert_ol(vm); - assert!(coin::is_account_registered(to), error::invalid_state(EACCOUNT_NOT_REGISTERED_FOR_GAS)); - coin::deposit(to, coins); + assert!(coin::is_account_registered(to), error::invalid_state(EACCOUNT_NOT_REGISTERED_FOR_GAS)); + coin::deposit(to, coins); // the incoming coins should trigger an update in tracker maybe_update_burn_tracker_impl(to); } // pass through function to guard the use of Coin - public fun merge_coins(dst_coin: &mut Coin, source_coin: Coin) { + public fun merge_coins(dst_coin: &mut Coin, source_coin: Coin) { // TODO: check it this is true: no tracking on merged coins since they are always withdrawn, and are a hot potato that might deposit later. // slow_wallet::maybe_track_unlocked_deposit(to, coin::value(&coins)); - coin::merge(dst_coin, source_coin); + coin::merge(dst_coin, source_coin); } @@ -469,7 +469,7 @@ module ol_framework::ol_account { public fun assert_account_is_registered_for_gas(addr: address) { assert_account_exists(addr); - assert!(coin::is_account_registered(addr), error::not_found(EACCOUNT_NOT_REGISTERED_FOR_GAS)); + assert!(coin::is_account_registered(addr), error::not_found(EACCOUNT_NOT_REGISTERED_FOR_GAS)); } /// Set whether `account` can receive direct transfers of coins that they have not explicitly registered to receive. @@ -535,18 +535,18 @@ module ol_framework::ol_account { let carol = from_bcs::to_address(x"00000000000000000000000000000000000000000000000000000000000ca501"); let (burn_cap, mint_cap) = - ol_framework::gas_coin::initialize_for_test(core); - gas_coin::test_set_final_supply(root, 1000); // dummy to prevent fail + ol_framework::libra_coin::initialize_for_test(core); + libra_coin::test_set_final_supply(root, 1000); // dummy to prevent fail create_account(root, signer::address_of(alice)); create_account(root, bob); create_account(root, carol); coin::deposit(signer::address_of(alice), coin::mint(10000, &mint_cap)); transfer(alice, bob, 500); - assert!(coin::balance(bob) == 500, 0); + assert!(coin::balance(bob) == 500, 0); transfer(alice, carol, 500); - assert!(coin::balance(carol) == 500, 1); + assert!(coin::balance(carol) == 500, 1); transfer(alice, carol, 1500); - assert!(coin::balance(carol) == 2000, 2); + assert!(coin::balance(carol) == 2000, 2); coin::destroy_burn_cap(burn_cap); coin::destroy_mint_cap(mint_cap); @@ -559,13 +559,13 @@ module ol_framework::ol_account { let resource_acc_addr = signer::address_of(&resource_account); let (burn_cap, mint_cap) = - ol_framework::gas_coin::initialize_for_test(core); - gas_coin::test_set_final_supply(root, 1000); // dummy to prevent fail + ol_framework::libra_coin::initialize_for_test(core); + libra_coin::test_set_final_supply(root, 1000); // dummy to prevent fail create_account(root, signer::address_of(alice)); coin::deposit(signer::address_of(alice), coin::mint(10000, &mint_cap)); transfer(alice, resource_acc_addr, 500); - assert!(coin::balance(resource_acc_addr) == 500, 1); + assert!(coin::balance(resource_acc_addr) == 500, 1); coin::destroy_burn_cap(burn_cap); coin::destroy_mint_cap(mint_cap); @@ -575,8 +575,8 @@ module ol_framework::ol_account { public fun test_batch_transfer(root: &signer, from: &signer, core: &signer, recipient_1: &signer, recipient_2: &signer) acquires BurnTracker{ let (burn_cap, mint_cap) = - diem_framework::gas_coin::initialize_for_test(core); - gas_coin::test_set_final_supply(root, 1000); // dummy to prevent fail + diem_framework::libra_coin::initialize_for_test(core); + libra_coin::test_set_final_supply(root, 1000); // dummy to prevent fail create_account(root, signer::address_of(from)); let recipient_1_addr = signer::address_of(recipient_1); @@ -589,8 +589,8 @@ module ol_framework::ol_account { vector[recipient_1_addr, recipient_2_addr], vector[100, 500], ); - assert!(coin::balance(recipient_1_addr) == 100, 0); - assert!(coin::balance(recipient_2_addr) == 500, 1); + assert!(coin::balance(recipient_1_addr) == 100, 0); + assert!(coin::balance(recipient_2_addr) == 500, 1); coin::destroy_burn_cap(burn_cap); coin::destroy_mint_cap(mint_cap); } @@ -650,10 +650,10 @@ module ol_framework::ol_account { public fun test_set_allow_direct_coin_transfers(root: &signer, user: &signer) acquires DirectTransferConfig { let addr = signer::address_of(user); - let (b, m) = gas_coin::initialize_for_test(root); + let (b, m) = libra_coin::initialize_for_test(root); coin::destroy_burn_cap(b); coin::destroy_mint_cap(m); - gas_coin::test_set_final_supply(root, 1000); // dummy to prevent fail + libra_coin::test_set_final_supply(root, 1000); // dummy to prevent fail create_account(root, addr); set_allow_direct_coin_transfers(user, true); diff --git a/framework/libra-framework/sources/ol_sources/ol_account.spec.move b/framework/libra-framework/sources/ol_sources/ol_account.spec.move index e78a0c0bb..dd658efa6 100644 --- a/framework/libra-framework/sources/ol_sources/ol_account.spec.move +++ b/framework/libra-framework/sources/ol_sources/ol_account.spec.move @@ -2,8 +2,8 @@ spec ol_framework::ol_account { spec module { pragma verify = true; // pragma aborts_if_is_strict; - invariant [suspendable] chain_status::is_operating() ==> exists(@diem_framework); - invariant [suspendable] chain_status::is_operating() ==> exists>(@diem_framework); + invariant [suspendable] chain_status::is_operating() ==> exists(@diem_framework); + invariant [suspendable] chain_status::is_operating() ==> exists>(@diem_framework); } @@ -13,7 +13,7 @@ spec ol_framework::ol_account { // spec create_account(auth_key: address) { // include CreateAccountAbortsIf; // ensures exists(auth_key); - // ensures exists>(auth_key); + // ensures exists>(auth_key); // } spec schema CreateAccountAbortsIf { auth_key: address; @@ -30,13 +30,13 @@ spec ol_framework::ol_account { } // ol_account::withdraw can never use more than the slow wallet limit - spec withdraw(sender: &signer, amount: u64): Coin{ + spec withdraw(sender: &signer, amount: u64): Coin{ include AssumeCoinRegistered; let account_addr = signer::address_of(sender); aborts_if amount == 0; - let coin_store = global>(account_addr); + let coin_store = global>(account_addr); let balance = coin_store.coin.value; aborts_if balance < amount; @@ -46,13 +46,13 @@ spec ol_framework::ol_account { aborts_if exists(account_addr) && slow_store.unlocked < amount; - ensures result == Coin{value: amount}; + ensures result == Coin{value: amount}; } spec schema AssumeCoinRegistered { sender: &signer; let account_addr = signer::address_of(sender); - aborts_if !coin::is_account_registered(account_addr); + aborts_if !coin::is_account_registered(account_addr); } spec assert_account_exists(addr: address) { @@ -60,10 +60,10 @@ spec ol_framework::ol_account { } /// Check if the address existed. - /// Check if the GasCoin under the address existed. + /// Check if the LibraCoin under the address existed. spec assert_account_is_registered_for_gas(addr: address) { aborts_if !account::exists_at(addr); - aborts_if !coin::is_account_registered(addr); + aborts_if !coin::is_account_registered(addr); } spec set_allow_direct_coin_transfers(account: &signer, allow: bool) { diff --git a/framework/libra-framework/sources/ol_sources/oracle.move b/framework/libra-framework/sources/ol_sources/oracle.move index 831a3a613..36429916c 100644 --- a/framework/libra-framework/sources/ol_sources/oracle.move +++ b/framework/libra-framework/sources/ol_sources/oracle.move @@ -12,7 +12,7 @@ module ol_framework::oracle { use diem_framework::event::{Self, EventHandle}; use diem_framework::coin::{Self, Coin}; use ol_framework::ol_account; - use ol_framework::gas_coin::LibraCoin as GasCoin; + use ol_framework::libra_coin::LibraCoin; use ol_framework::globals; use ol_framework::vouch; use ol_framework::epoch_helper; @@ -263,7 +263,7 @@ module ol_framework::oracle { } } - public(friend) fun epoch_boundary(root: &signer, budget: &mut Coin): (u64, u64) acquires GlobalCounter, ProviderList, Tower { + public(friend) fun epoch_boundary(root: &signer, budget: &mut Coin): (u64, u64) acquires GlobalCounter, ProviderList, Tower { let (provider_count, paid_amount ) = epoch_reward(root, budget); reset_counters(root); (provider_count, paid_amount) @@ -285,15 +285,13 @@ module ol_framework::oracle { /// successful miners. /// returns: provider_list_len total_deposited /// - fun epoch_reward(root: &signer, budget: &mut Coin): (u64, u64) acquires ProviderList, Tower { + fun epoch_reward(root: &signer, budget: &mut Coin): (u64, u64) acquires ProviderList, Tower { system_addresses::assert_ol(root); - // print(&666666); let coin_value = coin::value(budget); - // print(&coin_value); let provider_list = borrow_global_mut(@ol_framework).current_above_threshold; - // print(&provider_list); + let len = vector::length(&provider_list); if (len == 0) return (0, 0); diff --git a/framework/libra-framework/sources/ol_sources/pledge_accounts.move b/framework/libra-framework/sources/ol_sources/pledge_accounts.move index cfd77a1d1..ec030d6f7 100644 --- a/framework/libra-framework/sources/ol_sources/pledge_accounts.move +++ b/framework/libra-framework/sources/ol_sources/pledge_accounts.move @@ -44,7 +44,7 @@ use std::error; use std::option::{Self, Option}; use std::fixed_point64; - use ol_framework::gas_coin::LibraCoin as GasCoin; + use ol_framework::libra_coin::LibraCoin; use ol_framework::ol_account; use ol_framework::epoch_helper; use ol_framework::burn; @@ -69,7 +69,7 @@ // project_id: vector, // a string that identifies the project address_of_beneficiary: address, // the address of the project, also where the BeneficiaryPolicy is stored for reference. amount: u64, - pledge: coin::Coin, + pledge: coin::Coin, epoch_of_last_deposit: u64, lifetime_pledged: u64, lifetime_withdrawn: u64 @@ -142,7 +142,7 @@ public fun save_pledge( sig: &signer, address_of_beneficiary: address, - pledge: coin::Coin + pledge: coin::Coin ) acquires MyPledges, BeneficiaryPolicy { maybe_initialize_my_pledges(sig); assert!(exists(address_of_beneficiary), error::invalid_state(ENO_BENEFICIARY_POLICY)); @@ -159,7 +159,7 @@ vm: &signer, pledger: address, address_of_beneficiary: address, - pledge: &mut coin::Coin + pledge: &mut coin::Coin ) acquires MyPledges, BeneficiaryPolicy { system_addresses::assert_ol(vm); assert!(exists(address_of_beneficiary), error::invalid_state(ENO_BENEFICIARY_POLICY)); @@ -178,7 +178,7 @@ sig: &signer, // project_id: vector, address_of_beneficiary: address, - init_pledge: coin::Coin, + init_pledge: coin::Coin, ) acquires MyPledges, BeneficiaryPolicy { let account = signer::address_of(sig); maybe_initialize_my_pledges(sig); @@ -204,7 +204,7 @@ // add funds to an existing pledge account // Note: only funds that are Unlocked and otherwise unrestricted can be used in pledge account. - fun add_coin_to_pledge_account(sender_addr: address, idx: u64, coin: coin::Coin) acquires MyPledges, BeneficiaryPolicy { + fun add_coin_to_pledge_account(sender_addr: address, idx: u64, coin: coin::Coin) acquires MyPledges, BeneficiaryPolicy { // let sender_addr = signer::address_of(sender); // let (found, _idx) = pledge_at_idx(&sender_addr, &address_of_beneficiary); let amount = coin::value(&coin); @@ -231,24 +231,24 @@ } // withdraw an amount from all pledge accounts. Check first that there are remaining funds before attempting to withdraw. - public fun withdraw_from_all_pledge_accounts(sig_beneficiary: &signer, amount: u64): option::Option> acquires MyPledges, BeneficiaryPolicy { + public fun withdraw_from_all_pledge_accounts(sig_beneficiary: &signer, amount: u64): option::Option> acquires MyPledges, BeneficiaryPolicy { let address_of_beneficiary = signer::address_of(sig_beneficiary); if (!exists(address_of_beneficiary)) { - return option::none>() + return option::none>() }; let pledgers = *&borrow_global(address_of_beneficiary).pledgers; let amount_available = *&borrow_global(address_of_beneficiary).amount_available; if (amount_available == 0 || amount == 0) { - return option::none>() + return option::none>() }; let pct_withdraw = fixed_point64::create_from_rational((amount as u128), (amount_available as u128)); let i = 0; - let all_coins = option::none>(); + let all_coins = option::none>(); while (i < vector::length(&pledgers)) { let pledge_account = *vector::borrow(&pledgers, i); // DANGER: this is a private function that changes balances. @@ -288,7 +288,7 @@ // this is to be used for funding, // but also for revoking a pledge // WARN: we must know there is a coin at this account before calling it. - fun withdraw_from_one_pledge_account(address_of_beneficiary: &address, payer: &address, amount: u64): option::Option> acquires MyPledges, BeneficiaryPolicy { + fun withdraw_from_one_pledge_account(address_of_beneficiary: &address, payer: &address, amount: u64): option::Option> acquires MyPledges, BeneficiaryPolicy { let (found, idx) = pledge_at_idx(payer, address_of_beneficiary); @@ -331,10 +331,10 @@ // this is to be used for funding, // but also for revoking a pledge // WARN: we must know there is a coin at this account before calling it. - fun withdraw_pct_from_one_pledge_account(address_of_beneficiary: &address, payer: &address, pct: &fixed_point64::FixedPoint64):Option> acquires MyPledges, BeneficiaryPolicy { + fun withdraw_pct_from_one_pledge_account(address_of_beneficiary: &address, payer: &address, pct: &fixed_point64::FixedPoint64):Option> acquires MyPledges, BeneficiaryPolicy { let (found, idx) = pledge_at_idx(payer, address_of_beneficiary); - if (!found) return option::none>(); // don't error on functions called by VM. + if (!found) return option::none>(); // don't error on functions called by VM. let pledge_state = borrow_global_mut(*payer); @@ -343,14 +343,14 @@ let user_pledged_balance = (pledge_account.amount as u128); if (user_pledged_balance == 0) { - return option::none>() + return option::none>() }; let amount_withdraw = fixed_point64::multiply_u128(user_pledged_balance, *pct); if (amount_withdraw == 0) { - return option::none>() + return option::none>() }; if (user_pledged_balance >= amount_withdraw) { @@ -494,7 +494,7 @@ //// Genesis helper // private function only to be used at genesis for infra escrow // This used only at genesis, and CAN BYPASS THE WITHDRAW LIMITS - public fun genesis_infra_escrow_pledge(root: &signer, account: &signer, coin: Coin) acquires MyPledges, BeneficiaryPolicy { + public fun genesis_infra_escrow_pledge(root: &signer, account: &signer, coin: Coin) acquires MyPledges, BeneficiaryPolicy { // TODO: add genesis time here, once the timestamp genesis issue is fixed. // chain_status::assert_genesis(); system_addresses::assert_ol(root); @@ -514,7 +514,7 @@ // Danger: If the VM calls this and there is an error there will be a halt. // always call pledge_at_idx() first. // NOTE: cannot wrap in option witout changing the struct abilities to copy, drop. - // can't do that because Diem cannot be copy, or drop. + // can't do that because Diem cannot be copy, or drop. // public fun maybe_find_a_pledge(account: &address, address_of_beneficiary: &address): &mut PledgeAccount acquires MyPledges { // let (found, idx) = pledge_at_idx(account, address_of_beneficiary); // assert!(found, error::invalid_state(ENO_PLEDGE_INIT)); @@ -623,10 +623,9 @@ //////// TEST HELPERS /////// #[test_only] // Danger! withdraws from an account. - public fun test_single_withdrawal(vm: &signer, bene: &address, donor: &address, amount: u64): option::Option> acquires MyPledges, BeneficiaryPolicy{ + public fun test_single_withdrawal(vm: &signer, bene: &address, donor: &address, amount: u64): option::Option> acquires MyPledges, BeneficiaryPolicy{ system_addresses::assert_ol(vm); // testnet::assert_testnet(vm); withdraw_from_one_pledge_account(bene, donor, amount) } } - diff --git a/framework/libra-framework/sources/ol_sources/rewards.move b/framework/libra-framework/sources/ol_sources/rewards.move index 2359072cb..c9df9ff27 100644 --- a/framework/libra-framework/sources/ol_sources/rewards.move +++ b/framework/libra-framework/sources/ol_sources/rewards.move @@ -4,7 +4,7 @@ module ol_framework::rewards { use diem_framework::coin::{Self, Coin}; use diem_framework::stake; use diem_framework::system_addresses; - use ol_framework::gas_coin::LibraCoin as GasCoin; + use ol_framework::libra_coin::LibraCoin; use ol_framework::ol_account; // use diem_std::debug::print; @@ -17,7 +17,7 @@ module ol_framework::rewards { /// process a single reward /// root needs to have an owned coin already extracted. Not a mutable borrow. - public(friend) fun process_single(root: &signer, addr: address, coin: Coin, reward_type: u8) { + public(friend) fun process_single(root: &signer, addr: address, coin: Coin, reward_type: u8) { system_addresses::assert_ol(root); pay_reward(root, addr, coin, reward_type); } @@ -26,7 +26,7 @@ module ol_framework::rewards { /// convenience function to process payment for multiple recipients /// when the reward is the same for all recipients. // belt and suspenders pattern: guarded by friend, authorized by root, and public function separated from authorized private function. yes, it's redundant, see ol_move_coding_conventions.md - public(friend) fun process_multiple(root: &signer, list: vector
, reward_per: u64, reward_budget: &mut Coin, reward_type: u8) { + public(friend) fun process_multiple(root: &signer, list: vector
, reward_per: u64, reward_budget: &mut Coin, reward_type: u8) { // note the mutable coin will be retuned to caller for them to do what // is necessary, including destroying if it is zero. @@ -38,7 +38,7 @@ module ol_framework::rewards { /// process all the validators // belt and suspenders - fun process_recipients_impl(root: &signer, list: vector
, reward_per: u64, reward_budget: &mut Coin, reward_type: u8) { + fun process_recipients_impl(root: &signer, list: vector
, reward_per: u64, reward_budget: &mut Coin, reward_type: u8) { // note the mutable coin will be retuned to caller for them to do what // is necessary, including destroying if it is zero. system_addresses::assert_ol(root); @@ -55,7 +55,7 @@ module ol_framework::rewards { /// Pay one validator their reward /// belt and suspenders - fun pay_reward(root: &signer, addr: address, coin: Coin, reward_type: u8) { + fun pay_reward(root: &signer, addr: address, coin: Coin, reward_type: u8) { // draw from transaction fees account // transaction fees account should have a subsidy from infra escrow // from start of epoch. @@ -81,14 +81,14 @@ module ol_framework::rewards { #[test_only] /// helps create a payment to a validator // belt and suspenders too - public fun test_helper_pay_reward(root: &signer, addr: address, coin: Coin, reward_type: u8) { + public fun test_helper_pay_reward(root: &signer, addr: address, coin: Coin, reward_type: u8) { use ol_framework::testnet; testnet::assert_testnet(root); pay_reward(root, addr, coin, reward_type); } #[test_only] - public fun test_process_recipients(root: &signer, list: vector
, reward_per: u64, coin: &mut Coin, reward_type: u8) { + public fun test_process_recipients(root: &signer, list: vector
, reward_per: u64, coin: &mut Coin, reward_type: u8) { system_addresses::assert_ol(root); process_multiple(root, list, reward_per, coin, reward_type); diff --git a/framework/libra-framework/sources/ol_sources/safe.move b/framework/libra-framework/sources/ol_sources/safe.move index c0e8d71b2..db166ac74 100644 --- a/framework/libra-framework/sources/ol_sources/safe.move +++ b/framework/libra-framework/sources/ol_sources/safe.move @@ -50,7 +50,7 @@ module ol_framework::safe { use diem_framework::account::WithdrawCapability; use diem_framework::coin; use ol_framework::ol_account; - use ol_framework::gas_coin::LibraCoin as GasCoin; + use ol_framework::libra_coin::LibraCoin; use ol_framework::multi_action; use ol_framework::system_addresses; use ol_framework::transaction_fee; @@ -194,7 +194,7 @@ module ol_framework::safe { let pct = fixed_point32::create_from_rational(reg.fee, PERCENT_SCALE); - let fee = fixed_point32::multiply_u64(coin::balance(*multi_sig_addr), pct); + let fee = fixed_point32::multiply_u64(coin::balance(*multi_sig_addr), pct); expected_fees = expected_fees + fee; let coin_opt = ol_account::vm_withdraw_unlimited(vm, *multi_sig_addr, fee); @@ -212,5 +212,3 @@ module ol_framework::safe { (security_bill_count, security_bill_amount, success) } } - - diff --git a/framework/libra-framework/sources/ol_sources/slow_wallet.move b/framework/libra-framework/sources/ol_sources/slow_wallet.move index b5e2ba919..ce0c9dc48 100644 --- a/framework/libra-framework/sources/ol_sources/slow_wallet.move +++ b/framework/libra-framework/sources/ol_sources/slow_wallet.move @@ -13,7 +13,7 @@ module ol_framework::slow_wallet { use diem_framework::system_addresses; use diem_framework::coin; use diem_framework::account; - use ol_framework::gas_coin::LibraCoin as GasCoin; + use ol_framework::libra_coin::LibraCoin; use ol_framework::testnet; use ol_framework::sacred_cows; @@ -110,7 +110,7 @@ module ol_framework::slow_wallet { if (!exists(signer::address_of(sig))) { move_to(sig, SlowWallet { - unlocked: coin::balance(addr), + unlocked: coin::balance(addr), transferred: 0, }); } @@ -131,7 +131,7 @@ module ol_framework::slow_wallet { let i = 0; while (i < len) { let addr = vector::borrow
(&list, i); - let user_balance = coin::balance(*addr); + let user_balance = coin::balance(*addr); if (!exists(*addr)) continue; // NOTE: formal verifiction caught // this, not sure how it's possible @@ -239,7 +239,7 @@ module ol_framework::slow_wallet { /// helper to get the unlocked and total balance. (unlocked, total) public(friend) fun balance(addr: address): (u64, u64) acquires SlowWallet{ // this is a normal account, so return the normal balance - let total = coin::balance(addr); + let total = coin::balance(addr); if (exists(addr)) { let s = borrow_global(addr); return (s.unlocked, total) @@ -259,7 +259,7 @@ module ol_framework::slow_wallet { return s.unlocked }; - coin::balance(addr) + coin::balance(addr) } #[view] diff --git a/framework/libra-framework/sources/ol_sources/tests/burn.test.move b/framework/libra-framework/sources/ol_sources/tests/burn.test.move index b7b6b96e9..f5bb4c8bc 100644 --- a/framework/libra-framework/sources/ol_sources/tests/burn.test.move +++ b/framework/libra-framework/sources/ol_sources/tests/burn.test.move @@ -2,7 +2,7 @@ #[test_only] module ol_framework::test_burn { use ol_framework::mock; - use ol_framework::gas_coin; + use ol_framework::libra_coin; use ol_framework::ol_account; use ol_framework::match_index; use ol_framework::burn; @@ -23,12 +23,12 @@ module ol_framework::test_burn { fun burn_reduces_supply(root: &signer, alice: &signer) { mock::genesis_n_vals(root, 1); mock::ol_initialize_coin_and_fund_vals(root, 10000, true); - let supply_pre = gas_coin::supply(); + let supply_pre = libra_coin::supply(); let alice_burn = 5; let c = ol_account::withdraw(alice, alice_burn); burn::burn_and_track(c); - let supply = gas_coin::supply(); + let supply = libra_coin::supply(); assert!(supply == (supply_pre - alice_burn), 7357001); } @@ -174,7 +174,7 @@ module ol_framework::test_burn { let genesis_mint = 1000000; // 1 coin per let epoch_reward = genesis_mint; // just to be explicit mock::ol_initialize_coin_and_fund_vals(root, genesis_mint, true); - let supply_pre = gas_coin::supply(); + let supply_pre = libra_coin::supply(); let mocked_tx_fees = 1000000 * 100; // 100 coins in tx fee account // 105 coins total assert!(supply_pre == mocked_tx_fees + (n_vals * genesis_mint), 73570001); @@ -197,7 +197,7 @@ module ol_framework::test_burn { // So the current supply should be lower, // The the old supply was reduced by what was burned (the excess in tx bucket) - let supply_post = gas_coin::supply(); + let supply_post = libra_coin::supply(); assert!(supply_post == supply_pre - amount_burned_excess_tx_account, 73570003); @@ -278,14 +278,13 @@ module ol_framework::test_burn { // TransactionFee::pay_fee_and_track(@Alice, coin); // let fee_makers = TransactionFee::get_fee_makers(); - // // print(&fee_makers); // assert!(Vector::length(&fee_makers)==1, 735702); // assert!(TransactionFee::get_fees_collected()==1, 735703); // } #[test(root=@ol_framework, alice=@0x1000a)] fun track_fees(root: &signer, alice: address) { - // use ol_framework::gas_coin; + // use ol_framework::libra_coin; let _vals = mock::genesis_n_vals(root, 1); // need to include eve to init funds mock::ol_initialize_coin_and_fund_vals(root, 10000, true); @@ -388,4 +387,4 @@ module ol_framework::test_burn { assert!(cumu_burn_2 > cumu_burn, 7357010); } -} \ No newline at end of file +} diff --git a/framework/libra-framework/sources/ol_sources/tests/migration.test.move b/framework/libra-framework/sources/ol_sources/tests/migration.test.move index a09954a9b..ebbc026bb 100644 --- a/framework/libra-framework/sources/ol_sources/tests/migration.test.move +++ b/framework/libra-framework/sources/ol_sources/tests/migration.test.move @@ -7,7 +7,7 @@ module ol_framework::test_migration { use std::fixed_point32; use ol_framework::mock; use diem_framework::coin; - use ol_framework::gas_coin::LibraCoin as GasCoin; + use ol_framework::libra_coin::LibraCoin; use std::signer; use std::bcs; @@ -44,7 +44,7 @@ module ol_framework::test_migration { init_balance, ); - let user_balance = coin::balance(addr); + let user_balance = coin::balance(addr); assert!(user_balance == init_balance, 73570000); @@ -74,7 +74,7 @@ module ol_framework::test_migration { assert!(all_pledge_balance == user_pledge, 73570005); - let updated_balance = coin::balance(addr); + let updated_balance = coin::balance(addr); assert!((updated_balance + user_pledge) == init_balance, 73570006); } diff --git a/framework/libra-framework/sources/ol_sources/tests/rewards.test.move b/framework/libra-framework/sources/ol_sources/tests/rewards.test.move index 51cac5be0..12639bfe6 100644 --- a/framework/libra-framework/sources/ol_sources/tests/rewards.test.move +++ b/framework/libra-framework/sources/ol_sources/tests/rewards.test.move @@ -3,7 +3,7 @@ module ol_framework::test_rewards { use diem_framework::coin; use diem_framework::stake; use ol_framework::burn; - use ol_framework::gas_coin::{Self, LibraCoin as GasCoin}; + use ol_framework::libra_coin::{Self, LibraCoin}; use ol_framework::mock; use ol_framework::rewards; @@ -15,7 +15,7 @@ module ol_framework::test_rewards { let alice = @0x1000a; mock::genesis_n_vals(&root, 1); - let mint_cap = gas_coin::extract_mint_cap(&root); + let mint_cap = libra_coin::extract_mint_cap(&root); let uid_before = stake::get_reward_event_guid(alice); @@ -27,7 +27,7 @@ module ol_framework::test_rewards { let uid_after = stake::get_reward_event_guid(alice); assert!(uid_after > uid_before, 7357001); - let b = coin::balance(alice); + let b = coin::balance(alice); assert!(b == 10000, 7357002); } @@ -38,7 +38,7 @@ module ol_framework::test_rewards { let dave = @0x1000d; let vals = mock::genesis_n_vals(root, 4); - let mint_cap = gas_coin::extract_mint_cap(root); + let mint_cap = libra_coin::extract_mint_cap(root); let uid_before = stake::get_reward_event_guid(dave); assert!(uid_before == 0, 7357000); let new_coin = coin::test_mint(10000, &mint_cap); @@ -50,10 +50,10 @@ module ol_framework::test_rewards { let uid_after = stake::get_reward_event_guid(dave); assert!(uid_after > uid_before, 7357001); - let b = coin::balance(alice); + let b = coin::balance(alice); assert!(b == 1000, 7357002); - let b = coin::balance(dave); + let b = coin::balance(dave); assert!(b == 1000, 7357002); burn::burn_and_track(new_coin); diff --git a/framework/libra-framework/sources/ol_sources/tests/slow_wallet.test.move b/framework/libra-framework/sources/ol_sources/tests/slow_wallet.test.move index 064eef7b3..4ff4fc9c3 100644 --- a/framework/libra-framework/sources/ol_sources/tests/slow_wallet.test.move +++ b/framework/libra-framework/sources/ol_sources/tests/slow_wallet.test.move @@ -7,7 +7,7 @@ module ol_framework::test_slow_wallet { use ol_framework::slow_wallet; use ol_framework::mock; use ol_framework::ol_account; - use ol_framework::gas_coin::{Self, LibraCoin as GasCoin}; + use ol_framework::libra_coin::{Self, LibraCoin}; use ol_framework::epoch_boundary; use diem_framework::reconfiguration; use diem_framework::coin; @@ -62,7 +62,7 @@ module ol_framework::test_slow_wallet { #[test(root = @ol_framework, alice = @0x123, bob = @0x456)] fun test_transfer_unlocked_happy(root: signer, alice: signer) { mock::ol_test_genesis(&root); - let mint_cap = gas_coin::extract_mint_cap(&root); + let mint_cap = libra_coin::extract_mint_cap(&root); slow_wallet::initialize(&root); @@ -84,7 +84,7 @@ module ol_framework::test_slow_wallet { // transferring funds will create Bob's account // the coins are also unlocked ol_account::transfer(&alice, @0x456, 10); - let b_balance = coin::balance(@0x456); + let b_balance = coin::balance(@0x456); assert!(b_balance == 10, 735704); assert!(slow_wallet::unlocked_amount(@0x456) == 10, 735705); } @@ -94,7 +94,7 @@ module ol_framework::test_slow_wallet { #[expected_failure(abort_code = 196614, location = 0x1::ol_account)] fun test_transfer_sad(root: signer, alice: signer) { mock::ol_test_genesis(&root); - let mint_cap = gas_coin::extract_mint_cap(&root); + let mint_cap = libra_coin::extract_mint_cap(&root); slow_wallet::initialize(&root); ol_account::create_account(&root, @0x123); slow_wallet::set_slow(&alice); @@ -102,7 +102,7 @@ module ol_framework::test_slow_wallet { assert!(slow_wallet::unlocked_amount(@0x123) == 0, 735701); // fund alice - // let (burn_cap, mint_cap) = gas_coin::initialize_for_test(&root); + // let (burn_cap, mint_cap) = libra_coin::initialize_for_test(&root); ol_account::deposit_coins(@0x123, coin::test_mint(100, &mint_cap)); // coin::destroy_burn_cap(burn_cap); coin::destroy_mint_cap(mint_cap); @@ -110,7 +110,7 @@ module ol_framework::test_slow_wallet { // alice will transfer and create bob's account ol_account::transfer(&alice, @0x456, 99); - let b_balance = coin::balance(@0x456); + let b_balance = coin::balance(@0x456); assert!(b_balance == 99, 735702); assert!(slow_wallet::unlocked_amount(@0x123) == 01, 735703); diff --git a/framework/libra-framework/sources/ol_sources/tests/tower.test.move b/framework/libra-framework/sources/ol_sources/tests/tower.test.move index b1dd83a24..991b2f33c 100644 --- a/framework/libra-framework/sources/ol_sources/tests/tower.test.move +++ b/framework/libra-framework/sources/ol_sources/tests/tower.test.move @@ -105,9 +105,6 @@ module ol_framework::test_tower { vdf_fixtures::security(), ); - // let count_pre = tower_state::get_count_in_epoch(a_addr); - // print(&count_pre); - // all vals compliant mock::mock_all_vals_good_performance(&root); diff --git a/framework/libra-framework/sources/ol_sources/tests/validator_reward.test.move b/framework/libra-framework/sources/ol_sources/tests/validator_reward.test.move index 2662f1773..4dadfdbdf 100644 --- a/framework/libra-framework/sources/ol_sources/tests/validator_reward.test.move +++ b/framework/libra-framework/sources/ol_sources/tests/validator_reward.test.move @@ -7,13 +7,13 @@ module ol_framework::test_reconfiguration { use diem_framework::coin; use ol_framework::mock; use ol_framework::testnet; - use ol_framework::gas_coin::LibraCoin as GasCoin; + use ol_framework::libra_coin::LibraCoin; use ol_framework::proof_of_fee; use diem_framework::reconfiguration; use ol_framework::epoch_helper; use ol_framework::ol_account; - use diem_std::debug::print; + // use diem_std::debug::print; // Scenario: all genesis validators make it to next epoch #[test(root = @ol_framework)] @@ -42,10 +42,8 @@ module ol_framework::test_reconfiguration { let vals = stake::get_current_validators(); assert!(vector::length(&vals) == 5, 7357005); - // let alice_bal = coin::balance(@0x1000a); - let (unlocked, alice_bal) = ol_account::balance(@0x1000a); - print(&unlocked); - print(&alice_bal); + // let alice_bal = coin::balance(@0x1000a); + let (_unlocked, alice_bal) = ol_account::balance(@0x1000a); let (_, entry_fee, _, _ ) = proof_of_fee::get_consensus_reward(); // need to check that the user paid an PoF entry fee for next epoch. @@ -60,7 +58,7 @@ module ol_framework::test_reconfiguration { let _vals = mock::genesis_n_vals(&root, 5); // mock::ol_initialize_coin(&root); mock::pof_default(); - assert!(coin::balance(@0x1000a) == 0, 7357000); + assert!(coin::balance(@0x1000a) == 0, 7357000); // NOTE: epoch 0 and 1 are a special case, we don't run performance grades on that one. Need to move two epochs ahead reconfiguration::test_helper_increment_epoch_dont_reconfigure(); @@ -93,9 +91,9 @@ module ol_framework::test_reconfiguration { // alice doesn't get paid - assert!(coin::balance(@0x1000a) == 0, 7357005); + assert!(coin::balance(@0x1000a) == 0, 7357005); // bob does - assert!(coin::balance(@0x1000b) == (reward - entry_fee), 7357006); + assert!(coin::balance(@0x1000b) == (reward - entry_fee), 7357006); } diff --git a/framework/libra-framework/sources/ol_sources/tests/vote_lib/safe.test.move b/framework/libra-framework/sources/ol_sources/tests/vote_lib/safe.test.move index 94a38a35f..40ffb9bcc 100644 --- a/framework/libra-framework/sources/ol_sources/tests/vote_lib/safe.test.move +++ b/framework/libra-framework/sources/ol_sources/tests/vote_lib/safe.test.move @@ -27,7 +27,7 @@ module ol_framework::test_safe { // SO ALICE and DAVE ARE AUTHORIZED safe::init_payment_multisig(&resource_sig, vals, 2); // both need to sign - // first make sure dave is initialized to receive GasCoin + // first make sure dave is initialized to receive LibraCoin ol_account::create_account(root, @0x1000d); // when alice proposes, she also votes in a single step let prop_id = safe::propose_payment(alice, new_resource_address, @0x1000d, 42, b"cheers", option::none()); @@ -57,7 +57,7 @@ module ol_framework::test_safe { // not enough voters safe::init_payment_multisig(&resource_sig, vals, 3); // requires 3 - // first make sure EVE is initialized to receive GasCoin + // first make sure EVE is initialized to receive LibraCoin ol_account::create_account(root, @0x1000e); // when alice proposes, she also votes in a single step let prop_id = safe::propose_payment(alice, new_resource_address, @0x1000e, 42, b"cheers", option::none()); diff --git a/framework/libra-framework/sources/ol_sources/validator_universe.move b/framework/libra-framework/sources/ol_sources/validator_universe.move index 1f30059e2..c4b456421 100644 --- a/framework/libra-framework/sources/ol_sources/validator_universe.move +++ b/framework/libra-framework/sources/ol_sources/validator_universe.move @@ -16,7 +16,7 @@ module diem_framework::validator_universe { use diem_framework::stake; // use diem_framework::coin::Coin; - // use ol_framework::gas_coin::LibraCoin as GasCoin; + // use ol_framework::libra_coin::LibraCoin; // use ol_framework::rewards; #[test_only] @@ -180,4 +180,4 @@ module diem_framework::validator_universe { } -} \ No newline at end of file +} diff --git a/framework/releases/head.mrb b/framework/releases/head.mrb index 0479363fb..1f9639dca 100644 Binary files a/framework/releases/head.mrb and b/framework/releases/head.mrb differ diff --git a/smoke-tests/src/helpers.rs b/smoke-tests/src/helpers.rs index f0f564bd0..06e59a79e 100644 --- a/smoke-tests/src/helpers.rs +++ b/smoke-tests/src/helpers.rs @@ -33,7 +33,7 @@ pub async fn mint_libra( ) -> anyhow::Result<()> { let payload = public_info .transaction_factory() - .payload(libra_stdlib::gas_coin_mint_to_impl(addr, amount)); + .payload(libra_stdlib::libra_coin_mint_to_impl(addr, amount)); let mint_txn = public_info .root_account() diff --git a/tools/genesis/src/genesis_functions.rs b/tools/genesis/src/genesis_functions.rs index 084ce031d..9eb1e8b72 100644 --- a/tools/genesis/src/genesis_functions.rs +++ b/tools/genesis/src/genesis_functions.rs @@ -476,7 +476,7 @@ pub fn set_final_supply(session: &mut SessionExt, supply_settings: &SupplySettin exec_function( session, - "gas_coin", + "libra_coin", "genesis_set_final_supply", vec![], serialized_values, diff --git a/tools/query/tests/view.rs b/tools/query/tests/view.rs index ee1600461..627469ede 100644 --- a/tools/query/tests/view.rs +++ b/tools/query/tests/view.rs @@ -9,7 +9,7 @@ async fn libra_view_test() { let c = s.client(); let q = QueryType::View { - function_id: "0x1::gas_coin::supply".to_string(), + function_id: "0x1::libra_coin::supply".to_string(), type_args: None, args: None, }; diff --git a/types/src/move_resource/gas_coin.rs b/types/src/move_resource/gas_coin.rs index cc8981c8c..ff5126dad 100644 --- a/types/src/move_resource/gas_coin.rs +++ b/types/src/move_resource/gas_coin.rs @@ -17,7 +17,7 @@ use crate::ONCHAIN_DECIMAL_PRECISION; pub static GAS_COIN_TYPE: Lazy = Lazy::new(|| { TypeTag::Struct(Box::new(StructTag { address: AccountAddress::ONE, - module: ident_str!("gas_coin").to_owned(), + module: ident_str!("libra_coin").to_owned(), name: ident_str!("LibraCoin").to_owned(), type_params: vec![], })) diff --git a/types/src/move_resource/tower_state.rs b/types/src/move_resource/libra_coin.rs similarity index 91% rename from types/src/move_resource/tower_state.rs rename to types/src/move_resource/libra_coin.rs index b53cadee6..e02ca1d43 100644 --- a/types/src/move_resource/tower_state.rs +++ b/types/src/move_resource/libra_coin.rs @@ -15,14 +15,13 @@ use crate::ONCHAIN_DECIMAL_PRECISION; /// The balance resource held under an account. #[derive(Debug, Serialize, Deserialize)] // #[cfg_attr(any(test, feature = "fuzzing"), derive(Arbitrary))] -pub struct GasCoinStoreResource { +pub struct LibraCoinStoreResource { coin: u64, - frozen: bool, deposit_events: EventHandle, withdraw_events: EventHandle, } -impl GasCoinStoreResource { +impl LibraCoinStoreResource { pub fn new( coin: u64, frozen: bool, @@ -54,7 +53,7 @@ impl GasCoinStoreResource { } } -impl MoveStructType for GasCoinStoreResource { +impl MoveStructType for LibraCoinStoreResource { const MODULE_NAME: &'static IdentStr = ident_str!("coin"); const STRUCT_NAME: &'static IdentStr = ident_str!("CoinStore"); @@ -63,12 +62,12 @@ impl MoveStructType for GasCoinStoreResource { } } -impl MoveResource for GasCoinStoreResource {} +impl MoveResource for LibraCoinStoreResource {} // TODO: This might break reading from API maybe it must be diem_api_types::U64; #[derive(Debug, Serialize, Deserialize)] -pub struct GasCoin { +pub struct LibraCoin { pub value: u64, } @@ -106,7 +105,7 @@ impl SlowWalletBalance { } /// This is the same shape as Slow Wallet balance, except that it is scaled. -/// The slow wallet struct contains the coin value as it exists in the database which is without decimals. The decimal precision for GasCoin is 6. So we need to scale it for human consumption. +/// The slow wallet struct contains the coin value as it exists in the database which is without decimals. The decimal precision for LibraCoin is 6. So we need to scale it for human consumption. #[derive(Debug, Serialize, Deserialize)] pub struct LibraBalanceDisplay {