diff --git a/.changeset/config.json b/.changeset/config.json index 78276722d50..edba6eadd51 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -4,7 +4,7 @@ "commit": false, "fixed": [], "linked": [], - "access": "restricted", + "access": "public", "baseBranch": "develop", "updateInternalDependencies": "minor", "privatePackages": false, diff --git a/.config/nextest.toml b/.config/nextest.toml index ac86fb09cfb..27dfe1a8409 100644 --- a/.config/nextest.toml +++ b/.config/nextest.toml @@ -9,8 +9,8 @@ failure-output = "immediate" status-level = "skip" # Retry failing tests in order to not block builds on flaky tests retries = 1 -# Timeout tests after 4 minutes -slow-timeout = { period = "60s", terminate-after = 4 } +# Timeout tests after 5 minutes +slow-timeout = { period = "60s", terminate-after = 5 } [profile.simtestnightly] # Print out output for failing tests as soon as they fail, and also at the end diff --git a/.github/crates-filters.yml b/.github/crates-filters.yml index 55ca74cc759..57a47dd7a25 100644 --- a/.github/crates-filters.yml +++ b/.github/crates-filters.yml @@ -180,9 +180,3 @@ iota-move-natives-latest: - "iota-execution/latest/iota-move-natives/**" iota-verifier-latest: - "iota-execution/latest/iota-verifier/**" -iota-adapter-v0: - - "iota-execution/v0/iota-adapter/**" -iota-move-natives-v0: - - "iota-execution/v0/iota-move-natives/**" -iota-verifier-v0: - - "iota-execution/v0/iota-verifier/**" diff --git a/.github/workflows/_e2e.yml b/.github/workflows/_e2e.yml index 6438470f121..42eb66e2c64 100644 --- a/.github/workflows/_e2e.yml +++ b/.github/workflows/_e2e.yml @@ -9,6 +9,9 @@ on: isExplorer: type: boolean required: true + isAppsBackend: + type: boolean + required: true isTypescriptSDK: type: boolean required: true @@ -74,6 +77,14 @@ jobs: if: inputs.isGraphQlTransport || inputs.isRust || inputs.isDevelop run: pnpm dlx concurrently --kill-others --success command-1 "$E2E_RUN_LOCAL_NET_CMD" 'pnpm --filter @iota/graphql-transport test:e2e' + - name: Build apps-backend + if: inputs.isAppsBackend || inputs.isDevelop + run: pnpm --filter apps-backend build + + - name: Run apps-backend e2e tests + if: inputs.isAppsBackend || inputs.isDevelop + run: pnpm --filter apps-backend test:e2e + - name: Build explorer if: inputs.isTypescriptSDK || inputs.isExplorer || inputs.isRust || inputs.isDevelop run: pnpm turbo --filter=iota-explorer build diff --git a/.github/workflows/apps_wallet_nightly_build.yml b/.github/workflows/apps_wallet_nightly_build.yml index 3a0a6230cc6..267b940df18 100644 --- a/.github/workflows/apps_wallet_nightly_build.yml +++ b/.github/workflows/apps_wallet_nightly_build.yml @@ -43,7 +43,7 @@ jobs: restore-keys: | turbo-${{ runner.os }}- - name: Build Wallet - run: pnpm wallet build + run: pnpm wallet build:nightly - name: Upload artifacts uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 with: diff --git a/.github/workflows/apps_wallet_prod_build.yml b/.github/workflows/apps_wallet_prod_build.yml index 24c4cecc424..964ee7d1411 100644 --- a/.github/workflows/apps_wallet_prod_build.yml +++ b/.github/workflows/apps_wallet_prod_build.yml @@ -9,6 +9,7 @@ env: DEFAULT_NETWORK: ${{ secrets.WALLET_PROD_DEFAULT_NETWORK }} IOTA_NETWORKS: ${{ secrets.WALLET_PROD_IOTA_NETWORKS }} APPS_BACKEND: ${{ secrets.WALLET_PROD_APPS_BACKEND }} + SENTRY_AUTH_TOKEN: ${{ secrets.TOOLING_SENTRY_AUTH_TOKEN }} jobs: wallet-prod-build: diff --git a/.github/workflows/hierarchy.yml b/.github/workflows/hierarchy.yml index 47d92c4ce92..612d35b03a0 100644 --- a/.github/workflows/hierarchy.yml +++ b/.github/workflows/hierarchy.yml @@ -145,6 +145,7 @@ jobs: isRust: ${{ needs.diff.outputs.isRust == 'true' }} isWallet: ${{ needs.diff.outputs.isWallet == 'true' }} isExplorer: ${{ needs.diff.outputs.isExplorer == 'true' }} + isAppsBackend: ${{ needs.diff.outputs.isAppsBackend == 'true' }} isTypescriptSDK: ${{ needs.diff.outputs.isTypescriptSDK == 'true' }} isGraphQlTransport: ${{ needs.diff.outputs.isGraphQlTransport == 'true' }} isDevelop: ${{ github.ref_name == 'develop' }} diff --git a/Cargo.lock b/Cargo.lock index 2d5b725bf12..e598cc0b441 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1822,7 +1822,7 @@ checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" [[package]] name = "bin-version" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "const-str", "git-version", @@ -3639,14 +3639,14 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "docs-examples" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "bcs", "bip32", "iota-keys", "iota-move-build", - "iota-sdk 0.6.0-alpha", + "iota-sdk 0.7.0-alpha", "move-binary-format", "move-core-types", "serde_json", @@ -5664,7 +5664,7 @@ checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" [[package]] name = "iota" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anemo", "anyhow", @@ -5709,7 +5709,7 @@ dependencies = [ "iota-package-management", "iota-protocol-config", "iota-replay", - "iota-sdk 0.6.0-alpha", + "iota-sdk 0.7.0-alpha", "iota-simulator", "iota-source-validation", "iota-swarm", @@ -5743,6 +5743,7 @@ dependencies = [ "shell-words", "shlex", "signature 1.6.4", + "strum 0.26.3", "tabled", "tap", "telemetry-subscribers", @@ -5787,42 +5788,15 @@ dependencies = [ [[package]] name = "iota-adapter-transactional-tests" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "datatest-stable", "iota-transactional-test-runner", ] -[[package]] -name = "iota-adapter-v0" -version = "0.1.0" -dependencies = [ - "anyhow", - "bcs", - "iota-macros", - "iota-metrics", - "iota-move-natives-v0", - "iota-protocol-config", - "iota-types", - "iota-verifier-v0", - "leb128", - "move-binary-format", - "move-bytecode-utils", - "move-bytecode-verifier-meter", - "move-bytecode-verifier-v0", - "move-core-types", - "move-vm-config", - "move-vm-profiler", - "move-vm-runtime-v0", - "move-vm-types", - "parking_lot 0.12.3", - "serde", - "tracing", -] - [[package]] name = "iota-analytics-indexer" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "arrow", @@ -5873,7 +5847,7 @@ dependencies = [ [[package]] name = "iota-analytics-indexer-derive" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", @@ -5882,7 +5856,7 @@ dependencies = [ [[package]] name = "iota-archival" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "byteorder", @@ -5914,7 +5888,7 @@ dependencies = [ [[package]] name = "iota-authority-aggregation" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "futures", "iota-metrics", @@ -5925,7 +5899,7 @@ dependencies = [ [[package]] name = "iota-aws-orchestrator" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "async-trait", "aws-config", @@ -5956,7 +5930,7 @@ dependencies = [ [[package]] name = "iota-benchmark" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "async-trait", @@ -5978,7 +5952,7 @@ dependencies = [ "iota-metrics", "iota-network", "iota-protocol-config", - "iota-sdk 0.6.0-alpha", + "iota-sdk 0.7.0-alpha", "iota-simulator", "iota-storage", "iota-surfer", @@ -6006,7 +5980,7 @@ dependencies = [ [[package]] name = "iota-bridge" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "arc-swap", @@ -6028,7 +6002,7 @@ dependencies = [ "iota-json-rpc-types", "iota-keys", "iota-metrics", - "iota-sdk 0.6.0-alpha", + "iota-sdk 0.7.0-alpha", "iota-test-transaction-builder", "iota-types", "lru 0.12.4", @@ -6055,7 +6029,7 @@ dependencies = [ [[package]] name = "iota-bridge-cli" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "clap", @@ -6066,7 +6040,7 @@ dependencies = [ "iota-config", "iota-json-rpc-types", "iota-keys", - "iota-sdk 0.6.0-alpha", + "iota-sdk 0.7.0-alpha", "iota-types", "move-core-types", "reqwest 0.12.7", @@ -6081,7 +6055,7 @@ dependencies = [ [[package]] name = "iota-bridge-indexer" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "async-trait", @@ -6097,7 +6071,7 @@ dependencies = [ "iota-indexer-builder", "iota-json-rpc-types", "iota-metrics", - "iota-sdk 0.6.0-alpha", + "iota-sdk 0.7.0-alpha", "iota-test-transaction-builder", "iota-types", "prometheus", @@ -6111,7 +6085,7 @@ dependencies = [ [[package]] name = "iota-cluster-test" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "async-trait", @@ -6129,7 +6103,7 @@ dependencies = [ "iota-json", "iota-json-rpc-types", "iota-keys", - "iota-sdk 0.6.0-alpha", + "iota-sdk 0.7.0-alpha", "iota-swarm", "iota-swarm-config", "iota-test-transaction-builder", @@ -6151,7 +6125,7 @@ dependencies = [ [[package]] name = "iota-common" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "futures", "parking_lot 0.12.3", @@ -6160,7 +6134,7 @@ dependencies = [ [[package]] name = "iota-config" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anemo", "anyhow", @@ -6187,7 +6161,7 @@ dependencies = [ [[package]] name = "iota-core" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anemo", "anyhow", @@ -6289,7 +6263,7 @@ dependencies = [ [[package]] name = "iota-cost" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "bcs", @@ -6344,7 +6318,7 @@ dependencies = [ [[package]] name = "iota-data-ingestion" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "async-trait", @@ -6378,7 +6352,7 @@ dependencies = [ [[package]] name = "iota-data-ingestion-core" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "async-trait", @@ -6405,7 +6379,7 @@ dependencies = [ [[package]] name = "iota-e2e-tests" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "async-trait", @@ -6436,7 +6410,7 @@ dependencies = [ "iota-node", "iota-protocol-config", "iota-rest-api", - "iota-sdk 0.6.0-alpha", + "iota-sdk 0.7.0-alpha", "iota-simulator", "iota-storage", "iota-swarm", @@ -6467,7 +6441,7 @@ dependencies = [ [[package]] name = "iota-enum-compat-util" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "serde_yaml", ] @@ -6478,20 +6452,15 @@ version = "0.1.0" dependencies = [ "cargo_metadata 0.15.4", "iota-adapter-latest", - "iota-adapter-v0", "iota-move-natives-latest", - "iota-move-natives-v0", "iota-protocol-config", "iota-types", "iota-verifier-latest", - "iota-verifier-v0", "move-binary-format", "move-bytecode-verifier", "move-bytecode-verifier-meter", - "move-bytecode-verifier-v0", "move-vm-config", "move-vm-runtime", - "move-vm-runtime-v0", "petgraph 0.6.5", ] @@ -6510,7 +6479,7 @@ dependencies = [ [[package]] name = "iota-faucet" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "async-recursion", @@ -6524,7 +6493,7 @@ dependencies = [ "iota-json-rpc-types", "iota-keys", "iota-metrics", - "iota-sdk 0.6.0-alpha", + "iota-sdk 0.7.0-alpha", "iota-types", "parking_lot 0.12.3", "prometheus", @@ -6548,7 +6517,7 @@ dependencies = [ [[package]] name = "iota-framework" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "bcs", @@ -6569,7 +6538,7 @@ dependencies = [ [[package]] name = "iota-framework-snapshot" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "bcs", @@ -6584,7 +6553,7 @@ dependencies = [ [[package]] name = "iota-framework-tests" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "datatest-stable", "iota-adapter-latest", @@ -6604,7 +6573,7 @@ dependencies = [ [[package]] name = "iota-genesis-builder" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "bcs", @@ -6614,14 +6583,14 @@ dependencies = [ "fastcrypto", "flate2", "fs_extra", - "iota-adapter-v0", + "iota-adapter-latest", "iota-config", "iota-execution", "iota-framework", "iota-framework-snapshot", "iota-genesis-common", "iota-move-build", - "iota-move-natives-v0", + "iota-move-natives-latest", "iota-protocol-config", "iota-sdk 1.1.5", "iota-simulator", @@ -6632,7 +6601,7 @@ dependencies = [ "move-compiler", "move-core-types", "move-package", - "move-vm-runtime-v0", + "move-vm-runtime", "packable", "prefix-hex", "prometheus", @@ -6656,7 +6625,7 @@ dependencies = [ [[package]] name = "iota-genesis-common" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "iota-execution", "iota-protocol-config", @@ -6666,7 +6635,7 @@ dependencies = [ [[package]] name = "iota-graphql-config" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "quote 1.0.37", "syn 1.0.109", @@ -6674,7 +6643,7 @@ dependencies = [ [[package]] name = "iota-graphql-e2e-tests" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "datatest-stable", "iota-graphql-rpc", @@ -6685,7 +6654,7 @@ dependencies = [ [[package]] name = "iota-graphql-rpc" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "async-graphql", @@ -6724,7 +6693,7 @@ dependencies = [ "iota-package-resolver", "iota-protocol-config", "iota-rest-api", - "iota-sdk 0.6.0-alpha", + "iota-sdk 0.7.0-alpha", "iota-swarm-config", "iota-test-transaction-builder", "iota-types", @@ -6764,8 +6733,9 @@ dependencies = [ [[package]] name = "iota-graphql-rpc-client" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ + "anyhow", "async-graphql", "axum", "hyper 1.4.1", @@ -6773,18 +6743,19 @@ dependencies = [ "reqwest 0.12.7", "serde_json", "thiserror", + "tokio", ] [[package]] name = "iota-graphql-rpc-headers" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "axum", ] [[package]] name = "iota-indexer" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "async-trait", @@ -6813,7 +6784,7 @@ dependencies = [ "iota-package-resolver", "iota-protocol-config", "iota-rest-api", - "iota-sdk 0.6.0-alpha", + "iota-sdk 0.7.0-alpha", "iota-swarm-config", "iota-test-transaction-builder", "iota-transaction-builder", @@ -6846,7 +6817,7 @@ dependencies = [ [[package]] name = "iota-indexer-builder" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "async-trait", @@ -6861,7 +6832,7 @@ dependencies = [ [[package]] name = "iota-json" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "bcs", @@ -6880,7 +6851,7 @@ dependencies = [ [[package]] name = "iota-json-rpc" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "arc-swap", @@ -6934,7 +6905,7 @@ dependencies = [ [[package]] name = "iota-json-rpc-api" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "fastcrypto", @@ -6953,7 +6924,7 @@ dependencies = [ [[package]] name = "iota-json-rpc-tests" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "async-trait", @@ -6972,7 +6943,7 @@ dependencies = [ "iota-open-rpc", "iota-open-rpc-macros", "iota-protocol-config", - "iota-sdk 0.6.0-alpha", + "iota-sdk 0.7.0-alpha", "iota-simulator", "iota-swarm-config", "iota-test-transaction-builder", @@ -6991,7 +6962,7 @@ dependencies = [ [[package]] name = "iota-json-rpc-types" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "bcs", @@ -7020,7 +6991,7 @@ dependencies = [ [[package]] name = "iota-keys" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "bip32", @@ -7039,7 +7010,7 @@ dependencies = [ [[package]] name = "iota-light-client" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "async-trait", @@ -7051,7 +7022,7 @@ dependencies = [ "iota-json-rpc-types", "iota-package-resolver", "iota-rest-api", - "iota-sdk 0.6.0-alpha", + "iota-sdk 0.7.0-alpha", "iota-types", "move-binary-format", "move-core-types", @@ -7063,7 +7034,7 @@ dependencies = [ [[package]] name = "iota-macros" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "futures", "iota-proc-macros", @@ -7073,7 +7044,7 @@ dependencies = [ [[package]] name = "iota-metric-checker" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "backoff", @@ -7094,7 +7065,7 @@ dependencies = [ [[package]] name = "iota-metrics" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anemo", "anemo-tower", @@ -7117,7 +7088,7 @@ dependencies = [ [[package]] name = "iota-move" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "better_any", @@ -7155,7 +7126,7 @@ dependencies = [ [[package]] name = "iota-move-build" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "fastcrypto", @@ -7178,7 +7149,7 @@ dependencies = [ [[package]] name = "iota-move-lsp" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "bin-version", "clap", @@ -7207,31 +7178,9 @@ dependencies = [ "tracing", ] -[[package]] -name = "iota-move-natives-v0" -version = "0.1.0" -dependencies = [ - "bcs", - "better_any", - "fastcrypto", - "fastcrypto-vdf", - "fastcrypto-zkp", - "indexmap 2.5.0", - "iota-protocol-config", - "iota-types", - "move-binary-format", - "move-core-types", - "move-stdlib-natives-v0", - "move-vm-runtime-v0", - "move-vm-types", - "rand 0.8.5", - "smallvec", - "tracing", -] - [[package]] name = "iota-network" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anemo", "anemo-build", @@ -7269,7 +7218,7 @@ dependencies = [ [[package]] name = "iota-network-stack" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anemo", "bcs", @@ -7292,7 +7241,7 @@ dependencies = [ [[package]] name = "iota-node" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anemo", "anemo-tower", @@ -7342,7 +7291,7 @@ dependencies = [ [[package]] name = "iota-open-rpc" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "bcs", @@ -7366,7 +7315,7 @@ dependencies = [ [[package]] name = "iota-open-rpc-macros" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "derive-syn-parse", "itertools 0.13.0", @@ -7378,7 +7327,7 @@ dependencies = [ [[package]] name = "iota-package-dump" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "bcs", @@ -7395,11 +7344,11 @@ dependencies = [ [[package]] name = "iota-package-management" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "iota-json-rpc-types", - "iota-sdk 0.6.0-alpha", + "iota-sdk 0.7.0-alpha", "iota-types", "move-core-types", "move-package", @@ -7410,7 +7359,7 @@ dependencies = [ [[package]] name = "iota-package-resolver" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "async-trait", "bcs", @@ -7433,7 +7382,7 @@ dependencies = [ [[package]] name = "iota-proc-macros" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "msim-macros", "proc-macro2 1.0.86", @@ -7443,7 +7392,7 @@ dependencies = [ [[package]] name = "iota-protocol-config" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "clap", "insta", @@ -7457,7 +7406,7 @@ dependencies = [ [[package]] name = "iota-protocol-config-macros" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", @@ -7466,7 +7415,7 @@ dependencies = [ [[package]] name = "iota-replay" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "async-recursion", @@ -7482,7 +7431,7 @@ dependencies = [ "iota-json-rpc-api", "iota-json-rpc-types", "iota-protocol-config", - "iota-sdk 0.6.0-alpha", + "iota-sdk 0.7.0-alpha", "iota-storage", "iota-transaction-checks", "iota-types", @@ -7513,7 +7462,7 @@ dependencies = [ [[package]] name = "iota-rest-api" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "async-trait", @@ -7544,7 +7493,7 @@ dependencies = [ [[package]] name = "iota-rosetta" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "async-trait", @@ -7562,7 +7511,7 @@ dependencies = [ "iota-metrics", "iota-move-build", "iota-node", - "iota-sdk 0.6.0-alpha", + "iota-sdk 0.7.0-alpha", "iota-swarm-config", "iota-types", "move-core-types", @@ -7586,7 +7535,7 @@ dependencies = [ [[package]] name = "iota-rpc-loadgen" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "async-trait", @@ -7596,7 +7545,7 @@ dependencies = [ "futures", "iota-json-rpc-types", "iota-keys", - "iota-sdk 0.6.0-alpha", + "iota-sdk 0.7.0-alpha", "iota-types", "itertools 0.13.0", "serde", @@ -7612,7 +7561,7 @@ dependencies = [ [[package]] name = "iota-rust-sdk" version = "0.0.0" -source = "git+ssh://git@github.com/iotaledger/iota-rust-sdk.git?rev=dd7b331a5ec62fd5e810051d19f31dff90ea7e3f#dd7b331a5ec62fd5e810051d19f31dff90ea7e3f" +source = "git+ssh://git@github.com/iotaledger/iota-rust-sdk.git?rev=d605da95029e74376f0f39a95526bb1a5c0ebd7a#d605da95029e74376f0f39a95526bb1a5c0ebd7a" dependencies = [ "base64ct", "bcs", @@ -7631,7 +7580,7 @@ dependencies = [ [[package]] name = "iota-sdk" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "async-trait", @@ -7643,6 +7592,7 @@ dependencies = [ "fastcrypto", "futures", "futures-core", + "getset", "iota-config", "iota-json", "iota-json-rpc-api", @@ -7708,7 +7658,7 @@ dependencies = [ [[package]] name = "iota-simulator" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anemo", "anemo-tower", @@ -7730,7 +7680,7 @@ dependencies = [ [[package]] name = "iota-single-node-benchmark" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "async-trait", "bcs", @@ -7765,7 +7715,7 @@ dependencies = [ [[package]] name = "iota-snapshot" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "bcs", @@ -7793,7 +7743,7 @@ dependencies = [ [[package]] name = "iota-source-validation" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "colored", @@ -7803,7 +7753,7 @@ dependencies = [ "iota-json-rpc-types", "iota-move-build", "iota-package-management", - "iota-sdk 0.6.0-alpha", + "iota-sdk 0.7.0-alpha", "iota-test-transaction-builder", "iota-types", "move-binary-format", @@ -7825,7 +7775,7 @@ dependencies = [ [[package]] name = "iota-source-validation-service" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "axum", @@ -7841,7 +7791,7 @@ dependencies = [ "iota-metrics", "iota-move", "iota-move-build", - "iota-sdk 0.6.0-alpha", + "iota-sdk 0.7.0-alpha", "iota-source-validation", "jsonrpsee", "move-compiler", @@ -7864,7 +7814,7 @@ dependencies = [ [[package]] name = "iota-storage" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "async-trait", @@ -7918,7 +7868,7 @@ dependencies = [ [[package]] name = "iota-surfer" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "async-trait", "bcs", @@ -7947,7 +7897,7 @@ dependencies = [ [[package]] name = "iota-swarm" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "futures", @@ -7972,7 +7922,7 @@ dependencies = [ [[package]] name = "iota-swarm-config" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anemo", "anyhow", @@ -7999,12 +7949,12 @@ dependencies = [ [[package]] name = "iota-test-transaction-builder" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "bcs", "iota-genesis-builder", "iota-move-build", - "iota-sdk 0.6.0-alpha", + "iota-sdk 0.7.0-alpha", "iota-types", "move-core-types", "shared-crypto", @@ -8012,7 +7962,7 @@ dependencies = [ [[package]] name = "iota-tls" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "axum", @@ -8033,7 +7983,7 @@ dependencies = [ [[package]] name = "iota-tool" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anemo", "anemo-cli", @@ -8055,7 +8005,7 @@ dependencies = [ "iota-package-dump", "iota-protocol-config", "iota-replay", - "iota-sdk 0.6.0-alpha", + "iota-sdk 0.7.0-alpha", "iota-snapshot", "iota-storage", "iota-types", @@ -8078,7 +8028,7 @@ dependencies = [ [[package]] name = "iota-transaction-builder" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "async-trait", @@ -8094,7 +8044,7 @@ dependencies = [ [[package]] name = "iota-transaction-checks" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "fastcrypto-zkp", "iota-config", @@ -8108,7 +8058,7 @@ dependencies = [ [[package]] name = "iota-transactional-test-runner" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "async-trait", @@ -8157,7 +8107,7 @@ dependencies = [ [[package]] name = "iota-types" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anemo", "anyhow", @@ -8239,7 +8189,7 @@ dependencies = [ [[package]] name = "iota-upgrade-compatibility-transactional-tests" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "datatest-stable", @@ -8253,7 +8203,7 @@ dependencies = [ [[package]] name = "iota-util-mem" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "cfg-if", "ed25519-consensus", @@ -8271,7 +8221,7 @@ dependencies = [ [[package]] name = "iota-util-mem-derive" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "proc-macro2 1.0.86", "syn 1.0.109", @@ -8295,27 +8245,12 @@ dependencies = [ [[package]] name = "iota-verifier-transactional-tests" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "datatest-stable", "iota-transactional-test-runner", ] -[[package]] -name = "iota-verifier-v0" -version = "0.1.0" -dependencies = [ - "iota-protocol-config", - "iota-types", - "move-abstract-interpreter-v0", - "move-abstract-stack", - "move-binary-format", - "move-bytecode-utils", - "move-bytecode-verifier-meter", - "move-core-types", - "move-vm-config", -] - [[package]] name = "iota_stronghold" version = "2.1.0" @@ -9373,14 +9308,6 @@ dependencies = [ "move-bytecode-verifier-meter", ] -[[package]] -name = "move-abstract-interpreter-v0" -version = "0.1.0" -dependencies = [ - "move-binary-format", - "move-bytecode-verifier-meter", -] - [[package]] name = "move-abstract-stack" version = "0.0.1" @@ -9482,20 +9409,6 @@ dependencies = [ "move-vm-config", ] -[[package]] -name = "move-bytecode-verifier-v0" -version = "0.1.0" -dependencies = [ - "move-abstract-interpreter", - "move-abstract-stack", - "move-binary-format", - "move-borrow-graph", - "move-bytecode-verifier-meter", - "move-core-types", - "move-vm-config", - "petgraph 0.5.1", -] - [[package]] name = "move-bytecode-viewer" version = "0.1.0" @@ -9866,20 +9779,6 @@ dependencies = [ "smallvec", ] -[[package]] -name = "move-stdlib-natives-v0" -version = "0.1.1" -dependencies = [ - "hex", - "move-binary-format", - "move-core-types", - "move-vm-runtime-v0", - "move-vm-types", - "sha2 0.9.9", - "sha3 0.9.1", - "smallvec", -] - [[package]] name = "move-symbol-pool" version = "0.1.0" @@ -9984,24 +9883,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "move-vm-runtime-v0" -version = "0.1.0" -dependencies = [ - "better_any", - "fail", - "move-binary-format", - "move-bytecode-verifier-v0", - "move-core-types", - "move-vm-config", - "move-vm-profiler", - "move-vm-types", - "once_cell", - "parking_lot 0.11.2", - "smallvec", - "tracing", -] - [[package]] name = "move-vm-test-utils" version = "0.1.0" @@ -11834,7 +11715,7 @@ dependencies = [ [[package]] name = "prometheus-closure-metric" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "prometheus", @@ -13637,7 +13518,7 @@ dependencies = [ [[package]] name = "shared-crypto" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "bcs", "eyre", @@ -13773,7 +13654,7 @@ dependencies = [ [[package]] name = "simulacrum" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "async-trait", @@ -14489,7 +14370,7 @@ dependencies = [ [[package]] name = "telemetry-subscribers" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "atomic_float", "bytes", @@ -14565,7 +14446,7 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "test-cluster" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "anyhow", "bcs", @@ -14585,7 +14466,7 @@ dependencies = [ "iota-metrics", "iota-node", "iota-protocol-config", - "iota-sdk 0.6.0-alpha", + "iota-sdk 0.7.0-alpha", "iota-simulator", "iota-swarm", "iota-swarm-config", @@ -15306,7 +15187,7 @@ dependencies = [ [[package]] name = "transaction-fuzzer" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "iota-core", "iota-move-build", @@ -15412,7 +15293,7 @@ dependencies = [ [[package]] name = "typed-store" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "async-trait", "bcs", @@ -15443,7 +15324,7 @@ dependencies = [ [[package]] name = "typed-store-derive" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "itertools 0.13.0", "proc-macro2 1.0.86", @@ -15453,7 +15334,7 @@ dependencies = [ [[package]] name = "typed-store-error" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "serde", "thiserror", @@ -15461,7 +15342,7 @@ dependencies = [ [[package]] name = "typed-store-workspace-hack" -version = "0.6.0-alpha" +version = "0.7.0-alpha" dependencies = [ "libc", "memchr", diff --git a/Cargo.toml b/Cargo.toml index 47f7395e1a8..f531d7a4b54 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,11 +53,6 @@ exclude = [ "external-crates/move/crates/move-vm-types", "external-crates/move/crates/serializer-tests", "external-crates/move/crates/test-generation", - "external-crates/move/move-execution/v0/crates/bytecode-verifier-tests", - "external-crates/move/move-execution/v0/crates/move-abstract-interpreter", - "external-crates/move/move-execution/v0/crates/move-bytecode-verifier", - "external-crates/move/move-execution/v0/crates/move-stdlib-natives", - "external-crates/move/move-execution/v0/crates/move-vm-runtime", "sdk/move-bytecode-template", ] members = [ @@ -162,14 +157,11 @@ members = [ "iota-execution/latest/iota-adapter", "iota-execution/latest/iota-move-natives", "iota-execution/latest/iota-verifier", - "iota-execution/v0/iota-adapter", - "iota-execution/v0/iota-move-natives", - "iota-execution/v0/iota-verifier", ] [workspace.package] # This version string will be inherited by iota-core, iota-faucet, iota-node, iota-tools, iota-sdk, iota-move-build, and iota crates. -version = "0.6.0-alpha" +version = "0.7.0-alpha" [profile.release] # debug = 1 means line charts only, which is minimum needed for good stack traces @@ -417,7 +409,7 @@ iota-rosetta = { path = "crates/iota-rosetta" } iota-rpc-loadgen = { path = "crates/iota-rpc-loadgen" } iota-sdk = { path = "crates/iota-sdk" } # core-types with json format for REST API -iota-sdk2 = { package = "iota-rust-sdk", git = "ssh://git@github.com/iotaledger/iota-rust-sdk.git", rev = "dd7b331a5ec62fd5e810051d19f31dff90ea7e3f", features = ["hash", "serde", "schemars"] } +iota-sdk2 = { package = "iota-rust-sdk", git = "ssh://git@github.com/iotaledger/iota-rust-sdk.git", rev = "d605da95029e74376f0f39a95526bb1a5c0ebd7a", features = ["hash", "serde", "schemars"] } iota-simulator = { path = "crates/iota-simulator" } iota-snapshot = { path = "crates/iota-snapshot" } iota-source-validation = { path = "crates/iota-source-validation" } diff --git a/apps/apps-backend/jest-e2e.json b/apps/apps-backend/jest-e2e.json new file mode 100644 index 00000000000..8a02f0e8a41 --- /dev/null +++ b/apps/apps-backend/jest-e2e.json @@ -0,0 +1,13 @@ +{ + "moduleFileExtensions": ["js", "json", "ts"], + "rootDir": "./", + "testRegex": ".e2e-spec.ts$", + "transform": { + "^.+\\.(t|j)s$": "ts-jest" + }, + "testEnvironment": "node", + "moduleNameMapper": { + "^src/(.*)$": "/dist/$1", + "^@iota/core/(.*)$": "/dist/core/src/$1" + } +} diff --git a/apps/apps-backend/package.json b/apps/apps-backend/package.json index eb94045a4f5..149cc6fd9fc 100644 --- a/apps/apps-backend/package.json +++ b/apps/apps-backend/package.json @@ -6,8 +6,9 @@ "format": "prettier --write \"src/**/*.ts\"", "dev": "nest start --watch", "debug": "nest start --debug --watch", - "preview": "pnpm run build && node dist/main", - "lint": "eslint --max-warnings=0 \"{src,apps,libs,test}/**/*.ts\"" + "preview": "pnpm run build && node dist/apps-backend/src/main", + "lint": "eslint --max-warnings=0 \"{src,apps,libs,test}/**/*.ts\"", + "test:e2e": "jest --config ./jest-e2e.json" }, "dependencies": { "@iota/core": "workspace:*", diff --git a/apps/apps-backend/src/app.module.ts b/apps/apps-backend/src/app.module.ts index 0dc2844e50e..b7fd88272e7 100644 --- a/apps/apps-backend/src/app.module.ts +++ b/apps/apps-backend/src/app.module.ts @@ -11,6 +11,7 @@ import { FeaturesModule } from './features/features.module'; import { MonitorNetworkModule } from './monitor-network/monitor-network.module'; import { PricesModule } from './prices/prices.module'; import { RestrictedModule } from './restricted/restricted.module'; +import { HealthModule } from './health/health.module'; @Module({ imports: [ @@ -30,6 +31,7 @@ import { RestrictedModule } from './restricted/restricted.module'; ttl: 3600, max: 100, }), + HealthModule, ], }) export class AppModule {} diff --git a/apps/apps-backend/src/health/health.controller.ts b/apps/apps-backend/src/health/health.controller.ts new file mode 100644 index 00000000000..c86fdd5fc40 --- /dev/null +++ b/apps/apps-backend/src/health/health.controller.ts @@ -0,0 +1,12 @@ +// Copyright (c) 2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +import { Controller, Get } from '@nestjs/common'; + +@Controller('health') +export class HealthController { + @Get() + check() { + return { status: 'ok' }; + } +} diff --git a/apps/apps-backend/src/health/health.module.ts b/apps/apps-backend/src/health/health.module.ts new file mode 100644 index 00000000000..e6394484ac5 --- /dev/null +++ b/apps/apps-backend/src/health/health.module.ts @@ -0,0 +1,10 @@ +// Copyright (c) 2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +import { Module } from '@nestjs/common'; +import { HealthController } from './health.controller'; + +@Module({ + controllers: [HealthController], +}) +export class HealthModule {} diff --git a/apps/apps-backend/test/health.e2e-spec.ts b/apps/apps-backend/test/health.e2e-spec.ts new file mode 100644 index 00000000000..f8ea44ed7cc --- /dev/null +++ b/apps/apps-backend/test/health.e2e-spec.ts @@ -0,0 +1,28 @@ +// Copyright (c) 2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +import { Test, TestingModule } from '@nestjs/testing'; +import { INestApplication } from '@nestjs/common'; +import * as request from 'supertest'; +import { AppModule } from '../src/app.module'; + +describe('Health Check (e2e)', () => { + let app: INestApplication; + + beforeAll(async () => { + const moduleFixture: TestingModule = await Test.createTestingModule({ + imports: [AppModule], + }).compile(); + + app = moduleFixture.createNestApplication(); + await app.init(); + }); + + afterAll(async () => { + await app.close(); + }); + + it('/health (GET)', async () => { + await request(app.getHttpServer()).get('/health').expect(200).expect({ status: 'ok' }); + }); +}); diff --git a/apps/core/src/utils/isAssetTransferable.ts b/apps/core/src/utils/isAssetTransferable.ts index 3f91570a6d5..4dad0779706 100644 --- a/apps/core/src/utils/isAssetTransferable.ts +++ b/apps/core/src/utils/isAssetTransferable.ts @@ -4,4 +4,7 @@ import { IotaObjectData } from '@iota/iota-sdk/client'; export const isAssetTransferable = (obj: IotaObjectData | null | undefined): boolean => - !!obj && obj.content?.dataType === 'moveObject' && obj.content.hasPublicTransfer; + // TODO: Either the type abilities will be added to 'IotaParsedData' and + // we need to check if the object has the 'store' ability or there will be a new endpoint + // that returns the "transferable" status of a MoveType. + !!obj && obj.content?.dataType === 'moveObject'; // && obj.content.hasPublicTransfer; diff --git a/apps/explorer/.env.example b/apps/explorer/.env.example index 937e87f2502..bc49b982b26 100644 --- a/apps/explorer/.env.example +++ b/apps/explorer/.env.example @@ -1,5 +1 @@ VITE_SENTRY_SAMPLE_RATE=xxxxxxx -VITE_PROD_SENTRY_DSN=xxxxxxx -VITE_DEV_SENTRY_DSN=xxxxxxx -VITE_AMPLI_PROD_API_KEY=xxxxxxx -VITE_AMPLI_DEV_API_KEY=xxxxxxx diff --git a/apps/explorer/.prettierignore b/apps/explorer/.prettierignore new file mode 100644 index 00000000000..11dd032b43b --- /dev/null +++ b/apps/explorer/.prettierignore @@ -0,0 +1,2 @@ +test-results/ + diff --git a/apps/explorer/ampli.json b/apps/explorer/ampli.json index fbbe29cec6a..1a49df1166b 100644 --- a/apps/explorer/ampli.json +++ b/apps/explorer/ampli.json @@ -1,14 +1,14 @@ { - "Zone": "us", - "OrgId": "216883", - "WorkspaceId": "cee48712-5b35-403d-af7e-a46bf71ee2c7", - "SourceId": "f2439a98-2bcd-4e46-a2a5-38662eda6d51", + "Zone": "eu", + "OrgId": "100007351", + "WorkspaceId": "141ec983-01d0-4494-a140-3463d0a8ce27", + "SourceId": "ba177631-4a93-48e1-91f4-c45b3ac4d63f", + "Branch": "main", + "Version": "1.0.0", + "VersionId": "81db59d9-e06e-4c91-be42-e1b536a9f68a", "Runtime": "browser:typescript-ampli-v2", "Platform": "Browser", "Language": "TypeScript", "SDK": "@amplitude/analytics-browser@^1.0", - "Branch": "main", - "Version": "1.0.0", - "VersionId": "e04b8300-7375-4e37-a47e-7eb097e55c65", "Path": "./src/utils/analytics/ampli" } diff --git a/apps/explorer/src/components/activity/Activity.tsx b/apps/explorer/src/components/activity/Activity.tsx index d636538800d..9b324a3e8a8 100644 --- a/apps/explorer/src/components/activity/Activity.tsx +++ b/apps/explorer/src/components/activity/Activity.tsx @@ -72,7 +72,7 @@ export function Activity({ initialLimit, disablePagination }: ActivityProps): JS const refetchInterval = paused || !pollingTxnTableEnabled ? undefined : REFETCH_INTERVAL; // TODO remove network check when querying transactions with TransactionKind filter is fixed on devnet and testnet /*const [network] = useNetwork(); - const isTransactionKindFilterEnabled = Network.MAINNET === network || Network.LOCAL === network; + const isTransactionKindFilterEnabled = Network.Mainnet === network || Network.Localnet === network; const [showSystemTransactions, setShowSystemTransaction] = useState( !isTransactionKindFilterEnabled, ); diff --git a/apps/explorer/src/hooks/useEnhancedRpc.ts b/apps/explorer/src/hooks/useEnhancedRpc.ts index 7951f6fa2db..66a925e25e8 100644 --- a/apps/explorer/src/hooks/useEnhancedRpc.ts +++ b/apps/explorer/src/hooks/useEnhancedRpc.ts @@ -12,7 +12,7 @@ export function useEnhancedRpcClient(): IotaClient { const [network] = useNetwork(); const client = useIotaClient(); const enhancedRpc = useMemo(() => { - if (network === Network.Local) { + if (network === Network.Localnet) { return new IotaClient({ url: 'http://localhost:9124' }); } diff --git a/apps/explorer/src/lib/utils/analytics/ampli/index.ts b/apps/explorer/src/lib/utils/analytics/ampli/index.ts index 7b6f54c343e..b9ff9f6d2f4 100644 --- a/apps/explorer/src/lib/utils/analytics/ampli/index.ts +++ b/apps/explorer/src/lib/utils/analytics/ampli/index.ts @@ -26,8 +26,8 @@ import * as amplitude from '@amplitude/analytics-browser'; type Environment = 'production' | 'development'; export const ApiKey: Record = { - production: import.meta.env.VITE_AMPLI_PROD_API_KEY, - development: import.meta.env.VITE_AMPLI_DEV_API_KEY, + production: '896b9073219c06800d9bf0aecf1b6f80', + development: '253fa1582d8ed913d8c5957f601df3fe', }; /** @@ -38,7 +38,7 @@ export const DefaultConfiguration: BrowserOptions = { version: '1', branch: 'main', source: 'web', - versionId: 'e04b8300-7375-4e37-a47e-7eb097e55c65', + versionId: '81db59d9-e06e-4c91-be42-e1b536a9f68a', }, ...{ ingestionMetadata: { @@ -46,6 +46,7 @@ export const DefaultConfiguration: BrowserOptions = { sourceVersion: '2.0.0', }, }, + serverZone: amplitude.Types.ServerZone.EU, }; interface LoadOptionsBase { diff --git a/apps/explorer/src/lib/utils/api/defaultRpcClient.ts b/apps/explorer/src/lib/utils/api/defaultRpcClient.ts index 35d35f5cf1c..6ff779f0a50 100644 --- a/apps/explorer/src/lib/utils/api/defaultRpcClient.ts +++ b/apps/explorer/src/lib/utils/api/defaultRpcClient.ts @@ -29,7 +29,7 @@ export const createIotaClient = (network: NetworkId): IotaClient => { const client = new IotaClient({ transport: - supportedNetwork && network === Network.Mainnet + supportedNetwork && network === Network.Testnet // Sentry dev hint: change this to eg [Network.Localnet] ? new SentryHttpTransport(networkUrl) : new IotaHTTPTransport({ url: networkUrl }), }); diff --git a/apps/explorer/src/lib/utils/sentry.ts b/apps/explorer/src/lib/utils/sentry.ts index 95320908fca..e8c3f689aab 100644 --- a/apps/explorer/src/lib/utils/sentry.ts +++ b/apps/explorer/src/lib/utils/sentry.ts @@ -14,14 +14,14 @@ import { const SENTRY_ENABLED = import.meta.env.PROD; const SENTRY_SAMPLE_RATE = import.meta.env.VITE_SENTRY_SAMPLE_RATE ? parseFloat(import.meta.env.VITE_SENTRY_SAMPLE_RATE) - : 1; + : 0; export function initSentry() { Sentry.init({ enabled: SENTRY_ENABLED, dsn: import.meta.env.PROD - ? import.meta.env.VITE_PROD_SENTRY_DSN - : import.meta.env.VITE_DEV_SENTRY_DSN, + ? 'https://ce107602e4d122f0639332c7c43fdc08@o4508279186718720.ingest.de.sentry.io/4508279962140752' + : 'https://c8085701fa2650fb2a090ed6aba6bc62@o4508279186718720.ingest.de.sentry.io/4508279963320400', environment: import.meta.env.VITE_VERCEL_ENV, integrations: [ new Sentry.BrowserTracing({ @@ -56,10 +56,6 @@ export function initSentry() { /^chrome(?:-extension)?:\/\//i, //, ], - allowUrls: [ - /.*\.iota\.org/i, - /.*-iota-foundation\.vercel\.app/i, - 'explorer-topaz.vercel.app', - ], + allowUrls: [/.*\.iota\.org/i, /.*\.iota\.cafe/i, /.*\.iotaledger\.net/i], }); } diff --git a/apps/wallet/ampli.json b/apps/wallet/ampli.json index 8bc88266999..cfc15209913 100644 --- a/apps/wallet/ampli.json +++ b/apps/wallet/ampli.json @@ -1,14 +1,14 @@ { - "Zone": "us", - "OrgId": "216883", - "WorkspaceId": "d08bae31-a74f-45c2-985d-2f5dc943b2ea", - "SourceId": "409326bd-fc3f-453e-9275-0bab406831d2", - "Branch": "main", - "Version": "3.0.0", - "VersionId": "e417ca76-bc93-4e57-b900-d5cd7c4b033c", + "Zone": "eu", + "OrgId": "100007351", + "WorkspaceId": "114d6e91-e23e-4185-9235-5d8bf8fac617", + "SourceId": "0bdd0a01-5a4b-4659-86b6-9413d1341b4e", "Runtime": "browser:typescript-ampli-v2", "Platform": "Browser", "Language": "TypeScript", "SDK": "@amplitude/analytics-browser@^1.0", + "Branch": "main", + "Version": "1.0.0", + "VersionId": "bc7a9c07-e259-439c-b48c-026b16a8a548", "Path": "./src/shared/analytics/ampli" } diff --git a/apps/wallet/configs/webpack/webpack.config.common.ts b/apps/wallet/configs/webpack/webpack.config.common.ts index 1131e6c99d1..fc6a86ceeb8 100644 --- a/apps/wallet/configs/webpack/webpack.config.common.ts +++ b/apps/wallet/configs/webpack/webpack.config.common.ts @@ -25,10 +25,17 @@ const CONFIGS_ROOT = resolve(PROJECT_ROOT, 'configs'); const SRC_ROOT = resolve(PROJECT_ROOT, 'src'); const OUTPUT_ROOT = resolve(PROJECT_ROOT, 'dist'); const TS_CONFIGS_ROOT = resolve(CONFIGS_ROOT, 'ts'); +const IS_NIGHTLY = process.env.NODE_ENV === 'nightly'; const IS_DEV = process.env.NODE_ENV === 'development'; const IS_PROD = process.env.NODE_ENV === 'production'; const TS_CONFIG_FILE = resolve(TS_CONFIGS_ROOT, `tsconfig.${IS_DEV ? 'dev' : 'prod'}.json`); -const APP_NAME = WALLET_RC ? 'IOTA Wallet (RC)' : IS_DEV ? 'IOTA Wallet (DEV)' : 'IOTA Wallet'; +const APP_NAME = WALLET_RC + ? 'IOTA Wallet (RC)' + : IS_DEV + ? 'IOTA Wallet (DEV)' + : IS_NIGHTLY + ? 'IOTA Wallet (Nightly)' + : 'IOTA Wallet'; dotenv.config({ path: [resolve(SDK_ROOT, '.env'), resolve(SDK_ROOT, '.env.defaults')], @@ -227,13 +234,14 @@ const commonConfig: () => Promise = async () => { 'process.env.DEFAULT_NETWORK': JSON.stringify(process.env.DEFAULT_NETWORK), 'process.env.IOTA_NETWORKS': JSON.stringify(process.env.IOTA_NETWORKS), 'process.env.APPS_BACKEND': JSON.stringify(process.env.APPS_BACKEND), + 'process.env.SENTRY_AUTH_TOKEN': JSON.stringify(process.env.SENTRY_AUTH_TOKEN), }), new ProvidePlugin({ Buffer: ['buffer', 'Buffer'], }), new SentryWebpackPlugin({ - org: 'iota-foundation', - project: 'wallet', + org: 'iota-foundation-eu', + project: 'iota-wallet', // Sentry dev hint: use 'iota-wallet-dev' project for testing include: OUTPUT_ROOT, dryRun: !IS_PROD || !sentryAuthToken, authToken: sentryAuthToken, diff --git a/apps/wallet/package.json b/apps/wallet/package.json index e07146dcca0..06e3d0ec6d4 100644 --- a/apps/wallet/package.json +++ b/apps/wallet/package.json @@ -9,6 +9,7 @@ "build:prod": "cross-env NODE_ENV=\"production\" TS_NODE_PROJECT=\"./configs/ts/tsconfig.webpack.json\" webpack --progress", "build:dev": "cross-env NODE_ENV=\"development\" TS_NODE_PROJECT=\"./configs/ts/tsconfig.webpack.json\" webpack --progress", "build:rc": "cross-env WALLET_RC=true NODE_ENV=\"production\" TS_NODE_PROJECT=\"./configs/ts/tsconfig.webpack.json\" webpack --progress", + "build:nightly": "cross-env NODE_ENV=\"nightly\" TS_NODE_PROJECT=\"./configs/ts/tsconfig.webpack.json\" webpack --progress", "prettier:check": "prettier -c --ignore-unknown --ignore-path=../../.prettierignore --ignore-path=.prettierignore .", "prettier:fix": "prettier -w --ignore-unknown --ignore-path=../../.prettierignore --ignore-path=.prettierignore .", "prettier:fix:watch": "onchange '**' -i -f add -f change -j 5 -- prettier -w --ignore-unknown --ignore-path=../../.prettierignore --ignore-path=.prettierignore {{file}}", @@ -43,7 +44,7 @@ "@amplitude/analytics-types": "^0.20.0", "@playwright/test": "^1.46.1", "@sentry/react": "^7.59.2", - "@sentry/webpack-plugin": "^1.20.0", + "@sentry/webpack-plugin": "^1.21.0", "@svgr/webpack": "^7.0.0", "@types/git-rev-sync": "^2.0.0", "@types/node": "^20.14.10", diff --git a/apps/wallet/src/background/index.ts b/apps/wallet/src/background/index.ts index 11beed3f9cc..338679105f2 100644 --- a/apps/wallet/src/background/index.ts +++ b/apps/wallet/src/background/index.ts @@ -15,13 +15,13 @@ import Alarms, { AUTO_LOCK_ALARM_NAME, CLEAN_UP_ALARM_NAME } from './Alarms'; import { Connections } from './connections'; import NetworkEnv from './NetworkEnv'; import Permissions from './Permissions'; -// import { initSentry } from './sentry'; +import { initSentry } from './sentry'; import Transactions from './Transactions'; growthbook.loadFeatures().catch(() => { // silence the error }); -// initSentry(); +initSentry(); Browser.runtime.onInstalled.addListener(async ({ reason, previousVersion }) => { // Skip automatically opening the onboarding in end-to-end tests. diff --git a/apps/wallet/src/manifest/manifest.json b/apps/wallet/src/manifest/manifest.json index 944f62bba9b..f768672d907 100644 --- a/apps/wallet/src/manifest/manifest.json +++ b/apps/wallet/src/manifest/manifest.json @@ -10,7 +10,7 @@ "action": { "default_popup": "ui.html?type=popup" }, - "host_permissions": ["https://fullnode.devnet.iota.org/", "https://fullnode.staging.iota.org/"], + "host_permissions": ["https://api.devnet.iota.cafe/", "https://api.testnet.iota.cafe/"], "icons": { "16": "manifest/icons/iota-icon-16.png", "32": "manifest/icons/iota-icon-32.png", diff --git a/apps/wallet/src/shared/analytics/ampli/index.ts b/apps/wallet/src/shared/analytics/ampli/index.ts index 95be5cc179e..d3df2009344 100644 --- a/apps/wallet/src/shared/analytics/ampli/index.ts +++ b/apps/wallet/src/shared/analytics/ampli/index.ts @@ -26,8 +26,8 @@ import * as amplitude from '@amplitude/analytics-browser'; export type Environment = 'production' | 'development'; const API_KEY: Record = { - production: '05c63856469c4e1d4aa9a6c1b2298d3b', - development: '938968357fcb3bf031d27b5049f62449', + production: '2a5d35822a1bab41835813f0223f319e', + development: '30a15c4ef8ae0e10ce5d2ed4f0023de3', }; /** @@ -35,10 +35,10 @@ const API_KEY: Record = { */ const DEFAULT_CONFIGURATION: BrowserOptions = { plan: { - version: '3', + version: '1', branch: 'main', source: 'web', - versionId: 'e417ca76-bc93-4e57-b900-d5cd7c4b033c', + versionId: 'ca799820-3dab-4797-bf37-22ff7cc67e78', }, ...{ ingestionMetadata: { @@ -46,6 +46,7 @@ const DEFAULT_CONFIGURATION: BrowserOptions = { sourceVersion: '2.0.0', }, }, + serverZone: amplitude.Types.ServerZone.EU, }; export interface LoadOptionsBase { @@ -635,11 +636,11 @@ export class Ampli { } private isInitializedAndEnabled(): boolean { - // if (!this.amplitude) { - // console.error('ERROR: Ampli is not yet initialized. Have you called ampli.load() on app start?'); - // return false; - // } - return false; + if (!this.amplitude) { + console.error('ERROR: Ampli is not yet initialized. Have you called ampli.load() on app start?'); + return false; + } + return !this.disabled; } /** diff --git a/apps/wallet/src/shared/analytics/amplitude.ts b/apps/wallet/src/shared/analytics/amplitude.ts index c6ed6da31e4..601371ab517 100644 --- a/apps/wallet/src/shared/analytics/amplitude.ts +++ b/apps/wallet/src/shared/analytics/amplitude.ts @@ -32,9 +32,9 @@ export async function initAmplitude() { } export function getUrlWithDeviceId(url: URL) { - // const amplitudeDeviceId = ampli.client.getDeviceId(); - // if (amplitudeDeviceId) { - // url.searchParams.append('deviceId', amplitudeDeviceId); - // } + const amplitudeDeviceId = ampli.client.getDeviceId(); + if (amplitudeDeviceId) { + url.searchParams.append('deviceId', amplitudeDeviceId); + } return url; } diff --git a/apps/wallet/src/shared/constants.ts b/apps/wallet/src/shared/constants.ts index dd930448773..61f24fe3181 100644 --- a/apps/wallet/src/shared/constants.ts +++ b/apps/wallet/src/shared/constants.ts @@ -2,9 +2,8 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -export const ToS_LINK = 'https://www.iota.org/terms-of-use'; -export const PRIVACY_POLICY_LINK = 'https://www.iota.org/privacy-policy'; -export const FAQ_LINK = 'https://wiki.iota.org/'; +export const ToS_LINK = 'https://www.iota.org/iota-wallet-tos'; +export const FAQ_LINK = 'https://docs.iota.org/about-iota/iota-wallet/FAQ '; // number of epochs before earning // Staking Rewards Redeemable diff --git a/apps/wallet/src/shared/iota-client.ts b/apps/wallet/src/shared/iota-client.ts index 85904c928ec..fc698db5364 100644 --- a/apps/wallet/src/shared/iota-client.ts +++ b/apps/wallet/src/shared/iota-client.ts @@ -8,7 +8,7 @@ import { SentryHttpTransport } from '@iota/core'; import { getNetwork, Network, IotaClient, IotaHTTPTransport } from '@iota/iota-sdk/client'; const iotaClientPerNetwork = new Map(); -const SENTRY_MONITORED_ENVS = [Network.Custom]; +const SENTRY_MONITORED_ENVS = [Network.Testnet]; // Sentry dev hint: change this to eg [Network.Localnet] export function getIotaClient({ network, customRpcUrl }: NetworkEnvType): IotaClient { const key = `${network}_${customRpcUrl}`; diff --git a/apps/wallet/src/shared/sentry-config.ts b/apps/wallet/src/shared/sentry-config.ts index 3705ead4aa8..8e5bd57deb2 100644 --- a/apps/wallet/src/shared/sentry-config.ts +++ b/apps/wallet/src/shared/sentry-config.ts @@ -8,12 +8,12 @@ import Browser from 'webextension-polyfill'; const WALLET_VERSION = Browser.runtime.getManifest().version; const IS_PROD = process.env.NODE_ENV === 'production'; -// NOTE: If you want to enable sentry in dev, you can tweak this value: +// Sentry dev hint: If you want to enable sentry in dev, you can tweak this value: const ENABLE_SENTRY = IS_PROD; const SENTRY_DSN = IS_PROD - ? 'https://e52a4e5c90224fe0800cc96aa2570581@o1314142.ingest.sentry.io/6761112' - : 'https://d1022411f6284cab9660146f3aa514d2@o1314142.ingest.sentry.io/4504697974751232'; + ? 'https://36e3e3c59a2e842034b2fc624103b72a@o4508279186718720.ingest.de.sentry.io/4508279958536272' + : 'https://36c25e34e606cac787b1536348101976@o4508279186718720.ingest.de.sentry.io/4508279960895568'; export function getSentryConfig({ integrations, @@ -27,8 +27,8 @@ export function getSentryConfig({ tracesSampler: IS_PROD ? tracesSampler : () => 1, allowUrls: IS_PROD ? [ - 'ehndjpedolgphielnhnpnkomdhgpaaei', // chrome beta - 'opcgpfmipidbgpenhmajoajpbobppdil', // chrome prod + 'nlmllpflpelpannpijhhnbhekpbpejch', // chrome rc + 'iidjkmdceolghepehaaddojmnjnkkija', // chrome prod ] : undefined, }; diff --git a/apps/wallet/src/ui/app/components/menu/content/WalletSettingsMenuList.tsx b/apps/wallet/src/ui/app/components/menu/content/WalletSettingsMenuList.tsx index dc706541a6d..75410062488 100644 --- a/apps/wallet/src/ui/app/components/menu/content/WalletSettingsMenuList.tsx +++ b/apps/wallet/src/ui/app/components/menu/content/WalletSettingsMenuList.tsx @@ -28,6 +28,7 @@ import { CardType, ImageType, } from '@iota/apps-ui-kit'; +import { ampli } from '_src/shared/analytics/ampli'; function MenuList() { const navigate = useNavigate(); @@ -46,7 +47,7 @@ function MenuList() { const logoutMutation = useMutation({ mutationKey: ['logout', 'clear wallet'], mutationFn: async () => { - // ampli.client.reset(); + ampli.client.reset(); queryClient.cancelQueries(); queryClient.clear(); await persister.removeClient(); diff --git a/apps/wallet/src/ui/app/pages/home/nft-details/index.tsx b/apps/wallet/src/ui/app/pages/home/nft-details/index.tsx index 0b37bcc2198..00792a40e54 100644 --- a/apps/wallet/src/ui/app/pages/home/nft-details/index.tsx +++ b/apps/wallet/src/ui/app/pages/home/nft-details/index.tsx @@ -7,7 +7,7 @@ import { Collapsible } from '_app/shared/collapse'; import { ExplorerLink, ExplorerLinkType, Loading, NFTDisplayCard, PageTemplate } from '_components'; import { useNFTBasicData, useOwnedNFT } from '_hooks'; import { useUnlockedGuard } from '_src/ui/app/hooks/useUnlockedGuard'; -import { useGetKioskContents, useGetNFTMeta } from '@iota/core'; +import { isAssetTransferable, useGetKioskContents, useGetNFTMeta } from '@iota/core'; import { formatAddress } from '@iota/iota-sdk/utils'; import cl from 'clsx'; import { Link, Navigate, useNavigate, useSearchParams } from 'react-router-dom'; @@ -24,10 +24,7 @@ function NFTDetailsPage() { const nftId = searchParams.get('objectId'); const accountAddress = useActiveAddress(); const { data: objectData, isPending: isNftLoading } = useOwnedNFT(nftId || '', accountAddress); - const isTransferable = - !!objectData && - objectData.content?.dataType === 'moveObject' && - objectData.content?.hasPublicTransfer; + const isTransferable = isAssetTransferable(objectData); const { nftFields, fileExtensionType, filePath } = useNFTBasicData(objectData); const address = useActiveAddress(); const { data } = useGetKioskContents(address); @@ -61,11 +58,12 @@ function NFTDetailsPage() { const isPending = isNftLoading || isPendingDisplay || isGuardLoading; function handleMoreAboutKiosk() { - window.open('https://wiki.iota.org/', '_blank'); + window.open('https://docs.iota.org/references/ts-sdk/kiosk/', '_blank'); } function handleMarketplace() { - window.open('https://wiki.iota.org/', '_blank'); + // TODO: https://github.com/iotaledger/iota/issues/4024 + window.open('https://docs.iota.org/references/ts-sdk/kiosk/', '_blank'); } function handleSend() { diff --git a/apps/wallet/src/ui/app/pages/home/transfer-coin/index.tsx b/apps/wallet/src/ui/app/pages/home/transfer-coin/index.tsx index 111017d0bb0..2a7cea08f5f 100644 --- a/apps/wallet/src/ui/app/pages/home/transfer-coin/index.tsx +++ b/apps/wallet/src/ui/app/pages/home/transfer-coin/index.tsx @@ -14,7 +14,7 @@ import { useCoinMetadata, useFormatCoin, } from '@iota/core'; -// import * as Sentry from '@sentry/react'; +import * as Sentry from '@sentry/react'; import { useMutation, useQueryClient } from '@tanstack/react-query'; import { useMemo, useState } from 'react'; import { toast } from 'react-hot-toast'; @@ -56,22 +56,22 @@ function TransferCoinPage() { if (!transaction || !signer) { throw new Error('Missing data'); } - - // const sentryTransaction = Sentry.startTransaction({ - // name: 'send-tokens', - // }); - return signer.signAndExecuteTransaction({ - transactionBlock: transaction, - options: { - showInput: true, - showEffects: true, - showEvents: true, - }, + const sentryTransaction = Sentry.startTransaction({ + name: 'send-tokens', }); - // finally { - // sentryTransaction.finish(); - // } + try { + return signer.signAndExecuteTransaction({ + transactionBlock: transaction, + options: { + showInput: true, + showEffects: true, + showEvents: true, + }, + }); + } finally { + sentryTransaction.finish(); + } }, onSuccess: (response) => { queryClient.invalidateQueries({ queryKey: ['get-coins'] }); diff --git a/apps/wallet/src/ui/app/staking/stake/StakeForm.tsx b/apps/wallet/src/ui/app/staking/stake/StakeForm.tsx index be49fc823e5..19e6617977e 100644 --- a/apps/wallet/src/ui/app/staking/stake/StakeForm.tsx +++ b/apps/wallet/src/ui/app/staking/stake/StakeForm.tsx @@ -67,8 +67,6 @@ function StakeForm({ validatorAddress, coinBalance, coinType, epoch }: StakeFrom const hasEnoughRemaingBalance = maxTokenBalance > parseAmount(values.amount, decimals) + BigInt(2) * gasBudget; - const shouldShowInsufficientRemainingFundsWarning = - maxTokenFormatted >= values.amount && !hasEnoughRemaingBalance; return (
- {shouldShowInsufficientRemainingFundsWarning ? ( + {!hasEnoughRemaingBalance ? ( { @@ -153,25 +153,26 @@ function StakingCard() { throw new Error('Failed, missing required field.'); } - // const sentryTransaction = Sentry.startTransaction({ - // name: 'stake', - // }); - const transactionBlock = createUnstakeTransaction(stakedIotaId); - const tx = await signer.signAndExecuteTransaction({ - transactionBlock, - options: { - showInput: true, - showEffects: true, - showEvents: true, - }, - }); - await signer.client.waitForTransaction({ - digest: tx.digest, + const sentryTransaction = Sentry.startTransaction({ + name: 'stake', }); - return tx; - // finally { - // sentryTransaction.finish(); - // } + try { + const transactionBlock = createUnstakeTransaction(stakedIotaId); + const tx = await signer.signAndExecuteTransaction({ + transactionBlock, + options: { + showInput: true, + showEffects: true, + showEvents: true, + }, + }); + await signer.client.waitForTransaction({ + digest: tx.digest, + }); + return tx; + } finally { + sentryTransaction.finish(); + } }, onSuccess: () => { ampli.unstakedIota({ diff --git a/apps/wallet/src/ui/index.tsx b/apps/wallet/src/ui/index.tsx index 8f5d321ecac..49dff3a6b7d 100644 --- a/apps/wallet/src/ui/index.tsx +++ b/apps/wallet/src/ui/index.tsx @@ -8,9 +8,9 @@ import '@fontsource-variable/red-hat-mono'; import { ErrorBoundary } from '_components'; import { initAppType } from '_redux/slices/app'; import { AppType, getFromLocationSearch } from '_redux/slices/app/AppType'; -// import { initAmplitude } from '_src/shared/analytics/amplitude'; +import { initAmplitude } from '_src/shared/analytics/amplitude'; import { setAttributes } from '_src/shared/experimentation/features'; -// import initSentry from '_src/ui/app/helpers/sentry'; +import initSentry from '_src/ui/app/helpers/sentry'; import store from '_store'; import { thunkExtras } from '_store/thunk-extras'; import { KioskClientProvider } from '@iota/core'; @@ -123,7 +123,7 @@ function AppWrapper() { (async () => { await init(); - // initSentry(); - // initAmplitude(); + initSentry(); + initAmplitude(); renderApp(); })(); diff --git a/apps/wallet/webpack.config.ts b/apps/wallet/webpack.config.ts index c7221ee324e..aefc092fdb5 100644 --- a/apps/wallet/webpack.config.ts +++ b/apps/wallet/webpack.config.ts @@ -10,6 +10,7 @@ import configProd from './configs/webpack/webpack.config.prod'; const configMap: Record Promise> = { development: configDev, production: configProd, + nightly: configProd, }; const nodeEnv: string = process.env.NODE_ENV || ''; diff --git a/crates/iota-adapter-transactional-tests/tests/call/simple.exp b/crates/iota-adapter-transactional-tests/tests/call/simple.exp index 64bb257cd87..8fa72608d3c 100644 --- a/crates/iota-adapter-transactional-tests/tests/call/simple.exp +++ b/crates/iota-adapter-transactional-tests/tests/call/simple.exp @@ -4,13 +4,13 @@ task 1, lines 7-26: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5570800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5563200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 28: //# run Test::M1::create --args 0 @A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 30: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/child_count/count_decremented.exp b/crates/iota-adapter-transactional-tests/tests/child_count/count_decremented.exp index cce8c2c77be..fa9ff7a6b44 100644 --- a/crates/iota-adapter-transactional-tests/tests/child_count/count_decremented.exp +++ b/crates/iota-adapter-transactional-tests/tests/child_count/count_decremented.exp @@ -7,13 +7,13 @@ task 1, lines 10-52: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 7516400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7508800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 54: //# run test::m::mint --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 56: //# view-object 2,0 @@ -31,13 +31,13 @@ task 4, line 58: //# run test::m::add --sender A --args object(2,0) 1 created: object(4,0), object(4,1) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 5859600, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5829200, storage_rebate: 2181200, non_refundable_storage_fee: 0 task 5, line 60: //# run test::m::remove --sender A --args object(2,0) 1 mutated: object(0,0), object(2,0) deleted: object(4,0), object(4,1) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 5859600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 5829200, non_refundable_storage_fee: 0 task 6, lines 62-66: //# view-object 2,0 @@ -55,7 +55,7 @@ task 7, line 68: //# run test::m::mint --sender A created: object(7,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, line 70: //# view-object 7,0 @@ -73,12 +73,12 @@ task 9, line 72: //# run test::m::add --sender A --args object(7,0) 1 created: object(9,0), object(9,1) mutated: object(0,0), object(7,0) -gas summary: computation_cost: 1000000, storage_cost: 5859600, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5829200, storage_rebate: 2181200, non_refundable_storage_fee: 0 task 10, line 74: //# run test::m::remove_and_add --sender A --args object(7,0) 1 mutated: object(0,0), object(7,0), object(9,0), object(9,1) -gas summary: computation_cost: 1000000, storage_cost: 5859600, storage_rebate: 5859600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5829200, storage_rebate: 5829200, non_refundable_storage_fee: 0 task 11, lines 76-80: //# view-object 7,0 @@ -96,7 +96,7 @@ task 12, line 82: //# run test::m::mint --sender A created: object(12,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 13, line 84: //# view-object 12,0 @@ -114,14 +114,14 @@ task 14, line 86: //# run test::m::add --sender A --args object(12,0) 1 created: object(14,0), object(14,1) mutated: object(0,0), object(12,0) -gas summary: computation_cost: 1000000, storage_cost: 5859600, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5829200, storage_rebate: 2181200, non_refundable_storage_fee: 0 task 15, line 88: //# run test::m::remove_and_wrap --sender A --args object(12,0) 1 created: object(15,0) mutated: object(0,0), object(12,0), object(14,0) wrapped: object(14,1) -gas summary: computation_cost: 1000000, storage_cost: 6102800, storage_rebate: 5859600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6072400, storage_rebate: 5829200, non_refundable_storage_fee: 0 task 16, line 90: //# view-object 12,0 diff --git a/crates/iota-adapter-transactional-tests/tests/child_count/delete_by_wrap.exp b/crates/iota-adapter-transactional-tests/tests/child_count/delete_by_wrap.exp index 136edc2cfaf..eb23f878d5c 100644 --- a/crates/iota-adapter-transactional-tests/tests/child_count/delete_by_wrap.exp +++ b/crates/iota-adapter-transactional-tests/tests/child_count/delete_by_wrap.exp @@ -7,19 +7,19 @@ task 1, lines 10-38: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 6513200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6505600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 40: //# run test::m::mint --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 42: //# run test::m::add --sender A --args object(2,0) 0 created: object(3,0), object(3,1) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 5859600, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5829200, storage_rebate: 2181200, non_refundable_storage_fee: 0 task 4, line 44: //# view-object 2,0 @@ -38,4 +38,4 @@ task 5, line 46: created: object(5,0) mutated: object(0,0) wrapped: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2439600, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2424400, storage_rebate: 2181200, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/child_count/delete_by_wrap_one_txn.exp b/crates/iota-adapter-transactional-tests/tests/child_count/delete_by_wrap_one_txn.exp index 362546a26b6..50b952dbdd4 100644 --- a/crates/iota-adapter-transactional-tests/tests/child_count/delete_by_wrap_one_txn.exp +++ b/crates/iota-adapter-transactional-tests/tests/child_count/delete_by_wrap_one_txn.exp @@ -7,10 +7,10 @@ task 1, lines 10-32: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 6102800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6095200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 34: //# run test::m::test_wrap --sender A created: object(2,0), object(2,1), object(2,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6102800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6072400, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/child_count/delete_parent_invalid.exp b/crates/iota-adapter-transactional-tests/tests/child_count/delete_parent_invalid.exp index 105d6047190..5d9b5f41627 100644 --- a/crates/iota-adapter-transactional-tests/tests/child_count/delete_parent_invalid.exp +++ b/crates/iota-adapter-transactional-tests/tests/child_count/delete_parent_invalid.exp @@ -7,19 +7,19 @@ task 1, lines 10-33: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 6026800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6019200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 35: //# run test::m::mint --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 37: //# run test::m::add --sender A --args object(2,0) 0 created: object(3,0), object(3,1) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 5859600, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5829200, storage_rebate: 2181200, non_refundable_storage_fee: 0 task 4, line 39: //# view-object 2,0 @@ -37,4 +37,4 @@ task 5, line 41: //# run test::m::delete --sender A --args object(2,0) mutated: object(0,0) deleted: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 2181200, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/child_count/delete_parent_valid.exp b/crates/iota-adapter-transactional-tests/tests/child_count/delete_parent_valid.exp index 84aee844360..dd807b38b4c 100644 --- a/crates/iota-adapter-transactional-tests/tests/child_count/delete_parent_valid.exp +++ b/crates/iota-adapter-transactional-tests/tests/child_count/delete_parent_valid.exp @@ -7,19 +7,19 @@ task 1, lines 10-58: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 7987600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7980000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 59: //# run test::m::mint --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 61: //# run test::m::add --sender A --args object(2,0) 0 created: object(3,0), object(3,1) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 5859600, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5829200, storage_rebate: 2181200, non_refundable_storage_fee: 0 task 4, line 63: //# view-object 2,0 @@ -37,10 +37,10 @@ task 5, line 65: //# run test::m::remove --sender A --args object(2,0) 0 mutated: object(0,0), object(2,0) deleted: object(3,0), object(3,1) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 5859600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 5829200, non_refundable_storage_fee: 0 task 6, line 67: //# run test::m::delete --sender A --args object(2,0) mutated: object(0,0) deleted: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 2181200, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/child_count/delete_parent_valid_one_txn.exp b/crates/iota-adapter-transactional-tests/tests/child_count/delete_parent_valid_one_txn.exp index f2c9cd7c23b..b162b77a205 100644 --- a/crates/iota-adapter-transactional-tests/tests/child_count/delete_parent_valid_one_txn.exp +++ b/crates/iota-adapter-transactional-tests/tests/child_count/delete_parent_valid_one_txn.exp @@ -7,19 +7,19 @@ task 1, lines 11-70: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 8382800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8375200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 72: //# run test::m::mint --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 74: //# run test::m::add --sender A --args object(2,0) 0 created: object(3,0), object(3,1) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 5859600, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5829200, storage_rebate: 2181200, non_refundable_storage_fee: 0 task 4, line 76: //# view-object 2,0 @@ -37,4 +37,4 @@ task 5, line 78: //# run test::m::remove_and_delete --sender A --args object(2,0) 0 mutated: object(0,0) deleted: object(2,0), object(3,0), object(3,1) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 5859600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 5829200, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/child_count/freeze_parent_invalid.exp b/crates/iota-adapter-transactional-tests/tests/child_count/freeze_parent_invalid.exp index d34d21fb66c..c564c80773b 100644 --- a/crates/iota-adapter-transactional-tests/tests/child_count/freeze_parent_invalid.exp +++ b/crates/iota-adapter-transactional-tests/tests/child_count/freeze_parent_invalid.exp @@ -7,19 +7,19 @@ task 1, lines 10-62: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 8458800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8451200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 64: //# run test::m::mint --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 66: //# run test::m::add --sender A --args object(2,0) 0 created: object(3,0), object(3,1) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 5859600, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5829200, storage_rebate: 2181200, non_refundable_storage_fee: 0 task 4, line 68: //# view-object 2,0 @@ -36,4 +36,4 @@ Contents: test::m::S { task 5, line 70: //# run test::m::freeze_object --sender A --args object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 2181200, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/child_count/freeze_parent_valid.exp b/crates/iota-adapter-transactional-tests/tests/child_count/freeze_parent_valid.exp index 9566c8febc2..62691cd8dd5 100644 --- a/crates/iota-adapter-transactional-tests/tests/child_count/freeze_parent_valid.exp +++ b/crates/iota-adapter-transactional-tests/tests/child_count/freeze_parent_valid.exp @@ -7,19 +7,19 @@ task 1, lines 10-62: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 8458800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8451200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 64: //# run test::m::mint --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 66: //# run test::m::add --sender A --args object(2,0) 0 created: object(3,0), object(3,1) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 5859600, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5829200, storage_rebate: 2181200, non_refundable_storage_fee: 0 task 4, line 68: //# view-object 2,0 @@ -37,9 +37,9 @@ task 5, line 70: //# run test::m::remove --sender A --args object(2,0) 0 mutated: object(0,0), object(2,0) deleted: object(3,0), object(3,1) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 5859600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 5829200, non_refundable_storage_fee: 0 task 6, line 72: //# run test::m::freeze_object --sender A --args object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 2181200, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/child_count/freeze_parent_valid_one_txn.exp b/crates/iota-adapter-transactional-tests/tests/child_count/freeze_parent_valid_one_txn.exp index ba8e93a292e..896e596fb53 100644 --- a/crates/iota-adapter-transactional-tests/tests/child_count/freeze_parent_valid_one_txn.exp +++ b/crates/iota-adapter-transactional-tests/tests/child_count/freeze_parent_valid_one_txn.exp @@ -7,19 +7,19 @@ task 1, lines 11-65: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 8610800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8603200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 67: //# run test::m::mint --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 69: //# run test::m::add --sender A --args object(2,0) 0 created: object(3,0), object(3,1) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 5859600, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5829200, storage_rebate: 2181200, non_refundable_storage_fee: 0 task 4, line 71: //# view-object 2,0 @@ -37,4 +37,4 @@ task 5, line 73: //# run test::m::remove_and_freeze --sender A --args object(2,0) 0 mutated: object(0,0), object(2,0) deleted: object(3,0), object(3,1) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 5859600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 5829200, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/child_count/non_zero_child_count_valid.exp b/crates/iota-adapter-transactional-tests/tests/child_count/non_zero_child_count_valid.exp index fead3e353ae..43b02efd2f8 100644 --- a/crates/iota-adapter-transactional-tests/tests/child_count/non_zero_child_count_valid.exp +++ b/crates/iota-adapter-transactional-tests/tests/child_count/non_zero_child_count_valid.exp @@ -7,22 +7,22 @@ task 1, lines 10-46: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 6976800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6969200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 48: //# run test::m::mint_and_share --sender A created: object(2,0), object(2,1), object(2,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5859600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5829200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 50-54: -//# view-object 2,1 +//# view-object 2,2 Owner: Shared( 2 ) Version: 2 Contents: test::m::S { id: iota::object::UID { id: iota::object::ID { - bytes: fake(2,1), + bytes: fake(2,2), }, }, } @@ -31,21 +31,21 @@ task 4, line 56: //# run test::m::mint --sender A created: object(4,0), object(4,1), object(4,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5859600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5829200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 58: -//# run test::m::transfer --sender A --args object(4,2) @B -mutated: object(0,0), object(4,2) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 2196400, non_refundable_storage_fee: 0 +//# run test::m::transfer --sender A --args object(4,1) @B +mutated: object(0,0), object(4,1) +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 2181200, non_refundable_storage_fee: 0 task 6, lines 60-64: -//# view-object 4,2 +//# view-object 4,1 Owner: Account Address ( B ) Version: 4 Contents: test::m::S { id: iota::object::UID { id: iota::object::ID { - bytes: fake(4,2), + bytes: fake(4,1), }, }, } @@ -54,12 +54,12 @@ task 7, line 66: //# run test::m::mint --sender A created: object(7,0), object(7,1), object(7,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5859600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5829200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, line 68: //# transfer-object 7,1 --sender A --recipient B mutated: object(0,0), object(7,1) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 2181200, non_refundable_storage_fee: 0 task 9, line 70: //# view-object 7,1 diff --git a/crates/iota-adapter-transactional-tests/tests/child_count/non_zero_child_count_valid.move b/crates/iota-adapter-transactional-tests/tests/child_count/non_zero_child_count_valid.move index 689e4bfb13d..8960ab5fb5e 100644 --- a/crates/iota-adapter-transactional-tests/tests/child_count/non_zero_child_count_valid.move +++ b/crates/iota-adapter-transactional-tests/tests/child_count/non_zero_child_count_valid.move @@ -47,7 +47,7 @@ module test::m { //# run test::m::mint_and_share --sender A -//# view-object 2,1 +//# view-object 2,2 // // Test transfer allows non-zero child count @@ -55,9 +55,9 @@ module test::m { //# run test::m::mint --sender A -//# run test::m::transfer --sender A --args object(4,2) @B +//# run test::m::transfer --sender A --args object(4,1) @B -//# view-object 4,2 +//# view-object 4,1 // // Test TransferObject allows non-zero child count diff --git a/crates/iota-adapter-transactional-tests/tests/child_count/non_zero_child_count_valid_one_txn.exp b/crates/iota-adapter-transactional-tests/tests/child_count/non_zero_child_count_valid_one_txn.exp index 9af799437e9..19d28fdf146 100644 --- a/crates/iota-adapter-transactional-tests/tests/child_count/non_zero_child_count_valid_one_txn.exp +++ b/crates/iota-adapter-transactional-tests/tests/child_count/non_zero_child_count_valid_one_txn.exp @@ -7,13 +7,13 @@ task 1, lines 11-36: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5950800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5943200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 38: //# run test::m::share --sender A created: object(2,0), object(2,1), object(2,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5859600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5829200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 40: //# view-object 2,1 diff --git a/crates/iota-adapter-transactional-tests/tests/child_count/temp_parent_invalid.exp b/crates/iota-adapter-transactional-tests/tests/child_count/temp_parent_invalid.exp index ab385579363..8e6165b55a5 100644 --- a/crates/iota-adapter-transactional-tests/tests/child_count/temp_parent_invalid.exp +++ b/crates/iota-adapter-transactional-tests/tests/child_count/temp_parent_invalid.exp @@ -7,10 +7,10 @@ task 1, lines 10-23: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5266800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5259200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 25: //# run test::m::t --sender A created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4651200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4628400, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/child_count/unwrap_never_stored.exp b/crates/iota-adapter-transactional-tests/tests/child_count/unwrap_never_stored.exp index f3a54108b3f..f6ca381adee 100644 --- a/crates/iota-adapter-transactional-tests/tests/child_count/unwrap_never_stored.exp +++ b/crates/iota-adapter-transactional-tests/tests/child_count/unwrap_never_stored.exp @@ -7,17 +7,17 @@ task 1, lines 10-38: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5836800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5829200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 40: //# run test::m::create --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2439600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2424400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 42: //# run test::m::delete --args object(2,0) --sender A mutated: object(0,0) deleted: object(2,0) unwrapped_then_deleted: object(_) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 2439600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 2424400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/child_count/unwrap_never_stored_transfer.exp b/crates/iota-adapter-transactional-tests/tests/child_count/unwrap_never_stored_transfer.exp index b4d70a99ee9..fdd42237243 100644 --- a/crates/iota-adapter-transactional-tests/tests/child_count/unwrap_never_stored_transfer.exp +++ b/crates/iota-adapter-transactional-tests/tests/child_count/unwrap_never_stored_transfer.exp @@ -7,17 +7,17 @@ task 1, lines 10-37: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 6072400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6064800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 39: //# run test::m::create --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2439600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2424400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 41: //# run test::m::unwrap_and_transfer --args object(2,0) --sender A mutated: object(0,0) unwrapped: object(3,0) deleted: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 2439600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 2424400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/child_count/unwrap_then_delete_invalid.exp b/crates/iota-adapter-transactional-tests/tests/child_count/unwrap_then_delete_invalid.exp index e0a4742fc97..e194d99a7af 100644 --- a/crates/iota-adapter-transactional-tests/tests/child_count/unwrap_then_delete_invalid.exp +++ b/crates/iota-adapter-transactional-tests/tests/child_count/unwrap_then_delete_invalid.exp @@ -7,23 +7,23 @@ task 1, lines 10-45: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 6688000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6680400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 47: //# run test::m::mint --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 49: //# run test::m::add --sender A --args object(2,0) 0 created: object(3,0), object(3,1) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 5859600, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5829200, storage_rebate: 2181200, non_refundable_storage_fee: 0 task 4, line 51: //# run test::m::wrap --sender A --args object(2,0) created: object(4,0) mutated: object(0,0) wrapped: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2439600, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2424400, storage_rebate: 2181200, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/children/child_of_shared_object.exp b/crates/iota-adapter-transactional-tests/tests/children/child_of_shared_object.exp index 05053dbaa45..0d8de638649 100644 --- a/crates/iota-adapter-transactional-tests/tests/children/child_of_shared_object.exp +++ b/crates/iota-adapter-transactional-tests/tests/children/child_of_shared_object.exp @@ -7,31 +7,31 @@ task 1, lines 7-18: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 5183200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5175600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 20-46: //# publish --dependencies t3 created: object(2,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 7668400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7660800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, lines 49-73: //# publish --dependencies t2 t3 created: object(3,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 8215600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8208000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 75: //# run t3::o3::create --sender A created: object(4,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 0, non_refundable_storage_fee: 0 task 5, line 77: //# run t2::o2::create_shared --args object(4,0) --sender A created: object(5,0), object(5,1) mutated: object(0,0), object(4,0) -gas summary: computation_cost: 1000000, storage_cost: 5920400, storage_rebate: 2226800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5890000, storage_rebate: 2211600, non_refundable_storage_fee: 0 task 6, line 79: //# view-object 4,0 diff --git a/crates/iota-adapter-transactional-tests/tests/deny_list_v1/coin_deny_and_undeny_receiver.exp b/crates/iota-adapter-transactional-tests/tests/deny_list_v1/coin_deny_and_undeny_receiver.exp index fff443fa24b..0752f3e790a 100644 --- a/crates/iota-adapter-transactional-tests/tests/deny_list_v1/coin_deny_and_undeny_receiver.exp +++ b/crates/iota-adapter-transactional-tests/tests/deny_list_v1/coin_deny_and_undeny_receiver.exp @@ -8,28 +8,28 @@ task 1, lines 13-38: created: object(1,0), object(1,1), object(1,2), object(1,3), object(1,4), object(1,5) mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 18392000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 18346400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 39-41: //# run iota::pay::split_and_transfer --args object(1,0) 1 @B --type-args test::regulated_coin::REGULATED_COIN --sender A created: object(2,0) mutated: object(0,0), object(1,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 3936800, storage_rebate: 2462400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3914000, storage_rebate: 2447200, non_refundable_storage_fee: 0 task 3, lines 42-44: //# run iota::coin::deny_list_v1_add --args object(0x403) object(1,2) @B --type-args test::regulated_coin::REGULATED_COIN --sender A -events: Event { package_id: iota, transaction_module: Identifier("coin"), sender: A, type_: StructTag { address: iota, module: Identifier("deny_list"), name: Identifier("PerTypeConfigCreated"), type_params: [] }, contents: [0, 0, 0, 0, 0, 0, 0, 0, 96, 57, 54, 51, 101, 51, 51, 55, 54, 100, 49, 48, 51, 98, 51, 50, 50, 99, 56, 50, 51, 53, 54, 51, 55, 55, 101, 100, 53, 54, 57, 51, 99, 50, 55, 51, 49, 53, 56, 48, 48, 52, 49, 53, 51, 54, 50, 57, 97, 97, 101, 50, 102, 100, 51, 56, 49, 49, 55, 50, 99, 56, 50, 100, 99, 58, 58, 114, 101, 103, 117, 108, 97, 116, 101, 100, 95, 99, 111, 105, 110, 58, 58, 82, 69, 71, 85, 76, 65, 84, 69, 68, 95, 67, 79, 73, 78, 190, 151, 1, 134, 198, 237, 153, 240, 113, 249, 57, 50, 254, 147, 131, 191, 242, 203, 140, 120, 90, 188, 242, 88, 218, 175, 150, 221, 187, 90, 104, 81] } +events: Event { package_id: iota, transaction_module: Identifier("coin"), sender: A, type_: StructTag { address: iota, module: Identifier("deny_list"), name: Identifier("PerTypeConfigCreated"), type_params: [] }, contents: [0, 0, 0, 0, 0, 0, 0, 0, 96, 53, 50, 50, 49, 97, 98, 98, 100, 53, 52, 97, 48, 52, 99, 53, 102, 53, 102, 48, 55, 97, 50, 57, 51, 49, 50, 48, 54, 55, 98, 102, 99, 51, 98, 53, 97, 55, 56, 57, 99, 51, 56, 51, 99, 101, 57, 101, 52, 98, 102, 55, 52, 102, 56, 49, 50, 49, 98, 48, 50, 57, 57, 51, 52, 58, 58, 114, 101, 103, 117, 108, 97, 116, 101, 100, 95, 99, 111, 105, 110, 58, 58, 82, 69, 71, 85, 76, 65, 84, 69, 68, 95, 67, 79, 73, 78, 23, 91, 249, 76, 213, 167, 145, 56, 66, 79, 184, 65, 52, 79, 167, 112, 45, 145, 181, 253, 130, 13, 151, 144, 60, 199, 196, 88, 134, 195, 245, 167] } created: object(3,0), object(3,1), object(3,2) mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2) -gas summary: computation_cost: 1000000, storage_cost: 12190400, storage_rebate: 2774000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 12144800, storage_rebate: 2758800, non_refundable_storage_fee: 0 task 4, line 45: //# run iota::pay::split_and_transfer --args object(1,0) 1 @B --type-args test::regulated_coin::REGULATED_COIN --sender A created: object(4,0) mutated: object(0,0), object(1,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 3936800, storage_rebate: 2462400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3914000, storage_rebate: 2447200, non_refundable_storage_fee: 0 task 5, lines 47-49: //# advance-epoch @@ -43,7 +43,7 @@ Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { k task 7, lines 53-55: //# run iota::coin::deny_list_v1_remove --args object(0x403) object(1,2) @B --type-args test::regulated_coin::REGULATED_COIN --sender A mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2), object(3,1) -gas summary: computation_cost: 1000000, storage_cost: 6862800, storage_rebate: 6862800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6832400, storage_rebate: 6832400, non_refundable_storage_fee: 0 task 8, line 56: //# run iota::pay::split_and_transfer --args object(1,0) 1 @B --type-args test::regulated_coin::REGULATED_COIN --sender A @@ -59,4 +59,4 @@ task 10, line 61: created: object(10,0) mutated: object(0,0), object(1,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 3936800, storage_rebate: 2462400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3914000, storage_rebate: 2447200, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/deny_list_v1/coin_deny_and_undeny_sender.exp b/crates/iota-adapter-transactional-tests/tests/deny_list_v1/coin_deny_and_undeny_sender.exp index 67e31d439db..d5e6a426771 100644 --- a/crates/iota-adapter-transactional-tests/tests/deny_list_v1/coin_deny_and_undeny_sender.exp +++ b/crates/iota-adapter-transactional-tests/tests/deny_list_v1/coin_deny_and_undeny_sender.exp @@ -8,7 +8,7 @@ task 1, lines 14-49: created: object(1,0), object(1,1), object(1,2), object(1,3), object(1,4), object(1,5) mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 19471200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 19425600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 50-52: //# view-object 1,2 @@ -28,20 +28,20 @@ task 3, lines 53-55: created: object(3,0) mutated: object(0,0), object(1,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 3936800, storage_rebate: 2462400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3914000, storage_rebate: 2447200, non_refundable_storage_fee: 0 task 4, lines 56-58: //# run iota::coin::deny_list_v1_add --args object(0x403) object(1,2) @B --type-args test::regulated_coin::REGULATED_COIN --sender A -events: Event { package_id: iota, transaction_module: Identifier("coin"), sender: A, type_: StructTag { address: iota, module: Identifier("deny_list"), name: Identifier("PerTypeConfigCreated"), type_params: [] }, contents: [0, 0, 0, 0, 0, 0, 0, 0, 96, 50, 48, 97, 98, 51, 98, 49, 97, 54, 56, 102, 54, 102, 100, 101, 57, 102, 52, 57, 99, 98, 48, 102, 57, 101, 54, 100, 99, 101, 49, 49, 97, 48, 56, 53, 101, 50, 48, 98, 54, 57, 48, 50, 97, 57, 53, 98, 51, 56, 52, 97, 102, 101, 102, 57, 54, 101, 49, 52, 56, 98, 52, 57, 99, 58, 58, 114, 101, 103, 117, 108, 97, 116, 101, 100, 95, 99, 111, 105, 110, 58, 58, 82, 69, 71, 85, 76, 65, 84, 69, 68, 95, 67, 79, 73, 78, 207, 152, 64, 239, 97, 39, 104, 98, 56, 15, 144, 8, 112, 132, 182, 14, 69, 169, 195, 61, 160, 176, 71, 170, 239, 201, 25, 100, 59, 153, 46, 160] } +events: Event { package_id: iota, transaction_module: Identifier("coin"), sender: A, type_: StructTag { address: iota, module: Identifier("deny_list"), name: Identifier("PerTypeConfigCreated"), type_params: [] }, contents: [0, 0, 0, 0, 0, 0, 0, 0, 96, 49, 99, 57, 56, 57, 49, 57, 50, 99, 98, 55, 56, 53, 49, 102, 50, 54, 49, 99, 97, 51, 53, 55, 99, 99, 100, 55, 49, 48, 102, 51, 101, 57, 55, 50, 57, 54, 99, 101, 55, 51, 102, 53, 102, 48, 55, 48, 99, 100, 54, 97, 48, 52, 57, 102, 49, 49, 50, 52, 102, 101, 54, 49, 99, 58, 58, 114, 101, 103, 117, 108, 97, 116, 101, 100, 95, 99, 111, 105, 110, 58, 58, 82, 69, 71, 85, 76, 65, 84, 69, 68, 95, 67, 79, 73, 78, 227, 5, 87, 243, 17, 67, 48, 78, 223, 164, 121, 136, 98, 174, 80, 210, 249, 81, 188, 233, 5, 28, 211, 145, 148, 4, 203, 247, 202, 138, 227, 32] } created: object(4,0), object(4,1), object(4,2) mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2) -gas summary: computation_cost: 1000000, storage_cost: 12190400, storage_rebate: 2774000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 12144800, storage_rebate: 2758800, non_refundable_storage_fee: 0 task 5, lines 59-61: //# run test::regulated_coin::assert_address_deny_status --args immshared(0x403) @B true --sender A mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, lines 62-64: //# transfer-object 3,0 --sender B --recipient A @@ -55,16 +55,16 @@ task 8, lines 68-70: //# run iota::coin::deny_list_v1_remove --args object(0x403) object(1,2) @B --type-args test::regulated_coin::REGULATED_COIN --sender A mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2) deleted: object(4,1) -gas summary: computation_cost: 1000000, storage_cost: 4400400, storage_rebate: 6862800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4377600, storage_rebate: 6832400, non_refundable_storage_fee: 0 task 9, lines 71-73: //# run test::regulated_coin::assert_address_deny_status --args immshared(0x403) @B false --sender A mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 10, line 74: //# transfer-object 3,0 --sender B --recipient A mutated: object(0,1), object(3,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 2462400, storage_rebate: 1474400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2447200, storage_rebate: 1466800, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/deny_list_v1/coin_deny_multiple_coin_types.exp b/crates/iota-adapter-transactional-tests/tests/deny_list_v1/coin_deny_multiple_coin_types.exp index dcb5ba22141..ad6d6463804 100644 --- a/crates/iota-adapter-transactional-tests/tests/deny_list_v1/coin_deny_multiple_coin_types.exp +++ b/crates/iota-adapter-transactional-tests/tests/deny_list_v1/coin_deny_multiple_coin_types.exp @@ -8,7 +8,7 @@ task 1, lines 12-61: created: object(1,0), object(1,1), object(1,2), object(1,3), object(1,4), object(1,5), object(1,6), object(1,7), object(1,8), object(1,9), object(1,10) mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 34260800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 34177200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 62-64: //# view-object 1,0 @@ -42,10 +42,10 @@ Contents: iota::coin::Coin { task 4, line 68: //# run iota::coin::deny_list_v1_add --args object(0x403) object(1,5) @A --type-args test::regulated_coin2::REGULATED_COIN2 --sender A -events: Event { package_id: iota, transaction_module: Identifier("coin"), sender: A, type_: StructTag { address: iota, module: Identifier("deny_list"), name: Identifier("PerTypeConfigCreated"), type_params: [] }, contents: [0, 0, 0, 0, 0, 0, 0, 0, 98, 99, 56, 98, 102, 54, 55, 50, 56, 49, 97, 51, 50, 97, 52, 100, 48, 56, 99, 48, 49, 99, 102, 55, 57, 55, 98, 52, 102, 49, 98, 55, 50, 48, 101, 57, 102, 101, 100, 48, 100, 97, 53, 102, 57, 50, 57, 54, 54, 52, 52, 55, 99, 49, 97, 97, 57, 56, 48, 55, 54, 55, 56, 54, 48, 58, 58, 114, 101, 103, 117, 108, 97, 116, 101, 100, 95, 99, 111, 105, 110, 50, 58, 58, 82, 69, 71, 85, 76, 65, 84, 69, 68, 95, 67, 79, 73, 78, 50, 202, 55, 194, 7, 175, 188, 246, 46, 205, 113, 73, 247, 78, 28, 206, 6, 231, 187, 186, 54, 232, 26, 58, 45, 180, 250, 202, 56, 192, 114, 218, 100] } +events: Event { package_id: iota, transaction_module: Identifier("coin"), sender: A, type_: StructTag { address: iota, module: Identifier("deny_list"), name: Identifier("PerTypeConfigCreated"), type_params: [] }, contents: [0, 0, 0, 0, 0, 0, 0, 0, 98, 52, 98, 102, 54, 53, 50, 102, 50, 57, 101, 97, 99, 101, 100, 101, 55, 51, 102, 49, 49, 54, 50, 55, 101, 51, 53, 49, 51, 48, 53, 51, 57, 54, 102, 56, 100, 100, 48, 100, 52, 98, 48, 51, 98, 56, 49, 100, 99, 57, 57, 54, 52, 54, 51, 50, 101, 99, 50, 56, 56, 51, 48, 57, 54, 58, 58, 114, 101, 103, 117, 108, 97, 116, 101, 100, 95, 99, 111, 105, 110, 50, 58, 58, 82, 69, 71, 85, 76, 65, 84, 69, 68, 95, 67, 79, 73, 78, 50, 227, 141, 101, 138, 169, 244, 7, 146, 12, 116, 123, 110, 203, 78, 202, 249, 84, 223, 143, 1, 197, 97, 211, 82, 105, 65, 237, 171, 221, 101, 250, 91] } created: object(4,0), object(4,1), object(4,2) mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,5) -gas summary: computation_cost: 1000000, storage_cost: 12220800, storage_rebate: 2789200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 12175200, storage_rebate: 2774000, non_refundable_storage_fee: 0 task 5, lines 70-71: //# programmable --sender A --inputs object(1,0) object(1,1) @A diff --git a/crates/iota-adapter-transactional-tests/tests/deny_list_v1/coin_global_pause.exp b/crates/iota-adapter-transactional-tests/tests/deny_list_v1/coin_global_pause.exp index f376d167327..6a8c428e7e0 100644 --- a/crates/iota-adapter-transactional-tests/tests/deny_list_v1/coin_global_pause.exp +++ b/crates/iota-adapter-transactional-tests/tests/deny_list_v1/coin_global_pause.exp @@ -8,41 +8,41 @@ task 1, lines 11-73: created: object(1,0), object(1,1), object(1,2), object(1,3), object(1,4), object(1,5) mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 21964000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 21918400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 74-76: //# run iota::pay::split_and_transfer --args object(1,0) 1 @B --type-args test::regulated_coin::REGULATED_COIN --sender A created: object(2,0) mutated: object(0,0), object(1,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 3936800, storage_rebate: 2462400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3914000, storage_rebate: 2447200, non_refundable_storage_fee: 0 task 3, lines 77-79: //# run test::regulated_coin::partial_wrap --args object(1,0) --sender A created: object(3,0) mutated: object(0,0), object(1,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 4119200, storage_rebate: 2462400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4096400, storage_rebate: 2447200, non_refundable_storage_fee: 0 task 4, lines 80-82: //# run test::regulated_coin::partial_wrap --args object(1,0) --sender A created: object(4,0) mutated: object(0,0), object(1,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 4119200, storage_rebate: 2462400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4096400, storage_rebate: 2447200, non_refundable_storage_fee: 0 task 5, lines 83-85: //# run iota::coin::deny_list_v1_enable_global_pause --args object(0x403) object(1,2) --type-args test::regulated_coin::REGULATED_COIN --sender A -events: Event { package_id: iota, transaction_module: Identifier("coin"), sender: A, type_: StructTag { address: iota, module: Identifier("deny_list"), name: Identifier("PerTypeConfigCreated"), type_params: [] }, contents: [0, 0, 0, 0, 0, 0, 0, 0, 96, 99, 54, 97, 101, 54, 51, 52, 57, 50, 101, 102, 97, 99, 102, 102, 101, 53, 52, 52, 101, 50, 48, 102, 99, 98, 53, 54, 97, 97, 53, 100, 50, 50, 100, 55, 57, 53, 55, 55, 50, 102, 51, 48, 53, 57, 102, 54, 56, 53, 100, 99, 99, 100, 57, 102, 99, 52, 51, 57, 53, 99, 99, 100, 51, 58, 58, 114, 101, 103, 117, 108, 97, 116, 101, 100, 95, 99, 111, 105, 110, 58, 58, 82, 69, 71, 85, 76, 65, 84, 69, 68, 95, 67, 79, 73, 78, 195, 206, 136, 5, 6, 49, 247, 11, 4, 73, 177, 199, 37, 211, 119, 247, 197, 163, 62, 153, 73, 22, 179, 71, 7, 165, 10, 8, 80, 114, 124, 5] } +events: Event { package_id: iota, transaction_module: Identifier("coin"), sender: A, type_: StructTag { address: iota, module: Identifier("deny_list"), name: Identifier("PerTypeConfigCreated"), type_params: [] }, contents: [0, 0, 0, 0, 0, 0, 0, 0, 96, 100, 98, 98, 50, 48, 57, 57, 99, 55, 50, 51, 101, 101, 101, 54, 98, 50, 97, 52, 50, 50, 98, 97, 101, 98, 52, 101, 55, 100, 101, 51, 56, 102, 52, 100, 102, 97, 54, 97, 56, 55, 48, 57, 48, 50, 54, 48, 52, 51, 56, 102, 51, 48, 55, 54, 97, 52, 53, 97, 49, 49, 51, 54, 50, 58, 58, 114, 101, 103, 117, 108, 97, 116, 101, 100, 95, 99, 111, 105, 110, 58, 58, 82, 69, 71, 85, 76, 65, 84, 69, 68, 95, 67, 79, 73, 78, 250, 83, 162, 60, 201, 48, 73, 29, 0, 92, 232, 80, 164, 14, 89, 222, 167, 164, 224, 108, 130, 242, 158, 3, 51, 172, 111, 45, 104, 124, 143, 233] } created: object(5,0), object(5,1), object(5,2) mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2) -gas summary: computation_cost: 1000000, storage_cost: 11985200, storage_rebate: 2774000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 11939600, storage_rebate: 2758800, non_refundable_storage_fee: 0 task 6, lines 86-88: //# run test::regulated_coin::assert_global_pause_status --args immshared(0x403) true --sender A mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, lines 89-91: //# run iota::pay::split_and_transfer --args object(1,0) 1 @B --type-args test::regulated_coin::REGULATED_COIN --sender A @@ -62,7 +62,7 @@ mutated: object(0,0) unwrapped: object(10,0) deleted: object(3,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 2462400, storage_rebate: 2644800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2447200, storage_rebate: 2629600, non_refundable_storage_fee: 0 task 11, lines 101-104: //# advance-epoch @@ -81,18 +81,18 @@ task 14, lines 111-113: //# run test::regulated_coin::assert_global_pause_status --args immshared(0x403) true --sender A mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 15, lines 114-116: //# run iota::coin::deny_list_v1_disable_global_pause --args object(0x403) object(1,2) --type-args test::regulated_coin::REGULATED_COIN --sender A mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2), object(5,1) -gas summary: computation_cost: 1000000, storage_cost: 6657600, storage_rebate: 6657600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6627200, storage_rebate: 6627200, non_refundable_storage_fee: 0 task 16, lines 117-119: //# run test::regulated_coin::assert_global_pause_status --args immshared(0x403) false --sender A mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 17, lines 120-122: //# run iota::pay::split_and_transfer --args object(1,0) 1 @B --type-args test::regulated_coin::REGULATED_COIN --sender A @@ -104,7 +104,7 @@ task 18, lines 123-126: created: object(18,0) mutated: object(0,0) wrapped: object(1,0) -gas summary: computation_cost: 1000000, storage_cost: 2644800, storage_rebate: 2462400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2629600, storage_rebate: 2447200, non_refundable_storage_fee: 0 task 19, line 127: //# run test::regulated_coin::unwrap --args object(18,0) --sender A @@ -121,4 +121,4 @@ mutated: object(0,0) unwrapped: object(1,0) deleted: object(18,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 2462400, storage_rebate: 2644800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2447200, storage_rebate: 2629600, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/deny_list_v1/delete_setting_object_same_epoch.exp b/crates/iota-adapter-transactional-tests/tests/deny_list_v1/delete_setting_object_same_epoch.exp index 8b91fc81e15..79e8d8f69d8 100644 --- a/crates/iota-adapter-transactional-tests/tests/deny_list_v1/delete_setting_object_same_epoch.exp +++ b/crates/iota-adapter-transactional-tests/tests/deny_list_v1/delete_setting_object_same_epoch.exp @@ -8,20 +8,20 @@ task 1, lines 10-54: created: object(1,0), object(1,1), object(1,2), object(1,3), object(1,4), object(1,5) mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 20428800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 20383200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 55-57: //# run iota::coin::deny_list_v1_add --args object(0x403) object(1,2) @B --type-args test::regulated_coin::REGULATED_COIN --sender A -events: Event { package_id: iota, transaction_module: Identifier("coin"), sender: A, type_: StructTag { address: iota, module: Identifier("deny_list"), name: Identifier("PerTypeConfigCreated"), type_params: [] }, contents: [0, 0, 0, 0, 0, 0, 0, 0, 96, 56, 97, 102, 99, 50, 53, 53, 100, 98, 49, 55, 55, 102, 56, 56, 102, 52, 49, 55, 54, 101, 98, 57, 53, 49, 100, 55, 99, 50, 102, 100, 49, 52, 54, 52, 51, 99, 52, 55, 56, 56, 55, 55, 97, 57, 51, 100, 101, 102, 101, 99, 54, 100, 101, 53, 56, 98, 52, 102, 102, 48, 57, 57, 54, 58, 58, 114, 101, 103, 117, 108, 97, 116, 101, 100, 95, 99, 111, 105, 110, 58, 58, 82, 69, 71, 85, 76, 65, 84, 69, 68, 95, 67, 79, 73, 78, 200, 43, 69, 14, 230, 177, 181, 7, 175, 120, 189, 53, 103, 99, 234, 147, 102, 94, 137, 176, 121, 164, 12, 14, 220, 228, 228, 153, 21, 48, 176, 221] } +events: Event { package_id: iota, transaction_module: Identifier("coin"), sender: A, type_: StructTag { address: iota, module: Identifier("deny_list"), name: Identifier("PerTypeConfigCreated"), type_params: [] }, contents: [0, 0, 0, 0, 0, 0, 0, 0, 96, 55, 52, 52, 102, 98, 48, 99, 57, 97, 49, 99, 54, 48, 56, 53, 53, 55, 51, 57, 102, 97, 53, 98, 98, 100, 101, 48, 101, 56, 98, 53, 100, 51, 52, 102, 55, 57, 53, 101, 54, 53, 54, 48, 53, 48, 50, 97, 98, 100, 52, 98, 97, 99, 53, 55, 52, 48, 56, 54, 53, 49, 98, 55, 50, 58, 58, 114, 101, 103, 117, 108, 97, 116, 101, 100, 95, 99, 111, 105, 110, 58, 58, 82, 69, 71, 85, 76, 65, 84, 69, 68, 95, 67, 79, 73, 78, 28, 36, 198, 89, 67, 105, 91, 135, 11, 174, 69, 30, 242, 96, 46, 239, 110, 118, 143, 61, 86, 105, 235, 26, 171, 124, 69, 187, 171, 122, 32, 57] } created: object(2,0), object(2,1), object(2,2) mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2) -gas summary: computation_cost: 1000000, storage_cost: 12190400, storage_rebate: 2774000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 12144800, storage_rebate: 2758800, non_refundable_storage_fee: 0 task 3, lines 58-60: //# run iota::coin::deny_list_v1_enable_global_pause --args object(0x403) object(1,2) --type-args test::regulated_coin::REGULATED_COIN --sender A created: object(3,0) mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2) -gas summary: computation_cost: 1000000, storage_cost: 6657600, storage_rebate: 4400400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6627200, storage_rebate: 4377600, non_refundable_storage_fee: 0 task 4, line 61: //# view-object 2,1 @@ -91,13 +91,13 @@ task 6, lines 66-68: //# run iota::coin::deny_list_v1_remove --args object(0x403) object(1,2) @B --type-args test::regulated_coin::REGULATED_COIN --sender A mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2) deleted: object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 4400400, storage_rebate: 6862800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4377600, storage_rebate: 6832400, non_refundable_storage_fee: 0 task 7, lines 69-71: //# run iota::coin::deny_list_v1_disable_global_pause --args object(0x403) object(1,2) --type-args test::regulated_coin::REGULATED_COIN --sender A mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2) deleted: object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 4400400, storage_rebate: 6657600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4377600, storage_rebate: 6627200, non_refundable_storage_fee: 0 task 8, line 72: //# view-object 2,1 @@ -111,10 +111,10 @@ task 10, lines 77-79: //# run test::regulated_coin::assert_address_deny_status --args immshared(0x403) @B false --sender A mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 11, line 80: //# run test::regulated_coin::assert_global_pause_status --args immshared(0x403) false --sender A mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/deny_list_v1/delete_setting_object_set_once.exp b/crates/iota-adapter-transactional-tests/tests/deny_list_v1/delete_setting_object_set_once.exp index 5b481e25ecf..69fdec7a4ad 100644 --- a/crates/iota-adapter-transactional-tests/tests/deny_list_v1/delete_setting_object_set_once.exp +++ b/crates/iota-adapter-transactional-tests/tests/deny_list_v1/delete_setting_object_set_once.exp @@ -8,20 +8,20 @@ task 1, lines 10-54: created: object(1,0), object(1,1), object(1,2), object(1,3), object(1,4), object(1,5) mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 20428800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 20383200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 55-57: //# run iota::coin::deny_list_v1_add --args object(0x403) object(1,2) @B --type-args test::regulated_coin::REGULATED_COIN --sender A -events: Event { package_id: iota, transaction_module: Identifier("coin"), sender: A, type_: StructTag { address: iota, module: Identifier("deny_list"), name: Identifier("PerTypeConfigCreated"), type_params: [] }, contents: [0, 0, 0, 0, 0, 0, 0, 0, 96, 56, 97, 102, 99, 50, 53, 53, 100, 98, 49, 55, 55, 102, 56, 56, 102, 52, 49, 55, 54, 101, 98, 57, 53, 49, 100, 55, 99, 50, 102, 100, 49, 52, 54, 52, 51, 99, 52, 55, 56, 56, 55, 55, 97, 57, 51, 100, 101, 102, 101, 99, 54, 100, 101, 53, 56, 98, 52, 102, 102, 48, 57, 57, 54, 58, 58, 114, 101, 103, 117, 108, 97, 116, 101, 100, 95, 99, 111, 105, 110, 58, 58, 82, 69, 71, 85, 76, 65, 84, 69, 68, 95, 67, 79, 73, 78, 200, 43, 69, 14, 230, 177, 181, 7, 175, 120, 189, 53, 103, 99, 234, 147, 102, 94, 137, 176, 121, 164, 12, 14, 220, 228, 228, 153, 21, 48, 176, 221] } +events: Event { package_id: iota, transaction_module: Identifier("coin"), sender: A, type_: StructTag { address: iota, module: Identifier("deny_list"), name: Identifier("PerTypeConfigCreated"), type_params: [] }, contents: [0, 0, 0, 0, 0, 0, 0, 0, 96, 55, 52, 52, 102, 98, 48, 99, 57, 97, 49, 99, 54, 48, 56, 53, 53, 55, 51, 57, 102, 97, 53, 98, 98, 100, 101, 48, 101, 56, 98, 53, 100, 51, 52, 102, 55, 57, 53, 101, 54, 53, 54, 48, 53, 48, 50, 97, 98, 100, 52, 98, 97, 99, 53, 55, 52, 48, 56, 54, 53, 49, 98, 55, 50, 58, 58, 114, 101, 103, 117, 108, 97, 116, 101, 100, 95, 99, 111, 105, 110, 58, 58, 82, 69, 71, 85, 76, 65, 84, 69, 68, 95, 67, 79, 73, 78, 28, 36, 198, 89, 67, 105, 91, 135, 11, 174, 69, 30, 242, 96, 46, 239, 110, 118, 143, 61, 86, 105, 235, 26, 171, 124, 69, 187, 171, 122, 32, 57] } created: object(2,0), object(2,1), object(2,2) mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2) -gas summary: computation_cost: 1000000, storage_cost: 12190400, storage_rebate: 2774000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 12144800, storage_rebate: 2758800, non_refundable_storage_fee: 0 task 3, lines 58-60: //# run iota::coin::deny_list_v1_enable_global_pause --args object(0x403) object(1,2) --type-args test::regulated_coin::REGULATED_COIN --sender A created: object(3,0) mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2) -gas summary: computation_cost: 1000000, storage_cost: 6657600, storage_rebate: 4400400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6627200, storage_rebate: 4377600, non_refundable_storage_fee: 0 task 4, line 61: //# view-object 2,1 @@ -94,12 +94,12 @@ Epoch advanced: 1 task 7, lines 68-70: //# run iota::coin::deny_list_v1_remove --args object(0x403) object(1,2) @B --type-args test::regulated_coin::REGULATED_COIN --sender A mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 6862800, storage_rebate: 6862800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6832400, storage_rebate: 6832400, non_refundable_storage_fee: 0 task 8, lines 71-73: //# run iota::coin::deny_list_v1_disable_global_pause --args object(0x403) object(1,2) --type-args test::regulated_coin::REGULATED_COIN --sender A mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2), object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 6657600, storage_rebate: 6657600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6627200, storage_rebate: 6627200, non_refundable_storage_fee: 0 task 9, line 74: //# view-object 2,1 @@ -173,13 +173,13 @@ task 12, lines 81-83: //# run iota::coin::deny_list_v1_remove --args object(0x403) object(1,2) @B --type-args test::regulated_coin::REGULATED_COIN --sender A mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2) deleted: object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 4400400, storage_rebate: 6862800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4377600, storage_rebate: 6832400, non_refundable_storage_fee: 0 task 13, lines 84-86: //# run iota::coin::deny_list_v1_disable_global_pause --args object(0x403) object(1,2) --type-args test::regulated_coin::REGULATED_COIN --sender A mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2) deleted: object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 4400400, storage_rebate: 6657600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4377600, storage_rebate: 6627200, non_refundable_storage_fee: 0 task 14, line 87: //# view-object 2,1 @@ -193,10 +193,10 @@ task 16, lines 92-94: //# run test::regulated_coin::assert_address_deny_status --args immshared(0x403) @B false --sender A mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 17, line 95: //# run test::regulated_coin::assert_global_pause_status --args immshared(0x403) false --sender A mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/deny_list_v1/delete_setting_object_set_twice.exp b/crates/iota-adapter-transactional-tests/tests/deny_list_v1/delete_setting_object_set_twice.exp index 503e057963b..42b31c3b7bb 100644 --- a/crates/iota-adapter-transactional-tests/tests/deny_list_v1/delete_setting_object_set_twice.exp +++ b/crates/iota-adapter-transactional-tests/tests/deny_list_v1/delete_setting_object_set_twice.exp @@ -8,20 +8,20 @@ task 1, lines 10-54: created: object(1,0), object(1,1), object(1,2), object(1,3), object(1,4), object(1,5) mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 20428800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 20383200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 55-57: //# run iota::coin::deny_list_v1_add --args object(0x403) object(1,2) @B --type-args test::regulated_coin::REGULATED_COIN --sender A -events: Event { package_id: iota, transaction_module: Identifier("coin"), sender: A, type_: StructTag { address: iota, module: Identifier("deny_list"), name: Identifier("PerTypeConfigCreated"), type_params: [] }, contents: [0, 0, 0, 0, 0, 0, 0, 0, 96, 56, 97, 102, 99, 50, 53, 53, 100, 98, 49, 55, 55, 102, 56, 56, 102, 52, 49, 55, 54, 101, 98, 57, 53, 49, 100, 55, 99, 50, 102, 100, 49, 52, 54, 52, 51, 99, 52, 55, 56, 56, 55, 55, 97, 57, 51, 100, 101, 102, 101, 99, 54, 100, 101, 53, 56, 98, 52, 102, 102, 48, 57, 57, 54, 58, 58, 114, 101, 103, 117, 108, 97, 116, 101, 100, 95, 99, 111, 105, 110, 58, 58, 82, 69, 71, 85, 76, 65, 84, 69, 68, 95, 67, 79, 73, 78, 200, 43, 69, 14, 230, 177, 181, 7, 175, 120, 189, 53, 103, 99, 234, 147, 102, 94, 137, 176, 121, 164, 12, 14, 220, 228, 228, 153, 21, 48, 176, 221] } +events: Event { package_id: iota, transaction_module: Identifier("coin"), sender: A, type_: StructTag { address: iota, module: Identifier("deny_list"), name: Identifier("PerTypeConfigCreated"), type_params: [] }, contents: [0, 0, 0, 0, 0, 0, 0, 0, 96, 55, 52, 52, 102, 98, 48, 99, 57, 97, 49, 99, 54, 48, 56, 53, 53, 55, 51, 57, 102, 97, 53, 98, 98, 100, 101, 48, 101, 56, 98, 53, 100, 51, 52, 102, 55, 57, 53, 101, 54, 53, 54, 48, 53, 48, 50, 97, 98, 100, 52, 98, 97, 99, 53, 55, 52, 48, 56, 54, 53, 49, 98, 55, 50, 58, 58, 114, 101, 103, 117, 108, 97, 116, 101, 100, 95, 99, 111, 105, 110, 58, 58, 82, 69, 71, 85, 76, 65, 84, 69, 68, 95, 67, 79, 73, 78, 28, 36, 198, 89, 67, 105, 91, 135, 11, 174, 69, 30, 242, 96, 46, 239, 110, 118, 143, 61, 86, 105, 235, 26, 171, 124, 69, 187, 171, 122, 32, 57] } created: object(2,0), object(2,1), object(2,2) mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2) -gas summary: computation_cost: 1000000, storage_cost: 12190400, storage_rebate: 2774000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 12144800, storage_rebate: 2758800, non_refundable_storage_fee: 0 task 3, lines 58-60: //# run iota::coin::deny_list_v1_enable_global_pause --args object(0x403) object(1,2) --type-args test::regulated_coin::REGULATED_COIN --sender A created: object(3,0) mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2) -gas summary: computation_cost: 1000000, storage_cost: 6657600, storage_rebate: 4400400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6627200, storage_rebate: 4377600, non_refundable_storage_fee: 0 task 4, line 61: //# view-object 2,1 @@ -94,12 +94,12 @@ Epoch advanced: 1 task 7, lines 68-70: //# run iota::coin::deny_list_v1_add --args object(0x403) object(1,2) @B --type-args test::regulated_coin::REGULATED_COIN --sender A mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 6870400, storage_rebate: 6862800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6840000, storage_rebate: 6832400, non_refundable_storage_fee: 0 task 8, lines 71-73: //# run iota::coin::deny_list_v1_enable_global_pause --args object(0x403) object(1,2) --type-args test::regulated_coin::REGULATED_COIN --sender A mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2), object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 6665200, storage_rebate: 6657600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6634800, storage_rebate: 6627200, non_refundable_storage_fee: 0 task 9, line 74: //# view-object 2,1 @@ -176,12 +176,12 @@ Epoch advanced: 2 task 12, lines 81-83: //# run iota::coin::deny_list_v1_remove --args object(0x403) object(1,2) @B --type-args test::regulated_coin::REGULATED_COIN --sender A mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 6862800, storage_rebate: 6870400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6832400, storage_rebate: 6840000, non_refundable_storage_fee: 0 task 13, lines 84-86: //# run iota::coin::deny_list_v1_disable_global_pause --args object(0x403) object(1,2) --type-args test::regulated_coin::REGULATED_COIN --sender A mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2), object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 6657600, storage_rebate: 6665200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6627200, storage_rebate: 6634800, non_refundable_storage_fee: 0 task 14, line 87: //# view-object 2,1 @@ -255,13 +255,13 @@ task 17, lines 94-96: //# run iota::coin::deny_list_v1_remove --args object(0x403) object(1,2) @B --type-args test::regulated_coin::REGULATED_COIN --sender A mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2) deleted: object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 4400400, storage_rebate: 6862800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4377600, storage_rebate: 6832400, non_refundable_storage_fee: 0 task 18, lines 97-99: //# run iota::coin::deny_list_v1_disable_global_pause --args object(0x403) object(1,2) --type-args test::regulated_coin::REGULATED_COIN --sender A mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2) deleted: object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 4400400, storage_rebate: 6657600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4377600, storage_rebate: 6627200, non_refundable_storage_fee: 0 task 19, line 100: //# view-object 2,1 @@ -275,10 +275,10 @@ task 21, lines 105-107: //# run test::regulated_coin::assert_address_deny_status --args immshared(0x403) @B false --sender A mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 22, line 108: //# run test::regulated_coin::assert_global_pause_status --args immshared(0x403) false --sender A mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/deny_list_v1/double_add.exp b/crates/iota-adapter-transactional-tests/tests/deny_list_v1/double_add.exp index 03b8b239a27..6dddbfa1041 100644 --- a/crates/iota-adapter-transactional-tests/tests/deny_list_v1/double_add.exp +++ b/crates/iota-adapter-transactional-tests/tests/deny_list_v1/double_add.exp @@ -8,32 +8,32 @@ task 1, lines 10-45: created: object(1,0), object(1,1), object(1,2), object(1,3), object(1,4), object(1,5) mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 19471200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 19425600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 46-48: //# run iota::pay::split_and_transfer --args object(1,0) 1 @B --type-args test::regulated_coin::REGULATED_COIN --sender A created: object(2,0) mutated: object(0,0), object(1,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 3936800, storage_rebate: 2462400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3914000, storage_rebate: 2447200, non_refundable_storage_fee: 0 task 3, lines 49-51: //# run iota::coin::deny_list_v1_add --args object(0x403) object(1,2) @B --type-args test::regulated_coin::REGULATED_COIN --sender A -events: Event { package_id: iota, transaction_module: Identifier("coin"), sender: A, type_: StructTag { address: iota, module: Identifier("deny_list"), name: Identifier("PerTypeConfigCreated"), type_params: [] }, contents: [0, 0, 0, 0, 0, 0, 0, 0, 96, 50, 48, 97, 98, 51, 98, 49, 97, 54, 56, 102, 54, 102, 100, 101, 57, 102, 52, 57, 99, 98, 48, 102, 57, 101, 54, 100, 99, 101, 49, 49, 97, 48, 56, 53, 101, 50, 48, 98, 54, 57, 48, 50, 97, 57, 53, 98, 51, 56, 52, 97, 102, 101, 102, 57, 54, 101, 49, 52, 56, 98, 52, 57, 99, 58, 58, 114, 101, 103, 117, 108, 97, 116, 101, 100, 95, 99, 111, 105, 110, 58, 58, 82, 69, 71, 85, 76, 65, 84, 69, 68, 95, 67, 79, 73, 78, 207, 152, 64, 239, 97, 39, 104, 98, 56, 15, 144, 8, 112, 132, 182, 14, 69, 169, 195, 61, 160, 176, 71, 170, 239, 201, 25, 100, 59, 153, 46, 160] } +events: Event { package_id: iota, transaction_module: Identifier("coin"), sender: A, type_: StructTag { address: iota, module: Identifier("deny_list"), name: Identifier("PerTypeConfigCreated"), type_params: [] }, contents: [0, 0, 0, 0, 0, 0, 0, 0, 96, 49, 99, 57, 56, 57, 49, 57, 50, 99, 98, 55, 56, 53, 49, 102, 50, 54, 49, 99, 97, 51, 53, 55, 99, 99, 100, 55, 49, 48, 102, 51, 101, 57, 55, 50, 57, 54, 99, 101, 55, 51, 102, 53, 102, 48, 55, 48, 99, 100, 54, 97, 48, 52, 57, 102, 49, 49, 50, 52, 102, 101, 54, 49, 99, 58, 58, 114, 101, 103, 117, 108, 97, 116, 101, 100, 95, 99, 111, 105, 110, 58, 58, 82, 69, 71, 85, 76, 65, 84, 69, 68, 95, 67, 79, 73, 78, 227, 5, 87, 243, 17, 67, 48, 78, 223, 164, 121, 136, 98, 174, 80, 210, 249, 81, 188, 233, 5, 28, 211, 145, 148, 4, 203, 247, 202, 138, 227, 32] } created: object(3,0), object(3,1), object(3,2) mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2) -gas summary: computation_cost: 1000000, storage_cost: 12190400, storage_rebate: 2774000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 12144800, storage_rebate: 2758800, non_refundable_storage_fee: 0 task 4, lines 52-54: //# run iota::coin::deny_list_v1_add --args object(0x403) object(1,2) @B --type-args test::regulated_coin::REGULATED_COIN --sender A mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2), object(3,1) -gas summary: computation_cost: 1000000, storage_cost: 6862800, storage_rebate: 6862800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6832400, storage_rebate: 6832400, non_refundable_storage_fee: 0 task 5, lines 55-57: //# run test::regulated_coin::assert_address_deny_status --args immshared(0x403) @B true --sender A mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, lines 58-60: //# transfer-object 2,0 --sender B --recipient A @@ -47,16 +47,16 @@ task 8, lines 64-66: //# run iota::coin::deny_list_v1_remove --args object(0x403) object(1,2) @B --type-args test::regulated_coin::REGULATED_COIN --sender A mutated: 0x0000000000000000000000000000000000000000000000000000000000000403, object(0,0), object(1,2) deleted: object(3,1) -gas summary: computation_cost: 1000000, storage_cost: 4400400, storage_rebate: 6862800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4377600, storage_rebate: 6832400, non_refundable_storage_fee: 0 task 9, lines 67-69: //# run test::regulated_coin::assert_address_deny_status --args immshared(0x403) @B false --sender A mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 10, line 70: //# transfer-object 2,0 --sender B --recipient A mutated: object(0,1), object(2,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 2462400, storage_rebate: 1474400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2447200, storage_rebate: 1466800, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/deny_list_v1/send_many_coins_unregulated.exp b/crates/iota-adapter-transactional-tests/tests/deny_list_v1/send_many_coins_unregulated.exp index bf6d242e920..4afff5f80f0 100644 --- a/crates/iota-adapter-transactional-tests/tests/deny_list_v1/send_many_coins_unregulated.exp +++ b/crates/iota-adapter-transactional-tests/tests/deny_list_v1/send_many_coins_unregulated.exp @@ -8,7 +8,7 @@ task 1, lines 7-53: created: object(1,0), object(1,1), object(1,2), object(1,3) mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 15048000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 15017600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 55: //# view-object 1,1 @@ -30,18 +30,18 @@ task 3, line 57: created: object(3,0) mutated: object(0,0), object(1,1) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 3632800, storage_rebate: 2310400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3610000, storage_rebate: 2295200, non_refundable_storage_fee: 0 task 4, line 59: //# run test::coin::send_10 --args object(1,1) --sender A created: object(4,0), object(4,1), object(4,2), object(4,3), object(4,4), object(4,5), object(4,6), object(4,7), object(4,8), object(4,9) mutated: object(0,0), object(1,1) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 2000000, storage_cost: 15534400, storage_rebate: 2310400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 2000000, computation_cost_burned: 2000000, storage_cost: 15443200, storage_rebate: 2295200, non_refundable_storage_fee: 0 task 5, line 61: //# run test::coin::send_100 --args object(1,1) --sender A created: object(5,0), object(5,1), object(5,2), object(5,3), object(5,4), object(5,5), object(5,6), object(5,7), object(5,8), object(5,9), object(5,10), object(5,11), object(5,12), object(5,13), object(5,14), object(5,15), object(5,16), object(5,17), object(5,18), object(5,19), object(5,20), object(5,21), object(5,22), object(5,23), object(5,24), object(5,25), object(5,26), object(5,27), object(5,28), object(5,29), object(5,30), object(5,31), object(5,32), object(5,33), object(5,34), object(5,35), object(5,36), object(5,37), object(5,38), object(5,39), object(5,40), object(5,41), object(5,42), object(5,43), object(5,44), object(5,45), object(5,46), object(5,47), object(5,48), object(5,49), object(5,50), object(5,51), object(5,52), object(5,53), object(5,54), object(5,55), object(5,56), object(5,57), object(5,58), object(5,59), object(5,60), object(5,61), object(5,62), object(5,63), object(5,64), object(5,65), object(5,66), object(5,67), object(5,68), object(5,69), object(5,70), object(5,71), object(5,72), object(5,73), object(5,74), object(5,75), object(5,76), object(5,77), object(5,78), object(5,79), object(5,80), object(5,81), object(5,82), object(5,83), object(5,84), object(5,85), object(5,86), object(5,87), object(5,88), object(5,89), object(5,90), object(5,91), object(5,92), object(5,93), object(5,94), object(5,95), object(5,96), object(5,97), object(5,98), object(5,99) mutated: object(0,0), object(1,1) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 16000000, storage_cost: 134550400, storage_rebate: 2310400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 16000000, computation_cost_burned: 16000000, storage_cost: 133775200, storage_rebate: 2295200, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/dev_inspect/load_old_object.exp b/crates/iota-adapter-transactional-tests/tests/dev_inspect/load_old_object.exp index b95d01203af..2013093765c 100644 --- a/crates/iota-adapter-transactional-tests/tests/dev_inspect/load_old_object.exp +++ b/crates/iota-adapter-transactional-tests/tests/dev_inspect/load_old_object.exp @@ -7,7 +7,7 @@ task 1, lines 9-31: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 5274400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5266800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 33-35: //# programmable --sender A --inputs @A @@ -15,7 +15,7 @@ task 2, lines 33-35: //> TransferObjects([Result(0)], Input(0)) created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2257200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2242000, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 37: //# view-object 2,0 @@ -34,7 +34,7 @@ task 4, lines 39-40: //# programmable --sender A --inputs object(2,0) 112 //> test::m::set(Input(0), Input(1)) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2257200, storage_rebate: 2257200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2242000, storage_rebate: 2242000, non_refundable_storage_fee: 0 task 5, lines 42-45: //# view-object 2,0 @@ -53,14 +53,14 @@ task 6, lines 47-48: //# programmable --sender A --inputs object(2,0)@2 0 --dev-inspect //> test::m::check(Input(0), Input(1)) mutated: object(_), object(2,0) -gas summary: computation_cost: 500000, storage_cost: 2257200, storage_rebate: 1269200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2242000, storage_rebate: 1261600, non_refundable_storage_fee: 0 task 7, lines 50-54: //# programmable --sender A --inputs object(2,0)@3 112 --dev-inspect //> test::m::check(Input(0), Input(1)) // dev-inspect with 'check' and _incorrect_ values mutated: object(_), object(2,0) -gas summary: computation_cost: 500000, storage_cost: 2257200, storage_rebate: 1269200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2242000, storage_rebate: 1261600, non_refundable_storage_fee: 0 task 8, lines 56-57: //# programmable --sender A --inputs object(2,0)@2 112 --dev-inspect diff --git a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/add_duplicate.exp b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/add_duplicate.exp index 942c30193ae..cef30b6ea50 100644 --- a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/add_duplicate.exp +++ b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/add_duplicate.exp @@ -7,13 +7,13 @@ task 1, lines 10-29: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 5867200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5859600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 31: //# run a::m::t1 --sender A created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3678400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3655600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 33: //# run a::m::t2 --sender A --args object(2,0) diff --git a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/add_duplicate_object.exp b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/add_duplicate_object.exp index 7065424815e..e4c2ea2e62b 100644 --- a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/add_duplicate_object.exp +++ b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/add_duplicate_object.exp @@ -7,13 +7,13 @@ task 1, lines 11-30: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 6026800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6019200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 32: //# run a::m::t1 --sender A created: object(2,0), object(2,1), object(2,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5890000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5859600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 34: //# run a::m::t2 --sender A --args object(2,1) diff --git a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/bench.exp b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/bench.exp index 5a4a66edc22..97bec0abe1b 100644 --- a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/bench.exp +++ b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/bench.exp @@ -7,10 +7,10 @@ task 1, lines 10-61: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 8603200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8595600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 63: //# run a::m::t0 --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2211600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2196400, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/borrow_wrong_type.exp b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/borrow_wrong_type.exp index 934e354e8e9..983eb34df9c 100644 --- a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/borrow_wrong_type.exp +++ b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/borrow_wrong_type.exp @@ -7,13 +7,13 @@ task 1, lines 10-33: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 6505600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6498000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 35: //# run a::m::t1 --sender A created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3678400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3655600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 37: //# run a::m::t2 --sender A --args object(2,0) diff --git a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/borrow_wrong_type_object.exp b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/borrow_wrong_type_object.exp index 2ec805de8b3..c85387dae83 100644 --- a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/borrow_wrong_type_object.exp +++ b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/borrow_wrong_type_object.exp @@ -7,13 +7,13 @@ task 1, lines 11-38: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 7075600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7068000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 40: //# run a::m::t1 --sender A created: object(2,0), object(2,1), object(2,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5890000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5859600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 42: //# run a::m::t2 --sender A --args object(2,0) diff --git a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/dynamic_object_field_swap.exp b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/dynamic_object_field_swap.exp index fd44d68d8d1..14bb826e7c1 100644 --- a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/dynamic_object_field_swap.exp +++ b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/dynamic_object_field_swap.exp @@ -7,25 +7,25 @@ task 1, lines 7-60: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 8937600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8930000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 62: //# run test::m::parent --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2470000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2454800, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 64: //# run test::m::child --sender A created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2287600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2272400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 66: //# run test::m::add_field --sender A --args object(2,0) object(3,0) created: object(4,0) mutated: object(0,0), object(2,0), object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 6224400, storage_rebate: 3769600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6194000, storage_rebate: 3746800, non_refundable_storage_fee: 0 task 5, line 68: //# view-object 3,0 @@ -45,7 +45,7 @@ task 6, line 70: created: object(6,0) mutated: object(0,0), object(2,0), object(3,0) deleted: object(4,0) -gas summary: computation_cost: 1000000, storage_cost: 5251600, storage_rebate: 6224400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5221200, storage_rebate: 6194000, non_refundable_storage_fee: 0 task 7, line 72: //# view-object 3,0 diff --git a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/exhaustive.exp b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/exhaustive.exp index 35dff53c465..bd5a913674a 100644 --- a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/exhaustive.exp +++ b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/exhaustive.exp @@ -7,53 +7,53 @@ task 1, lines 10-78: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 12205600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 12198000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 80: //# run a::m::t0 --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2211600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2196400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 82: //# run a::m::t1 --sender A --args object(2,0) created: object(3,0), object(3,1), object(3,2) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 6513200, storage_rebate: 2211600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6475200, storage_rebate: 2196400, non_refundable_storage_fee: 0 task 4, line 84: //# run a::m::t2 --sender A --args object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2211600, storage_rebate: 2211600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2196400, storage_rebate: 2196400, non_refundable_storage_fee: 0 task 5, line 86: //# run a::m::t3 --sender A --args object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2211600, storage_rebate: 2211600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2196400, storage_rebate: 2196400, non_refundable_storage_fee: 0 task 6, line 88: //# run a::m::t4 --sender A --args object(2,0) mutated: object(0,0), object(2,0), object(3,0), object(3,1), object(3,2) -gas summary: computation_cost: 1000000, storage_cost: 6513200, storage_rebate: 6513200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6475200, storage_rebate: 6475200, non_refundable_storage_fee: 0 task 7, line 90: //# run a::m::t5 --sender A --args object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2211600, storage_rebate: 2211600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2196400, storage_rebate: 2196400, non_refundable_storage_fee: 0 task 8, line 92: //# run a::m::t6 --sender A --args object(2,0) mutated: object(0,0), object(2,0) deleted: object(3,1), object(3,2) -gas summary: computation_cost: 1000000, storage_cost: 2211600, storage_rebate: 5099600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2196400, storage_rebate: 5069200, non_refundable_storage_fee: 0 task 9, line 94: //# run a::m::t7 --sender A --args object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2211600, storage_rebate: 2211600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2196400, storage_rebate: 2196400, non_refundable_storage_fee: 0 task 10, line 96: //# run a::m::t8 --sender A --args object(2,0) mutated: object(0,0) deleted: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 2211600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 2196400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/exhaustive_object.exp b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/exhaustive_object.exp index e41df19232d..b13fe6b5098 100644 --- a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/exhaustive_object.exp +++ b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/exhaustive_object.exp @@ -7,53 +7,53 @@ task 1, lines 11-103: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 13482400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 13474800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 105: //# run a::m::t0 --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2211600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2196400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 107: //# run a::m::t1 --sender A --args object(2,0) created: object(3,0), object(3,1), object(3,2), object(3,3), object(3,4), object(3,5) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 13421600, storage_rebate: 2211600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 13360800, storage_rebate: 2196400, non_refundable_storage_fee: 0 task 4, line 109: //# run a::m::t2 --sender A --args object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2211600, storage_rebate: 2211600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2196400, storage_rebate: 2196400, non_refundable_storage_fee: 0 task 5, line 111: //# run a::m::t3 --sender A --args object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2211600, storage_rebate: 2211600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2196400, storage_rebate: 2196400, non_refundable_storage_fee: 0 task 6, line 113: //# run a::m::t4 --sender A --args object(2,0) mutated: object(0,0), object(2,0), object(3,0), object(3,1), object(3,2) -gas summary: computation_cost: 1000000, storage_cost: 6156000, storage_rebate: 6156000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6118000, storage_rebate: 6118000, non_refundable_storage_fee: 0 task 7, line 115: //# run a::m::t5 --sender A --args object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2211600, storage_rebate: 2211600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2196400, storage_rebate: 2196400, non_refundable_storage_fee: 0 task 8, line 117: //# run a::m::t6 --sender A --args object(2,0) mutated: object(0,0), object(2,0) -deleted: object(3,1), object(3,2), object(3,4), object(3,5) -gas summary: computation_cost: 1000000, storage_cost: 2211600, storage_rebate: 9705200, non_refundable_storage_fee: 0 +deleted: object(3,0), object(3,2), object(3,4), object(3,5) +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2196400, storage_rebate: 9659600, non_refundable_storage_fee: 0 task 9, line 119: //# run a::m::t7 --sender A --args object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2211600, storage_rebate: 2211600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2196400, storage_rebate: 2196400, non_refundable_storage_fee: 0 task 10, line 121: //# run a::m::t8 --sender A --args object(2,0) mutated: object(0,0) deleted: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 2211600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 2196400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/read_field_from_immutable.exp b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/read_field_from_immutable.exp index 45115223dae..69d0a4a322f 100644 --- a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/read_field_from_immutable.exp +++ b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/read_field_from_immutable.exp @@ -7,15 +7,15 @@ task 1, lines 10-29: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 6133200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6125600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 31: //# run a::m::add_then_freeze --sender A created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3678400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3655600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 33: //# run a::m::read_from_frozen --sender A --args object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/receive_remove_add_back_and_remove_type.exp b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/receive_remove_add_back_and_remove_type.exp index 925273ac814..a8a96b45c73 100644 --- a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/receive_remove_add_back_and_remove_type.exp +++ b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/receive_remove_add_back_and_remove_type.exp @@ -7,54 +7,54 @@ task 1, lines 12-88: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 12897200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 12889600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 90: //# run test::m1::create --sender A created: object(2,0), object(2,1), object(2,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4689200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4658800, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 92: //# run test::m1::test_dof --args object(2,2) receiving(2,0) receiving(2,1) --sender A mutated: object(0,0), object(2,0), object(2,2) deleted: object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 3465600, storage_rebate: 4689200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3442800, storage_rebate: 4658800, non_refundable_storage_fee: 0 task 4, line 94: //# run test::m1::create --sender A created: object(4,0), object(4,1), object(4,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4689200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4658800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 96: //# run test::m1::test_df --args object(4,2) receiving(4,0) receiving(4,1) --sender A mutated: object(0,0), object(4,0), object(4,2) deleted: object(4,1) -gas summary: computation_cost: 1000000, storage_cost: 3465600, storage_rebate: 4689200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3442800, storage_rebate: 4658800, non_refundable_storage_fee: 0 task 6, line 98: //# run test::m1::create --sender A created: object(6,0), object(6,1), object(6,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4689200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4658800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, line 100: //# run test::m1::test_dof_wrapper --args object(6,2) receiving(6,0) receiving(6,1) --sender A created: object(7,0) mutated: object(0,0), object(6,2) wrapped: object(6,0) -gas summary: computation_cost: 1000000, storage_cost: 4050800, storage_rebate: 3465600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4028000, storage_rebate: 3442800, non_refundable_storage_fee: 0 task 8, line 102: //# run test::m1::create --sender A created: object(8,0), object(8,1), object(8,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4689200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4658800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 9, line 104: //# run test::m1::test_df_wrapper --args object(8,2) receiving(8,0) receiving(8,1) --sender A created: object(9,0) mutated: object(0,0), object(8,2) wrapped: object(8,0) -gas summary: computation_cost: 1000000, storage_cost: 4050800, storage_rebate: 3465600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4028000, storage_rebate: 3442800, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/remove_add_back_and_remove.exp b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/remove_add_back_and_remove.exp index 7ca37d8248e..c8490cc496a 100644 --- a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/remove_add_back_and_remove.exp +++ b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/remove_add_back_and_remove.exp @@ -7,47 +7,47 @@ task 1, lines 12-53: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 9614000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9606400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 55-57: //# run test::m1::create --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2249600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2234400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 58: //# run test::m1::add_child --args object(2,0) --sender A created: object(3,0), object(3,1) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 5950800, storage_rebate: 2249600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5920400, storage_rebate: 2234400, non_refundable_storage_fee: 0 task 4, lines 60-62: //# run test::m1::transfer_child --args object(2,0) --sender A mutated: object(0,0), object(2,0), object(3,1) deleted: object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 3496000, storage_rebate: 5950800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3473200, storage_rebate: 5920400, non_refundable_storage_fee: 0 task 5, line 63: //# run test::m1::add_child --args object(2,0) --sender A created: object(3,0), object(5,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 5950800, storage_rebate: 2249600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5920400, storage_rebate: 2234400, non_refundable_storage_fee: 0 task 6, lines 65-67: //# run test::m1::delete_child --args object(2,0) --sender A mutated: object(0,0), object(2,0) deleted: object(3,0), object(5,0) -gas summary: computation_cost: 1000000, storage_cost: 2249600, storage_rebate: 5950800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2234400, storage_rebate: 5920400, non_refundable_storage_fee: 0 task 7, line 68: //# run test::m1::add_child --args object(2,0) --sender A created: object(3,0), object(7,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 5950800, storage_rebate: 2249600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5920400, storage_rebate: 2234400, non_refundable_storage_fee: 0 task 8, line 70: //# run test::m1::wrap_child --args object(2,0) --sender A mutated: object(0,0), object(2,0) deleted: object(3,0) wrapped: object(7,0) -gas summary: computation_cost: 1000000, storage_cost: 2492800, storage_rebate: 5950800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2477600, storage_rebate: 5920400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/remove_add_back_and_remove_type.exp b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/remove_add_back_and_remove_type.exp index 51054692d3d..ea116f9868e 100644 --- a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/remove_add_back_and_remove_type.exp +++ b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/remove_add_back_and_remove_type.exp @@ -7,20 +7,20 @@ task 1, lines 12-49: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 8762800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8755200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 51: //# run test::m1::create --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2242000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2226800, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 53: //# run test::m1::test_dof --args object(2,0) --sender A mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2242000, storage_rebate: 2242000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2226800, storage_rebate: 2226800, non_refundable_storage_fee: 0 task 4, line 55: //# run test::m1::test_df --args object(2,0) --sender A mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2242000, storage_rebate: 2242000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2226800, storage_rebate: 2226800, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/remove_wrong_type.exp b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/remove_wrong_type.exp index f2c566e3090..5b57fbca7b3 100644 --- a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/remove_wrong_type.exp +++ b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/remove_wrong_type.exp @@ -7,13 +7,13 @@ task 1, lines 10-30: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 6019200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6011600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 32: //# run a::m::t1 --sender A created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3678400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3655600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 34: //# run a::m::t2 --sender A --args object(2,0) diff --git a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/remove_wrong_type_object.exp b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/remove_wrong_type_object.exp index c0ae7a7242a..efb57c51785 100644 --- a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/remove_wrong_type_object.exp +++ b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/remove_wrong_type_object.exp @@ -7,15 +7,15 @@ task 1, lines 11-35: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 6695600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6688000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 37: //# run a::m::t1 --sender A created: object(2,0), object(2,1), object(2,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5890000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5859600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 39: -//# run a::m::t2 --sender A --args object(2,0) +//# run a::m::t2 --sender A --args object(2,1) Error: Transaction Effects Status: Move Runtime Abort. Location: iota::dynamic_field::remove_child_object (function index 13) at offset 0, Abort Code: 2 Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: MoveAbort(MoveLocation { module: ModuleId { address: iota, name: Identifier("dynamic_field") }, function: 13, instruction: 0, function_name: Some("remove_child_object") }, 2), source: Some(VMError { major_status: ABORTED, sub_status: Some(2), message: None, exec_state: None, location: Module(ModuleId { address: iota, name: Identifier("dynamic_field") }), indices: [], offsets: [(FunctionDefinitionIndex(13), 0)] }), command: Some(0) } } diff --git a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/remove_wrong_type_object.move b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/remove_wrong_type_object.move index d7d015b0d92..7e1840b9f47 100644 --- a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/remove_wrong_type_object.move +++ b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/remove_wrong_type_object.move @@ -36,4 +36,4 @@ entry fun t2(obj: &mut Obj) { //# run a::m::t1 --sender A -//# run a::m::t2 --sender A --args object(2,0) +//# run a::m::t2 --sender A --args object(2,1) diff --git a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/shared_object.exp b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/shared_object.exp index a508c1c3c1a..22309b385d4 100644 --- a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/shared_object.exp +++ b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/shared_object.exp @@ -7,19 +7,19 @@ task 1, lines 9-73: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 9690000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9682400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 75: //# run test::m::parent --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2470000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2454800, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 77-79: //# run test::m::child --sender A created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2287600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2272400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 80: //# run test::m::add_field --sender A --args object(2,0) object(3,0) diff --git a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/transfer_object.exp b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/transfer_object.exp index f0e76edae2f..5006a5f0c92 100644 --- a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/transfer_object.exp +++ b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/transfer_object.exp @@ -7,52 +7,52 @@ task 1, lines 11-66: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 9317600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9310000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 68: //# run a::m::create --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2211600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2196400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 70: //# run a::m::create --sender A created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2211600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2196400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 72: //# run a::m::add_counter --sender A --args object(2,0) created: object(4,0), object(4,1) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 5981200, storage_rebate: 2211600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5950800, storage_rebate: 2196400, non_refundable_storage_fee: 0 task 5, line 74: //# run a::m::obj_bump --sender A --args object(2,0) mutated: object(0,0), object(2,0), object(4,0) -gas summary: computation_cost: 1000000, storage_cost: 3526400, storage_rebate: 3526400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3503600, storage_rebate: 3503600, non_refundable_storage_fee: 0 task 6, line 76: //# run a::m::assert_count --sender A --args object(2,0) 1 mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2211600, storage_rebate: 2211600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2196400, storage_rebate: 2196400, non_refundable_storage_fee: 0 task 7, line 78: //# run a::m::transfer --sender A --args object(2,0) object(3,0) created: object(7,0) mutated: object(0,0), object(2,0), object(3,0), object(4,0) deleted: object(4,1) -gas summary: computation_cost: 1000000, storage_cost: 7204800, storage_rebate: 7204800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7166800, storage_rebate: 7166800, non_refundable_storage_fee: 0 task 8, line 80: //# run a::m::obj_bump --sender A --args object(3,0) mutated: object(0,0), object(3,0), object(4,0) -gas summary: computation_cost: 1000000, storage_cost: 3526400, storage_rebate: 3526400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3503600, storage_rebate: 3503600, non_refundable_storage_fee: 0 task 9, line 82: //# run a::m::assert_count --sender A --args object(3,0) 2 mutated: object(0,0), object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 2211600, storage_rebate: 2211600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2196400, storage_rebate: 2196400, non_refundable_storage_fee: 0 task 10, line 84: //# run a::m::obj_bump --sender A --args object(2,0) diff --git a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/unwrap_object.exp b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/unwrap_object.exp index abae59b47a8..289b1be7a8d 100644 --- a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/unwrap_object.exp +++ b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/unwrap_object.exp @@ -7,13 +7,13 @@ task 1, lines 9-40: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 7478400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7470800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 42: //# run a::m::mint --sender A created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4157200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4134400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 44: //# run a::m::take_and_wrap --sender A --args object(2,0) @@ -21,7 +21,7 @@ created: object(3,1) mutated: object(0,0), object(2,0) unwrapped: object(3,0) deleted: object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 5890000, storage_rebate: 4157200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5859600, storage_rebate: 4134400, non_refundable_storage_fee: 0 task 4, line 46: //# view-object 3,0 @@ -39,27 +39,27 @@ task 5, line 49: //# run a::m::mint --sender A created: object(5,0), object(5,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4157200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4134400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, line 51: //# run a::m::take_and_destroy --sender A --args object(5,0) mutated: object(0,0), object(5,0) deleted: object(5,1) unwrapped_then_deleted: object(_) -gas summary: computation_cost: 1000000, storage_cost: 2211600, storage_rebate: 4157200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2196400, storage_rebate: 4134400, non_refundable_storage_fee: 0 task 7, line 54: //# run a::m::mint --sender A created: object(7,0), object(7,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4157200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4134400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, line 57: //# run a::m::take_and_take --sender A --args object(7,0) mutated: object(0,0), object(7,0) unwrapped: object(8,0) deleted: object(7,1) -gas summary: computation_cost: 1000000, storage_cost: 3435200, storage_rebate: 4157200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3412400, storage_rebate: 4134400, non_refundable_storage_fee: 0 task 9, line 59: //# view-object 7,0 diff --git a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/wrap_object.exp b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/wrap_object.exp index e61a06d5349..22bbf5e3ad4 100644 --- a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/wrap_object.exp +++ b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/wrap_object.exp @@ -7,43 +7,43 @@ task 1, lines 9-40: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 7478400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7470800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 42: //# run a::m::mint --sender A created: object(2,0), object(2,1), object(2,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5890000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5859600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 44: -//# view-object 2,1 +//# view-object 2,0 Owner: Object ID: ( fake(2,2) ) Version: 2 Contents: a::m::Obj { id: iota::object::UID { id: iota::object::ID { - bytes: fake(2,1), + bytes: fake(2,0), }, }, } task 4, line 46: -//# run a::m::take_and_wrap --sender A --args object(2,0) +//# run a::m::take_and_wrap --sender A --args object(2,1) created: object(4,0) -mutated: object(0,0), object(2,0) +mutated: object(0,0), object(2,1) deleted: object(2,2) -wrapped: object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 4157200, storage_rebate: 5890000, non_refundable_storage_fee: 0 +wrapped: object(2,0) +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4134400, storage_rebate: 5859600, non_refundable_storage_fee: 0 task 5, line 49: //# run a::m::mint --sender A created: object(5,0), object(5,1), object(5,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5890000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5859600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, line 51: //# view-object 5,2 -Owner: Object ID: ( fake(5,0) ) +Owner: Object ID: ( fake(5,1) ) Version: 4 Contents: iota::dynamic_field::Field, iota::object::ID> { id: iota::object::UID { @@ -55,21 +55,21 @@ Contents: iota::dynamic_field::Field, i name: 0u64, }, value: iota::object::ID { - bytes: fake(5,1), + bytes: fake(5,0), }, } task 7, line 53: -//# run a::m::take_and_destroy --sender A --args object(5,0) -mutated: object(0,0), object(5,0) -deleted: object(5,1), object(5,2) -gas summary: computation_cost: 1000000, storage_cost: 2211600, storage_rebate: 5890000, non_refundable_storage_fee: 0 +//# run a::m::take_and_destroy --sender A --args object(5,1) +mutated: object(0,0), object(5,1) +deleted: object(5,0), object(5,2) +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2196400, storage_rebate: 5859600, non_refundable_storage_fee: 0 task 8, line 56: //# run a::m::mint --sender A created: object(8,0), object(8,1), object(8,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5890000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5859600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 9, line 58: //# view-object 8,2 @@ -93,7 +93,7 @@ task 10, line 60: //# run a::m::take_and_take --sender A --args object(8,0) mutated: object(0,0), object(8,0), object(8,1) deleted: object(8,2) -gas summary: computation_cost: 1000000, storage_cost: 3435200, storage_rebate: 5890000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3412400, storage_rebate: 5859600, non_refundable_storage_fee: 0 task 11, line 62: //# view-object 8,2 diff --git a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/wrap_object.move b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/wrap_object.move index 8d7653cdb93..566b85b4217 100644 --- a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/wrap_object.move +++ b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/wrap_object.move @@ -41,16 +41,16 @@ entry fun take_and_take(obj: &mut Obj, ctx: &mut TxContext) { //# run a::m::mint --sender A -//# view-object 2,1 +//# view-object 2,0 -//# run a::m::take_and_wrap --sender A --args object(2,0) +//# run a::m::take_and_wrap --sender A --args object(2,1) //# run a::m::mint --sender A //# view-object 5,2 -//# run a::m::take_and_destroy --sender A --args object(5,0) +//# run a::m::take_and_destroy --sender A --args object(5,1) //# run a::m::mint --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/wrapped_uid_after_delete.exp b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/wrapped_uid_after_delete.exp index f3830351605..1f59da11f4e 100644 --- a/crates/iota-adapter-transactional-tests/tests/dynamic_fields/wrapped_uid_after_delete.exp +++ b/crates/iota-adapter-transactional-tests/tests/dynamic_fields/wrapped_uid_after_delete.exp @@ -7,31 +7,31 @@ task 1, lines 11-83: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 10229600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 10222000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 85: //# run a::m::t0 --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2211600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2196400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 87: //# run a::m::t1 --sender A --args object(2,0) created: object(3,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 4248400, storage_rebate: 2211600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4225600, storage_rebate: 2196400, non_refundable_storage_fee: 0 task 4, line 89: //# run a::m::t2 --sender A --args object(2,0) mutated: object(0,0), object(2,0), object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 4248400, storage_rebate: 4248400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4225600, storage_rebate: 4225600, non_refundable_storage_fee: 0 task 5, line 91: //# run a::m::t3 --sender A --args object(2,0) created: object(5,0) mutated: object(0,0) wrapped: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2485200, storage_rebate: 2211600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2470000, storage_rebate: 2196400, non_refundable_storage_fee: 0 task 6, line 93: //# view-object 3,0 @@ -57,14 +57,14 @@ Contents: iota::dynamic_field::Field { task 7, line 95: //# run a::m::t4 --sender A --args object(5,0) mutated: object(0,0), object(5,0) -gas summary: computation_cost: 1000000, storage_cost: 2485200, storage_rebate: 2485200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2470000, storage_rebate: 2470000, non_refundable_storage_fee: 0 task 8, line 97: //# run a::m::t5 --sender A --args object(5,0) mutated: object(0,0) deleted: object(5,0) unwrapped_then_deleted: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 2485200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 2470000, non_refundable_storage_fee: 0 task 9, line 99: //# view-object 3,0 diff --git a/crates/iota-adapter-transactional-tests/tests/entry_points/ascii.exp b/crates/iota-adapter-transactional-tests/tests/entry_points/ascii.exp index e9ad13fe574..8f2b0fd8ebe 100644 --- a/crates/iota-adapter-transactional-tests/tests/entry_points/ascii.exp +++ b/crates/iota-adapter-transactional-tests/tests/entry_points/ascii.exp @@ -7,22 +7,22 @@ task 1, lines 7-26: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 5745600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5738000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 28-31: //# run Test::M::ascii_arg --sender A --args b"SomeString" mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 33-36: //# run Test::M::ascii_arg --sender A --args "SomeString" mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, lines 38-46: //# run Test::M::ascii_vec_arg --sender A --args vector[b"Some",b"String"] mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 48: //# run Test::M::ascii_arg --sender A --args "Some∫tring" diff --git a/crates/iota-adapter-transactional-tests/tests/entry_points/generic_by_ref.exp b/crates/iota-adapter-transactional-tests/tests/entry_points/generic_by_ref.exp index bd31643cb6a..ff3edcbef06 100644 --- a/crates/iota-adapter-transactional-tests/tests/entry_points/generic_by_ref.exp +++ b/crates/iota-adapter-transactional-tests/tests/entry_points/generic_by_ref.exp @@ -7,4 +7,4 @@ task 1, lines 7-15: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 4149600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4142000, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/entry_points/imm_txn_context.exp b/crates/iota-adapter-transactional-tests/tests/entry_points/imm_txn_context.exp index c8e2949117a..fb5569ebe61 100644 --- a/crates/iota-adapter-transactional-tests/tests/entry_points/imm_txn_context.exp +++ b/crates/iota-adapter-transactional-tests/tests/entry_points/imm_txn_context.exp @@ -7,20 +7,20 @@ task 1, lines 7-28: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 6034400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6026800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 30: //# run Test::M::mint --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2272400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2257200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 32: //# run Test::M::set_to_epoch --sender A --args object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2272400, storage_rebate: 2272400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2257200, storage_rebate: 2257200, non_refundable_storage_fee: 0 task 4, line 34: //# run Test::M::check_is_epoch --sender A --args object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2272400, storage_rebate: 2272400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2257200, storage_rebate: 2257200, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/entry_points/large_enum.exp b/crates/iota-adapter-transactional-tests/tests/entry_points/large_enum.exp index 1471d956148..419d289ed14 100644 --- a/crates/iota-adapter-transactional-tests/tests/entry_points/large_enum.exp +++ b/crates/iota-adapter-transactional-tests/tests/entry_points/large_enum.exp @@ -7,13 +7,13 @@ task 1, lines 9-36: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 6452400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6444800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 38-39: //# programmable --sender A //> test::m::x1() mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 41-42: //# programmable --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/entry_points/missing_type.exp b/crates/iota-adapter-transactional-tests/tests/entry_points/missing_type.exp index bad8a0a26a9..9831a1e2e21 100644 --- a/crates/iota-adapter-transactional-tests/tests/entry_points/missing_type.exp +++ b/crates/iota-adapter-transactional-tests/tests/entry_points/missing_type.exp @@ -7,7 +7,7 @@ task 1, lines 9-16: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 3876000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3868400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 18: //# run test::m::foo --type-args test::x::x diff --git a/crates/iota-adapter-transactional-tests/tests/entry_points/no_txn_context.exp b/crates/iota-adapter-transactional-tests/tests/entry_points/no_txn_context.exp index fea5de209e4..925ac0f3421 100644 --- a/crates/iota-adapter-transactional-tests/tests/entry_points/no_txn_context.exp +++ b/crates/iota-adapter-transactional-tests/tests/entry_points/no_txn_context.exp @@ -7,15 +7,15 @@ task 1, lines 7-24: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 5494800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5487200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 26: //# run Test::M::mint --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2272400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2257200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 28: //# run Test::M::incr --sender A --args object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2272400, storage_rebate: 2272400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2257200, storage_rebate: 2257200, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/entry_points/obj_vector.exp b/crates/iota-adapter-transactional-tests/tests/entry_points/obj_vector.exp index 145d6e5138b..bdd7b92052f 100644 --- a/crates/iota-adapter-transactional-tests/tests/entry_points/obj_vector.exp +++ b/crates/iota-adapter-transactional-tests/tests/entry_points/obj_vector.exp @@ -7,36 +7,36 @@ task 1, lines 9-112: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 12646400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 12638800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 114: //# run Test::M::prim_vec_len --sender A --args vector[7,42] mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 116-120: //# run Test::M::mint --sender A --args 42 created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2272400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2257200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 122: //# run Test::M::obj_vec_destroy --sender A --args vector[object(3,0)] mutated: object(0,0) deleted: object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 2272400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 2257200, non_refundable_storage_fee: 0 task 5, line 124: //# run Test::M::mint --sender A --args 42 created: object(5,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2272400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2257200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, line 126: //# run Test::M::mint_child --sender A --args 42 object(5,0) created: object(6,0), object(6,1) mutated: object(0,0), object(5,0) -gas summary: computation_cost: 1000000, storage_cost: 6011600, storage_rebate: 2272400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5981200, storage_rebate: 2257200, non_refundable_storage_fee: 0 task 7, lines 128-132: //# run Test::M::child_access --sender A --args object(5,0) vector[object(6,0)] @@ -46,7 +46,7 @@ task 8, line 134: //# run Test::M::mint_another --sender A --args 42 created: object(8,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2325600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2310400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 9, lines 136-139: //# run Test::M::obj_vec_destroy --sender A --args vector[object(8,0)] @@ -57,13 +57,13 @@ task 10, line 141: //# run Test::M::mint_another --sender A --args 42 created: object(10,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2325600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2310400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 11, line 143: //# run Test::M::mint --sender A --args 42 created: object(11,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2272400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2257200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 12, lines 145-148: //# run Test::M::two_obj_vec_destroy --sender A --args vector[object(10,0),object(11,0)] @@ -74,19 +74,19 @@ task 13, line 150: //# run Test::M::mint_shared --sender A --args 42 created: object(13,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2272400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2257200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 14, lines 152-155: //# run Test::M::obj_vec_destroy --sender A --args vector[object(13,0)] mutated: object(0,0) deleted: object(13,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 2272400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 2257200, non_refundable_storage_fee: 0 task 15, line 157: //# run Test::M::mint --sender A --args 42 created: object(15,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2272400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2257200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 16, lines 159-162: //# run Test::M::same_objects --sender A --args object(15,0) vector[object(15,0)] @@ -97,7 +97,7 @@ task 17, line 164: //# run Test::M::mint --sender A --args 42 created: object(17,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2272400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2257200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 18, line 166: //# run Test::M::same_objects_ref --sender A --args object(17,0) vector[object(17,0)] diff --git a/crates/iota-adapter-transactional-tests/tests/entry_points/obj_vector_generic.exp b/crates/iota-adapter-transactional-tests/tests/entry_points/obj_vector_generic.exp index ab91515cef8..43efb87fcc9 100644 --- a/crates/iota-adapter-transactional-tests/tests/entry_points/obj_vector_generic.exp +++ b/crates/iota-adapter-transactional-tests/tests/entry_points/obj_vector_generic.exp @@ -7,31 +7,31 @@ task 1, lines 9-111: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 13452000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 13444400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 113: //# run Test::M::mint_any --sender A --type-args Test::M::Any --args 42 created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2599200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2584000, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 115-119: //# run Test::M::obj_vec_destroy_any --sender A --type-args Test::M::Any --args vector[object(2,0)] mutated: object(0,0) deleted: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 2599200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 2584000, non_refundable_storage_fee: 0 task 4, line 121: //# run Test::M::mint_any --sender A --type-args Test::M::Any --args 42 created: object(4,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2599200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2584000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 123: //# run Test::M::mint_child_any --sender A --type-args Test::M::Any --args 42 object(4,0) created: object(5,0), object(5,1) mutated: object(0,0), object(4,0) -gas summary: computation_cost: 1000000, storage_cost: 6665200, storage_rebate: 2599200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6634800, storage_rebate: 2584000, non_refundable_storage_fee: 0 task 6, lines 125-129: //# run Test::M::child_access_any --sender A --type-args Test::M::Any --args object(4,0) vector[object(5,0)] @@ -41,7 +41,7 @@ task 7, line 131: //# run Test::M::mint_another_any --type-args Test::M::Any --sender A --args 42 created: object(7,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2652400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2637200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, lines 133-136: //# run Test::M::obj_vec_destroy_any --sender A --type-args Test::M::Any --args vector[object(7,0)] @@ -52,13 +52,13 @@ task 9, line 138: //# run Test::M::mint_another_any --sender A --type-args Test::M::Any --args 42 created: object(9,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2652400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2637200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 10, line 140: //# run Test::M::mint_any --sender A --type-args Test::M::Any --args 42 created: object(10,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2599200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2584000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 11, lines 142-145: //# run Test::M::two_obj_vec_destroy_any --sender A --type-args Test::M::Any --args vector[object(9,0),object(10,0)] @@ -69,19 +69,19 @@ task 12, line 147: //# run Test::M::mint_shared_any --sender A --type-args Test::M::Any --args 42 created: object(12,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2599200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2584000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 13, lines 149-152: //# run Test::M::obj_vec_destroy_any --sender A --type-args Test::M::Any --args vector[object(12,0)] mutated: object(0,0) deleted: object(12,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 2599200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 2584000, non_refundable_storage_fee: 0 task 14, line 154: //# run Test::M::mint_any --sender A --type-args Test::M::Any --args 42 created: object(14,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2599200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2584000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 15, lines 156-159: //# run Test::M::same_objects_any --sender A --type-args Test::M::Any --args object(14,0) vector[object(14,0)] @@ -92,7 +92,7 @@ task 16, line 161: //# run Test::M::mint_any --sender A --type-args Test::M::Any --args 42 created: object(16,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2599200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2584000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 17, line 163: //# run Test::M::same_objects_ref_any --sender A --type-args Test::M::Any --args object(16,0) vector[object(16,0)] diff --git a/crates/iota-adapter-transactional-tests/tests/entry_points/utf8.exp b/crates/iota-adapter-transactional-tests/tests/entry_points/utf8.exp index e142604a413..504337d1d9c 100644 --- a/crates/iota-adapter-transactional-tests/tests/entry_points/utf8.exp +++ b/crates/iota-adapter-transactional-tests/tests/entry_points/utf8.exp @@ -7,34 +7,34 @@ task 1, lines 7-25: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 6011600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6004000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 27-30: //# run Test::M::utf8_arg --sender A --args b"SomeStringPlusSomeString" mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 32-35: //# run Test::M::utf8_arg --sender A --args "SomeStringPlusSomeString" mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, lines 37-40: //# run Test::M::utf8_arg --sender A --args "çå∞≠¢õß∂ƒ∫" mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, lines 42-45: //# run Test::M::utf8_vec_arg --sender A --args vector[b"SomeStringPlus",b"SomeString"] mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, lines 47-50: //# run Test::M::utf8_vec_arg --sender A --args vector["SomeStringPlus","SomeString"] mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, line 52: //# run Test::M::utf8_vec_arg --sender A --args vector["çå∞≠¢","õß∂ƒ∫"] mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/entry_points/wrong_visibility.exp b/crates/iota-adapter-transactional-tests/tests/entry_points/wrong_visibility.exp index 3a58b1dfe1c..62367cffacf 100644 --- a/crates/iota-adapter-transactional-tests/tests/entry_points/wrong_visibility.exp +++ b/crates/iota-adapter-transactional-tests/tests/entry_points/wrong_visibility.exp @@ -4,7 +4,7 @@ task 1, lines 9-27: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4522000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4514400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 29: //# run Test::M::t2 diff --git a/crates/iota-adapter-transactional-tests/tests/enums/basic_enums.exp b/crates/iota-adapter-transactional-tests/tests/enums/basic_enums.exp index 3b79770c48a..ec22bef8e74 100644 --- a/crates/iota-adapter-transactional-tests/tests/enums/basic_enums.exp +++ b/crates/iota-adapter-transactional-tests/tests/enums/basic_enums.exp @@ -4,13 +4,13 @@ task 1, lines 7-32: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6262400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6254800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 34: //# run Test::f::create_and_test created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 36: //# view-object 2,0 @@ -28,7 +28,7 @@ Contents: Test::f::S { task 4, line 38: //# run Test::f::update_inner --args object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2264800, storage_rebate: 2204000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2249600, storage_rebate: 2188800, non_refundable_storage_fee: 0 task 5, line 40: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/enums/coin_wrapper.exp b/crates/iota-adapter-transactional-tests/tests/enums/coin_wrapper.exp index 609c220f509..a30896e3952 100644 --- a/crates/iota-adapter-transactional-tests/tests/enums/coin_wrapper.exp +++ b/crates/iota-adapter-transactional-tests/tests/enums/coin_wrapper.exp @@ -7,7 +7,7 @@ task 1, lines 7-49: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 9522800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9507600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 51-53: //# programmable --sender A --inputs 10 @A @@ -15,4 +15,4 @@ task 2, lines 51-53: //> 1: TransferObjects([Result(0)], Input(1)) created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2576400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2561200, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/enums/enum_events.exp b/crates/iota-adapter-transactional-tests/tests/enums/enum_events.exp index e13962c9e74..56339b89eaf 100644 --- a/crates/iota-adapter-transactional-tests/tests/enums/enum_events.exp +++ b/crates/iota-adapter-transactional-tests/tests/enums/enum_events.exp @@ -4,28 +4,28 @@ task 1, lines 7-33: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5213600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5206000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 35: //# run Test::f::f1 events: Event { package_id: Test, transaction_module: Identifier("f"), sender: _, type_: StructTag { address: Test, module: Identifier("f"), name: Identifier("F"), type_params: [] }, contents: [0] } mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 37: //# run Test::f::f2 --args 42 events: Event { package_id: Test, transaction_module: Identifier("f"), sender: _, type_: StructTag { address: Test, module: Identifier("f"), name: Identifier("F"), type_params: [] }, contents: [1, 42, 0, 0, 0, 0, 0, 0, 0] } mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 39: //# run Test::f::f3 --args 42 43 events: Event { package_id: Test, transaction_module: Identifier("f"), sender: _, type_: StructTag { address: Test, module: Identifier("f"), name: Identifier("F"), type_params: [] }, contents: [2, 42, 0, 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, 0, 0, 0] } mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 41: //# run Test::f::f4 --args 42 events: Event { package_id: Test, transaction_module: Identifier("f"), sender: _, type_: StructTag { address: Test, module: Identifier("f"), name: Identifier("F"), type_params: [] }, contents: [3, 42, 0, 0, 0, 0, 0, 0, 0] } mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/enums/enum_otw_check.exp b/crates/iota-adapter-transactional-tests/tests/enums/enum_otw_check.exp index 9388846ace5..29fe5f38db7 100644 --- a/crates/iota-adapter-transactional-tests/tests/enums/enum_otw_check.exp +++ b/crates/iota-adapter-transactional-tests/tests/enums/enum_otw_check.exp @@ -4,9 +4,9 @@ task 1, lines 7-16: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4636000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4628400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 18: //# run Test::f::test mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/enums/enums_upgrade.exp b/crates/iota-adapter-transactional-tests/tests/enums/enums_upgrade.exp index f84f75ceb3a..17c11d9182b 100644 --- a/crates/iota-adapter-transactional-tests/tests/enums/enums_upgrade.exp +++ b/crates/iota-adapter-transactional-tests/tests/enums/enums_upgrade.exp @@ -7,13 +7,13 @@ task 1, lines 7-32: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 7896400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7881200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 34: //# run Test::f::create_and_test created: object(2,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 36: //# view-object 2,0 @@ -31,7 +31,7 @@ Contents: Test::f::S { task 4, line 38: //# run Test::f::update_inner --args object(2,0) mutated: object(0,1), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2264800, storage_rebate: 2204000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2249600, storage_rebate: 2188800, non_refundable_storage_fee: 0 task 5, line 40: //# view-object 2,0 @@ -52,7 +52,7 @@ task 6, lines 42-71: //# upgrade --package Test --upgrade-capability 1,1 --sender A created: object(6,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 8314400, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8299200, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 7, line 73: //# view-object 2,0 @@ -72,7 +72,7 @@ Contents: fake(1,0)::f::S { task 8, line 75: //# run Test::f::update_inner2 --args object(2,0) mutated: object(0,1), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2325600, storage_rebate: 2264800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2310400, storage_rebate: 2249600, non_refundable_storage_fee: 0 task 9, line 77: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/enums/enums_upgrade_add_variant.exp b/crates/iota-adapter-transactional-tests/tests/enums/enums_upgrade_add_variant.exp index d6760edf428..d7c5a2459aa 100644 --- a/crates/iota-adapter-transactional-tests/tests/enums/enums_upgrade_add_variant.exp +++ b/crates/iota-adapter-transactional-tests/tests/enums/enums_upgrade_add_variant.exp @@ -7,13 +7,13 @@ task 1, lines 7-32: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 7896400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7881200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 34: //# run Test::f::create_and_test created: object(2,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 36: //# view-object 2,0 @@ -31,7 +31,7 @@ Contents: Test::f::S { task 4, line 38: //# run Test::f::update_inner --args object(2,0) mutated: object(0,1), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2264800, storage_rebate: 2204000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2249600, storage_rebate: 2188800, non_refundable_storage_fee: 0 task 5, line 40: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/epoch/advance.exp b/crates/iota-adapter-transactional-tests/tests/epoch/advance.exp index fdf88981b3e..5405b2a67a0 100644 --- a/crates/iota-adapter-transactional-tests/tests/epoch/advance.exp +++ b/crates/iota-adapter-transactional-tests/tests/epoch/advance.exp @@ -4,18 +4,18 @@ task 1, lines 7-25: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5639200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5631600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 27: //# run test::m::create created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2257200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2242000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 29: //# run test::m::check --args object(2,0) 0 mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2257200, storage_rebate: 2257200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2242000, storage_rebate: 2242000, non_refundable_storage_fee: 0 task 4, line 31: //# advance-epoch @@ -24,4 +24,4 @@ Epoch advanced: 1 task 5, line 33: //# run test::m::check --args object(2,0) 1 mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2257200, storage_rebate: 2257200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2242000, storage_rebate: 2242000, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/iota/coin_in_vec.exp b/crates/iota-adapter-transactional-tests/tests/iota/coin_in_vec.exp index 1f9089e3e0f..c6d97f93885 100644 --- a/crates/iota-adapter-transactional-tests/tests/iota/coin_in_vec.exp +++ b/crates/iota-adapter-transactional-tests/tests/iota/coin_in_vec.exp @@ -7,7 +7,7 @@ task 1, lines 7-29: //# publish --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 7942000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7926800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 31-33: //# programmable --sender A --inputs 10 @A @@ -15,16 +15,16 @@ task 2, lines 31-33: //> TransferObjects([Result(0)], Input(1)) created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 35: //# run test::coin_in_vec::deposit --args object(1,0) object(2,0) --sender A mutated: object(0,0), object(1,0) wrapped: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2629600, storage_rebate: 3313600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2614400, storage_rebate: 3290800, non_refundable_storage_fee: 0 task 4, line 37: //# run test::coin_in_vec::withdraw --args object(1,0) --sender A mutated: object(0,0), object(1,0) unwrapped: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 3313600, storage_rebate: 2629600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3290800, storage_rebate: 2614400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/iota/coin_transfer.exp b/crates/iota-adapter-transactional-tests/tests/iota/coin_transfer.exp index 0ce2a0963b2..86bca4c693a 100644 --- a/crates/iota-adapter-transactional-tests/tests/iota/coin_transfer.exp +++ b/crates/iota-adapter-transactional-tests/tests/iota/coin_transfer.exp @@ -9,7 +9,7 @@ task 1, lines 9-11: //> TransferObjects([Result(0)], Input(1)) created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 13: //# view-object 1,0 @@ -30,7 +30,7 @@ task 3, line 15: //# run iota::pay::split_and_transfer --type-args iota::iota::IOTA --args object(1,0) 10 @A --sender B created: object(3,0) mutated: object(0,1), object(1,0) -gas summary: computation_cost: 1000000, storage_cost: 2964000, storage_rebate: 1976000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2941200, storage_rebate: 1960800, non_refundable_storage_fee: 0 task 4, line 17: //# view-object 1,0 diff --git a/crates/iota-adapter-transactional-tests/tests/iota/freeze.exp b/crates/iota-adapter-transactional-tests/tests/iota/freeze.exp index 30aad20b89f..ad3a71863c6 100644 --- a/crates/iota-adapter-transactional-tests/tests/iota/freeze.exp +++ b/crates/iota-adapter-transactional-tests/tests/iota/freeze.exp @@ -7,18 +7,18 @@ task 1, lines 9-68: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 9317600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9310000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 70: //# run test::object_basics::create --args 10 @A --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2386400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2371200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 72: //# run test::object_basics::freeze_object --args object(2,0) --sender A mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2386400, storage_rebate: 2386400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2371200, storage_rebate: 2371200, non_refundable_storage_fee: 0 task 4, line 74: //# run test::object_basics::transfer_ --args object(2,0) @A --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/iota/move_call_args_type_mismatch.exp b/crates/iota-adapter-transactional-tests/tests/iota/move_call_args_type_mismatch.exp index 3872e67bc39..7487b32c42d 100644 --- a/crates/iota-adapter-transactional-tests/tests/iota/move_call_args_type_mismatch.exp +++ b/crates/iota-adapter-transactional-tests/tests/iota/move_call_args_type_mismatch.exp @@ -4,7 +4,7 @@ task 1, lines 7-14: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3412400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 15-17: //# run Test::M::create --args 10 diff --git a/crates/iota-adapter-transactional-tests/tests/iota/move_call_incorrect_function.exp b/crates/iota-adapter-transactional-tests/tests/iota/move_call_incorrect_function.exp index c1bc455a465..fcd1fbc5fc9 100644 --- a/crates/iota-adapter-transactional-tests/tests/iota/move_call_incorrect_function.exp +++ b/crates/iota-adapter-transactional-tests/tests/iota/move_call_incorrect_function.exp @@ -4,7 +4,7 @@ task 1, lines 9-16: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3412400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 17-19: //# run 0x242::M::create diff --git a/crates/iota-adapter-transactional-tests/tests/iota/object_basics.exp b/crates/iota-adapter-transactional-tests/tests/iota/object_basics.exp index 11022c84d95..191478c012b 100644 --- a/crates/iota-adapter-transactional-tests/tests/iota/object_basics.exp +++ b/crates/iota-adapter-transactional-tests/tests/iota/object_basics.exp @@ -7,13 +7,13 @@ task 1, lines 9-68: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 9317600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9310000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 70: //# run test::object_basics::create --sender A --args 10 @A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2386400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2371200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 72: //# view-object 2,0 @@ -31,7 +31,7 @@ Contents: test::object_basics::Object { task 4, line 74: //# run test::object_basics::transfer_ --sender A --args object(2,0) @B mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2386400, storage_rebate: 2386400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2371200, storage_rebate: 2371200, non_refundable_storage_fee: 0 task 5, line 76: //# view-object 2,0 @@ -50,16 +50,16 @@ task 6, line 78: //# run test::object_basics::create --sender B --args 20 @B created: object(6,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2386400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2371200, storage_rebate: 0, non_refundable_storage_fee: 0 task 7, line 80: //# run test::object_basics::update --sender B --args object(2,0) object(6,0) events: Event { package_id: test, transaction_module: Identifier("object_basics"), sender: B, type_: StructTag { address: test, module: Identifier("object_basics"), name: Identifier("NewValueEvent"), type_params: [] }, contents: [20, 0, 0, 0, 0, 0, 0, 0] } mutated: object(0,1), object(2,0), object(6,0) -gas summary: computation_cost: 1000000, storage_cost: 3784800, storage_rebate: 3784800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3762000, storage_rebate: 3762000, non_refundable_storage_fee: 0 task 8, line 82: //# run test::object_basics::delete --sender B --args object(2,0) mutated: object(0,1) deleted: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 2386400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 2371200, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/iota/unwrap.exp b/crates/iota-adapter-transactional-tests/tests/iota/unwrap.exp index b1452b394dd..4b6c84372e5 100644 --- a/crates/iota-adapter-transactional-tests/tests/iota/unwrap.exp +++ b/crates/iota-adapter-transactional-tests/tests/iota/unwrap.exp @@ -7,13 +7,13 @@ task 1, lines 10-69: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 9150400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9142800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 71: //# run test::object_basics::create --args 10 @A created: object(2,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2386400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2371200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 73: //# view-object 2,0 @@ -33,14 +33,14 @@ task 4, line 75: created: object(4,0) mutated: object(0,0) wrapped: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2637200, storage_rebate: 1398400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2622000, storage_rebate: 1390800, non_refundable_storage_fee: 0 task 5, line 77: //# run test::object_basics::unwrap --args object(4,0) --sender A mutated: object(0,0) unwrapped: object(2,0) deleted: object(4,0) -gas summary: computation_cost: 1000000, storage_cost: 2386400, storage_rebate: 2637200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2371200, storage_rebate: 2622000, non_refundable_storage_fee: 0 task 6, line 79: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/iota/unwrap_then_delete.exp b/crates/iota-adapter-transactional-tests/tests/iota/unwrap_then_delete.exp index cabb5c5b4da..d6f71a05e3e 100644 --- a/crates/iota-adapter-transactional-tests/tests/iota/unwrap_then_delete.exp +++ b/crates/iota-adapter-transactional-tests/tests/iota/unwrap_then_delete.exp @@ -7,37 +7,37 @@ task 1, lines 15-62: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 7516400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7508800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 64: //# run test::object_basics::create --args 10 created: object(2,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2386400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2371200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 66: //# run test::object_basics::wrap --args object(2,0) created: object(3,0) mutated: object(0,1) wrapped: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2637200, storage_rebate: 2386400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2622000, storage_rebate: 2371200, non_refundable_storage_fee: 0 task 4, line 68: //# run test::object_basics::unwrap_and_delete --args object(3,0) mutated: object(0,1) deleted: object(3,0) unwrapped_then_deleted: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 2637200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 2622000, non_refundable_storage_fee: 0 task 5, line 70: //# run test::object_basics::create_and_wrap --args 10 created: object(5,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2637200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2622000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, line 72: //# run test::object_basics::unwrap_and_delete --args object(5,0) mutated: object(0,1) deleted: object(5,0) unwrapped_then_deleted: object(_) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 2637200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 2622000, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/iota/unwrap_then_freeze.exp b/crates/iota-adapter-transactional-tests/tests/iota/unwrap_then_freeze.exp index c1ccc148f9e..31e26d65910 100644 --- a/crates/iota-adapter-transactional-tests/tests/iota/unwrap_then_freeze.exp +++ b/crates/iota-adapter-transactional-tests/tests/iota/unwrap_then_freeze.exp @@ -7,13 +7,13 @@ task 1, lines 10-39: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 6946400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6938800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 41: //# run test::object_basics::create --args 10 @A created: object(2,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2386400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2371200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 43: //# view-object 2,0 @@ -33,14 +33,14 @@ task 4, line 45: created: object(4,0) mutated: object(0,0) wrapped: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2637200, storage_rebate: 1398400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2622000, storage_rebate: 1390800, non_refundable_storage_fee: 0 task 5, line 47: //# run test::object_basics::unwrap_and_freeze --args object(4,0) --sender A mutated: object(0,0) unwrapped: object(2,0) deleted: object(4,0) -gas summary: computation_cost: 1000000, storage_cost: 2386400, storage_rebate: 2637200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2371200, storage_rebate: 2622000, non_refundable_storage_fee: 0 task 6, line 49: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/child_of_child.exp b/crates/iota-adapter-transactional-tests/tests/mvcc/child_of_child.exp index 6be3b2877e4..b727a793a40 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/child_of_child.exp +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/child_of_child.exp @@ -7,7 +7,7 @@ task 1, lines 9-67: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 9218800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9211200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 69-71: //# programmable --sender A --inputs @A @@ -15,93 +15,93 @@ task 2, lines 69-71: //> TransferObjects([Result(0)], Input(0)) created: object(2,0), object(2,1), object(2,2), object(2,3), object(2,4) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 9750800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9705200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 73: -//# view-object 2,4 +//# view-object 2,3 Owner: Account Address ( A ) Version: 2 Contents: test::m::Obj { id: iota::object::UID { id: iota::object::ID { - bytes: fake(2,4), + bytes: fake(2,3), }, }, value: 0u64, } task 4, lines 75-76: -//# programmable --sender A --inputs object(2,4) 1 2 3 +//# programmable --sender A --inputs object(2,3) 1 2 3 //> test::m::set(Input(0), Input(1), Input(2), Input(3)) mutated: object(0,0), object(2,2), object(2,3), object(2,4) -gas summary: computation_cost: 1000000, storage_cost: 4841200, storage_rebate: 4841200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4810800, storage_rebate: 4810800, non_refundable_storage_fee: 0 task 5, line 78: -//# view-object 2,4 +//# view-object 2,3 Owner: Account Address ( A ) Version: 3 Contents: test::m::Obj { id: iota::object::UID { id: iota::object::ID { - bytes: fake(2,4), + bytes: fake(2,3), }, }, value: 1u64, } task 6, lines 80-81: -//# programmable --sender A --inputs object(2,4) +//# programmable --sender A --inputs object(2,3) //> test::m::remove(Input(0)) -mutated: object(0,0), object(2,4) -deleted: object(2,1), object(2,3) -gas summary: computation_cost: 1000000, storage_cost: 2272400, storage_rebate: 6011600, non_refundable_storage_fee: 0 +mutated: object(0,0), object(2,3) +deleted: object(2,0), object(2,2) +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2257200, storage_rebate: 5981200, non_refundable_storage_fee: 0 task 7, lines 83-86: -//# view-object 2,4 +//# view-object 2,3 Owner: Account Address ( A ) Version: 4 Contents: test::m::Obj { id: iota::object::UID { id: iota::object::ID { - bytes: fake(2,4), + bytes: fake(2,3), }, }, value: 1u64, } task 8, lines 88-89: -//# programmable --sender A --inputs object(2,4)@2 0 0 vector[0] --dev-inspect +//# programmable --sender A --inputs object(2,3)@2 0 0 vector[0] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) -mutated: object(_), object(2,4) -gas summary: computation_cost: 500000, storage_cost: 2272400, storage_rebate: 1284400, non_refundable_storage_fee: 0 +mutated: object(_), object(2,3) +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2257200, storage_rebate: 1276800, non_refundable_storage_fee: 0 task 9, lines 91-92: -//# programmable --sender A --inputs object(2,4)@3 1 2 vector[3] --dev-inspect +//# programmable --sender A --inputs object(2,3)@3 1 2 vector[3] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) -mutated: object(_), object(2,4) -gas summary: computation_cost: 500000, storage_cost: 2272400, storage_rebate: 1284400, non_refundable_storage_fee: 0 +mutated: object(_), object(2,3) +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2257200, storage_rebate: 1276800, non_refundable_storage_fee: 0 task 10, lines 94-98: -//# programmable --sender A --inputs object(2,4)@4 1 2 vector[] --dev-inspect +//# programmable --sender A --inputs object(2,3)@4 1 2 vector[] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) // dev-inspect with 'check' and _incorrect_ values -mutated: object(_), object(2,4) -gas summary: computation_cost: 500000, storage_cost: 2272400, storage_rebate: 1284400, non_refundable_storage_fee: 0 +mutated: object(_), object(2,3) +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2257200, storage_rebate: 1276800, non_refundable_storage_fee: 0 task 11, lines 100-101: -//# programmable --sender A --inputs object(2,4)@3 0 0 vector[0] --dev-inspect +//# programmable --sender A --inputs object(2,3)@3 0 0 vector[0] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) Error: Transaction Effects Status: MoveAbort(MoveLocation { module: ModuleId { address: test, name: Identifier("m") }, function: 3, instruction: 10, function_name: Some("check") }, 0) in command 0 Execution Error: MoveAbort(MoveLocation { module: ModuleId { address: test, name: Identifier("m") }, function: 3, instruction: 10, function_name: Some("check") }, 0) in command 0 task 12, lines 103-104: -//# programmable --sender A --inputs object(2,4)@4 1 2 vector[3] --dev-inspect +//# programmable --sender A --inputs object(2,3)@4 1 2 vector[3] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) Error: Transaction Effects Status: MoveAbort(MoveLocation { module: ModuleId { address: iota, name: Identifier("dynamic_field") }, function: 11, instruction: 0, function_name: Some("borrow_child_object") }, 1) in command 0 Execution Error: MoveAbort(MoveLocation { module: ModuleId { address: iota, name: Identifier("dynamic_field") }, function: 11, instruction: 0, function_name: Some("borrow_child_object") }, 1) in command 0 task 13, lines 106-107: -//# programmable --sender A --inputs object(2,4)@2 1 2 vector[] --dev-inspect +//# programmable --sender A --inputs object(2,3)@2 1 2 vector[] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) Error: Transaction Effects Status: MoveAbort(MoveLocation { module: ModuleId { address: test, name: Identifier("m") }, function: 3, instruction: 10, function_name: Some("check") }, 0) in command 0 Execution Error: MoveAbort(MoveLocation { module: ModuleId { address: test, name: Identifier("m") }, function: 3, instruction: 10, function_name: Some("check") }, 0) in command 0 diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/child_of_child.move b/crates/iota-adapter-transactional-tests/tests/mvcc/child_of_child.move index a4c9b1f3696..dabaf08b5af 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/child_of_child.move +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/child_of_child.move @@ -70,38 +70,38 @@ module test::m { //> 0: test::m::new(); //> TransferObjects([Result(0)], Input(0)) -//# view-object 2,4 +//# view-object 2,3 -//# programmable --sender A --inputs object(2,4) 1 2 3 +//# programmable --sender A --inputs object(2,3) 1 2 3 //> test::m::set(Input(0), Input(1), Input(2), Input(3)) -//# view-object 2,4 +//# view-object 2,3 -//# programmable --sender A --inputs object(2,4) +//# programmable --sender A --inputs object(2,3) //> test::m::remove(Input(0)) -//# view-object 2,4 +//# view-object 2,3 // dev-inspect with 'check' and correct values -//# programmable --sender A --inputs object(2,4)@2 0 0 vector[0] --dev-inspect +//# programmable --sender A --inputs object(2,3)@2 0 0 vector[0] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) -//# programmable --sender A --inputs object(2,4)@3 1 2 vector[3] --dev-inspect +//# programmable --sender A --inputs object(2,3)@3 1 2 vector[3] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) -//# programmable --sender A --inputs object(2,4)@4 1 2 vector[] --dev-inspect +//# programmable --sender A --inputs object(2,3)@4 1 2 vector[] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) // dev-inspect with 'check' and _incorrect_ values -//# programmable --sender A --inputs object(2,4)@3 0 0 vector[0] --dev-inspect +//# programmable --sender A --inputs object(2,3)@3 0 0 vector[0] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) -//# programmable --sender A --inputs object(2,4)@4 1 2 vector[3] --dev-inspect +//# programmable --sender A --inputs object(2,3)@4 1 2 vector[3] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) -//# programmable --sender A --inputs object(2,4)@2 1 2 vector[] --dev-inspect +//# programmable --sender A --inputs object(2,3)@2 1 2 vector[] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids.exp b/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids.exp index adc294dbbc0..769370a75b7 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids.exp +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids.exp @@ -7,7 +7,7 @@ task 1, lines 9-118: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 12205600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 12198000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 120-122: //# programmable --sender A --inputs @A @@ -15,7 +15,7 @@ task 2, lines 120-122: //> TransferObjects([Result(0)], Input(0)) created: object(2,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7), object(2,8) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 15640800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 15564800, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 124: //# view-object 2,8 @@ -76,7 +76,7 @@ task 4, lines 126-127: //# programmable --sender A --inputs object(2,8) 112 //> test::m::set(Input(0), Input(1)) mutated: object(0,0), object(2,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7), object(2,8) -gas summary: computation_cost: 1000000, storage_cost: 15640800, storage_rebate: 15640800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 15564800, storage_rebate: 15564800, non_refundable_storage_fee: 0 task 5, line 129: //# view-object 2,8 @@ -138,7 +138,7 @@ task 6, lines 131-132: //> test::m::remove(Input(0)) mutated: object(0,0), object(2,8) deleted: object(2,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7) -gas summary: computation_cost: 1000000, storage_cost: 3906400, storage_rebate: 15640800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3891200, storage_rebate: 15564800, non_refundable_storage_fee: 0 task 7, lines 134-137: //# view-object 2,8 @@ -199,20 +199,20 @@ task 8, lines 139-140: //# programmable --sender A --inputs object(2,8)@2 vector[0] --dev-inspect //> test::m::check(Input(0), Input(1)) mutated: object(_), object(2,8) -gas summary: computation_cost: 500000, storage_cost: 3906400, storage_rebate: 2918400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0 task 9, lines 142-143: //# programmable --sender A --inputs object(2,8)@3 vector[112] --dev-inspect //> test::m::check(Input(0), Input(1)) mutated: object(_), object(2,8) -gas summary: computation_cost: 500000, storage_cost: 3906400, storage_rebate: 2918400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0 task 10, lines 145-149: //# programmable --sender A --inputs object(2,8)@4 vector[] --dev-inspect //> test::m::check(Input(0), Input(1)) // dev-inspect with 'check' and _incorrect_ values mutated: object(_), object(2,8) -gas summary: computation_cost: 500000, storage_cost: 3906400, storage_rebate: 2918400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0 task 11, lines 151-152: //# programmable --sender A --inputs object(2,8)@3 vector[0] --dev-inspect diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids_dof.exp b/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids_dof.exp index b00c36b8044..caacd932772 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids_dof.exp +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids_dof.exp @@ -7,7 +7,7 @@ task 1, lines 9-131: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 13353200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 13345600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 133-135: //# programmable --sender A --inputs @A @@ -15,7 +15,7 @@ task 2, lines 133-135: //> TransferObjects([Result(0)], Input(0)) created: object(2,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7), object(2,8), object(2,9), object(2,10), object(2,11), object(2,12), object(2,13), object(2,14), object(2,15), object(2,16) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 33941600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 33804800, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 137: //# view-object 2,8 @@ -76,7 +76,7 @@ task 4, lines 139-140: //# programmable --sender A --inputs object(2,8) 112 //> test::m::set(Input(0), Input(1)) mutated: object(0,0), object(2,8), object(2,9), object(2,10), object(2,11), object(2,12), object(2,13), object(2,14), object(2,15), object(2,16) -gas summary: computation_cost: 1000000, storage_cost: 14303200, storage_rebate: 14303200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 14227200, storage_rebate: 14227200, non_refundable_storage_fee: 0 task 5, line 142: //# view-object 2,8 @@ -138,7 +138,7 @@ task 6, lines 144-145: //> test::m::remove(Input(0)) mutated: object(0,0), object(2,8) deleted: object(2,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7), object(2,9), object(2,10), object(2,11), object(2,12), object(2,13), object(2,14), object(2,15), object(2,16) -gas summary: computation_cost: 1000000, storage_cost: 3906400, storage_rebate: 33941600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3891200, storage_rebate: 33804800, non_refundable_storage_fee: 0 task 7, lines 147-150: //# view-object 2,8 @@ -199,20 +199,20 @@ task 8, lines 152-153: //# programmable --sender A --inputs object(2,8)@2 vector[0] --dev-inspect //> test::m::check(Input(0), Input(1)) mutated: object(_), object(2,8) -gas summary: computation_cost: 500000, storage_cost: 3906400, storage_rebate: 2918400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0 task 9, lines 155-156: //# programmable --sender A --inputs object(2,8)@3 vector[112] --dev-inspect //> test::m::check(Input(0), Input(1)) mutated: object(_), object(2,8) -gas summary: computation_cost: 500000, storage_cost: 3906400, storage_rebate: 2918400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0 task 10, lines 158-162: //# programmable --sender A --inputs object(2,8)@4 vector[] --dev-inspect //> test::m::check(Input(0), Input(1)) // dev-inspect with 'check' and _incorrect_ values mutated: object(_), object(2,8) -gas summary: computation_cost: 500000, storage_cost: 3906400, storage_rebate: 2918400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0 task 11, lines 164-165: //# programmable --sender A --inputs object(2,8)@3 vector[0] --dev-inspect diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids_dof_enum.exp b/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids_dof_enum.exp index 76d2678ef20..cb7a207a5e7 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids_dof_enum.exp +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids_dof_enum.exp @@ -7,7 +7,7 @@ task 1, lines 9-168: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 18164000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 18156400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 170-172: //# programmable --sender A --inputs @A @@ -15,7 +15,7 @@ task 2, lines 170-172: //> TransferObjects([Result(0)], Input(0)) created: object(2,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7), object(2,8), object(2,9), object(2,10), object(2,11), object(2,12), object(2,13), object(2,14), object(2,15), object(2,16) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 34002400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 33865600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 174: //# view-object 2,8 @@ -92,7 +92,7 @@ task 4, lines 176-177: //# programmable --sender A --inputs object(2,8) 112 //> test::m::set(Input(0), Input(1)) mutated: object(0,0), object(2,8), object(2,9), object(2,10), object(2,11), object(2,12), object(2,13), object(2,14), object(2,15), object(2,16) -gas summary: computation_cost: 1000000, storage_cost: 14364000, storage_rebate: 14364000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 14288000, storage_rebate: 14288000, non_refundable_storage_fee: 0 task 5, line 179: //# view-object 2,8 @@ -170,7 +170,7 @@ task 6, lines 181-182: //> test::m::remove(Input(0)) mutated: object(0,0), object(2,8) deleted: object(2,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7), object(2,9), object(2,10), object(2,11), object(2,12), object(2,13), object(2,14), object(2,15), object(2,16) -gas summary: computation_cost: 1000000, storage_cost: 3967200, storage_rebate: 34002400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3952000, storage_rebate: 33865600, non_refundable_storage_fee: 0 task 7, lines 184-186: //# view-object 2,8 @@ -247,13 +247,13 @@ task 8, lines 188-189: //# programmable --sender A --inputs object(2,8)@2 vector[0] --dev-inspect //> test::m::check(Input(0), Input(1)) mutated: object(_), object(2,8) -gas summary: computation_cost: 500000, storage_cost: 3967200, storage_rebate: 2979200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3952000, storage_rebate: 2971600, non_refundable_storage_fee: 0 task 9, lines 191-192: //# programmable --sender A --inputs object(2,8)@3 vector[112] --dev-inspect //> test::m::check(Input(0), Input(1)) mutated: object(_), object(2,8) -gas summary: computation_cost: 500000, storage_cost: 3967200, storage_rebate: 2979200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3952000, storage_rebate: 2971600, non_refundable_storage_fee: 0 task 10, lines 194-199: //# programmable --sender A --inputs object(2,8)@4 vector[] --dev-inspect @@ -261,7 +261,7 @@ task 10, lines 194-199: // dev-inspect with 'check' and _incorrect_ values // Should fail since the field exists but with a different field. mutated: object(_), object(2,8) -gas summary: computation_cost: 500000, storage_cost: 3967200, storage_rebate: 2979200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3952000, storage_rebate: 2971600, non_refundable_storage_fee: 0 task 11, lines 200-203: //# programmable --sender A --inputs object(2,8)@3 vector[0] --dev-inspect diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids_enums.exp b/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids_enums.exp index cc92ac553b4..8cef8c023e7 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids_enums.exp +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids_enums.exp @@ -7,7 +7,7 @@ task 1, lines 9-135: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 14136000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 14128400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 137-139: //# programmable --sender A --inputs @A @@ -15,7 +15,7 @@ task 2, lines 137-139: //> TransferObjects([Result(0)], Input(0)) created: object(2,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7), object(2,8) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 15671200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 15595200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 141: //# view-object 2,8 @@ -84,7 +84,7 @@ task 4, lines 143-144: //# programmable --sender A --inputs object(2,8) 112 //> test::m::set(Input(0), Input(1)) mutated: object(0,0), object(2,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7), object(2,8) -gas summary: computation_cost: 1000000, storage_cost: 15671200, storage_rebate: 15671200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 15595200, storage_rebate: 15595200, non_refundable_storage_fee: 0 task 5, line 146: //# view-object 2,8 @@ -154,7 +154,7 @@ task 6, lines 148-149: //> test::m::remove(Input(0)) mutated: object(0,0), object(2,8) deleted: object(2,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7) -gas summary: computation_cost: 1000000, storage_cost: 3936800, storage_rebate: 15671200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3921600, storage_rebate: 15595200, non_refundable_storage_fee: 0 task 7, lines 151-153: //# view-object 2,8 @@ -223,13 +223,13 @@ task 8, lines 155-156: //# programmable --sender A --inputs object(2,8)@2 vector[0] --dev-inspect //> test::m::check(Input(0), Input(1)) mutated: object(_), object(2,8) -gas summary: computation_cost: 500000, storage_cost: 3936800, storage_rebate: 2948800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3921600, storage_rebate: 2941200, non_refundable_storage_fee: 0 task 9, lines 158-159: //# programmable --sender A --inputs object(2,8)@3 vector[112] --dev-inspect //> test::m::check(Input(0), Input(1)) mutated: object(_), object(2,8) -gas summary: computation_cost: 500000, storage_cost: 3936800, storage_rebate: 2948800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3921600, storage_rebate: 2941200, non_refundable_storage_fee: 0 task 10, lines 161-166: //# programmable --sender A --inputs object(2,8)@4 vector[] --dev-inspect @@ -237,7 +237,7 @@ task 10, lines 161-166: // dev-inspect with 'check' and _incorrect_ values // Should fail since the field exists but with a different field. mutated: object(_), object(2,8) -gas summary: computation_cost: 500000, storage_cost: 3936800, storage_rebate: 2948800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3921600, storage_rebate: 2941200, non_refundable_storage_fee: 0 task 11, lines 167-170: //# programmable --sender A --inputs object(2,8)@3 vector[0] --dev-inspect diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids_on_child.exp b/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids_on_child.exp index a5cec26d5a3..9eab2950c78 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids_on_child.exp +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids_on_child.exp @@ -7,7 +7,7 @@ task 1, lines 9-141: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 13862400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 13854800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 143-145: //# programmable --sender A --inputs @A @@ -15,7 +15,7 @@ task 2, lines 143-145: //> TransferObjects([Result(0)], Input(0)) created: object(2,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7), object(2,8), object(2,9) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 17609200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 17525600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 147: //# view-object 2,9 @@ -33,7 +33,7 @@ task 4, lines 149-150: //# programmable --sender A --inputs object(2,9) 112 //> test::m::set(Input(0), Input(1)) mutated: object(0,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7), object(2,8), object(2,9) -gas summary: computation_cost: 1000000, storage_cost: 13968800, storage_rebate: 13968800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 13892800, storage_rebate: 13892800, non_refundable_storage_fee: 0 task 5, line 152: //# view-object 2,9 @@ -52,7 +52,7 @@ task 6, lines 154-155: //> test::m::remove(Input(0)) mutated: object(0,0), object(2,9) deleted: object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7), object(2,8) -gas summary: computation_cost: 1000000, storage_cost: 2234400, storage_rebate: 13968800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2219200, storage_rebate: 13892800, non_refundable_storage_fee: 0 task 7, lines 157-160: //# view-object 2,9 @@ -70,20 +70,20 @@ task 8, lines 162-163: //# programmable --sender A --inputs object(2,9)@2 vector[0] --dev-inspect //> test::m::check(Input(0), Input(1)) mutated: object(_), object(2,9) -gas summary: computation_cost: 500000, storage_cost: 2234400, storage_rebate: 1246400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2219200, storage_rebate: 1238800, non_refundable_storage_fee: 0 task 9, lines 165-166: //# programmable --sender A --inputs object(2,9)@3 vector[112] --dev-inspect //> test::m::check(Input(0), Input(1)) mutated: object(_), object(2,9) -gas summary: computation_cost: 500000, storage_cost: 2234400, storage_rebate: 1246400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2219200, storage_rebate: 1238800, non_refundable_storage_fee: 0 task 10, lines 168-172: //# programmable --sender A --inputs object(2,9)@4 vector[] --dev-inspect //> test::m::check(Input(0), Input(1)) // dev-inspect with 'check' and _incorrect_ values mutated: object(_), object(2,9) -gas summary: computation_cost: 500000, storage_cost: 2234400, storage_rebate: 1246400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2219200, storage_rebate: 1238800, non_refundable_storage_fee: 0 task 11, lines 174-175: //# programmable --sender A --inputs object(2,9)@3 vector[0] --dev-inspect diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids_on_child_enum.exp b/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids_on_child_enum.exp index f85c838e4b3..4f39932b4b1 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids_on_child_enum.exp +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids_on_child_enum.exp @@ -7,7 +7,7 @@ task 1, lines 9-220: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 20869600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 20862000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 222-224: //# programmable --sender A --inputs @A @@ -15,7 +15,7 @@ task 2, lines 222-224: //> TransferObjects([Result(0)], Input(0)) created: object(2,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7), object(2,8), object(2,9) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 17654800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 17571200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 226: //# view-object 2,9 @@ -33,7 +33,7 @@ task 4, lines 228-229: //# programmable --sender A --inputs object(2,9) 112 //> test::m::set(Input(0), Input(1)) mutated: object(0,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7), object(2,8), object(2,9) -gas summary: computation_cost: 1000000, storage_cost: 13968800, storage_rebate: 13968800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 13892800, storage_rebate: 13892800, non_refundable_storage_fee: 0 task 5, line 231: //# view-object 2,9 @@ -52,7 +52,7 @@ task 6, lines 233-234: //> test::m::remove(Input(0)) mutated: object(0,0), object(2,9) deleted: object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7), object(2,8) -gas summary: computation_cost: 1000000, storage_cost: 2234400, storage_rebate: 13968800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2219200, storage_rebate: 13892800, non_refundable_storage_fee: 0 task 7, lines 236-239: //# view-object 2,9 @@ -70,13 +70,13 @@ task 8, lines 241-242: //# programmable --sender A --inputs object(2,9)@2 vector[0] --dev-inspect //> test::m::check(Input(0), Input(1)) mutated: object(_), object(2,9) -gas summary: computation_cost: 500000, storage_cost: 2234400, storage_rebate: 1246400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2219200, storage_rebate: 1238800, non_refundable_storage_fee: 0 task 9, lines 244-245: //# programmable --sender A --inputs object(2,9)@3 vector[112] --dev-inspect //> test::m::check(Input(0), Input(1)) mutated: object(_), object(2,9) -gas summary: computation_cost: 500000, storage_cost: 2234400, storage_rebate: 1246400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2219200, storage_rebate: 1238800, non_refundable_storage_fee: 0 task 10, lines 247-252: //# programmable --sender A --inputs object(2,9)@4 vector[] --dev-inspect @@ -84,7 +84,7 @@ task 10, lines 247-252: // dev-inspect with 'check' and _incorrect_ values // Should fail since the field exists but with a different field. mutated: object(_), object(2,9) -gas summary: computation_cost: 500000, storage_cost: 2234400, storage_rebate: 1246400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2219200, storage_rebate: 1238800, non_refundable_storage_fee: 0 task 11, lines 253-256: //# programmable --sender A --inputs object(2,9)@3 vector[0] --dev-inspect diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/middle_version_less_than_child.exp b/crates/iota-adapter-transactional-tests/tests/mvcc/middle_version_less_than_child.exp index 5f0f7f88a1a..7253324d428 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/middle_version_less_than_child.exp +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/middle_version_less_than_child.exp @@ -7,7 +7,7 @@ task 1, lines 9-52: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 7493600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7486000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 54-58: //# programmable --sender A --inputs @A @@ -16,7 +16,7 @@ task 2, lines 54-58: // All 3 objects have version 2 created: object(2,0), object(2,1), object(2,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6285200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6254800, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 60: //# view-object 2,0 @@ -78,7 +78,7 @@ task 6, lines 66-69: //> test::m::set(Input(0), Input(1)) // The middle object has version 2, while the root and modified leaf have version 3 mutated: object(0,0), object(2,1), object(2,2) -gas summary: computation_cost: 1000000, storage_cost: 4278800, storage_rebate: 4278800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4256000, storage_rebate: 4256000, non_refundable_storage_fee: 0 task 7, line 71: //# view-object 2,0 @@ -139,4 +139,4 @@ task 10, lines 80-81: //# programmable --sender A --inputs object(2,2) 112 //> test::m::check(Input(0), Input(1)) mutated: object(0,0), object(2,2) -gas summary: computation_cost: 1000000, storage_cost: 2272400, storage_rebate: 2272400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2257200, storage_rebate: 2257200, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/middle_version_less_than_child_enum.exp b/crates/iota-adapter-transactional-tests/tests/mvcc/middle_version_less_than_child_enum.exp index 8dc108e9ba6..66fdff391d9 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/middle_version_less_than_child_enum.exp +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/middle_version_less_than_child_enum.exp @@ -7,7 +7,7 @@ task 1, lines 9-77: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 9317600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9310000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 79-83: //# programmable --sender A --inputs @A @@ -16,7 +16,7 @@ task 2, lines 79-83: // All 3 objects have version 2 created: object(2,0), object(2,1), object(2,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6315600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6285200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 85: //# view-object 2,0 @@ -78,7 +78,7 @@ task 6, lines 91-94: //> test::m::set(Input(0), Input(1)) // The middle object has version 2, while the root and modified leaf have version 3 mutated: object(0,0), object(2,0), object(2,2) -gas summary: computation_cost: 1000000, storage_cost: 4294000, storage_rebate: 4294000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4271200, storage_rebate: 4271200, non_refundable_storage_fee: 0 task 7, line 96: //# view-object 2,0 @@ -139,4 +139,4 @@ task 10, lines 105-106: //# programmable --sender A --inputs object(2,2) 112 //> test::m::check(Input(0), Input(1)) mutated: object(0,0), object(2,2) -gas summary: computation_cost: 1000000, storage_cost: 2272400, storage_rebate: 2272400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2257200, storage_rebate: 2257200, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/not_root_version.exp b/crates/iota-adapter-transactional-tests/tests/mvcc/not_root_version.exp index 45d93579fec..ab76edcf5b8 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/not_root_version.exp +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/not_root_version.exp @@ -7,7 +7,7 @@ task 1, lines 9-54: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 7432800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7425200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 56-58: //# programmable --sender P1 --inputs @P1 @@ -15,19 +15,19 @@ task 2, lines 56-58: //> TransferObjects([Result(0)], Input(0)) created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 60-61: //# programmable --sender P1 --inputs object(2,0) //> test::m::nop(); mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 2181200, non_refundable_storage_fee: 0 task 4, lines 63-64: //# programmable --sender P1 --inputs object(2,0) //> test::m::nop(); mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 2181200, non_refundable_storage_fee: 0 task 5, lines 66-69: //# view-object 2,0 @@ -47,7 +47,7 @@ task 6, lines 71-73: //> TransferObjects([Result(0)], Input(0)) created: object(6,0), object(6,1) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 3663200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3640400, storage_rebate: 0, non_refundable_storage_fee: 0 task 7, line 75: //# view-object 6,0 @@ -67,7 +67,7 @@ task 8, lines 77-78: //# programmable --sender P2 --inputs object(6,1) //> 0: test::m::bump(Input(0)); mutated: object(0,1), object(6,0), object(6,1) -gas summary: computation_cost: 1000000, storage_cost: 3663200, storage_rebate: 3663200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3640400, storage_rebate: 3640400, non_refundable_storage_fee: 0 task 9, lines 80-84: //# view-object 6,0 @@ -92,7 +92,7 @@ task 10, lines 86-91: created: object(10,0) mutated: object(_), object(2,0) wrapped: object(6,1) -gas summary: computation_cost: 500000, storage_cost: 4126800, storage_rebate: 2416800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 4104000, storage_rebate: 2401600, non_refundable_storage_fee: 0 task 11, lines 93-97: //# programmable --sender P2 --inputs object(2,0)@4 object(6,1)@3 1 --dev-inspect @@ -102,7 +102,7 @@ task 11, lines 93-97: created: object(10,0) mutated: object(_), object(2,0) wrapped: object(6,1) -gas summary: computation_cost: 500000, storage_cost: 4126800, storage_rebate: 2416800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 4104000, storage_rebate: 2401600, non_refundable_storage_fee: 0 task 12, lines 99-103: //# programmable --sender P2 --inputs object(2,0)@4 object(6,1)@2 1 --dev-inspect diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/not_root_version_flipped_case.exp b/crates/iota-adapter-transactional-tests/tests/mvcc/not_root_version_flipped_case.exp index be4131d3a43..a3f16edc70b 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/not_root_version_flipped_case.exp +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/not_root_version_flipped_case.exp @@ -7,7 +7,7 @@ task 1, lines 9-54: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 7432800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7425200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 56-58: //# programmable --sender P1 --inputs @P1 @@ -15,7 +15,7 @@ task 2, lines 56-58: //> TransferObjects([Result(0)], Input(0)) created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 61-64: //# view-object 2,0 @@ -35,7 +35,7 @@ task 4, lines 66-68: //> TransferObjects([Result(0)], Input(0)) created: object(4,0), object(4,1) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 3663200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3640400, storage_rebate: 0, non_refundable_storage_fee: 0 task 5, line 70: //# view-object 4,0 @@ -55,7 +55,7 @@ task 6, lines 72-73: //# programmable --sender P2 --inputs object(4,1) //> 0: test::m::bump(Input(0)); mutated: object(0,1), object(4,0), object(4,1) -gas summary: computation_cost: 1000000, storage_cost: 3663200, storage_rebate: 3663200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3640400, storage_rebate: 3640400, non_refundable_storage_fee: 0 task 7, lines 75-78: //# view-object 4,0 @@ -80,7 +80,7 @@ task 8, lines 80-85: created: object(8,0) mutated: object(_), object(2,0) wrapped: object(4,1) -gas summary: computation_cost: 500000, storage_cost: 4126800, storage_rebate: 2416800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 4104000, storage_rebate: 2401600, non_refundable_storage_fee: 0 task 9, lines 87-91: //# programmable --sender P2 --inputs object(2,0)@2 object(4,1)@2 0 --dev-inspect @@ -90,7 +90,7 @@ task 9, lines 87-91: created: object(8,0) mutated: object(_), object(2,0) wrapped: object(4,1) -gas summary: computation_cost: 500000, storage_cost: 4126800, storage_rebate: 2416800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 4104000, storage_rebate: 2401600, non_refundable_storage_fee: 0 task 10, lines 93-97: //# programmable --sender P2 --inputs object(2,0)@2 object(4,1)@2 1 --dev-inspect diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_access_through_parent_df.exp b/crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_access_through_parent_df.exp index 7b855db372a..ec55bd38427 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_access_through_parent_df.exp +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_access_through_parent_df.exp @@ -7,13 +7,13 @@ task 1, lines 7-77: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 12524800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 12517200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 79: //# run tto::M1::start --sender A created: object(2,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 15298800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 15230400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 81: //# view-object 2,0 @@ -29,7 +29,7 @@ Contents: iota::dynamic_field::Field, i name: 1u64, }, value: iota::object::ID { - bytes: fake(2,4), + bytes: fake(2,5), }, } @@ -103,7 +103,7 @@ Contents: iota::dynamic_field::Field { task 6, line 87: //# view-object 2,3 -Owner: Object ID: ( fake(2,5) ) +Owner: Object ID: ( fake(2,4) ) Version: 2 Contents: iota::dynamic_field::Field { id: iota::object::UID { @@ -132,7 +132,7 @@ Contents: iota::dynamic_field::Field { task 7, line 89: //# view-object 2,4 -Owner: Object ID: ( fake(2,0) ) +Owner: Account Address ( fake(2,6) ) Version: 2 Contents: tto::M1::A { id: iota::object::UID { @@ -143,27 +143,18 @@ Contents: tto::M1::A { value: vector[ 98u8, 95u8, - 99u8, - 104u8, - 105u8, - 108u8, - 100u8, - 95u8, - 99u8, - 104u8, - 105u8, - 108u8, - 100u8, - 95u8, - 100u8, - 111u8, - 102u8, + 112u8, + 97u8, + 114u8, + 101u8, + 110u8, + 116u8, ], } task 8, line 91: //# view-object 2,5 -Owner: Account Address ( fake(2,6) ) +Owner: Object ID: ( fake(2,0) ) Version: 2 Contents: tto::M1::A { id: iota::object::UID { @@ -174,12 +165,21 @@ Contents: tto::M1::A { value: vector[ 98u8, 95u8, - 112u8, - 97u8, - 114u8, - 101u8, - 110u8, - 116u8, + 99u8, + 104u8, + 105u8, + 108u8, + 100u8, + 95u8, + 99u8, + 104u8, + 105u8, + 108u8, + 100u8, + 95u8, + 100u8, + 111u8, + 102u8, ], } @@ -239,15 +239,15 @@ Error: Transaction Effects Status: Move Runtime Abort. Location: iota::transfer: Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: MoveAbort(MoveLocation { module: ModuleId { address: iota, name: Identifier("transfer") }, function: 12, instruction: 0, function_name: Some("receive_impl") }, 2), source: Some(VMError { major_status: ABORTED, sub_status: Some(2), message: None, exec_state: None, location: Module(ModuleId { address: iota, name: Identifier("transfer") }), indices: [], offsets: [(FunctionDefinitionIndex(12), 0)] }), command: Some(0) } } task 12, line 101: -//# run tto::M1::receive_b_parent --args object(2,6) receiving(2,5) --sender A +//# run tto::M1::receive_b_parent --args object(2,6) receiving(2,4) --sender A created: object(12,0) mutated: object(0,0), object(2,6) -wrapped: object(2,5) -gas summary: computation_cost: 1000000, storage_cost: 4278800, storage_rebate: 3556800, non_refundable_storage_fee: 0 +wrapped: object(2,4) +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4256000, storage_rebate: 3534000, non_refundable_storage_fee: 0 task 13, line 103: //# run tto::M1::receive_wrapped --args object(2,6) receiving(2,7) --sender A created: object(13,0) mutated: object(0,0), object(2,6) wrapped: object(2,7) -gas summary: computation_cost: 1000000, storage_cost: 4856400, storage_rebate: 4134400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4833600, storage_rebate: 4111600, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_access_through_parent_df.move b/crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_access_through_parent_df.move index c80f4ca6243..4f2a13dac29 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_access_through_parent_df.move +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_access_through_parent_df.move @@ -98,6 +98,6 @@ module tto::M1 { // Try to load an invalid type that will cause indexing to fail. //# run tto::M1::receive_b_parent --args object(2,6) receiving(2,7) --sender A -//# run tto::M1::receive_b_parent --args object(2,6) receiving(2,5) --sender A +//# run tto::M1::receive_b_parent --args object(2,6) receiving(2,4) --sender A //# run tto::M1::receive_wrapped --args object(2,6) receiving(2,7) --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_access_through_parent_dof.exp b/crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_access_through_parent_dof.exp index 204b9e90947..c81c0c36930 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_access_through_parent_dof.exp +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_access_through_parent_dof.exp @@ -7,17 +7,17 @@ task 1, lines 7-77: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 12509600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 12502000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 79: //# run tto::M1::start --sender A created: object(2,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7), object(2,8), object(2,9) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 18749200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 18665600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 81: //# view-object 2,0 -Owner: Object ID: ( fake(2,6) ) +Owner: Object ID: ( fake(2,5) ) Version: 2 Contents: iota::dynamic_field::Field, iota::object::ID> { id: iota::object::UID { @@ -35,7 +35,7 @@ Contents: iota::dynamic_field::Field, i task 4, line 83: //# view-object 2,1 -Owner: Object ID: ( fake(2,7) ) +Owner: Object ID: ( fake(2,4) ) Version: 2 Contents: iota::dynamic_field::Field, iota::object::ID> { id: iota::object::UID { @@ -47,7 +47,7 @@ Contents: iota::dynamic_field::Field, i name: 0u64, }, value: iota::object::ID { - bytes: fake(2,6), + bytes: fake(2,8), }, } @@ -65,13 +65,13 @@ Contents: iota::dynamic_field::Field, i name: 0u64, }, value: iota::object::ID { - bytes: fake(2,5), + bytes: fake(2,6), }, } task 6, line 87: //# view-object 2,3 -Owner: Object ID: ( fake(2,6) ) +Owner: Object ID: ( fake(2,4) ) Version: 2 Contents: iota::dynamic_field::Field { id: iota::object::UID { @@ -125,18 +125,12 @@ Contents: tto::M1::A { 105u8, 108u8, 100u8, - 95u8, - 99u8, - 104u8, - 105u8, - 108u8, - 100u8, ], } task 8, line 91: //# view-object 2,5 -Owner: Object ID: ( fake(2,2) ) +Owner: Account Address ( fake(2,7) ) Version: 2 Contents: tto::M1::A { id: iota::object::UID { @@ -145,22 +139,20 @@ Contents: tto::M1::A { }, }, value: vector[ - 119u8, - 114u8, - 97u8, - 112u8, + 98u8, + 95u8, 112u8, + 97u8, + 114u8, 101u8, - 100u8, - 95u8, - 100u8, - 102u8, + 110u8, + 116u8, ], } task 9, line 93: //# view-object 2,6 -Owner: Object ID: ( fake(2,1) ) +Owner: Object ID: ( fake(2,2) ) Version: 2 Contents: tto::M1::A { id: iota::object::UID { @@ -169,19 +161,22 @@ Contents: tto::M1::A { }, }, value: vector[ - 98u8, + 119u8, + 114u8, + 97u8, + 112u8, + 112u8, + 101u8, + 100u8, 95u8, - 99u8, - 104u8, - 105u8, - 108u8, 100u8, + 102u8, ], } task 10, line 95: //# view-object 2,7 -Owner: Account Address ( fake(2,8) ) +Owner: Account Address ( A ) Version: 2 Contents: tto::M1::A { id: iota::object::UID { @@ -190,7 +185,7 @@ Contents: tto::M1::A { }, }, value: vector[ - 98u8, + 97u8, 95u8, 112u8, 97u8, @@ -203,7 +198,7 @@ Contents: tto::M1::A { task 11, line 97: //# view-object 2,8 -Owner: Account Address ( A ) +Owner: Object ID: ( fake(2,1) ) Version: 2 Contents: tto::M1::A { id: iota::object::UID { @@ -212,20 +207,25 @@ Contents: tto::M1::A { }, }, value: vector[ - 97u8, + 98u8, 95u8, - 112u8, - 97u8, - 114u8, - 101u8, - 110u8, - 116u8, + 99u8, + 104u8, + 105u8, + 108u8, + 100u8, + 95u8, + 99u8, + 104u8, + 105u8, + 108u8, + 100u8, ], } task 12, lines 99-102: //# view-object 2,9 -Owner: Account Address ( fake(2,8) ) +Owner: Account Address ( fake(2,7) ) Version: 2 Contents: tto::M1::Wrapper { id: iota::object::UID { @@ -252,18 +252,18 @@ Contents: tto::M1::Wrapper { } task 13, line 103: -//# run tto::M1::receive_b_parent --args object(2,8) receiving(2,9) --sender A +//# run tto::M1::receive_b_parent --args object(2,7) receiving(2,9) --sender A Error: Transaction Effects Status: Move Runtime Abort. Location: iota::transfer::receive_impl (function index 12) at offset 0, Abort Code: 2 Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: MoveAbort(MoveLocation { module: ModuleId { address: iota, name: Identifier("transfer") }, function: 12, instruction: 0, function_name: Some("receive_impl") }, 2), source: Some(VMError { major_status: ABORTED, sub_status: Some(2), message: None, exec_state: None, location: Module(ModuleId { address: iota, name: Identifier("transfer") }), indices: [], offsets: [(FunctionDefinitionIndex(12), 0)] }), command: Some(0) } } task 14, line 105: -//# run tto::M1::receive_b_parent --args object(2,8) receiving(2,7) --sender A +//# run tto::M1::receive_b_parent --args object(2,7) receiving(2,5) --sender A created: object(14,0) -mutated: object(0,0), object(2,7), object(2,8) -gas summary: computation_cost: 1000000, storage_cost: 6011600, storage_rebate: 3556800, non_refundable_storage_fee: 0 +mutated: object(0,0), object(2,5), object(2,7) +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5981200, storage_rebate: 3534000, non_refundable_storage_fee: 0 task 15, line 107: -//# run tto::M1::receive_wrapped --args object(2,8) receiving(2,9) --sender A +//# run tto::M1::receive_wrapped --args object(2,7) receiving(2,9) --sender A created: object(15,0) -mutated: object(0,0), object(2,8), object(2,9) -gas summary: computation_cost: 1000000, storage_cost: 6589200, storage_rebate: 4134400, non_refundable_storage_fee: 0 +mutated: object(0,0), object(2,7), object(2,9) +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6558800, storage_rebate: 4111600, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_access_through_parent_dof.move b/crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_access_through_parent_dof.move index 41310ce2f8c..a01ade0e295 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_access_through_parent_dof.move +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_access_through_parent_dof.move @@ -100,8 +100,8 @@ module tto::M1 { // E_OBJECT_TYPE_MISMATCH // Try to load an invalid type that will cause indexing to fail. -//# run tto::M1::receive_b_parent --args object(2,8) receiving(2,9) --sender A +//# run tto::M1::receive_b_parent --args object(2,7) receiving(2,9) --sender A -//# run tto::M1::receive_b_parent --args object(2,8) receiving(2,7) --sender A +//# run tto::M1::receive_b_parent --args object(2,7) receiving(2,5) --sender A -//# run tto::M1::receive_wrapped --args object(2,8) receiving(2,9) --sender A +//# run tto::M1::receive_wrapped --args object(2,7) receiving(2,9) --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_dof.exp b/crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_dof.exp index e2ef2263c2a..2ba476cb445 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_dof.exp +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_dof.exp @@ -7,13 +7,13 @@ task 1, lines 7-59: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 10533600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 10526000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 61: //# run tto::M1::start --sender A created: object(2,0), object(2,1), object(2,2), object(2,3) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 7273200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7235200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 63: //# view-object 2,0 @@ -76,7 +76,7 @@ task 7, line 71: //# run tto::M1::receive --args object(2,2) receiving(2,3) --sender A created: object(7,0) mutated: object(0,0), object(2,2), object(2,3) -gas summary: computation_cost: 1000000, storage_cost: 5996400, storage_rebate: 3541600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5966000, storage_rebate: 3518800, non_refundable_storage_fee: 0 task 8, lines 73-75: //# view-object 2,0 @@ -139,7 +139,7 @@ task 12, lines 82-83: //# programmable --sender A --inputs object(2,2) 1 2 3 //> tto::M1::set(Input(0), Input(1), Input(2), Input(3)) mutated: object(0,0), object(2,1), object(2,2), object(2,3) -gas summary: computation_cost: 1000000, storage_cost: 4818400, storage_rebate: 4818400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4788000, storage_rebate: 4788000, non_refundable_storage_fee: 0 task 13, lines 85-87: //# view-object 2,0 @@ -204,26 +204,26 @@ task 17, lines 94-97: // dev-inspect with 'check' and correct values mutated: object(0,0), object(2,2) deleted: object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 2264800, storage_rebate: 5996400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2249600, storage_rebate: 5966000, non_refundable_storage_fee: 0 task 18, lines 99-100: //# programmable --sender A --inputs object(2,2)@3 0 0 vector[0] --dev-inspect //> tto::M1::check(Input(0), Input(1), Input(2), Input(3)) mutated: object(_), object(2,2) -gas summary: computation_cost: 500000, storage_cost: 2264800, storage_rebate: 1276800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2249600, storage_rebate: 1269200, non_refundable_storage_fee: 0 task 19, lines 102-103: //# programmable --sender A --inputs object(2,2)@4 1 2 vector[3] --dev-inspect //> tto::M1::check(Input(0), Input(1), Input(2), Input(3)) mutated: object(_), object(2,2) -gas summary: computation_cost: 500000, storage_cost: 2264800, storage_rebate: 1276800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2249600, storage_rebate: 1269200, non_refundable_storage_fee: 0 task 20, lines 105-108: //# programmable --sender A --inputs object(2,2)@5 1 2 vector[] --dev-inspect //> tto::M1::check(Input(0), Input(1), Input(2), Input(3)) // dev-inspect with 'check' and _incorrect_ values mutated: object(_), object(2,2) -gas summary: computation_cost: 500000, storage_cost: 2264800, storage_rebate: 1276800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2249600, storage_rebate: 1269200, non_refundable_storage_fee: 0 task 21, lines 110-111: //# programmable --sender A --inputs object(2,2)@4 0 0 vector[0] --dev-inspect diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/v0/child_of_child.exp b/crates/iota-adapter-transactional-tests/tests/mvcc/v0/child_of_child.exp index 6be3b2877e4..b727a793a40 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/v0/child_of_child.exp +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/v0/child_of_child.exp @@ -7,7 +7,7 @@ task 1, lines 9-67: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 9218800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9211200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 69-71: //# programmable --sender A --inputs @A @@ -15,93 +15,93 @@ task 2, lines 69-71: //> TransferObjects([Result(0)], Input(0)) created: object(2,0), object(2,1), object(2,2), object(2,3), object(2,4) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 9750800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9705200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 73: -//# view-object 2,4 +//# view-object 2,3 Owner: Account Address ( A ) Version: 2 Contents: test::m::Obj { id: iota::object::UID { id: iota::object::ID { - bytes: fake(2,4), + bytes: fake(2,3), }, }, value: 0u64, } task 4, lines 75-76: -//# programmable --sender A --inputs object(2,4) 1 2 3 +//# programmable --sender A --inputs object(2,3) 1 2 3 //> test::m::set(Input(0), Input(1), Input(2), Input(3)) mutated: object(0,0), object(2,2), object(2,3), object(2,4) -gas summary: computation_cost: 1000000, storage_cost: 4841200, storage_rebate: 4841200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4810800, storage_rebate: 4810800, non_refundable_storage_fee: 0 task 5, line 78: -//# view-object 2,4 +//# view-object 2,3 Owner: Account Address ( A ) Version: 3 Contents: test::m::Obj { id: iota::object::UID { id: iota::object::ID { - bytes: fake(2,4), + bytes: fake(2,3), }, }, value: 1u64, } task 6, lines 80-81: -//# programmable --sender A --inputs object(2,4) +//# programmable --sender A --inputs object(2,3) //> test::m::remove(Input(0)) -mutated: object(0,0), object(2,4) -deleted: object(2,1), object(2,3) -gas summary: computation_cost: 1000000, storage_cost: 2272400, storage_rebate: 6011600, non_refundable_storage_fee: 0 +mutated: object(0,0), object(2,3) +deleted: object(2,0), object(2,2) +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2257200, storage_rebate: 5981200, non_refundable_storage_fee: 0 task 7, lines 83-86: -//# view-object 2,4 +//# view-object 2,3 Owner: Account Address ( A ) Version: 4 Contents: test::m::Obj { id: iota::object::UID { id: iota::object::ID { - bytes: fake(2,4), + bytes: fake(2,3), }, }, value: 1u64, } task 8, lines 88-89: -//# programmable --sender A --inputs object(2,4)@2 0 0 vector[0] --dev-inspect +//# programmable --sender A --inputs object(2,3)@2 0 0 vector[0] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) -mutated: object(_), object(2,4) -gas summary: computation_cost: 500000, storage_cost: 2272400, storage_rebate: 1284400, non_refundable_storage_fee: 0 +mutated: object(_), object(2,3) +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2257200, storage_rebate: 1276800, non_refundable_storage_fee: 0 task 9, lines 91-92: -//# programmable --sender A --inputs object(2,4)@3 1 2 vector[3] --dev-inspect +//# programmable --sender A --inputs object(2,3)@3 1 2 vector[3] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) -mutated: object(_), object(2,4) -gas summary: computation_cost: 500000, storage_cost: 2272400, storage_rebate: 1284400, non_refundable_storage_fee: 0 +mutated: object(_), object(2,3) +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2257200, storage_rebate: 1276800, non_refundable_storage_fee: 0 task 10, lines 94-98: -//# programmable --sender A --inputs object(2,4)@4 1 2 vector[] --dev-inspect +//# programmable --sender A --inputs object(2,3)@4 1 2 vector[] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) // dev-inspect with 'check' and _incorrect_ values -mutated: object(_), object(2,4) -gas summary: computation_cost: 500000, storage_cost: 2272400, storage_rebate: 1284400, non_refundable_storage_fee: 0 +mutated: object(_), object(2,3) +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2257200, storage_rebate: 1276800, non_refundable_storage_fee: 0 task 11, lines 100-101: -//# programmable --sender A --inputs object(2,4)@3 0 0 vector[0] --dev-inspect +//# programmable --sender A --inputs object(2,3)@3 0 0 vector[0] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) Error: Transaction Effects Status: MoveAbort(MoveLocation { module: ModuleId { address: test, name: Identifier("m") }, function: 3, instruction: 10, function_name: Some("check") }, 0) in command 0 Execution Error: MoveAbort(MoveLocation { module: ModuleId { address: test, name: Identifier("m") }, function: 3, instruction: 10, function_name: Some("check") }, 0) in command 0 task 12, lines 103-104: -//# programmable --sender A --inputs object(2,4)@4 1 2 vector[3] --dev-inspect +//# programmable --sender A --inputs object(2,3)@4 1 2 vector[3] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) Error: Transaction Effects Status: MoveAbort(MoveLocation { module: ModuleId { address: iota, name: Identifier("dynamic_field") }, function: 11, instruction: 0, function_name: Some("borrow_child_object") }, 1) in command 0 Execution Error: MoveAbort(MoveLocation { module: ModuleId { address: iota, name: Identifier("dynamic_field") }, function: 11, instruction: 0, function_name: Some("borrow_child_object") }, 1) in command 0 task 13, lines 106-107: -//# programmable --sender A --inputs object(2,4)@2 1 2 vector[] --dev-inspect +//# programmable --sender A --inputs object(2,3)@2 1 2 vector[] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) Error: Transaction Effects Status: MoveAbort(MoveLocation { module: ModuleId { address: test, name: Identifier("m") }, function: 3, instruction: 10, function_name: Some("check") }, 0) in command 0 Execution Error: MoveAbort(MoveLocation { module: ModuleId { address: test, name: Identifier("m") }, function: 3, instruction: 10, function_name: Some("check") }, 0) in command 0 diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/v0/child_of_child.move b/crates/iota-adapter-transactional-tests/tests/mvcc/v0/child_of_child.move index 5e99adf32b1..327237b2886 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/v0/child_of_child.move +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/v0/child_of_child.move @@ -4,7 +4,7 @@ // tests accessing the versions of a child of a child -//# init --addresses test=0x0 --accounts A --protocol-version 1 +//# init --addresses test=0x0 --accounts A --protocol-version 1 //# publish @@ -70,38 +70,38 @@ module test::m { //> 0: test::m::new(); //> TransferObjects([Result(0)], Input(0)) -//# view-object 2,4 +//# view-object 2,3 -//# programmable --sender A --inputs object(2,4) 1 2 3 +//# programmable --sender A --inputs object(2,3) 1 2 3 //> test::m::set(Input(0), Input(1), Input(2), Input(3)) -//# view-object 2,4 +//# view-object 2,3 -//# programmable --sender A --inputs object(2,4) +//# programmable --sender A --inputs object(2,3) //> test::m::remove(Input(0)) -//# view-object 2,4 +//# view-object 2,3 // dev-inspect with 'check' and correct values -//# programmable --sender A --inputs object(2,4)@2 0 0 vector[0] --dev-inspect +//# programmable --sender A --inputs object(2,3)@2 0 0 vector[0] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) -//# programmable --sender A --inputs object(2,4)@3 1 2 vector[3] --dev-inspect +//# programmable --sender A --inputs object(2,3)@3 1 2 vector[3] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) -//# programmable --sender A --inputs object(2,4)@4 1 2 vector[] --dev-inspect +//# programmable --sender A --inputs object(2,3)@4 1 2 vector[] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) // dev-inspect with 'check' and _incorrect_ values -//# programmable --sender A --inputs object(2,4)@3 0 0 vector[0] --dev-inspect +//# programmable --sender A --inputs object(2,3)@3 0 0 vector[0] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) -//# programmable --sender A --inputs object(2,4)@4 1 2 vector[3] --dev-inspect +//# programmable --sender A --inputs object(2,3)@4 1 2 vector[3] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) -//# programmable --sender A --inputs object(2,4)@2 1 2 vector[] --dev-inspect +//# programmable --sender A --inputs object(2,3)@2 1 2 vector[] --dev-inspect //> test::m::check(Input(0), Input(1), Input(2), Input(3)) diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/v0/find_all_uids.exp b/crates/iota-adapter-transactional-tests/tests/mvcc/v0/find_all_uids.exp index adc294dbbc0..769370a75b7 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/v0/find_all_uids.exp +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/v0/find_all_uids.exp @@ -7,7 +7,7 @@ task 1, lines 9-118: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 12205600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 12198000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 120-122: //# programmable --sender A --inputs @A @@ -15,7 +15,7 @@ task 2, lines 120-122: //> TransferObjects([Result(0)], Input(0)) created: object(2,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7), object(2,8) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 15640800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 15564800, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 124: //# view-object 2,8 @@ -76,7 +76,7 @@ task 4, lines 126-127: //# programmable --sender A --inputs object(2,8) 112 //> test::m::set(Input(0), Input(1)) mutated: object(0,0), object(2,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7), object(2,8) -gas summary: computation_cost: 1000000, storage_cost: 15640800, storage_rebate: 15640800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 15564800, storage_rebate: 15564800, non_refundable_storage_fee: 0 task 5, line 129: //# view-object 2,8 @@ -138,7 +138,7 @@ task 6, lines 131-132: //> test::m::remove(Input(0)) mutated: object(0,0), object(2,8) deleted: object(2,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7) -gas summary: computation_cost: 1000000, storage_cost: 3906400, storage_rebate: 15640800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3891200, storage_rebate: 15564800, non_refundable_storage_fee: 0 task 7, lines 134-137: //# view-object 2,8 @@ -199,20 +199,20 @@ task 8, lines 139-140: //# programmable --sender A --inputs object(2,8)@2 vector[0] --dev-inspect //> test::m::check(Input(0), Input(1)) mutated: object(_), object(2,8) -gas summary: computation_cost: 500000, storage_cost: 3906400, storage_rebate: 2918400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0 task 9, lines 142-143: //# programmable --sender A --inputs object(2,8)@3 vector[112] --dev-inspect //> test::m::check(Input(0), Input(1)) mutated: object(_), object(2,8) -gas summary: computation_cost: 500000, storage_cost: 3906400, storage_rebate: 2918400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0 task 10, lines 145-149: //# programmable --sender A --inputs object(2,8)@4 vector[] --dev-inspect //> test::m::check(Input(0), Input(1)) // dev-inspect with 'check' and _incorrect_ values mutated: object(_), object(2,8) -gas summary: computation_cost: 500000, storage_cost: 3906400, storage_rebate: 2918400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0 task 11, lines 151-152: //# programmable --sender A --inputs object(2,8)@3 vector[0] --dev-inspect diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/v0/find_all_uids_dof.exp b/crates/iota-adapter-transactional-tests/tests/mvcc/v0/find_all_uids_dof.exp index b00c36b8044..caacd932772 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/v0/find_all_uids_dof.exp +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/v0/find_all_uids_dof.exp @@ -7,7 +7,7 @@ task 1, lines 9-131: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 13353200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 13345600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 133-135: //# programmable --sender A --inputs @A @@ -15,7 +15,7 @@ task 2, lines 133-135: //> TransferObjects([Result(0)], Input(0)) created: object(2,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7), object(2,8), object(2,9), object(2,10), object(2,11), object(2,12), object(2,13), object(2,14), object(2,15), object(2,16) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 33941600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 33804800, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 137: //# view-object 2,8 @@ -76,7 +76,7 @@ task 4, lines 139-140: //# programmable --sender A --inputs object(2,8) 112 //> test::m::set(Input(0), Input(1)) mutated: object(0,0), object(2,8), object(2,9), object(2,10), object(2,11), object(2,12), object(2,13), object(2,14), object(2,15), object(2,16) -gas summary: computation_cost: 1000000, storage_cost: 14303200, storage_rebate: 14303200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 14227200, storage_rebate: 14227200, non_refundable_storage_fee: 0 task 5, line 142: //# view-object 2,8 @@ -138,7 +138,7 @@ task 6, lines 144-145: //> test::m::remove(Input(0)) mutated: object(0,0), object(2,8) deleted: object(2,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7), object(2,9), object(2,10), object(2,11), object(2,12), object(2,13), object(2,14), object(2,15), object(2,16) -gas summary: computation_cost: 1000000, storage_cost: 3906400, storage_rebate: 33941600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3891200, storage_rebate: 33804800, non_refundable_storage_fee: 0 task 7, lines 147-150: //# view-object 2,8 @@ -199,20 +199,20 @@ task 8, lines 152-153: //# programmable --sender A --inputs object(2,8)@2 vector[0] --dev-inspect //> test::m::check(Input(0), Input(1)) mutated: object(_), object(2,8) -gas summary: computation_cost: 500000, storage_cost: 3906400, storage_rebate: 2918400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0 task 9, lines 155-156: //# programmable --sender A --inputs object(2,8)@3 vector[112] --dev-inspect //> test::m::check(Input(0), Input(1)) mutated: object(_), object(2,8) -gas summary: computation_cost: 500000, storage_cost: 3906400, storage_rebate: 2918400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0 task 10, lines 158-162: //# programmable --sender A --inputs object(2,8)@4 vector[] --dev-inspect //> test::m::check(Input(0), Input(1)) // dev-inspect with 'check' and _incorrect_ values mutated: object(_), object(2,8) -gas summary: computation_cost: 500000, storage_cost: 3906400, storage_rebate: 2918400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0 task 11, lines 164-165: //# programmable --sender A --inputs object(2,8)@3 vector[0] --dev-inspect diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/v0/find_all_uids_on_child.exp b/crates/iota-adapter-transactional-tests/tests/mvcc/v0/find_all_uids_on_child.exp index a5cec26d5a3..9eab2950c78 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/v0/find_all_uids_on_child.exp +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/v0/find_all_uids_on_child.exp @@ -7,7 +7,7 @@ task 1, lines 9-141: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 13862400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 13854800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 143-145: //# programmable --sender A --inputs @A @@ -15,7 +15,7 @@ task 2, lines 143-145: //> TransferObjects([Result(0)], Input(0)) created: object(2,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7), object(2,8), object(2,9) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 17609200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 17525600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 147: //# view-object 2,9 @@ -33,7 +33,7 @@ task 4, lines 149-150: //# programmable --sender A --inputs object(2,9) 112 //> test::m::set(Input(0), Input(1)) mutated: object(0,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7), object(2,8), object(2,9) -gas summary: computation_cost: 1000000, storage_cost: 13968800, storage_rebate: 13968800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 13892800, storage_rebate: 13892800, non_refundable_storage_fee: 0 task 5, line 152: //# view-object 2,9 @@ -52,7 +52,7 @@ task 6, lines 154-155: //> test::m::remove(Input(0)) mutated: object(0,0), object(2,9) deleted: object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7), object(2,8) -gas summary: computation_cost: 1000000, storage_cost: 2234400, storage_rebate: 13968800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2219200, storage_rebate: 13892800, non_refundable_storage_fee: 0 task 7, lines 157-160: //# view-object 2,9 @@ -70,20 +70,20 @@ task 8, lines 162-163: //# programmable --sender A --inputs object(2,9)@2 vector[0] --dev-inspect //> test::m::check(Input(0), Input(1)) mutated: object(_), object(2,9) -gas summary: computation_cost: 500000, storage_cost: 2234400, storage_rebate: 1246400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2219200, storage_rebate: 1238800, non_refundable_storage_fee: 0 task 9, lines 165-166: //# programmable --sender A --inputs object(2,9)@3 vector[112] --dev-inspect //> test::m::check(Input(0), Input(1)) mutated: object(_), object(2,9) -gas summary: computation_cost: 500000, storage_cost: 2234400, storage_rebate: 1246400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2219200, storage_rebate: 1238800, non_refundable_storage_fee: 0 task 10, lines 168-172: //# programmable --sender A --inputs object(2,9)@4 vector[] --dev-inspect //> test::m::check(Input(0), Input(1)) // dev-inspect with 'check' and _incorrect_ values mutated: object(_), object(2,9) -gas summary: computation_cost: 500000, storage_cost: 2234400, storage_rebate: 1246400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2219200, storage_rebate: 1238800, non_refundable_storage_fee: 0 task 11, lines 174-175: //# programmable --sender A --inputs object(2,9)@3 vector[0] --dev-inspect diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/v0/middle_version_less_than_child.exp b/crates/iota-adapter-transactional-tests/tests/mvcc/v0/middle_version_less_than_child.exp index 5f0f7f88a1a..7253324d428 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/v0/middle_version_less_than_child.exp +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/v0/middle_version_less_than_child.exp @@ -7,7 +7,7 @@ task 1, lines 9-52: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 7493600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7486000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 54-58: //# programmable --sender A --inputs @A @@ -16,7 +16,7 @@ task 2, lines 54-58: // All 3 objects have version 2 created: object(2,0), object(2,1), object(2,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6285200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6254800, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 60: //# view-object 2,0 @@ -78,7 +78,7 @@ task 6, lines 66-69: //> test::m::set(Input(0), Input(1)) // The middle object has version 2, while the root and modified leaf have version 3 mutated: object(0,0), object(2,1), object(2,2) -gas summary: computation_cost: 1000000, storage_cost: 4278800, storage_rebate: 4278800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4256000, storage_rebate: 4256000, non_refundable_storage_fee: 0 task 7, line 71: //# view-object 2,0 @@ -139,4 +139,4 @@ task 10, lines 80-81: //# programmable --sender A --inputs object(2,2) 112 //> test::m::check(Input(0), Input(1)) mutated: object(0,0), object(2,2) -gas summary: computation_cost: 1000000, storage_cost: 2272400, storage_rebate: 2272400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2257200, storage_rebate: 2257200, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/v0/not_root_version.exp b/crates/iota-adapter-transactional-tests/tests/mvcc/v0/not_root_version.exp index 45d93579fec..ab76edcf5b8 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/v0/not_root_version.exp +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/v0/not_root_version.exp @@ -7,7 +7,7 @@ task 1, lines 9-54: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 7432800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7425200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 56-58: //# programmable --sender P1 --inputs @P1 @@ -15,19 +15,19 @@ task 2, lines 56-58: //> TransferObjects([Result(0)], Input(0)) created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 60-61: //# programmable --sender P1 --inputs object(2,0) //> test::m::nop(); mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 2181200, non_refundable_storage_fee: 0 task 4, lines 63-64: //# programmable --sender P1 --inputs object(2,0) //> test::m::nop(); mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 2181200, non_refundable_storage_fee: 0 task 5, lines 66-69: //# view-object 2,0 @@ -47,7 +47,7 @@ task 6, lines 71-73: //> TransferObjects([Result(0)], Input(0)) created: object(6,0), object(6,1) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 3663200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3640400, storage_rebate: 0, non_refundable_storage_fee: 0 task 7, line 75: //# view-object 6,0 @@ -67,7 +67,7 @@ task 8, lines 77-78: //# programmable --sender P2 --inputs object(6,1) //> 0: test::m::bump(Input(0)); mutated: object(0,1), object(6,0), object(6,1) -gas summary: computation_cost: 1000000, storage_cost: 3663200, storage_rebate: 3663200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3640400, storage_rebate: 3640400, non_refundable_storage_fee: 0 task 9, lines 80-84: //# view-object 6,0 @@ -92,7 +92,7 @@ task 10, lines 86-91: created: object(10,0) mutated: object(_), object(2,0) wrapped: object(6,1) -gas summary: computation_cost: 500000, storage_cost: 4126800, storage_rebate: 2416800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 4104000, storage_rebate: 2401600, non_refundable_storage_fee: 0 task 11, lines 93-97: //# programmable --sender P2 --inputs object(2,0)@4 object(6,1)@3 1 --dev-inspect @@ -102,7 +102,7 @@ task 11, lines 93-97: created: object(10,0) mutated: object(_), object(2,0) wrapped: object(6,1) -gas summary: computation_cost: 500000, storage_cost: 4126800, storage_rebate: 2416800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 4104000, storage_rebate: 2401600, non_refundable_storage_fee: 0 task 12, lines 99-103: //# programmable --sender P2 --inputs object(2,0)@4 object(6,1)@2 1 --dev-inspect diff --git a/crates/iota-adapter-transactional-tests/tests/mvcc/v0/not_root_version_flipped_case.exp b/crates/iota-adapter-transactional-tests/tests/mvcc/v0/not_root_version_flipped_case.exp index be4131d3a43..a3f16edc70b 100644 --- a/crates/iota-adapter-transactional-tests/tests/mvcc/v0/not_root_version_flipped_case.exp +++ b/crates/iota-adapter-transactional-tests/tests/mvcc/v0/not_root_version_flipped_case.exp @@ -7,7 +7,7 @@ task 1, lines 9-54: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 7432800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7425200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 56-58: //# programmable --sender P1 --inputs @P1 @@ -15,7 +15,7 @@ task 2, lines 56-58: //> TransferObjects([Result(0)], Input(0)) created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 61-64: //# view-object 2,0 @@ -35,7 +35,7 @@ task 4, lines 66-68: //> TransferObjects([Result(0)], Input(0)) created: object(4,0), object(4,1) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 3663200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3640400, storage_rebate: 0, non_refundable_storage_fee: 0 task 5, line 70: //# view-object 4,0 @@ -55,7 +55,7 @@ task 6, lines 72-73: //# programmable --sender P2 --inputs object(4,1) //> 0: test::m::bump(Input(0)); mutated: object(0,1), object(4,0), object(4,1) -gas summary: computation_cost: 1000000, storage_cost: 3663200, storage_rebate: 3663200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3640400, storage_rebate: 3640400, non_refundable_storage_fee: 0 task 7, lines 75-78: //# view-object 4,0 @@ -80,7 +80,7 @@ task 8, lines 80-85: created: object(8,0) mutated: object(_), object(2,0) wrapped: object(4,1) -gas summary: computation_cost: 500000, storage_cost: 4126800, storage_rebate: 2416800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 4104000, storage_rebate: 2401600, non_refundable_storage_fee: 0 task 9, lines 87-91: //# programmable --sender P2 --inputs object(2,0)@2 object(4,1)@2 0 --dev-inspect @@ -90,7 +90,7 @@ task 9, lines 87-91: created: object(8,0) mutated: object(_), object(2,0) wrapped: object(4,1) -gas summary: computation_cost: 500000, storage_cost: 4126800, storage_rebate: 2416800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 4104000, storage_rebate: 2401600, non_refundable_storage_fee: 0 task 10, lines 93-97: //# programmable --sender P2 --inputs object(2,0)@2 object(4,1)@2 1 --dev-inspect diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/borrowed_arg_copyable_invalid.exp b/crates/iota-adapter-transactional-tests/tests/programmable/borrowed_arg_copyable_invalid.exp index 84e17c89c41..40e79b04393 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/borrowed_arg_copyable_invalid.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/borrowed_arg_copyable_invalid.exp @@ -7,7 +7,7 @@ task 1, lines 9-16: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 4461200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4453600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 18-19: //# programmable --inputs 0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/borrowed_arg_non_copyable_invalid.exp b/crates/iota-adapter-transactional-tests/tests/programmable/borrowed_arg_non_copyable_invalid.exp index a85379dfec6..2f2c13dcfb7 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/borrowed_arg_non_copyable_invalid.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/borrowed_arg_non_copyable_invalid.exp @@ -7,7 +7,7 @@ task 1, lines 9-25: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 6414400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6406800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 27-29: //# programmable diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/borrowed_arg_primitives_invalid.exp b/crates/iota-adapter-transactional-tests/tests/programmable/borrowed_arg_primitives_invalid.exp index fde5fdf278d..09bf7d7f2b9 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/borrowed_arg_primitives_invalid.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/borrowed_arg_primitives_invalid.exp @@ -13,7 +13,7 @@ task 2, lines 12-13: //# programmable --sender B --inputs @A //> TransferObjects([Gas], Input(0)) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 15-16: //# programmable --sender A --inputs object(0,1) diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/borrowed_arg_valid.exp b/crates/iota-adapter-transactional-tests/tests/programmable/borrowed_arg_valid.exp index 29d39303c90..811a98a31a5 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/borrowed_arg_valid.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/borrowed_arg_valid.exp @@ -7,7 +7,7 @@ task 1, lines 9-25: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 5388400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5380800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 27-36: //# programmable --inputs 0 @@ -21,7 +21,7 @@ task 2, lines 27-36: // mix all and borrow multiple times //> test::m1::multiple_copy(Input(0), Input(0), Input(0), Input(0)); mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, lines 38-41: //# programmable @@ -29,4 +29,4 @@ task 3, lines 38-41: // double borrow without copy //> test::m1::double_r(Result(0), Result(0)) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/cannot_call_emit.exp b/crates/iota-adapter-transactional-tests/tests/programmable/cannot_call_emit.exp index e39a5e9b343..f7f114292a0 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/cannot_call_emit.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/cannot_call_emit.exp @@ -7,7 +7,7 @@ task 1, lines 9-13: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 3906400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3898800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 15-17: //# programmable diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/cannot_call_init.exp b/crates/iota-adapter-transactional-tests/tests/programmable/cannot_call_init.exp index 74f84117609..3dc727ce0bc 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/cannot_call_init.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/cannot_call_init.exp @@ -7,7 +7,7 @@ task 1, lines 9-12: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 3898800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3891200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 14-15: //# programmable diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/cannot_call_private.exp b/crates/iota-adapter-transactional-tests/tests/programmable/cannot_call_private.exp index be5efb8dc31..559c0b47cd1 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/cannot_call_private.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/cannot_call_private.exp @@ -7,7 +7,7 @@ task 1, lines 9-12: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 3898800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3891200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 14-15: //# programmable diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/coin_negative.exp b/crates/iota-adapter-transactional-tests/tests/programmable/coin_negative.exp index 14ddc0c9b14..14d194a8015 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/coin_negative.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/coin_negative.exp @@ -7,7 +7,7 @@ task 1, lines 9-21: //# publish --sender A created: object(1,0), object(1,1), object(1,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 10617200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 10594400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 23-25: //# programmable --sender A --inputs object(1,2) 1 @A @@ -16,7 +16,7 @@ task 2, lines 23-25: created: object(2,0) mutated: object(0,0), object(1,2) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 4012800, storage_rebate: 2690400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3990000, storage_rebate: 2675200, non_refundable_storage_fee: 0 task 3, lines 27-28: //# programmable --sender A --inputs object(2,0) 2 @@ -28,4 +28,4 @@ task 4, lines 30-31: //# programmable --sender A --inputs 18446744073709551615 --gas-budget 10000000000 //> SplitCoins(Gas, [Input(0)]) Error: Transaction Effects Status: Insufficient coin balance for operation. -Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: InsufficientCoinBalance, source: Some("balance: 299989985060400 required: 18446744073709551615"), command: Some(0) } } +Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: InsufficientCoinBalance, source: Some("balance: 299989985090800 required: 18446744073709551615"), command: Some(0) } } diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/coin_operations_custom_coin.exp b/crates/iota-adapter-transactional-tests/tests/programmable/coin_operations_custom_coin.exp index bfbc7fabd07..b6d984d303b 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/coin_operations_custom_coin.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/coin_operations_custom_coin.exp @@ -7,7 +7,7 @@ task 1, lines 9-21: //# publish --sender A created: object(1,0), object(1,1), object(1,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 10617200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 10594400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 23-25: //# programmable --sender A --inputs object(1,2) 100 @A @@ -16,7 +16,7 @@ task 2, lines 23-25: created: object(2,0) mutated: object(0,0), object(1,2) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 4012800, storage_rebate: 2690400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3990000, storage_rebate: 2675200, non_refundable_storage_fee: 0 task 3, line 27: //# view-object 2,0 @@ -45,4 +45,4 @@ created: object(4,0) mutated: object(0,0), object(1,2) deleted: object(2,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 4012800, storage_rebate: 4012800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3990000, storage_rebate: 3990000, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/coin_operations_non_coins.exp b/crates/iota-adapter-transactional-tests/tests/programmable/coin_operations_non_coins.exp index 231f2023dc2..453fa18ce6f 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/coin_operations_non_coins.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/coin_operations_non_coins.exp @@ -7,7 +7,7 @@ task 1, lines 9-26: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 4894400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4886800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 27-31: //# programmable --sender A --inputs 0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/coin_overflow.exp b/crates/iota-adapter-transactional-tests/tests/programmable/coin_overflow.exp index 76b704da179..0472425f2b8 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/coin_overflow.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/coin_overflow.exp @@ -7,7 +7,7 @@ task 1, lines 9-21: //# publish --sender A created: object(1,0), object(1,1), object(1,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 10617200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 10594400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 23-25: //# programmable --sender A --inputs object(1,2) 18446744073709551614 @A @@ -16,7 +16,7 @@ task 2, lines 23-25: created: object(2,0) mutated: object(0,0), object(1,2) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 4012800, storage_rebate: 2690400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3990000, storage_rebate: 2675200, non_refundable_storage_fee: 0 task 3, lines 27-29: //# programmable --sender A --inputs object(1,2) 1 @A diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/delayed_invalid_gas_by_value.exp b/crates/iota-adapter-transactional-tests/tests/programmable/delayed_invalid_gas_by_value.exp index e5a9d15c06e..3ebc5712566 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/delayed_invalid_gas_by_value.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/delayed_invalid_gas_by_value.exp @@ -7,7 +7,7 @@ task 1, lines 9-14: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 3990000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3982400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 16-18: //# programmable --sender A --inputs @A diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/delayed_invalid_object_by_value.exp b/crates/iota-adapter-transactional-tests/tests/programmable/delayed_invalid_object_by_value.exp index ea4a42b20fa..57b324b0f68 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/delayed_invalid_object_by_value.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/delayed_invalid_object_by_value.exp @@ -7,14 +7,14 @@ task 1, lines 9-29: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 5760800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5753200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 31-32: //# programmable //> test::m1::share_r(); created: object(2,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, lines 34-35: //# programmable --inputs object(2,0) @@ -33,7 +33,7 @@ task 5, lines 40-41: //> test::m1::freeze_r(); created: object(5,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, lines 43-44: //# programmable --inputs object(5,0) diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/gas_coin_by_reference.exp b/crates/iota-adapter-transactional-tests/tests/programmable/gas_coin_by_reference.exp index 5b63583e499..2ac4cf9d1d5 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/gas_coin_by_reference.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/gas_coin_by_reference.exp @@ -7,48 +7,48 @@ task 1, lines 9-25: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 4058400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4050800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 26-27: //# programmable --sender A //> test::m1::t1>(Gas) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 29-30: //# programmable --sender A //> test::m1::t2>(Gas) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, lines 32-33: //# programmable --sender A //> test::m1::t2>(Gas) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, lines 35-36: //# programmable --sender A //> test::m1::t4>(Gas) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, lines 38-39: //# programmable --sender A //> test::m1::t5>(Gas) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, lines 41-44: //# programmable --sender A //> test::m1::t6>(Gas) // can pass to merge and split mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, lines 45-47: //# programmable --sender A --inputs 10 --gas-budget 10000000000 //> 0: SplitCoins(Gas, [Input(0)]); //> MergeCoins(Gas, [Result(0)]) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/gas_coin_by_value.exp b/crates/iota-adapter-transactional-tests/tests/programmable/gas_coin_by_value.exp index 7fa85ef9544..c11228c0db2 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/gas_coin_by_value.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/gas_coin_by_value.exp @@ -7,7 +7,7 @@ task 1, lines 9-10: //# programmable --sender A --inputs @B //> TransferObjects([Gas], Input(0)) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 12: //# view-object 0,0 @@ -20,6 +20,6 @@ Contents: iota::coin::Coin { }, }, balance: iota::balance::Balance { - value: 299999998012000u64, + value: 299999998019600u64, }, } diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/gas_coin_by_value_invalid.exp b/crates/iota-adapter-transactional-tests/tests/programmable/gas_coin_by_value_invalid.exp index 58defb657e6..813c70f8c1f 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/gas_coin_by_value_invalid.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/gas_coin_by_value_invalid.exp @@ -7,7 +7,7 @@ task 1, lines 9-24: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 3860800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3853200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 25-26: //# programmable --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/generics_substitution.exp b/crates/iota-adapter-transactional-tests/tests/programmable/generics_substitution.exp index 1a00ba0d85a..86a95284ea2 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/generics_substitution.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/generics_substitution.exp @@ -7,7 +7,7 @@ task 1, lines 9-27: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 5456800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5449200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 28-37: //# programmable @@ -20,7 +20,7 @@ task 2, lines 28-37: //> test::m1::eat(NestedResult(4,1), NestedResult(4,0), NestedResult(4,1)); // invalid mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, lines 38-45: //# programmable diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/invalid_option.exp b/crates/iota-adapter-transactional-tests/tests/programmable/invalid_option.exp index 312390bbef0..75197b8dfad 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/invalid_option.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/invalid_option.exp @@ -7,7 +7,7 @@ task 1, lines 9-16: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 4423200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4415600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 18-19: //# programmable --inputs vector[false,true] diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/invalid_public_function_return.exp b/crates/iota-adapter-transactional-tests/tests/programmable/invalid_public_function_return.exp index 5bd2e30b283..906a83d1679 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/invalid_public_function_return.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/invalid_public_function_return.exp @@ -7,7 +7,7 @@ task 1, lines 9-17: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 4681600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4674000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 19-20: //# programmable diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/invalid_result_arity.exp b/crates/iota-adapter-transactional-tests/tests/programmable/invalid_result_arity.exp index 1729f49af6c..6a51d06da51 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/invalid_result_arity.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/invalid_result_arity.exp @@ -7,7 +7,7 @@ task 1, lines 9-16: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 4544800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4537200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 18-20: //# programmable diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/make_vec_objects.exp b/crates/iota-adapter-transactional-tests/tests/programmable/make_vec_objects.exp index 273038c4369..e52fa5ec8de 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/make_vec_objects.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/make_vec_objects.exp @@ -7,7 +7,7 @@ task 1, lines 9-45: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 7159200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7151600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 46-53: //# programmable --sender A @@ -18,7 +18,7 @@ task 2, lines 46-53: //> test::m1::pubs(Result(3)); // annotated objects mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 54-61: //# programmable --sender A @@ -29,7 +29,7 @@ task 3, lines 54-61: //> test::m1::pubs(Result(3)); // empty objects mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, lines 62-66: //# programmable --sender A @@ -37,7 +37,7 @@ task 4, lines 62-66: //> test::m1::pubs(Result(0)); // mixed new and old. Send an object to A and mix it in a vector with the newly created ones. mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, lines 67-69: //# programmable --sender A --inputs @A @@ -45,7 +45,7 @@ task 5, lines 67-69: //> TransferObjects([Result(0)], Input(0)); created: object(5,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2280000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2264800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, line 71: //# view-object 5,0 @@ -70,4 +70,4 @@ task 7, lines 73-79: //> test::m1::pubs(Result(3)); mutated: object(0,0) deleted: object(5,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 2280000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 2264800, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/make_vec_special_validation_invalid.exp b/crates/iota-adapter-transactional-tests/tests/programmable/make_vec_special_validation_invalid.exp index 27862819259..e4fc3672723 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/make_vec_special_validation_invalid.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/make_vec_special_validation_invalid.exp @@ -7,7 +7,7 @@ task 1, lines 9-30: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 6072400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6064800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 32-35: //# programmable --inputs vector[0u64,0u64] diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/merge_coin_mismatched_coin.exp b/crates/iota-adapter-transactional-tests/tests/programmable/merge_coin_mismatched_coin.exp index df56219cdd5..d62a9017786 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/merge_coin_mismatched_coin.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/merge_coin_mismatched_coin.exp @@ -7,7 +7,7 @@ task 1, lines 9-21: //# publish --sender A created: object(1,0), object(1,1), object(1,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 10617200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 10594400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 23-25: //# programmable --sender A --inputs object(1,2) 100 @A @@ -16,7 +16,7 @@ task 2, lines 23-25: created: object(2,0) mutated: object(0,0), object(1,2) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 4012800, storage_rebate: 2690400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3990000, storage_rebate: 2675200, non_refundable_storage_fee: 0 task 3, line 27: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/nested_result_zero_zero.exp b/crates/iota-adapter-transactional-tests/tests/programmable/nested_result_zero_zero.exp index 88cef92df8b..77c9a6a8a54 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/nested_result_zero_zero.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/nested_result_zero_zero.exp @@ -7,7 +7,7 @@ task 1, lines 9-14: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 4043200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4035600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 16-19: //# programmable @@ -15,4 +15,4 @@ task 2, lines 16-19: //> test::m1::copy_(Result(0)); //> test::m1::copy_(NestedResult(0, 0)); mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/non_primitive_non_object_arguments.exp b/crates/iota-adapter-transactional-tests/tests/programmable/non_primitive_non_object_arguments.exp index ce39b3d5cf5..fae07906a21 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/non_primitive_non_object_arguments.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/non_primitive_non_object_arguments.exp @@ -7,7 +7,7 @@ task 1, lines 9-20: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 4666400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4658800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 22-27: //# programmable @@ -17,4 +17,4 @@ task 2, lines 22-27: //> test::m1::mut_(Result(1)); //> test::m1::otatop(Result(1)); mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/out_of_bounds_input.exp b/crates/iota-adapter-transactional-tests/tests/programmable/out_of_bounds_input.exp index 20ff8af9092..5acc8029c64 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/out_of_bounds_input.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/out_of_bounds_input.exp @@ -7,7 +7,7 @@ task 1, lines 9-16: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 4666400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4658800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 18-19: //# programmable diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/out_of_bounds_nested.exp b/crates/iota-adapter-transactional-tests/tests/programmable/out_of_bounds_nested.exp index 514f3a4920b..0e5d5184020 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/out_of_bounds_nested.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/out_of_bounds_nested.exp @@ -7,7 +7,7 @@ task 1, lines 9-17: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 4864000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4856400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 19-21: //# programmable diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/out_of_bounds_result.exp b/crates/iota-adapter-transactional-tests/tests/programmable/out_of_bounds_result.exp index fa1391ca296..4aae37ad130 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/out_of_bounds_result.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/out_of_bounds_result.exp @@ -7,7 +7,7 @@ task 1, lines 9-17: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 4795600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4788000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 19-20: //# programmable diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_by_ref_input_invalid.exp b/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_by_ref_input_invalid.exp index 51d7892e40d..cd99690120c 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_by_ref_input_invalid.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_by_ref_input_invalid.exp @@ -7,7 +7,7 @@ task 1, lines 10-19: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 5054000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5046400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 21-26: //# programmable --sender A --inputs @A @@ -16,7 +16,7 @@ task 2, lines 21-26: // cannot use results from other functions created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 28-30: //# programmable diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_by_ref_input_valid.exp b/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_by_ref_input_valid.exp index ea9f08b3ccc..65660a61cbb 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_by_ref_input_valid.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_by_ref_input_valid.exp @@ -7,7 +7,7 @@ task 1, lines 10-24: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 5517600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5510000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 26-28: //# programmable --sender A --inputs @A @@ -15,7 +15,7 @@ task 2, lines 26-28: //> TransferObjects([Result(0)], Input(0)) created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 30-37: //# programmable --sender A --inputs object(2,0) 200 @@ -27,7 +27,7 @@ task 3, lines 30-37: //> test::m1::priv(Input(0)); //> test::m1::priv(Input(0)); mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 2204000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 2188800, non_refundable_storage_fee: 0 task 4, lines 39-44: //# programmable --sender A --inputs @A --gas-budget 10000000000 @@ -38,4 +38,4 @@ task 4, lines 39-44: //> TransferObjects([Result(1)], Input(0)) created: object(4,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_copied_input_valid.exp b/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_copied_input_valid.exp index ee1253e555d..1a4c7f33d79 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_copied_input_valid.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_copied_input_valid.exp @@ -7,11 +7,11 @@ task 1, lines 10-14: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 3549200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3541600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 16-18: //# programmable --inputs 0 //> test::m1::clean(Input(0)); //> test::m1::priv(Input(0)); mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_make_move_vec_invalid.exp b/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_make_move_vec_invalid.exp index f5dffb16574..61eb4a2103c 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_make_move_vec_invalid.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_make_move_vec_invalid.exp @@ -7,7 +7,7 @@ task 1, lines 10-19: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 5403600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5396000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 21-25: //# programmable --sender A --inputs @A @@ -17,7 +17,7 @@ task 2, lines 21-25: //> TransferObjects([Result(0), Result(1), Result(2)], Input(0)) created: object(2,0), object(2,1), object(2,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4636000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4605600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 27-30: //# programmable --sender A --inputs object(2,0) object(2,1) object(2,2) diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_make_move_vec_valid.exp b/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_make_move_vec_valid.exp index a9df0bd7afd..c552fdcf0c3 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_make_move_vec_valid.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_make_move_vec_valid.exp @@ -7,7 +7,7 @@ task 1, lines 10-27: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 6247200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6239600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 29-33: //# programmable --sender A --inputs @A @@ -17,7 +17,7 @@ task 2, lines 29-33: //> TransferObjects([Result(0), Result(1), Result(2)], Input(0)) created: object(2,0), object(2,1), object(2,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4636000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4605600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 35-39: //# programmable --sender A --inputs object(2,0) object(2,1) object(2,2) @@ -27,7 +27,7 @@ task 3, lines 35-39: //> test::m1::priv2(Result(2)) mutated: object(0,0) deleted: object(2,0), object(2,1), object(2,2) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 4636000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 4605600, non_refundable_storage_fee: 0 task 4, lines 41-44: //# programmable --sender A --inputs 0 0 0 @@ -35,4 +35,4 @@ task 4, lines 41-44: //> 1: MakeMoveVec([Input(0), Input(1), Input(2)]); //> test::m1::priv3(Result(1)) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_non_pure_input_invalid.exp b/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_non_pure_input_invalid.exp index 98fca718544..bfe35133939 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_non_pure_input_invalid.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_non_pure_input_invalid.exp @@ -7,7 +7,7 @@ task 1, lines 9-17: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 4005200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3997600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 18-20: //# programmable diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_per_argument.exp b/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_per_argument.exp index 49d7889a07c..bb86095d106 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_per_argument.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_per_argument.exp @@ -7,7 +7,7 @@ task 1, lines 9-16: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 4932400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4924800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 18-21: //# programmable --sender A --inputs @A @@ -16,7 +16,7 @@ task 2, lines 18-21: //> TransferObjects([Result(0), Result(1)], Input(0)) created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 23-25: //# programmable --sender A --inputs object(2,0) object(2,1) diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_type_check.exp b/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_type_check.exp index e33b5485db7..d9e060b7b20 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_type_check.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/private_entry_value_restriction_type_check.exp @@ -7,7 +7,7 @@ task 1, lines 9-16: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 4902000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4894400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 18-20: //# programmable --sender A --inputs @A @@ -15,7 +15,7 @@ task 2, lines 18-20: //> TransferObjects([Result(0)], Input(0)) created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 22-24: //# programmable --sender A --inputs object(2,0) diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/private_transfer_invalid.exp b/crates/iota-adapter-transactional-tests/tests/programmable/private_transfer_invalid.exp index bd16380ddba..627570bc58d 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/private_transfer_invalid.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/private_transfer_invalid.exp @@ -7,7 +7,7 @@ task 1, lines 9-18: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 5228800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5221200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 20-22: //# programmable --sender A --inputs @A diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/private_transfer_valid.exp b/crates/iota-adapter-transactional-tests/tests/programmable/private_transfer_valid.exp index 182eef99dde..8abcd29d0ae 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/private_transfer_valid.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/private_transfer_valid.exp @@ -7,7 +7,7 @@ task 1, lines 9-13: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 4628400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4620800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 15-17: //# programmable --sender A --inputs @A @@ -15,7 +15,7 @@ task 2, lines 15-17: //> iota::transfer::public_transfer(Result(0), Input(0)); created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2219200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2204000, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 19: //# view-object 2,0 @@ -35,7 +35,7 @@ task 4, lines 21-23: //> iota::transfer::public_share_object(Result(0)); created: object(4,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2219200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2204000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 25: //# view-object 4,0 @@ -55,7 +55,7 @@ task 6, lines 27-29: //> iota::transfer::public_freeze_object(Result(0)); created: object(6,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2219200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2204000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, line 31: //# view-object 6,0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/pure_arg_type_change.exp b/crates/iota-adapter-transactional-tests/tests/programmable/pure_arg_type_change.exp index 7a75d1c46cb..259a6cb4757 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/pure_arg_type_change.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/pure_arg_type_change.exp @@ -7,7 +7,7 @@ task 1, lines 9-26: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 5380800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5373200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 28-34: //# programmable --inputs "hello" diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/split_coins.exp b/crates/iota-adapter-transactional-tests/tests/programmable/split_coins.exp index dc405def620..d8a0f8c589c 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/split_coins.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/split_coins.exp @@ -7,7 +7,7 @@ task 1, lines 10-23: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5692400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5684800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 25-29: //# programmable --sender A --inputs 100000 @A @@ -16,13 +16,13 @@ task 2, lines 25-29: // let's get ourselves a coin worth 1000 created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 30: //# run iota::pay::split_and_transfer --type-args iota::iota::IOTA --args object(2,0) 1000 @A --sender A created: object(3,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2964000, storage_rebate: 1976000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2941200, storage_rebate: 1960800, non_refundable_storage_fee: 0 task 4, lines 32-34: //# view-object 3,0 @@ -45,7 +45,7 @@ task 5, lines 35-37: //> TransferObjects([NestedResult(0,0)], Input(2)); created: object(5,0) mutated: object(0,0), object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 2964000, storage_rebate: 1976000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2941200, storage_rebate: 1960800, non_refundable_storage_fee: 0 task 6, line 39: //# view-object 3,0 @@ -83,7 +83,7 @@ task 8, lines 45-47: //> TransferObjects([NestedResult(0,0), NestedResult(0,1)], Input(2)); created: object(8,0), object(8,1) mutated: object(0,0), object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 3952000, storage_rebate: 1976000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3921600, storage_rebate: 1960800, non_refundable_storage_fee: 0 task 9, line 49: //# view-object 3,0 @@ -137,7 +137,7 @@ task 12, lines 56-59: //> TransferObjects([NestedResult(1,0), NestedResult(1,1)], Input(2)); created: object(12,0), object(12,1) mutated: object(0,0), object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 3952000, storage_rebate: 1976000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3921600, storage_rebate: 1960800, non_refundable_storage_fee: 0 task 13, line 61: //# view-object 3,0 @@ -192,7 +192,7 @@ task 16, lines 69-73: //> test::m1::transfer_(Result(2), Input(2)); created: object(16,0), object(16,1) mutated: object(0,0), object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 3952000, storage_rebate: 1976000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3921600, storage_rebate: 1960800, non_refundable_storage_fee: 0 task 17, line 75: //# view-object 3,0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/split_coins_invalid.exp b/crates/iota-adapter-transactional-tests/tests/programmable/split_coins_invalid.exp index 7b12708c47d..c3f3ae52122 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/split_coins_invalid.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/split_coins_invalid.exp @@ -7,7 +7,7 @@ task 1, lines 10-25: //# publish created: object(1,0) mutated: object(0,3) -gas summary: computation_cost: 1000000, storage_cost: 5654400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5646800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 27-31: //# programmable --sender A --inputs 100000 @A @@ -16,13 +16,13 @@ task 2, lines 27-31: // let's get ourselves a coin worth 1000 created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 32: //# run iota::pay::split_and_transfer --type-args iota::iota::IOTA --args object(2,0) 1000 @A --sender A created: object(3,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2964000, storage_rebate: 1976000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2941200, storage_rebate: 1960800, non_refundable_storage_fee: 0 task 4, lines 34-36: //# view-object 3,0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/transfer_objects.exp b/crates/iota-adapter-transactional-tests/tests/programmable/transfer_objects.exp index dc0ce505bbd..6d812f5162f 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/transfer_objects.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/transfer_objects.exp @@ -7,7 +7,7 @@ task 1, lines 9-33: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 6004000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5996400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 34-36: //# programmable --sender A --inputs @A @@ -15,7 +15,7 @@ task 2, lines 34-36: //> TransferObjects([Result(0)], Input(0)); created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2280000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2264800, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 38-40: //# view-object 0,0 @@ -28,7 +28,7 @@ Contents: iota::coin::Coin { }, }, balance: iota::balance::Balance { - value: 299999996720000u64, + value: 299999996735200u64, }, } @@ -39,7 +39,7 @@ task 4, lines 41-44: //> TransferObjects([Result(1)], Result(0)); created: object(4,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2280000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2264800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, lines 46-48: //# view-object 4,0 @@ -63,7 +63,7 @@ task 6, lines 49-54: //> TransferObjects([Result(2)], Result(3)); created: object(6,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2280000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2264800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, lines 56-58: //# view-object 6,0 @@ -89,7 +89,7 @@ task 8, lines 59-66: //> TransferObjects([Result(4), Result(2), Result(5)], Result(3)); created: object(8,0), object(8,1), object(8,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5388400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5358000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 9, line 68: //# view-object 8,0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/transfer_objects_invalid_address.exp b/crates/iota-adapter-transactional-tests/tests/programmable/transfer_objects_invalid_address.exp index c0e71fa05d1..b3495badcc3 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/transfer_objects_invalid_address.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/transfer_objects_invalid_address.exp @@ -7,7 +7,7 @@ task 1, lines 9-29: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5631600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5624000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 30-34: //# programmable --sender A --inputs 0u64 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/transfer_objects_invalid_object.exp b/crates/iota-adapter-transactional-tests/tests/programmable/transfer_objects_invalid_object.exp index 1359bdd88b1..bfb71f26c99 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/transfer_objects_invalid_object.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/transfer_objects_invalid_object.exp @@ -7,7 +7,7 @@ task 1, lines 9-36: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 6148400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6140800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 37-40: //# programmable --sender A --inputs @A diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/unused_values_invalid.exp b/crates/iota-adapter-transactional-tests/tests/programmable/unused_values_invalid.exp index 27292a13e3d..b379e6ed285 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/unused_values_invalid.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/unused_values_invalid.exp @@ -7,7 +7,7 @@ task 1, lines 9-25: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 6604400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6596800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 27-32: //# programmable --sender A --inputs @A diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/unused_values_valid.exp b/crates/iota-adapter-transactional-tests/tests/programmable/unused_values_valid.exp index 3775f2f28dc..867c31f5faa 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/unused_values_valid.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable/unused_values_valid.exp @@ -7,7 +7,7 @@ task 1, lines 9-31: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 7242800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7235200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 32-36: //# programmable --sender A --inputs @A @@ -16,7 +16,7 @@ task 2, lines 32-36: // unused inputs and unused objects and unused results of various kinds created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 37-42: //# programmable --sender A --inputs object(2,0) 0 vector[@0,@0] @@ -25,7 +25,7 @@ task 3, lines 37-42: //> 2: test::m1::cup(Result(0)); // unconsumed copyable value, but most recent usage was by-value mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 2204000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 2188800, non_refundable_storage_fee: 0 task 4, lines 43-50: //# programmable --sender A @@ -36,10 +36,10 @@ task 4, lines 43-50: //> 4: test::m1::copy_(Result(0)); // unused pure that was cast mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, lines 51-52: //# programmable --sender A --inputs 0 //> test::m1::num_mut(Input(0)) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/coin_limit.exp b/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/coin_limit.exp index 80ce5fcd4fe..5df829ff02d 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/coin_limit.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/coin_limit.exp @@ -7,7 +7,7 @@ task 1, lines 7-26: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 6665200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6657600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 27-30: //# programmable --sender A --inputs 100 --gas-budget 10000000000 @@ -15,7 +15,7 @@ task 2, lines 27-30: //> 1: test::m1::purchase(Result(0)); created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3260400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3237600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 32: //# view-object 2,0 @@ -60,7 +60,7 @@ task 6, lines 43-48: //> TransferObjects([Result(1), Result(2)], Input(1)); created: object(6,0), object(6,1), object(6,2), object(6,3) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5532800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5494800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, line 50: //# view-object 6,0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/make_vec.exp b/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/make_vec.exp index 6e28470220d..b5ee128d315 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/make_vec.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/make_vec.exp @@ -7,7 +7,7 @@ task 1, lines 7-50: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 8732400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8724800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 52-58: //# programmable --inputs 112u64 @@ -18,7 +18,7 @@ task 2, lines 52-58: //> 2: MakeMoveVec>([Result(0), Result(0)]); //> 3: test::m1::vec_vec_u64(Result(2)); mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, lines 60-66: //# programmable --inputs vector[226u8,157u8,164u8,239u8,184u8,143u8] @@ -29,7 +29,7 @@ task 3, lines 60-66: //> 2: MakeMoveVec>([Result(0), Result(0)]); //> 3: test::m1::vec_vec_string(Result(2)); mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, lines 68-71: //# programmable --inputs vector[vector[226u8,157u8,164u8,239u8,184u8,143u8]] vector[] @@ -37,7 +37,7 @@ task 4, lines 68-71: //> 0: MakeMoveVec>([Input(0), Input(1)]); //> 1: test::m1::vec_option_string(Result(0)); mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, lines 73-76: //# programmable --inputs vector[255u8,157u8,164u8,239u8,184u8,143u8] @@ -54,4 +54,4 @@ task 6, lines 78-82: //> 2: MakeMoveVec([Result(0), Result(1)]); //> 3: test::m1::burn_markers(Result(2)); mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/make_vec_shared.exp b/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/make_vec_shared.exp index c64beb01fe8..56b167190c0 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/make_vec_shared.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/make_vec_shared.exp @@ -7,13 +7,13 @@ task 1, lines 9-30: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 6034400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6026800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 32: //# run t2::o2::create created: object(2,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 34: //# view-object 2,0 @@ -33,4 +33,4 @@ task 4, lines 36-38: //> t2::o2::consume(Result(0)) mutated: object(0,0) deleted: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 1238800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 1231200, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/merge_coin_shared.exp b/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/merge_coin_shared.exp index 876f7cb749a..0452ac15785 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/merge_coin_shared.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/merge_coin_shared.exp @@ -7,13 +7,13 @@ task 1, lines 9-27: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 5198400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5190800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 29: //# run test::m1::mint_shared created: object(2,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2287600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2272400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 31: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/merge_coin_shared_real_coin.exp b/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/merge_coin_shared_real_coin.exp index 7b17439c5d2..9d1e5d57c9d 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/merge_coin_shared_real_coin.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/merge_coin_shared_real_coin.exp @@ -7,13 +7,13 @@ task 1, lines 9-18: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 4826000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4818400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 20: //# run test::m1::mint_shared created: object(2,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 22: //# view-object 2,0 @@ -35,4 +35,4 @@ task 4, lines 24-25: //> MergeCoins(Gas, [Input(0)]) mutated: object(0,0) deleted: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/publish.exp b/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/publish.exp index f35bae093e1..88afa4c34d8 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/publish.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/publish.exp @@ -12,7 +12,7 @@ task 3, lines 29-34: //> TransferObjects([Result(1), Result(3)], Input(1)) created: object(3,0), object(3,1), object(3,2), object(3,3), object(3,4) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 8876800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8846400, storage_rebate: 0, non_refundable_storage_fee: 0 task 4, line 36: //# view-object 3,3 @@ -27,15 +27,15 @@ task 8, lines 44-46: //> 0: q::m::x(); //> p::m::foo(Result(0)) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 9, lines 48-53: //# publish --dependencies p q created: object(9,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 5221200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5213600, storage_rebate: 0, non_refundable_storage_fee: 0 task 10, line 55: //# run r::all::foo_x mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/receipt.exp b/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/receipt.exp index d7888863205..991cd7def83 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/receipt.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/receipt.exp @@ -4,7 +4,7 @@ task 1, lines 7-24: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6224400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6216800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 26-30: //# programmable @@ -13,7 +13,7 @@ task 2, lines 26-30: //> test::m1::epilogue(Result(0)); created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2249600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2234400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 32: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/split_coin_share.exp b/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/split_coin_share.exp index 02506be618b..b91f381b3c2 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/split_coin_share.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/split_coin_share.exp @@ -7,7 +7,7 @@ task 1, lines 7-19: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 5008400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5000800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 21-23: //# programmable --sender A --inputs 10 @@ -15,7 +15,7 @@ task 2, lines 21-23: //> 1: iota::transfer::public_share_object>(Result(0)); created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 25-27: //# programmable --sender A --inputs 10 @@ -23,13 +23,13 @@ task 3, lines 25-27: //> 1: p::m::sharer>(Result(0)); created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 29: //# run p::m::mint_shared created: object(4,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, lines 31-33: //# view-object 4,0 @@ -53,7 +53,7 @@ task 6, lines 34-38: // This is not OK -- split off from a shared object and transfer shared object created: object(6,0) mutated: object(0,0), object(4,0) -gas summary: computation_cost: 1000000, storage_cost: 2964000, storage_rebate: 1976000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2941200, storage_rebate: 1960800, non_refundable_storage_fee: 0 task 7, lines 39-42: //# programmable --sender A --inputs 0 object(4,0) @A diff --git a/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/transfer_shared.exp b/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/transfer_shared.exp index 0e3554adfc4..7c5fdfa5937 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/transfer_shared.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/transfer_shared.exp @@ -7,13 +7,13 @@ task 1, lines 9-23: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5031200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5023600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 25: //# run t2::o2::create created: object(2,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 27: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/upgrade.exp b/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/upgrade.exp index 129dd1e2478..999787c962f 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/upgrade.exp +++ b/crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/upgrade.exp @@ -7,19 +7,19 @@ task 1, lines 9-19: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 4354800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4347200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 21-24: //# publish --upgradeable --sender A created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5076800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5061600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 26-29: //# publish created: object(3,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 3442800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3435200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, lines 37-42: //# programmable --sender A --inputs 10 @A object(2,0) 0u8 digest(q_2) @@ -30,7 +30,7 @@ task 5, lines 37-42: //> iota::package::commit_upgrade(Input(2), Result(2)) created: object(5,0), object(5,1) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 7052800, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7030000, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 6, lines 44-46: //# programmable --sender A @@ -44,15 +44,15 @@ task 8, lines 50-52: //> 0: q_2::m::x(); //> p::m::foo(Result(0)) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 9, lines 54-59: //# publish --dependencies p q_2 r created: object(9,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 5768400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5760800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 10, line 61: //# run s::all::foo_x mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/publish/init.exp b/crates/iota-adapter-transactional-tests/tests/publish/init.exp index 5266ed4a781..2bde284c4f5 100644 --- a/crates/iota-adapter-transactional-tests/tests/publish/init.exp +++ b/crates/iota-adapter-transactional-tests/tests/publish/init.exp @@ -4,7 +4,7 @@ task 1, lines 7-20: //# publish created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6642400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6627200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 22: //# view-object 1,1 diff --git a/crates/iota-adapter-transactional-tests/tests/publish/multi_module_publish.exp b/crates/iota-adapter-transactional-tests/tests/publish/multi_module_publish.exp index 2a98709b6e4..4514d3ef2dd 100644 --- a/crates/iota-adapter-transactional-tests/tests/publish/multi_module_publish.exp +++ b/crates/iota-adapter-transactional-tests/tests/publish/multi_module_publish.exp @@ -4,7 +4,7 @@ task 1, lines 7-14: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5046400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5038800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 16: //# view-object 1,0 diff --git a/crates/iota-adapter-transactional-tests/tests/publish/publish_with_upgrade.exp b/crates/iota-adapter-transactional-tests/tests/publish/publish_with_upgrade.exp index 22755505e6f..9974bef7c0d 100644 --- a/crates/iota-adapter-transactional-tests/tests/publish/publish_with_upgrade.exp +++ b/crates/iota-adapter-transactional-tests/tests/publish/publish_with_upgrade.exp @@ -4,7 +4,7 @@ task 1, lines 7-10: //# publish --upgradeable created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5532800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5517600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 12: //# view-object 1,1 diff --git a/crates/iota-adapter-transactional-tests/tests/random/happy_flows.exp b/crates/iota-adapter-transactional-tests/tests/random/happy_flows.exp index a48ef645fc0..cdbf46a875f 100644 --- a/crates/iota-adapter-transactional-tests/tests/random/happy_flows.exp +++ b/crates/iota-adapter-transactional-tests/tests/random/happy_flows.exp @@ -7,7 +7,7 @@ task 1, lines 7-26: //# publish --sender A created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6209200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6201600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 27-30: //# programmable --sender A --inputs immshared(8) @@ -15,7 +15,7 @@ task 2, lines 27-30: // Good tx - use Clock and then Random mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000008 -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, lines 31-35: //# programmable --sender A --inputs immshared(6) immshared(8) @A @@ -24,7 +24,7 @@ task 3, lines 31-35: // Good tx - use value and then Random mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000006, 0x0000000000000000000000000000000000000000000000000000000000000008 -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, lines 36-40: //# programmable --sender A --inputs 10 immshared(8) @A @@ -33,7 +33,7 @@ task 4, lines 36-40: // Good tx - use Clock, then Random, then transfer mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000008 -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, lines 41-47: //# programmable --sender A --inputs 10 immshared(6) immshared(8) @B @@ -45,7 +45,7 @@ task 5, lines 41-47: created: object(5,0) mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000006, 0x0000000000000000000000000000000000000000000000000000000000000008 -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, lines 48-54: //# programmable --sender A --inputs 10 immshared(6) immshared(8) @B @@ -56,11 +56,11 @@ task 6, lines 48-54: // Good tx - use Random twice in the same call mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000006, 0x0000000000000000000000000000000000000000000000000000000000000008 -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, lines 55-56: //# programmable --sender A --inputs immshared(8) //> test::random::use_random_twice(Input(0), Input(0)); mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000008 -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/random/move_call_clock_after_random.exp b/crates/iota-adapter-transactional-tests/tests/random/move_call_clock_after_random.exp index 68bd4686b0c..08bbe44dfed 100644 --- a/crates/iota-adapter-transactional-tests/tests/random/move_call_clock_after_random.exp +++ b/crates/iota-adapter-transactional-tests/tests/random/move_call_clock_after_random.exp @@ -7,7 +7,7 @@ task 1, lines 7-16: //# publish --sender A created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4240800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4233200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 17-19: //# programmable --sender A --inputs immshared(8) immshared(6) @A diff --git a/crates/iota-adapter-transactional-tests/tests/random/move_call_clock_after_random_and_transfer.exp b/crates/iota-adapter-transactional-tests/tests/random/move_call_clock_after_random_and_transfer.exp index 9593a6bb073..14b379f2406 100644 --- a/crates/iota-adapter-transactional-tests/tests/random/move_call_clock_after_random_and_transfer.exp +++ b/crates/iota-adapter-transactional-tests/tests/random/move_call_clock_after_random_and_transfer.exp @@ -7,7 +7,7 @@ task 1, lines 7-16: //# publish --sender A created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4240800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4233200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 17-21: //# programmable --sender A --inputs 10 immshared(8) immshared(6) @B diff --git a/crates/iota-adapter-transactional-tests/tests/random/move_call_u64_after_random.exp b/crates/iota-adapter-transactional-tests/tests/random/move_call_u64_after_random.exp index 368fb5b82a4..79a41e3daa2 100644 --- a/crates/iota-adapter-transactional-tests/tests/random/move_call_u64_after_random.exp +++ b/crates/iota-adapter-transactional-tests/tests/random/move_call_u64_after_random.exp @@ -7,7 +7,7 @@ task 1, lines 7-15: //# publish --sender A created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4081200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4073600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 16-18: //# programmable --sender A --inputs 16 immshared(8) diff --git a/crates/iota-adapter-transactional-tests/tests/random/two_move_calls_with_random.exp b/crates/iota-adapter-transactional-tests/tests/random/two_move_calls_with_random.exp index 3997e308694..985b1930d33 100644 --- a/crates/iota-adapter-transactional-tests/tests/random/two_move_calls_with_random.exp +++ b/crates/iota-adapter-transactional-tests/tests/random/two_move_calls_with_random.exp @@ -7,7 +7,7 @@ task 1, lines 7-14: //# publish --sender A created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3898800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3891200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 15-17: //# programmable --sender A --inputs immshared(8) @A diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/basic_receive.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/basic_receive.exp index 908a74dc187..81f51cdb649 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/basic_receive.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/basic_receive.exp @@ -4,13 +4,13 @@ task 1, lines 7-31: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6923600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6916000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 33: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 35: //# view-object 2,0 @@ -39,7 +39,7 @@ Contents: tto::M1::B { task 5, line 40: //# run tto::M1::receiver --args object(2,0) receiving(2,1) mutated: object(0,0), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 3420000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 3397200, non_refundable_storage_fee: 0 task 6, line 42: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/drop_receiving.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/drop_receiving.exp index 8663e1034d1..5267688fe4d 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/drop_receiving.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/drop_receiving.exp @@ -4,20 +4,20 @@ task 1, lines 7-35: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 7144000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7136400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 37: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, lines 39-42: //# programmable --inputs object(2,0) receiving(2,1) //> tto::M1::send_back(Input(0), Input(1)) // Include the receiving argument, but don't use it at the PTB level mutated: object(0,0), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 3420000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 3397200, non_refundable_storage_fee: 0 task 4, lines 43-47: //# programmable --inputs object(2,0) receiving(2,1) @@ -25,10 +25,10 @@ task 4, lines 43-47: // Include the receiving argument, but don't use it at the Move level. The // receiving object should not be mutated by this. mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 2204000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 2188800, non_refundable_storage_fee: 0 task 5, lines 48-49: //# programmable --inputs object(2,0) receiving(2,1) //> tto::M1::nop_with_receiver(Input(0), Input(1)) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 2204000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 2188800, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/duplicate_receive_argument.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/duplicate_receive_argument.exp index 60a402131d1..4ea16eb1414 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/duplicate_receive_argument.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/duplicate_receive_argument.exp @@ -4,20 +4,20 @@ task 1, lines 7-32: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6756400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6748800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 34: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, lines 36-39: //# programmable --inputs object(2,0) receiving(2,1) //> tto::M1::send_back(Input(0), Input(1)) // Duplicate object ref in input mutated: object(0,0), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 3420000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 3397200, non_refundable_storage_fee: 0 task 4, lines 40-43: //# programmable --inputs object(2,0) receiving(2,1) receiving(2,1) diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/move_vec_receiving_types.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/move_vec_receiving_types.exp index cefbd15b833..f2c18fec939 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/move_vec_receiving_types.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/move_vec_receiving_types.exp @@ -4,13 +4,13 @@ task 1, lines 7-64: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 10579200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 10571600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 66: //# run tto::M1::start created: object(2,0), object(2,1), object(2,2), object(2,3), object(2,4) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 7068000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7022400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 68: //# view-object 2,0 @@ -77,7 +77,7 @@ task 8, lines 79-82: //> 0: MakeMoveVec>([Input(1), Input(2), Input(3), Input(4)]); // As long as you don't load the object the type will not be checked. mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 2204000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 2188800, non_refundable_storage_fee: 0 task 9, lines 83-87: //# programmable --inputs object(2,0) receiving(2,1) receiving(2,2) receiving(2,3) receiving(2,4) @@ -85,7 +85,7 @@ task 9, lines 83-87: //> 1: tto::M1::receive_none(Result(0)); // Try to pass the wrong-type move vec to the function mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 2204000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 2188800, non_refundable_storage_fee: 0 task 10, lines 88-93: //# programmable --inputs object(2,0) receiving(2,1) receiving(2,2) receiving(2,3) receiving(2,4) diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/pass_receiver_immut_then_reuse.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/pass_receiver_immut_then_reuse.exp index 4ba3e8cd0f7..133a72daf98 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/pass_receiver_immut_then_reuse.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/pass_receiver_immut_then_reuse.exp @@ -4,13 +4,13 @@ task 1, lines 7-33: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 7174400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7166800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 35: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 37: //# view-object 2,0 @@ -41,4 +41,4 @@ task 5, lines 42-44: //> tto::M1::pass_through(Input(1)); //> tto::M1::receiver(Input(0), Input(1)); mutated: object(0,0), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 3420000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 3397200, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/pass_receiver_mut_then_reuse.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/pass_receiver_mut_then_reuse.exp index 4ba3e8cd0f7..133a72daf98 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/pass_receiver_mut_then_reuse.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/pass_receiver_mut_then_reuse.exp @@ -4,13 +4,13 @@ task 1, lines 7-33: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 7174400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7166800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 35: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 37: //# view-object 2,0 @@ -41,4 +41,4 @@ task 5, lines 42-44: //> tto::M1::pass_through(Input(1)); //> tto::M1::receiver(Input(0), Input(1)); mutated: object(0,0), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 3420000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 3397200, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/pt_receive_type_fixing.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/pt_receive_type_fixing.exp index e3dcf77656f..e03e30fe31b 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/pt_receive_type_fixing.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/pt_receive_type_fixing.exp @@ -4,13 +4,13 @@ task 1, lines 7-51: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 8937600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8930000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 53: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 55: //# view-object 2,0 @@ -41,7 +41,7 @@ task 5, lines 61-63: //> 0: tto::M1::pass_through(Input(1)); //> tto::M1::receiver(Input(0), Result(0)); mutated: object(0,0), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 3420000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 3397200, non_refundable_storage_fee: 0 task 6, lines 65-67: //# programmable --inputs object(2,0) receiving(2,1) diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_add_dof_and_mutate.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_add_dof_and_mutate.exp index a638507a60c..77d2b4c4972 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_add_dof_and_mutate.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_add_dof_and_mutate.exp @@ -7,13 +7,13 @@ task 1, lines 7-37: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 7835600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7828000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 39: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 3541600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3518800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 41: //# view-object 2,0 @@ -45,11 +45,11 @@ task 5, line 45: //# run tto::M1::receive --args object(2,1) receiving(2,0) created: object(5,0), object(5,1), object(5,2) mutated: object(0,1), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 9728000, storage_rebate: 3541600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9682400, storage_rebate: 3518800, non_refundable_storage_fee: 0 task 6, line 47: //# view-object 2,0 -Owner: Object ID: ( fake(5,1) ) +Owner: Object ID: ( fake(5,0) ) Version: 4 Contents: tto::M1::A { id: iota::object::UID { @@ -75,7 +75,7 @@ Contents: tto::M1::A { task 8, line 51: //# view-object 5,0 -Owner: Object ID: ( fake(2,0) ) +Owner: Object ID: ( fake(2,1) ) Version: 4 Contents: iota::dynamic_field::Field, iota::object::ID> { id: iota::object::UID { @@ -87,13 +87,13 @@ Contents: iota::dynamic_field::Field, i name: 0u64, }, value: iota::object::ID { - bytes: fake(5,2), + bytes: fake(2,0), }, } task 9, line 53: //# view-object 5,1 -Owner: Object ID: ( fake(2,1) ) +Owner: Object ID: ( fake(2,0) ) Version: 4 Contents: iota::dynamic_field::Field, iota::object::ID> { id: iota::object::UID { @@ -105,13 +105,13 @@ Contents: iota::dynamic_field::Field, i name: 0u64, }, value: iota::object::ID { - bytes: fake(2,0), + bytes: fake(5,2), }, } task 10, line 55: //# view-object 5,2 -Owner: Object ID: ( fake(5,0) ) +Owner: Object ID: ( fake(5,1) ) Version: 4 Contents: tto::M1::A { id: iota::object::UID { diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_and_abort.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_and_abort.exp index 008b4c01dbc..c00acfca7c5 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_and_abort.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_and_abort.exp @@ -4,13 +4,13 @@ task 1, lines 7-31: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6688000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6680400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 33: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 35: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_and_deleted.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_and_deleted.exp index 6b28a2e9003..6fdd83dfa03 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_and_deleted.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_and_deleted.exp @@ -4,13 +4,13 @@ task 1, lines 7-31: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6726000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6718400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 33: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 35: //# view-object 2,0 @@ -40,7 +40,7 @@ task 5, line 40: //# run tto::M1::deleter --args object(2,0) receiving(2,1) mutated: object(0,0), object(2,0) deleted: object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 3420000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 3397200, non_refundable_storage_fee: 0 task 6, line 42: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_and_send_back.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_and_send_back.exp index b8d99293b18..42d60c4a873 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_and_send_back.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_and_send_back.exp @@ -4,13 +4,13 @@ task 1, lines 7-32: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6756400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6748800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 34: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 36: //# view-object 2,0 @@ -39,7 +39,7 @@ Contents: tto::M1::B { task 5, line 41: //# run tto::M1::send_back --args object(2,0) receiving(2,1) mutated: object(0,0), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 3420000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 3397200, non_refundable_storage_fee: 0 task 6, line 43: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_and_wrap.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_and_wrap.exp index ed2a488b9de..895dd85d85f 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_and_wrap.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_and_wrap.exp @@ -4,13 +4,13 @@ task 1, lines 7-40: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 7569600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7562000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 42: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 44: //# view-object 2,0 @@ -41,7 +41,7 @@ task 5, line 49: created: object(5,0) mutated: object(0,0), object(2,0) wrapped: object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 3708800, storage_rebate: 3420000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3686000, storage_rebate: 3397200, non_refundable_storage_fee: 0 task 6, line 51: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_by_ref.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_by_ref.exp index 592eb63529c..d5cd40e7c65 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_by_ref.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_by_ref.exp @@ -4,13 +4,13 @@ task 1, lines 7-40: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 9872400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9864800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 42: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 44: //# view-object 2,0 @@ -39,12 +39,12 @@ Contents: tto::M1::B { task 5, line 48: //# run tto::M1::call_mut_ref --args object(2,0) receiving(2,1) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 2204000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 2188800, non_refundable_storage_fee: 0 task 6, line 50: //# run tto::M1::call_immut_ref --args object(2,0) receiving(2,1) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 2204000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 2188800, non_refundable_storage_fee: 0 task 7, line 52: //# run tto::M1::call_mut_ref_ret --args object(2,0) receiving(2,1) @@ -60,7 +60,7 @@ task 9, lines 56-57: //# programmable --inputs receiving(2,1) //> tto::M1::immut_immut_ref(Input(0), Input(0)) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 10, lines 59-60: //# programmable --inputs receiving(2,1) diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_by_value_flow_through.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_by_value_flow_through.exp index 192285ee3d2..14519260408 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_by_value_flow_through.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_by_value_flow_through.exp @@ -4,13 +4,13 @@ task 1, lines 7-29: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6437200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6429600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 31: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 33: //# view-object 2,0 @@ -39,9 +39,9 @@ Contents: tto::M1::B { task 5, lines 38-40: //# run tto::M1::flow --args object(2,0) receiving(2,1) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 2204000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 2188800, non_refundable_storage_fee: 0 task 6, line 41: //# run tto::M1::drop --args object(2,0) receiving(2,1) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 2204000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 2188800, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_dof_and_mutate.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_dof_and_mutate.exp index 6048d59c895..7ae7b518a99 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_dof_and_mutate.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_dof_and_mutate.exp @@ -7,17 +7,17 @@ task 1, lines 7-35: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 7828000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7820400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 37: //# run tto::M1::start --sender A created: object(2,0), object(2,1), object(2,2), object(2,3) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 7273200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7235200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 39: //# view-object 2,0 -Owner: Object ID: ( fake(2,3) ) +Owner: Object ID: ( fake(2,2) ) Version: 2 Contents: iota::dynamic_field::Field, iota::object::ID> { id: iota::object::UID { @@ -29,13 +29,13 @@ Contents: iota::dynamic_field::Field, i name: 0u64, }, value: iota::object::ID { - bytes: fake(2,1), + bytes: fake(2,3), }, } task 4, line 41: //# view-object 2,1 -Owner: Object ID: ( fake(2,0) ) +Owner: Account Address ( A ) Version: 2 Contents: tto::M1::A { id: iota::object::UID { @@ -48,7 +48,7 @@ Contents: tto::M1::A { task 5, line 43: //# view-object 2,2 -Owner: Account Address ( A ) +Owner: Account Address ( fake(2,1) ) Version: 2 Contents: tto::M1::A { id: iota::object::UID { @@ -61,7 +61,7 @@ Contents: tto::M1::A { task 6, line 45: //# view-object 2,3 -Owner: Account Address ( fake(2,2) ) +Owner: Object ID: ( fake(2,0) ) Version: 2 Contents: tto::M1::A { id: iota::object::UID { @@ -73,14 +73,14 @@ Contents: tto::M1::A { } task 7, line 47: -//# run tto::M1::receive --args object(2,2) receiving(2,3) --sender A +//# run tto::M1::receive --args object(2,1) receiving(2,2) --sender A created: object(7,0) -mutated: object(0,0), object(2,2), object(2,3) -gas summary: computation_cost: 1000000, storage_cost: 5996400, storage_rebate: 3541600, non_refundable_storage_fee: 0 +mutated: object(0,0), object(2,1), object(2,2) +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5966000, storage_rebate: 3518800, non_refundable_storage_fee: 0 task 8, line 49: //# view-object 2,0 -Owner: Object ID: ( fake(2,3) ) +Owner: Object ID: ( fake(2,2) ) Version: 2 Contents: iota::dynamic_field::Field, iota::object::ID> { id: iota::object::UID { @@ -92,14 +92,14 @@ Contents: iota::dynamic_field::Field, i name: 0u64, }, value: iota::object::ID { - bytes: fake(2,1), + bytes: fake(2,3), }, } task 9, line 51: //# view-object 2,1 -Owner: Object ID: ( fake(2,0) ) -Version: 2 +Owner: Account Address ( A ) +Version: 3 Contents: tto::M1::A { id: iota::object::UID { id: iota::object::ID { @@ -111,7 +111,7 @@ Contents: tto::M1::A { task 10, line 53: //# view-object 2,2 -Owner: Account Address ( A ) +Owner: Object ID: ( fake(7,0) ) Version: 3 Contents: tto::M1::A { id: iota::object::UID { @@ -119,18 +119,18 @@ Contents: tto::M1::A { bytes: fake(2,2), }, }, - value: 0u64, + value: 100u64, } task 11, line 55: //# view-object 2,3 -Owner: Object ID: ( fake(7,0) ) -Version: 3 +Owner: Object ID: ( fake(2,0) ) +Version: 2 Contents: tto::M1::A { id: iota::object::UID { id: iota::object::ID { bytes: fake(2,3), }, }, - value: 100u64, + value: 0u64, } diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_dof_and_mutate.move b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_dof_and_mutate.move index 7fc954f55c2..2cb344d05d3 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_dof_and_mutate.move +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_dof_and_mutate.move @@ -44,7 +44,7 @@ module tto::M1 { //# view-object 2,3 -//# run tto::M1::receive --args object(2,2) receiving(2,3) --sender A +//# run tto::M1::receive --args object(2,1) receiving(2,2) --sender A //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_duo_struct.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_duo_struct.exp index 30abaca7589..0f413e31ad3 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_duo_struct.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_duo_struct.exp @@ -4,13 +4,13 @@ task 1, lines 7-45: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 8071200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8063600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 47: //# run tto::M1::start created: object(2,0), object(2,1), object(2,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4636000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4605600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 49: //# view-object 2,0 @@ -53,7 +53,7 @@ task 6, lines 56-59: //> 0: tto::M1::make_duo(Input(1), Input(2)) // receive the objects and return them. Error since we need to do something with the returned objects mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 2204000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 2188800, non_refundable_storage_fee: 0 task 7, lines 60-64: //# programmable --inputs object(2,0) receiving(2,1) receiving(2,1) @@ -68,4 +68,4 @@ task 8, lines 65-68: //> 1: tto::M1::receive_duo(Input(0), Result(0)); //> 2: TransferObjects([NestedResult(1, 0), NestedResult(1, 1)], Input(3)); mutated: object(0,0), object(2,0), object(2,1), object(2,2) -gas summary: computation_cost: 1000000, storage_cost: 4636000, storage_rebate: 4636000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4605600, storage_rebate: 4605600, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_invalid_param_ty.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_invalid_param_ty.exp index 1cef307d7f1..dd9e297c78e 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_invalid_param_ty.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_invalid_param_ty.exp @@ -4,13 +4,13 @@ task 1, lines 7-42: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 8519600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8512000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 44: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 46: //# view-object 2,0 @@ -73,7 +73,7 @@ Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { k task 12, line 64: //# run tto::M1::receiver6 --args receiving(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 13, line 66: //# run tto::M1::receiver6 --args 0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_invalid_type.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_invalid_type.exp index 74fafc9220a..73cef763217 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_invalid_type.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_invalid_type.exp @@ -4,13 +4,13 @@ task 1, lines 7-31: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6923600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6916000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 33: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 35: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_many_move_vec.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_many_move_vec.exp index c8cb8afd5b8..e3607a25ccc 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_many_move_vec.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_many_move_vec.exp @@ -4,13 +4,13 @@ task 1, lines 7-78: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 11286000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 11278400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 80: //# run tto::M1::start created: object(2,0), object(2,1), object(2,2), object(2,3), object(2,4) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 7068000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7022400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 82: //# view-object 2,0 @@ -77,7 +77,7 @@ task 8, lines 93-96: //> 0: MakeMoveVec>([Input(1), Input(2), Input(3), Input(4)]); // Make the Move vec and pass, but never receive mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 2204000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 2188800, non_refundable_storage_fee: 0 task 9, lines 97-101: //# programmable --inputs object(2,0) receiving(2,1) receiving(2,2) receiving(2,3) receiving(2,4) @@ -85,7 +85,7 @@ task 9, lines 97-101: //> 1: tto::M1::receive_none(Input(0), Result(0)); // Make the Move vec of receiving arguments and then receive all but the last. Only the ince we receive should be mutated mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 2204000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 2188800, non_refundable_storage_fee: 0 task 10, lines 102-106: //# programmable --inputs object(2,0) receiving(2,1) receiving(2,2) receiving(2,3) receiving(2,4) @@ -93,7 +93,7 @@ task 10, lines 102-106: //> 1: tto::M1::receive_all_but_last(Input(0), Result(0)); // Make the Move vec of receiving arguments, pass to a function by immref, then later use the vec to receive all of them mutated: object(0,0), object(2,0), object(2,2), object(2,3), object(2,4) -gas summary: computation_cost: 1000000, storage_cost: 5852000, storage_rebate: 5852000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5814000, storage_rebate: 5814000, non_refundable_storage_fee: 0 task 11, lines 107-112: //# programmable --inputs object(2,0) receiving(2,1) receiving(2,2) receiving(2,3) receiving(2,4) @@ -102,7 +102,7 @@ task 11, lines 107-112: //> 2: tto::M1::receive_all_send_back(Input(0), Result(0)); // Make the Move vec of receiving arguments, pass to a function by mutref, then later use the vec to receive all of them mutated: object(0,0), object(2,0), object(2,1), object(2,2), object(2,3), object(2,4) -gas summary: computation_cost: 1000000, storage_cost: 7068000, storage_rebate: 7068000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7022400, storage_rebate: 7022400, non_refundable_storage_fee: 0 task 12, lines 113-118: //# programmable --inputs object(2,0) receiving(2,1) receiving(2,2) receiving(2,3) receiving(2,4) @@ -111,7 +111,7 @@ task 12, lines 113-118: //> 2: tto::M1::receive_all_send_back(Input(0), Result(0)); // Make the Move vec of receiving arguments, pass to a function by mutref and receive some mutated: object(0,0), object(2,0), object(2,1), object(2,2), object(2,3), object(2,4) -gas summary: computation_cost: 1000000, storage_cost: 7068000, storage_rebate: 7068000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7022400, storage_rebate: 7022400, non_refundable_storage_fee: 0 task 13, lines 119-124: //# programmable --inputs object(2,0) receiving(2,1) receiving(2,2) receiving(2,3) receiving(2,4) @@ -120,7 +120,7 @@ task 13, lines 119-124: //> 2: tto::M1::receive_all_by_mut_ref(Input(0), Result(0)); // Make the Move vec of receiving arguments, pass to a function by mutref, receive some, then pass by mutref again to receive the rest mutated: object(0,0), object(2,0), object(2,1), object(2,2), object(2,3), object(2,4) -gas summary: computation_cost: 1000000, storage_cost: 7068000, storage_rebate: 7068000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7022400, storage_rebate: 7022400, non_refundable_storage_fee: 0 task 14, lines 125-130: //# programmable --inputs object(2,0) receiving(2,1) receiving(2,2) receiving(2,3) receiving(2,4) @@ -129,7 +129,7 @@ task 14, lines 125-130: //> 2: tto::M1::receive_all_by_mut_ref(Input(0), Result(0)); // Make the Move vec of receiving arguments, pass to a function by mutref, receive some, then pass by value to receive the rest mutated: object(0,0), object(2,0), object(2,1), object(2,2), object(2,3), object(2,4) -gas summary: computation_cost: 1000000, storage_cost: 7068000, storage_rebate: 7068000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7022400, storage_rebate: 7022400, non_refundable_storage_fee: 0 task 15, lines 131-136: //# programmable --inputs object(2,0) receiving(2,1) receiving(2,2) receiving(2,3) receiving(2,4) @@ -138,14 +138,14 @@ task 15, lines 131-136: //> 2: tto::M1::receive_all_send_back(Input(0), Result(0)); // Make the Move vec of receiving arguments and then receive all of them mutated: object(0,0), object(2,0), object(2,1), object(2,2), object(2,3), object(2,4) -gas summary: computation_cost: 1000000, storage_cost: 7068000, storage_rebate: 7068000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7022400, storage_rebate: 7022400, non_refundable_storage_fee: 0 task 16, lines 137-139: //# programmable --inputs object(2,0) receiving(2,1) receiving(2,2) receiving(2,3) receiving(2,4) //> 0: MakeMoveVec>([Input(1), Input(2), Input(3), Input(4)]); //> 1: tto::M1::receive_all(Input(0), Result(0)); mutated: object(0,0), object(2,0), object(2,1), object(2,2), object(2,3), object(2,4) -gas summary: computation_cost: 1000000, storage_cost: 7068000, storage_rebate: 7068000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7022400, storage_rebate: 7022400, non_refundable_storage_fee: 0 task 17, line 141: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_multiple_times_in_row.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_multiple_times_in_row.exp index 0548f79bf28..56760703400 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_multiple_times_in_row.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_multiple_times_in_row.exp @@ -7,19 +7,19 @@ task 1, lines 7-37: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 7007200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6999600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 39: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 41: //# run tto::M1::middle --sender A created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 0, non_refundable_storage_fee: 0 task 4, line 43: //# view-object 2,0 @@ -48,7 +48,7 @@ Contents: tto::M1::B { task 6, line 48: //# run tto::M1::send_back --args object(2,0) receiving(2,1) mutated: object(0,1), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 3420000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 3397200, non_refundable_storage_fee: 0 task 7, line 50: //# view-object 2,0 @@ -82,7 +82,7 @@ Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { k task 10, lines 58-60: //# run tto::M1::send_back --args object(2,0) receiving(2,1)@4 mutated: object(0,1), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 3420000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 3397200, non_refundable_storage_fee: 0 task 11, lines 61-63: //# run tto::M1::send_back --summarize --args object(3,0) receiving(2,1)@6 --sender A @@ -92,4 +92,4 @@ Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { k task 12, line 64: //# run tto::M1::send_back --args object(2,0) receiving(2,1)@6 mutated: object(0,1), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 3420000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 3397200, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_object_id.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_object_id.exp index 0d9a0ec982f..0057b7d5631 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_object_id.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_object_id.exp @@ -4,13 +4,13 @@ task 1, lines 7-30: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6650000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6642400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 32: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 34: //# view-object 2,0 @@ -39,19 +39,19 @@ Contents: tto::M1::B { task 5, line 38: //# run tto::M1::receiver --args receiving(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, lines 40-41: //# programmable --inputs receiving(2,1) //> iota::transfer::receiving_object_id(Input(0)) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, lines 43-44: //# programmable --inputs receiving(2,1) //> tto::M1::receiver(Input(0)) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, line 46: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_object_owner.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_object_owner.exp index 2b00d3854db..cbae9a9de31 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_object_owner.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_object_owner.exp @@ -7,13 +7,13 @@ task 1, lines 7-29: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 6634800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6627200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 31: //# run tto::M1::start --sender A created: object(2,0), object(2,1), object(2,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5996400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5966000, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 33: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_return_object_dont_touch.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_return_object_dont_touch.exp index e4d034c641f..bbbeb6784fe 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_return_object_dont_touch.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_return_object_dont_touch.exp @@ -4,13 +4,13 @@ task 1, lines 7-30: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6604400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6596800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 32: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 34: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_return_object_then_transfer.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_return_object_then_transfer.exp index b9a0185cbe8..1f9e7c23417 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_return_object_then_transfer.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_return_object_then_transfer.exp @@ -4,13 +4,13 @@ task 1, lines 7-30: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6604400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6596800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 32: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 34: //# view-object 2,0 @@ -41,7 +41,7 @@ task 5, lines 39-41: //> 0: tto::M1::receiver(Input(0), Input(1)); //> TransferObjects([Result(0)], Input(2)) mutated: object(0,0), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 3420000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 3397200, non_refundable_storage_fee: 0 task 6, line 43: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_ticket_coin_operations.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_ticket_coin_operations.exp index 54332050b8b..0720f0f5f38 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/receive_ticket_coin_operations.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/receive_ticket_coin_operations.exp @@ -4,13 +4,13 @@ task 1, lines 7-24: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5928000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5920400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 26: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 28: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/shared_parent/basic_receive.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/shared_parent/basic_receive.exp index 0bc8823f5b5..08dcc76bb85 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/shared_parent/basic_receive.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/shared_parent/basic_receive.exp @@ -4,13 +4,13 @@ task 1, lines 7-31: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6969200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6961600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 33: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 35: //# view-object 2,0 @@ -39,7 +39,7 @@ Contents: tto::M1::B { task 5, line 39: //# run tto::M1::receiver --args object(2,0) receiving(2,1) mutated: object(0,0), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 3420000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 3397200, non_refundable_storage_fee: 0 task 6, line 41: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/shared_parent/drop_receiving.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/shared_parent/drop_receiving.exp index 6c3fcc8c8db..a9745ece8e7 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/shared_parent/drop_receiving.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/shared_parent/drop_receiving.exp @@ -4,20 +4,20 @@ task 1, lines 7-34: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 7182000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7174400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 36: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, lines 38-41: //# programmable --inputs object(2,0) receiving(2,1) //> tto::M1::send_back(Input(0), Input(1)) // Include the receiving argument, but don't use it at the PTB level mutated: object(0,0), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 3420000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 3397200, non_refundable_storage_fee: 0 task 4, lines 42-46: //# programmable --inputs object(2,0) receiving(2,1) @@ -25,10 +25,10 @@ task 4, lines 42-46: // Include the receiving argument, but don't use it at the Move level. The // receiving object should not be mutated by this. mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 2204000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 2188800, non_refundable_storage_fee: 0 task 5, lines 47-48: //# programmable --inputs object(2,0) receiving(2,1) //> tto::M1::nop_with_receiver(Input(0), Input(1)) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 2204000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 2188800, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/shared_parent/receive_dof_and_mutate.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/shared_parent/receive_dof_and_mutate.exp index 9a86a050837..38f4b88ae25 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/shared_parent/receive_dof_and_mutate.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/shared_parent/receive_dof_and_mutate.exp @@ -7,13 +7,13 @@ task 1, lines 7-35: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 7881200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7873600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 37: //# run tto::M1::start created: object(2,0), object(2,1), object(2,2), object(2,3) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 7273200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7235200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 39: //# view-object 2,0 @@ -76,7 +76,7 @@ task 7, line 47: //# run tto::M1::receive --args object(2,3) receiving(2,1) created: object(7,0) mutated: object(0,1), object(2,1), object(2,3) -gas summary: computation_cost: 1000000, storage_cost: 5996400, storage_rebate: 3541600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5966000, storage_rebate: 3518800, non_refundable_storage_fee: 0 task 8, line 49: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/shared_parent/receive_multiple_times_in_row.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/shared_parent/receive_multiple_times_in_row.exp index 1e96a2f8bef..92ae8b70731 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/shared_parent/receive_multiple_times_in_row.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/shared_parent/receive_multiple_times_in_row.exp @@ -7,19 +7,19 @@ task 1, lines 7-38: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 7182000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7174400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 40: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 42: //# run tto::M1::middle --sender A created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 0, non_refundable_storage_fee: 0 task 4, line 44: //# view-object 2,0 @@ -48,7 +48,7 @@ Contents: tto::M1::B { task 6, line 49: //# run tto::M1::send_back --args object(2,0) receiving(2,1) mutated: object(0,1), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 3420000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 3397200, non_refundable_storage_fee: 0 task 7, line 51: //# view-object 2,0 @@ -82,7 +82,7 @@ Debug of error: MoveAbort(MoveLocation { module: ModuleId { address: iota, name: task 10, lines 59-61: //# run tto::M1::send_back --args object(2,0) receiving(2,1)@4 mutated: object(0,1), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 3420000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 3397200, non_refundable_storage_fee: 0 task 11, lines 62-64: //# run tto::M1::send_back --summarize --args object(3,0) receiving(2,1)@6 --sender A @@ -92,4 +92,4 @@ Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { k task 12, line 65: //# run tto::M1::send_back --args object(2,0) receiving(2,1)@6 mutated: object(0,1), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 3420000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 3397200, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/shared_parent/transfer_then_share.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/shared_parent/transfer_then_share.exp index c589dddefe1..67526cec9f4 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/shared_parent/transfer_then_share.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/shared_parent/transfer_then_share.exp @@ -4,13 +4,13 @@ task 1, lines 7-32: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6916000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6908400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 34: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 36: //# view-object 2,0 @@ -39,7 +39,7 @@ Contents: tto::M1::B { task 5, line 40: //# run tto::M1::receiver --args object(2,0) receiving(2,1) mutated: object(0,0), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 3420000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 3397200, non_refundable_storage_fee: 0 task 6, line 42: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/take_receiver_then_try_to_reuse.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/take_receiver_then_try_to_reuse.exp index 196f791f508..393dcc472cc 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/take_receiver_then_try_to_reuse.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/take_receiver_then_try_to_reuse.exp @@ -4,13 +4,13 @@ task 1, lines 7-33: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 7182000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7174400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 35: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 37: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/receive_object/transfer_object_cyclic.exp b/crates/iota-adapter-transactional-tests/tests/receive_object/transfer_object_cyclic.exp index 2985ee43ace..1562d827176 100644 --- a/crates/iota-adapter-transactional-tests/tests/receive_object/transfer_object_cyclic.exp +++ b/crates/iota-adapter-transactional-tests/tests/receive_object/transfer_object_cyclic.exp @@ -4,10 +4,10 @@ task 1, lines 7-25: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5852000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5844400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 27: //# run tto::M1::start created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3420000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3397200, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/runtime_behavior/error_locations.exp b/crates/iota-adapter-transactional-tests/tests/runtime_behavior/error_locations.exp index 56cbc772dec..69d4cf123a8 100644 --- a/crates/iota-adapter-transactional-tests/tests/runtime_behavior/error_locations.exp +++ b/crates/iota-adapter-transactional-tests/tests/runtime_behavior/error_locations.exp @@ -4,7 +4,7 @@ task 1, lines 9-31: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4332000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4324400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 33: //# run test::m::abort_ diff --git a/crates/iota-adapter-transactional-tests/tests/runtime_behavior/versioned_check_swap_loc_new.exp b/crates/iota-adapter-transactional-tests/tests/runtime_behavior/versioned_check_swap_loc_new.exp index 33711e46d14..e4b52feb1d6 100644 --- a/crates/iota-adapter-transactional-tests/tests/runtime_behavior/versioned_check_swap_loc_new.exp +++ b/crates/iota-adapter-transactional-tests/tests/runtime_behavior/versioned_check_swap_loc_new.exp @@ -4,14 +4,14 @@ task 1, lines 9-43: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4491600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4484000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 45: //# run test::m::t1 --args true mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 47: //# run test::m::t2 --args true mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/shared/add_dynamic_field.exp b/crates/iota-adapter-transactional-tests/tests/shared/add_dynamic_field.exp index 9b36142e606..417acb55077 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/add_dynamic_field.exp +++ b/crates/iota-adapter-transactional-tests/tests/shared/add_dynamic_field.exp @@ -7,13 +7,13 @@ task 1, lines 10-33: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 6627200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6619600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 35: //# run a::m::create --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2211600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2196400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 37: //# view-object 2,0 @@ -31,13 +31,13 @@ task 4, line 39: //# run a::m::add_dynamic_field --sender A --args object(2,0) created: object(4,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 3678400, storage_rebate: 2211600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3655600, storage_rebate: 2196400, non_refundable_storage_fee: 0 task 5, line 41: //# run a::m::create --sender A created: object(5,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2211600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2196400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, line 43: //# view-object 5,0 @@ -54,4 +54,4 @@ Contents: a::m::Obj { task 7, line 45: //# run a::m::add_and_remove_dynamic_field --sender A --args object(5,0) mutated: object(0,0), object(5,0) -gas summary: computation_cost: 1000000, storage_cost: 2211600, storage_rebate: 2211600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2196400, storage_rebate: 2196400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/shared/become_dynamic_field.exp b/crates/iota-adapter-transactional-tests/tests/shared/become_dynamic_field.exp index df02210fed3..21f2ae3b4d0 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/become_dynamic_field.exp +++ b/crates/iota-adapter-transactional-tests/tests/shared/become_dynamic_field.exp @@ -7,13 +7,13 @@ task 1, lines 10-40: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 7531600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7524000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 42: //# run a::m::create_shared --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 44: //# view-object 2,0 @@ -36,7 +36,7 @@ task 5, line 48: //# run a::m::create_shared --sender A created: object(5,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, line 50: //# view-object 5,0 @@ -54,4 +54,4 @@ task 7, line 52: //# run a::m::add_and_remove_dynamic_field --sender A --args object(5,0) created: object(7,0) mutated: object(0,0), object(5,0) -gas summary: computation_cost: 1000000, storage_cost: 3465600, storage_rebate: 2226800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3442800, storage_rebate: 2211600, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/shared/become_dynamic_object_field.exp b/crates/iota-adapter-transactional-tests/tests/shared/become_dynamic_object_field.exp index c9da369ac86..5a4f06b2c89 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/become_dynamic_object_field.exp +++ b/crates/iota-adapter-transactional-tests/tests/shared/become_dynamic_object_field.exp @@ -7,13 +7,13 @@ task 1, lines 10-40: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 7691200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7683600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 42: //# run a::m::create_shared --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 44: //# view-object 2,0 @@ -36,7 +36,7 @@ task 5, line 48: //# run a::m::create_shared --sender A created: object(5,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, line 50: //# view-object 5,0 @@ -54,4 +54,4 @@ task 7, line 52: //# run a::m::add_and_remove_dynamic_object_field --sender A --args object(5,0) created: object(7,0) mutated: object(0,0), object(5,0) -gas summary: computation_cost: 1000000, storage_cost: 3465600, storage_rebate: 2226800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3442800, storage_rebate: 2211600, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion.exp b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion.exp index d5f4b218dec..4764acde518 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion.exp +++ b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion.exp @@ -4,19 +4,19 @@ task 1, lines 10-27: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5342800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5335200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 29-37: //# publish --dependencies t2 created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4453600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4446000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 39: //# run t2::o2::create created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, lines 41-43: //# view-object 3,0 @@ -34,13 +34,13 @@ task 5, line 44: //# run t1::o1::consume_o2 --args object(3,0) mutated: object(0,0) deleted: object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 2226800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 2211600, non_refundable_storage_fee: 0 task 6, line 46: //# run t2::o2::create created: object(6,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, lines 48-50: //# view-object 6,0 @@ -58,4 +58,4 @@ task 8, line 51: //# run t2::o2::consume_o2 --args object(6,0) mutated: object(0,0) deleted: object(6,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 2226800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 2211600, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_make_move_vec.exp b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_make_move_vec.exp index 9f48696258f..d31dc71009b 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_make_move_vec.exp +++ b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_make_move_vec.exp @@ -4,19 +4,19 @@ task 1, lines 7-46: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6916000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6908400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 48: //# run t2::o2::create created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 50: //# run t2::o2::create created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 52: //# view-object 2,0 @@ -48,13 +48,13 @@ task 6, lines 57-59: //> 1: t2::o2::delete(Result(0)); mutated: object(0,0), object(2,0) deleted: object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 3465600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 3442800, non_refundable_storage_fee: 0 task 7, line 61: //# run t2::o2::mint_shared_coin created: object(7,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, lines 63-65: //# view-object 7,0 @@ -80,4 +80,4 @@ task 9, lines 66-71: //> 4: t2::o2::share_coin(Result(1)); created: object(9,0) mutated: object(0,0), object(7,0) -gas summary: computation_cost: 1000000, storage_cost: 2964000, storage_rebate: 1976000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2941200, storage_rebate: 1960800, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_make_move_vec_fails.exp b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_make_move_vec_fails.exp index 49333459026..52bbddf17b8 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_make_move_vec_fails.exp +++ b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_make_move_vec_fails.exp @@ -4,19 +4,19 @@ task 1, lines 7-98: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 10959200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 10951600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 100: //# run t2::o2::create created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 102: //# run t2::o2::create created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 104: //# view-object 2,0 @@ -122,7 +122,7 @@ task 15, line 158: //# run t2::o2::mint_shared_coin created: object(15,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 16, lines 160-163: //# view-object 15,0 diff --git a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge.exp b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge.exp index 330c8193b5f..783f63f639b 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge.exp +++ b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge.exp @@ -7,19 +7,19 @@ task 1, lines 14-61: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 9279600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9272000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 63: //# run t2::o2::mint_shared_coin created: object(2,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 65: //# run t2::o2::mint_owned_coin created: object(3,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 67: //# view-object 2,0 @@ -58,25 +58,25 @@ task 6, lines 73-77: // **Merge owned into shared** mutated: object(0,0), object(3,0) deleted: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 1976000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 1960800, non_refundable_storage_fee: 0 task 7, line 79: //# run t2::o2::mint_owned_coin created: object(7,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, line 81: //# run t2::o2::mint_shared_coin created: object(8,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 9, line 83: //# run t2::o2::mint_shared_obj created: object(9,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 10, line 85: //# view-object 7,0 @@ -127,25 +127,25 @@ task 13, lines 92-96: // **Merge shared into shared** mutated: object(0,0), object(9,0) deleted: object(7,0), object(8,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 4202800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 4172400, non_refundable_storage_fee: 0 task 14, line 98: //# run t2::o2::mint_shared_coin created: object(14,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 15, line 100: //# run t2::o2::mint_shared_coin created: object(15,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 16, line 102: //# run t2::o2::mint_shared_obj created: object(16,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 17, line 104: //# view-object 14,0 @@ -195,4 +195,4 @@ task 20, lines 111-113: //> 1: t2::o2::deleter(Input(1)); mutated: object(0,0), object(16,0) deleted: object(14,0), object(15,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 4202800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 4172400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge_fails.exp b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge_fails.exp index a49ae3a5067..9fa33541d90 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge_fails.exp +++ b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge_fails.exp @@ -7,25 +7,25 @@ task 1, lines 14-63: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 9279600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9272000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 65: //# run t2::o2::mint_owned_coin created: object(2,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 67: //# run t2::o2::mint_shared_coin created: object(3,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 69: //# run t2::o2::mint_shared_obj created: object(4,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 71: //# view-object 2,0 @@ -113,19 +113,19 @@ task 13, line 104: //# run t2::o2::mint_shared_coin created: object(13,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 14, line 106: //# run t2::o2::mint_shared_coin created: object(14,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 15, line 108: //# run t2::o2::mint_shared_obj created: object(15,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 16, line 110: //# view-object 13,0 diff --git a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_move_call.exp b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_move_call.exp index 7b9c5bb6f0e..a4d0fdac8da 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_move_call.exp +++ b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_move_call.exp @@ -4,19 +4,19 @@ task 1, lines 7-36: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6399200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6391600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 38: //# run t2::o2::create created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 40: //# run t2::o2::create created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 42: //# view-object 2,0 @@ -48,13 +48,13 @@ task 6, lines 47-49: //> 1: t2::o2::deleter(Result(0)); mutated: object(0,0), object(2,0) deleted: object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 3465600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 3442800, non_refundable_storage_fee: 0 task 7, line 51: //# run t2::o2::mint_shared_coin created: object(7,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, lines 53-55: //# view-object 7,0 @@ -80,7 +80,7 @@ task 9, lines 56-62: // Try to call public_share_object directly -- this should work because the coin has `store`. created: object(9,0) mutated: object(0,0), object(7,0) -gas summary: computation_cost: 1000000, storage_cost: 2964000, storage_rebate: 1976000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2941200, storage_rebate: 1960800, non_refundable_storage_fee: 0 task 10, lines 63-67: //# programmable --inputs 0 object(7,0) @0x0 @@ -90,4 +90,4 @@ task 10, lines 63-67: //> 3: iota::transfer::public_share_object>(Result(0)); created: object(10,0) mutated: object(0,0), object(7,0) -gas summary: computation_cost: 1000000, storage_cost: 2964000, storage_rebate: 1976000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2941200, storage_rebate: 1960800, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_move_call_fails.exp b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_move_call_fails.exp index 86eb70910d6..4a3ac54f5a9 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_move_call_fails.exp +++ b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_move_call_fails.exp @@ -4,19 +4,19 @@ task 1, lines 7-58: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 8884400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8876800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 60: //# run t2::o2::create created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 62: //# run t2::o2::create created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 64: //# view-object 2,0 @@ -77,7 +77,7 @@ task 10, line 88: //# run t2::o2::mint_shared_coin created: object(10,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 11, lines 90-92: //# view-object 10,0 diff --git a/crates/iota-adapter-transactional-tests/tests/shared/freeze.exp b/crates/iota-adapter-transactional-tests/tests/shared/freeze.exp index d1ac09ef322..fe911f3b65b 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/freeze.exp +++ b/crates/iota-adapter-transactional-tests/tests/shared/freeze.exp @@ -4,13 +4,13 @@ task 1, lines 9-26: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5396000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5388400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 28: //# run t2::o2::create created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 30: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/shared/re_share.exp b/crates/iota-adapter-transactional-tests/tests/shared/re_share.exp index b73c53d182d..416655e853b 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/re_share.exp +++ b/crates/iota-adapter-transactional-tests/tests/shared/re_share.exp @@ -4,13 +4,13 @@ task 1, lines 9-30: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5882400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5874800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 32: //# run t2::o2::create created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 34: //# view-object 2,0 @@ -27,7 +27,7 @@ Contents: t2::o2::Obj2 { task 4, line 36: //# run t2::o2::mut_o2 --args object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 2226800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 2211600, non_refundable_storage_fee: 0 task 5, line 38: //# view-object 2,0 @@ -44,7 +44,7 @@ Contents: t2::o2::Obj2 { task 6, line 40: //# run t2::o2::re_share_o2 --args object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 2226800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 2211600, non_refundable_storage_fee: 0 task 7, line 42: //# view-object 2,0 @@ -61,7 +61,7 @@ Contents: t2::o2::Obj2 { task 8, line 44: //# run t2::o2::re_share_non_public_o2 --args object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 2226800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 2211600, non_refundable_storage_fee: 0 task 9, line 46: //# view-object 2,0 @@ -78,7 +78,7 @@ Contents: t2::o2::Obj2 { task 10, line 48: //# run t2::o2::mut_o2 --args object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 2226800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 2211600, non_refundable_storage_fee: 0 task 11, line 50: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/shared/transfer.exp b/crates/iota-adapter-transactional-tests/tests/shared/transfer.exp index 3c794da2942..39e7bee8500 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/transfer.exp +++ b/crates/iota-adapter-transactional-tests/tests/shared/transfer.exp @@ -4,13 +4,13 @@ task 1, lines 10-25: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5654400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5646800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 27: //# run t2::o2::create created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 29: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/shared/upgrade.exp b/crates/iota-adapter-transactional-tests/tests/shared/upgrade.exp index 22f2e7ce19c..234b3a2147b 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/upgrade.exp +++ b/crates/iota-adapter-transactional-tests/tests/shared/upgrade.exp @@ -7,37 +7,37 @@ task 1, lines 9-37: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 7440400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7432800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 39: //# run t::m::create --sender A created: object(2,0), object(2,1), object(2,2), object(2,3) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 7835600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7797600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 41: -//# view-object 2,2 +//# view-object 2,3 Owner: Account Address ( A ) Version: 2 Contents: t::m::Obj { id: iota::object::UID { id: iota::object::ID { - bytes: fake(2,2), + bytes: fake(2,3), }, }, } task 4, line 43: -//# run t::m::share --args object(2,2) --sender A +//# run t::m::share --args object(2,3) --sender A Error: Transaction Effects Status: Move Runtime Abort. Location: iota::transfer::share_object_impl (function index 10) at offset 0, Abort Code: 0 Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: MoveAbort(MoveLocation { module: ModuleId { address: iota, name: Identifier("transfer") }, function: 10, instruction: 0, function_name: Some("share_object_impl") }, 0), source: Some(VMError { major_status: ABORTED, sub_status: Some(0), message: None, exec_state: None, location: Module(ModuleId { address: iota, name: Identifier("transfer") }), indices: [], offsets: [(FunctionDefinitionIndex(10), 0)] }), command: Some(0) } } task 5, line 45: -//# run t::m::share_wrapped --args object(2,2) --sender A +//# run t::m::share_wrapped --args object(2,3) --sender A Error: Transaction Effects Status: Move Runtime Abort. Location: iota::transfer::share_object_impl (function index 10) at offset 0, Abort Code: 0 Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: MoveAbort(MoveLocation { module: ModuleId { address: iota, name: Identifier("transfer") }, function: 10, instruction: 0, function_name: Some("share_object_impl") }, 0), source: Some(VMError { major_status: ABORTED, sub_status: Some(0), message: None, exec_state: None, location: Module(ModuleId { address: iota, name: Identifier("transfer") }), indices: [], offsets: [(FunctionDefinitionIndex(10), 0)] }), command: Some(0) } } task 6, line 47: -//# run t::m::share_child --args object(2,2) --sender A +//# run t::m::share_child --args object(2,3) --sender A Error: Transaction Effects Status: Move Runtime Abort. Location: iota::transfer::share_object_impl (function index 10) at offset 0, Abort Code: 0 Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: MoveAbort(MoveLocation { module: ModuleId { address: iota, name: Identifier("transfer") }, function: 10, instruction: 0, function_name: Some("share_object_impl") }, 0), source: Some(VMError { major_status: ABORTED, sub_status: Some(0), message: None, exec_state: None, location: Module(ModuleId { address: iota, name: Identifier("transfer") }), indices: [], offsets: [(FunctionDefinitionIndex(10), 0)] }), command: Some(0) } } diff --git a/crates/iota-adapter-transactional-tests/tests/shared/upgrade.move b/crates/iota-adapter-transactional-tests/tests/shared/upgrade.move index 6765d25f206..636b773da71 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/upgrade.move +++ b/crates/iota-adapter-transactional-tests/tests/shared/upgrade.move @@ -38,10 +38,10 @@ module t::m { //# run t::m::create --sender A -//# view-object 2,2 +//# view-object 2,3 -//# run t::m::share --args object(2,2) --sender A +//# run t::m::share --args object(2,3) --sender A -//# run t::m::share_wrapped --args object(2,2) --sender A +//# run t::m::share_wrapped --args object(2,3) --sender A -//# run t::m::share_child --args object(2,2) --sender A +//# run t::m::share_child --args object(2,3) --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/shared/wrap.exp b/crates/iota-adapter-transactional-tests/tests/shared/wrap.exp index 65a1b993ec1..cec47beb15f 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/wrap.exp +++ b/crates/iota-adapter-transactional-tests/tests/shared/wrap.exp @@ -4,13 +4,13 @@ task 1, lines 9-28: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6064800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6057200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 31: //# run t2::o2::create created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2226800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2211600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 33: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/size_limits/deleted_id_limits_tests.exp b/crates/iota-adapter-transactional-tests/tests/size_limits/deleted_id_limits_tests.exp index f355e9b912a..44c93bb50c2 100644 --- a/crates/iota-adapter-transactional-tests/tests/size_limits/deleted_id_limits_tests.exp +++ b/crates/iota-adapter-transactional-tests/tests/size_limits/deleted_id_limits_tests.exp @@ -4,22 +4,22 @@ task 1, lines 9-33: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5259200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5251600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 34-36: //# run Test::M1::delete_n_ids --args 1 --gas-budget 100000000000000 mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, lines 37-39: //# run Test::M1::delete_n_ids --args 256 --gas-budget 100000000000000 mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, lines 40-42: //# run Test::M1::delete_n_ids --args 2048 --gas-budget 100000000000000 mutated: object(0,0) -gas summary: computation_cost: 5000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 5000000, computation_cost_burned: 5000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, lines 43-45: //# run Test::M1::delete_n_ids --args 2049 --gas-budget 100000000000000 diff --git a/crates/iota-adapter-transactional-tests/tests/size_limits/event_limits_tests.exp b/crates/iota-adapter-transactional-tests/tests/size_limits/event_limits_tests.exp index 5f3ada9eaa4..2891692ba6e 100644 --- a/crates/iota-adapter-transactional-tests/tests/size_limits/event_limits_tests.exp +++ b/crates/iota-adapter-transactional-tests/tests/size_limits/event_limits_tests.exp @@ -4,19 +4,19 @@ task 1, lines 9-56: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 7311200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7303600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 57-59: //# run Test::M1::emit_n_small_events --args 1 --gas-budget 100000000000000 --summarize events: 1 mutated: 1 -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, lines 60-62: //# run Test::M1::emit_n_small_events --args 1024 --gas-budget 100000000000000 --summarize events: 50 mutated: 1 -gas summary: computation_cost: 3000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 3000000, computation_cost_burned: 3000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, lines 63-65: //# run Test::M1::emit_n_small_events --args 1025 --gas-budget 100000000000000 @@ -32,13 +32,13 @@ task 6, lines 69-71: //# run Test::M1::emit_event_with_size --args 200000 --gas-budget 100000000000000 --summarize events: 1 mutated: 1 -gas summary: computation_cost: 1394000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1394000000, computation_cost_burned: 1394000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, lines 72-74: //# run Test::M1::emit_event_with_size --args 256000 --gas-budget 100000000000000 --summarize events: 1 mutated: 1 -gas summary: computation_cost: 1815000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1815000000, computation_cost_burned: 1815000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, lines 75-77: //# run Test::M1::emit_event_with_size --args 256001 --gas-budget 100000000000000 --summarize diff --git a/crates/iota-adapter-transactional-tests/tests/size_limits/event_limits_tests_out_of_gas.exp b/crates/iota-adapter-transactional-tests/tests/size_limits/event_limits_tests_out_of_gas.exp index 541f40887d0..ae1c6244d1c 100644 --- a/crates/iota-adapter-transactional-tests/tests/size_limits/event_limits_tests_out_of_gas.exp +++ b/crates/iota-adapter-transactional-tests/tests/size_limits/event_limits_tests_out_of_gas.exp @@ -4,7 +4,7 @@ task 1, lines 9-67: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 7919200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7911600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 68-70: //# run Test::M1::emit_n_small_events --args 1025 --gas-budget 1000000000 diff --git a/crates/iota-adapter-transactional-tests/tests/size_limits/identitifer_len_limits.exp b/crates/iota-adapter-transactional-tests/tests/size_limits/identitifer_len_limits.exp index 684d684e1db..fc8f3400b48 100644 --- a/crates/iota-adapter-transactional-tests/tests/size_limits/identitifer_len_limits.exp +++ b/crates/iota-adapter-transactional-tests/tests/size_limits/identitifer_len_limits.exp @@ -14,4 +14,4 @@ task 3, lines 27-48: //# publish created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6095200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6087600, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/size_limits/move_object_size_limit.exp b/crates/iota-adapter-transactional-tests/tests/size_limits/move_object_size_limit.exp index 26fe242efbe..785bd326507 100644 --- a/crates/iota-adapter-transactional-tests/tests/size_limits/move_object_size_limit.exp +++ b/crates/iota-adapter-transactional-tests/tests/size_limits/move_object_size_limit.exp @@ -7,7 +7,7 @@ task 1, lines 9-79: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 9933200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9925600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 80-82: //# run Test::M1::transfer_object_with_size --args 256001 --sender A --gas-budget 10000000000000 @@ -18,10 +18,10 @@ task 3, lines 83-85: //# run Test::M1::transfer_object_with_size --args 255999 --sender A --gas-budget 100000000000000 created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1864000000, storage_cost: 1947553200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1864000000, computation_cost_burned: 1864000000, storage_cost: 1947538000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 86: //# run Test::M1::transfer_object_with_size --args 256000 --sender A --gas-budget 100000000000000 created: object(4,0) mutated: object(0,0) -gas summary: computation_cost: 1864000000, storage_cost: 1947560800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1864000000, computation_cost_burned: 1864000000, storage_cost: 1947545600, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/size_limits/new_id_limits_tests.exp b/crates/iota-adapter-transactional-tests/tests/size_limits/new_id_limits_tests.exp index efe386a2e16..4b71e28f78b 100644 --- a/crates/iota-adapter-transactional-tests/tests/size_limits/new_id_limits_tests.exp +++ b/crates/iota-adapter-transactional-tests/tests/size_limits/new_id_limits_tests.exp @@ -4,22 +4,22 @@ task 1, lines 9-34: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5259200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5251600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 35-37: //# run Test::M1::create_n_ids --args 1 --gas-budget 100000000000000 mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, lines 38-40: //# run Test::M1::create_n_ids --args 256 --gas-budget 100000000000000 mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, lines 41-43: //# run Test::M1::create_n_ids --args 2048 --gas-budget 100000000000000 mutated: object(0,0) -gas summary: computation_cost: 5000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 5000000, computation_cost_burned: 5000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, lines 44-46: //# run Test::M1::create_n_ids --args 2049 --gas-budget 100000000000000 diff --git a/crates/iota-adapter-transactional-tests/tests/size_limits/object_runtime_limits.exp b/crates/iota-adapter-transactional-tests/tests/size_limits/object_runtime_limits.exp index cdfd39cac05..fbe366dfed6 100644 --- a/crates/iota-adapter-transactional-tests/tests/size_limits/object_runtime_limits.exp +++ b/crates/iota-adapter-transactional-tests/tests/size_limits/object_runtime_limits.exp @@ -7,19 +7,19 @@ task 1, lines 8-27: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 5821600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5814000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 29: //# run a::m::add_n_items --sender A --args 100 --gas-budget 1000000000000 --summarize created: 200 mutated: 1 -gas summary: computation_cost: 1000000, storage_cost: 270028000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 268500400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 31: //# run a::m::add_n_items --sender A --args 1000 --gas-budget 1000000000000 --summarize created: 2000 mutated: 1 -gas summary: computation_cost: 7000000, storage_cost: 2691388000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 7000000, computation_cost_burned: 7000000, storage_cost: 2676180400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 33: //# run a::m::add_n_items --sender A --args 1025 --gas-budget 1000000000000 diff --git a/crates/iota-adapter-transactional-tests/tests/size_limits/transfered_id_limits_tests.exp b/crates/iota-adapter-transactional-tests/tests/size_limits/transfered_id_limits_tests.exp index 64eb1b19fb5..8ac70fe288a 100644 --- a/crates/iota-adapter-transactional-tests/tests/size_limits/transfered_id_limits_tests.exp +++ b/crates/iota-adapter-transactional-tests/tests/size_limits/transfered_id_limits_tests.exp @@ -4,25 +4,25 @@ task 1, lines 9-33: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5578400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5570800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 34-36: //# run Test::M1::transfer_n_ids --args 1 --gas-budget 100000000000000 --summarize created: 1 mutated: 1 -gas summary: computation_cost: 1000000, storage_cost: 2219200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2204000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, lines 37-39: //# run Test::M1::transfer_n_ids --args 256 --gas-budget 100000000000000 --summarize created: 256 mutated: 1 -gas summary: computation_cost: 1000000, storage_cost: 316175200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 314222000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, lines 40-42: //# run Test::M1::transfer_n_ids --args 2048 --gas-budget 100000000000000 --summarize created: 2048 mutated: 1 -gas summary: computation_cost: 4000000, storage_cost: 2522485600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 4000000, computation_cost_burned: 4000000, storage_cost: 2506913200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, lines 43-45: //# run Test::M1::transfer_n_ids --args 2049 --gas-budget 100000000000000 diff --git a/crates/iota-adapter-transactional-tests/tests/size_limits/vector_len_limits.exp b/crates/iota-adapter-transactional-tests/tests/size_limits/vector_len_limits.exp index af275d7dc39..c56fca62d5e 100644 --- a/crates/iota-adapter-transactional-tests/tests/size_limits/vector_len_limits.exp +++ b/crates/iota-adapter-transactional-tests/tests/size_limits/vector_len_limits.exp @@ -4,22 +4,22 @@ task 1, lines 9-32: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4316800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4309200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 33-35: //# run Test::M1::push_n_items --args 1 --gas-budget 100000000000000 mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, lines 36-38: //# run Test::M1::push_n_items --args 256 --gas-budget 100000000000000 mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, lines 39-41: //# run Test::M1::push_n_items --args 262144 --gas-budget 100000000000000 mutated: object(0,0) -gas summary: computation_cost: 4088000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 4088000000, computation_cost_burned: 4088000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 42: //# run Test::M1::push_n_items --args 262145 --gas-budget 100000000000000 diff --git a/crates/iota-adapter-transactional-tests/tests/transfer_object/does_not_have_store.exp b/crates/iota-adapter-transactional-tests/tests/transfer_object/does_not_have_store.exp index bf146006e6a..2863aaf4b3c 100644 --- a/crates/iota-adapter-transactional-tests/tests/transfer_object/does_not_have_store.exp +++ b/crates/iota-adapter-transactional-tests/tests/transfer_object/does_not_have_store.exp @@ -7,13 +7,13 @@ task 1, lines 9-26: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5783600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5776000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 28: //# run test::m::mint_s --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 30: //# view-object 2,0 @@ -48,7 +48,7 @@ task 6, line 39: //# run test::m::mint_cup --type-args test::m::S --sender A created: object(6,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2500400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2485200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, line 41: //# view-object 6,0 diff --git a/crates/iota-adapter-transactional-tests/tests/transfer_object/does_not_have_store_receive.exp b/crates/iota-adapter-transactional-tests/tests/transfer_object/does_not_have_store_receive.exp index 94f5968e3cb..a2757e95f41 100644 --- a/crates/iota-adapter-transactional-tests/tests/transfer_object/does_not_have_store_receive.exp +++ b/crates/iota-adapter-transactional-tests/tests/transfer_object/does_not_have_store_receive.exp @@ -7,13 +7,13 @@ task 1, lines 10-78: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 9659600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9652000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 80: //# run test::m::mint_s --sender A created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3442800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3420000, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 82: //# view-object 2,0 @@ -45,13 +45,13 @@ task 5, lines 86-88: //> 1: test::m::destroy_s(Result(0)); mutated: object(0,0), object(2,0) deleted: object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 2234400, storage_rebate: 3442800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2219200, storage_rebate: 3420000, non_refundable_storage_fee: 0 task 6, line 90: //# run test::m::mint_cup --sender A --type-args u64 created: object(6,0), object(6,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3465600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3442800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, line 92: //# view-object 6,0 @@ -84,13 +84,13 @@ task 9, lines 96-100: // Try to directly call `public_receive` and `receive` on an object without public transfer. mutated: object(0,0), object(6,1) deleted: object(6,0) -gas summary: computation_cost: 1000000, storage_cost: 2234400, storage_rebate: 3465600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2219200, storage_rebate: 3442800, non_refundable_storage_fee: 0 task 10, line 102: //# run test::m::mint_s --sender A created: object(10,0), object(10,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3442800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3420000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 11, line 104: //# view-object 10,0 @@ -137,7 +137,7 @@ task 15, line 120: //# run test::m::mint_store --sender A created: object(15,0), object(15,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3473200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3450400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 16, line 122: //# view-object 15,0 @@ -179,4 +179,4 @@ task 19, lines 131-135: //> 3: iota::object::delete(Result(0)); mutated: object(0,0) deleted: object(15,0), object(15,1) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 3473200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 3450400, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/transfer_object/has_store.exp b/crates/iota-adapter-transactional-tests/tests/transfer_object/has_store.exp index 655420ec4a9..0a2aa8b5e4f 100644 --- a/crates/iota-adapter-transactional-tests/tests/transfer_object/has_store.exp +++ b/crates/iota-adapter-transactional-tests/tests/transfer_object/has_store.exp @@ -7,13 +7,13 @@ task 1, lines 9-26: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5905200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5897600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 28: //# run test::m::mint_s --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 30: //# view-object 2,0 @@ -30,7 +30,7 @@ Contents: test::m::S { task 4, line 32: //# transfer-object 2,0 --sender A --recipient B mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 2181200, non_refundable_storage_fee: 0 task 5, lines 34-37: //# view-object 2,0 @@ -48,7 +48,7 @@ task 6, line 39: //# run test::m::mint_cup --type-args test::m::S --sender A created: object(6,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2500400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2485200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, line 41: //# view-object 6,0 @@ -65,7 +65,7 @@ Contents: test::m::Cup { task 8, line 43: //# transfer-object 6,0 --sender A --recipient B mutated: object(0,0), object(6,0) -gas summary: computation_cost: 1000000, storage_cost: 2500400, storage_rebate: 2500400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2485200, storage_rebate: 2485200, non_refundable_storage_fee: 0 task 9, line 45: //# view-object 6,0 diff --git a/crates/iota-adapter-transactional-tests/tests/transfer_object/immutable.exp b/crates/iota-adapter-transactional-tests/tests/transfer_object/immutable.exp index 8b12548022f..1803d8bc641 100644 --- a/crates/iota-adapter-transactional-tests/tests/transfer_object/immutable.exp +++ b/crates/iota-adapter-transactional-tests/tests/transfer_object/immutable.exp @@ -7,13 +7,13 @@ task 1, lines 9-20: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5365600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5358000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 22: //# run test::m::mint_s --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 24: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/transfer_object/package.exp b/crates/iota-adapter-transactional-tests/tests/transfer_object/package.exp index 0847af555b2..67d34298edf 100644 --- a/crates/iota-adapter-transactional-tests/tests/transfer_object/package.exp +++ b/crates/iota-adapter-transactional-tests/tests/transfer_object/package.exp @@ -7,7 +7,7 @@ task 1, lines 9-11: //# publish --sender A created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3176800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3169200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 14: //# view-object 1,0 diff --git a/crates/iota-adapter-transactional-tests/tests/transfer_object/quasi_shared.exp b/crates/iota-adapter-transactional-tests/tests/transfer_object/quasi_shared.exp index a25b27d0f4b..fa1e713f8c7 100644 --- a/crates/iota-adapter-transactional-tests/tests/transfer_object/quasi_shared.exp +++ b/crates/iota-adapter-transactional-tests/tests/transfer_object/quasi_shared.exp @@ -7,19 +7,19 @@ task 1, lines 9-24: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 6148400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6140800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 26: //# run test::m::mint_s created: object(2,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 28: //# run test::m::mint_child --args object(2,0) created: object(3,0), object(3,1) mutated: object(0,2), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 5890000, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5859600, storage_rebate: 2181200, non_refundable_storage_fee: 0 task 4, line 30: //# view-object 3,0 diff --git a/crates/iota-adapter-transactional-tests/tests/transfer_object/shared.exp b/crates/iota-adapter-transactional-tests/tests/transfer_object/shared.exp index 241bfd34796..0949a219d39 100644 --- a/crates/iota-adapter-transactional-tests/tests/transfer_object/shared.exp +++ b/crates/iota-adapter-transactional-tests/tests/transfer_object/shared.exp @@ -7,19 +7,19 @@ task 1, lines 9-26: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5525200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5517600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 28: //# run test::m::mint_s created: object(2,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 30: //# run test::m::mint_s2 created: object(3,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 2204000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2188800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 32: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/transfer_object/transfer_coin.exp b/crates/iota-adapter-transactional-tests/tests/transfer_object/transfer_coin.exp index b90242d6423..025d12c0fbc 100644 --- a/crates/iota-adapter-transactional-tests/tests/transfer_object/transfer_coin.exp +++ b/crates/iota-adapter-transactional-tests/tests/transfer_object/transfer_coin.exp @@ -7,7 +7,7 @@ task 1, lines 9-10: //# programmable --sender C --inputs @A //> TransferObjects([Gas], Input(0)) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 12: //# view-object 0,2 @@ -20,14 +20,14 @@ Contents: iota::coin::Coin { }, }, balance: iota::balance::Balance { - value: 299999998012000u64, + value: 299999998019600u64, }, } task 3, line 14: //# transfer-object 0,2 --sender A --recipient B mutated: object(0,0), object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 16: //# view-object 0,2 @@ -40,6 +40,6 @@ Contents: iota::coin::Coin { }, }, balance: iota::balance::Balance { - value: 299999998012000u64, + value: 299999998019600u64, }, } diff --git a/crates/iota-adapter-transactional-tests/tests/transfer_object/wrap_unwrap.exp b/crates/iota-adapter-transactional-tests/tests/transfer_object/wrap_unwrap.exp index e44eabe798f..4e76f47a390 100644 --- a/crates/iota-adapter-transactional-tests/tests/transfer_object/wrap_unwrap.exp +++ b/crates/iota-adapter-transactional-tests/tests/transfer_object/wrap_unwrap.exp @@ -7,13 +7,13 @@ task 1, lines 9-40: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 6224400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6216800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 42: //# run a::m::mint --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 44: //# view-object 2,0 @@ -32,7 +32,7 @@ task 4, line 46: created: object(4,0) mutated: object(0,0) wrapped: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2439600, storage_rebate: 2196400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2424400, storage_rebate: 2181200, non_refundable_storage_fee: 0 task 5, line 48: //# view-object 4,0 @@ -58,7 +58,7 @@ task 6, line 50: mutated: object(0,0) unwrapped: object(2,0) deleted: object(4,0) -gas summary: computation_cost: 1000000, storage_cost: 2196400, storage_rebate: 2439600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2181200, storage_rebate: 2424400, non_refundable_storage_fee: 0 task 7, line 52: //# view-object 2,0 diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/abort_code_resolution.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/abort_code_resolution.exp index e122fb678ec..89c288786be 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/abort_code_resolution.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/abort_code_resolution.exp @@ -7,19 +7,19 @@ task 1, lines 7-12: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5084400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5069200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 15-20: //# upgrade --package Test1 --upgrade-capability 1,1 --sender A created: object(2,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 5084400, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5069200, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 3, lines 22-27: //# upgrade --package Test2 --upgrade-capability 1,1 --sender A created: object(3,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 5084400, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5069200, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 4, lines 29-31: //# run Test1::M1::f1 diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/add_ability_during_upgrade.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/add_ability_during_upgrade.exp index 3755cd39280..95e29002e95 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/add_ability_during_upgrade.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/add_ability_during_upgrade.exp @@ -7,7 +7,7 @@ task 1, lines 7-11: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5388400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5373200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 13-19: //# upgrade --package Test_V0 --upgrade-capability 1,1 --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/add_ability_during_upgrade_enum.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/add_ability_during_upgrade_enum.exp index 9df59ca7365..85b32e41c50 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/add_ability_during_upgrade_enum.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/add_ability_during_upgrade_enum.exp @@ -7,7 +7,7 @@ task 1, lines 7-12: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5320000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5304800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 14-20: //# upgrade --package Test_V0 --upgrade-capability 1,1 --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/add_ability_during_upgrade_generics.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/add_ability_during_upgrade_generics.exp index 26c40749223..1c0c5cdb574 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/add_ability_during_upgrade_generics.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/add_ability_during_upgrade_generics.exp @@ -7,7 +7,7 @@ task 1, lines 7-10: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5403600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5388400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 12-15: //# upgrade --package A0 --upgrade-capability 1,1 --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/add_ability_during_upgrade_generics_enum.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/add_ability_during_upgrade_generics_enum.exp index 37cbeba5e3a..9ae5abec58d 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/add_ability_during_upgrade_generics_enum.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/add_ability_during_upgrade_generics_enum.exp @@ -7,7 +7,7 @@ task 1, lines 7-10: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5335200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5320000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 12-15: //# upgrade --package A0 --upgrade-capability 1,1 --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/add_key_during_upgrade.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/add_key_during_upgrade.exp index b0228ddf174..8954ddeba19 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/add_key_during_upgrade.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/add_key_during_upgrade.exp @@ -7,7 +7,7 @@ task 1, lines 7-15: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6102800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6087600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 17-25: //# upgrade --package Test_V0 --upgrade-capability 1,1 --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/add_new_type_with_key.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/add_new_type_with_key.exp index ab8e749e95d..743c7f4a939 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/add_new_type_with_key.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/add_new_type_with_key.exp @@ -7,10 +7,10 @@ task 1, lines 7-12: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5700000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5684800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 14-22: //# upgrade --package Test_V0 --upgrade-capability 1,1 --sender A created: object(2,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 6102800, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6087600, storage_rebate: 2606800, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/basic.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/basic.exp index 1a0baa8247d..aa5562ed2c1 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/basic.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/basic.exp @@ -7,7 +7,7 @@ task 1, lines 7-11: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5646800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5631600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 13-16: //# upgrade --package Test --upgrade-capability 1,1 --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/constants.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/constants.exp index a0114b52ccc..6fbc40349a0 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/constants.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/constants.exp @@ -7,19 +7,19 @@ task 1, lines 7-17: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5928000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5912800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 19-29: //# upgrade --package V0 --upgrade-capability 1,1 --sender A --policy compatible created: object(2,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 5928000, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5912800, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 3, lines 31-43: //# upgrade --package V1 --upgrade-capability 1,1 --sender A --policy additive created: object(3,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 5928000, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5912800, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 4, lines 45-55: //# upgrade --package V2 --upgrade-capability 1,1 --sender A --policy additive @@ -35,22 +35,22 @@ task 6, lines 70-88: //# upgrade --package V2 --upgrade-capability 1,1 --sender A --policy additive created: object(6,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 6368800, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6353600, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 7, lines 89-104: //# upgrade --package V3 --upgrade-capability 1,1 --sender A --policy additive created: object(7,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 6292800, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6277600, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 8, lines 105-119: //# upgrade --package V4 --upgrade-capability 1,1 --sender A --policy dep_only created: object(8,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 6209200, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6194000, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 9, lines 120-133: //# upgrade --package V5 --upgrade-capability 1,1 --sender A --policy dep_only created: object(9,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 6292800, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6277600, storage_rebate: 2606800, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/dep_override.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/dep_override.exp index ce5e264dbff..bf33fa2d1c6 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/dep_override.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/dep_override.exp @@ -7,55 +7,55 @@ task 1, lines 11-19: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6809600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6794400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 21-29: //# upgrade --package Test_DepDepV1 --upgrade-capability 1,1 --sender A created: object(2,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 6809600, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6794400, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 3, lines 31-42: //# upgrade --package Test_DepDepV2 --upgrade-capability 1,1 --sender A created: object(3,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 6809600, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6794400, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 4, lines 45-50: //# publish --upgradeable --dependencies Test_DepDepV1 --sender A created: object(4,0), object(4,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6551200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6536000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, lines 52-60: //# upgrade --package Test_DepV1 --upgrade-capability 4,1 --dependencies Test_DepDepV2 --sender A created: object(5,0) mutated: object(0,0), object(4,1) -gas summary: computation_cost: 1000000, storage_cost: 6551200, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6536000, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 6, lines 63-70: //# publish --upgradeable --dependencies Test_DepV1 Test_DepDepV1 --sender A created: object(6,0), object(6,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 7030000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7014800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, lines 72-79: //# upgrade --package Test_V1 --upgrade-capability 6,1 --dependencies Test_DepV2 Test_DepDepV2 --sender A created: object(7,0) mutated: object(0,0), object(6,1) -gas summary: computation_cost: 1000000, storage_cost: 7030000, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7014800, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 8, lines 81-86: //# upgrade --package Test_V2 --upgrade-capability 6,1 --dependencies Test_DepV1 Test_DepDepV3 --sender A created: object(8,0) mutated: object(0,0), object(6,1) -gas summary: computation_cost: 1000000, storage_cost: 7030000, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7014800, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 9, line 88: //# run Test_V1::M1::baz created: object(9,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2325600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2310400, storage_rebate: 0, non_refundable_storage_fee: 0 task 10, line 90: //# view-object 9,0 @@ -74,7 +74,7 @@ task 11, line 92: //# run Test_V2::M1::baz created: object(11,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2325600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2310400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 12, line 94: //# view-object 11,0 @@ -93,7 +93,7 @@ task 13, line 96: //# run Test_V3::M1::baz created: object(13,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2325600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2310400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 14, lines 98-101: //# view-object 13,0 @@ -114,7 +114,7 @@ task 15, lines 102-104: //> 1: Test_V3::M1::baz(); created: object(15,0), object(15,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3663200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3640400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 16, line 106: //# view-object 15,0 @@ -126,7 +126,7 @@ Contents: Test_DepDepV1::DepDepM1::Obj { bytes: fake(15,0), }, }, - v: 0u64, + v: 7u64, } task 17, lines 108-113: @@ -139,7 +139,7 @@ Contents: Test_DepDepV1::DepDepM1::Obj { bytes: fake(15,1), }, }, - v: 7u64, + v: 0u64, } task 18, lines 115-121: diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/enum_struct_swap.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/enum_struct_swap.exp index 4156e0d60a7..cdcfd98376a 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/enum_struct_swap.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/enum_struct_swap.exp @@ -7,7 +7,7 @@ task 1, lines 7-17: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5928000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5912800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 19-27: //# upgrade --package Test_V0 --upgrade-capability 1,1 --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/enums.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/enums.exp index 05798a18c52..ab27b98ec12 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/enums.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/enums.exp @@ -7,7 +7,7 @@ task 1, lines 7-17: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5928000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5912800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 19-29: //# upgrade --package Test_V0 --upgrade-capability 1,1 --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/friend_fun_changes.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/friend_fun_changes.exp index 803ab3ba7ea..cebb72577f0 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/friend_fun_changes.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/friend_fun_changes.exp @@ -7,36 +7,36 @@ task 1, lines 7-21: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 7668400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7653200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 22-36: //# upgrade --package V0 --upgrade-capability 1,1 --sender A created: object(2,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 7683600, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7668400, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 3, lines 37-61: //# upgrade --package V1 --upgrade-capability 1,1 --sender A created: object(3,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 8907200, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8892000, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 4, lines 62-84: //# upgrade --package V2 --upgrade-capability 1,1 --sender A created: object(4,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 9834400, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9819200, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 5, line 86: //# run V3::friend_module::call_friend mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 0, non_refundable_storage_fee: 0 task 6, line 88: //# run V3::friend_module::call_public created: object(6,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2432000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2416800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, line 90: //# view-object 6,0 diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/large_module_inclusion_checks.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/large_module_inclusion_checks.exp index af048deaa3a..70d1c64d4ad 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/large_module_inclusion_checks.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/large_module_inclusion_checks.exp @@ -7,7 +7,7 @@ task 1, lines 7-57: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 11308800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 11293600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 58-109: //# upgrade --package V0 --upgrade-capability 1,1 --sender A --policy dep_only @@ -23,7 +23,7 @@ task 4, lines 162-212: //# upgrade --package V0 --upgrade-capability 1,1 --sender A --policy additive created: object(4,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 11308800, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 11293600, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 5, lines 213-265: //# upgrade --package V1 --upgrade-capability 1,1 --sender A --policy dep_only @@ -34,16 +34,16 @@ task 6, lines 266-318: //# upgrade --package V1 --upgrade-capability 1,1 --sender A --policy additive created: object(6,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 12084000, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 12068800, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 7, lines 319-371: //# upgrade --package V2 --upgrade-capability 1,1 --sender A --policy dep_only created: object(7,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 12084000, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 12068800, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 8, lines 372-422: //# upgrade --package V3 --upgrade-capability 1,1 --sender A --policy additive created: object(8,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 12084000, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 12068800, storage_rebate: 2606800, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/linkage.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/linkage.exp index e306045e9bd..d295da660c1 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/linkage.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/linkage.exp @@ -7,22 +7,22 @@ task 1, lines 7-13: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6216800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6201600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 15-25: //# upgrade --package Test_DepV1 --upgrade-capability 1,1 --sender A created: object(2,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 6520800, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6505600, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 3, lines 27-33: //# publish --upgradeable --dependencies Test_DepV1 --sender A created: object(3,0), object(3,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6201600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6186400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, lines 35-42: //# upgrade --package Test_V1 --upgrade-capability 3,1 --dependencies Test_DepV2 --sender A created: object(4,0) mutated: object(0,0), object(3,1) -gas summary: computation_cost: 1000000, storage_cost: 6247200, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6232000, storage_rebate: 2606800, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/modules.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/modules.exp index 1002331601a..ca828ba50e3 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/modules.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/modules.exp @@ -7,7 +7,7 @@ task 1, lines 7-28: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 9583600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9568400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 29-49: //# upgrade --package V0 --upgrade-capability 1,1 --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/multi_version.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/multi_version.exp index 6bd87c71351..aa44692bced 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/multi_version.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/multi_version.exp @@ -7,13 +7,13 @@ task 1, lines 7-10: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5532800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5517600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 12-16: //# upgrade --package Test_V1 --upgrade-capability 1,1 --sender A created: object(2,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 5646800, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5631600, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 3, lines 18-21: //# upgrade --package Test_V2 --upgrade-capability 1,1 --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/new_types.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/new_types.exp index e5b76e81afa..d4d50d17efc 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/new_types.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/new_types.exp @@ -7,37 +7,37 @@ task 1, lines 7-19: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 7166800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7151600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 22-34: //# upgrade --package Test_DepV1 --upgrade-capability 1,1 --sender A created: object(2,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 7166800, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7151600, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 3, lines 37-48: //# publish --upgradeable --dependencies Test_DepV1 --sender A created: object(3,0), object(3,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6908400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6893200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, lines 50-61: //# upgrade --package Test_V1 --upgrade-capability 3,1 --dependencies Test_DepV1 --sender A created: object(4,0) mutated: object(0,0), object(3,1) -gas summary: computation_cost: 1000000, storage_cost: 6908400, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6893200, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 5, lines 63-74: //# upgrade --package Test_V2 --upgrade-capability 3,1 --dependencies Test_DepV2 --sender A created: object(5,0) mutated: object(0,0), object(3,1) -gas summary: computation_cost: 1000000, storage_cost: 6908400, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6893200, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 6, line 77: //# run Test_DepV1::DepM1::foo created: object(6,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2325600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2310400, storage_rebate: 0, non_refundable_storage_fee: 0 task 7, lines 79-81: //# view-object 6,0 @@ -57,7 +57,7 @@ task 8, lines 82-84: //> 0: Test_DepV1::DepM1::mod_obj(Input(0)); //> 1: Test_DepV2::DepM1::mod_obj(Input(0)); mutated: object(0,0), object(6,0) -gas summary: computation_cost: 1000000, storage_cost: 2325600, storage_rebate: 2325600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2310400, storage_rebate: 2310400, non_refundable_storage_fee: 0 task 9, lines 86-89: //# view-object 6,0 @@ -77,7 +77,7 @@ task 10, lines 90-92: //> 0: Test_V1::M1::mod_dep_obj(Input(0)); //> 1: Test_V2::M1::mod_dep_obj(Input(0)); mutated: object(0,0), object(6,0) -gas summary: computation_cost: 1000000, storage_cost: 2325600, storage_rebate: 2325600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2310400, storage_rebate: 2310400, non_refundable_storage_fee: 0 task 11, lines 94-97: //# view-object 6,0 @@ -97,7 +97,7 @@ task 12, lines 98-100: //> 0: Test_V2::M1::mod_dep_obj(Input(0)); //> 1: Test_V3::M1::mod_dep_obj(Input(0)); mutated: object(0,0), object(6,0) -gas summary: computation_cost: 1000000, storage_cost: 2325600, storage_rebate: 2325600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2310400, storage_rebate: 2310400, non_refundable_storage_fee: 0 task 13, line 102: //# view-object 6,0 diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/private_fun_changes.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/private_fun_changes.exp index 6f5643a6e72..b142bc20715 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/private_fun_changes.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/private_fun_changes.exp @@ -7,49 +7,49 @@ task 1, lines 7-10: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5038800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5023600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 12-15: //# upgrade --package V0 --upgrade-capability 1,1 --sender A created: object(2,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 5054000, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5038800, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 3, lines 17-20: //# upgrade --package V1 --upgrade-capability 1,1 --sender A created: object(3,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 5122400, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5107200, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 4, lines 22-25: //# upgrade --package V2 --upgrade-capability 1,1 --sender A created: object(4,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 5122400, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5107200, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 5, lines 27-30: //# upgrade --package V3 --upgrade-capability 1,1 --sender A created: object(5,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 5122400, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5107200, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 6, lines 32-34: //# upgrade --package V4 --upgrade-capability 1,1 --sender A created: object(6,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 4856400, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4841200, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 7, lines 36-39: //# upgrade --package V5 --upgrade-capability 1,1 --sender A created: object(7,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 5122400, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5107200, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 8, lines 41-44: //# upgrade --package V6 --upgrade-capability 1,1 --sender A created: object(8,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 5122400, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5107200, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 9, lines 46-49: //# upgrade --package V7 --upgrade-capability 1,1 --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/public_fun_changes.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/public_fun_changes.exp index ea30b7c2fde..3f65059afad 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/public_fun_changes.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/public_fun_changes.exp @@ -7,7 +7,7 @@ task 1, lines 7-10: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5038800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5023600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 12-15: //# upgrade --package Test_V0 --upgrade-capability 1,1 --sender A @@ -33,7 +33,7 @@ task 6, lines 32-35: //# upgrade --package Test_V0 --upgrade-capability 1,1 --sender A created: object(6,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 5038800, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5023600, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 7, lines 37-40: //# upgrade --package Test_V1 --upgrade-capability 1,1 --sender A @@ -49,4 +49,4 @@ task 9, lines 47-50: //# upgrade --package Test_V1 --upgrade-capability 1,1 --sender A created: object(9,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 5038800, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5023600, storage_rebate: 2606800, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/publisher.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/publisher.exp index 120627a3e60..aba8bd68f19 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/publisher.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/publisher.exp @@ -7,20 +7,20 @@ task 1, lines 7-17: //# publish --upgradeable --sender A created: object(1,0), object(1,1), object(1,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 8557600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8534800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 19-34: //# upgrade --package A0 --upgrade-capability 1,1 --sender A created: object(2,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 7691200, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7676000, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 3, line 36: //# run A1::m::test --type-args A0::m::A --args object(1,0) --sender A mutated: object(0,0), object(1,0) -gas summary: computation_cost: 1000000, storage_cost: 2812000, storage_rebate: 2812000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2796800, storage_rebate: 2796800, non_refundable_storage_fee: 0 task 4, line 38: //# run A1::m::test --type-args A1::m::B --args object(1,0) --sender A mutated: object(0,0), object(1,0) -gas summary: computation_cost: 1000000, storage_cost: 2812000, storage_rebate: 2812000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2796800, storage_rebate: 2796800, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/remove_ability_during_upgrade_fun_generics.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/remove_ability_during_upgrade_fun_generics.exp index 7233b31bc5b..773e02527e3 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/remove_ability_during_upgrade_fun_generics.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/remove_ability_during_upgrade_fun_generics.exp @@ -7,25 +7,25 @@ task 1, lines 7-10: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5046400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5031200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 12-15: //# upgrade --package A0 --upgrade-capability 1,1 --sender A created: object(2,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 5046400, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5031200, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 3, lines 17-20: //# upgrade --package A1 --upgrade-capability 1,1 --sender A created: object(3,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 5046400, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5031200, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 4, lines 22-25: //# upgrade --package A2 --upgrade-capability 1,1 --sender A created: object(4,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 5046400, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5031200, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 5, lines 27-30: //# upgrade --package A3 --upgrade-capability 1,1 --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/remove_ability_during_upgrade_generics.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/remove_ability_during_upgrade_generics.exp index 90632959f4d..13ca0fdf3a9 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/remove_ability_during_upgrade_generics.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/remove_ability_during_upgrade_generics.exp @@ -7,7 +7,7 @@ task 1, lines 7-12: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5335200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5320000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 14-19: //# upgrade --package A0 --upgrade-capability 1,1 --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/remove_phantom.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/remove_phantom.exp index d5e0ec91448..e145568bfd8 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/remove_phantom.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/remove_phantom.exp @@ -7,7 +7,7 @@ task 1, lines 7-10: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5403600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5388400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 12-15: //# upgrade --package A0 --upgrade-capability 1,1 --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/remove_phantom_enum.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/remove_phantom_enum.exp index 5f47b07c000..83278b57196 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/remove_phantom_enum.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/remove_phantom_enum.exp @@ -7,7 +7,7 @@ task 1, lines 7-10: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5327600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5312400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 12-15: //# upgrade --package A0 --upgrade-capability 1,1 --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/struct_enum_swap.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/struct_enum_swap.exp index 80d9be5d666..40d3c3e9b76 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/struct_enum_swap.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/struct_enum_swap.exp @@ -7,7 +7,7 @@ task 1, lines 7-15: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5882400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5867200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 17-27: //# upgrade --package Test_V0 --upgrade-capability 1,1 --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/structs.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/structs.exp index ba2e727c934..ebb9189bbef 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/structs.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/structs.exp @@ -7,7 +7,7 @@ task 1, lines 7-15: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5882400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5867200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 17-25: //# upgrade --package Test_V0 --upgrade-capability 1,1 --sender A diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/transitive_linkage.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/transitive_linkage.exp index 6e95067c044..9a95134df3f 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/transitive_linkage.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/transitive_linkage.exp @@ -7,34 +7,34 @@ task 1, lines 7-13: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6216800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6201600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 16-22: //# upgrade --package Test_DepV1 --upgrade-capability 1,1 --sender A created: object(2,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 6216800, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6201600, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 3, lines 24-34: //# upgrade --package Test_DepV2 --upgrade-capability 1,1 --sender A created: object(3,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 6520800, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6505600, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 4, lines 37-43: //# publish --upgradeable --dependencies Test_DepV1 --sender A created: object(4,0), object(4,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6201600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6186400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, lines 45-51: //# upgrade --package Test_V1 --upgrade-capability 4,1 --dependencies Test_DepV2 --sender A created: object(5,0) mutated: object(0,0), object(4,1) -gas summary: computation_cost: 1000000, storage_cost: 6201600, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6186400, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 6, lines 53-60: //# upgrade --package Test_V2 --upgrade-capability 4,1 --dependencies Test_DepV3 --sender A created: object(6,0) mutated: object(0,0), object(4,1) -gas summary: computation_cost: 1000000, storage_cost: 6247200, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6232000, storage_rebate: 2606800, non_refundable_storage_fee: 0 diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/type_names.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/type_names.exp index 230552e57ce..2771de9abbc 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/type_names.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/type_names.exp @@ -7,67 +7,67 @@ task 1, lines 7-17: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6581600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6566400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 19-31: //# upgrade --package A0 --upgrade-capability 1,0 --sender A created: object(2,0) mutated: object(0,0), object(1,0) -gas summary: computation_cost: 1000000, storage_cost: 7280800, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7265600, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 3, lines 33-63: //# upgrade --package A1 --upgrade-capability 1,0 --sender A created: object(3,0) mutated: object(0,0), object(1,0) -gas summary: computation_cost: 1000000, storage_cost: 9902800, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9887600, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 4, line 65: //# run A2::m::canary --type-args A0::m::A --args true --sender A created: object(4,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2728400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2713200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 67: //# run A2::m::canary --type-args A1::m::B --args true --sender A created: object(5,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2728400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2713200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, line 69: //# run A2::m::canary --type-args A0::m::A --args false --sender A created: object(6,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2728400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2713200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, line 71: //# run A2::m::canary --type-args A1::m::B --args false --sender A created: object(7,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2728400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2713200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, line 73: //# run A2::m::canary --type-args A0::m::EA --args true --sender A created: object(8,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2728400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2713200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 9, line 75: //# run A2::m::canary --type-args A1::m::EB --args true --sender A created: object(9,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2728400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2713200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 10, line 77: //# run A2::m::canary --type-args A0::m::EA --args false --sender A created: object(10,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2728400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2713200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 11, line 79: //# run A2::m::canary --type-args A1::m::EB --args false --sender A created: object(11,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2728400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2713200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 12, line 81: //# view-object 4,0 @@ -80,70 +80,70 @@ Contents: A0::m::Canary { }, }, addr: vector[ - 101u8, + 99u8, 102u8, - 54u8, - 98u8, - 51u8, - 97u8, 56u8, + 55u8, 51u8, - 97u8, - 97u8, + 57u8, + 53u8, + 98u8, + 48u8, 56u8, - 102u8, 53u8, + 52u8, + 48u8, + 100u8, + 99u8, 53u8, + 98u8, + 52u8, + 57u8, + 48u8, + 54u8, 99u8, + 100u8, 55u8, - 49u8, - 52u8, - 101u8, - 101u8, 53u8, + 50u8, 99u8, + 48u8, + 97u8, + 48u8, + 101u8, 102u8, - 56u8, - 56u8, - 100u8, + 53u8, 102u8, + 48u8, + 54u8, + 51u8, 52u8, + 97u8, 100u8, - 99u8, - 48u8, - 53u8, - 49u8, + 51u8, + 54u8, + 50u8, 100u8, - 102u8, - 98u8, - 53u8, - 97u8, + 48u8, 49u8, + 101u8, + 51u8, 98u8, + 57u8, + 50u8, 102u8, 51u8, - 97u8, - 55u8, - 99u8, 102u8, 101u8, - 98u8, - 50u8, - 49u8, - 98u8, - 53u8, - 51u8, - 48u8, - 57u8, - 48u8, - 54u8, 97u8, + 100u8, + 101u8, + 98u8, + 55u8, 53u8, 101u8, + 97u8, 54u8, - 49u8, - 48u8, - 52u8, ], } @@ -158,70 +158,70 @@ Contents: A0::m::Canary { }, }, addr: vector[ - 101u8, + 99u8, 102u8, - 54u8, - 98u8, - 51u8, - 97u8, 56u8, + 55u8, 51u8, - 97u8, - 97u8, + 57u8, + 53u8, + 98u8, + 48u8, 56u8, - 102u8, 53u8, + 52u8, + 48u8, + 100u8, + 99u8, 53u8, + 98u8, + 52u8, + 57u8, + 48u8, + 54u8, 99u8, + 100u8, 55u8, - 49u8, - 52u8, - 101u8, - 101u8, 53u8, + 50u8, 99u8, + 48u8, + 97u8, + 48u8, + 101u8, 102u8, - 56u8, - 56u8, - 100u8, + 53u8, 102u8, + 48u8, + 54u8, + 51u8, 52u8, + 97u8, 100u8, - 99u8, - 48u8, - 53u8, - 49u8, + 51u8, + 54u8, + 50u8, 100u8, - 102u8, - 98u8, - 53u8, - 97u8, + 48u8, 49u8, + 101u8, + 51u8, 98u8, + 57u8, + 50u8, 102u8, 51u8, - 97u8, - 55u8, - 99u8, 102u8, 101u8, - 98u8, - 50u8, - 49u8, - 98u8, - 53u8, - 51u8, - 48u8, - 57u8, - 48u8, - 54u8, 97u8, + 100u8, + 101u8, + 98u8, + 55u8, 53u8, 101u8, + 97u8, 54u8, - 49u8, - 48u8, - 52u8, ], } @@ -236,70 +236,70 @@ Contents: A0::m::Canary { }, }, addr: vector[ - 101u8, + 99u8, 102u8, - 54u8, - 98u8, - 51u8, - 97u8, 56u8, + 55u8, 51u8, - 97u8, - 97u8, + 57u8, + 53u8, + 98u8, + 48u8, 56u8, - 102u8, 53u8, + 52u8, + 48u8, + 100u8, + 99u8, 53u8, + 98u8, + 52u8, + 57u8, + 48u8, + 54u8, 99u8, + 100u8, 55u8, - 49u8, - 52u8, - 101u8, - 101u8, 53u8, + 50u8, 99u8, + 48u8, + 97u8, + 48u8, + 101u8, 102u8, - 56u8, - 56u8, - 100u8, + 53u8, 102u8, + 48u8, + 54u8, + 51u8, 52u8, + 97u8, 100u8, - 99u8, - 48u8, - 53u8, - 49u8, + 51u8, + 54u8, + 50u8, 100u8, - 102u8, - 98u8, - 53u8, - 97u8, + 48u8, 49u8, + 101u8, + 51u8, 98u8, + 57u8, + 50u8, 102u8, 51u8, - 97u8, - 55u8, - 99u8, 102u8, 101u8, - 98u8, - 50u8, - 49u8, - 98u8, - 53u8, - 51u8, - 48u8, - 57u8, - 48u8, - 54u8, 97u8, + 100u8, + 101u8, + 98u8, + 55u8, 53u8, 101u8, + 97u8, 54u8, - 49u8, - 48u8, - 52u8, ], } @@ -314,70 +314,70 @@ Contents: A0::m::Canary { }, }, addr: vector[ - 98u8, - 98u8, - 98u8, - 56u8, - 49u8, + 53u8, 52u8, - 50u8, - 48u8, - 55u8, - 54u8, - 48u8, - 57u8, - 49u8, - 55u8, - 54u8, - 57u8, - 54u8, 100u8, - 52u8, + 51u8, + 97u8, + 54u8, 54u8, - 100u8, - 55u8, 51u8, - 49u8, - 57u8, 99u8, 97u8, - 48u8, + 51u8, + 97u8, 53u8, - 56u8, - 102u8, + 57u8, + 57u8, 102u8, 50u8, + 56u8, + 48u8, 51u8, + 97u8, + 48u8, + 56u8, 101u8, + 55u8, + 53u8, 49u8, 51u8, - 57u8, - 56u8, - 100u8, + 52u8, + 49u8, + 55u8, + 48u8, + 97u8, 53u8, - 56u8, + 52u8, + 102u8, + 48u8, + 98u8, + 52u8, 49u8, + 102u8, 50u8, 57u8, - 56u8, - 101u8, - 56u8, - 51u8, - 97u8, - 97u8, - 102u8, + 48u8, + 48u8, 98u8, + 52u8, + 99u8, 99u8, 102u8, + 51u8, + 49u8, + 57u8, + 57u8, + 100u8, 97u8, + 56u8, 48u8, - 102u8, - 100u8, - 98u8, - 100u8, + 55u8, + 57u8, + 53u8, + 56u8, 54u8, 101u8, - 55u8, ], } @@ -392,70 +392,70 @@ Contents: A0::m::Canary { }, }, addr: vector[ - 101u8, + 99u8, 102u8, - 54u8, - 98u8, - 51u8, - 97u8, 56u8, + 55u8, 51u8, - 97u8, - 97u8, - 56u8, - 102u8, + 57u8, 53u8, + 98u8, + 48u8, + 56u8, 53u8, - 99u8, - 55u8, - 49u8, 52u8, - 101u8, - 101u8, - 53u8, - 99u8, - 102u8, - 56u8, - 56u8, + 48u8, 100u8, - 102u8, + 99u8, + 53u8, + 98u8, 52u8, + 57u8, + 48u8, + 54u8, + 99u8, 100u8, + 55u8, + 53u8, + 50u8, 99u8, 48u8, - 53u8, - 49u8, - 100u8, + 97u8, + 48u8, + 101u8, 102u8, - 98u8, 53u8, - 97u8, - 49u8, - 98u8, 102u8, + 48u8, + 54u8, 51u8, + 52u8, 97u8, - 55u8, - 99u8, - 102u8, + 100u8, + 51u8, + 54u8, + 50u8, + 100u8, + 48u8, + 49u8, 101u8, + 51u8, 98u8, + 57u8, 50u8, - 49u8, - 98u8, - 53u8, + 102u8, 51u8, - 48u8, - 57u8, - 48u8, - 54u8, + 102u8, + 101u8, 97u8, + 100u8, + 101u8, + 98u8, + 55u8, 53u8, 101u8, + 97u8, 54u8, - 49u8, - 48u8, - 52u8, ], } @@ -470,70 +470,70 @@ Contents: A0::m::Canary { }, }, addr: vector[ - 101u8, + 99u8, 102u8, - 54u8, - 98u8, - 51u8, - 97u8, 56u8, + 55u8, 51u8, - 97u8, - 97u8, + 57u8, + 53u8, + 98u8, + 48u8, 56u8, - 102u8, 53u8, + 52u8, + 48u8, + 100u8, + 99u8, 53u8, + 98u8, + 52u8, + 57u8, + 48u8, + 54u8, 99u8, + 100u8, 55u8, - 49u8, - 52u8, - 101u8, - 101u8, 53u8, + 50u8, 99u8, + 48u8, + 97u8, + 48u8, + 101u8, 102u8, - 56u8, - 56u8, - 100u8, + 53u8, 102u8, + 48u8, + 54u8, + 51u8, 52u8, + 97u8, 100u8, - 99u8, - 48u8, - 53u8, - 49u8, + 51u8, + 54u8, + 50u8, 100u8, - 102u8, - 98u8, - 53u8, - 97u8, + 48u8, 49u8, + 101u8, + 51u8, 98u8, + 57u8, + 50u8, 102u8, 51u8, - 97u8, - 55u8, - 99u8, 102u8, 101u8, - 98u8, - 50u8, - 49u8, - 98u8, - 53u8, - 51u8, - 48u8, - 57u8, - 48u8, - 54u8, 97u8, + 100u8, + 101u8, + 98u8, + 55u8, 53u8, 101u8, + 97u8, 54u8, - 49u8, - 48u8, - 52u8, ], } @@ -548,70 +548,70 @@ Contents: A0::m::Canary { }, }, addr: vector[ - 101u8, + 99u8, 102u8, - 54u8, - 98u8, - 51u8, - 97u8, 56u8, + 55u8, 51u8, - 97u8, - 97u8, + 57u8, + 53u8, + 98u8, + 48u8, 56u8, - 102u8, 53u8, + 52u8, + 48u8, + 100u8, + 99u8, 53u8, + 98u8, + 52u8, + 57u8, + 48u8, + 54u8, 99u8, + 100u8, 55u8, - 49u8, - 52u8, - 101u8, - 101u8, 53u8, + 50u8, 99u8, + 48u8, + 97u8, + 48u8, + 101u8, 102u8, - 56u8, - 56u8, - 100u8, + 53u8, 102u8, + 48u8, + 54u8, + 51u8, 52u8, + 97u8, 100u8, - 99u8, - 48u8, - 53u8, - 49u8, + 51u8, + 54u8, + 50u8, 100u8, - 102u8, - 98u8, - 53u8, - 97u8, + 48u8, 49u8, + 101u8, + 51u8, 98u8, + 57u8, + 50u8, 102u8, 51u8, - 97u8, - 55u8, - 99u8, 102u8, 101u8, - 98u8, - 50u8, - 49u8, - 98u8, - 53u8, - 51u8, - 48u8, - 57u8, - 48u8, - 54u8, 97u8, + 100u8, + 101u8, + 98u8, + 55u8, 53u8, 101u8, + 97u8, 54u8, - 49u8, - 48u8, - 52u8, ], } @@ -626,69 +626,69 @@ Contents: A0::m::Canary { }, }, addr: vector[ - 98u8, - 98u8, - 98u8, - 56u8, - 49u8, + 53u8, 52u8, - 50u8, - 48u8, - 55u8, - 54u8, - 48u8, - 57u8, - 49u8, - 55u8, - 54u8, - 57u8, - 54u8, 100u8, - 52u8, + 51u8, + 97u8, + 54u8, 54u8, - 100u8, - 55u8, 51u8, - 49u8, - 57u8, 99u8, 97u8, - 48u8, + 51u8, + 97u8, 53u8, - 56u8, - 102u8, + 57u8, + 57u8, 102u8, 50u8, + 56u8, + 48u8, 51u8, + 97u8, + 48u8, + 56u8, 101u8, + 55u8, + 53u8, 49u8, 51u8, - 57u8, - 56u8, - 100u8, + 52u8, + 49u8, + 55u8, + 48u8, + 97u8, 53u8, - 56u8, + 52u8, + 102u8, + 48u8, + 98u8, + 52u8, 49u8, + 102u8, 50u8, 57u8, - 56u8, - 101u8, - 56u8, - 51u8, - 97u8, - 97u8, - 102u8, + 48u8, + 48u8, 98u8, + 52u8, + 99u8, 99u8, 102u8, + 51u8, + 49u8, + 57u8, + 57u8, + 100u8, 97u8, + 56u8, 48u8, - 102u8, - 100u8, - 98u8, - 100u8, + 55u8, + 57u8, + 53u8, + 56u8, 54u8, 101u8, - 55u8, ], } diff --git a/crates/iota-adapter-transactional-tests/tests/upgrade/upgrade_ratchet.exp b/crates/iota-adapter-transactional-tests/tests/upgrade/upgrade_ratchet.exp index cda40a0ca35..6448d82a9bc 100644 --- a/crates/iota-adapter-transactional-tests/tests/upgrade/upgrade_ratchet.exp +++ b/crates/iota-adapter-transactional-tests/tests/upgrade/upgrade_ratchet.exp @@ -7,18 +7,18 @@ task 1, lines 7-13: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5646800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5631600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 14-17: //# upgrade --package V0 --upgrade-capability 1,1 --sender A created: object(2,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 5016000, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5000800, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 3, lines 19-21: //# run iota::package::only_additive_upgrades --args object(1,1) --sender A mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 2622000, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2606800, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 4, lines 22-27: //# upgrade --package V1 --upgrade-capability 1,1 --sender A --policy compatible @@ -29,18 +29,18 @@ task 5, lines 28-33: //# upgrade --package V1 --upgrade-capability 1,1 --sender A --policy additive created: object(5,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 5016000, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5000800, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 6, lines 34-37: //# upgrade --package V2 --upgrade-capability 1,1 --sender A --policy dep_only created: object(6,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 5016000, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5000800, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 7, lines 39-41: //# run iota::package::only_dep_upgrades --args object(1,1) --sender A mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 2622000, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2606800, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 8, lines 42-47: //# upgrade --package V3 --upgrade-capability 1,1 --sender A --policy compatible @@ -56,7 +56,7 @@ task 10, lines 54-59: //# upgrade --package V3 --upgrade-capability 1,1 --sender A --policy dep_only created: object(10,0) mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 5016000, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5000800, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 11, lines 60-62: //# run iota::package::only_additive_upgrades --args object(1,1) --sender A @@ -67,7 +67,7 @@ task 12, line 63: //# run iota::package::make_immutable --args object(1,1) --sender A mutated: object(0,0) deleted: object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 13, lines 65-67: //# view-object 1,1 diff --git a/crates/iota-analytics-indexer/src/handlers/object_handler.rs b/crates/iota-analytics-indexer/src/handlers/object_handler.rs index eec5720229e..0efe600d573 100644 --- a/crates/iota-analytics-indexer/src/handlers/object_handler.rs +++ b/crates/iota-analytics-indexer/src/handlers/object_handler.rs @@ -131,7 +131,6 @@ impl ObjectHandler { object_status: ObjectStatus::Deleted, initial_shared_version: None, previous_transaction: checkpoint_transaction.transaction.digest().base58_encode(), - has_public_transfer: false, storage_rebate: None, bcs: None, coin_type: None, @@ -155,9 +154,6 @@ impl ObjectHandler { state: &mut State, ) -> Result<()> { let move_obj_opt = object.data.try_as_move(); - let has_public_transfer = move_obj_opt - .map(|o| o.has_public_transfer()) - .unwrap_or(false); let move_struct = if let Some((tag, contents)) = object .struct_tag() .and_then(|tag| object.data.try_as_move().map(|mo| (tag, mo.contents()))) @@ -194,7 +190,6 @@ impl ObjectHandler { .expect("Object must be in output objects"), initial_shared_version: initial_shared_version(object), previous_transaction: object.previous_transaction.base58_encode(), - has_public_transfer, storage_rebate: Some(object.storage_rebate), bcs: Some(Base64::encode(bcs::to_bytes(object).unwrap())), coin_type: object.coin_type_maybe().map(|t| t.to_string()), diff --git a/crates/iota-analytics-indexer/src/store/bq/schemas/object.sql b/crates/iota-analytics-indexer/src/store/bq/schemas/object.sql index a4c16f8eb17..41b520c34ff 100644 --- a/crates/iota-analytics-indexer/src/store/bq/schemas/object.sql +++ b/crates/iota-analytics-indexer/src/store/bq/schemas/object.sql @@ -12,7 +12,6 @@ CREATE TABLE IF NOT EXISTS chaindata.OBJECT object_status STRING NOT NULL, initial_shared_version INT64, previous_transaction STRING NOT NULL, - has_public_transfer BOOL NOT NULL, storage_rebate NUMERIC(20, 0) NOT NULL, bcs STRING NOT NULL, coin_type STRING, diff --git a/crates/iota-analytics-indexer/src/store/snowflake/schemas/object.sql b/crates/iota-analytics-indexer/src/store/snowflake/schemas/object.sql index cfc2300e5b2..f70a3e3f5eb 100644 --- a/crates/iota-analytics-indexer/src/store/snowflake/schemas/object.sql +++ b/crates/iota-analytics-indexer/src/store/snowflake/schemas/object.sql @@ -12,7 +12,6 @@ CREATE OR REPLACE TABLE OBJECT object_status STRING, initial_shared_version NUMBER(20, 0), previous_transaction STRING NOT NULL, - has_public_transfer BOOLEAN NOT NULL, storage_rebate NUMBER(20, 0) NOT NULL, bcs STRING NOT NULL, coin_type STRING, @@ -43,7 +42,7 @@ CREATE INTEGRATION = 'CHECKPOINTS_DATA_LOADER_NOTIFICATION' AS copy into OBJECT (object_id, version, digest, type, checkpoint, epoch, timestamp_ms, owner_type, owner_address, - object_status, initial_shared_version, previous_transaction, has_public_transfer, + object_status, initial_shared_version, previous_transaction, storage_rebate, bcs, coin_type, coin_balance, struct_tag, object_json) from (SELECT t.$1:object_id as object_id, t.$1:version as version, @@ -57,7 +56,6 @@ CREATE t.$1:object_status as object_status, t.$1:initial_shared_version as initial_shared_version, t.$1:previous_transaction as previous_transaction, - t.$1:has_public_transfer as has_public_transfer, t.$1:storage_rebate as storage_rebate, t.$1:bcs as bcs, t.$1:coin_type as coin_type, diff --git a/crates/iota-analytics-indexer/src/tables.rs b/crates/iota-analytics-indexer/src/tables.rs index 0a55518fbbc..f375bfbec59 100644 --- a/crates/iota-analytics-indexer/src/tables.rs +++ b/crates/iota-analytics-indexer/src/tables.rs @@ -171,7 +171,6 @@ pub(crate) struct ObjectEntry { pub(crate) object_status: ObjectStatus, pub(crate) initial_shared_version: Option, pub(crate) previous_transaction: String, - pub(crate) has_public_transfer: bool, pub(crate) storage_rebate: Option, // raw object bytes // pub(crate) bcs: Vec, diff --git a/crates/iota-benchmark/tests/simtest.rs b/crates/iota-benchmark/tests/simtest.rs index b411c546435..e9e9d3b68c6 100644 --- a/crates/iota-benchmark/tests/simtest.rs +++ b/crates/iota-benchmark/tests/simtest.rs @@ -172,11 +172,8 @@ mod test { test_cluster.wait_for_epoch_all_nodes(1).await; } - #[ignore("Disabled due to flakiness - re-enable when failure is fixed")] #[sim_test(config = "test_config()")] async fn test_simulated_load_reconfig_restarts() { - // TODO added to invalidate a failing test seed in CI. Remove me - tokio::time::sleep(Duration::from_secs(1)).await; iota_protocol_config::ProtocolConfig::poison_get_for_min_version(); let test_cluster = build_test_cluster(4, 1000).await; let node_restarter = test_cluster diff --git a/crates/iota-cluster-test/src/cluster.rs b/crates/iota-cluster-test/src/cluster.rs index 1196961d9db..20eee208d0b 100644 --- a/crates/iota-cluster-test/src/cluster.rs +++ b/crates/iota-cluster-test/src/cluster.rs @@ -384,20 +384,13 @@ pub fn new_wallet_context_from_cluster( keystore .add_key(None, IotaKeyPair::Ed25519(key_pair)) .unwrap(); - IotaClientConfig { - keystore, - envs: vec![IotaEnv { - alias: "localnet".to_string(), - rpc: fullnode_url.into(), - ws: None, - basic_auth: None, - }], - active_address: Some(address), - active_env: Some("localnet".to_string()), - } - .persisted(&wallet_config_path) - .save() - .unwrap(); + IotaClientConfig::new(keystore) + .with_envs([IotaEnv::new("localnet", fullnode_url)]) + .with_active_address(address) + .with_active_env("localnet".to_string()) + .persisted(&wallet_config_path) + .save() + .unwrap(); info!( "Initialize wallet from config path: {:?}", diff --git a/crates/iota-cluster-test/src/wallet_client.rs b/crates/iota-cluster-test/src/wallet_client.rs index a3e2c2e2cf7..1221395ec79 100644 --- a/crates/iota-cluster-test/src/wallet_client.rs +++ b/crates/iota-cluster-test/src/wallet_client.rs @@ -58,8 +58,8 @@ impl WalletClient { pub fn sign(&self, txn_data: &TransactionData, desc: &str) -> Signature { self.get_wallet() - .config - .keystore + .config() + .keystore() .sign_secure(&self.address, txn_data, Intent::iota_transaction()) .unwrap_or_else(|e| panic!("Failed to sign transaction for {}. {}", desc, e)) } diff --git a/crates/iota-core/src/authority/authority_store_types.rs b/crates/iota-core/src/authority/authority_store_types.rs index 321719f287b..b50904ea5c6 100644 --- a/crates/iota-core/src/authority/authority_store_types.rs +++ b/crates/iota-core/src/authority/authority_store_types.rs @@ -172,7 +172,6 @@ impl From for StoreMoveObjectWrapper { #[derive(Eq, PartialEq, Debug, Clone, Deserialize, Serialize, Hash)] pub struct StoreMoveObjectV1 { pub type_: MoveObjectType, - has_public_transfer: bool, #[serde_as(as = "Bytes")] contents: Vec, /// reference count of `MoveMetadata` that point to the same content @@ -211,12 +210,10 @@ pub fn get_store_object_pair(object: Object, indirect_objects_threshold: usize) if indirect_objects_threshold > 0 && move_obj.contents().len() >= indirect_objects_threshold { - let has_public_transfer = move_obj.has_public_transfer(); let version = move_obj.version(); let (type_, contents) = move_obj.into_inner(); let move_object = StoreMoveObject { type_, - has_public_transfer, contents, ref_count: 1, }; @@ -255,25 +252,21 @@ pub(crate) fn try_construct_object( let data = match (store_object.data, indirect_object) { (StoreData::Move(object), None) => Data::Move(object), (StoreData::Package(package), None) => Data::Package(package), - (StoreData::IndirectObject(metadata), Some(indirect_obj)) => unsafe { + (StoreData::IndirectObject(metadata), Some(indirect_obj)) => { Data::Move(MoveObject::new_from_execution_with_limit( indirect_obj.type_, - indirect_obj.has_public_transfer, metadata.version, indirect_obj.contents, // verification is already done during initial execution u64::MAX, )?) - }, - (StoreData::Coin(balance), None) => unsafe { - Data::Move(MoveObject::new_from_execution_with_limit( - MoveObjectType::gas_coin(), - true, - object_key.1, - bcs::to_bytes(&(object_key.0, balance)).expect("serialization failed"), - u64::MAX, - )?) - }, + } + (StoreData::Coin(balance), None) => Data::Move(MoveObject::new_from_execution_with_limit( + MoveObjectType::gas_coin(), + object_key.1, + bcs::to_bytes(&(object_key.0, balance)).expect("serialization failed"), + u64::MAX, + )?), _ => { return Err(IotaError::Storage( "corrupted field: inconsistent object representation".to_string(), diff --git a/crates/iota-core/src/checkpoints/checkpoint_executor/tests.rs b/crates/iota-core/src/checkpoints/checkpoint_executor/tests.rs index 9dd7463d1a5..b1e4f3cfb38 100644 --- a/crates/iota-core/src/checkpoints/checkpoint_executor/tests.rs +++ b/crates/iota-core/src/checkpoints/checkpoint_executor/tests.rs @@ -473,7 +473,7 @@ async fn sync_end_of_epoch_checkpoint( authority_state .create_and_execute_advance_epoch_tx( &authority_state.epoch_store_for_testing().clone(), - &GasCostSummary::new(0, 0, 0, 0), + &GasCostSummary::new(0, 0, 0, 0, 0), *checkpoint.sequence_number(), 0, // epoch_start_timestamp_ms ) diff --git a/crates/iota-core/src/checkpoints/mod.rs b/crates/iota-core/src/checkpoints/mod.rs index 82749fa472a..1277b5d4c51 100644 --- a/crates/iota-core/src/checkpoints/mod.rs +++ b/crates/iota-core/src/checkpoints/mod.rs @@ -1559,6 +1559,8 @@ impl CheckpointBuilder { // sum only when we are within the same epoch GasCostSummary::new( previous_gas_costs.computation_cost + current_gas_costs.computation_cost, + previous_gas_costs.computation_cost_burned + + current_gas_costs.computation_cost_burned, previous_gas_costs.storage_cost + current_gas_costs.storage_cost, previous_gas_costs.storage_rebate + current_gas_costs.storage_rebate, previous_gas_costs.non_refundable_storage_fee @@ -2467,28 +2469,28 @@ mod tests { state.clone(), d(1), vec![d(2), d(3)], - GasCostSummary::new(11, 12, 11, 1), + GasCostSummary::new(11, 11, 12, 11, 1), ); commit_cert_for_test( &mut store, state.clone(), d(2), vec![d(3), d(4)], - GasCostSummary::new(21, 22, 21, 1), + GasCostSummary::new(21, 21, 22, 21, 1), ); commit_cert_for_test( &mut store, state.clone(), d(3), vec![], - GasCostSummary::new(31, 32, 31, 1), + GasCostSummary::new(31, 31, 32, 31, 1), ); commit_cert_for_test( &mut store, state.clone(), d(4), vec![], - GasCostSummary::new(41, 42, 41, 1), + GasCostSummary::new(41, 41, 42, 41, 1), ); for i in [5, 6, 7, 10, 11, 12, 13] { commit_cert_for_test( @@ -2496,7 +2498,7 @@ mod tests { state.clone(), d(i), vec![], - GasCostSummary::new(41, 42, 41, 1), + GasCostSummary::new(41, 41, 42, 41, 1), ); } for i in [15, 16, 17] { @@ -2505,7 +2507,7 @@ mod tests { state.clone(), d(i), vec![], - GasCostSummary::new(51, 52, 51, 1), + GasCostSummary::new(51, 51, 52, 51, 1), ); } let all_digests: Vec<_> = store.keys().copied().collect(); @@ -2571,7 +2573,7 @@ mod tests { assert_eq!(c1s.sequence_number, 0); assert_eq!( c1s.epoch_rolling_gas_cost_summary, - GasCostSummary::new(41, 42, 41, 1) + GasCostSummary::new(41, 41, 42, 41, 1) ); assert_eq!(c2t, vec![d(3), d(2), d(1)]); @@ -2579,7 +2581,7 @@ mod tests { assert_eq!(c2s.sequence_number, 1); assert_eq!( c2s.epoch_rolling_gas_cost_summary, - GasCostSummary::new(104, 108, 104, 4) + GasCostSummary::new(104, 104, 108, 104, 4) ); // Pending at index 2 had 4 transactions, and we configured 3 transactions max. diff --git a/crates/iota-core/tests/staged/iota.yaml b/crates/iota-core/tests/staged/iota.yaml index 1d2cd9c0734..8d4074f0ea6 100644 --- a/crates/iota-core/tests/staged/iota.yaml +++ b/crates/iota-core/tests/staged/iota.yaml @@ -498,6 +498,7 @@ FullCheckpointContents: GasCostSummary: STRUCT: - computationCost: U64 + - computationCostBurned: U64 - storageCost: U64 - storageRebate: U64 - nonRefundableStorageFee: U64 @@ -591,7 +592,6 @@ MoveObject: STRUCT: - type_: TYPENAME: MoveObjectType - - has_public_transfer: BOOL - version: TYPENAME: SequenceNumber - contents: BYTES diff --git a/crates/iota-cost/tests/snapshots/empirical_transaction_cost__good_snapshot.snap b/crates/iota-cost/tests/snapshots/empirical_transaction_cost__good_snapshot.snap index 7b51633b3fe..cd5e5d19830 100644 --- a/crates/iota-cost/tests/snapshots/empirical_transaction_cost__good_snapshot.snap +++ b/crates/iota-cost/tests/snapshots/empirical_transaction_cost__good_snapshot.snap @@ -1,59 +1,69 @@ --- source: crates/iota-cost/tests/empirical_transaction_cost.rs expression: common_costs_actual +snapshot_kind: text --- { "MergeCoin": { "computationCost": "1000000", - "storageCost": "1976000", + "computationCostBurned": "1000000", + "storageCost": "1960800", "storageRebate": "0", "nonRefundableStorageFee": "0" }, "Publish": { "computationCost": "1000000", - "storageCost": "13505200", + "computationCostBurned": "1000000", + "storageCost": "13474800", "storageRebate": "0", "nonRefundableStorageFee": "0" }, "SharedCounterAssertValue": { "computationCost": "1000000", - "storageCost": "2591600", - "storageRebate": "1603600", + "computationCostBurned": "1000000", + "storageCost": "2576400", + "storageRebate": "1596000", "nonRefundableStorageFee": "0" }, "SharedCounterCreate": { "computationCost": "1000000", - "storageCost": "2591600", + "computationCostBurned": "1000000", + "storageCost": "2576400", "storageRebate": "0", "nonRefundableStorageFee": "0" }, "SharedCounterIncrement": { "computationCost": "1000000", - "storageCost": "2591600", - "storageRebate": "1603600", + "computationCostBurned": "1000000", + "storageCost": "2576400", + "storageRebate": "1596000", "nonRefundableStorageFee": "0" }, "SplitCoin": { "computationCost": "1000000", - "storageCost": "4940000", + "computationCostBurned": "1000000", + "storageCost": "4902000", "storageRebate": "0", "nonRefundableStorageFee": "0" }, "TransferPortionIotaCoin": { "computationCost": "1000000", - "storageCost": "1976000", + "computationCostBurned": "1000000", + "storageCost": "1960800", "storageRebate": "0", "nonRefundableStorageFee": "0" }, "TransferWholeCoin": { "computationCost": "1000000", - "storageCost": "1976000", + "computationCostBurned": "1000000", + "storageCost": "1960800", "storageRebate": "0", "nonRefundableStorageFee": "0" }, "TransferWholeIotaCoin": { "computationCost": "1000000", - "storageCost": "988000", + "computationCostBurned": "1000000", + "storageCost": "980400", "storageRebate": "0", "nonRefundableStorageFee": "0" } diff --git a/crates/iota-e2e-tests/tests/apy_test.rs b/crates/iota-e2e-tests/tests/apy_test.rs index 4f1b136d77a..9743961bb68 100644 --- a/crates/iota-e2e-tests/tests/apy_test.rs +++ b/crates/iota-e2e-tests/tests/apy_test.rs @@ -67,8 +67,8 @@ async fn test_apy() { // for that address. test_cluster .wallet - .config - .keystore + .config_mut() + .keystore_mut() .add_key(None, IotaKeyPair::Ed25519(keypair)) .unwrap(); diff --git a/crates/iota-e2e-tests/tests/full_node_tests.rs b/crates/iota-e2e-tests/tests/full_node_tests.rs index a705d3b346b..b22895f7e26 100644 --- a/crates/iota-e2e-tests/tests/full_node_tests.rs +++ b/crates/iota-e2e-tests/tests/full_node_tests.rs @@ -93,8 +93,8 @@ async fn test_full_node_shared_objects() -> Result<(), anyhow::Error> { let context = &mut test_cluster.wallet; let sender = context - .config - .keystore + .config() + .keystore() .addresses() .first() .cloned() @@ -159,14 +159,14 @@ async fn test_sponsored_transaction() -> Result<(), anyhow::Error> { let tx = to_sender_signed_transaction_with_multi_signers(tx_data, vec![ test_cluster .wallet - .config - .keystore + .config() + .keystore() .get_key(&sender) .unwrap(), test_cluster .wallet - .config - .keystore + .config() + .keystore() .get_key(&sponsor) .unwrap(), ]); @@ -526,8 +526,8 @@ async fn do_test_full_node_sync_flood() { let context = &mut context.lock().await; let sender = context - .config - .keystore + .config() + .keystore() .addresses() .first() .cloned() @@ -817,12 +817,12 @@ async fn test_execute_tx_with_serialized_signature() -> Result<(), anyhow::Error let mut test_cluster = TestClusterBuilder::new().build().await; let context = &mut test_cluster.wallet; context - .config - .keystore + .config_mut() + .keystore_mut() .add_key(None, IotaKeyPair::Secp256k1(get_key_pair().1))?; context - .config - .keystore + .config_mut() + .keystore_mut() .add_key(None, IotaKeyPair::Ed25519(get_key_pair().1))?; let jsonrpc_client = &test_cluster.fullnode_handle.rpc_client; @@ -1122,8 +1122,8 @@ async fn test_pass_back_no_object() -> Result<(), anyhow::Error> { let context = &mut test_cluster.wallet; let sender = context - .config - .keystore + .config() + .keystore() .addresses() .first() .cloned() @@ -1161,8 +1161,10 @@ async fn test_pass_back_no_object() -> Result<(), anyhow::Error> { rgp, ) .unwrap(); - let tx = - to_sender_signed_transaction(tx_data, context.config.keystore.get_key(&sender).unwrap()); + let tx = to_sender_signed_transaction( + tx_data, + context.config().keystore().get_key(&sender).unwrap(), + ); let digest = *tx.digest(); let _res = transaction_orchestrator diff --git a/crates/iota-e2e-tests/tests/migration/stardust_object_snapshot.bin b/crates/iota-e2e-tests/tests/migration/stardust_object_snapshot.bin index 54d600ecd73..c7fa51debb7 100644 Binary files a/crates/iota-e2e-tests/tests/migration/stardust_object_snapshot.bin and b/crates/iota-e2e-tests/tests/migration/stardust_object_snapshot.bin differ diff --git a/crates/iota-e2e-tests/tests/protocol_version_tests.rs b/crates/iota-e2e-tests/tests/protocol_version_tests.rs index 55705a25d67..38369359e08 100644 --- a/crates/iota-e2e-tests/tests/protocol_version_tests.rs +++ b/crates/iota-e2e-tests/tests/protocol_version_tests.rs @@ -343,12 +343,6 @@ mod sim_only_tests { let to_wrap1 = create_obj(&cluster).await; let to_transfer1 = create_obj(&cluster).await; - // Instances of the type that existed before will not have public transfer - // despite now having store - assert!(!has_public_transfer(&cluster, &to_wrap0.0).await); - assert!(!has_public_transfer(&cluster, &to_transfer0.0).await); - assert!(has_public_transfer(&cluster, &to_wrap1.0).await); - assert!(has_public_transfer(&cluster, &to_transfer1.0).await); // Instances of the type that existed before and new instances are able to take // advantage of the newly introduced ability wrap_obj(&cluster, to_wrap0).await; @@ -673,15 +667,6 @@ mod sim_only_tests { .await } - async fn has_public_transfer(cluster: &TestCluster, object_id: &ObjectID) -> bool { - get_object(&cluster, object_id) - .await - .data - .try_as_move() - .unwrap() - .has_public_transfer() - } - #[sim_test] async fn test_framework_compatible_upgrade_no_protocol_version() { ProtocolConfig::poison_get_for_min_version(); diff --git a/crates/iota-e2e-tests/tests/reconfiguration_tests.rs b/crates/iota-e2e-tests/tests/reconfiguration_tests.rs index 0c905ba0d0d..b731b4d1169 100644 --- a/crates/iota-e2e-tests/tests/reconfiguration_tests.rs +++ b/crates/iota-e2e-tests/tests/reconfiguration_tests.rs @@ -49,7 +49,7 @@ async fn advance_epoch_tx_test() { let (_system_state, _system_epoch_info_event, effects) = state .create_and_execute_advance_epoch_tx( &state.epoch_store_for_testing(), - &GasCostSummary::new(0, 0, 0, 0), + &GasCostSummary::new(0, 0, 0, 0, 0), 0, // checkpoint 0, // epoch_start_timestamp_ms ) diff --git a/crates/iota-e2e-tests/tests/shared_objects_tests.rs b/crates/iota-e2e-tests/tests/shared_objects_tests.rs index 8371addc2b1..8525b378580 100644 --- a/crates/iota-e2e-tests/tests/shared_objects_tests.rs +++ b/crates/iota-e2e-tests/tests/shared_objects_tests.rs @@ -468,7 +468,7 @@ async fn call_shared_object_contract() { ); } -#[ignore("Disabled due to flakiness - re-enable when failure is fixed")] +#[ignore("Issue - https://github.com/iotaledger/iota/issues/4010")] #[sim_test] async fn access_clock_object_test() { let test_cluster = TestClusterBuilder::new().build().await; @@ -478,7 +478,7 @@ async fn access_clock_object_test() { &test_cluster .test_transaction_builder() .await - .move_call(package_id, "clock", "get_time", vec![CallArg::CLOCK_IMM]) + .move_call(package_id, "clock", "access", vec![CallArg::CLOCK_IMM]) .build(), ); let digest = *transaction.digest(); diff --git a/crates/iota-e2e-tests/tests/snapshot_tests.rs b/crates/iota-e2e-tests/tests/snapshot_tests.rs index ed273810eea..9c482884972 100644 --- a/crates/iota-e2e-tests/tests/snapshot_tests.rs +++ b/crates/iota-e2e-tests/tests/snapshot_tests.rs @@ -68,8 +68,8 @@ async fn basic_read_cmd_snapshot_tests() -> Result<(), anyhow::Error> { // 0x3b5121a0603ef7ab4cb57827fceca17db3338ef2cd76126cc1523b681df27cee --bcs", // valid // object BCS "iota client object 0x0000000000000000000000000000000000000000000000000000000000000000", /* non-existent object */ - "iota client tx-block Cq8LK5uVL4CXgG71iXEuDoLEXcT8AAwYQRxNWV8GEREo", // valid tx digest - "iota client tx-block EgMTHQygMi6SRsBqrPHAEKZCNrpShXurCp9rcb9qbSg8", /* non-existent tx + "iota client tx-block 5zibcom3dMckjyN16ygFwr5XNa9Exi1MmY3BQs984x1N", // valid tx digest + "iota client tx-block 11111111111111111111111111111111", /* non-existent tx * digest */ ]; assert_json_snapshot!(run_one(cmds, context).await?); diff --git a/crates/iota-e2e-tests/tests/snapshots/snapshot_tests__body_fn.snap b/crates/iota-e2e-tests/tests/snapshots/snapshot_tests__body_fn.snap index 3df18d5fc84..90e0d1468c9 100644 --- a/crates/iota-e2e-tests/tests/snapshots/snapshot_tests__body_fn.snap +++ b/crates/iota-e2e-tests/tests/snapshots/snapshot_tests__body_fn.snap @@ -1,29 +1,29 @@ --- source: crates/iota-e2e-tests/tests/snapshot_tests.rs expression: "run_one(cmds, context).await?" +snapshot_kind: text --- [ "iota client objects {ME}", [ { "data": { - "objectId": "0x2c1a8cb28b43af1413d879e6a3acccb29eded14f952877582b027338c567bfcb", + "objectId": "0x5b0e7d31f9c3a421f94dae3511983a2be67e04a7071171da2380f82be103239f", "version": "1", - "digest": "Gqd4PCCzQDf2ZYqzzD2p3XAoh94NHo1A6WaSP4NHX8xQ", + "digest": "6s1xQf5HR8HMLNaR1QxPcfV4Ys8AL94UUg7cRpD6r4WD", "type": "0x2::coin::Coin<0x2::iota::IOTA>", "owner": { "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" }, - "previousTransaction": "Cq8LK5uVL4CXgG71iXEuDoLEXcT8AAwYQRxNWV8GEREo", + "previousTransaction": "5zibcom3dMckjyN16ygFwr5XNa9Exi1MmY3BQs984x1N", "storageRebate": "0", "content": { "dataType": "moveObject", "type": "0x2::coin::Coin<0x2::iota::IOTA>", - "hasPublicTransfer": true, "fields": { "balance": "30000000000000000", "id": { - "id": "0x2c1a8cb28b43af1413d879e6a3acccb29eded14f952877582b027338c567bfcb" + "id": "0x5b0e7d31f9c3a421f94dae3511983a2be67e04a7071171da2380f82be103239f" } } } @@ -31,23 +31,22 @@ expression: "run_one(cmds, context).await?" }, { "data": { - "objectId": "0x339053ddf13ae59297c29300bd68ddfd3af6c7a5d3cf94dbb877978149392da4", + "objectId": "0x5ee269cea868091ea1c5da5f15581c2f7b1708413b3bdda3e4c9528f2b3a5bb9", "version": "1", - "digest": "6F2itozbAXqk9Ak8diF6DGVpC5skK2r24TCgwkyNjNf9", + "digest": "7mvhi6RxxMnPohJzMnCYoLHBTLUcRtwFtBXe1ZoanE6D", "type": "0x2::coin::Coin<0x2::iota::IOTA>", "owner": { "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" }, - "previousTransaction": "Cq8LK5uVL4CXgG71iXEuDoLEXcT8AAwYQRxNWV8GEREo", + "previousTransaction": "5zibcom3dMckjyN16ygFwr5XNa9Exi1MmY3BQs984x1N", "storageRebate": "0", "content": { "dataType": "moveObject", "type": "0x2::coin::Coin<0x2::iota::IOTA>", - "hasPublicTransfer": true, "fields": { "balance": "30000000000000000", "id": { - "id": "0x339053ddf13ae59297c29300bd68ddfd3af6c7a5d3cf94dbb877978149392da4" + "id": "0x5ee269cea868091ea1c5da5f15581c2f7b1708413b3bdda3e4c9528f2b3a5bb9" } } } @@ -55,23 +54,22 @@ expression: "run_one(cmds, context).await?" }, { "data": { - "objectId": "0x4cccff02ad9fbfd4e77f071636d88fddad4e48629813518cd39b2100072e15d1", + "objectId": "0x759bb64d0a576b00a8aae6d439da4a72ef7d8797282c90211bab2bc723cd48e5", "version": "1", - "digest": "DPcMjDP4X3jp2t7J2zTZF7CBjhJ87fP1rxFHsDh9bRPE", + "digest": "7cuKDvum6Rx2utLqquqYZGr6K3S5xbA2fq88cqs8qjZd", "type": "0x2::coin::Coin<0x2::iota::IOTA>", "owner": { "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" }, - "previousTransaction": "Cq8LK5uVL4CXgG71iXEuDoLEXcT8AAwYQRxNWV8GEREo", + "previousTransaction": "5zibcom3dMckjyN16ygFwr5XNa9Exi1MmY3BQs984x1N", "storageRebate": "0", "content": { "dataType": "moveObject", "type": "0x2::coin::Coin<0x2::iota::IOTA>", - "hasPublicTransfer": true, "fields": { "balance": "30000000000000000", "id": { - "id": "0x4cccff02ad9fbfd4e77f071636d88fddad4e48629813518cd39b2100072e15d1" + "id": "0x759bb64d0a576b00a8aae6d439da4a72ef7d8797282c90211bab2bc723cd48e5" } } } @@ -79,23 +77,22 @@ expression: "run_one(cmds, context).await?" }, { "data": { - "objectId": "0xe0b08d48248e495318c2aa10da651a1cd69f49ddb38a349b0000dea55415f48b", + "objectId": "0xa010e1486bfd2f1d7c57a3b2c2edd369e64e8fddc1ca17667314317273cb491d", "version": "1", - "digest": "5UbcKdRD7iyfUn2upZ1c9wuWRiD9J9h9hCCE1jX1EHSz", + "digest": "DAFo7bkSkk2XRZv88Nb2V9jatTse1TYTqgMmVxVKGRtF", "type": "0x2::coin::Coin<0x2::iota::IOTA>", "owner": { "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" }, - "previousTransaction": "Cq8LK5uVL4CXgG71iXEuDoLEXcT8AAwYQRxNWV8GEREo", + "previousTransaction": "5zibcom3dMckjyN16ygFwr5XNa9Exi1MmY3BQs984x1N", "storageRebate": "0", "content": { "dataType": "moveObject", "type": "0x2::coin::Coin<0x2::iota::IOTA>", - "hasPublicTransfer": true, "fields": { "balance": "30000000000000000", "id": { - "id": "0xe0b08d48248e495318c2aa10da651a1cd69f49ddb38a349b0000dea55415f48b" + "id": "0xa010e1486bfd2f1d7c57a3b2c2edd369e64e8fddc1ca17667314317273cb491d" } } } @@ -103,23 +100,22 @@ expression: "run_one(cmds, context).await?" }, { "data": { - "objectId": "0xee188f7b5964b56105a062dcfddd10e4f4e427db489f9bf562a264b76e6bf9d7", + "objectId": "0xb279227ad10111e5d870facc26d048a05bc440859e718cde0e3bbf257765544c", "version": "1", - "digest": "A5Tnjugpa5gCcKLcwiVNJnYGRHuuADX7YtpgUtgfKfXa", + "digest": "BZaGDacxqx5MFLFm6F3UeBVpHG5hZykqSHFoD1o5F5kq", "type": "0x2::coin::Coin<0x2::iota::IOTA>", "owner": { "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" }, - "previousTransaction": "Cq8LK5uVL4CXgG71iXEuDoLEXcT8AAwYQRxNWV8GEREo", + "previousTransaction": "5zibcom3dMckjyN16ygFwr5XNa9Exi1MmY3BQs984x1N", "storageRebate": "0", "content": { "dataType": "moveObject", "type": "0x2::coin::Coin<0x2::iota::IOTA>", - "hasPublicTransfer": true, "fields": { "balance": "30000000000000000", "id": { - "id": "0xee188f7b5964b56105a062dcfddd10e4f4e427db489f9bf562a264b76e6bf9d7" + "id": "0xb279227ad10111e5d870facc26d048a05bc440859e718cde0e3bbf257765544c" } } } @@ -134,19 +130,18 @@ expression: "run_one(cmds, context).await?" "data": { "objectId": "0x0000000000000000000000000000000000000000000000000000000000000005", "version": "1", - "digest": "9YBBaSbQMRgqSUFr82Sj9XnQ9xt1XnC5NvDn4KdJeJH1", + "digest": "73woKiMAUkS1ejdzSwyD1WLDCxsPVYURbwpMBa64Tu4h", "type": "0x3::iota_system::IotaSystemState", "owner": { "Shared": { "initial_shared_version": 1 } }, - "previousTransaction": "Cq8LK5uVL4CXgG71iXEuDoLEXcT8AAwYQRxNWV8GEREo", + "previousTransaction": "5zibcom3dMckjyN16ygFwr5XNa9Exi1MmY3BQs984x1N", "storageRebate": "0", "content": { "dataType": "moveObject", "type": "0x3::iota_system::IotaSystemState", - "hasPublicTransfer": false, "fields": { "id": { "id": "0x0000000000000000000000000000000000000000000000000000000000000005" @@ -163,19 +158,18 @@ expression: "run_one(cmds, context).await?" "data": { "objectId": "0x0000000000000000000000000000000000000000000000000000000000000005", "version": "1", - "digest": "9YBBaSbQMRgqSUFr82Sj9XnQ9xt1XnC5NvDn4KdJeJH1", + "digest": "73woKiMAUkS1ejdzSwyD1WLDCxsPVYURbwpMBa64Tu4h", "type": "0x3::iota_system::IotaSystemState", "owner": { "Shared": { "initial_shared_version": 1 } }, - "previousTransaction": "Cq8LK5uVL4CXgG71iXEuDoLEXcT8AAwYQRxNWV8GEREo", + "previousTransaction": "5zibcom3dMckjyN16ygFwr5XNa9Exi1MmY3BQs984x1N", "storageRebate": "0", "bcs": { "dataType": "moveObject", "type": "0x3::iota_system::IotaSystemState", - "hasPublicTransfer": false, "version": 1, "bcsBytes": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUBAAAAAAAAAA==" } @@ -191,9 +185,9 @@ expression: "run_one(cmds, context).await?" } } ], - "iota client tx-block Cq8LK5uVL4CXgG71iXEuDoLEXcT8AAwYQRxNWV8GEREo", + "iota client tx-block 5zibcom3dMckjyN16ygFwr5XNa9Exi1MmY3BQs984x1N", { - "digest": "Cq8LK5uVL4CXgG71iXEuDoLEXcT8AAwYQRxNWV8GEREo", + "digest": "5zibcom3dMckjyN16ygFwr5XNa9Exi1MmY3BQs984x1N", "transaction": { "data": { "messageVersion": "v1", @@ -209,63 +203,64 @@ expression: "run_one(cmds, context).await?" "0x000000000000000000000000000000000000000000000000000000000000000b", "0x0000000000000000000000000000000000000000000000000000000000000403", "0x000000000000000000000000000000000000000000000000000000000000107a", - "0x0658bc0b0d7fbc21787e3c0cb499355da97a2676b1d89fe4b30d163b8c62e7ed", - "0x075763a78e8a77cba94dfb46a7d7ffff8ed330d0774ec244a9c066b87376bf85", - "0x17e76e42843454d5d030ad02dd96b08d27dd1baea95ec33f61422d2a474fc64e", - "0x1c91896da60a3b83c30c4ec462b01b7b58620fef39a66464b48a94c0eb129017", - "0x2a655cbb998089faa8412a2c2a92fa00a8b8398df3df42f39d576434ee7572fa", - "0x2c1a8cb28b43af1413d879e6a3acccb29eded14f952877582b027338c567bfcb", - "0x339053ddf13ae59297c29300bd68ddfd3af6c7a5d3cf94dbb877978149392da4", - "0x3621f85e6d15240ebe5ed168e14b5bb76e6f44bbf0f8c2a3a5b3ab66af6d0a2f", - "0x3f17533f07520a49ef52abfbf7b9317e234f29e0196b33afc84d163ef8034d03", - "0x434480a6195e420a99448287684aceb12e88bae1004166e8d3e84910257af130", - "0x464079306127b6f089328b16d1f2de3efef3b6ddc099bf9850f6914cd64bcfa5", - "0x4b44af5c085eb56a4b0cd9e09b9e5cd8fb33119a93238dd3768c7437175a9df5", - "0x4c85212134d410410c2a5ee0f03f3595884fa739931d03742833d02f9f4d890b", - "0x4cccff02ad9fbfd4e77f071636d88fddad4e48629813518cd39b2100072e15d1", - "0x532489afdc0d76972e374298baaee6730bfeee3d68b26abfecd616a56690d902", - "0x5396282be36c868aec019959977a2a2b3e35e32ca8e9d0418a73d5d7f06c45f3", - "0x58010842a21daf70d03f28e14a55c3b44c9e1f2c82bf6e79643c440e7e260231", - "0x5e199335497052f88a5179fe1b336aa3908278987d5d8cbfc01ae1d20eafa7bc", - "0x5fb62a31bea23630d03f4a650cd8faa3b60e636d82f79aa9b61e35cf70861712", - "0x601abe73257d8782de41888a16e9e04465a781e321f929c4c9c348c8a9a1110c", + "0x018673f8b9c2eee4dd923fb6fcb3eb77d0e33d15921ac59f1c57ea7dfe4c3f40", + "0x08e1bd72a9f239c8e99a3ee8f1f4141b48ba063ecc0ebff878152e2b481b94bc", + "0x163b3f079eb959dc96768c65497ef5c3b48106439a306324c484a8d28e0ba50f", + "0x16d23fb8f64faebeea28ecdd43d96cb60ed1c5a297347d61a0c3fa4fff08944e", + "0x1a1f82376293f736136384ae03744241eb257a82f25eb223c7ef02e67442d6df", + "0x1d8f7a031fcca49d212b5bf2b57704913f7c6ca423357a01dda70a150e8a35b0", + "0x1f3119f496e7c38af65bc0f29ee79354de5f554d03d0aa433bee015e280e97b4", + "0x2438ca49fb81fc37f74d890207c3a922b27de14b474525b4fa111de094e5194c", + "0x303fac6452e9b844d960dcd60c84efbbd28b017774787c58705b67af946d7076", + "0x3238c6a409ed6951125aaea3334cf632e053e0d09507e8a53d4b4b5923b896d0", + "0x3873a7b96acdc98bfa6db49a096f8e704caa6dc7cca29aecff52abe11442dc3f", + "0x3e5b52bc91e54ac367f5987785c7b0a68869a4be2eb0a74f7bee2172e0a70dbc", + "0x3fb0323b083da0415032b289cb6e610388de91f9666a67c02df8ddd9edb00f4c", + "0x4451b2f6d468c331dafa10f4b3fbf057b89f684553bf9298d0c4f8e61df2fa95", + "0x4547fa20f95dcc6e221d18eaf933f993ee8f46f98eef1705853a71f9c917c185", + "0x49315560aecdcf0beba3cfccb2d04f29f5d95b440cb0b6dadec64349b81083d6", + "0x497d698dce0d808d05cb3543b2decd461eb67a0a832acf7e3d822ff61663acb4", + "0x4a4a868c023e670163f57e2467cccdaedef147daf5170fc9b0ce7caa48284a76", + "0x4df66b7aab12f518bfba67b0081cadb8a321870b171a98d2aceafb6804e3b003", + "0x50948c5a6a706b267a6b2c2a4a2043d28ba11c5e022198f58be4182d65987a2d", + "0x58efd4d54b74b390e2d3bbe785ec5df555c366b1a6eb616fb07c44d6c3f67c8c", + "0x5b0e7d31f9c3a421f94dae3511983a2be67e04a7071171da2380f82be103239f", + "0x5c995a223cf5e88e2d19935481d2d06b2e55977cb3615ad6784cc360a42d6501", + "0x5ee269cea868091ea1c5da5f15581c2f7b1708413b3bdda3e4c9528f2b3a5bb9", + "0x61f2f500cb861d8d92affc84519c4c0a6b794058b58607768c8e38ab275de0eb", "0x6af2a2b7ca60bf76174adfd3e9c4957f8e937759603182f9b46c7f6c5f19c6d2", - "0x72995e676bcc6c290a2f4c42f8a5846c7ef0063b9af7728ef5d4123de9ac8bbc", - "0x72ee17dff740e4aefa6a03e6212533f3615005d79a206698bcd47e9b34d1df1a", - "0x76742eed3be4ac1fbf108ae112a743f314a8f8ac90c66b5beb0efe39a58ca6b6", - "0x778aafce25aa78d5cb0a77b78b816d4ef61e574a590fa5b5787c448c2eb56ce5", - "0x8371569f0f25fa2bef413dc333f74a8df4c1ad6cf31dc80048887ae85eecd527", - "0x83d61ef9fc69752099b356a702283468748b46057b97466da021ad966e2e1362", - "0x8f6303e1c51abe1dd7808d8c3d3c96cbaa53565e9dd243ee1bb65a3259947ec5", - "0x9798a9772438b077f07c4b5a29d90e8b1d1c774424043645ed27e5a0c79d2499", - "0x98038db1bfffc9a021aa9b1711288f56756a203112017ac615bdd49e0ddfe768", - "0x99bc508c5440067cf58e4b6e671416a2b04e4f60456b711a81b2a9f549ec6892", - "0xae837285a73c2d23f86206314d8acfdc7adf4af36e33807e3e535cc24edcddda", - "0xb1930538959be08dee8ab76c7898c85be25e429f967913cc90f3d1b1ab496717", - "0xb2d16c38972ef51ed6995d84fee1d5e938eb64d8ab4b8cadc68170f60a778486", - "0xc1f45dae29fcdc6611af2ac3b42443fa28fb337e89850cf61b97b048c6cfe121", - "0xc98cbb8b969eccb46b7a487eaa75ac486faa3a55b719731aa9a6b7fdcc90cbc3", - "0xcdb39cadb88f872448b2836e131c7ef076be9c644ca4d18795e4db5911267fa3", - "0xd23f565f9f5472944be8a2a7e36e2ce71a8c4f8b52f8da559f8545ac912347f6", - "0xd2cba88d7ce541ad591c502ccf59c6c59d7dd432b663cc13a36781a6976bf5bb", - "0xd5e3ee6fa97b35e816e608f24f775ffd69630f04d1f5131627fb86153a003e47", - "0xda50ca1f674de8e7166d0c0265dd4175f0a69f461c00ac65107d6957cd168348", - "0xda89bac08a36b187df7de02a08ac3b6a98016b1610c64cde2970f5f4b59125d4", - "0xdc94ba8e8d952bb19047335bc1517d556b21d2ce96722885214c5f5241ac4ad0", - "0xdf0d86e9d8d2ab9d598062da57d512d39e0102425ecea598aee9a1d73e883619", - "0xe0b08d48248e495318c2aa10da651a1cd69f49ddb38a349b0000dea55415f48b", - "0xe6a48ab793151dfceb21d185730b05319ede87e6e415fd1fec41bafe4e0779f6", - "0xee188f7b5964b56105a062dcfddd10e4f4e427db489f9bf562a264b76e6bf9d7", - "0xf9f32e362d5d343046fde898a7372ea2a6a7d4d36bda1b1ab31f1724a92a1982", - "0xfd211f3ecaa7a6f275351ac86570183daf1fba722faf7c5cb64f04210113dc60" + "0x6b517df3c5888ce924d7871e550989f835335c726a43a224ce3df6b6dfa53666", + "0x759bb64d0a576b00a8aae6d439da4a72ef7d8797282c90211bab2bc723cd48e5", + "0x76472cb3b720491fb9a66db21befaed5fbc8528976bc6fb2bc3c5deeef9d114c", + "0x7c9f819b470ae3ac98b6e44eeea9b461d66a38b22a3d2f61ce62c69f68d0c71a", + "0x81c7cfd9c7fa81f57a59f14739ee82157fc6a04d48a1b0a6e1187a8898042299", + "0x85a7aabfb1d8ef14efd87338a58efcdbfaf0cab5e5fc247ccd1080dcdd3d2d7f", + "0x8cd9aca3790437fc6b1b7258c5fefb2e95ffb54134aae1fd04ba757d4286055d", + "0x8fd46357d5ae46f9ee8de7d9b6dfc9da4e497c70dbd2ce5c2fc124658798d5c9", + "0xa010e1486bfd2f1d7c57a3b2c2edd369e64e8fddc1ca17667314317273cb491d", + "0xa6e659b1120b373f598d1f6c3214d73abda596eb913857e1fa471ab4420f2e27", + "0xb271c22281276193f817eeab5291b79f5f37698a21323fbafe014e1774c3d22e", + "0xb279227ad10111e5d870facc26d048a05bc440859e718cde0e3bbf257765544c", + "0xbb43894417b1b4a4cee286133d85cae9706c217d150daf4d12168bc5e9147d78", + "0xc066a3793934a82847a3cee2a0dd84832ba1ba24b71ac0602b1a60cbbe553d17", + "0xc79de55a6454ac8e927645a08e4e9b3ce8e814ce9fc25eb7a347a91fc2228f4f", + "0xc7ee80d93a34f12ff58b0ceaf16c4e06ee6ceeb547b031b0d3eab1a8a6ca873f", + "0xd1e455eb2c367047a03756eb830bf0d2357b0c69905f0d4f3a648cc81498905e", + "0xd26171201bf3e074f1d1c694ea6ebc5d95d75b75583c393055efbca3eeb9c629", + "0xd6090aa14b28b0e907434cd8f8469b24769a80ebd722f18df48fe59e5fd47c0f", + "0xe47935c2607151b36e2e7d6971418157d7a8997ab2771ae779f5b6a2230334c9", + "0xe54599f1bb4b687498caf1e5212c6eaf0b088dcc8159d283ecf2c6287ede48dc", + "0xefd24c24d3784edec255308f6fc3619f65902ebd122f5a34b105727994326ce1", + "0xfbf79fe230691c666820739add167373a61a7faa858231f42feb961ec8fffcf5", + "0xffc04eb3011a2933dd0fbfff34cbd6759dbf999f7e2ac372e08d577c56a459cb" ], "events": [ { - "txDigest": "Cq8LK5uVL4CXgG71iXEuDoLEXcT8AAwYQRxNWV8GEREo", + "txDigest": "5zibcom3dMckjyN16ygFwr5XNa9Exi1MmY3BQs984x1N", "eventSeq": "0" }, { - "txDigest": "Cq8LK5uVL4CXgG71iXEuDoLEXcT8AAwYQRxNWV8GEREo", + "txDigest": "5zibcom3dMckjyN16ygFwr5XNa9Exi1MmY3BQs984x1N", "eventSeq": "1" } ] @@ -296,18 +291,19 @@ expression: "run_one(cmds, context).await?" "executedEpoch": "0", "gasUsed": { "computationCost": "0", + "computationCostBurned": "0", "storageCost": "0", "storageRebate": "0", "nonRefundableStorageFee": "0" }, - "transactionDigest": "Cq8LK5uVL4CXgG71iXEuDoLEXcT8AAwYQRxNWV8GEREo", + "transactionDigest": "5zibcom3dMckjyN16ygFwr5XNa9Exi1MmY3BQs984x1N", "created": [ { "owner": "Immutable", "reference": { "objectId": "0x0000000000000000000000000000000000000000000000000000000000000001", "version": 1, - "digest": "EEzLb1GUJ7T1D7c5YshyZRTUeEbuqJHEXZzVnZSyiP4X" + "digest": "4JE3kcoZSKseaSsSdgQveyB6GHU2GF3oBpg5pJ39ZSFG" } }, { @@ -315,7 +311,7 @@ expression: "run_one(cmds, context).await?" "reference": { "objectId": "0x0000000000000000000000000000000000000000000000000000000000000002", "version": 1, - "digest": "Hfn1skt6xRG4LJWMYfSRihabdYdysbpfW3E37FkZYTNv" + "digest": "8zNipc5CUAJYs6ak77VrFXPxQyY5vwtkUmyZz8w2j5Fq" } }, { @@ -323,7 +319,7 @@ expression: "run_one(cmds, context).await?" "reference": { "objectId": "0x0000000000000000000000000000000000000000000000000000000000000003", "version": 1, - "digest": "8ncmvcNW2hSrxsiA1BAYLfiHT7gq9CrQ5xAZd5icZ7AZ" + "digest": "GCLhS6D6SeU7JstsXGPEF2PTY9rGQXNLo3A6j162jdFi" } }, { @@ -335,7 +331,7 @@ expression: "run_one(cmds, context).await?" "reference": { "objectId": "0x0000000000000000000000000000000000000000000000000000000000000005", "version": 1, - "digest": "9YBBaSbQMRgqSUFr82Sj9XnQ9xt1XnC5NvDn4KdJeJH1" + "digest": "73woKiMAUkS1ejdzSwyD1WLDCxsPVYURbwpMBa64Tu4h" } }, { @@ -347,7 +343,7 @@ expression: "run_one(cmds, context).await?" "reference": { "objectId": "0x0000000000000000000000000000000000000000000000000000000000000006", "version": 1, - "digest": "DoYdsHQ3yrPPbeLiP7m86cEvpdZa5u9WR3sfwkAwFzzP" + "digest": "2iNGKB1PQafgW1o6Y3ZSkUwhxJrNbbEK4PfrqW4zxokW" } }, { @@ -359,7 +355,7 @@ expression: "run_one(cmds, context).await?" "reference": { "objectId": "0x0000000000000000000000000000000000000000000000000000000000000008", "version": 1, - "digest": "HcuoW6CpTvpCW6zyXReFRuwG57fWjFao6aFaQ8B6ojqb" + "digest": "4ZVAMTUCrpGjd97gLUnqTSvk2gqJvr7FnGopRvQkVnzn" } }, { @@ -367,7 +363,7 @@ expression: "run_one(cmds, context).await?" "reference": { "objectId": "0x000000000000000000000000000000000000000000000000000000000000000b", "version": 1, - "digest": "7qX7XuWkQdxTey5khTi36fSt7wUaUj6WLcCvHYw7Kt7L" + "digest": "81neBedYgjyePBFEUdm3PPC3K6BLGjwuyyFXxaDFKbAT" } }, { @@ -379,7 +375,7 @@ expression: "run_one(cmds, context).await?" "reference": { "objectId": "0x0000000000000000000000000000000000000000000000000000000000000403", "version": 1, - "digest": "4MciKuQpwmG4gcXB5j4CpYEsiEEFJADhVHNaLtnD7VgJ" + "digest": "E7zwAronHAhg8gRcCNJrzffEcMCqyGwTRvXzk6tZYTzG" } }, { @@ -387,37 +383,37 @@ expression: "run_one(cmds, context).await?" "reference": { "objectId": "0x000000000000000000000000000000000000000000000000000000000000107a", "version": 1, - "digest": "EyPJZsqLWzzuLwUbDmq77YDcYc2n28JUvmR2D3XYXvEx" + "digest": "BvAgaA1pE6cMYg7tNZv7sdafwnYCgxk9DPseprtGCXw5" } }, { "owner": { - "AddressOwner": "0x4b578d914e64de1ca47bead61bcfa0932646e16de6063089810cfa904eb8b06f" + "AddressOwner": "0x0b37c2167535af8a5729c44690f7be89eb248a6eb3cda5fd37ee1029949f0c29" }, "reference": { - "objectId": "0x0658bc0b0d7fbc21787e3c0cb499355da97a2676b1d89fe4b30d163b8c62e7ed", + "objectId": "0x018673f8b9c2eee4dd923fb6fcb3eb77d0e33d15921ac59f1c57ea7dfe4c3f40", "version": 1, - "digest": "AgqbZ4SdhbequEufn6KPMegNwUEGHbZeGfNVWM7YEdFD" + "digest": "AkRRb1Y6sXYHYunTUhbhqZoeTF2KdJ9E2YJh8zncRof3" } }, { "owner": { - "AddressOwner": "0x786c73ac358652b660d32e1097d11ea2723cfada4ab861288855c70f8c5b7fe9" + "AddressOwner": "0x4b578d914e64de1ca47bead61bcfa0932646e16de6063089810cfa904eb8b06f" }, "reference": { - "objectId": "0x075763a78e8a77cba94dfb46a7d7ffff8ed330d0774ec244a9c066b87376bf85", + "objectId": "0x08e1bd72a9f239c8e99a3ee8f1f4141b48ba063ecc0ebff878152e2b481b94bc", "version": 1, - "digest": "9Wdw77n2eeCTSha1f6Uj4LvG934xphSbyNRazH83W89j" + "digest": "FszgvFokRH5rBBNoLrTxKWBGnCAdiRqXpWYixmwBvwpf" } }, { "owner": { - "AddressOwner": "0x44f42943b20151d6a0c3cb0f84006b3441bb3378c668a6df71fa36cb441538c8" + "AddressOwner": "0xb4b32db0fb2bc9170f796efb2439aeaf46fd0dc0b79af4e12d14bb87c3e9aa65" }, "reference": { - "objectId": "0x17e76e42843454d5d030ad02dd96b08d27dd1baea95ec33f61422d2a474fc64e", + "objectId": "0x163b3f079eb959dc96768c65497ef5c3b48106439a306324c484a8d28e0ba50f", "version": 1, - "digest": "Ajbmr42uP2PXH3JgpufkeSbHVsc4FRaVgWiA3Na4ryCg" + "digest": "2ueUhUo7CYjPNknnKCgASKC7u1ifGVYa9N2GpqNEFzoE" } }, { @@ -425,305 +421,317 @@ expression: "run_one(cmds, context).await?" "AddressOwner": "0x2f1c55f14bcab32b91bccbf9909aa2818d644d4a1f6401c37f97383e4d8275ca" }, "reference": { - "objectId": "0x1c91896da60a3b83c30c4ec462b01b7b58620fef39a66464b48a94c0eb129017", + "objectId": "0x16d23fb8f64faebeea28ecdd43d96cb60ed1c5a297347d61a0c3fa4fff08944e", "version": 1, - "digest": "D1czj3Qr4pMCQqhSwPxwiLFbGiMocRTuBkL8LftbsquG" + "digest": "ApwvoSkL1WC5UcJWSbzGuNJHn9F5ZPuALucnMNP63sCF" + } + }, + { + "owner": "Immutable", + "reference": { + "objectId": "0x1a1f82376293f736136384ae03744241eb257a82f25eb223c7ef02e67442d6df", + "version": 1, + "digest": "CJY1zNjevKH6Kya6aWr3Ri1HQsgeZFCf9qR4HqH72Fnt" } }, { "owner": { - "ObjectOwner": "0x7c7b5e9ac86c1c9167861684dc799150ae0bcb20ee35dc027a7b1c3239c43491" + "AddressOwner": "0x44f42943b20151d6a0c3cb0f84006b3441bb3378c668a6df71fa36cb441538c8" }, "reference": { - "objectId": "0x2a655cbb998089faa8412a2c2a92fa00a8b8398df3df42f39d576434ee7572fa", + "objectId": "0x1d8f7a031fcca49d212b5bf2b57704913f7c6ca423357a01dda70a150e8a35b0", "version": 1, - "digest": "6Gcrhm9g7gENwXs1LJLhM7bG7f7CaCH1UboQDrapPpve" + "digest": "7yn1SCAHPQVAmJANbtPKjkZyzpN675SHdNBNwdFfXGbZ" } }, { "owner": { - "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" + "AddressOwner": "0x44f42943b20151d6a0c3cb0f84006b3441bb3378c668a6df71fa36cb441538c8" }, "reference": { - "objectId": "0x2c1a8cb28b43af1413d879e6a3acccb29eded14f952877582b027338c567bfcb", + "objectId": "0x1f3119f496e7c38af65bc0f29ee79354de5f554d03d0aa433bee015e280e97b4", "version": 1, - "digest": "Gqd4PCCzQDf2ZYqzzD2p3XAoh94NHo1A6WaSP4NHX8xQ" + "digest": "59iXLqERWshXAXJqsVuwRRmoxW4AXLv5jnH3cPxRwAXw" } }, { "owner": { - "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" + "AddressOwner": "0x4b2a0b010344ffda7202ecd5f76b742b78516cfcdb208e3314d65a4157654c4b" }, "reference": { - "objectId": "0x339053ddf13ae59297c29300bd68ddfd3af6c7a5d3cf94dbb877978149392da4", + "objectId": "0x2438ca49fb81fc37f74d890207c3a922b27de14b474525b4fa111de094e5194c", "version": 1, - "digest": "6F2itozbAXqk9Ak8diF6DGVpC5skK2r24TCgwkyNjNf9" + "digest": "A5e18Gy41Bxq2McoH7FbiYJFfU1yx26XRgvDk31KbRTz" } }, { - "owner": "Immutable", + "owner": { + "AddressOwner": "0x20227cfbc6699debf187d2d7bca3d253cd50f87c165516d3dc53a246a9af7182" + }, "reference": { - "objectId": "0x3621f85e6d15240ebe5ed168e14b5bb76e6f44bbf0f8c2a3a5b3ab66af6d0a2f", + "objectId": "0x303fac6452e9b844d960dcd60c84efbbd28b017774787c58705b67af946d7076", "version": 1, - "digest": "5ceUwwuSyYNbGcn6t92VYhkhrM9WXFrsqjHMBx9hTgui" + "digest": "D582bFMq1ftKpRhrcFeRLhEJUbfrRZZLA6Ymgs87S6cC" } }, { "owner": { - "AddressOwner": "0xa76e9ed3ad7f9e542674c2128d42dfe094540b485eba58f6e980ef8082230507" + "AddressOwner": "0x0b37c2167535af8a5729c44690f7be89eb248a6eb3cda5fd37ee1029949f0c29" }, "reference": { - "objectId": "0x3f17533f07520a49ef52abfbf7b9317e234f29e0196b33afc84d163ef8034d03", + "objectId": "0x3238c6a409ed6951125aaea3334cf632e053e0d09507e8a53d4b4b5923b896d0", "version": 1, - "digest": "eLUzrhLUXkLJexz7yRkugTEecsUSatiS97eKDTyRKQ9" + "digest": "GZiR6Qj8jF3vb8Eq3AF3zrCrqGcHpKPFv3MYRCn4RLsT" } }, { "owner": { - "AddressOwner": "0x4b2a0b010344ffda7202ecd5f76b742b78516cfcdb208e3314d65a4157654c4b" + "ObjectOwner": "0xce3d02f2a570935f50158318f1f0f8706fb80873afce7bb914625c1082225399" }, "reference": { - "objectId": "0x434480a6195e420a99448287684aceb12e88bae1004166e8d3e84910257af130", + "objectId": "0x3873a7b96acdc98bfa6db49a096f8e704caa6dc7cca29aecff52abe11442dc3f", "version": 1, - "digest": "5BrMrFjw1CczYMshk7dccVioKF2SSvvEudBSSoVicvgG" + "digest": "DmLPuMUMQHtu4hRNpXbcjqtRKWrJqPLUDnZw84GmgaUZ" } }, { "owner": { - "AddressOwner": "0xa0146b1188ebad1dab40317cfb41b64eea8452d2e3b4696f115b2bcf70a62620" + "ObjectOwner": "0xce3d02f2a570935f50158318f1f0f8706fb80873afce7bb914625c1082225399" }, "reference": { - "objectId": "0x464079306127b6f089328b16d1f2de3efef3b6ddc099bf9850f6914cd64bcfa5", + "objectId": "0x3e5b52bc91e54ac367f5987785c7b0a68869a4be2eb0a74f7bee2172e0a70dbc", "version": 1, - "digest": "RgrevPjn6eRbaBQBFDp5GVkhRHAxX1LN6PX6W7R3b2G" + "digest": "ARd1kECfyCcc3TUTnFZrdYRAGX6xn9G3ZKNtQKNDEA8R" } }, { "owner": { - "AddressOwner": "0xd4ab7d9834d2755f11fe022dd53feecd86cb447425496fc4d02cb7b73348c688" + "AddressOwner": "0x0b37c2167535af8a5729c44690f7be89eb248a6eb3cda5fd37ee1029949f0c29" }, "reference": { - "objectId": "0x4b44af5c085eb56a4b0cd9e09b9e5cd8fb33119a93238dd3768c7437175a9df5", + "objectId": "0x3fb0323b083da0415032b289cb6e610388de91f9666a67c02df8ddd9edb00f4c", "version": 1, - "digest": "EXw3aJJqk8qBNWnDcLwg64D1qtyZjxhP5haefEbvFyDi" + "digest": "EidyXR5ajBRafVgkEA1cm598AdyK66F2NBub16VyE9aB" } }, { "owner": { - "AddressOwner": "0x2f1c55f14bcab32b91bccbf9909aa2818d644d4a1f6401c37f97383e4d8275ca" + "AddressOwner": "0x7a9730f69d7c9eed4058b7e3ad9019adffdf63a94ef73cd2fb0217f3b9eb6eb1" }, "reference": { - "objectId": "0x4c85212134d410410c2a5ee0f03f3595884fa739931d03742833d02f9f4d890b", + "objectId": "0x4451b2f6d468c331dafa10f4b3fbf057b89f684553bf9298d0c4f8e61df2fa95", "version": 1, - "digest": "3pwRGNUZmDZcfQp6tvvH63PYDtVZVG2VttFBhYMkDJLZ" + "digest": "33vUxz6x2MsvDWTQWpFpjWQbPbbZhUxPyn3uwSDfAVQx" } }, { "owner": { - "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" + "ObjectOwner": "0xce3d02f2a570935f50158318f1f0f8706fb80873afce7bb914625c1082225399" }, "reference": { - "objectId": "0x4cccff02ad9fbfd4e77f071636d88fddad4e48629813518cd39b2100072e15d1", + "objectId": "0x4547fa20f95dcc6e221d18eaf933f993ee8f46f98eef1705853a71f9c917c185", "version": 1, - "digest": "DPcMjDP4X3jp2t7J2zTZF7CBjhJ87fP1rxFHsDh9bRPE" + "digest": "J3kRd8hXaaV2mFKES9k7X2NnjxDCGcFAUoXCqsY2reZJ" } }, { "owner": { - "ObjectOwner": "0xdfa435dca12a14a0e032df1774310db7f9c33510231aba16399e13b44c388919" + "ObjectOwner": "0xbc4cf4a6e17ba874f668896d13e8dda92bab7a8870b3118d26fd67501028c2f3" }, "reference": { - "objectId": "0x532489afdc0d76972e374298baaee6730bfeee3d68b26abfecd616a56690d902", + "objectId": "0x49315560aecdcf0beba3cfccb2d04f29f5d95b440cb0b6dadec64349b81083d6", "version": 1, - "digest": "HnGKwbms8dfQ6XNxcJDbLbFHDkh2b5NyARjgh8888Nh5" + "digest": "BRyi5NozgWp2Aji5hM8p83M8VgyR3PYg7G27MiYR2B9z" } }, { "owner": { - "ObjectOwner": "0xdfa435dca12a14a0e032df1774310db7f9c33510231aba16399e13b44c388919" + "ObjectOwner": "0x672bba3ef273000a1627a5f128022e261e36a85db6c508b917aa3139a2e9720d" }, "reference": { - "objectId": "0x5396282be36c868aec019959977a2a2b3e35e32ca8e9d0418a73d5d7f06c45f3", + "objectId": "0x497d698dce0d808d05cb3543b2decd461eb67a0a832acf7e3d822ff61663acb4", "version": 1, - "digest": "C8kPWM5ksWk5ppVSZUSEvy5axrRBzqeqD3Gw4SfwYLt5" + "digest": "242fQBuczzCLdXuMZ7FZwR9m86DacJxUTC5xuUW62DSG" } }, { "owner": { - "AddressOwner": "0x4b2a0b010344ffda7202ecd5f76b742b78516cfcdb208e3314d65a4157654c4b" + "AddressOwner": "0x7a9730f69d7c9eed4058b7e3ad9019adffdf63a94ef73cd2fb0217f3b9eb6eb1" }, "reference": { - "objectId": "0x58010842a21daf70d03f28e14a55c3b44c9e1f2c82bf6e79643c440e7e260231", + "objectId": "0x4a4a868c023e670163f57e2467cccdaedef147daf5170fc9b0ce7caa48284a76", "version": 1, - "digest": "CVQfkwhtZPCWcXEwPNDx2RgJZZZWj9bViZkCG6rp7RT2" + "digest": "AWztWHzVjwd5rYXr7ork1gYC54JqtGpwHNdFA9i6gA16" } }, { "owner": { - "ObjectOwner": "0xdfa435dca12a14a0e032df1774310db7f9c33510231aba16399e13b44c388919" + "AddressOwner": "0x7a9730f69d7c9eed4058b7e3ad9019adffdf63a94ef73cd2fb0217f3b9eb6eb1" }, "reference": { - "objectId": "0x5e199335497052f88a5179fe1b336aa3908278987d5d8cbfc01ae1d20eafa7bc", + "objectId": "0x4df66b7aab12f518bfba67b0081cadb8a321870b171a98d2aceafb6804e3b003", "version": 1, - "digest": "GVWnxq3G3VTkrjmzeTCQNsrsZLH2pTv6a8cyJvPTjMPK" + "digest": "EPxkpuZZYcjDJq9AzNLMPM8vsY1URjow7nmDuxQQ1QCb" } }, { "owner": { - "ObjectOwner": "0x0ce0659906b775a0dc9bc9923d4933630a3c22e06b78f2f0a0537575929f996a" + "ObjectOwner": "0xce3d02f2a570935f50158318f1f0f8706fb80873afce7bb914625c1082225399" }, "reference": { - "objectId": "0x5fb62a31bea23630d03f4a650cd8faa3b60e636d82f79aa9b61e35cf70861712", + "objectId": "0x50948c5a6a706b267a6b2c2a4a2043d28ba11c5e022198f58be4182d65987a2d", "version": 1, - "digest": "BMYF3DduG7R7dkUDQMf2wG1zguhyFVzqMKZDwU9onTiy" + "digest": "9SGZtrm6U2rsCqiaFoVQEUSreYstnrCRg6f2EzwKGHq" } }, { "owner": { - "AddressOwner": "0x2f1c55f14bcab32b91bccbf9909aa2818d644d4a1f6401c37f97383e4d8275ca" + "AddressOwner": "0x20227cfbc6699debf187d2d7bca3d253cd50f87c165516d3dc53a246a9af7182" }, "reference": { - "objectId": "0x601abe73257d8782de41888a16e9e04465a781e321f929c4c9c348c8a9a1110c", + "objectId": "0x58efd4d54b74b390e2d3bbe785ec5df555c366b1a6eb616fb07c44d6c3f67c8c", "version": 1, - "digest": "CvgY37zCcCY2bRjJdox5sH9oEDUgbovD8jHMGE9FHtmy" + "digest": "FbrF4mnrw5oXKX1trYT2NoENq7CaSGVZfXj5XitjSqhH" } }, { "owner": { - "ObjectOwner": "0x0000000000000000000000000000000000000000000000000000000000000005" + "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" }, "reference": { - "objectId": "0x6af2a2b7ca60bf76174adfd3e9c4957f8e937759603182f9b46c7f6c5f19c6d2", + "objectId": "0x5b0e7d31f9c3a421f94dae3511983a2be67e04a7071171da2380f82be103239f", "version": 1, - "digest": "9P2nsb8D67sXPdtK7xe6W6DPTyZTzEeKhi9KBwkVXbLz" + "digest": "6s1xQf5HR8HMLNaR1QxPcfV4Ys8AL94UUg7cRpD6r4WD" } }, { "owner": { - "AddressOwner": "0x2f1c55f14bcab32b91bccbf9909aa2818d644d4a1f6401c37f97383e4d8275ca" + "ObjectOwner": "0x1dd0079cb68a9c0dc5cbbb0c9c5d831bb56ed88c4a12c647f1352832092d11dc" }, "reference": { - "objectId": "0x72995e676bcc6c290a2f4c42f8a5846c7ef0063b9af7728ef5d4123de9ac8bbc", + "objectId": "0x5c995a223cf5e88e2d19935481d2d06b2e55977cb3615ad6784cc360a42d6501", "version": 1, - "digest": "FfKTjzvKHcaEQSdxRK9zx8pbU8BZeU2N3s7f3tKL9eCX" + "digest": "2ih9uvSzKBSv9YhrNZdMokhPcZgZ8gTt48TyUToB6JgX" } }, { "owner": { - "AddressOwner": "0x2f1c55f14bcab32b91bccbf9909aa2818d644d4a1f6401c37f97383e4d8275ca" + "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" }, "reference": { - "objectId": "0x72ee17dff740e4aefa6a03e6212533f3615005d79a206698bcd47e9b34d1df1a", + "objectId": "0x5ee269cea868091ea1c5da5f15581c2f7b1708413b3bdda3e4c9528f2b3a5bb9", "version": 1, - "digest": "HUMsUSpoXj22qB4M6tECWDjmEaTwxEwsuSy6KFcVn7VY" + "digest": "7mvhi6RxxMnPohJzMnCYoLHBTLUcRtwFtBXe1ZoanE6D" } }, { "owner": { - "AddressOwner": "0x4b2a0b010344ffda7202ecd5f76b742b78516cfcdb208e3314d65a4157654c4b" + "AddressOwner": "0x7dbda9c2efa8255eea64cf28b64294ffed6af432f53b661d24f3807895ee828d" }, "reference": { - "objectId": "0x76742eed3be4ac1fbf108ae112a743f314a8f8ac90c66b5beb0efe39a58ca6b6", + "objectId": "0x61f2f500cb861d8d92affc84519c4c0a6b794058b58607768c8e38ab275de0eb", "version": 1, - "digest": "2WUuBVt8CfxY8SgBK8qxZUK5BUozyn61G6uDUxskz6vB" + "digest": "AvgJes9PZYnWwM9KZmEiBZamurEgezPZUBB2gVJzvEgb" } }, { "owner": { - "ObjectOwner": "0xdfa435dca12a14a0e032df1774310db7f9c33510231aba16399e13b44c388919" + "ObjectOwner": "0x0000000000000000000000000000000000000000000000000000000000000005" }, "reference": { - "objectId": "0x778aafce25aa78d5cb0a77b78b816d4ef61e574a590fa5b5787c448c2eb56ce5", + "objectId": "0x6af2a2b7ca60bf76174adfd3e9c4957f8e937759603182f9b46c7f6c5f19c6d2", "version": 1, - "digest": "6iWxLqw2jwbdjyeWW6ahGgPEP96WFQ9QXAW1YUa6QoaT" + "digest": "36ayTWhEK1Ez85fRT6j93sMbQtxo3V55FDsJSnWXTFe5" } }, { "owner": { - "AddressOwner": "0xa0146b1188ebad1dab40317cfb41b64eea8452d2e3b4696f115b2bcf70a62620" + "AddressOwner": "0x4b578d914e64de1ca47bead61bcfa0932646e16de6063089810cfa904eb8b06f" }, "reference": { - "objectId": "0x8371569f0f25fa2bef413dc333f74a8df4c1ad6cf31dc80048887ae85eecd527", + "objectId": "0x6b517df3c5888ce924d7871e550989f835335c726a43a224ce3df6b6dfa53666", "version": 1, - "digest": "8YuEfQiV2fGTULQgjgMeuY2GULxxScLxMxJVzGRmEGFh" + "digest": "ARFnQexwF3Q6CDzCgnQfH1v8gY9YAfpXLq4K89FU9koJ" } }, { - "owner": "Immutable", + "owner": { + "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" + }, "reference": { - "objectId": "0x83d61ef9fc69752099b356a702283468748b46057b97466da021ad966e2e1362", + "objectId": "0x759bb64d0a576b00a8aae6d439da4a72ef7d8797282c90211bab2bc723cd48e5", "version": 1, - "digest": "CBXqvoJK8TDYHd3z7xHYA2HdpW52UoNMg3hZyd3SS6Mq" + "digest": "7cuKDvum6Rx2utLqquqYZGr6K3S5xbA2fq88cqs8qjZd" } }, { "owner": { - "AddressOwner": "0x786c73ac358652b660d32e1097d11ea2723cfada4ab861288855c70f8c5b7fe9" + "AddressOwner": "0x2f1c55f14bcab32b91bccbf9909aa2818d644d4a1f6401c37f97383e4d8275ca" }, "reference": { - "objectId": "0x8f6303e1c51abe1dd7808d8c3d3c96cbaa53565e9dd243ee1bb65a3259947ec5", + "objectId": "0x76472cb3b720491fb9a66db21befaed5fbc8528976bc6fb2bc3c5deeef9d114c", "version": 1, - "digest": "qZB2htF7TnbC1erC5brX6usTaccoNbkYvzV1z2T1wRr" + "digest": "zQeqLseHTy2tGhRk4gwvQGoCtUkRd4LqGjKuuvW2Xh1" } }, { "owner": { - "ObjectOwner": "0xa638e6c2e51c688fac426e422c56d310ada32abf20ccf9ebdf1acc93e00c2472" + "AddressOwner": "0x44f42943b20151d6a0c3cb0f84006b3441bb3378c668a6df71fa36cb441538c8" }, "reference": { - "objectId": "0x9798a9772438b077f07c4b5a29d90e8b1d1c774424043645ed27e5a0c79d2499", + "objectId": "0x7c9f819b470ae3ac98b6e44eeea9b461d66a38b22a3d2f61ce62c69f68d0c71a", "version": 1, - "digest": "BdXCtcdbth68sFr11iGJZqz45N2fupUEErxB2Px4ZEC9" + "digest": "EsxwZdo265ZPbYh99YeTGunSWrMj8dXyNBw2H1E9D9eL" } }, { "owner": { - "AddressOwner": "0xa0146b1188ebad1dab40317cfb41b64eea8452d2e3b4696f115b2bcf70a62620" + "AddressOwner": "0x20227cfbc6699debf187d2d7bca3d253cd50f87c165516d3dc53a246a9af7182" }, "reference": { - "objectId": "0x98038db1bfffc9a021aa9b1711288f56756a203112017ac615bdd49e0ddfe768", + "objectId": "0x81c7cfd9c7fa81f57a59f14739ee82157fc6a04d48a1b0a6e1187a8898042299", "version": 1, - "digest": "HX5fgCYDAY4EXAsvS6LwgSUr9hx4aoZYbp5GJbUnq8n4" + "digest": "8ESph921vnJz6UaENHxg2ytx68MtT4UoxNpPgWTT99a5" } }, { "owner": { - "AddressOwner": "0xd4ab7d9834d2755f11fe022dd53feecd86cb447425496fc4d02cb7b73348c688" + "AddressOwner": "0x2f1c55f14bcab32b91bccbf9909aa2818d644d4a1f6401c37f97383e4d8275ca" }, "reference": { - "objectId": "0x99bc508c5440067cf58e4b6e671416a2b04e4f60456b711a81b2a9f549ec6892", + "objectId": "0x85a7aabfb1d8ef14efd87338a58efcdbfaf0cab5e5fc247ccd1080dcdd3d2d7f", "version": 1, - "digest": "FkULFZXqhbqU5Fon3honm5pFmUiqJkY7Y6ECbte1Hii9" + "digest": "277zG7Ypo7ruZu1WMxXDUoApdKnUYLBvrws1KkqzHuFm" } }, { "owner": { - "AddressOwner": "0x44f42943b20151d6a0c3cb0f84006b3441bb3378c668a6df71fa36cb441538c8" + "AddressOwner": "0xb4b32db0fb2bc9170f796efb2439aeaf46fd0dc0b79af4e12d14bb87c3e9aa65" }, "reference": { - "objectId": "0xae837285a73c2d23f86206314d8acfdc7adf4af36e33807e3e535cc24edcddda", + "objectId": "0x8cd9aca3790437fc6b1b7258c5fefb2e95ffb54134aae1fd04ba757d4286055d", "version": 1, - "digest": "4V3KqU3gC2eqg9un9WcutPCAiA6vPcGYeFqoTutixkB4" + "digest": "AEXYy8VGP4NX8xpTs7LHiuZYfzTwFiRypmiQrZy9waNY" } }, { "owner": { - "AddressOwner": "0xa0146b1188ebad1dab40317cfb41b64eea8452d2e3b4696f115b2bcf70a62620" + "AddressOwner": "0xb4b32db0fb2bc9170f796efb2439aeaf46fd0dc0b79af4e12d14bb87c3e9aa65" }, "reference": { - "objectId": "0xb1930538959be08dee8ab76c7898c85be25e429f967913cc90f3d1b1ab496717", + "objectId": "0x8fd46357d5ae46f9ee8de7d9b6dfc9da4e497c70dbd2ce5c2fc124658798d5c9", "version": 1, - "digest": "FWeCCocjhoeacrKX1ZVkrEvqNxckJfk1KoyHtFH2Z8ES" + "digest": "3xUtUi7VT3NzhFGUGsAJbSaimrdSTb2ujoesjNukQjS8" } }, { "owner": { - "AddressOwner": "0xa0146b1188ebad1dab40317cfb41b64eea8452d2e3b4696f115b2bcf70a62620" + "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" }, "reference": { - "objectId": "0xb2d16c38972ef51ed6995d84fee1d5e938eb64d8ab4b8cadc68170f60a778486", + "objectId": "0xa010e1486bfd2f1d7c57a3b2c2edd369e64e8fddc1ca17667314317273cb491d", "version": 1, - "digest": "8tKfiV8MHaEvrzzX3c9exgsAscHPmgZVF9GZ5LjZNwJz" + "digest": "DAFo7bkSkk2XRZv88Nb2V9jatTse1TYTqgMmVxVKGRtF" } }, { @@ -731,49 +739,49 @@ expression: "run_one(cmds, context).await?" "AddressOwner": "0x44f42943b20151d6a0c3cb0f84006b3441bb3378c668a6df71fa36cb441538c8" }, "reference": { - "objectId": "0xc1f45dae29fcdc6611af2ac3b42443fa28fb337e89850cf61b97b048c6cfe121", + "objectId": "0xa6e659b1120b373f598d1f6c3214d73abda596eb913857e1fa471ab4420f2e27", "version": 1, - "digest": "F7UAZ1nzZSGcEs1ntEuv5yBrtjgE9omqTYsM5MiyP1gg" + "digest": "E3tr1QPatiEWCjxUNrbKfyRgkNq8tBeiTKFKGyA7g9vk" } }, { "owner": { - "ObjectOwner": "0x9bc5337781f04e021c5d42b6db841d379794edcf721813534cb5d14dc0290d77" + "AddressOwner": "0x2f1c55f14bcab32b91bccbf9909aa2818d644d4a1f6401c37f97383e4d8275ca" }, "reference": { - "objectId": "0xc98cbb8b969eccb46b7a487eaa75ac486faa3a55b719731aa9a6b7fdcc90cbc3", + "objectId": "0xb271c22281276193f817eeab5291b79f5f37698a21323fbafe014e1774c3d22e", "version": 1, - "digest": "6Jfkx2oF2DaXgcD7YMF9qeNUKMvGtBRtCmbh3CRZe21V" + "digest": "GjnVg1dHinKTEkLLZYLedhgmLkmNddYhYM9pUZrUDrzc" } }, { "owner": { - "AddressOwner": "0x4b578d914e64de1ca47bead61bcfa0932646e16de6063089810cfa904eb8b06f" + "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" }, "reference": { - "objectId": "0xcdb39cadb88f872448b2836e131c7ef076be9c644ca4d18795e4db5911267fa3", + "objectId": "0xb279227ad10111e5d870facc26d048a05bc440859e718cde0e3bbf257765544c", "version": 1, - "digest": "Cs8zMC43XRRwrM4UxEaKE6R64iWLieh821t7bUh5gPU3" + "digest": "BZaGDacxqx5MFLFm6F3UeBVpHG5hZykqSHFoD1o5F5kq" } }, { "owner": { - "AddressOwner": "0x786c73ac358652b660d32e1097d11ea2723cfada4ab861288855c70f8c5b7fe9" + "AddressOwner": "0xb4b32db0fb2bc9170f796efb2439aeaf46fd0dc0b79af4e12d14bb87c3e9aa65" }, "reference": { - "objectId": "0xd23f565f9f5472944be8a2a7e36e2ce71a8c4f8b52f8da559f8545ac912347f6", + "objectId": "0xbb43894417b1b4a4cee286133d85cae9706c217d150daf4d12168bc5e9147d78", "version": 1, - "digest": "9DbBy8qevsWuEZJQdgyZgX2JTYju838H82fC6ioa6wpw" + "digest": "E9CuCY7GpGsGHb6cjKdSrrWc3xmRN3wjp4FqjZ22DmoT" } }, { "owner": { - "AddressOwner": "0xd4ab7d9834d2755f11fe022dd53feecd86cb447425496fc4d02cb7b73348c688" + "ObjectOwner": "0xc2bda3bfc534a80abf077c5be16ba9a0832c206ab8e230605d6839b7d87c2038" }, "reference": { - "objectId": "0xd2cba88d7ce541ad591c502ccf59c6c59d7dd432b663cc13a36781a6976bf5bb", + "objectId": "0xc066a3793934a82847a3cee2a0dd84832ba1ba24b71ac0602b1a60cbbe553d17", "version": 1, - "digest": "9cBTiupwFCu1ju2HsegDvB6Z68PSSsYPeXaMcD4RzKfc" + "digest": "DWvQzrbs9HQQ411fc6f9QtEFerRLv956sUyRzY1M9HPJ" } }, { @@ -781,99 +789,97 @@ expression: "run_one(cmds, context).await?" "AddressOwner": "0x4b578d914e64de1ca47bead61bcfa0932646e16de6063089810cfa904eb8b06f" }, "reference": { - "objectId": "0xd5e3ee6fa97b35e816e608f24f775ffd69630f04d1f5131627fb86153a003e47", + "objectId": "0xc79de55a6454ac8e927645a08e4e9b3ce8e814ce9fc25eb7a347a91fc2228f4f", "version": 1, - "digest": "AQCi9QJC9fV8SEcpQQA9FKhsETtggm3VWAYuswZ6fXF5" + "digest": "6avmJYgcDx3Ha6XXNTRCZeHACaaERgC4AkNDCE1a8TGA" } }, { "owner": { - "ObjectOwner": "0x25251a73e10849ffe7abc224ed35304d012a18f418611b381298d8be8b2eaf83" + "AddressOwner": "0x4b578d914e64de1ca47bead61bcfa0932646e16de6063089810cfa904eb8b06f" }, "reference": { - "objectId": "0xda50ca1f674de8e7166d0c0265dd4175f0a69f461c00ac65107d6957cd168348", + "objectId": "0xc7ee80d93a34f12ff58b0ceaf16c4e06ee6ceeb547b031b0d3eab1a8a6ca873f", "version": 1, - "digest": "6zzp85oetD1P7Zv4Umd7E4aG9iwbaGDmQgoKmutGpL4e" + "digest": "F3PmgDERQbRNn44B6on5QPxNVXCLUn18L33fNgv1cazu" } }, { "owner": { - "AddressOwner": "0xa76e9ed3ad7f9e542674c2128d42dfe094540b485eba58f6e980ef8082230507" + "AddressOwner": "0x2f1c55f14bcab32b91bccbf9909aa2818d644d4a1f6401c37f97383e4d8275ca" }, "reference": { - "objectId": "0xda89bac08a36b187df7de02a08ac3b6a98016b1610c64cde2970f5f4b59125d4", + "objectId": "0xd1e455eb2c367047a03756eb830bf0d2357b0c69905f0d4f3a648cc81498905e", "version": 1, - "digest": "4Rs6gsJZ478oWm1L9KsosLZZeRXutj1SyrCNB6NzkS7E" + "digest": "C2SeaJLLw3x6ShuvPfND8mXCAvLgNz293iTtu5L1SWCW" } }, { "owner": { - "AddressOwner": "0xa76e9ed3ad7f9e542674c2128d42dfe094540b485eba58f6e980ef8082230507" + "AddressOwner": "0x7dbda9c2efa8255eea64cf28b64294ffed6af432f53b661d24f3807895ee828d" }, "reference": { - "objectId": "0xdc94ba8e8d952bb19047335bc1517d556b21d2ce96722885214c5f5241ac4ad0", + "objectId": "0xd26171201bf3e074f1d1c694ea6ebc5d95d75b75583c393055efbca3eeb9c629", "version": 1, - "digest": "Ac7ex9P1Qrs9wQAzZezDzoPPnoMcGqZoSh4LbMeduiui" + "digest": "AVs21Q7q1cFThjfKGkzGSSaKsQCjWo3NtDcBDPCCKM76" } }, { "owner": { - "AddressOwner": "0x44f42943b20151d6a0c3cb0f84006b3441bb3378c668a6df71fa36cb441538c8" + "ObjectOwner": "0x8ee7b25e9189b59bcedfe3525114b47d4602ce383d1ddbbc3e49d95134fd8286" }, "reference": { - "objectId": "0xdf0d86e9d8d2ab9d598062da57d512d39e0102425ecea598aee9a1d73e883619", + "objectId": "0xd6090aa14b28b0e907434cd8f8469b24769a80ebd722f18df48fe59e5fd47c0f", "version": 1, - "digest": "ECfLmrqxkyF2g16LdCCLAz6Gae51xF5Naka2zHc4sh9H" + "digest": "4yuGdRvF2jHEwP7yfNE56bWPNY9v4b4wDzDngue7sHxb" } }, { "owner": { - "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" + "AddressOwner": "0x7dbda9c2efa8255eea64cf28b64294ffed6af432f53b661d24f3807895ee828d" }, "reference": { - "objectId": "0xe0b08d48248e495318c2aa10da651a1cd69f49ddb38a349b0000dea55415f48b", + "objectId": "0xe47935c2607151b36e2e7d6971418157d7a8997ab2771ae779f5b6a2230334c9", "version": 1, - "digest": "5UbcKdRD7iyfUn2upZ1c9wuWRiD9J9h9hCCE1jX1EHSz" + "digest": "GTBQbGkLPeC4hbkBB6QtzPC7P1zngzPdh2tAyPUnS8c" } }, { "owner": { - "AddressOwner": "0x44f42943b20151d6a0c3cb0f84006b3441bb3378c668a6df71fa36cb441538c8" + "AddressOwner": "0x4b578d914e64de1ca47bead61bcfa0932646e16de6063089810cfa904eb8b06f" }, "reference": { - "objectId": "0xe6a48ab793151dfceb21d185730b05319ede87e6e415fd1fec41bafe4e0779f6", + "objectId": "0xe54599f1bb4b687498caf1e5212c6eaf0b088dcc8159d283ecf2c6287ede48dc", "version": 1, - "digest": "HEeQgzeThKQWJRqP2F9yMXArCNQD5xYPcCZKZEF8Kfqd" + "digest": "Cs9n9dTaq4n8KjEDib829cYFgPQRsyubTQRzX1upqE6x" } }, { "owner": { - "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" + "AddressOwner": "0xb4b32db0fb2bc9170f796efb2439aeaf46fd0dc0b79af4e12d14bb87c3e9aa65" }, "reference": { - "objectId": "0xee188f7b5964b56105a062dcfddd10e4f4e427db489f9bf562a264b76e6bf9d7", + "objectId": "0xefd24c24d3784edec255308f6fc3619f65902ebd122f5a34b105727994326ce1", "version": 1, - "digest": "A5Tnjugpa5gCcKLcwiVNJnYGRHuuADX7YtpgUtgfKfXa" + "digest": "FNNTstnHpGPZCv6PNrv7dcodbfXkA4xiz71ZUtiVKYcY" } }, { "owner": { - "AddressOwner": "0x4b578d914e64de1ca47bead61bcfa0932646e16de6063089810cfa904eb8b06f" + "AddressOwner": "0x44f42943b20151d6a0c3cb0f84006b3441bb3378c668a6df71fa36cb441538c8" }, "reference": { - "objectId": "0xf9f32e362d5d343046fde898a7372ea2a6a7d4d36bda1b1ab31f1724a92a1982", + "objectId": "0xfbf79fe230691c666820739add167373a61a7faa858231f42feb961ec8fffcf5", "version": 1, - "digest": "AhEJzhsHTTWbWER6c73s5oAVXXNE7VkDN56mhV8u4Qfn" + "digest": "2FRzkPVb45cxXoE68vu5QcfM9T7WypPFu199wSHeXUWj" } }, { - "owner": { - "AddressOwner": "0x4b578d914e64de1ca47bead61bcfa0932646e16de6063089810cfa904eb8b06f" - }, + "owner": "Immutable", "reference": { - "objectId": "0xfd211f3ecaa7a6f275351ac86570183daf1fba722faf7c5cb64f04210113dc60", + "objectId": "0xffc04eb3011a2933dd0fbfff34cbd6759dbf999f7e2ac372e08d577c56a459cb", "version": 1, - "digest": "CBp9bmMzBTBKhAwHAFLm7KDgy8xSQkW41xaTF1RKHEc8" + "digest": "FVzi8BDkddrv8mDQE6DG5JxD7THHn1PKLqzSj5sovdAc" } } ], @@ -887,12 +893,12 @@ expression: "run_one(cmds, context).await?" "digest": "11111111111111111111111111111111" } }, - "eventsDigest": "CaYcJ14pKAFjepdh3zk6S8WBtCEDusER6ZfZh5n5Sfrk" + "eventsDigest": "HvJEc58b44AonQBEvAqrxrG5GmZUBc284MWDDNCirwNT" }, "events": [ { "id": { - "txDigest": "Cq8LK5uVL4CXgG71iXEuDoLEXcT8AAwYQRxNWV8GEREo", + "txDigest": "5zibcom3dMckjyN16ygFwr5XNa9Exi1MmY3BQs984x1N", "eventSeq": "0" }, "packageId": "0x000000000000000000000000000000000000000000000000000000000000107a", @@ -900,13 +906,13 @@ expression: "run_one(cmds, context).await?" "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "type": "0x2::display::DisplayCreated<0x107a::nft::Nft>", "parsedJson": { - "id": "0x3621f85e6d15240ebe5ed168e14b5bb76e6f44bbf0f8c2a3a5b3ab66af6d0a2f" + "id": "0xffc04eb3011a2933dd0fbfff34cbd6759dbf999f7e2ac372e08d577c56a459cb" }, - "bcs": "4eK4Rmo4WPkHRfYunQzeR9sB8FgeBwvS6dmuAkFr91pz" + "bcs": "JDM3MXfy5KRcXneqNjftj86a4vwAgXavnUbYjyJPxxsc" }, { "id": { - "txDigest": "Cq8LK5uVL4CXgG71iXEuDoLEXcT8AAwYQRxNWV8GEREo", + "txDigest": "5zibcom3dMckjyN16ygFwr5XNa9Exi1MmY3BQs984x1N", "eventSeq": "1" }, "packageId": "0x000000000000000000000000000000000000000000000000000000000000107a", @@ -950,10 +956,10 @@ expression: "run_one(cmds, context).await?" } ] }, - "id": "0x3621f85e6d15240ebe5ed168e14b5bb76e6f44bbf0f8c2a3a5b3ab66af6d0a2f", + "id": "0xffc04eb3011a2933dd0fbfff34cbd6759dbf999f7e2ac372e08d577c56a459cb", "version": 1 }, - "bcs": "RtmkG7B277UHmHzNeCR4JSjBPk5Jar4EmEM8rps4ibCVajBRYzsvQfF8QM43JPnE8aKATVn8vpGA2B8NS3HSf6tYyEY7SiT7XZcESuZAJDDAstKn2T5jZ4pZs6gqohtCsFoPVqfxMgir1dMYJQRdzBhjnYBHgUHU6U6ErV6wCU7CVk9xKX14hfD3Q4LK5cctwaK72iipJbdmmo4jXWGY177jRp8vAcP82xi28HyYdtu1S79GRmj7CUsn1yok6BD7ux6iqwDU6Xo8tBJBnA76Lmba7LFyS7nqUnVU4K5uiHVYC2jNudZtXvtJWeAcs1oQ5mx4wKpg82DsfePBCDc3WxyooTUZUbS8pJuKfrvbzGtC7iUJvRnTbW821dbBKcWvw8wajSATuPs7LkoBTxyETMCfrpzZCZF4tTmqDkPxKvYizxGhTga8PkSCSCvWMCNCdbRjBzGoxmJky5AWALRYZSA2x1jqdFudcd2U7E" + "bcs": "32c8gaMxAbF5n7wL32Kdpi5pBQy2PGi7t3onffny9jqe2gaDRgL1VDGq8Qdf7iMRM4tBvAxYsetLqrYETRwRew9c7x9XTW9aw4K9dDM1KZfHC5jj2QMRwbEHALCq9vYszTEk8A5F3x1rR1edmQyMMY7mKPRCGoRymgHdDSN6gcN6F7HBf3ya4ybxTpZax5RE4tawq5kbjSJnGNe54KAsAtqMpnJsSJ1PP5Z91r3CkDB3gKAeDah1WxySJMBgdpoJbzcniQJBQQ4ppTBFoe1FBhES9fcsbpKhMNxqyMi19TdopYSpDJHgfhPs1urgbMuNTJR6fNjbDsfY1a1DgeW7QAxpcQENY4gY4qFsWX86W8bC8K4kJYuxEEfcGCrJ16Rj2svNVE9gEeDKeRFfCH6gc9Je35Gd4chRcCjkgDoKcqzyB2vDiUrtCCbRGBrJa77x3y4TmucBM5v7LVs8eha6hEAEYQG5CDQdxTmTR6k" } ], "objectChanges": [ @@ -961,7 +967,7 @@ expression: "run_one(cmds, context).await?" "type": "published", "packageId": "0x0000000000000000000000000000000000000000000000000000000000000001", "version": "1", - "digest": "EEzLb1GUJ7T1D7c5YshyZRTUeEbuqJHEXZzVnZSyiP4X", + "digest": "4JE3kcoZSKseaSsSdgQveyB6GHU2GF3oBpg5pJ39ZSFG", "modules": [ "address", "ascii", @@ -987,7 +993,7 @@ expression: "run_one(cmds, context).await?" "type": "published", "packageId": "0x0000000000000000000000000000000000000000000000000000000000000002", "version": "1", - "digest": "Hfn1skt6xRG4LJWMYfSRihabdYdysbpfW3E37FkZYTNv", + "digest": "8zNipc5CUAJYs6ak77VrFXPxQyY5vwtkUmyZz8w2j5Fq", "modules": [ "address", "authenticator_state", @@ -1050,7 +1056,7 @@ expression: "run_one(cmds, context).await?" "type": "published", "packageId": "0x0000000000000000000000000000000000000000000000000000000000000003", "version": "1", - "digest": "8ncmvcNW2hSrxsiA1BAYLfiHT7gq9CrQ5xAZd5icZ7AZ", + "digest": "GCLhS6D6SeU7JstsXGPEF2PTY9rGQXNLo3A6j162jdFi", "modules": [ "genesis", "iota_system", @@ -1076,7 +1082,7 @@ expression: "run_one(cmds, context).await?" "objectType": "0x3::iota_system::IotaSystemState", "objectId": "0x0000000000000000000000000000000000000000000000000000000000000005", "version": "1", - "digest": "9YBBaSbQMRgqSUFr82Sj9XnQ9xt1XnC5NvDn4KdJeJH1" + "digest": "73woKiMAUkS1ejdzSwyD1WLDCxsPVYURbwpMBa64Tu4h" }, { "type": "created", @@ -1089,7 +1095,7 @@ expression: "run_one(cmds, context).await?" "objectType": "0x2::clock::Clock", "objectId": "0x0000000000000000000000000000000000000000000000000000000000000006", "version": "1", - "digest": "DoYdsHQ3yrPPbeLiP7m86cEvpdZa5u9WR3sfwkAwFzzP" + "digest": "2iNGKB1PQafgW1o6Y3ZSkUwhxJrNbbEK4PfrqW4zxokW" }, { "type": "created", @@ -1102,13 +1108,13 @@ expression: "run_one(cmds, context).await?" "objectType": "0x2::random::Random", "objectId": "0x0000000000000000000000000000000000000000000000000000000000000008", "version": "1", - "digest": "HcuoW6CpTvpCW6zyXReFRuwG57fWjFao6aFaQ8B6ojqb" + "digest": "4ZVAMTUCrpGjd97gLUnqTSvk2gqJvr7FnGopRvQkVnzn" }, { "type": "published", "packageId": "0x000000000000000000000000000000000000000000000000000000000000000b", "version": "1", - "digest": "7qX7XuWkQdxTey5khTi36fSt7wUaUj6WLcCvHYw7Kt7L", + "digest": "81neBedYgjyePBFEUdm3PPC3K6BLGjwuyyFXxaDFKbAT", "modules": [ "bridge", "chain_ids", @@ -1131,13 +1137,13 @@ expression: "run_one(cmds, context).await?" "objectType": "0x2::deny_list::DenyList", "objectId": "0x0000000000000000000000000000000000000000000000000000000000000403", "version": "1", - "digest": "4MciKuQpwmG4gcXB5j4CpYEsiEEFJADhVHNaLtnD7VgJ" + "digest": "E7zwAronHAhg8gRcCNJrzffEcMCqyGwTRvXzk6tZYTzG" }, { "type": "published", "packageId": "0x000000000000000000000000000000000000000000000000000000000000107a", "version": "1", - "digest": "EyPJZsqLWzzuLwUbDmq77YDcYc2n28JUvmR2D3XYXvEx", + "digest": "BvAgaA1pE6cMYg7tNZv7sdafwnYCgxk9DPseprtGCXw5", "modules": [ "address_unlock_condition", "alias", @@ -1157,34 +1163,34 @@ expression: "run_one(cmds, context).await?" "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0x4b578d914e64de1ca47bead61bcfa0932646e16de6063089810cfa904eb8b06f" + "AddressOwner": "0x0b37c2167535af8a5729c44690f7be89eb248a6eb3cda5fd37ee1029949f0c29" }, - "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0x0658bc0b0d7fbc21787e3c0cb499355da97a2676b1d89fe4b30d163b8c62e7ed", + "objectType": "0x3::validator_cap::UnverifiedValidatorOperationCap", + "objectId": "0x018673f8b9c2eee4dd923fb6fcb3eb77d0e33d15921ac59f1c57ea7dfe4c3f40", "version": "1", - "digest": "AgqbZ4SdhbequEufn6KPMegNwUEGHbZeGfNVWM7YEdFD" + "digest": "AkRRb1Y6sXYHYunTUhbhqZoeTF2KdJ9E2YJh8zncRof3" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0x786c73ac358652b660d32e1097d11ea2723cfada4ab861288855c70f8c5b7fe9" + "AddressOwner": "0x4b578d914e64de1ca47bead61bcfa0932646e16de6063089810cfa904eb8b06f" }, - "objectType": "0x3::staking_pool::StakedIota", - "objectId": "0x075763a78e8a77cba94dfb46a7d7ffff8ed330d0774ec244a9c066b87376bf85", + "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", + "objectId": "0x08e1bd72a9f239c8e99a3ee8f1f4141b48ba063ecc0ebff878152e2b481b94bc", "version": "1", - "digest": "9Wdw77n2eeCTSha1f6Uj4LvG934xphSbyNRazH83W89j" + "digest": "FszgvFokRH5rBBNoLrTxKWBGnCAdiRqXpWYixmwBvwpf" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0x44f42943b20151d6a0c3cb0f84006b3441bb3378c668a6df71fa36cb441538c8" + "AddressOwner": "0xb4b32db0fb2bc9170f796efb2439aeaf46fd0dc0b79af4e12d14bb87c3e9aa65" }, "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0x17e76e42843454d5d030ad02dd96b08d27dd1baea95ec33f61422d2a474fc64e", + "objectId": "0x163b3f079eb959dc96768c65497ef5c3b48106439a306324c484a8d28e0ba50f", "version": "1", - "digest": "Ajbmr42uP2PXH3JgpufkeSbHVsc4FRaVgWiA3Na4ryCg" + "digest": "2ueUhUo7CYjPNknnKCgASKC7u1ifGVYa9N2GpqNEFzoE" }, { "type": "created", @@ -1193,335 +1199,348 @@ expression: "run_one(cmds, context).await?" "AddressOwner": "0x2f1c55f14bcab32b91bccbf9909aa2818d644d4a1f6401c37f97383e4d8275ca" }, "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0x1c91896da60a3b83c30c4ec462b01b7b58620fef39a66464b48a94c0eb129017", + "objectId": "0x16d23fb8f64faebeea28ecdd43d96cb60ed1c5a297347d61a0c3fa4fff08944e", "version": "1", - "digest": "D1czj3Qr4pMCQqhSwPxwiLFbGiMocRTuBkL8LftbsquG" + "digest": "ApwvoSkL1WC5UcJWSbzGuNJHn9F5ZPuALucnMNP63sCF" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", - "owner": { - "ObjectOwner": "0x7c7b5e9ac86c1c9167861684dc799150ae0bcb20ee35dc027a7b1c3239c43491" - }, - "objectType": "0x2::dynamic_field::Field", - "objectId": "0x2a655cbb998089faa8412a2c2a92fa00a8b8398df3df42f39d576434ee7572fa", + "owner": "Immutable", + "objectType": "0x2::coin::CoinMetadata<0x2::iota::IOTA>", + "objectId": "0x1a1f82376293f736136384ae03744241eb257a82f25eb223c7ef02e67442d6df", "version": "1", - "digest": "6Gcrhm9g7gENwXs1LJLhM7bG7f7CaCH1UboQDrapPpve" + "digest": "CJY1zNjevKH6Kya6aWr3Ri1HQsgeZFCf9qR4HqH72Fnt" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" + "AddressOwner": "0x44f42943b20151d6a0c3cb0f84006b3441bb3378c668a6df71fa36cb441538c8" }, "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0x2c1a8cb28b43af1413d879e6a3acccb29eded14f952877582b027338c567bfcb", + "objectId": "0x1d8f7a031fcca49d212b5bf2b57704913f7c6ca423357a01dda70a150e8a35b0", "version": "1", - "digest": "Gqd4PCCzQDf2ZYqzzD2p3XAoh94NHo1A6WaSP4NHX8xQ" + "digest": "7yn1SCAHPQVAmJANbtPKjkZyzpN675SHdNBNwdFfXGbZ" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" + "AddressOwner": "0x44f42943b20151d6a0c3cb0f84006b3441bb3378c668a6df71fa36cb441538c8" }, "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0x339053ddf13ae59297c29300bd68ddfd3af6c7a5d3cf94dbb877978149392da4", + "objectId": "0x1f3119f496e7c38af65bc0f29ee79354de5f554d03d0aa433bee015e280e97b4", "version": "1", - "digest": "6F2itozbAXqk9Ak8diF6DGVpC5skK2r24TCgwkyNjNf9" + "digest": "59iXLqERWshXAXJqsVuwRRmoxW4AXLv5jnH3cPxRwAXw" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", - "owner": "Immutable", - "objectType": "0x2::display::Display<0x107a::nft::Nft>", - "objectId": "0x3621f85e6d15240ebe5ed168e14b5bb76e6f44bbf0f8c2a3a5b3ab66af6d0a2f", + "owner": { + "AddressOwner": "0x4b2a0b010344ffda7202ecd5f76b742b78516cfcdb208e3314d65a4157654c4b" + }, + "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", + "objectId": "0x2438ca49fb81fc37f74d890207c3a922b27de14b474525b4fa111de094e5194c", "version": "1", - "digest": "5ceUwwuSyYNbGcn6t92VYhkhrM9WXFrsqjHMBx9hTgui" + "digest": "A5e18Gy41Bxq2McoH7FbiYJFfU1yx26XRgvDk31KbRTz" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0xa76e9ed3ad7f9e542674c2128d42dfe094540b485eba58f6e980ef8082230507" + "AddressOwner": "0x20227cfbc6699debf187d2d7bca3d253cd50f87c165516d3dc53a246a9af7182" }, - "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0x3f17533f07520a49ef52abfbf7b9317e234f29e0196b33afc84d163ef8034d03", + "objectType": "0x3::staking_pool::StakedIota", + "objectId": "0x303fac6452e9b844d960dcd60c84efbbd28b017774787c58705b67af946d7076", "version": "1", - "digest": "eLUzrhLUXkLJexz7yRkugTEecsUSatiS97eKDTyRKQ9" + "digest": "D582bFMq1ftKpRhrcFeRLhEJUbfrRZZLA6Ymgs87S6cC" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0x4b2a0b010344ffda7202ecd5f76b742b78516cfcdb208e3314d65a4157654c4b" + "AddressOwner": "0x0b37c2167535af8a5729c44690f7be89eb248a6eb3cda5fd37ee1029949f0c29" }, - "objectType": "0x3::validator_cap::UnverifiedValidatorOperationCap", - "objectId": "0x434480a6195e420a99448287684aceb12e88bae1004166e8d3e84910257af130", + "objectType": "0x3::staking_pool::StakedIota", + "objectId": "0x3238c6a409ed6951125aaea3334cf632e053e0d09507e8a53d4b4b5923b896d0", "version": "1", - "digest": "5BrMrFjw1CczYMshk7dccVioKF2SSvvEudBSSoVicvgG" + "digest": "GZiR6Qj8jF3vb8Eq3AF3zrCrqGcHpKPFv3MYRCn4RLsT" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0xa0146b1188ebad1dab40317cfb41b64eea8452d2e3b4696f115b2bcf70a62620" + "ObjectOwner": "0xce3d02f2a570935f50158318f1f0f8706fb80873afce7bb914625c1082225399" }, - "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0x464079306127b6f089328b16d1f2de3efef3b6ddc099bf9850f6914cd64bcfa5", + "objectType": "0x2::dynamic_field::Field<0x2::object::ID, address>", + "objectId": "0x3873a7b96acdc98bfa6db49a096f8e704caa6dc7cca29aecff52abe11442dc3f", "version": "1", - "digest": "RgrevPjn6eRbaBQBFDp5GVkhRHAxX1LN6PX6W7R3b2G" + "digest": "DmLPuMUMQHtu4hRNpXbcjqtRKWrJqPLUDnZw84GmgaUZ" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0xd4ab7d9834d2755f11fe022dd53feecd86cb447425496fc4d02cb7b73348c688" + "ObjectOwner": "0xce3d02f2a570935f50158318f1f0f8706fb80873afce7bb914625c1082225399" }, - "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0x4b44af5c085eb56a4b0cd9e09b9e5cd8fb33119a93238dd3768c7437175a9df5", + "objectType": "0x2::dynamic_field::Field<0x2::object::ID, address>", + "objectId": "0x3e5b52bc91e54ac367f5987785c7b0a68869a4be2eb0a74f7bee2172e0a70dbc", "version": "1", - "digest": "EXw3aJJqk8qBNWnDcLwg64D1qtyZjxhP5haefEbvFyDi" + "digest": "ARd1kECfyCcc3TUTnFZrdYRAGX6xn9G3ZKNtQKNDEA8R" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0x2f1c55f14bcab32b91bccbf9909aa2818d644d4a1f6401c37f97383e4d8275ca" + "AddressOwner": "0x0b37c2167535af8a5729c44690f7be89eb248a6eb3cda5fd37ee1029949f0c29" }, "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0x4c85212134d410410c2a5ee0f03f3595884fa739931d03742833d02f9f4d890b", + "objectId": "0x3fb0323b083da0415032b289cb6e610388de91f9666a67c02df8ddd9edb00f4c", "version": "1", - "digest": "3pwRGNUZmDZcfQp6tvvH63PYDtVZVG2VttFBhYMkDJLZ" + "digest": "EidyXR5ajBRafVgkEA1cm598AdyK66F2NBub16VyE9aB" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" + "AddressOwner": "0x7a9730f69d7c9eed4058b7e3ad9019adffdf63a94ef73cd2fb0217f3b9eb6eb1" }, - "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0x4cccff02ad9fbfd4e77f071636d88fddad4e48629813518cd39b2100072e15d1", + "objectType": "0x3::staking_pool::StakedIota", + "objectId": "0x4451b2f6d468c331dafa10f4b3fbf057b89f684553bf9298d0c4f8e61df2fa95", "version": "1", - "digest": "DPcMjDP4X3jp2t7J2zTZF7CBjhJ87fP1rxFHsDh9bRPE" + "digest": "33vUxz6x2MsvDWTQWpFpjWQbPbbZhUxPyn3uwSDfAVQx" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "ObjectOwner": "0xdfa435dca12a14a0e032df1774310db7f9c33510231aba16399e13b44c388919" + "ObjectOwner": "0xce3d02f2a570935f50158318f1f0f8706fb80873afce7bb914625c1082225399" }, "objectType": "0x2::dynamic_field::Field<0x2::object::ID, address>", - "objectId": "0x532489afdc0d76972e374298baaee6730bfeee3d68b26abfecd616a56690d902", + "objectId": "0x4547fa20f95dcc6e221d18eaf933f993ee8f46f98eef1705853a71f9c917c185", "version": "1", - "digest": "HnGKwbms8dfQ6XNxcJDbLbFHDkh2b5NyARjgh8888Nh5" + "digest": "J3kRd8hXaaV2mFKES9k7X2NnjxDCGcFAUoXCqsY2reZJ" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "ObjectOwner": "0xdfa435dca12a14a0e032df1774310db7f9c33510231aba16399e13b44c388919" + "ObjectOwner": "0xbc4cf4a6e17ba874f668896d13e8dda92bab7a8870b3118d26fd67501028c2f3" }, - "objectType": "0x2::dynamic_field::Field<0x2::object::ID, address>", - "objectId": "0x5396282be36c868aec019959977a2a2b3e35e32ca8e9d0418a73d5d7f06c45f3", + "objectType": "0x2::dynamic_field::Field", + "objectId": "0x49315560aecdcf0beba3cfccb2d04f29f5d95b440cb0b6dadec64349b81083d6", "version": "1", - "digest": "C8kPWM5ksWk5ppVSZUSEvy5axrRBzqeqD3Gw4SfwYLt5" + "digest": "BRyi5NozgWp2Aji5hM8p83M8VgyR3PYg7G27MiYR2B9z" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0x4b2a0b010344ffda7202ecd5f76b742b78516cfcdb208e3314d65a4157654c4b" + "ObjectOwner": "0x672bba3ef273000a1627a5f128022e261e36a85db6c508b917aa3139a2e9720d" }, - "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0x58010842a21daf70d03f28e14a55c3b44c9e1f2c82bf6e79643c440e7e260231", + "objectType": "0x2::dynamic_field::Field", + "objectId": "0x497d698dce0d808d05cb3543b2decd461eb67a0a832acf7e3d822ff61663acb4", "version": "1", - "digest": "CVQfkwhtZPCWcXEwPNDx2RgJZZZWj9bViZkCG6rp7RT2" + "digest": "242fQBuczzCLdXuMZ7FZwR9m86DacJxUTC5xuUW62DSG" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "ObjectOwner": "0xdfa435dca12a14a0e032df1774310db7f9c33510231aba16399e13b44c388919" + "AddressOwner": "0x7a9730f69d7c9eed4058b7e3ad9019adffdf63a94ef73cd2fb0217f3b9eb6eb1" }, - "objectType": "0x2::dynamic_field::Field<0x2::object::ID, address>", - "objectId": "0x5e199335497052f88a5179fe1b336aa3908278987d5d8cbfc01ae1d20eafa7bc", + "objectType": "0x3::validator_cap::UnverifiedValidatorOperationCap", + "objectId": "0x4a4a868c023e670163f57e2467cccdaedef147daf5170fc9b0ce7caa48284a76", "version": "1", - "digest": "GVWnxq3G3VTkrjmzeTCQNsrsZLH2pTv6a8cyJvPTjMPK" + "digest": "AWztWHzVjwd5rYXr7ork1gYC54JqtGpwHNdFA9i6gA16" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "ObjectOwner": "0x0ce0659906b775a0dc9bc9923d4933630a3c22e06b78f2f0a0537575929f996a" + "AddressOwner": "0x7a9730f69d7c9eed4058b7e3ad9019adffdf63a94ef73cd2fb0217f3b9eb6eb1" }, - "objectType": "0x2::dynamic_field::Field", - "objectId": "0x5fb62a31bea23630d03f4a650cd8faa3b60e636d82f79aa9b61e35cf70861712", + "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", + "objectId": "0x4df66b7aab12f518bfba67b0081cadb8a321870b171a98d2aceafb6804e3b003", "version": "1", - "digest": "BMYF3DduG7R7dkUDQMf2wG1zguhyFVzqMKZDwU9onTiy" + "digest": "EPxkpuZZYcjDJq9AzNLMPM8vsY1URjow7nmDuxQQ1QCb" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0x2f1c55f14bcab32b91bccbf9909aa2818d644d4a1f6401c37f97383e4d8275ca" + "ObjectOwner": "0xce3d02f2a570935f50158318f1f0f8706fb80873afce7bb914625c1082225399" }, - "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0x601abe73257d8782de41888a16e9e04465a781e321f929c4c9c348c8a9a1110c", + "objectType": "0x2::dynamic_field::Field<0x2::object::ID, address>", + "objectId": "0x50948c5a6a706b267a6b2c2a4a2043d28ba11c5e022198f58be4182d65987a2d", "version": "1", - "digest": "CvgY37zCcCY2bRjJdox5sH9oEDUgbovD8jHMGE9FHtmy" + "digest": "9SGZtrm6U2rsCqiaFoVQEUSreYstnrCRg6f2EzwKGHq" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "ObjectOwner": "0x0000000000000000000000000000000000000000000000000000000000000005" + "AddressOwner": "0x20227cfbc6699debf187d2d7bca3d253cd50f87c165516d3dc53a246a9af7182" }, - "objectType": "0x2::dynamic_field::Field", - "objectId": "0x6af2a2b7ca60bf76174adfd3e9c4957f8e937759603182f9b46c7f6c5f19c6d2", + "objectType": "0x3::validator_cap::UnverifiedValidatorOperationCap", + "objectId": "0x58efd4d54b74b390e2d3bbe785ec5df555c366b1a6eb616fb07c44d6c3f67c8c", "version": "1", - "digest": "9P2nsb8D67sXPdtK7xe6W6DPTyZTzEeKhi9KBwkVXbLz" + "digest": "FbrF4mnrw5oXKX1trYT2NoENq7CaSGVZfXj5XitjSqhH" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0x2f1c55f14bcab32b91bccbf9909aa2818d644d4a1f6401c37f97383e4d8275ca" + "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" }, "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0x72995e676bcc6c290a2f4c42f8a5846c7ef0063b9af7728ef5d4123de9ac8bbc", + "objectId": "0x5b0e7d31f9c3a421f94dae3511983a2be67e04a7071171da2380f82be103239f", "version": "1", - "digest": "FfKTjzvKHcaEQSdxRK9zx8pbU8BZeU2N3s7f3tKL9eCX" + "digest": "6s1xQf5HR8HMLNaR1QxPcfV4Ys8AL94UUg7cRpD6r4WD" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0x2f1c55f14bcab32b91bccbf9909aa2818d644d4a1f6401c37f97383e4d8275ca" + "ObjectOwner": "0x1dd0079cb68a9c0dc5cbbb0c9c5d831bb56ed88c4a12c647f1352832092d11dc" + }, + "objectType": "0x2::dynamic_field::Field", + "objectId": "0x5c995a223cf5e88e2d19935481d2d06b2e55977cb3615ad6784cc360a42d6501", + "version": "1", + "digest": "2ih9uvSzKBSv9YhrNZdMokhPcZgZ8gTt48TyUToB6JgX" + }, + { + "type": "created", + "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", + "owner": { + "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" }, "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0x72ee17dff740e4aefa6a03e6212533f3615005d79a206698bcd47e9b34d1df1a", + "objectId": "0x5ee269cea868091ea1c5da5f15581c2f7b1708413b3bdda3e4c9528f2b3a5bb9", "version": "1", - "digest": "HUMsUSpoXj22qB4M6tECWDjmEaTwxEwsuSy6KFcVn7VY" + "digest": "7mvhi6RxxMnPohJzMnCYoLHBTLUcRtwFtBXe1ZoanE6D" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0x4b2a0b010344ffda7202ecd5f76b742b78516cfcdb208e3314d65a4157654c4b" + "AddressOwner": "0x7dbda9c2efa8255eea64cf28b64294ffed6af432f53b661d24f3807895ee828d" }, - "objectType": "0x3::staking_pool::StakedIota", - "objectId": "0x76742eed3be4ac1fbf108ae112a743f314a8f8ac90c66b5beb0efe39a58ca6b6", + "objectType": "0x3::validator_cap::UnverifiedValidatorOperationCap", + "objectId": "0x61f2f500cb861d8d92affc84519c4c0a6b794058b58607768c8e38ab275de0eb", "version": "1", - "digest": "2WUuBVt8CfxY8SgBK8qxZUK5BUozyn61G6uDUxskz6vB" + "digest": "AvgJes9PZYnWwM9KZmEiBZamurEgezPZUBB2gVJzvEgb" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "ObjectOwner": "0xdfa435dca12a14a0e032df1774310db7f9c33510231aba16399e13b44c388919" + "ObjectOwner": "0x0000000000000000000000000000000000000000000000000000000000000005" }, - "objectType": "0x2::dynamic_field::Field<0x2::object::ID, address>", - "objectId": "0x778aafce25aa78d5cb0a77b78b816d4ef61e574a590fa5b5787c448c2eb56ce5", + "objectType": "0x2::dynamic_field::Field", + "objectId": "0x6af2a2b7ca60bf76174adfd3e9c4957f8e937759603182f9b46c7f6c5f19c6d2", "version": "1", - "digest": "6iWxLqw2jwbdjyeWW6ahGgPEP96WFQ9QXAW1YUa6QoaT" + "digest": "36ayTWhEK1Ez85fRT6j93sMbQtxo3V55FDsJSnWXTFe5" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0xa0146b1188ebad1dab40317cfb41b64eea8452d2e3b4696f115b2bcf70a62620" + "AddressOwner": "0x4b578d914e64de1ca47bead61bcfa0932646e16de6063089810cfa904eb8b06f" }, "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0x8371569f0f25fa2bef413dc333f74a8df4c1ad6cf31dc80048887ae85eecd527", + "objectId": "0x6b517df3c5888ce924d7871e550989f835335c726a43a224ce3df6b6dfa53666", "version": "1", - "digest": "8YuEfQiV2fGTULQgjgMeuY2GULxxScLxMxJVzGRmEGFh" + "digest": "ARFnQexwF3Q6CDzCgnQfH1v8gY9YAfpXLq4K89FU9koJ" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", - "owner": "Immutable", - "objectType": "0x2::coin::CoinMetadata<0x2::iota::IOTA>", - "objectId": "0x83d61ef9fc69752099b356a702283468748b46057b97466da021ad966e2e1362", + "owner": { + "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" + }, + "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", + "objectId": "0x759bb64d0a576b00a8aae6d439da4a72ef7d8797282c90211bab2bc723cd48e5", "version": "1", - "digest": "CBXqvoJK8TDYHd3z7xHYA2HdpW52UoNMg3hZyd3SS6Mq" + "digest": "7cuKDvum6Rx2utLqquqYZGr6K3S5xbA2fq88cqs8qjZd" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0x786c73ac358652b660d32e1097d11ea2723cfada4ab861288855c70f8c5b7fe9" + "AddressOwner": "0x2f1c55f14bcab32b91bccbf9909aa2818d644d4a1f6401c37f97383e4d8275ca" }, "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0x8f6303e1c51abe1dd7808d8c3d3c96cbaa53565e9dd243ee1bb65a3259947ec5", + "objectId": "0x76472cb3b720491fb9a66db21befaed5fbc8528976bc6fb2bc3c5deeef9d114c", "version": "1", - "digest": "qZB2htF7TnbC1erC5brX6usTaccoNbkYvzV1z2T1wRr" + "digest": "zQeqLseHTy2tGhRk4gwvQGoCtUkRd4LqGjKuuvW2Xh1" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "ObjectOwner": "0xa638e6c2e51c688fac426e422c56d310ada32abf20ccf9ebdf1acc93e00c2472" + "AddressOwner": "0x44f42943b20151d6a0c3cb0f84006b3441bb3378c668a6df71fa36cb441538c8" }, - "objectType": "0x2::dynamic_field::Field", - "objectId": "0x9798a9772438b077f07c4b5a29d90e8b1d1c774424043645ed27e5a0c79d2499", + "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", + "objectId": "0x7c9f819b470ae3ac98b6e44eeea9b461d66a38b22a3d2f61ce62c69f68d0c71a", "version": "1", - "digest": "BdXCtcdbth68sFr11iGJZqz45N2fupUEErxB2Px4ZEC9" + "digest": "EsxwZdo265ZPbYh99YeTGunSWrMj8dXyNBw2H1E9D9eL" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0xa0146b1188ebad1dab40317cfb41b64eea8452d2e3b4696f115b2bcf70a62620" + "AddressOwner": "0x20227cfbc6699debf187d2d7bca3d253cd50f87c165516d3dc53a246a9af7182" }, "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0x98038db1bfffc9a021aa9b1711288f56756a203112017ac615bdd49e0ddfe768", + "objectId": "0x81c7cfd9c7fa81f57a59f14739ee82157fc6a04d48a1b0a6e1187a8898042299", "version": "1", - "digest": "HX5fgCYDAY4EXAsvS6LwgSUr9hx4aoZYbp5GJbUnq8n4" + "digest": "8ESph921vnJz6UaENHxg2ytx68MtT4UoxNpPgWTT99a5" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0xd4ab7d9834d2755f11fe022dd53feecd86cb447425496fc4d02cb7b73348c688" + "AddressOwner": "0x2f1c55f14bcab32b91bccbf9909aa2818d644d4a1f6401c37f97383e4d8275ca" }, - "objectType": "0x3::staking_pool::StakedIota", - "objectId": "0x99bc508c5440067cf58e4b6e671416a2b04e4f60456b711a81b2a9f549ec6892", + "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", + "objectId": "0x85a7aabfb1d8ef14efd87338a58efcdbfaf0cab5e5fc247ccd1080dcdd3d2d7f", "version": "1", - "digest": "FkULFZXqhbqU5Fon3honm5pFmUiqJkY7Y6ECbte1Hii9" + "digest": "277zG7Ypo7ruZu1WMxXDUoApdKnUYLBvrws1KkqzHuFm" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0x44f42943b20151d6a0c3cb0f84006b3441bb3378c668a6df71fa36cb441538c8" + "AddressOwner": "0xb4b32db0fb2bc9170f796efb2439aeaf46fd0dc0b79af4e12d14bb87c3e9aa65" }, "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0xae837285a73c2d23f86206314d8acfdc7adf4af36e33807e3e535cc24edcddda", + "objectId": "0x8cd9aca3790437fc6b1b7258c5fefb2e95ffb54134aae1fd04ba757d4286055d", "version": "1", - "digest": "4V3KqU3gC2eqg9un9WcutPCAiA6vPcGYeFqoTutixkB4" + "digest": "AEXYy8VGP4NX8xpTs7LHiuZYfzTwFiRypmiQrZy9waNY" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0xa0146b1188ebad1dab40317cfb41b64eea8452d2e3b4696f115b2bcf70a62620" + "AddressOwner": "0xb4b32db0fb2bc9170f796efb2439aeaf46fd0dc0b79af4e12d14bb87c3e9aa65" }, "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0xb1930538959be08dee8ab76c7898c85be25e429f967913cc90f3d1b1ab496717", + "objectId": "0x8fd46357d5ae46f9ee8de7d9b6dfc9da4e497c70dbd2ce5c2fc124658798d5c9", "version": "1", - "digest": "FWeCCocjhoeacrKX1ZVkrEvqNxckJfk1KoyHtFH2Z8ES" + "digest": "3xUtUi7VT3NzhFGUGsAJbSaimrdSTb2ujoesjNukQjS8" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0xa0146b1188ebad1dab40317cfb41b64eea8452d2e3b4696f115b2bcf70a62620" + "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" }, "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0xb2d16c38972ef51ed6995d84fee1d5e938eb64d8ab4b8cadc68170f60a778486", + "objectId": "0xa010e1486bfd2f1d7c57a3b2c2edd369e64e8fddc1ca17667314317273cb491d", "version": "1", - "digest": "8tKfiV8MHaEvrzzX3c9exgsAscHPmgZVF9GZ5LjZNwJz" + "digest": "DAFo7bkSkk2XRZv88Nb2V9jatTse1TYTqgMmVxVKGRtF" }, { "type": "created", @@ -1530,53 +1549,53 @@ expression: "run_one(cmds, context).await?" "AddressOwner": "0x44f42943b20151d6a0c3cb0f84006b3441bb3378c668a6df71fa36cb441538c8" }, "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0xc1f45dae29fcdc6611af2ac3b42443fa28fb337e89850cf61b97b048c6cfe121", + "objectId": "0xa6e659b1120b373f598d1f6c3214d73abda596eb913857e1fa471ab4420f2e27", "version": "1", - "digest": "F7UAZ1nzZSGcEs1ntEuv5yBrtjgE9omqTYsM5MiyP1gg" + "digest": "E3tr1QPatiEWCjxUNrbKfyRgkNq8tBeiTKFKGyA7g9vk" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "ObjectOwner": "0x9bc5337781f04e021c5d42b6db841d379794edcf721813534cb5d14dc0290d77" + "AddressOwner": "0x2f1c55f14bcab32b91bccbf9909aa2818d644d4a1f6401c37f97383e4d8275ca" }, - "objectType": "0x2::dynamic_field::Field", - "objectId": "0xc98cbb8b969eccb46b7a487eaa75ac486faa3a55b719731aa9a6b7fdcc90cbc3", + "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", + "objectId": "0xb271c22281276193f817eeab5291b79f5f37698a21323fbafe014e1774c3d22e", "version": "1", - "digest": "6Jfkx2oF2DaXgcD7YMF9qeNUKMvGtBRtCmbh3CRZe21V" + "digest": "GjnVg1dHinKTEkLLZYLedhgmLkmNddYhYM9pUZrUDrzc" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0x4b578d914e64de1ca47bead61bcfa0932646e16de6063089810cfa904eb8b06f" + "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" }, "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0xcdb39cadb88f872448b2836e131c7ef076be9c644ca4d18795e4db5911267fa3", + "objectId": "0xb279227ad10111e5d870facc26d048a05bc440859e718cde0e3bbf257765544c", "version": "1", - "digest": "Cs8zMC43XRRwrM4UxEaKE6R64iWLieh821t7bUh5gPU3" + "digest": "BZaGDacxqx5MFLFm6F3UeBVpHG5hZykqSHFoD1o5F5kq" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0x786c73ac358652b660d32e1097d11ea2723cfada4ab861288855c70f8c5b7fe9" + "AddressOwner": "0xb4b32db0fb2bc9170f796efb2439aeaf46fd0dc0b79af4e12d14bb87c3e9aa65" }, - "objectType": "0x3::validator_cap::UnverifiedValidatorOperationCap", - "objectId": "0xd23f565f9f5472944be8a2a7e36e2ce71a8c4f8b52f8da559f8545ac912347f6", + "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", + "objectId": "0xbb43894417b1b4a4cee286133d85cae9706c217d150daf4d12168bc5e9147d78", "version": "1", - "digest": "9DbBy8qevsWuEZJQdgyZgX2JTYju838H82fC6ioa6wpw" + "digest": "E9CuCY7GpGsGHb6cjKdSrrWc3xmRN3wjp4FqjZ22DmoT" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0xd4ab7d9834d2755f11fe022dd53feecd86cb447425496fc4d02cb7b73348c688" + "ObjectOwner": "0xc2bda3bfc534a80abf077c5be16ba9a0832c206ab8e230605d6839b7d87c2038" }, - "objectType": "0x3::validator_cap::UnverifiedValidatorOperationCap", - "objectId": "0xd2cba88d7ce541ad591c502ccf59c6c59d7dd432b663cc13a36781a6976bf5bb", + "objectType": "0x2::dynamic_field::Field", + "objectId": "0xc066a3793934a82847a3cee2a0dd84832ba1ba24b71ac0602b1a60cbbe553d17", "version": "1", - "digest": "9cBTiupwFCu1ju2HsegDvB6Z68PSSsYPeXaMcD4RzKfc" + "digest": "DWvQzrbs9HQQ411fc6f9QtEFerRLv956sUyRzY1M9HPJ" }, { "type": "created", @@ -1585,113 +1604,111 @@ expression: "run_one(cmds, context).await?" "AddressOwner": "0x4b578d914e64de1ca47bead61bcfa0932646e16de6063089810cfa904eb8b06f" }, "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0xd5e3ee6fa97b35e816e608f24f775ffd69630f04d1f5131627fb86153a003e47", + "objectId": "0xc79de55a6454ac8e927645a08e4e9b3ce8e814ce9fc25eb7a347a91fc2228f4f", "version": "1", - "digest": "AQCi9QJC9fV8SEcpQQA9FKhsETtggm3VWAYuswZ6fXF5" + "digest": "6avmJYgcDx3Ha6XXNTRCZeHACaaERgC4AkNDCE1a8TGA" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "ObjectOwner": "0x25251a73e10849ffe7abc224ed35304d012a18f418611b381298d8be8b2eaf83" + "AddressOwner": "0x4b578d914e64de1ca47bead61bcfa0932646e16de6063089810cfa904eb8b06f" }, - "objectType": "0x2::dynamic_field::Field", - "objectId": "0xda50ca1f674de8e7166d0c0265dd4175f0a69f461c00ac65107d6957cd168348", + "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", + "objectId": "0xc7ee80d93a34f12ff58b0ceaf16c4e06ee6ceeb547b031b0d3eab1a8a6ca873f", "version": "1", - "digest": "6zzp85oetD1P7Zv4Umd7E4aG9iwbaGDmQgoKmutGpL4e" + "digest": "F3PmgDERQbRNn44B6on5QPxNVXCLUn18L33fNgv1cazu" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0xa76e9ed3ad7f9e542674c2128d42dfe094540b485eba58f6e980ef8082230507" + "AddressOwner": "0x2f1c55f14bcab32b91bccbf9909aa2818d644d4a1f6401c37f97383e4d8275ca" }, - "objectType": "0x3::staking_pool::StakedIota", - "objectId": "0xda89bac08a36b187df7de02a08ac3b6a98016b1610c64cde2970f5f4b59125d4", + "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", + "objectId": "0xd1e455eb2c367047a03756eb830bf0d2357b0c69905f0d4f3a648cc81498905e", "version": "1", - "digest": "4Rs6gsJZ478oWm1L9KsosLZZeRXutj1SyrCNB6NzkS7E" + "digest": "C2SeaJLLw3x6ShuvPfND8mXCAvLgNz293iTtu5L1SWCW" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0xa76e9ed3ad7f9e542674c2128d42dfe094540b485eba58f6e980ef8082230507" + "AddressOwner": "0x7dbda9c2efa8255eea64cf28b64294ffed6af432f53b661d24f3807895ee828d" }, - "objectType": "0x3::validator_cap::UnverifiedValidatorOperationCap", - "objectId": "0xdc94ba8e8d952bb19047335bc1517d556b21d2ce96722885214c5f5241ac4ad0", + "objectType": "0x3::staking_pool::StakedIota", + "objectId": "0xd26171201bf3e074f1d1c694ea6ebc5d95d75b75583c393055efbca3eeb9c629", "version": "1", - "digest": "Ac7ex9P1Qrs9wQAzZezDzoPPnoMcGqZoSh4LbMeduiui" + "digest": "AVs21Q7q1cFThjfKGkzGSSaKsQCjWo3NtDcBDPCCKM76" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0x44f42943b20151d6a0c3cb0f84006b3441bb3378c668a6df71fa36cb441538c8" + "ObjectOwner": "0x8ee7b25e9189b59bcedfe3525114b47d4602ce383d1ddbbc3e49d95134fd8286" }, - "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0xdf0d86e9d8d2ab9d598062da57d512d39e0102425ecea598aee9a1d73e883619", + "objectType": "0x2::dynamic_field::Field", + "objectId": "0xd6090aa14b28b0e907434cd8f8469b24769a80ebd722f18df48fe59e5fd47c0f", "version": "1", - "digest": "ECfLmrqxkyF2g16LdCCLAz6Gae51xF5Naka2zHc4sh9H" + "digest": "4yuGdRvF2jHEwP7yfNE56bWPNY9v4b4wDzDngue7sHxb" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" + "AddressOwner": "0x7dbda9c2efa8255eea64cf28b64294ffed6af432f53b661d24f3807895ee828d" }, "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0xe0b08d48248e495318c2aa10da651a1cd69f49ddb38a349b0000dea55415f48b", + "objectId": "0xe47935c2607151b36e2e7d6971418157d7a8997ab2771ae779f5b6a2230334c9", "version": "1", - "digest": "5UbcKdRD7iyfUn2upZ1c9wuWRiD9J9h9hCCE1jX1EHSz" + "digest": "GTBQbGkLPeC4hbkBB6QtzPC7P1zngzPdh2tAyPUnS8c" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0x44f42943b20151d6a0c3cb0f84006b3441bb3378c668a6df71fa36cb441538c8" + "AddressOwner": "0x4b578d914e64de1ca47bead61bcfa0932646e16de6063089810cfa904eb8b06f" }, "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0xe6a48ab793151dfceb21d185730b05319ede87e6e415fd1fec41bafe4e0779f6", + "objectId": "0xe54599f1bb4b687498caf1e5212c6eaf0b088dcc8159d283ecf2c6287ede48dc", "version": "1", - "digest": "HEeQgzeThKQWJRqP2F9yMXArCNQD5xYPcCZKZEF8Kfqd" + "digest": "Cs9n9dTaq4n8KjEDib829cYFgPQRsyubTQRzX1upqE6x" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0x2868fed4dbeb23d2ace3ee3ad6e39061423c5692a2b289b39c643c0baf2d8d85" + "AddressOwner": "0xb4b32db0fb2bc9170f796efb2439aeaf46fd0dc0b79af4e12d14bb87c3e9aa65" }, "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0xee188f7b5964b56105a062dcfddd10e4f4e427db489f9bf562a264b76e6bf9d7", + "objectId": "0xefd24c24d3784edec255308f6fc3619f65902ebd122f5a34b105727994326ce1", "version": "1", - "digest": "A5Tnjugpa5gCcKLcwiVNJnYGRHuuADX7YtpgUtgfKfXa" + "digest": "FNNTstnHpGPZCv6PNrv7dcodbfXkA4xiz71ZUtiVKYcY" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", "owner": { - "AddressOwner": "0x4b578d914e64de1ca47bead61bcfa0932646e16de6063089810cfa904eb8b06f" + "AddressOwner": "0x44f42943b20151d6a0c3cb0f84006b3441bb3378c668a6df71fa36cb441538c8" }, "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0xf9f32e362d5d343046fde898a7372ea2a6a7d4d36bda1b1ab31f1724a92a1982", + "objectId": "0xfbf79fe230691c666820739add167373a61a7faa858231f42feb961ec8fffcf5", "version": "1", - "digest": "AhEJzhsHTTWbWER6c73s5oAVXXNE7VkDN56mhV8u4Qfn" + "digest": "2FRzkPVb45cxXoE68vu5QcfM9T7WypPFu199wSHeXUWj" }, { "type": "created", "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", - "owner": { - "AddressOwner": "0x4b578d914e64de1ca47bead61bcfa0932646e16de6063089810cfa904eb8b06f" - }, - "objectType": "0x2::coin::Coin<0x2::iota::IOTA>", - "objectId": "0xfd211f3ecaa7a6f275351ac86570183daf1fba722faf7c5cb64f04210113dc60", + "owner": "Immutable", + "objectType": "0x2::display::Display<0x107a::nft::Nft>", + "objectId": "0xffc04eb3011a2933dd0fbfff34cbd6759dbf999f7e2ac372e08d577c56a459cb", "version": "1", - "digest": "CBp9bmMzBTBKhAwHAFLm7KDgy8xSQkW41xaTF1RKHEc8" + "digest": "FVzi8BDkddrv8mDQE6DG5JxD7THHn1PKLqzSj5sovdAc" } ], "timestampMs": "1641175496000", "checkpoint": "0" }, - "iota client tx-block EgMTHQygMi6SRsBqrPHAEKZCNrpShXurCp9rcb9qbSg8", - "ErrorObject { code: InvalidParams, message: \"Could not find the referenced transaction [TransactionDigest(EgMTHQygMi6SRsBqrPHAEKZCNrpShXurCp9rcb9qbSg8)].\", data: None }" + "iota client tx-block 11111111111111111111111111111111", + "ErrorObject { code: InvalidParams, message: \"Could not find the referenced transaction [TransactionDigest(11111111111111111111111111111111)].\", data: None }" ] diff --git a/crates/iota-faucet/src/bin/merge_coins.rs b/crates/iota-faucet/src/bin/merge_coins.rs index 99a3e75237b..5ce33634916 100644 --- a/crates/iota-faucet/src/bin/merge_coins.rs +++ b/crates/iota-faucet/src/bin/merge_coins.rs @@ -57,8 +57,8 @@ async fn _split_coins_equally( .await?; let signature = wallet - .config - .keystore + .config() + .keystore() .sign_secure(&active_address, &tx_data, Intent::iota_transaction()) .unwrap(); let tx = Transaction::from_data(tx_data, vec![signature]); @@ -112,8 +112,8 @@ async fn _merge_coins(gas_coin: &str, mut wallet: WalletContext) -> Result<(), a .pay_iota(active_address, coin_vector, target, target_amount, 1000000) .await?; let signature = wallet - .config - .keystore + .config() + .keystore() .sign_secure(&active_address, &tx_data, Intent::iota_transaction()) .unwrap(); let tx = Transaction::from_data(tx_data, vec![signature]); diff --git a/crates/iota-faucet/src/faucet/simple_faucet.rs b/crates/iota-faucet/src/faucet/simple_faucet.rs index 7d7ef222e83..1a168c35c48 100644 --- a/crates/iota-faucet/src/faucet/simple_faucet.rs +++ b/crates/iota-faucet/src/faucet/simple_faucet.rs @@ -427,8 +427,8 @@ impl SimpleFaucet { ) -> Result { let signature = self .wallet - .config - .keystore + .config() + .keystore() .sign_secure(&self.active_address, &tx_data, Intent::iota_transaction()) .map_err(FaucetError::internal)?; let tx = Transaction::from_data(tx_data, vec![signature]); @@ -1123,7 +1123,7 @@ mod tests { ctx: &mut WalletContext, tx_data: TransactionData, ) -> Result { - let signature = ctx.config.keystore.sign_secure( + let signature = ctx.config().keystore().sign_secure( &tx_data.sender(), &tx_data, Intent::iota_transaction(), diff --git a/crates/iota-genesis-builder/Cargo.toml b/crates/iota-genesis-builder/Cargo.toml index a70eac62788..81d3c77ffe1 100644 --- a/crates/iota-genesis-builder/Cargo.toml +++ b/crates/iota-genesis-builder/Cargo.toml @@ -40,14 +40,14 @@ tracing.workspace = true tracing-subscriber = "0.3" # internal dependencies -iota-adapter-v0 = { path = "../../iota-execution/v0/iota-adapter/" } +iota-adapter-latest = { path = "../../iota-execution/latest/iota-adapter/" } iota-config.workspace = true iota-execution.workspace = true iota-framework.workspace = true iota-framework-snapshot.workspace = true iota-genesis-common.workspace = true iota-move-build.workspace = true -iota-move-natives-v0 = { path = "../../iota-execution/v0/iota-move-natives" } +iota-move-natives-latest = { path = "../../iota-execution/latest/iota-move-natives" } iota-protocol-config.workspace = true iota-sdk = { version = "1.1", default-features = false, features = ["irc_27", "irc_30", "std"] } iota-types.workspace = true @@ -55,7 +55,7 @@ move-binary-format.workspace = true move-compiler.workspace = true move-core-types.workspace = true move-package.workspace = true -move-vm-runtime-v0 = { path = "../../external-crates/move/move-execution/v0/crates/move-vm-runtime" } +move-vm-runtime-latest = { path = "../../external-crates/move/crates/move-vm-runtime", package = "move-vm-runtime" } shared-crypto.workspace = true [target.'cfg(msim)'.dependencies] diff --git a/crates/iota-genesis-builder/src/lib.rs b/crates/iota-genesis-builder/src/lib.rs index a4d0f17607c..b3725eded9b 100644 --- a/crates/iota-genesis-builder/src/lib.rs +++ b/crates/iota-genesis-builder/src/lib.rs @@ -47,7 +47,7 @@ use iota_types::{ effects::{TransactionEffects, TransactionEvents}, epoch_data::EpochData, event::Event, - gas_coin::{GAS, GasCoin}, + gas_coin::{GAS, GasCoin, STARDUST_TOTAL_SUPPLY_NANOS}, governance::StakedIota, id::UID, in_memory_storage::InMemoryStorage, @@ -284,6 +284,8 @@ impl Builder { fn resolve_token_distribution_schedule(&mut self) -> TokenDistributionSchedule { let validator_addresses = self.validators.values().map(|v| v.info.iota_address()); let token_distribution_schedule = self.token_distribution_schedule.take(); + let stardust_total_supply_nanos = + self.migration_sources.len() as u64 * STARDUST_TOTAL_SUPPLY_NANOS; if self.genesis_stake.is_empty() { token_distribution_schedule.unwrap_or_else(|| { TokenDistributionSchedule::new_for_validators_with_default_allocation( @@ -296,10 +298,14 @@ impl Builder { schedule } else { self.genesis_stake - .extend_token_distribution_schedule_without_migration(schedule) + .extend_token_distribution_schedule_without_migration( + schedule, + stardust_total_supply_nanos, + ) } } else { - self.genesis_stake.to_token_distribution_schedule() + self.genesis_stake + .to_token_distribution_schedule(stardust_total_supply_nanos) } } diff --git a/crates/iota-genesis-builder/src/stake.rs b/crates/iota-genesis-builder/src/stake.rs index 9787b97d621..bdbceac5ae7 100644 --- a/crates/iota-genesis-builder/src/stake.rs +++ b/crates/iota-genesis-builder/src/stake.rs @@ -7,7 +7,6 @@ use iota_config::genesis::{ }; use iota_types::{ base_types::{IotaAddress, ObjectRef}, - gas_coin::STARDUST_TOTAL_SUPPLY_NANOS, object::Object, stardust::coin_kind::get_gas_balance_maybe, }; @@ -63,10 +62,13 @@ impl GenesisStake { /// Create a new valid [`TokenDistributionSchedule`] from the /// inner token allocations. - pub fn to_token_distribution_schedule(&self) -> TokenDistributionSchedule { + pub fn to_token_distribution_schedule( + &self, + total_supply_nanos: u64, + ) -> TokenDistributionSchedule { let mut builder = TokenDistributionScheduleBuilder::new(); - let pre_minted_supply = self.calculate_pre_minted_supply(); + let pre_minted_supply = self.calculate_pre_minted_supply(total_supply_nanos); builder.set_pre_minted_supply(pre_minted_supply); @@ -88,18 +90,20 @@ impl GenesisStake { pub fn extend_token_distribution_schedule_without_migration( &self, mut schedule_without_migration: TokenDistributionSchedule, + total_supply_nanos: u64, ) -> TokenDistributionSchedule { schedule_without_migration .allocations .extend(self.token_allocation.clone()); - schedule_without_migration.pre_minted_supply = self.calculate_pre_minted_supply(); + schedule_without_migration.pre_minted_supply = + self.calculate_pre_minted_supply(total_supply_nanos); schedule_without_migration.validate(); schedule_without_migration } /// Calculates the part of the IOTA supply that is pre-minted. - fn calculate_pre_minted_supply(&self) -> u64 { - STARDUST_TOTAL_SUPPLY_NANOS - self.sum_token_allocation() + fn calculate_pre_minted_supply(&self, total_supply_nanos: u64) -> u64 { + total_supply_nanos - self.sum_token_allocation() } } diff --git a/crates/iota-genesis-builder/src/stardust/migration/executor.rs b/crates/iota-genesis-builder/src/stardust/migration/executor.rs index 8c7b6fb96f6..816123dba63 100644 --- a/crates/iota-genesis-builder/src/stardust/migration/executor.rs +++ b/crates/iota-genesis-builder/src/stardust/migration/executor.rs @@ -7,13 +7,13 @@ use std::{ }; use anyhow::Result; -use iota_adapter_v0::{ +use iota_adapter_latest::{ adapter::new_move_vm, execution_mode, gas_charger::GasCharger, programmable_transactions, temporary_store::TemporaryStore, }; use iota_framework::BuiltInFramework; use iota_move_build::CompiledPackage; -use iota_move_natives_v0::all_natives; +use iota_move_natives_latest::all_natives; use iota_protocol_config::{Chain, ProtocolConfig, ProtocolVersion}; use iota_sdk::types::block::output::{ AliasOutput, BasicOutput, FoundryOutput, NativeTokens, NftOutput, OutputId, TokenId, @@ -44,7 +44,7 @@ use iota_types::{ }, }; use move_core_types::{ident_str, language_storage::StructTag}; -use move_vm_runtime_v0::move_vm::MoveVM; +use move_vm_runtime_latest::move_vm::MoveVM; use crate::{ process_package, diff --git a/crates/iota-genesis-builder/src/stardust/migration/tests/foundry.rs b/crates/iota-genesis-builder/src/stardust/migration/tests/foundry.rs index 54cf90b2326..df89546f1a2 100644 --- a/crates/iota-genesis-builder/src/stardust/migration/tests/foundry.rs +++ b/crates/iota-genesis-builder/src/stardust/migration/tests/foundry.rs @@ -319,15 +319,6 @@ fn coin_ownership() -> Result<()> { // Check the owner of the coin manager object. assert!(coin_manager_object.is_shared()); - // Check if the coin manager object has a public transfer. - assert!( - coin_manager_object - .data - .try_as_move() - .unwrap() - .has_public_transfer() - ); - // Check the owner of the treasury cap object. assert_eq!( coin_manager_treasury_cap_object.owner, diff --git a/crates/iota-graphql-e2e-tests/tests/available_range/available_range.exp b/crates/iota-graphql-e2e-tests/tests/available_range/available_range.exp index dd41a2cb676..6dfbb9b815e 100644 --- a/crates/iota-graphql-e2e-tests/tests/available_range/available_range.exp +++ b/crates/iota-graphql-e2e-tests/tests/available_range/available_range.exp @@ -6,20 +6,20 @@ Response: { "data": { "availableRange": { "first": { - "digest": "2Pnu3zEQqTY9iwaeCk5YvEDifg6a5wQyCZQbcUbFnm6a", + "digest": "4ELBAJ4AW3LXSgsEoXn525rFUdvtAPNhdavRcGaFqNBr", "sequenceNumber": 0 }, "last": { - "digest": "2Pnu3zEQqTY9iwaeCk5YvEDifg6a5wQyCZQbcUbFnm6a", + "digest": "4ELBAJ4AW3LXSgsEoXn525rFUdvtAPNhdavRcGaFqNBr", "sequenceNumber": 0 } }, "first": { - "digest": "2Pnu3zEQqTY9iwaeCk5YvEDifg6a5wQyCZQbcUbFnm6a", + "digest": "4ELBAJ4AW3LXSgsEoXn525rFUdvtAPNhdavRcGaFqNBr", "sequenceNumber": 0 }, "last": { - "digest": "2Pnu3zEQqTY9iwaeCk5YvEDifg6a5wQyCZQbcUbFnm6a", + "digest": "4ELBAJ4AW3LXSgsEoXn525rFUdvtAPNhdavRcGaFqNBr", "sequenceNumber": 0 } } @@ -39,20 +39,20 @@ Response: { "data": { "availableRange": { "first": { - "digest": "2Pnu3zEQqTY9iwaeCk5YvEDifg6a5wQyCZQbcUbFnm6a", + "digest": "4ELBAJ4AW3LXSgsEoXn525rFUdvtAPNhdavRcGaFqNBr", "sequenceNumber": 0 }, "last": { - "digest": "Hp9k2veFDsLbSFiJW5BWR2UQaaaLJ4cE1R9QK1Ec2T31", + "digest": "6rszwvzRELvaUnWaphcdzP4fd7Q3uhbGYa2sUHkxw6p3", "sequenceNumber": 2 } }, "first": { - "digest": "2Pnu3zEQqTY9iwaeCk5YvEDifg6a5wQyCZQbcUbFnm6a", + "digest": "4ELBAJ4AW3LXSgsEoXn525rFUdvtAPNhdavRcGaFqNBr", "sequenceNumber": 0 }, "last": { - "digest": "Hp9k2veFDsLbSFiJW5BWR2UQaaaLJ4cE1R9QK1Ec2T31", + "digest": "6rszwvzRELvaUnWaphcdzP4fd7Q3uhbGYa2sUHkxw6p3", "sequenceNumber": 2 } } diff --git a/crates/iota-graphql-e2e-tests/tests/call/coin_metadata.exp b/crates/iota-graphql-e2e-tests/tests/call/coin_metadata.exp index 338d6c11140..e7603e9773d 100644 --- a/crates/iota-graphql-e2e-tests/tests/call/coin_metadata.exp +++ b/crates/iota-graphql-e2e-tests/tests/call/coin_metadata.exp @@ -7,13 +7,13 @@ task 1, lines 7-18: //# publish --sender A created: object(1,0), object(1,1), object(1,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 10617200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 10594400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 20: //# create-checkpoint Checkpoint created: 1 -task 3, lines 22-33: +task 3, lines 22-32: //# run-graphql Response: { "data": { @@ -23,26 +23,25 @@ Response: { "symbol": "FAKE", "description": "", "iconUrl": null, - "supply": "0", - "hasPublicTransfer": true + "supply": "0" } } } -task 4, lines 36-38: +task 4, lines 35-37: //# programmable --sender A --inputs object(1,2) 100 @A //> 0: iota::coin::mint(Input(0), Input(1)); //> TransferObjects([Result(0)], Input(2)) created: object(4,0) mutated: object(0,0), object(1,2) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 4012800, storage_rebate: 2690400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3990000, storage_rebate: 2675200, non_refundable_storage_fee: 0 -task 5, line 40: +task 5, line 39: //# create-checkpoint Checkpoint created: 2 -task 6, lines 42-53: +task 6, lines 41-51: //# run-graphql Response: { "data": { @@ -52,8 +51,7 @@ Response: { "symbol": "FAKE", "description": "", "iconUrl": null, - "supply": "100", - "hasPublicTransfer": true + "supply": "100" } } } diff --git a/crates/iota-graphql-e2e-tests/tests/call/coin_metadata.move b/crates/iota-graphql-e2e-tests/tests/call/coin_metadata.move index 5224c521a32..9564caafec2 100644 --- a/crates/iota-graphql-e2e-tests/tests/call/coin_metadata.move +++ b/crates/iota-graphql-e2e-tests/tests/call/coin_metadata.move @@ -28,7 +28,6 @@ module test::fake { description iconUrl supply - hasPublicTransfer } } @@ -48,6 +47,5 @@ module test::fake { description iconUrl supply - hasPublicTransfer } } diff --git a/crates/iota-graphql-e2e-tests/tests/call/dynamic_fields.exp b/crates/iota-graphql-e2e-tests/tests/call/dynamic_fields.exp index ad47d85be1a..4ea401d7a3f 100644 --- a/crates/iota-graphql-e2e-tests/tests/call/dynamic_fields.exp +++ b/crates/iota-graphql-e2e-tests/tests/call/dynamic_fields.exp @@ -7,25 +7,25 @@ task 1, lines 14-53: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 8329600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8322000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 55: //# run Test::m::create_obj --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2234400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2219200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 57: //# run Test::m::add_df --sender A --args object(2,0) created: object(3,0), object(3,1), object(3,2) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 6536000, storage_rebate: 2234400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6498000, storage_rebate: 2219200, non_refundable_storage_fee: 0 task 4, line 59: //# run Test::m::add_dof --sender A --args object(2,0) created: object(4,0), object(4,1) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 5928000, storage_rebate: 2234400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5897600, storage_rebate: 2219200, non_refundable_storage_fee: 0 task 5, line 61: //# create-checkpoint @@ -49,7 +49,7 @@ Response: { "bcs": "AAAAAAAAAAA=" }, "value": { - "__typename": "MoveObject" + "__typename": "MoveValue" } }, { @@ -69,12 +69,12 @@ Response: { { "name": { "type": { - "repr": "u64" + "repr": "bool" }, "data": { - "Number": "0" + "Bool": false }, - "bcs": "AAAAAAAAAAA=" + "bcs": "AA==" }, "value": { "__typename": "MoveValue" @@ -83,15 +83,15 @@ Response: { { "name": { "type": { - "repr": "bool" + "repr": "u64" }, "data": { - "Bool": false + "Number": "0" }, - "bcs": "AA==" + "bcs": "AAAAAAAAAAA=" }, "value": { - "__typename": "MoveValue" + "__typename": "MoveObject" } } ] @@ -105,7 +105,7 @@ task 7, line 88: created: object(7,0) mutated: object(0,0) wrapped: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2485200, storage_rebate: 2234400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2470000, storage_rebate: 2219200, non_refundable_storage_fee: 0 task 8, line 90: //# create-checkpoint @@ -129,7 +129,7 @@ Response: { "bcs": "AAAAAAAAAAA=" }, "value": { - "__typename": "MoveObject" + "__typename": "MoveValue" } }, { @@ -149,12 +149,12 @@ Response: { { "name": { "type": { - "repr": "u64" + "repr": "bool" }, "data": { - "Number": "0" + "Bool": false }, - "bcs": "AAAAAAAAAAA=" + "bcs": "AA==" }, "value": { "__typename": "MoveValue" @@ -163,15 +163,15 @@ Response: { { "name": { "type": { - "repr": "bool" + "repr": "u64" }, "data": { - "Bool": false + "Number": "0" }, - "bcs": "AA==" + "bcs": "AAAAAAAAAAA=" }, "value": { - "__typename": "MoveValue" + "__typename": "MoveObject" } } ] @@ -198,7 +198,11 @@ Response: { "bcs": "AAAAAAAAAAA=" }, "value": { - "__typename": "MoveObject" + "bcs": "AAAAAAAAAAA=", + "data": { + "Number": "0" + }, + "__typename": "MoveValue" } }, { @@ -222,17 +226,17 @@ Response: { { "name": { "type": { - "repr": "u64" + "repr": "bool" }, "data": { - "Number": "0" + "Bool": false }, - "bcs": "AAAAAAAAAAA=" + "bcs": "AA==" }, "value": { - "bcs": "AAAAAAAAAAA=", + "bcs": "AgAAAAAAAAA=", "data": { - "Number": "0" + "Number": "2" }, "__typename": "MoveValue" } @@ -240,19 +244,15 @@ Response: { { "name": { "type": { - "repr": "bool" + "repr": "u64" }, "data": { - "Bool": false + "Number": "0" }, - "bcs": "AA==" + "bcs": "AAAAAAAAAAA=" }, "value": { - "bcs": "AgAAAAAAAAA=", - "data": { - "Number": "2" - }, - "__typename": "MoveValue" + "__typename": "MoveObject" } } ] diff --git a/crates/iota-graphql-e2e-tests/tests/call/owned_objects.exp b/crates/iota-graphql-e2e-tests/tests/call/owned_objects.exp index c6d924f7b9f..4af89afdd54 100644 --- a/crates/iota-graphql-e2e-tests/tests/call/owned_objects.exp +++ b/crates/iota-graphql-e2e-tests/tests/call/owned_objects.exp @@ -4,7 +4,7 @@ task 1, lines 23-42: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5570800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5563200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 44-62: //# run-graphql @@ -22,7 +22,7 @@ task 3, line 64: //# run Test::M1::create --args 0 @A created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 66: //# view-object 3,0 diff --git a/crates/iota-graphql-e2e-tests/tests/call/simple.exp b/crates/iota-graphql-e2e-tests/tests/call/simple.exp index 42af47adbb1..b4c44eda117 100644 --- a/crates/iota-graphql-e2e-tests/tests/call/simple.exp +++ b/crates/iota-graphql-e2e-tests/tests/call/simple.exp @@ -7,19 +7,19 @@ task 1, lines 7-26: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 5570800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5563200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 28: //# run Test::M1::create --args 0 @A --gas-price 1000 created: object(2,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 30: //# run Test::M1::create --args 0 @validator_0 created: object(3,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 32: //# view-object 0,0 @@ -69,7 +69,7 @@ Checkpoint created: 4 task 8, line 40: //# view-checkpoint CheckpointSummary { epoch: 0, seq: 4, content_digest: D3oWLCcqoa1D15gxzvMaDemNNY8YYVspAkYkcmtQKWRt, - epoch_rolling_gas_cost_summary: GasCostSummary { computation_cost: 3000000, storage_cost: 10176400, storage_rebate: 1976000, non_refundable_storage_fee: 0 }} + epoch_rolling_gas_cost_summary: GasCostSummary { computation_cost: 3000000, computation_cost_burned: 3000000, storage_cost: 10138400, storage_rebate: 1960800, non_refundable_storage_fee: 0 }} task 9, line 42: //# advance-epoch 6 @@ -77,8 +77,8 @@ Epoch advanced: 5 task 10, line 44: //# view-checkpoint -CheckpointSummary { epoch: 5, seq: 10, content_digest: EHaZsR7ajihuq2A1atco5htZtPYyUwkZHUhdWNgTuRwC, - epoch_rolling_gas_cost_summary: GasCostSummary { computation_cost: 0, storage_cost: 0, storage_rebate: 0, non_refundable_storage_fee: 0 }} +CheckpointSummary { epoch: 5, seq: 10, content_digest: Ee6ZUSAsovYRwYFDNkWyii9fVgYaAmL9kcdgDwnDQ5if, + epoch_rolling_gas_cost_summary: GasCostSummary { computation_cost: 0, computation_cost_burned: 0, storage_cost: 0, storage_rebate: 0, non_refundable_storage_fee: 0 }} task 11, lines 46-51: //# run-graphql @@ -97,7 +97,7 @@ Checkpoint created: 11 task 13, line 55: //# view-checkpoint CheckpointSummary { epoch: 6, seq: 11, content_digest: D3oWLCcqoa1D15gxzvMaDemNNY8YYVspAkYkcmtQKWRt, - epoch_rolling_gas_cost_summary: GasCostSummary { computation_cost: 0, storage_cost: 0, storage_rebate: 0, non_refundable_storage_fee: 0 }} + epoch_rolling_gas_cost_summary: GasCostSummary { computation_cost: 0, computation_cost_burned: 0, storage_cost: 0, storage_rebate: 0, non_refundable_storage_fee: 0 }} task 14, lines 57-62: //# run-graphql @@ -114,11 +114,11 @@ task 15, lines 64-69: Headers: { "content-type": "application/json", "content-length": "157", - "x-iota-rpc-version": "0.6.0-testing-no-sha", + "x-iota-rpc-version": "0.7.0-testing-no-sha", "vary": "origin, access-control-request-method, access-control-request-headers", "access-control-allow-origin": "*", } -Service version: 0.6.0-testing-no-sha +Service version: 0.7.0-testing-no-sha Response: { "data": { "checkpoint": { @@ -140,7 +140,7 @@ Response: { task 16, line 71: //# view-checkpoint CheckpointSummary { epoch: 6, seq: 11, content_digest: D3oWLCcqoa1D15gxzvMaDemNNY8YYVspAkYkcmtQKWRt, - epoch_rolling_gas_cost_summary: GasCostSummary { computation_cost: 0, storage_cost: 0, storage_rebate: 0, non_refundable_storage_fee: 0 }} + epoch_rolling_gas_cost_summary: GasCostSummary { computation_cost: 0, computation_cost_burned: 0, storage_cost: 0, storage_rebate: 0, non_refundable_storage_fee: 0 }} task 17, lines 73-76: //# advance-epoch @@ -155,8 +155,8 @@ Response: { "edges": [ { "node": { - "address": "0xe479cb734ef04b9d4c171a67e488b419b952791acee9aeb4f9ea5d6ea0dfcd9a", - "digest": "DuFDw4u9wrL5Vz3BaLxQmxvb9FLa8HDvJ9UhZW5Yu4cS", + "address": "0xeb65a9b4c043abdf3e0fefa3047fb5ea8ecb9d0239477624d1fd55d67d229891", + "digest": "GpfNenBbHNc3zUKfsAGEkiDsryUtvSSDN3k55eAAKsVv", "owner": { "__typename": "AddressOwner" } @@ -182,8 +182,8 @@ Response: { "edges": [ { "node": { - "address": "0xe479cb734ef04b9d4c171a67e488b419b952791acee9aeb4f9ea5d6ea0dfcd9a", - "digest": "DuFDw4u9wrL5Vz3BaLxQmxvb9FLa8HDvJ9UhZW5Yu4cS", + "address": "0xeb65a9b4c043abdf3e0fefa3047fb5ea8ecb9d0239477624d1fd55d67d229891", + "digest": "GpfNenBbHNc3zUKfsAGEkiDsryUtvSSDN3k55eAAKsVv", "owner": { "__typename": "AddressOwner" } @@ -198,7 +198,7 @@ Response: { { "node": { "address": "0x0133ca00247f984c7280ea2aa1dac2630055ced0d5080825a0d9cdddf523f4f6", - "digest": "Ax3pt3zx5yNS6DPcDyJLGEj5TMeA8Z8FZv8tJuUe8UiH", + "digest": "7Ye4pTNg8MB1KWaRyz1cT4WdiNKB3MxaMJ1tgxgDbkfS", "owner": { "__typename": "AddressOwner" } @@ -206,8 +206,8 @@ Response: { }, { "node": { - "address": "0x26bf0f03edd09bb3f862e13cec014d17c26dd739d2563d9c704aa8d206301df2", - "digest": "Es2PzgRkTLrpyEdNNThffNN8sG4kmVLevN2ZAkVVJLEk", + "address": "0x0ef04a70a5215989129b276c3ada1b43a2772169b1db5e157b40743e1ecac0ad", + "digest": "A1Gp7sqj3AeNUYBq8SScjGZJv2Hp9cuvJ1W4V7KZswDy", "owner": { "__typename": "AddressOwner" } @@ -215,8 +215,8 @@ Response: { }, { "node": { - "address": "0x3442446f02377d1025b211e51564e4f1c9a46845ccad733beeb06180d3f66c31", - "digest": "CsW52aynnf8BFt5i81WRXS2pKkpJKKjreH9nGG5jDrN4", + "address": "0x26bf0f03edd09bb3f862e13cec014d17c26dd739d2563d9c704aa8d206301df2", + "digest": "9LoSY4zTcsU3iZkaXK3vreVgQnNFBmuuTmxhbHXGoTju", "owner": { "__typename": "AddressOwner" } @@ -224,8 +224,8 @@ Response: { }, { "node": { - "address": "0x3c88cad5799a8da0467b8456a7429a97e7c141cfcf25f02faf51aa8cb4840461", - "digest": "ByKoXAbzqL7SLRX1MmWB4W8nndfkMhqU1V1scJUEVg66", + "address": "0x3442446f02377d1025b211e51564e4f1c9a46845ccad733beeb06180d3f66c31", + "digest": "BAdieXDoeWexinDjhx69GEu3cKKiXc7XeEZg21cvymTp", "owner": { "__typename": "AddressOwner" } @@ -233,8 +233,8 @@ Response: { }, { "node": { - "address": "0x51e8ad8999fd29749b8afed87b965adbd781deb08b2f5325e4cf4e5528e17a7f", - "digest": "FK1iU9QwRx9rXV3UZxWjLCkzfBQdecKuZesJR5aioimU", + "address": "0x3c88cad5799a8da0467b8456a7429a97e7c141cfcf25f02faf51aa8cb4840461", + "digest": "Bg4vTzDaxxRmzHqKjRfv895zdc85Hv27xVu9ErR1Utsi", "owner": { "__typename": "AddressOwner" } @@ -242,8 +242,8 @@ Response: { }, { "node": { - "address": "0x6139a8d91e9662934040407da8832dabd0f1b4e8ed9a79a6f0075fff7477e1f3", - "digest": "GhDHA88dPT3R5xk39dsQzDG6e9vY6qKAXWMPHf2UYkd", + "address": "0x4bf4927b5491f5611d4cb83ada18d95c1bf6cc73320a5aa10b521e74a62016d2", + "digest": "mVvbS2vkuQrnRW1FsBjXjpNSdR92fJiRXXyUNdnmb67", "owner": { "__typename": "AddressOwner" } @@ -251,8 +251,8 @@ Response: { }, { "node": { - "address": "0x7d569ebee60b485b12152a96d76cc7ed6ad521146ad4bd3fd62d12e4c2cae76b", - "digest": "DSKKyCHQYAnhZu7ysCeBopxiygaWqVkBSp9Yaxw41m5Y", + "address": "0x51e8ad8999fd29749b8afed87b965adbd781deb08b2f5325e4cf4e5528e17a7f", + "digest": "GgbrysrMW9XnKr2MvsxenrnShDgZ47J4adpwcnL23bdG", "owner": { "__typename": "AddressOwner" } @@ -260,8 +260,8 @@ Response: { }, { "node": { - "address": "0x7d8f283166a0438b0d26369b0ebdd3c877ed26e981520a4c4890332e59bbc6e6", - "digest": "Be8XWiL51TNAgKDW8e718nXutiMgXwXcG4BWF8PuSpFt", + "address": "0x6139a8d91e9662934040407da8832dabd0f1b4e8ed9a79a6f0075fff7477e1f3", + "digest": "BtL1usVLMKgswweuB6wv7bddgVb4pV1ASmNEEvgiPcB1", "owner": { "__typename": "AddressOwner" } @@ -269,8 +269,8 @@ Response: { }, { "node": { - "address": "0x847c914d647e7387d7cea4db5ad8fefeffe66773635804a991dfd4385fab6a97", - "digest": "DAkJ77dXLfY3spoK6DizU5NhG71yeY2uWraaPAGvMD6a", + "address": "0x7d569ebee60b485b12152a96d76cc7ed6ad521146ad4bd3fd62d12e4c2cae76b", + "digest": "P1Me6uRFcWqjHeNx41oAa4nVQYmYpYpwUk67vd8osjZ", "owner": { "__typename": "AddressOwner" } @@ -278,8 +278,8 @@ Response: { }, { "node": { - "address": "0xa79cc544021a721176cdc4497728ec35a5311b8ff0aa293a5d29c0d32cb56056", - "digest": "CPk79675WPpuPNTuKjLmg62h5VPHjPJEaMZTFEnSTGM4", + "address": "0x847c914d647e7387d7cea4db5ad8fefeffe66773635804a991dfd4385fab6a97", + "digest": "J5mrwkf2RT8qVNjyg9abkJMQWXZEu8PKphBAkPSG3REF", "owner": { "__typename": "AddressOwner" } @@ -287,8 +287,8 @@ Response: { }, { "node": { - "address": "0xac9c2e11aebecd35b4cb15802ca6ad5e64d320204149187ba646a16d07a4934d", - "digest": "HjR87s7ZD3KuyzYXVLzbTfiyH36d2k6u42Eqo11EpDVj", + "address": "0xa79cc544021a721176cdc4497728ec35a5311b8ff0aa293a5d29c0d32cb56056", + "digest": "DU399Yt1piD6iDhMYJ4kywMaorf3rTdW1zUsE7bsB7nX", "owner": { "__typename": "AddressOwner" } @@ -297,7 +297,7 @@ Response: { { "node": { "address": "0xb21c0b03871456040643740e238d03bde38de240d7b17055f4670777a19f07b8", - "digest": "CdvJ2E7KGkhKpx5XHQ38GGJCb2sRdXVeA4uX6djrgRNs", + "digest": "H6FaahQNYfKavippZbge7xHzox29vRPqAaCMuUWnYmCz", "owner": { "__typename": "AddressOwner" } @@ -355,19 +355,19 @@ task 22, line 178: //# run Test::M1::create --args 0 @A --gas-price 999 created: object(22,0) mutated: object(0,1) -gas summary: computation_cost: 999000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 999000, computation_cost_burned: 999000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 23, line 180: //# run Test::M1::create --args 0 @A --gas-price 1000 created: object(23,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 24, line 182: //# run Test::M1::create --args 0 @A --gas-price 235 created: object(24,0) mutated: object(0,1) -gas summary: computation_cost: 235000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 235000, computation_cost_burned: 235000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 25, lines 184-189: //# run-graphql @@ -375,7 +375,7 @@ Response: { "data": { "serviceConfig": { "availableVersions": [ - "0.6" + "0.7" ] } } diff --git a/crates/iota-graphql-e2e-tests/tests/consistency/balances.exp b/crates/iota-graphql-e2e-tests/tests/consistency/balances.exp index 7eebb1d0669..98f98b2c9c6 100644 --- a/crates/iota-graphql-e2e-tests/tests/consistency/balances.exp +++ b/crates/iota-graphql-e2e-tests/tests/consistency/balances.exp @@ -8,7 +8,7 @@ task 1, lines 20-47: created: object(1,0), object(1,1), object(1,2), object(1,3), object(1,4), object(1,5) mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 15663600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 15618000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 49: //# create-checkpoint @@ -20,7 +20,7 @@ task 3, lines 51-53: //> MergeCoins(Input(2), [Result(0)]); mutated: object(0,0), object(1,1), object(1,5) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 4012800, storage_rebate: 4012800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3990000, storage_rebate: 3990000, non_refundable_storage_fee: 0 task 4, line 55: //# create-checkpoint @@ -30,7 +30,7 @@ task 5, line 57: //# transfer-object 1,2 --sender A --recipient B mutated: object(0,0), object(1,2) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 2310400, storage_rebate: 2310400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2295200, storage_rebate: 2295200, non_refundable_storage_fee: 0 task 6, line 59: //# create-checkpoint @@ -40,7 +40,7 @@ task 7, line 61: //# transfer-object 1,3 --sender A --recipient B mutated: object(0,0), object(1,3) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 2310400, storage_rebate: 2310400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2295200, storage_rebate: 2295200, non_refundable_storage_fee: 0 task 9, line 65: //# create-checkpoint @@ -76,11 +76,11 @@ Response: { "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA" }, "coinObjectCount": 1, - "totalBalance": "299999982336400" + "totalBalance": "299999982382000" }, { "coinType": { - "repr": "0x3f54284798cf5d3ab1b9870653fa2e3d472375de6f47c9c35f2f2fb94b07898d::fake::FAKE" + "repr": "0xbdf6cc52e18ba611bf235bf856f16c4c30f609167401546f52e08ba168429473::fake::FAKE" }, "coinObjectCount": 3, "totalBalance": "700" @@ -103,7 +103,7 @@ Response: { { "sender": { "fakeCoinBalance": { - "totalBalance": "600" + "totalBalance": "500" }, "allBalances": { "nodes": [ @@ -112,14 +112,14 @@ Response: { "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA" }, "coinObjectCount": 1, - "totalBalance": "299999981336400" + "totalBalance": "299999981382000" }, { "coinType": { - "repr": "0x3f54284798cf5d3ab1b9870653fa2e3d472375de6f47c9c35f2f2fb94b07898d::fake::FAKE" + "repr": "0xbdf6cc52e18ba611bf235bf856f16c4c30f609167401546f52e08ba168429473::fake::FAKE" }, "coinObjectCount": 2, - "totalBalance": "600" + "totalBalance": "500" } ] } @@ -139,7 +139,7 @@ Response: { { "sender": { "fakeCoinBalance": { - "totalBalance": "400" + "totalBalance": "200" }, "allBalances": { "nodes": [ @@ -148,14 +148,14 @@ Response: { "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA" }, "coinObjectCount": 1, - "totalBalance": "299999980336400" + "totalBalance": "299999980382000" }, { "coinType": { - "repr": "0x3f54284798cf5d3ab1b9870653fa2e3d472375de6f47c9c35f2f2fb94b07898d::fake::FAKE" + "repr": "0xbdf6cc52e18ba611bf235bf856f16c4c30f609167401546f52e08ba168429473::fake::FAKE" }, "coinObjectCount": 1, - "totalBalance": "400" + "totalBalance": "200" } ] } @@ -192,11 +192,11 @@ Response: { "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA" }, "coinObjectCount": 1, - "totalBalance": "299999982336400" + "totalBalance": "299999982382000" }, { "coinType": { - "repr": "0x3f54284798cf5d3ab1b9870653fa2e3d472375de6f47c9c35f2f2fb94b07898d::fake::FAKE" + "repr": "0xbdf6cc52e18ba611bf235bf856f16c4c30f609167401546f52e08ba168429473::fake::FAKE" }, "coinObjectCount": 3, "totalBalance": "700" @@ -219,7 +219,7 @@ Response: { { "sender": { "fakeCoinBalance": { - "totalBalance": "600" + "totalBalance": "500" }, "allBalances": { "nodes": [ @@ -228,14 +228,14 @@ Response: { "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA" }, "coinObjectCount": 1, - "totalBalance": "299999981336400" + "totalBalance": "299999981382000" }, { "coinType": { - "repr": "0x3f54284798cf5d3ab1b9870653fa2e3d472375de6f47c9c35f2f2fb94b07898d::fake::FAKE" + "repr": "0xbdf6cc52e18ba611bf235bf856f16c4c30f609167401546f52e08ba168429473::fake::FAKE" }, "coinObjectCount": 2, - "totalBalance": "600" + "totalBalance": "500" } ] } @@ -255,7 +255,7 @@ Response: { { "sender": { "fakeCoinBalance": { - "totalBalance": "400" + "totalBalance": "200" }, "allBalances": { "nodes": [ @@ -264,14 +264,14 @@ Response: { "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA" }, "coinObjectCount": 1, - "totalBalance": "299999980336400" + "totalBalance": "299999980382000" }, { "coinType": { - "repr": "0x3f54284798cf5d3ab1b9870653fa2e3d472375de6f47c9c35f2f2fb94b07898d::fake::FAKE" + "repr": "0xbdf6cc52e18ba611bf235bf856f16c4c30f609167401546f52e08ba168429473::fake::FAKE" }, "coinObjectCount": 1, - "totalBalance": "400" + "totalBalance": "200" } ] } @@ -334,7 +334,7 @@ Response: { { "sender": { "fakeCoinBalance": { - "totalBalance": "600" + "totalBalance": "500" }, "allBalances": { "nodes": [ @@ -343,14 +343,14 @@ Response: { "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA" }, "coinObjectCount": 1, - "totalBalance": "299999981336400" + "totalBalance": "299999981382000" }, { "coinType": { - "repr": "0x3f54284798cf5d3ab1b9870653fa2e3d472375de6f47c9c35f2f2fb94b07898d::fake::FAKE" + "repr": "0xbdf6cc52e18ba611bf235bf856f16c4c30f609167401546f52e08ba168429473::fake::FAKE" }, "coinObjectCount": 2, - "totalBalance": "600" + "totalBalance": "500" } ] } @@ -370,7 +370,7 @@ Response: { { "sender": { "fakeCoinBalance": { - "totalBalance": "400" + "totalBalance": "200" }, "allBalances": { "nodes": [ @@ -379,14 +379,14 @@ Response: { "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA" }, "coinObjectCount": 1, - "totalBalance": "299999980336400" + "totalBalance": "299999980382000" }, { "coinType": { - "repr": "0x3f54284798cf5d3ab1b9870653fa2e3d472375de6f47c9c35f2f2fb94b07898d::fake::FAKE" + "repr": "0xbdf6cc52e18ba611bf235bf856f16c4c30f609167401546f52e08ba168429473::fake::FAKE" }, "coinObjectCount": 1, - "totalBalance": "400" + "totalBalance": "200" } ] } diff --git a/crates/iota-graphql-e2e-tests/tests/consistency/checkpoints/transaction_blocks.exp b/crates/iota-graphql-e2e-tests/tests/consistency/checkpoints/transaction_blocks.exp index ba7203c80a7..674bc426868 100644 --- a/crates/iota-graphql-e2e-tests/tests/consistency/checkpoints/transaction_blocks.exp +++ b/crates/iota-graphql-e2e-tests/tests/consistency/checkpoints/transaction_blocks.exp @@ -7,31 +7,31 @@ task 1, lines 14-27: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5175600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5168000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 29: //# run Test::M1::create --args 0 @A --sender A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 31: //# run Test::M1::create --args 0 @A --sender A created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 33: //# run Test::M1::create --args 0 @A --sender A created: object(4,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 35: //# run Test::M1::create --args 0 @A --sender A created: object(5,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, line 37: //# create-checkpoint @@ -41,19 +41,19 @@ task 7, line 39: //# run Test::M1::create --args 0 @A --sender A created: object(7,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, line 41: //# run Test::M1::create --args 0 @A --sender A created: object(8,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 9, line 43: //# run Test::M1::create --args 0 @A --sender A created: object(9,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 10, line 45: //# create-checkpoint @@ -63,13 +63,13 @@ task 11, line 47: //# run Test::M1::create --args 0 @A --sender A created: object(11,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 12, line 49: //# run Test::M1::create --args 0 @A --sender A created: object(12,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 13, line 51: //# create-checkpoint @@ -94,12 +94,12 @@ Response: { { "cursor": "eyJjIjozLCJ0IjoyLCJpIjpmYWxzZX0", "node": { - "digest": "wxTLj3hMZRjEpPVKZJ5zoM7Jjgnw3J9cCe4nHcG2WLh", + "digest": "ywf9ak8rV9kDDx73zGH5vtTJkHmfxXHvLbSGhwAyxdM", "sender": { "objects": { "edges": [ { - "cursor": "IPh2YV1gCbCl7szXeyKqwIL0jJlNuMDuCbQCmjbWpyECAwAAAAAAAAA=" + "cursor": "IOZ8ocIl02ZSSkdsdSrpt8BzDKmSCK2CZJpYvoPS+ilAAwAAAAAAAAA=" } ] } @@ -109,12 +109,12 @@ Response: { { "cursor": "eyJjIjozLCJ0IjozLCJpIjpmYWxzZX0", "node": { - "digest": "7e8AfYuDazeU11FQ6JDkKrKCLh1UVYHcwt2ni9Ed4z4", + "digest": "25MhkStEmB44afcLcmtdA426Qbo6a5z6sJrURSfn4wSM", "sender": { "objects": { "edges": [ { - "cursor": "IPh2YV1gCbCl7szXeyKqwIL0jJlNuMDuCbQCmjbWpyECAwAAAAAAAAA=" + "cursor": "IOZ8ocIl02ZSSkdsdSrpt8BzDKmSCK2CZJpYvoPS+ilAAwAAAAAAAAA=" } ] } @@ -124,12 +124,12 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo0LCJpIjpmYWxzZX0", "node": { - "digest": "3C8ABfrDA3LAzA4ad1upVTmBXctUdUhhzYK4aiUYTDV5", + "digest": "Hutiw6GLNGCuRwMTZhxFW2CrYF6PYt2DomNMwtN1hLUo", "sender": { "objects": { "edges": [ { - "cursor": "IPh2YV1gCbCl7szXeyKqwIL0jJlNuMDuCbQCmjbWpyECAwAAAAAAAAA=" + "cursor": "IOZ8ocIl02ZSSkdsdSrpt8BzDKmSCK2CZJpYvoPS+ilAAwAAAAAAAAA=" } ] } @@ -139,12 +139,12 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo1LCJpIjpmYWxzZX0", "node": { - "digest": "BuMGVrSu5PN4SXXhHEQrxo2aappDJ4xBdUbYfu9oNn4v", + "digest": "4YeKsZh5nDLNfbNVT2GRwenv1gvaVdDde9BASgiBqkv8", "sender": { "objects": { "edges": [ { - "cursor": "IPh2YV1gCbCl7szXeyKqwIL0jJlNuMDuCbQCmjbWpyECAwAAAAAAAAA=" + "cursor": "IOZ8ocIl02ZSSkdsdSrpt8BzDKmSCK2CZJpYvoPS+ilAAwAAAAAAAAA=" } ] } @@ -161,12 +161,12 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo2LCJpIjpmYWxzZX0", "node": { - "digest": "2dAUefr4VxY7187brTUcmS9xikyznS8QeEUHLqT4DVMX", + "digest": "EnghHbuhpcGuNpC1L2iqikieXAyHJUnanzg5urDmwgdz", "sender": { "objects": { "edges": [ { - "cursor": "IPh2YV1gCbCl7szXeyKqwIL0jJlNuMDuCbQCmjbWpyECAwAAAAAAAAA=" + "cursor": "IOZ8ocIl02ZSSkdsdSrpt8BzDKmSCK2CZJpYvoPS+ilAAwAAAAAAAAA=" } ] } @@ -176,12 +176,12 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo3LCJpIjpmYWxzZX0", "node": { - "digest": "EL7ZyLYMiCub9vgKhfkRNZwJg3hyZNKuV96n6CgWrBhC", + "digest": "9G4gNmS2XYetMxBty65fKfx9iDRBetdpdNZuyK7oRd6c", "sender": { "objects": { "edges": [ { - "cursor": "IPh2YV1gCbCl7szXeyKqwIL0jJlNuMDuCbQCmjbWpyECAwAAAAAAAAA=" + "cursor": "IOZ8ocIl02ZSSkdsdSrpt8BzDKmSCK2CZJpYvoPS+ilAAwAAAAAAAAA=" } ] } @@ -191,12 +191,12 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo4LCJpIjpmYWxzZX0", "node": { - "digest": "X1CR6JjkMWjrK69CPe1jpctSLLvYGj2MieSEBDc4E7T", + "digest": "3ivB1ebWRpc4Si1vd8tsSY7XwaY7DrumxdS3KdXyZLVr", "sender": { "objects": { "edges": [ { - "cursor": "IPh2YV1gCbCl7szXeyKqwIL0jJlNuMDuCbQCmjbWpyECAwAAAAAAAAA=" + "cursor": "IOZ8ocIl02ZSSkdsdSrpt8BzDKmSCK2CZJpYvoPS+ilAAwAAAAAAAAA=" } ] } @@ -213,12 +213,12 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo5LCJpIjpmYWxzZX0", "node": { - "digest": "ApZjBd234dQswhyN2c87hLx2cJEuJwUkpUTQ9PVQBARH", + "digest": "6i5QZFKJgWGMArwRBVmd124V2mWv4BaiVVuoBxxfe3Mu", "sender": { "objects": { "edges": [ { - "cursor": "IPh2YV1gCbCl7szXeyKqwIL0jJlNuMDuCbQCmjbWpyECAwAAAAAAAAA=" + "cursor": "IOZ8ocIl02ZSSkdsdSrpt8BzDKmSCK2CZJpYvoPS+ilAAwAAAAAAAAA=" } ] } @@ -228,12 +228,12 @@ Response: { { "cursor": "eyJjIjozLCJ0IjoxMCwiaSI6ZmFsc2V9", "node": { - "digest": "6shJHDNJez4jxm7E9wiaY8cyvrmfAkqg8A8ncg1uoLSt", + "digest": "ATX5C4Vryx6k3utG6b2ASv32hdXZ3dVkxVMHq8E6JbTE", "sender": { "objects": { "edges": [ { - "cursor": "IPh2YV1gCbCl7szXeyKqwIL0jJlNuMDuCbQCmjbWpyECAwAAAAAAAAA=" + "cursor": "IOZ8ocIl02ZSSkdsdSrpt8BzDKmSCK2CZJpYvoPS+ilAAwAAAAAAAAA=" } ] } diff --git a/crates/iota-graphql-e2e-tests/tests/consistency/coins.exp b/crates/iota-graphql-e2e-tests/tests/consistency/coins.exp index b7769824aae..f4477a71240 100644 --- a/crates/iota-graphql-e2e-tests/tests/consistency/coins.exp +++ b/crates/iota-graphql-e2e-tests/tests/consistency/coins.exp @@ -8,7 +8,7 @@ task 1, lines 13-40: created: object(1,0), object(1,1), object(1,2), object(1,3), object(1,4), object(1,5) mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 15663600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 15618000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 42: //# create-checkpoint @@ -20,7 +20,7 @@ task 3, lines 44-46: //> MergeCoins(Input(2), [Result(0)]); mutated: object(0,0), object(1,1), object(1,5) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 4012800, storage_rebate: 4012800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3990000, storage_rebate: 3990000, non_refundable_storage_fee: 0 task 4, line 48: //# create-checkpoint @@ -33,7 +33,7 @@ Response: { "queryCoinsAtLatest": { "edges": [ { - "cursor": "IDjQ36C6puZ1B4SHUJUrWY7yWkidwIcWyFbP8sHzQlTNAgAAAAAAAAA=", + "cursor": "IFZ/ZyCVFYjCf7cignHQQS2MNn/eq+6kji+rGr7Di8pEAgAAAAAAAAA=", "node": { "consistentStateForEachCoin": { "owner": { @@ -41,39 +41,39 @@ Response: { "coins": { "edges": [ { - "cursor": "IDjQ36C6puZ1B4SHUJUrWY7yWkidwIcWyFbP8sHzQlTNAgAAAAAAAAA=", + "cursor": "IFZ/ZyCVFYjCf7cignHQQS2MNn/eq+6kji+rGr7Di8pEAgAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x38d0dfa0baa6e67507848750952b598ef25a489dc08716c856cff2c1f34254cd", + "id": "0x567f6720951588c27fb7228271d0412d8c367fdeabeea48e2fab1abec38bca44", "balance": { - "value": "100300" + "value": "100100" } } } } }, { - "cursor": "IJEQ573lUbdmn1lKjpymVr60ljpjbr9kntd1sQFaTfWCAgAAAAAAAAA=", + "cursor": "IJ3CINFJKYLv+Em6UHIRANMjkBe7f+s1nKjlNzVkxaJsAgAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x9110e7bde551b7669f594a8e9ca656beb4963a636ebf649ed775b1015a4df582", + "id": "0x9dc220d1492982eff849ba50721100d3239017bb7feb359ca8e5373564c5a26c", "balance": { - "value": "100" + "value": "200" } } } } }, { - "cursor": "IPMA39gqFqTL+UJ31xLzg/Kdfb0q7TwZXnGKtNmtGgm5AgAAAAAAAAA=", + "cursor": "INqo/pVaj/aZbQ0uWk9SX8bQdKsDqH22Yewchi34U2E0AgAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0xf300dfd82a16a4cbf94277d712f383f29d7dbd2aed3c195e718ab4d9ad1a09b9", + "id": "0xdaa8fe955a8ff6996d0d2e5a4f525fc6d074ab03a87db661ec1c862df8536134", "balance": { - "value": "200" + "value": "300" } } } @@ -85,16 +85,16 @@ Response: { }, "contents": { "json": { - "id": "0x38d0dfa0baa6e67507848750952b598ef25a489dc08716c856cff2c1f34254cd", + "id": "0x567f6720951588c27fb7228271d0412d8c367fdeabeea48e2fab1abec38bca44", "balance": { - "value": "100300" + "value": "100100" } } } } }, { - "cursor": "IJEQ573lUbdmn1lKjpymVr60ljpjbr9kntd1sQFaTfWCAgAAAAAAAAA=", + "cursor": "IJ3CINFJKYLv+Em6UHIRANMjkBe7f+s1nKjlNzVkxaJsAgAAAAAAAAA=", "node": { "consistentStateForEachCoin": { "owner": { @@ -102,39 +102,39 @@ Response: { "coins": { "edges": [ { - "cursor": "IDjQ36C6puZ1B4SHUJUrWY7yWkidwIcWyFbP8sHzQlTNAgAAAAAAAAA=", + "cursor": "IFZ/ZyCVFYjCf7cignHQQS2MNn/eq+6kji+rGr7Di8pEAgAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x38d0dfa0baa6e67507848750952b598ef25a489dc08716c856cff2c1f34254cd", + "id": "0x567f6720951588c27fb7228271d0412d8c367fdeabeea48e2fab1abec38bca44", "balance": { - "value": "100300" + "value": "100100" } } } } }, { - "cursor": "IJEQ573lUbdmn1lKjpymVr60ljpjbr9kntd1sQFaTfWCAgAAAAAAAAA=", + "cursor": "IJ3CINFJKYLv+Em6UHIRANMjkBe7f+s1nKjlNzVkxaJsAgAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x9110e7bde551b7669f594a8e9ca656beb4963a636ebf649ed775b1015a4df582", + "id": "0x9dc220d1492982eff849ba50721100d3239017bb7feb359ca8e5373564c5a26c", "balance": { - "value": "100" + "value": "200" } } } } }, { - "cursor": "IPMA39gqFqTL+UJ31xLzg/Kdfb0q7TwZXnGKtNmtGgm5AgAAAAAAAAA=", + "cursor": "INqo/pVaj/aZbQ0uWk9SX8bQdKsDqH22Yewchi34U2E0AgAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0xf300dfd82a16a4cbf94277d712f383f29d7dbd2aed3c195e718ab4d9ad1a09b9", + "id": "0xdaa8fe955a8ff6996d0d2e5a4f525fc6d074ab03a87db661ec1c862df8536134", "balance": { - "value": "200" + "value": "300" } } } @@ -146,16 +146,16 @@ Response: { }, "contents": { "json": { - "id": "0x9110e7bde551b7669f594a8e9ca656beb4963a636ebf649ed775b1015a4df582", + "id": "0x9dc220d1492982eff849ba50721100d3239017bb7feb359ca8e5373564c5a26c", "balance": { - "value": "100" + "value": "200" } } } } }, { - "cursor": "IPMA39gqFqTL+UJ31xLzg/Kdfb0q7TwZXnGKtNmtGgm5AgAAAAAAAAA=", + "cursor": "INqo/pVaj/aZbQ0uWk9SX8bQdKsDqH22Yewchi34U2E0AgAAAAAAAAA=", "node": { "consistentStateForEachCoin": { "owner": { @@ -163,39 +163,39 @@ Response: { "coins": { "edges": [ { - "cursor": "IDjQ36C6puZ1B4SHUJUrWY7yWkidwIcWyFbP8sHzQlTNAgAAAAAAAAA=", + "cursor": "IFZ/ZyCVFYjCf7cignHQQS2MNn/eq+6kji+rGr7Di8pEAgAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x38d0dfa0baa6e67507848750952b598ef25a489dc08716c856cff2c1f34254cd", + "id": "0x567f6720951588c27fb7228271d0412d8c367fdeabeea48e2fab1abec38bca44", "balance": { - "value": "100300" + "value": "100100" } } } } }, { - "cursor": "IJEQ573lUbdmn1lKjpymVr60ljpjbr9kntd1sQFaTfWCAgAAAAAAAAA=", + "cursor": "IJ3CINFJKYLv+Em6UHIRANMjkBe7f+s1nKjlNzVkxaJsAgAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x9110e7bde551b7669f594a8e9ca656beb4963a636ebf649ed775b1015a4df582", + "id": "0x9dc220d1492982eff849ba50721100d3239017bb7feb359ca8e5373564c5a26c", "balance": { - "value": "100" + "value": "200" } } } } }, { - "cursor": "IPMA39gqFqTL+UJ31xLzg/Kdfb0q7TwZXnGKtNmtGgm5AgAAAAAAAAA=", + "cursor": "INqo/pVaj/aZbQ0uWk9SX8bQdKsDqH22Yewchi34U2E0AgAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0xf300dfd82a16a4cbf94277d712f383f29d7dbd2aed3c195e718ab4d9ad1a09b9", + "id": "0xdaa8fe955a8ff6996d0d2e5a4f525fc6d074ab03a87db661ec1c862df8536134", "balance": { - "value": "200" + "value": "300" } } } @@ -207,9 +207,9 @@ Response: { }, "contents": { "json": { - "id": "0xf300dfd82a16a4cbf94277d712f383f29d7dbd2aed3c195e718ab4d9ad1a09b9", + "id": "0xdaa8fe955a8ff6996d0d2e5a4f525fc6d074ab03a87db661ec1c862df8536134", "balance": { - "value": "200" + "value": "300" } } } @@ -221,39 +221,39 @@ Response: { "coins": { "edges": [ { - "cursor": "IDjQ36C6puZ1B4SHUJUrWY7yWkidwIcWyFbP8sHzQlTNAgAAAAAAAAA=", + "cursor": "IFZ/ZyCVFYjCf7cignHQQS2MNn/eq+6kji+rGr7Di8pEAgAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x38d0dfa0baa6e67507848750952b598ef25a489dc08716c856cff2c1f34254cd", + "id": "0x567f6720951588c27fb7228271d0412d8c367fdeabeea48e2fab1abec38bca44", "balance": { - "value": "100300" + "value": "100100" } } } } }, { - "cursor": "IJEQ573lUbdmn1lKjpymVr60ljpjbr9kntd1sQFaTfWCAgAAAAAAAAA=", + "cursor": "IJ3CINFJKYLv+Em6UHIRANMjkBe7f+s1nKjlNzVkxaJsAgAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x9110e7bde551b7669f594a8e9ca656beb4963a636ebf649ed775b1015a4df582", + "id": "0x9dc220d1492982eff849ba50721100d3239017bb7feb359ca8e5373564c5a26c", "balance": { - "value": "100" + "value": "200" } } } } }, { - "cursor": "IPMA39gqFqTL+UJ31xLzg/Kdfb0q7TwZXnGKtNmtGgm5AgAAAAAAAAA=", + "cursor": "INqo/pVaj/aZbQ0uWk9SX8bQdKsDqH22Yewchi34U2E0AgAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0xf300dfd82a16a4cbf94277d712f383f29d7dbd2aed3c195e718ab4d9ad1a09b9", + "id": "0xdaa8fe955a8ff6996d0d2e5a4f525fc6d074ab03a87db661ec1c862df8536134", "balance": { - "value": "200" + "value": "300" } } } @@ -272,7 +272,7 @@ Response: { "queryCoinsAtChkpt1": { "edges": [ { - "cursor": "IDjQ36C6puZ1B4SHUJUrWY7yWkidwIcWyFbP8sHzQlTNAQAAAAAAAAA=", + "cursor": "IFZ/ZyCVFYjCf7cignHQQS2MNn/eq+6kji+rGr7Di8pEAQAAAAAAAAA=", "node": { "consistentStateForEachCoin": { "owner": { @@ -280,39 +280,39 @@ Response: { "coins": { "edges": [ { - "cursor": "IDjQ36C6puZ1B4SHUJUrWY7yWkidwIcWyFbP8sHzQlTNAQAAAAAAAAA=", + "cursor": "IFZ/ZyCVFYjCf7cignHQQS2MNn/eq+6kji+rGr7Di8pEAQAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x38d0dfa0baa6e67507848750952b598ef25a489dc08716c856cff2c1f34254cd", + "id": "0x567f6720951588c27fb7228271d0412d8c367fdeabeea48e2fab1abec38bca44", "balance": { - "value": "300" + "value": "100" } } } } }, { - "cursor": "IJEQ573lUbdmn1lKjpymVr60ljpjbr9kntd1sQFaTfWCAQAAAAAAAAA=", + "cursor": "IJ3CINFJKYLv+Em6UHIRANMjkBe7f+s1nKjlNzVkxaJsAQAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x9110e7bde551b7669f594a8e9ca656beb4963a636ebf649ed775b1015a4df582", + "id": "0x9dc220d1492982eff849ba50721100d3239017bb7feb359ca8e5373564c5a26c", "balance": { - "value": "100" + "value": "200" } } } } }, { - "cursor": "IPMA39gqFqTL+UJ31xLzg/Kdfb0q7TwZXnGKtNmtGgm5AQAAAAAAAAA=", + "cursor": "INqo/pVaj/aZbQ0uWk9SX8bQdKsDqH22Yewchi34U2E0AQAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0xf300dfd82a16a4cbf94277d712f383f29d7dbd2aed3c195e718ab4d9ad1a09b9", + "id": "0xdaa8fe955a8ff6996d0d2e5a4f525fc6d074ab03a87db661ec1c862df8536134", "balance": { - "value": "200" + "value": "300" } } } @@ -324,16 +324,16 @@ Response: { }, "contents": { "json": { - "id": "0x38d0dfa0baa6e67507848750952b598ef25a489dc08716c856cff2c1f34254cd", + "id": "0x567f6720951588c27fb7228271d0412d8c367fdeabeea48e2fab1abec38bca44", "balance": { - "value": "300" + "value": "100" } } } } }, { - "cursor": "IJEQ573lUbdmn1lKjpymVr60ljpjbr9kntd1sQFaTfWCAQAAAAAAAAA=", + "cursor": "IJ3CINFJKYLv+Em6UHIRANMjkBe7f+s1nKjlNzVkxaJsAQAAAAAAAAA=", "node": { "consistentStateForEachCoin": { "owner": { @@ -341,39 +341,39 @@ Response: { "coins": { "edges": [ { - "cursor": "IDjQ36C6puZ1B4SHUJUrWY7yWkidwIcWyFbP8sHzQlTNAQAAAAAAAAA=", + "cursor": "IFZ/ZyCVFYjCf7cignHQQS2MNn/eq+6kji+rGr7Di8pEAQAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x38d0dfa0baa6e67507848750952b598ef25a489dc08716c856cff2c1f34254cd", + "id": "0x567f6720951588c27fb7228271d0412d8c367fdeabeea48e2fab1abec38bca44", "balance": { - "value": "300" + "value": "100" } } } } }, { - "cursor": "IJEQ573lUbdmn1lKjpymVr60ljpjbr9kntd1sQFaTfWCAQAAAAAAAAA=", + "cursor": "IJ3CINFJKYLv+Em6UHIRANMjkBe7f+s1nKjlNzVkxaJsAQAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x9110e7bde551b7669f594a8e9ca656beb4963a636ebf649ed775b1015a4df582", + "id": "0x9dc220d1492982eff849ba50721100d3239017bb7feb359ca8e5373564c5a26c", "balance": { - "value": "100" + "value": "200" } } } } }, { - "cursor": "IPMA39gqFqTL+UJ31xLzg/Kdfb0q7TwZXnGKtNmtGgm5AQAAAAAAAAA=", + "cursor": "INqo/pVaj/aZbQ0uWk9SX8bQdKsDqH22Yewchi34U2E0AQAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0xf300dfd82a16a4cbf94277d712f383f29d7dbd2aed3c195e718ab4d9ad1a09b9", + "id": "0xdaa8fe955a8ff6996d0d2e5a4f525fc6d074ab03a87db661ec1c862df8536134", "balance": { - "value": "200" + "value": "300" } } } @@ -385,9 +385,9 @@ Response: { }, "contents": { "json": { - "id": "0x9110e7bde551b7669f594a8e9ca656beb4963a636ebf649ed775b1015a4df582", + "id": "0x9dc220d1492982eff849ba50721100d3239017bb7feb359ca8e5373564c5a26c", "balance": { - "value": "100" + "value": "200" } } } @@ -399,26 +399,26 @@ Response: { "coins": { "edges": [ { - "cursor": "IDjQ36C6puZ1B4SHUJUrWY7yWkidwIcWyFbP8sHzQlTNAQAAAAAAAAA=", + "cursor": "IFZ/ZyCVFYjCf7cignHQQS2MNn/eq+6kji+rGr7Di8pEAQAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x38d0dfa0baa6e67507848750952b598ef25a489dc08716c856cff2c1f34254cd", + "id": "0x567f6720951588c27fb7228271d0412d8c367fdeabeea48e2fab1abec38bca44", "balance": { - "value": "300" + "value": "100" } } } } }, { - "cursor": "IJEQ573lUbdmn1lKjpymVr60ljpjbr9kntd1sQFaTfWCAQAAAAAAAAA=", + "cursor": "IJ3CINFJKYLv+Em6UHIRANMjkBe7f+s1nKjlNzVkxaJsAQAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x9110e7bde551b7669f594a8e9ca656beb4963a636ebf649ed775b1015a4df582", + "id": "0x9dc220d1492982eff849ba50721100d3239017bb7feb359ca8e5373564c5a26c", "balance": { - "value": "100" + "value": "200" } } } @@ -434,13 +434,13 @@ task 7, line 136: //# transfer-object 1,2 --sender A --recipient B mutated: object(0,0), object(1,2) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 2310400, storage_rebate: 2310400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2295200, storage_rebate: 2295200, non_refundable_storage_fee: 0 task 8, line 138: //# transfer-object 1,3 --sender A --recipient B mutated: object(0,0), object(1,3) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 2310400, storage_rebate: 2310400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2295200, storage_rebate: 2295200, non_refundable_storage_fee: 0 task 9, line 140: //# create-checkpoint @@ -453,7 +453,7 @@ Response: { "queryCoins": { "edges": [ { - "cursor": "IDjQ36C6puZ1B4SHUJUrWY7yWkidwIcWyFbP8sHzQlTNAwAAAAAAAAA=", + "cursor": "IFZ/ZyCVFYjCf7cignHQQS2MNn/eq+6kji+rGr7Di8pEAwAAAAAAAAA=", "node": { "owner": { "owner": { @@ -461,13 +461,13 @@ Response: { "coins": { "edges": [ { - "cursor": "IDjQ36C6puZ1B4SHUJUrWY7yWkidwIcWyFbP8sHzQlTNAwAAAAAAAAA=", + "cursor": "IFZ/ZyCVFYjCf7cignHQQS2MNn/eq+6kji+rGr7Di8pEAwAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x38d0dfa0baa6e67507848750952b598ef25a489dc08716c856cff2c1f34254cd", + "id": "0x567f6720951588c27fb7228271d0412d8c367fdeabeea48e2fab1abec38bca44", "balance": { - "value": "100300" + "value": "100100" } } } @@ -479,16 +479,16 @@ Response: { }, "contents": { "json": { - "id": "0x38d0dfa0baa6e67507848750952b598ef25a489dc08716c856cff2c1f34254cd", + "id": "0x567f6720951588c27fb7228271d0412d8c367fdeabeea48e2fab1abec38bca44", "balance": { - "value": "100300" + "value": "100100" } } } } }, { - "cursor": "IJEQ573lUbdmn1lKjpymVr60ljpjbr9kntd1sQFaTfWCAwAAAAAAAAA=", + "cursor": "IJ3CINFJKYLv+Em6UHIRANMjkBe7f+s1nKjlNzVkxaJsAwAAAAAAAAA=", "node": { "owner": { "owner": { @@ -496,26 +496,26 @@ Response: { "coins": { "edges": [ { - "cursor": "IJEQ573lUbdmn1lKjpymVr60ljpjbr9kntd1sQFaTfWCAwAAAAAAAAA=", + "cursor": "IJ3CINFJKYLv+Em6UHIRANMjkBe7f+s1nKjlNzVkxaJsAwAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x9110e7bde551b7669f594a8e9ca656beb4963a636ebf649ed775b1015a4df582", + "id": "0x9dc220d1492982eff849ba50721100d3239017bb7feb359ca8e5373564c5a26c", "balance": { - "value": "100" + "value": "200" } } } } }, { - "cursor": "IPMA39gqFqTL+UJ31xLzg/Kdfb0q7TwZXnGKtNmtGgm5AwAAAAAAAAA=", + "cursor": "INqo/pVaj/aZbQ0uWk9SX8bQdKsDqH22Yewchi34U2E0AwAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0xf300dfd82a16a4cbf94277d712f383f29d7dbd2aed3c195e718ab4d9ad1a09b9", + "id": "0xdaa8fe955a8ff6996d0d2e5a4f525fc6d074ab03a87db661ec1c862df8536134", "balance": { - "value": "200" + "value": "300" } } } @@ -527,16 +527,16 @@ Response: { }, "contents": { "json": { - "id": "0x9110e7bde551b7669f594a8e9ca656beb4963a636ebf649ed775b1015a4df582", + "id": "0x9dc220d1492982eff849ba50721100d3239017bb7feb359ca8e5373564c5a26c", "balance": { - "value": "100" + "value": "200" } } } } }, { - "cursor": "IPMA39gqFqTL+UJ31xLzg/Kdfb0q7TwZXnGKtNmtGgm5AwAAAAAAAAA=", + "cursor": "INqo/pVaj/aZbQ0uWk9SX8bQdKsDqH22Yewchi34U2E0AwAAAAAAAAA=", "node": { "owner": { "owner": { @@ -544,26 +544,26 @@ Response: { "coins": { "edges": [ { - "cursor": "IJEQ573lUbdmn1lKjpymVr60ljpjbr9kntd1sQFaTfWCAwAAAAAAAAA=", + "cursor": "IJ3CINFJKYLv+Em6UHIRANMjkBe7f+s1nKjlNzVkxaJsAwAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x9110e7bde551b7669f594a8e9ca656beb4963a636ebf649ed775b1015a4df582", + "id": "0x9dc220d1492982eff849ba50721100d3239017bb7feb359ca8e5373564c5a26c", "balance": { - "value": "100" + "value": "200" } } } } }, { - "cursor": "IPMA39gqFqTL+UJ31xLzg/Kdfb0q7TwZXnGKtNmtGgm5AwAAAAAAAAA=", + "cursor": "INqo/pVaj/aZbQ0uWk9SX8bQdKsDqH22Yewchi34U2E0AwAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0xf300dfd82a16a4cbf94277d712f383f29d7dbd2aed3c195e718ab4d9ad1a09b9", + "id": "0xdaa8fe955a8ff6996d0d2e5a4f525fc6d074ab03a87db661ec1c862df8536134", "balance": { - "value": "200" + "value": "300" } } } @@ -575,9 +575,9 @@ Response: { }, "contents": { "json": { - "id": "0xf300dfd82a16a4cbf94277d712f383f29d7dbd2aed3c195e718ab4d9ad1a09b9", + "id": "0xdaa8fe955a8ff6996d0d2e5a4f525fc6d074ab03a87db661ec1c862df8536134", "balance": { - "value": "200" + "value": "300" } } } @@ -589,13 +589,13 @@ Response: { "coins": { "edges": [ { - "cursor": "IDjQ36C6puZ1B4SHUJUrWY7yWkidwIcWyFbP8sHzQlTNAwAAAAAAAAA=", + "cursor": "IFZ/ZyCVFYjCf7cignHQQS2MNn/eq+6kji+rGr7Di8pEAwAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x38d0dfa0baa6e67507848750952b598ef25a489dc08716c856cff2c1f34254cd", + "id": "0x567f6720951588c27fb7228271d0412d8c367fdeabeea48e2fab1abec38bca44", "balance": { - "value": "100300" + "value": "100100" } } } @@ -608,26 +608,26 @@ Response: { "coins": { "edges": [ { - "cursor": "IJEQ573lUbdmn1lKjpymVr60ljpjbr9kntd1sQFaTfWCAwAAAAAAAAA=", + "cursor": "IJ3CINFJKYLv+Em6UHIRANMjkBe7f+s1nKjlNzVkxaJsAwAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x9110e7bde551b7669f594a8e9ca656beb4963a636ebf649ed775b1015a4df582", + "id": "0x9dc220d1492982eff849ba50721100d3239017bb7feb359ca8e5373564c5a26c", "balance": { - "value": "100" + "value": "200" } } } } }, { - "cursor": "IPMA39gqFqTL+UJ31xLzg/Kdfb0q7TwZXnGKtNmtGgm5AwAAAAAAAAA=", + "cursor": "INqo/pVaj/aZbQ0uWk9SX8bQdKsDqH22Yewchi34U2E0AwAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0xf300dfd82a16a4cbf94277d712f383f29d7dbd2aed3c195e718ab4d9ad1a09b9", + "id": "0xdaa8fe955a8ff6996d0d2e5a4f525fc6d074ab03a87db661ec1c862df8536134", "balance": { - "value": "200" + "value": "300" } } } @@ -658,7 +658,7 @@ Response: { "queryCoinsAtChkpt1BeforeSnapshotCatchup": { "edges": [ { - "cursor": "IDjQ36C6puZ1B4SHUJUrWY7yWkidwIcWyFbP8sHzQlTNAQAAAAAAAAA=", + "cursor": "IFZ/ZyCVFYjCf7cignHQQS2MNn/eq+6kji+rGr7Di8pEAQAAAAAAAAA=", "node": { "consistentStateForEachCoin": { "owner": { @@ -666,39 +666,39 @@ Response: { "coins": { "edges": [ { - "cursor": "IDjQ36C6puZ1B4SHUJUrWY7yWkidwIcWyFbP8sHzQlTNAQAAAAAAAAA=", + "cursor": "IFZ/ZyCVFYjCf7cignHQQS2MNn/eq+6kji+rGr7Di8pEAQAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x38d0dfa0baa6e67507848750952b598ef25a489dc08716c856cff2c1f34254cd", + "id": "0x567f6720951588c27fb7228271d0412d8c367fdeabeea48e2fab1abec38bca44", "balance": { - "value": "300" + "value": "100" } } } } }, { - "cursor": "IJEQ573lUbdmn1lKjpymVr60ljpjbr9kntd1sQFaTfWCAQAAAAAAAAA=", + "cursor": "IJ3CINFJKYLv+Em6UHIRANMjkBe7f+s1nKjlNzVkxaJsAQAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x9110e7bde551b7669f594a8e9ca656beb4963a636ebf649ed775b1015a4df582", + "id": "0x9dc220d1492982eff849ba50721100d3239017bb7feb359ca8e5373564c5a26c", "balance": { - "value": "100" + "value": "200" } } } } }, { - "cursor": "IPMA39gqFqTL+UJ31xLzg/Kdfb0q7TwZXnGKtNmtGgm5AQAAAAAAAAA=", + "cursor": "INqo/pVaj/aZbQ0uWk9SX8bQdKsDqH22Yewchi34U2E0AQAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0xf300dfd82a16a4cbf94277d712f383f29d7dbd2aed3c195e718ab4d9ad1a09b9", + "id": "0xdaa8fe955a8ff6996d0d2e5a4f525fc6d074ab03a87db661ec1c862df8536134", "balance": { - "value": "200" + "value": "300" } } } @@ -710,16 +710,16 @@ Response: { }, "contents": { "json": { - "id": "0x38d0dfa0baa6e67507848750952b598ef25a489dc08716c856cff2c1f34254cd", + "id": "0x567f6720951588c27fb7228271d0412d8c367fdeabeea48e2fab1abec38bca44", "balance": { - "value": "300" + "value": "100" } } } } }, { - "cursor": "IJEQ573lUbdmn1lKjpymVr60ljpjbr9kntd1sQFaTfWCAQAAAAAAAAA=", + "cursor": "IJ3CINFJKYLv+Em6UHIRANMjkBe7f+s1nKjlNzVkxaJsAQAAAAAAAAA=", "node": { "consistentStateForEachCoin": { "owner": { @@ -727,39 +727,39 @@ Response: { "coins": { "edges": [ { - "cursor": "IDjQ36C6puZ1B4SHUJUrWY7yWkidwIcWyFbP8sHzQlTNAQAAAAAAAAA=", + "cursor": "IFZ/ZyCVFYjCf7cignHQQS2MNn/eq+6kji+rGr7Di8pEAQAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x38d0dfa0baa6e67507848750952b598ef25a489dc08716c856cff2c1f34254cd", + "id": "0x567f6720951588c27fb7228271d0412d8c367fdeabeea48e2fab1abec38bca44", "balance": { - "value": "300" + "value": "100" } } } } }, { - "cursor": "IJEQ573lUbdmn1lKjpymVr60ljpjbr9kntd1sQFaTfWCAQAAAAAAAAA=", + "cursor": "IJ3CINFJKYLv+Em6UHIRANMjkBe7f+s1nKjlNzVkxaJsAQAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x9110e7bde551b7669f594a8e9ca656beb4963a636ebf649ed775b1015a4df582", + "id": "0x9dc220d1492982eff849ba50721100d3239017bb7feb359ca8e5373564c5a26c", "balance": { - "value": "100" + "value": "200" } } } } }, { - "cursor": "IPMA39gqFqTL+UJ31xLzg/Kdfb0q7TwZXnGKtNmtGgm5AQAAAAAAAAA=", + "cursor": "INqo/pVaj/aZbQ0uWk9SX8bQdKsDqH22Yewchi34U2E0AQAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0xf300dfd82a16a4cbf94277d712f383f29d7dbd2aed3c195e718ab4d9ad1a09b9", + "id": "0xdaa8fe955a8ff6996d0d2e5a4f525fc6d074ab03a87db661ec1c862df8536134", "balance": { - "value": "200" + "value": "300" } } } @@ -771,9 +771,9 @@ Response: { }, "contents": { "json": { - "id": "0x9110e7bde551b7669f594a8e9ca656beb4963a636ebf649ed775b1015a4df582", + "id": "0x9dc220d1492982eff849ba50721100d3239017bb7feb359ca8e5373564c5a26c", "balance": { - "value": "100" + "value": "200" } } } @@ -785,26 +785,26 @@ Response: { "coins": { "edges": [ { - "cursor": "IDjQ36C6puZ1B4SHUJUrWY7yWkidwIcWyFbP8sHzQlTNAQAAAAAAAAA=", + "cursor": "IFZ/ZyCVFYjCf7cignHQQS2MNn/eq+6kji+rGr7Di8pEAQAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x38d0dfa0baa6e67507848750952b598ef25a489dc08716c856cff2c1f34254cd", + "id": "0x567f6720951588c27fb7228271d0412d8c367fdeabeea48e2fab1abec38bca44", "balance": { - "value": "300" + "value": "100" } } } } }, { - "cursor": "IJEQ573lUbdmn1lKjpymVr60ljpjbr9kntd1sQFaTfWCAQAAAAAAAAA=", + "cursor": "IJ3CINFJKYLv+Em6UHIRANMjkBe7f+s1nKjlNzVkxaJsAQAAAAAAAAA=", "node": { "contents": { "json": { - "id": "0x9110e7bde551b7669f594a8e9ca656beb4963a636ebf649ed775b1015a4df582", + "id": "0x9dc220d1492982eff849ba50721100d3239017bb7feb359ca8e5373564c5a26c", "balance": { - "value": "100" + "value": "200" } } } diff --git a/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/deleted_df.exp b/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/deleted_df.exp index a116a38da5f..7797f60515a 100644 --- a/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/deleted_df.exp +++ b/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/deleted_df.exp @@ -7,13 +7,13 @@ task 1, lines 15-56: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 8474000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8466400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 58: //# run Test::M1::parent --sender A --args @A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 60: //# view-object 2,0 @@ -32,7 +32,7 @@ task 4, line 62: //# run Test::M1::add_df --sender A --args object(2,0) created: object(4,0), object(4,1), object(4,2) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 8664000, storage_rebate: 2302800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8626000, storage_rebate: 2287600, non_refundable_storage_fee: 0 task 5, line 64: //# view-object 2,0 @@ -51,7 +51,7 @@ task 6, line 66: //# run Test::M1::add_more_df --sender A --args object(2,0) created: object(6,0), object(6,1), object(6,2) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 8664000, storage_rebate: 2302800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8626000, storage_rebate: 2287600, non_refundable_storage_fee: 0 task 7, line 68: //# view-object 2,0 @@ -70,12 +70,12 @@ task 8, line 70: //# run Test::M1::remove_df --sender A --args object(2,0) mutated: object(0,0), object(2,0) deleted: object(4,0), object(4,1), object(4,2) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 8664000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 8626000, non_refundable_storage_fee: 0 task 9, line 72: //# run Test::M1::mutate_parent --sender A --args object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 2302800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 2287600, non_refundable_storage_fee: 0 task 10, line 74: //# create-checkpoint @@ -90,35 +90,35 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IFXp0toJPQnGGaLNJw8q9AOzrfMA5uj74CFO+/wJTpu3AQAAAAAAAAA=", + "cursor": "IDlNUKtDqd9vWwIVLOcN6o7pIjYlCnVi16y5TbsLXWPyAQAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNg==" + "bcs": "A2RmNA==" }, "value": { - "json": "df6" + "json": "df4" } } }, { - "cursor": "IKBYUnW+4SX9mmDsJQRWPNTXcQ4kdSHybiAlFZfwL8TnAQAAAAAAAAA=", + "cursor": "IJ+efA+QWUV9kAUqmpMdM3i4HNzB+PLztem56WantRmIAQAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNA==" + "bcs": "A2RmNQ==" }, "value": { - "json": "df4" + "json": "df5" } } }, { - "cursor": "IOqUkACX2xgr+MMQlj38s9DkThuNt5E/+sDxB8sMR3/GAQAAAAAAAAA=", + "cursor": "INReOXMS6qJ8gt1WilNgHeSOMmhr2RmX7DmC5kEEwJW8AQAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNQ==" + "bcs": "A2RmNg==" }, "value": { - "json": "df5" + "json": "df6" } } } @@ -139,35 +139,35 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IFXp0toJPQnGGaLNJw8q9AOzrfMA5uj74CFO+/wJTpu3AQAAAAAAAAA=", + "cursor": "IDlNUKtDqd9vWwIVLOcN6o7pIjYlCnVi16y5TbsLXWPyAQAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNg==" + "bcs": "A2RmNA==" }, "value": { - "json": "df6" + "json": "df4" } } }, { - "cursor": "IKBYUnW+4SX9mmDsJQRWPNTXcQ4kdSHybiAlFZfwL8TnAQAAAAAAAAA=", + "cursor": "IJ+efA+QWUV9kAUqmpMdM3i4HNzB+PLztem56WantRmIAQAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNA==" + "bcs": "A2RmNQ==" }, "value": { - "json": "df4" + "json": "df5" } } }, { - "cursor": "IOqUkACX2xgr+MMQlj38s9DkThuNt5E/+sDxB8sMR3/GAQAAAAAAAAA=", + "cursor": "INReOXMS6qJ8gt1WilNgHeSOMmhr2RmX7DmC5kEEwJW8AQAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNQ==" + "bcs": "A2RmNg==" }, "value": { - "json": "df5" + "json": "df6" } } } @@ -188,29 +188,29 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IDGmVJDizvjXRhC95XulcNJW5YoeG8E1ztMXSz7IOQppAQAAAAAAAAA=", + "cursor": "IDlNUKtDqd9vWwIVLOcN6o7pIjYlCnVi16y5TbsLXWPyAQAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmMQ==" + "bcs": "A2RmNA==" }, "value": { - "json": "df1" + "json": "df4" } } }, { - "cursor": "IFXp0toJPQnGGaLNJw8q9AOzrfMA5uj74CFO+/wJTpu3AQAAAAAAAAA=", + "cursor": "IJOw9qCrVkGI8COYq8tW/sbkKDI7w1ag9Pu3bm8smSxgAQAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNg==" + "bcs": "A2RmMg==" }, "value": { - "json": "df6" + "json": "df2" } } }, { - "cursor": "IF5cUmfqQBRDIr1G/6EhgrzF+2DvHKsiwngVG5+UDsvqAQAAAAAAAAA=", + "cursor": "IJR01eHq28HFpZPEQAEIn11wvGH3QhEIUdKBy/U4+HTTAQAAAAAAAAA=", "node": { "name": { "bcs": "A2RmMw==" @@ -221,35 +221,35 @@ Response: { } }, { - "cursor": "IIj0VwR2uHpoaelmO7X1LPSWECPV/MTw9+CPiI7wmwcCAQAAAAAAAAA=", + "cursor": "IJ+efA+QWUV9kAUqmpMdM3i4HNzB+PLztem56WantRmIAQAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmMg==" + "bcs": "A2RmNQ==" }, "value": { - "json": "df2" + "json": "df5" } } }, { - "cursor": "IKBYUnW+4SX9mmDsJQRWPNTXcQ4kdSHybiAlFZfwL8TnAQAAAAAAAAA=", + "cursor": "INReOXMS6qJ8gt1WilNgHeSOMmhr2RmX7DmC5kEEwJW8AQAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNA==" + "bcs": "A2RmNg==" }, "value": { - "json": "df4" + "json": "df6" } } }, { - "cursor": "IOqUkACX2xgr+MMQlj38s9DkThuNt5E/+sDxB8sMR3/GAQAAAAAAAAA=", + "cursor": "IPAzcJ3N3Kd+REjvmwJLLDHNOedOaN/m/SpGEatoJZlnAQAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNQ==" + "bcs": "A2RmMQ==" }, "value": { - "json": "df5" + "json": "df1" } } } @@ -283,35 +283,35 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IFXp0toJPQnGGaLNJw8q9AOzrfMA5uj74CFO+/wJTpu3AQAAAAAAAAA=", + "cursor": "IDlNUKtDqd9vWwIVLOcN6o7pIjYlCnVi16y5TbsLXWPyAQAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNg==" + "bcs": "A2RmNA==" }, "value": { - "json": "df6" + "json": "df4" } } }, { - "cursor": "IKBYUnW+4SX9mmDsJQRWPNTXcQ4kdSHybiAlFZfwL8TnAQAAAAAAAAA=", + "cursor": "IJ+efA+QWUV9kAUqmpMdM3i4HNzB+PLztem56WantRmIAQAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNA==" + "bcs": "A2RmNQ==" }, "value": { - "json": "df4" + "json": "df5" } } }, { - "cursor": "IOqUkACX2xgr+MMQlj38s9DkThuNt5E/+sDxB8sMR3/GAQAAAAAAAAA=", + "cursor": "INReOXMS6qJ8gt1WilNgHeSOMmhr2RmX7DmC5kEEwJW8AQAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNQ==" + "bcs": "A2RmNg==" }, "value": { - "json": "df5" + "json": "df6" } } } diff --git a/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/deleted_dof.exp b/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/deleted_dof.exp index b5a2dab3ed0..64fbcfc0f80 100644 --- a/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/deleted_dof.exp +++ b/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/deleted_dof.exp @@ -7,7 +7,7 @@ task 1, lines 15-59: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 7949600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7942000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 61-63: //# programmable --sender A --inputs @A @@ -15,18 +15,18 @@ task 2, lines 61-63: //> 1: Test::M1::parent(Input(0)); created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3610000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3587200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 65: //# run Test::M1::add_child --sender A --args object(2,1) object(2,0) 42 created: object(3,0) mutated: object(0,0), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 6064800, storage_rebate: 3610000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6034400, storage_rebate: 3587200, non_refundable_storage_fee: 0 task 4, line 67: //# run Test::M1::mutate_parent --sender A --args object(2,1) mutated: object(0,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 2302800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 2287600, non_refundable_storage_fee: 0 task 5, line 69: //# create-checkpoint @@ -41,7 +41,7 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IOERhra2/zXIe5A/6khWFsqqPFNBObUR+BisJ98CR/x8AQAAAAAAAAA=", + "cursor": "IClB4T7AHWEOVWKrXS5TxSolCdMgz1kvtKBpJwRFEQ4OAQAAAAAAAAA=", "node": { "name": { "bcs": "KgAAAAAAAAA=" @@ -49,7 +49,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xfcfcd9e754874b4a13160f9212003ef6cdb129240cb3c9caab88cb0b451a8365", + "id": "0x253884793f1f9a266382615636a3407f3e624c02d0a41627cdf04ec9a9a8e26e", "count": "0" } } @@ -65,7 +65,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xfcfcd9e754874b4a13160f9212003ef6cdb129240cb3c9caab88cb0b451a8365", + "id": "0x253884793f1f9a266382615636a3407f3e624c02d0a41627cdf04ec9a9a8e26e", "count": "0" } } @@ -77,7 +77,7 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IOERhra2/zXIe5A/6khWFsqqPFNBObUR+BisJ98CR/x8AQAAAAAAAAA=", + "cursor": "IClB4T7AHWEOVWKrXS5TxSolCdMgz1kvtKBpJwRFEQ4OAQAAAAAAAAA=", "node": { "name": { "bcs": "KgAAAAAAAAA=" @@ -85,7 +85,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xfcfcd9e754874b4a13160f9212003ef6cdb129240cb3c9caab88cb0b451a8365", + "id": "0x253884793f1f9a266382615636a3407f3e624c02d0a41627cdf04ec9a9a8e26e", "count": "0" } } @@ -101,7 +101,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xfcfcd9e754874b4a13160f9212003ef6cdb129240cb3c9caab88cb0b451a8365", + "id": "0x253884793f1f9a266382615636a3407f3e624c02d0a41627cdf04ec9a9a8e26e", "count": "0" } } @@ -117,7 +117,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xfcfcd9e754874b4a13160f9212003ef6cdb129240cb3c9caab88cb0b451a8365", + "id": "0x253884793f1f9a266382615636a3407f3e624c02d0a41627cdf04ec9a9a8e26e", "count": "0" } } @@ -135,7 +135,7 @@ task 7, line 130: //# run Test::M1::delete_child --sender A --args object(2,1) 42 mutated: object(0,0), object(2,1) deleted: object(2,0), object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 6064800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 6034400, non_refundable_storage_fee: 0 task 8, line 132: //# create-checkpoint @@ -168,7 +168,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xfcfcd9e754874b4a13160f9212003ef6cdb129240cb3c9caab88cb0b451a8365", + "id": "0x253884793f1f9a266382615636a3407f3e624c02d0a41627cdf04ec9a9a8e26e", "count": "0" } } @@ -181,7 +181,7 @@ Response: { task 10, line 187: //# run Test::M1::mutate_parent --sender A --args object(2,1) mutated: object(0,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 2302800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 2287600, non_refundable_storage_fee: 0 task 11, line 189: //# create-checkpoint @@ -222,7 +222,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xfcfcd9e754874b4a13160f9212003ef6cdb129240cb3c9caab88cb0b451a8365", + "id": "0x253884793f1f9a266382615636a3407f3e624c02d0a41627cdf04ec9a9a8e26e", "count": "0" } } diff --git a/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/dof_add_reclaim_transfer.exp b/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/dof_add_reclaim_transfer.exp index 0057d75c528..404738532fc 100644 --- a/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/dof_add_reclaim_transfer.exp +++ b/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/dof_add_reclaim_transfer.exp @@ -7,7 +7,7 @@ task 1, lines 20-59: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 7600000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7592400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 61-63: //# programmable --sender A --inputs @A @@ -15,13 +15,13 @@ task 2, lines 61-63: //> 1: Test::M1::parent(Input(0)); created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3610000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3587200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 65: //# run Test::M1::add_child --sender A --args object(2,1) object(2,0) 42 created: object(3,0) mutated: object(0,0), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 6064800, storage_rebate: 3610000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6034400, storage_rebate: 3587200, non_refundable_storage_fee: 0 task 4, line 67: //# create-checkpoint @@ -36,7 +36,7 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IDHJ2XJEaoo1eOHTEGzA8q8bVNbAgQEtZ+lYBFpSlyy9AQAAAAAAAAA=", + "cursor": "IK1Tx9SLMlBMaGqVyH107e/Uq5o56RGyC5wdCvulOCUYAQAAAAAAAAA=", "node": { "name": { "bcs": "KgAAAAAAAAA=" @@ -44,7 +44,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xfc2487387a017581549657695ae91d736bd9edee829449a5abb4682e38fd9c27", + "id": "0xcff88bb86f25644cf26a3943b3d5ea96fdda9a5c65c49bb80443da8137504e73", "count": "0" } } @@ -60,7 +60,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xfc2487387a017581549657695ae91d736bd9edee829449a5abb4682e38fd9c27", + "id": "0xcff88bb86f25644cf26a3943b3d5ea96fdda9a5c65c49bb80443da8137504e73", "count": "0" } } @@ -71,7 +71,7 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IDHJ2XJEaoo1eOHTEGzA8q8bVNbAgQEtZ+lYBFpSlyy9AQAAAAAAAAA=", + "cursor": "IK1Tx9SLMlBMaGqVyH107e/Uq5o56RGyC5wdCvulOCUYAQAAAAAAAAA=", "node": { "name": { "bcs": "KgAAAAAAAAA=" @@ -79,7 +79,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xfc2487387a017581549657695ae91d736bd9edee829449a5abb4682e38fd9c27", + "id": "0xcff88bb86f25644cf26a3943b3d5ea96fdda9a5c65c49bb80443da8137504e73", "count": "0" } } @@ -95,7 +95,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xfc2487387a017581549657695ae91d736bd9edee829449a5abb4682e38fd9c27", + "id": "0xcff88bb86f25644cf26a3943b3d5ea96fdda9a5c65c49bb80443da8137504e73", "count": "0" } } @@ -107,7 +107,7 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IDHJ2XJEaoo1eOHTEGzA8q8bVNbAgQEtZ+lYBFpSlyy9AQAAAAAAAAA=", + "cursor": "IK1Tx9SLMlBMaGqVyH107e/Uq5o56RGyC5wdCvulOCUYAQAAAAAAAAA=", "node": { "name": { "bcs": "KgAAAAAAAAA=" @@ -115,7 +115,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xfc2487387a017581549657695ae91d736bd9edee829449a5abb4682e38fd9c27", + "id": "0xcff88bb86f25644cf26a3943b3d5ea96fdda9a5c65c49bb80443da8137504e73", "count": "0" } } @@ -131,7 +131,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xfc2487387a017581549657695ae91d736bd9edee829449a5abb4682e38fd9c27", + "id": "0xcff88bb86f25644cf26a3943b3d5ea96fdda9a5c65c49bb80443da8137504e73", "count": "0" } } @@ -152,7 +152,7 @@ task 6, line 133: //# run Test::M1::reclaim_and_transfer_child --sender A --args object(2,1) 42 @A mutated: object(0,0), object(2,0), object(2,1) deleted: object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 3610000, storage_rebate: 6064800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3587200, storage_rebate: 6034400, non_refundable_storage_fee: 0 task 7, line 135: //# create-checkpoint @@ -184,7 +184,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xfc2487387a017581549657695ae91d736bd9edee829449a5abb4682e38fd9c27", + "id": "0xcff88bb86f25644cf26a3943b3d5ea96fdda9a5c65c49bb80443da8137504e73", "count": "0" } } diff --git a/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/dof_add_reclaim_transfer_reclaim_add.exp b/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/dof_add_reclaim_transfer_reclaim_add.exp index 5da22330b2d..a941516ec37 100644 --- a/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/dof_add_reclaim_transfer_reclaim_add.exp +++ b/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/dof_add_reclaim_transfer_reclaim_add.exp @@ -7,7 +7,7 @@ task 1, lines 19-58: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 7600000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7592400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 60-63: //# programmable --sender A --inputs @A @@ -16,37 +16,37 @@ task 2, lines 60-63: //> 2: Test::M1::parent(Input(0)); created: object(2,0), object(2,1), object(2,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4924800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4894400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 65: //# run Test::M1::add_child --sender A --args object(2,1) object(2,0) 42 created: object(3,0) mutated: object(0,0), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 6064800, storage_rebate: 3610000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6034400, storage_rebate: 3587200, non_refundable_storage_fee: 0 task 4, line 67: //# run Test::M1::reclaim_and_transfer_child --sender A --args object(2,1) 42 @A mutated: object(0,0), object(2,0), object(2,1) deleted: object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 3610000, storage_rebate: 6064800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3587200, storage_rebate: 6034400, non_refundable_storage_fee: 0 task 5, line 69: //# run Test::M1::add_child --sender A --args object(2,2) object(2,0) 42 created: object(5,0) mutated: object(0,0), object(2,0), object(2,2) -gas summary: computation_cost: 1000000, storage_cost: 6064800, storage_rebate: 3610000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6034400, storage_rebate: 3587200, non_refundable_storage_fee: 0 task 6, line 71: //# run Test::M1::reclaim_and_transfer_child --sender A --args object(2,2) 42 @A mutated: object(0,0), object(2,0), object(2,2) deleted: object(5,0) -gas summary: computation_cost: 1000000, storage_cost: 3610000, storage_rebate: 6064800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3587200, storage_rebate: 6034400, non_refundable_storage_fee: 0 task 7, line 73: //# run Test::M1::add_child --sender A --args object(2,1) object(2,0) 42 created: object(3,0) mutated: object(0,0), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 6064800, storage_rebate: 3610000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6034400, storage_rebate: 3587200, non_refundable_storage_fee: 0 task 8, line 75: //# create-checkpoint @@ -61,7 +61,7 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "ILBIga0IpmiDvcWkhxv5ZB2gmRBuKZxYlvu2jFz2I0azAQAAAAAAAAA=", + "cursor": "IBgLCA95qc1evvZsIBNXsfk2tH1khevoO737VjBjaRq1AQAAAAAAAAA=", "node": { "name": { "bcs": "KgAAAAAAAAA=" @@ -69,7 +69,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xbdd9664d849bba78c8ba1525d1b88293eb53935df49876c07d6a85f4f64d2973", + "id": "0xc656ed2c790f5f9e2a5bab26c47613796636b6b54956fe9c92a6d6a191a277e9", "count": "0" } } @@ -85,7 +85,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xbdd9664d849bba78c8ba1525d1b88293eb53935df49876c07d6a85f4f64d2973", + "id": "0xc656ed2c790f5f9e2a5bab26c47613796636b6b54956fe9c92a6d6a191a277e9", "count": "0" } } @@ -96,7 +96,7 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "ILBIga0IpmiDvcWkhxv5ZB2gmRBuKZxYlvu2jFz2I0azAQAAAAAAAAA=", + "cursor": "IBgLCA95qc1evvZsIBNXsfk2tH1khevoO737VjBjaRq1AQAAAAAAAAA=", "node": { "name": { "bcs": "KgAAAAAAAAA=" @@ -104,7 +104,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xbdd9664d849bba78c8ba1525d1b88293eb53935df49876c07d6a85f4f64d2973", + "id": "0xc656ed2c790f5f9e2a5bab26c47613796636b6b54956fe9c92a6d6a191a277e9", "count": "0" } } @@ -120,7 +120,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xbdd9664d849bba78c8ba1525d1b88293eb53935df49876c07d6a85f4f64d2973", + "id": "0xc656ed2c790f5f9e2a5bab26c47613796636b6b54956fe9c92a6d6a191a277e9", "count": "0" } } @@ -139,7 +139,7 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "ILBIga0IpmiDvcWkhxv5ZB2gmRBuKZxYlvu2jFz2I0azAQAAAAAAAAA=", + "cursor": "IBgLCA95qc1evvZsIBNXsfk2tH1khevoO737VjBjaRq1AQAAAAAAAAA=", "node": { "name": { "bcs": "KgAAAAAAAAA=" @@ -147,7 +147,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xbdd9664d849bba78c8ba1525d1b88293eb53935df49876c07d6a85f4f64d2973", + "id": "0xc656ed2c790f5f9e2a5bab26c47613796636b6b54956fe9c92a6d6a191a277e9", "count": "0" } } @@ -163,7 +163,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xbdd9664d849bba78c8ba1525d1b88293eb53935df49876c07d6a85f4f64d2973", + "id": "0xc656ed2c790f5f9e2a5bab26c47613796636b6b54956fe9c92a6d6a191a277e9", "count": "0" } } @@ -182,7 +182,7 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "ILBIga0IpmiDvcWkhxv5ZB2gmRBuKZxYlvu2jFz2I0azAQAAAAAAAAA=", + "cursor": "IBgLCA95qc1evvZsIBNXsfk2tH1khevoO737VjBjaRq1AQAAAAAAAAA=", "node": { "name": { "bcs": "KgAAAAAAAAA=" @@ -190,7 +190,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xbdd9664d849bba78c8ba1525d1b88293eb53935df49876c07d6a85f4f64d2973", + "id": "0xc656ed2c790f5f9e2a5bab26c47613796636b6b54956fe9c92a6d6a191a277e9", "count": "0" } } @@ -206,7 +206,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xbdd9664d849bba78c8ba1525d1b88293eb53935df49876c07d6a85f4f64d2973", + "id": "0xc656ed2c790f5f9e2a5bab26c47613796636b6b54956fe9c92a6d6a191a277e9", "count": "0" } } diff --git a/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/dynamic_fields.exp b/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/dynamic_fields.exp index 9cada526cd8..f553d2641e1 100644 --- a/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/dynamic_fields.exp +++ b/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/dynamic_fields.exp @@ -7,7 +7,7 @@ task 1, lines 13-83: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 11012400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 11004800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 85-87: //# programmable --sender A --inputs @A 42 @@ -15,7 +15,7 @@ task 2, lines 85-87: //> 1: Test::M1::child(Input(0)); created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3549200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3526400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 89: //# view-object 2,1 @@ -48,7 +48,7 @@ task 5, lines 93-95: //> Test::M1::mutate_child_via_parent(Input(0), Input(2)); created: object(5,0) mutated: object(0,0), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 6004000, storage_rebate: 3549200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5973600, storage_rebate: 3526400, non_refundable_storage_fee: 0 task 6, line 97: //# view-object 2,1 @@ -84,7 +84,7 @@ task 9, lines 103-165: Response: { "data": { "parent_version_2_no_dof": { - "address": "0xbb1b0042886b909f32918bcf3c5808c52ad12a1f6366811351a608cc9e19117a", + "address": "0x76e8be7a8a2c5e59b18ae4123b6c400a060e54acac33ebaef35c6359008a39b7", "dynamicFields": { "edges": [] } @@ -93,7 +93,7 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IGSmPF9YquQ5+ERmpbG5I9pdmQ6uh8GTTBq7NnrzeKeKAQAAAAAAAAA=", + "cursor": "IMltckgisEII5yOBiLuvjsH2EULYkwu6lEaHTZDlMMLrAQAAAAAAAAA=", "node": { "name": { "bcs": "pAEAAAAAAAA=", @@ -104,7 +104,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xa5bbc9a923c6eb9e623d5704740e8230c7aca4840c451cfcb5ccc262ce3b9296", + "id": "0xd9e0a11bb56f6fa383c493fd8aa805417f09e50daf84af662f71b46effdc4c76", "count": "1" } } @@ -115,13 +115,13 @@ Response: { } }, "child_version_2_no_parent": { - "address": "0xa5bbc9a923c6eb9e623d5704740e8230c7aca4840c451cfcb5ccc262ce3b9296", + "address": "0xd9e0a11bb56f6fa383c493fd8aa805417f09e50daf84af662f71b46effdc4c76", "owner": {} }, "child_version_3_has_parent": { "owner": { "parent": { - "address": "0x64a63c5f58aae439f84466a5b1b923da5d990eae87c1934c1abb367af378a78a" + "address": "0xc96d724822b04208e7238188bbaf8ec1f61142d8930bba9446874d90e530c2eb" } } } @@ -134,7 +134,7 @@ task 10, lines 167-169: //> Test::M1::add_df(Input(0)); created: object(10,0), object(10,1), object(10,2) mutated: object(0,0), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 9910400, storage_rebate: 3549200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9864800, storage_rebate: 3526400, non_refundable_storage_fee: 0 task 11, line 171: //# view-object 2,1 @@ -173,7 +173,7 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "ICDA1Fmbie2DfuNwxZhhIpAHJWRNYLZK0UM0Bj8jbFTQAgAAAAAAAAA=", + "cursor": "IBHqo8yUZkJxCchyKB6tSCkMBIp3j3HtyLiOI5qQ3YCFAgAAAAAAAAA=", "node": { "name": { "bcs": "A2RmMg==", @@ -187,21 +187,21 @@ Response: { } }, { - "cursor": "IEHkQrbw02WrVj10wpfWCfYIYW9qdVkPdz/4bKbdrsurAgAAAAAAAAA=", + "cursor": "ICtSJBD2mvBMSbYw7lALjwqJIu1qj71gDeP4G0ZF2IdPAgAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmMw==", + "bcs": "A2RmMQ==", "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "json": "df3" + "json": "df1" } } }, { - "cursor": "IGSmPF9YquQ5+ERmpbG5I9pdmQ6uh8GTTBq7NnrzeKeKAgAAAAAAAAA=", + "cursor": "IMltckgisEII5yOBiLuvjsH2EULYkwu6lEaHTZDlMMLrAgAAAAAAAAA=", "node": { "name": { "bcs": "pAEAAAAAAAA=", @@ -212,7 +212,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xa5bbc9a923c6eb9e623d5704740e8230c7aca4840c451cfcb5ccc262ce3b9296", + "id": "0xd9e0a11bb56f6fa383c493fd8aa805417f09e50daf84af662f71b46effdc4c76", "count": "2" } } @@ -220,16 +220,16 @@ Response: { } }, { - "cursor": "IGVjKMErtbW4KB6/b/s/qbAgtGu6fHOQXO7ujUxoq7RXAgAAAAAAAAA=", + "cursor": "IP0sJsB7Ip8J9WsIbqXbgDAcIeih8L+/hTYxca+GYwLFAgAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmMQ==", + "bcs": "A2RmMw==", "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "json": "df1" + "json": "df3" } } } @@ -240,7 +240,7 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IGSmPF9YquQ5+ERmpbG5I9pdmQ6uh8GTTBq7NnrzeKeKAgAAAAAAAAA=", + "cursor": "IMltckgisEII5yOBiLuvjsH2EULYkwu6lEaHTZDlMMLrAgAAAAAAAAA=", "node": { "name": { "bcs": "pAEAAAAAAAA=", @@ -251,7 +251,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xa5bbc9a923c6eb9e623d5704740e8230c7aca4840c451cfcb5ccc262ce3b9296", + "id": "0xd9e0a11bb56f6fa383c493fd8aa805417f09e50daf84af662f71b46effdc4c76", "count": "1" } } @@ -270,16 +270,16 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IGVjKMErtbW4KB6/b/s/qbAgtGu6fHOQXO7ujUxoq7RXAgAAAAAAAAA=", + "cursor": "IP0sJsB7Ip8J9WsIbqXbgDAcIeih8L+/hTYxca+GYwLFAgAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmMQ==", + "bcs": "A2RmMw==", "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "json": "df1" + "json": "df3" } } } @@ -314,7 +314,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xa5bbc9a923c6eb9e623d5704740e8230c7aca4840c451cfcb5ccc262ce3b9296", + "id": "0xd9e0a11bb56f6fa383c493fd8aa805417f09e50daf84af662f71b46effdc4c76", "count": "1" } } @@ -333,7 +333,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xa5bbc9a923c6eb9e623d5704740e8230c7aca4840c451cfcb5ccc262ce3b9296", + "id": "0xd9e0a11bb56f6fa383c493fd8aa805417f09e50daf84af662f71b46effdc4c76", "count": "2" } } @@ -359,7 +359,7 @@ task 16, lines 279-280: //> Test::M1::add_more_df(Input(0)); created: object(16,0), object(16,1), object(16,2) mutated: object(0,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 8603200, storage_rebate: 2242000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8565200, storage_rebate: 2226800, non_refundable_storage_fee: 0 task 17, line 282: //# view-object 2,1 @@ -398,7 +398,7 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "ICDA1Fmbie2DfuNwxZhhIpAHJWRNYLZK0UM0Bj8jbFTQAwAAAAAAAAA=", + "cursor": "IBHqo8yUZkJxCchyKB6tSCkMBIp3j3HtyLiOI5qQ3YCFAwAAAAAAAAA=", "node": { "name": { "bcs": "A2RmMg==", @@ -412,21 +412,21 @@ Response: { } }, { - "cursor": "IEHkQrbw02WrVj10wpfWCfYIYW9qdVkPdz/4bKbdrsurAwAAAAAAAAA=", + "cursor": "ICtSJBD2mvBMSbYw7lALjwqJIu1qj71gDeP4G0ZF2IdPAwAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmMw==", + "bcs": "A2RmMQ==", "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "json": "df3" + "json": "df1" } } }, { - "cursor": "IGSmPF9YquQ5+ERmpbG5I9pdmQ6uh8GTTBq7NnrzeKeKAwAAAAAAAAA=", + "cursor": "IMltckgisEII5yOBiLuvjsH2EULYkwu6lEaHTZDlMMLrAwAAAAAAAAA=", "node": { "name": { "bcs": "pAEAAAAAAAA=", @@ -437,7 +437,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xa5bbc9a923c6eb9e623d5704740e8230c7aca4840c451cfcb5ccc262ce3b9296", + "id": "0xd9e0a11bb56f6fa383c493fd8aa805417f09e50daf84af662f71b46effdc4c76", "count": "2" } } @@ -445,16 +445,16 @@ Response: { } }, { - "cursor": "IGVjKMErtbW4KB6/b/s/qbAgtGu6fHOQXO7ujUxoq7RXAwAAAAAAAAA=", + "cursor": "IP0sJsB7Ip8J9WsIbqXbgDAcIeih8L+/hTYxca+GYwLFAwAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmMQ==", + "bcs": "A2RmMw==", "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "json": "df1" + "json": "df3" } } } @@ -465,16 +465,16 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IGVjKMErtbW4KB6/b/s/qbAgtGu6fHOQXO7ujUxoq7RXAgAAAAAAAAA=", + "cursor": "IP0sJsB7Ip8J9WsIbqXbgDAcIeih8L+/hTYxca+GYwLFAgAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmMQ==", + "bcs": "A2RmMw==", "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "json": "df1" + "json": "df3" } } } @@ -485,7 +485,7 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "ICDA1Fmbie2DfuNwxZhhIpAHJWRNYLZK0UM0Bj8jbFTQAwAAAAAAAAA=", + "cursor": "IBHqo8yUZkJxCchyKB6tSCkMBIp3j3HtyLiOI5qQ3YCFAwAAAAAAAAA=", "node": { "name": { "bcs": "A2RmMg==", @@ -499,91 +499,91 @@ Response: { } }, { - "cursor": "ID49jorfR8MvOfB4vjP+b/u/TuyAifufWgyqincFH/1iAwAAAAAAAAA=", + "cursor": "ICtSJBD2mvBMSbYw7lALjwqJIu1qj71gDeP4G0ZF2IdPAwAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNA==", + "bcs": "A2RmMQ==", "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "json": "df4" + "json": "df1" } } }, { - "cursor": "IEHkQrbw02WrVj10wpfWCfYIYW9qdVkPdz/4bKbdrsurAwAAAAAAAAA=", + "cursor": "IE+66B4qhmJHvgLRXCzBkJcKtIq9/3t9zYS98b6bMLhDAwAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmMw==", + "bcs": "A2RmNg==", "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "json": "df3" + "json": "df6" } } }, { - "cursor": "IGSmPF9YquQ5+ERmpbG5I9pdmQ6uh8GTTBq7NnrzeKeKAwAAAAAAAAA=", + "cursor": "IFqQu0yJoDJda7AeIZmvhIW3x34EsmfTInmLo9ZXTVExAwAAAAAAAAA=", "node": { "name": { - "bcs": "pAEAAAAAAAA=", + "bcs": "A2RmNQ==", "type": { - "repr": "u64" + "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "contents": { - "json": { - "id": "0xa5bbc9a923c6eb9e623d5704740e8230c7aca4840c451cfcb5ccc262ce3b9296", - "count": "2" - } - } + "json": "df5" } } }, { - "cursor": "IGVjKMErtbW4KB6/b/s/qbAgtGu6fHOQXO7ujUxoq7RXAwAAAAAAAAA=", + "cursor": "IMltckgisEII5yOBiLuvjsH2EULYkwu6lEaHTZDlMMLrAwAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmMQ==", + "bcs": "pAEAAAAAAAA=", "type": { - "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" + "repr": "u64" } }, "value": { - "json": "df1" + "contents": { + "json": { + "id": "0xd9e0a11bb56f6fa383c493fd8aa805417f09e50daf84af662f71b46effdc4c76", + "count": "2" + } + } } } }, { - "cursor": "IG0bat303iRg5RFov83HFmsTnKXFePTtc2ZJ/XHPPDaRAwAAAAAAAAA=", + "cursor": "INLCyu+uz92dAqQqrMubrTVBken7AGvouhvfBABDIiOuAwAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNQ==", + "bcs": "A2RmNA==", "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "json": "df5" + "json": "df4" } } }, { - "cursor": "IPVw7dlIopC9wDfopKptMlcIEwEuKX0vCllb5Wq8z3wIAwAAAAAAAAA=", + "cursor": "IP0sJsB7Ip8J9WsIbqXbgDAcIeih8L+/hTYxca+GYwLFAwAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNg==", + "bcs": "A2RmMw==", "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "json": "df6" + "json": "df3" } } } @@ -594,44 +594,30 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IGVjKMErtbW4KB6/b/s/qbAgtGu6fHOQXO7ujUxoq7RXAwAAAAAAAAA=", - "node": { - "name": { - "bcs": "A2RmMQ==", - "type": { - "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" - } - }, - "value": { - "json": "df1" - } - } - }, - { - "cursor": "IG0bat303iRg5RFov83HFmsTnKXFePTtc2ZJ/XHPPDaRAwAAAAAAAAA=", + "cursor": "INLCyu+uz92dAqQqrMubrTVBken7AGvouhvfBABDIiOuAwAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNQ==", + "bcs": "A2RmNA==", "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "json": "df5" + "json": "df4" } } }, { - "cursor": "IPVw7dlIopC9wDfopKptMlcIEwEuKX0vCllb5Wq8z3wIAwAAAAAAAAA=", + "cursor": "IP0sJsB7Ip8J9WsIbqXbgDAcIeih8L+/hTYxca+GYwLFAwAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNg==", + "bcs": "A2RmMw==", "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "json": "df6" + "json": "df3" } } } @@ -646,7 +632,7 @@ task 21, lines 340-341: //> Test::M1::remove_df(Input(0)); mutated: object(0,0), object(2,1) deleted: object(10,0), object(10,1), object(10,2) -gas summary: computation_cost: 1000000, storage_cost: 2242000, storage_rebate: 8603200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2226800, storage_rebate: 8565200, non_refundable_storage_fee: 0 task 22, line 343: //# view-object 2,1 @@ -685,7 +671,7 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "ICDA1Fmbie2DfuNwxZhhIpAHJWRNYLZK0UM0Bj8jbFTQBAAAAAAAAAA=", + "cursor": "IBHqo8yUZkJxCchyKB6tSCkMBIp3j3HtyLiOI5qQ3YCFBAAAAAAAAAA=", "node": { "name": { "bcs": "A2RmMg==", @@ -699,21 +685,21 @@ Response: { } }, { - "cursor": "IEHkQrbw02WrVj10wpfWCfYIYW9qdVkPdz/4bKbdrsurBAAAAAAAAAA=", + "cursor": "ICtSJBD2mvBMSbYw7lALjwqJIu1qj71gDeP4G0ZF2IdPBAAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmMw==", + "bcs": "A2RmMQ==", "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "json": "df3" + "json": "df1" } } }, { - "cursor": "IGSmPF9YquQ5+ERmpbG5I9pdmQ6uh8GTTBq7NnrzeKeKBAAAAAAAAAA=", + "cursor": "IMltckgisEII5yOBiLuvjsH2EULYkwu6lEaHTZDlMMLrBAAAAAAAAAA=", "node": { "name": { "bcs": "pAEAAAAAAAA=", @@ -724,7 +710,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xa5bbc9a923c6eb9e623d5704740e8230c7aca4840c451cfcb5ccc262ce3b9296", + "id": "0xd9e0a11bb56f6fa383c493fd8aa805417f09e50daf84af662f71b46effdc4c76", "count": "2" } } @@ -732,16 +718,16 @@ Response: { } }, { - "cursor": "IGVjKMErtbW4KB6/b/s/qbAgtGu6fHOQXO7ujUxoq7RXBAAAAAAAAAA=", + "cursor": "IP0sJsB7Ip8J9WsIbqXbgDAcIeih8L+/hTYxca+GYwLFBAAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmMQ==", + "bcs": "A2RmMw==", "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "json": "df1" + "json": "df3" } } } @@ -752,16 +738,16 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IGVjKMErtbW4KB6/b/s/qbAgtGu6fHOQXO7ujUxoq7RXAgAAAAAAAAA=", + "cursor": "IP0sJsB7Ip8J9WsIbqXbgDAcIeih8L+/hTYxca+GYwLFAgAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmMQ==", + "bcs": "A2RmMw==", "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "json": "df1" + "json": "df3" } } } @@ -772,63 +758,63 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "ID49jorfR8MvOfB4vjP+b/u/TuyAifufWgyqincFH/1iBAAAAAAAAAA=", + "cursor": "IE+66B4qhmJHvgLRXCzBkJcKtIq9/3t9zYS98b6bMLhDBAAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNA==", + "bcs": "A2RmNg==", "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "json": "df4" + "json": "df6" } } }, { - "cursor": "IGSmPF9YquQ5+ERmpbG5I9pdmQ6uh8GTTBq7NnrzeKeKBAAAAAAAAAA=", + "cursor": "IFqQu0yJoDJda7AeIZmvhIW3x34EsmfTInmLo9ZXTVExBAAAAAAAAAA=", "node": { "name": { - "bcs": "pAEAAAAAAAA=", + "bcs": "A2RmNQ==", "type": { - "repr": "u64" + "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "contents": { - "json": { - "id": "0xa5bbc9a923c6eb9e623d5704740e8230c7aca4840c451cfcb5ccc262ce3b9296", - "count": "2" - } - } + "json": "df5" } } }, { - "cursor": "IG0bat303iRg5RFov83HFmsTnKXFePTtc2ZJ/XHPPDaRBAAAAAAAAAA=", + "cursor": "IMltckgisEII5yOBiLuvjsH2EULYkwu6lEaHTZDlMMLrBAAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNQ==", + "bcs": "pAEAAAAAAAA=", "type": { - "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" + "repr": "u64" } }, "value": { - "json": "df5" + "contents": { + "json": { + "id": "0xd9e0a11bb56f6fa383c493fd8aa805417f09e50daf84af662f71b46effdc4c76", + "count": "2" + } + } } } }, { - "cursor": "IPVw7dlIopC9wDfopKptMlcIEwEuKX0vCllb5Wq8z3wIBAAAAAAAAAA=", + "cursor": "INLCyu+uz92dAqQqrMubrTVBken7AGvouhvfBABDIiOuBAAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNg==", + "bcs": "A2RmNA==", "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "json": "df6" + "json": "df4" } } } @@ -839,30 +825,16 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IG0bat303iRg5RFov83HFmsTnKXFePTtc2ZJ/XHPPDaRBAAAAAAAAAA=", + "cursor": "INLCyu+uz92dAqQqrMubrTVBken7AGvouhvfBABDIiOuBAAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNQ==", - "type": { - "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" - } - }, - "value": { - "json": "df5" - } - } - }, - { - "cursor": "IPVw7dlIopC9wDfopKptMlcIEwEuKX0vCllb5Wq8z3wIBAAAAAAAAAA=", - "node": { - "name": { - "bcs": "A2RmNg==", + "bcs": "A2RmNA==", "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "json": "df6" + "json": "df4" } } } @@ -919,7 +891,7 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IGSmPF9YquQ5+ERmpbG5I9pdmQ6uh8GTTBq7NnrzeKeKBwAAAAAAAAA=", + "cursor": "IMltckgisEII5yOBiLuvjsH2EULYkwu6lEaHTZDlMMLrBwAAAAAAAAA=", "node": { "name": { "bcs": "pAEAAAAAAAA=", @@ -930,7 +902,7 @@ Response: { "value": { "contents": { "json": { - "id": "0xa5bbc9a923c6eb9e623d5704740e8230c7aca4840c451cfcb5ccc262ce3b9296", + "id": "0xd9e0a11bb56f6fa383c493fd8aa805417f09e50daf84af662f71b46effdc4c76", "count": "2" } } @@ -945,63 +917,63 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "ID49jorfR8MvOfB4vjP+b/u/TuyAifufWgyqincFH/1iBwAAAAAAAAA=", + "cursor": "IE+66B4qhmJHvgLRXCzBkJcKtIq9/3t9zYS98b6bMLhDBwAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNA==", + "bcs": "A2RmNg==", "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "json": "df4" + "json": "df6" } } }, { - "cursor": "IGSmPF9YquQ5+ERmpbG5I9pdmQ6uh8GTTBq7NnrzeKeKBwAAAAAAAAA=", + "cursor": "IFqQu0yJoDJda7AeIZmvhIW3x34EsmfTInmLo9ZXTVExBwAAAAAAAAA=", "node": { "name": { - "bcs": "pAEAAAAAAAA=", + "bcs": "A2RmNQ==", "type": { - "repr": "u64" + "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "contents": { - "json": { - "id": "0xa5bbc9a923c6eb9e623d5704740e8230c7aca4840c451cfcb5ccc262ce3b9296", - "count": "2" - } - } + "json": "df5" } } }, { - "cursor": "IG0bat303iRg5RFov83HFmsTnKXFePTtc2ZJ/XHPPDaRBwAAAAAAAAA=", + "cursor": "IMltckgisEII5yOBiLuvjsH2EULYkwu6lEaHTZDlMMLrBwAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNQ==", + "bcs": "pAEAAAAAAAA=", "type": { - "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" + "repr": "u64" } }, "value": { - "json": "df5" + "contents": { + "json": { + "id": "0xd9e0a11bb56f6fa383c493fd8aa805417f09e50daf84af662f71b46effdc4c76", + "count": "2" + } + } } } }, { - "cursor": "IPVw7dlIopC9wDfopKptMlcIEwEuKX0vCllb5Wq8z3wIBwAAAAAAAAA=", + "cursor": "INLCyu+uz92dAqQqrMubrTVBken7AGvouhvfBABDIiOuBwAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNg==", + "bcs": "A2RmNA==", "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "json": "df6" + "json": "df4" } } } @@ -1012,30 +984,16 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IG0bat303iRg5RFov83HFmsTnKXFePTtc2ZJ/XHPPDaRBAAAAAAAAAA=", - "node": { - "name": { - "bcs": "A2RmNQ==", - "type": { - "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" - } - }, - "value": { - "json": "df5" - } - } - }, - { - "cursor": "IPVw7dlIopC9wDfopKptMlcIEwEuKX0vCllb5Wq8z3wIBAAAAAAAAAA=", + "cursor": "INLCyu+uz92dAqQqrMubrTVBken7AGvouhvfBABDIiOuBAAAAAAAAAA=", "node": { "name": { - "bcs": "A2RmNg==", + "bcs": "A2RmNA==", "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000001::string::String" } }, "value": { - "json": "df6" + "json": "df4" } } } diff --git a/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/immutable_dof.exp b/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/immutable_dof.exp index e5bc044edcd..67c09b48c94 100644 --- a/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/immutable_dof.exp +++ b/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/immutable_dof.exp @@ -7,43 +7,43 @@ task 1, lines 21-69: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 8770400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8762800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 71: //# run Test::M1::parent --sender A --args @A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 73: //# run Test::M1::child --sender A --args @A created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2295200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2280000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 75: //# run Test::M1::child --sender A --args @A created: object(4,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2295200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2280000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 77: //# run Test::M1::add_child --sender A --args object(2,0) object(3,0) 42 created: object(5,0) mutated: object(0,0), object(2,0), object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 6064800, storage_rebate: 3610000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6034400, storage_rebate: 3587200, non_refundable_storage_fee: 0 task 6, line 79: //# run Test::M1::add_nested_child --sender A --args object(2,0) 42 object(4,0) 420 created: object(6,0) mutated: object(0,0), object(2,0), object(4,0) -gas summary: computation_cost: 1000000, storage_cost: 6064800, storage_rebate: 3610000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6034400, storage_rebate: 3587200, non_refundable_storage_fee: 0 task 7, line 81: //# run Test::M1::reclaim_and_freeze_child --sender A --args object(2,0) 42 mutated: object(0,0), object(2,0), object(3,0) deleted: object(5,0) -gas summary: computation_cost: 1000000, storage_cost: 3610000, storage_rebate: 6064800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3587200, storage_rebate: 6034400, non_refundable_storage_fee: 0 task 8, line 83: //# create-checkpoint @@ -58,11 +58,11 @@ Response: { "nodes": [ { "value": { - "address": "0x55ca8f4e88023983bbdb587ad1e03027d01968e42bbaa98cbb383c2cfce46fa7", + "address": "0xbbc2cee5f76e38917236d2524b3ef426edbbc25ef9ffbd6e9778dcffafe96f96", "version": 5, "contents": { "json": { - "id": "0x55ca8f4e88023983bbdb587ad1e03027d01968e42bbaa98cbb383c2cfce46fa7", + "id": "0xbbc2cee5f76e38917236d2524b3ef426edbbc25ef9ffbd6e9778dcffafe96f96", "count": "0" } }, @@ -86,11 +86,11 @@ Response: { "nodes": [ { "value": { - "address": "0x55ca8f4e88023983bbdb587ad1e03027d01968e42bbaa98cbb383c2cfce46fa7", + "address": "0xbbc2cee5f76e38917236d2524b3ef426edbbc25ef9ffbd6e9778dcffafe96f96", "version": 5, "contents": { "json": { - "id": "0x55ca8f4e88023983bbdb587ad1e03027d01968e42bbaa98cbb383c2cfce46fa7", + "id": "0xbbc2cee5f76e38917236d2524b3ef426edbbc25ef9ffbd6e9778dcffafe96f96", "count": "0" } }, @@ -98,11 +98,11 @@ Response: { "nodes": [ { "value": { - "address": "0xb45f8b09140fa8b0257a86001a8fe47e957a553a25f14b06110f4c8df81f5bd3", + "address": "0x1981177a65ae90d094e5512584c97af55b294aef0b77794b1c6757b6ce2a5897", "version": 6, "contents": { "json": { - "id": "0xb45f8b09140fa8b0257a86001a8fe47e957a553a25f14b06110f4c8df81f5bd3", + "id": "0x1981177a65ae90d094e5512584c97af55b294aef0b77794b1c6757b6ce2a5897", "count": "0" } } @@ -145,7 +145,7 @@ Response: { "object": { "owner": { "parent": { - "address": "0x1742ff94b09656db7bd80ffb5b2504a85c19888611a9d29d78f0c596e45e8cde" + "address": "0x261b91955dcf2f276c60d8f04a8c5bfcad92a423111b88925f9df1300715e318" } }, "dynamicFields": { @@ -175,11 +175,11 @@ Response: { "nodes": [ { "value": { - "address": "0xb45f8b09140fa8b0257a86001a8fe47e957a553a25f14b06110f4c8df81f5bd3", + "address": "0x1981177a65ae90d094e5512584c97af55b294aef0b77794b1c6757b6ce2a5897", "version": 6, "contents": { "json": { - "id": "0xb45f8b09140fa8b0257a86001a8fe47e957a553a25f14b06110f4c8df81f5bd3", + "id": "0x1981177a65ae90d094e5512584c97af55b294aef0b77794b1c6757b6ce2a5897", "count": "0" } } @@ -203,11 +203,11 @@ Response: { "nodes": [ { "value": { - "address": "0xb45f8b09140fa8b0257a86001a8fe47e957a553a25f14b06110f4c8df81f5bd3", + "address": "0x1981177a65ae90d094e5512584c97af55b294aef0b77794b1c6757b6ce2a5897", "version": 6, "contents": { "json": { - "id": "0xb45f8b09140fa8b0257a86001a8fe47e957a553a25f14b06110f4c8df81f5bd3", + "id": "0x1981177a65ae90d094e5512584c97af55b294aef0b77794b1c6757b6ce2a5897", "count": "0" } } diff --git a/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/mutated_df.exp b/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/mutated_df.exp index 628c4063ff9..6d506e4c4b5 100644 --- a/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/mutated_df.exp +++ b/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/mutated_df.exp @@ -7,13 +7,13 @@ task 1, lines 15-46: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 7828000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7820400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 48: //# run Test::M1::parent --sender A --args @A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 50: //# view-object 2,0 @@ -32,7 +32,7 @@ task 4, line 52: //# run Test::M1::add_df --sender A --args object(2,0) created: object(4,0), object(4,1), object(4,2) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 8664000, storage_rebate: 2302800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8626000, storage_rebate: 2287600, non_refundable_storage_fee: 0 task 5, line 54: //# view-object 2,0 @@ -50,7 +50,7 @@ Contents: Test::M1::Parent { task 6, line 56: //# run Test::M1::mutate_parent --sender A --args object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 2302800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 2287600, non_refundable_storage_fee: 0 task 7, line 58: //# view-object 2,0 @@ -78,7 +78,7 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IBwkF+FKmkQix/L/8t3W/cnaiSXPdvpKqQmF803j28opAQAAAAAAAAA=", + "cursor": "IAbc6C6Kc64uFzGgwo7ZbNDAvqJCXM7FCORnt+FWoN4yAQAAAAAAAAA=", "node": { "name": { "bcs": "A2RmMQ==" @@ -89,7 +89,7 @@ Response: { } }, { - "cursor": "IHpW2AFEufshjRNwCV+HBuP2j/0MnXx6xzF0CXA6TH+JAQAAAAAAAAA=", + "cursor": "IFTGRZmDK4S0lztr3Y3wG1eww8SpX12G7JGr845f5P5sAQAAAAAAAAA=", "node": { "name": { "bcs": "A2RmMg==" @@ -100,7 +100,7 @@ Response: { } }, { - "cursor": "IL7FEx9v3kScZgMtxG5wU3L6pOHO+gDWUCxZJ2YxuZI8AQAAAAAAAAA=", + "cursor": "IMknIBul3WNc9Xq/FWOan+uMZOaR67vleBT738wHRB1dAQAAAAAAAAA=", "node": { "name": { "bcs": "A2RmMw==" @@ -155,7 +155,7 @@ Contents: Test::M1::Parent { task 11, line 114: //# run Test::M1::mutate_df1 --sender A --args object(2,0) mutated: object(0,0), object(2,0), object(4,0) -gas summary: computation_cost: 1000000, storage_cost: 4484000, storage_rebate: 4423200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4461200, storage_rebate: 4400400, non_refundable_storage_fee: 0 task 12, line 116: //# view-object 2,0 @@ -173,7 +173,7 @@ Contents: Test::M1::Parent { task 13, line 118: //# run Test::M1::mutate_parent --sender A --args object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 2302800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 2287600, non_refundable_storage_fee: 0 task 14, line 120: //# view-object 2,0 @@ -201,7 +201,7 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IBwkF+FKmkQix/L/8t3W/cnaiSXPdvpKqQmF803j28opAgAAAAAAAAA=", + "cursor": "IAbc6C6Kc64uFzGgwo7ZbNDAvqJCXM7FCORnt+FWoN4yAgAAAAAAAAA=", "node": { "name": { "bcs": "A2RmMQ==" @@ -212,7 +212,7 @@ Response: { } }, { - "cursor": "IHpW2AFEufshjRNwCV+HBuP2j/0MnXx6xzF0CXA6TH+JAgAAAAAAAAA=", + "cursor": "IFTGRZmDK4S0lztr3Y3wG1eww8SpX12G7JGr845f5P5sAgAAAAAAAAA=", "node": { "name": { "bcs": "A2RmMg==" @@ -223,7 +223,7 @@ Response: { } }, { - "cursor": "IL7FEx9v3kScZgMtxG5wU3L6pOHO+gDWUCxZJ2YxuZI8AgAAAAAAAAA=", + "cursor": "IMknIBul3WNc9Xq/FWOan+uMZOaR67vleBT738wHRB1dAgAAAAAAAAA=", "node": { "name": { "bcs": "A2RmMw==" diff --git a/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/mutated_dof.exp b/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/mutated_dof.exp index bd26996e7f0..812f886b276 100644 --- a/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/mutated_dof.exp +++ b/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/mutated_dof.exp @@ -7,7 +7,7 @@ task 1, lines 16-63: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 8390400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8382800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 65-67: //# programmable --sender A --inputs @A @@ -15,18 +15,18 @@ task 2, lines 65-67: //> 1: Test::M1::parent(Input(0)); created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3610000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3587200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 69: //# run Test::M1::add_child --sender A --args object(2,1) object(2,0) 42 created: object(3,0) mutated: object(0,0), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 6064800, storage_rebate: 3610000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6034400, storage_rebate: 3587200, non_refundable_storage_fee: 0 task 4, line 71: //# run Test::M1::mutate_parent --sender A --args object(2,1) mutated: object(0,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 2302800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 2287600, non_refundable_storage_fee: 0 task 5, line 73: //# create-checkpoint @@ -41,7 +41,7 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IEBhSPBh/WMjcXbhMtiw03ik6a3JUyrZXvtLA7B+71ZuAQAAAAAAAAA=", + "cursor": "IE3qhyyw5Ukl1PAavIndl4WVL8BugBR44AsX6MD2XkhfAQAAAAAAAAA=", "node": { "name": { "bcs": "KgAAAAAAAAA=" @@ -49,7 +49,7 @@ Response: { "value": { "contents": { "json": { - "id": "0x92b479bae6fb902643a04dc80e04108420cde3b05fc095f7635ec02fd4bf0d9e", + "id": "0x3df577f7f845c5a18148aac68a2dfc09c674ea1f848c6153ed08a96c46dc53e4", "count": "0" } } @@ -65,7 +65,7 @@ Response: { "value": { "contents": { "json": { - "id": "0x92b479bae6fb902643a04dc80e04108420cde3b05fc095f7635ec02fd4bf0d9e", + "id": "0x3df577f7f845c5a18148aac68a2dfc09c674ea1f848c6153ed08a96c46dc53e4", "count": "0" } } @@ -77,7 +77,7 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IEBhSPBh/WMjcXbhMtiw03ik6a3JUyrZXvtLA7B+71ZuAQAAAAAAAAA=", + "cursor": "IE3qhyyw5Ukl1PAavIndl4WVL8BugBR44AsX6MD2XkhfAQAAAAAAAAA=", "node": { "name": { "bcs": "KgAAAAAAAAA=" @@ -85,7 +85,7 @@ Response: { "value": { "contents": { "json": { - "id": "0x92b479bae6fb902643a04dc80e04108420cde3b05fc095f7635ec02fd4bf0d9e", + "id": "0x3df577f7f845c5a18148aac68a2dfc09c674ea1f848c6153ed08a96c46dc53e4", "count": "0" } } @@ -101,7 +101,7 @@ Response: { "value": { "contents": { "json": { - "id": "0x92b479bae6fb902643a04dc80e04108420cde3b05fc095f7635ec02fd4bf0d9e", + "id": "0x3df577f7f845c5a18148aac68a2dfc09c674ea1f848c6153ed08a96c46dc53e4", "count": "0" } } @@ -117,7 +117,7 @@ Response: { "value": { "contents": { "json": { - "id": "0x92b479bae6fb902643a04dc80e04108420cde3b05fc095f7635ec02fd4bf0d9e", + "id": "0x3df577f7f845c5a18148aac68a2dfc09c674ea1f848c6153ed08a96c46dc53e4", "count": "0" } } @@ -135,7 +135,7 @@ task 7, line 134: //# run Test::M1::reclaim_and_transfer_child --sender A --args object(2,1) 42 @A mutated: object(0,0), object(2,0), object(2,1) deleted: object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 3610000, storage_rebate: 6064800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3587200, storage_rebate: 6034400, non_refundable_storage_fee: 0 task 8, line 136: //# create-checkpoint @@ -168,7 +168,7 @@ Response: { "value": { "contents": { "json": { - "id": "0x92b479bae6fb902643a04dc80e04108420cde3b05fc095f7635ec02fd4bf0d9e", + "id": "0x3df577f7f845c5a18148aac68a2dfc09c674ea1f848c6153ed08a96c46dc53e4", "count": "0" } } @@ -181,13 +181,13 @@ Response: { task 10, line 191: //# run Test::M1::mutate_child --sender A --args object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2295200, storage_rebate: 2295200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2280000, storage_rebate: 2280000, non_refundable_storage_fee: 0 task 11, line 193: //# run Test::M1::add_child --sender A --args object(2,1) object(2,0) 42 created: object(3,0) mutated: object(0,0), object(2,0), object(2,1) -gas summary: computation_cost: 1000000, storage_cost: 6064800, storage_rebate: 3610000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6034400, storage_rebate: 3587200, non_refundable_storage_fee: 0 task 12, line 195: //# create-checkpoint @@ -202,7 +202,7 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IEBhSPBh/WMjcXbhMtiw03ik6a3JUyrZXvtLA7B+71ZuAwAAAAAAAAA=", + "cursor": "IE3qhyyw5Ukl1PAavIndl4WVL8BugBR44AsX6MD2XkhfAwAAAAAAAAA=", "node": { "name": { "bcs": "KgAAAAAAAAA=" @@ -210,7 +210,7 @@ Response: { "value": { "contents": { "json": { - "id": "0x92b479bae6fb902643a04dc80e04108420cde3b05fc095f7635ec02fd4bf0d9e", + "id": "0x3df577f7f845c5a18148aac68a2dfc09c674ea1f848c6153ed08a96c46dc53e4", "count": "1" } } @@ -226,7 +226,7 @@ Response: { "value": { "contents": { "json": { - "id": "0x92b479bae6fb902643a04dc80e04108420cde3b05fc095f7635ec02fd4bf0d9e", + "id": "0x3df577f7f845c5a18148aac68a2dfc09c674ea1f848c6153ed08a96c46dc53e4", "count": "1" } } @@ -238,7 +238,7 @@ Response: { "dynamicFields": { "edges": [ { - "cursor": "IEBhSPBh/WMjcXbhMtiw03ik6a3JUyrZXvtLA7B+71ZuAwAAAAAAAAA=", + "cursor": "IE3qhyyw5Ukl1PAavIndl4WVL8BugBR44AsX6MD2XkhfAwAAAAAAAAA=", "node": { "name": { "bcs": "KgAAAAAAAAA=" @@ -246,7 +246,7 @@ Response: { "value": { "contents": { "json": { - "id": "0x92b479bae6fb902643a04dc80e04108420cde3b05fc095f7635ec02fd4bf0d9e", + "id": "0x3df577f7f845c5a18148aac68a2dfc09c674ea1f848c6153ed08a96c46dc53e4", "count": "1" } } @@ -262,7 +262,7 @@ Response: { "value": { "contents": { "json": { - "id": "0x92b479bae6fb902643a04dc80e04108420cde3b05fc095f7635ec02fd4bf0d9e", + "id": "0x3df577f7f845c5a18148aac68a2dfc09c674ea1f848c6153ed08a96c46dc53e4", "count": "1" } } @@ -283,7 +283,7 @@ Response: { "value": { "contents": { "json": { - "id": "0x92b479bae6fb902643a04dc80e04108420cde3b05fc095f7635ec02fd4bf0d9e", + "id": "0x3df577f7f845c5a18148aac68a2dfc09c674ea1f848c6153ed08a96c46dc53e4", "count": "0" } } diff --git a/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/nested_dof.exp b/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/nested_dof.exp index be4aa7cbc97..8f0b5aedb4b 100644 --- a/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/nested_dof.exp +++ b/crates/iota-graphql-e2e-tests/tests/consistency/dynamic_fields/nested_dof.exp @@ -7,47 +7,47 @@ task 1, lines 25-76: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 8960400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8952800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 78: //# run Test::M1::parent --sender A --args @A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 80: //# run Test::M1::child --sender A --args @A created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2295200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2280000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 82: //# run Test::M1::child --sender A --args @A created: object(4,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2295200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2280000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 84: //# run Test::M1::add_child --sender A --args object(2,0) object(3,0) 42 created: object(5,0) mutated: object(0,0), object(2,0), object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 6064800, storage_rebate: 3610000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6034400, storage_rebate: 3587200, non_refundable_storage_fee: 0 task 6, line 86: //# run Test::M1::add_nested_child --sender A --args object(2,0) 42 object(4,0) 420 created: object(6,0) mutated: object(0,0), object(2,0), object(4,0) -gas summary: computation_cost: 1000000, storage_cost: 6064800, storage_rebate: 3610000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6034400, storage_rebate: 3587200, non_refundable_storage_fee: 0 task 7, line 88: //# run Test::M1::mutate_child_on_parent --sender A --args object(2,0) 42 mutated: object(0,0), object(2,0), object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 3610000, storage_rebate: 3610000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3587200, storage_rebate: 3587200, non_refundable_storage_fee: 0 task 8, line 90: //# run Test::M1::mutate_nested_child_on_parent --sender A --args object(2,0) 42 420 mutated: object(0,0), object(2,0), object(4,0) -gas summary: computation_cost: 1000000, storage_cost: 3610000, storage_rebate: 3610000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3587200, storage_rebate: 3587200, non_refundable_storage_fee: 0 task 9, line 92: //# create-checkpoint @@ -62,11 +62,11 @@ Response: { "nodes": [ { "value": { - "address": "0xea84532042b8cc62297a280c4711d15e7d58d84dbae48f00826dcda7d7da288d", + "address": "0xc1e75c3f54d6c6bae388d42640d529f080b34becbaabc5c920293f6ab3b8fbfb", "version": 5, "contents": { "json": { - "id": "0xea84532042b8cc62297a280c4711d15e7d58d84dbae48f00826dcda7d7da288d", + "id": "0xc1e75c3f54d6c6bae388d42640d529f080b34becbaabc5c920293f6ab3b8fbfb", "count": "0" } }, @@ -90,11 +90,11 @@ Response: { "nodes": [ { "value": { - "address": "0xea84532042b8cc62297a280c4711d15e7d58d84dbae48f00826dcda7d7da288d", + "address": "0xc1e75c3f54d6c6bae388d42640d529f080b34becbaabc5c920293f6ab3b8fbfb", "version": 5, "contents": { "json": { - "id": "0xea84532042b8cc62297a280c4711d15e7d58d84dbae48f00826dcda7d7da288d", + "id": "0xc1e75c3f54d6c6bae388d42640d529f080b34becbaabc5c920293f6ab3b8fbfb", "count": "0" } }, @@ -102,11 +102,11 @@ Response: { "nodes": [ { "value": { - "address": "0x6277ab029606a88e0493e1154951ef864ea1d606a2fe6f683a3dc3d184e41197", + "address": "0x7bc6cd7c621f45de49d28adf67705526d7455422bcdbf8111a7eb80a2a9a7c67", "version": 6, "contents": { "json": { - "id": "0x6277ab029606a88e0493e1154951ef864ea1d606a2fe6f683a3dc3d184e41197", + "id": "0x7bc6cd7c621f45de49d28adf67705526d7455422bcdbf8111a7eb80a2a9a7c67", "count": "0" } } @@ -131,11 +131,11 @@ Response: { "nodes": [ { "value": { - "address": "0xea84532042b8cc62297a280c4711d15e7d58d84dbae48f00826dcda7d7da288d", + "address": "0xc1e75c3f54d6c6bae388d42640d529f080b34becbaabc5c920293f6ab3b8fbfb", "version": 7, "contents": { "json": { - "id": "0xea84532042b8cc62297a280c4711d15e7d58d84dbae48f00826dcda7d7da288d", + "id": "0xc1e75c3f54d6c6bae388d42640d529f080b34becbaabc5c920293f6ab3b8fbfb", "count": "1" } }, @@ -143,11 +143,11 @@ Response: { "nodes": [ { "value": { - "address": "0x6277ab029606a88e0493e1154951ef864ea1d606a2fe6f683a3dc3d184e41197", + "address": "0x7bc6cd7c621f45de49d28adf67705526d7455422bcdbf8111a7eb80a2a9a7c67", "version": 6, "contents": { "json": { - "id": "0x6277ab029606a88e0493e1154951ef864ea1d606a2fe6f683a3dc3d184e41197", + "id": "0x7bc6cd7c621f45de49d28adf67705526d7455422bcdbf8111a7eb80a2a9a7c67", "count": "0" } } @@ -172,11 +172,11 @@ Response: { "nodes": [ { "value": { - "address": "0xea84532042b8cc62297a280c4711d15e7d58d84dbae48f00826dcda7d7da288d", + "address": "0xc1e75c3f54d6c6bae388d42640d529f080b34becbaabc5c920293f6ab3b8fbfb", "version": 7, "contents": { "json": { - "id": "0xea84532042b8cc62297a280c4711d15e7d58d84dbae48f00826dcda7d7da288d", + "id": "0xc1e75c3f54d6c6bae388d42640d529f080b34becbaabc5c920293f6ab3b8fbfb", "count": "1" } }, @@ -184,11 +184,11 @@ Response: { "nodes": [ { "value": { - "address": "0x6277ab029606a88e0493e1154951ef864ea1d606a2fe6f683a3dc3d184e41197", + "address": "0x7bc6cd7c621f45de49d28adf67705526d7455422bcdbf8111a7eb80a2a9a7c67", "version": 8, "contents": { "json": { - "id": "0x6277ab029606a88e0493e1154951ef864ea1d606a2fe6f683a3dc3d184e41197", + "id": "0x7bc6cd7c621f45de49d28adf67705526d7455422bcdbf8111a7eb80a2a9a7c67", "count": "1" } } @@ -233,11 +233,11 @@ Response: { "nodes": [ { "value": { - "address": "0x6277ab029606a88e0493e1154951ef864ea1d606a2fe6f683a3dc3d184e41197", + "address": "0x7bc6cd7c621f45de49d28adf67705526d7455422bcdbf8111a7eb80a2a9a7c67", "version": 6, "contents": { "json": { - "id": "0x6277ab029606a88e0493e1154951ef864ea1d606a2fe6f683a3dc3d184e41197", + "id": "0x7bc6cd7c621f45de49d28adf67705526d7455422bcdbf8111a7eb80a2a9a7c67", "count": "0" } } diff --git a/crates/iota-graphql-e2e-tests/tests/consistency/epochs/transaction_blocks.exp b/crates/iota-graphql-e2e-tests/tests/consistency/epochs/transaction_blocks.exp index f6467124565..b8ef5a023ea 100644 --- a/crates/iota-graphql-e2e-tests/tests/consistency/epochs/transaction_blocks.exp +++ b/crates/iota-graphql-e2e-tests/tests/consistency/epochs/transaction_blocks.exp @@ -7,7 +7,7 @@ task 1, lines 23-36: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5175600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5168000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 38: //# create-checkpoint @@ -17,7 +17,7 @@ task 3, line 40: //# run Test::M1::create --args 0 @A --sender A created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 4, line 42: //# create-checkpoint @@ -41,25 +41,25 @@ Response: { { "cursor": "eyJjIjozLCJ0IjowLCJpIjpmYWxzZX0", "node": { - "digest": "6jJ5GyPr9B7aW4NTEwGJUeWX9RT2pjnXL1by8J2Qk7xV" + "digest": "CmPeQ2JKFnEKeZsYz9cYU8q57Wb1fgZxpDqYq9YinuQA" } }, { "cursor": "eyJjIjozLCJ0IjoxLCJpIjpmYWxzZX0", "node": { - "digest": "HikJ6T9t3VKeUJ4trTq2fxMufgzE6VYGmd1sGRT9XHEk" + "digest": "Hm38QqFQFCkzedsHCXsxJt7j5VCo9KUn5ZL9zSAZVKWh" } }, { "cursor": "eyJjIjozLCJ0IjoyLCJpIjpmYWxzZX0", "node": { - "digest": "wxTLj3hMZRjEpPVKZJ5zoM7Jjgnw3J9cCe4nHcG2WLh" + "digest": "ywf9ak8rV9kDDx73zGH5vtTJkHmfxXHvLbSGhwAyxdM" } }, { "cursor": "eyJjIjozLCJ0IjozLCJpIjpmYWxzZX0", "node": { - "digest": "H1onPegHJqy8A2biZcqAPJF2xuA1bSVCLEtGTfGp68mt" + "digest": "Fsv6DwsUEPUqRyFP7wkd7mMDq93PXMmSXqQAgrrnsKb3" } } ] @@ -72,7 +72,7 @@ task 7, line 64: //# run Test::M1::create --args 0 @A --sender A created: object(7,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, line 66: //# create-checkpoint @@ -82,7 +82,7 @@ task 9, line 68: //# run Test::M1::create --args 0 @A --sender A created: object(9,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 10, line 70: //# create-checkpoint @@ -92,7 +92,7 @@ task 11, line 72: //# run Test::M1::create --args 0 @A --sender A created: object(11,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 12, line 74: //# create-checkpoint @@ -106,7 +106,7 @@ task 14, line 78: //# run Test::M1::create --args 0 @A --sender A created: object(14,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 15, line 80: //# create-checkpoint @@ -116,7 +116,7 @@ task 16, line 82: //# run Test::M1::create --args 0 @A --sender A created: object(16,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 17, line 84: //# create-checkpoint @@ -126,7 +126,7 @@ task 18, line 86: //# run Test::M1::create --args 0 @A --sender A created: object(18,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 19, line 88: //# create-checkpoint @@ -154,25 +154,25 @@ Response: { { "cursor": "eyJjIjoxMiwidCI6MCwiaSI6ZmFsc2V9", "node": { - "digest": "6jJ5GyPr9B7aW4NTEwGJUeWX9RT2pjnXL1by8J2Qk7xV" + "digest": "CmPeQ2JKFnEKeZsYz9cYU8q57Wb1fgZxpDqYq9YinuQA" } }, { "cursor": "eyJjIjoxMiwidCI6MSwiaSI6ZmFsc2V9", "node": { - "digest": "HikJ6T9t3VKeUJ4trTq2fxMufgzE6VYGmd1sGRT9XHEk" + "digest": "Hm38QqFQFCkzedsHCXsxJt7j5VCo9KUn5ZL9zSAZVKWh" } }, { "cursor": "eyJjIjoxMiwidCI6MiwiaSI6ZmFsc2V9", "node": { - "digest": "wxTLj3hMZRjEpPVKZJ5zoM7Jjgnw3J9cCe4nHcG2WLh" + "digest": "ywf9ak8rV9kDDx73zGH5vtTJkHmfxXHvLbSGhwAyxdM" } }, { "cursor": "eyJjIjoxMiwidCI6MywiaSI6ZmFsc2V9", "node": { - "digest": "H1onPegHJqy8A2biZcqAPJF2xuA1bSVCLEtGTfGp68mt" + "digest": "Fsv6DwsUEPUqRyFP7wkd7mMDq93PXMmSXqQAgrrnsKb3" } } ] @@ -183,19 +183,19 @@ Response: { { "cursor": "eyJjIjo0LCJ0IjowLCJpIjpmYWxzZX0", "node": { - "digest": "6jJ5GyPr9B7aW4NTEwGJUeWX9RT2pjnXL1by8J2Qk7xV" + "digest": "CmPeQ2JKFnEKeZsYz9cYU8q57Wb1fgZxpDqYq9YinuQA" } }, { "cursor": "eyJjIjo0LCJ0IjoxLCJpIjpmYWxzZX0", "node": { - "digest": "HikJ6T9t3VKeUJ4trTq2fxMufgzE6VYGmd1sGRT9XHEk" + "digest": "Hm38QqFQFCkzedsHCXsxJt7j5VCo9KUn5ZL9zSAZVKWh" } }, { "cursor": "eyJjIjo0LCJ0IjoyLCJpIjpmYWxzZX0", "node": { - "digest": "wxTLj3hMZRjEpPVKZJ5zoM7Jjgnw3J9cCe4nHcG2WLh" + "digest": "ywf9ak8rV9kDDx73zGH5vtTJkHmfxXHvLbSGhwAyxdM" } } ] @@ -207,25 +207,25 @@ Response: { { "cursor": "eyJjIjoxMiwidCI6NCwiaSI6ZmFsc2V9", "node": { - "digest": "7e8AfYuDazeU11FQ6JDkKrKCLh1UVYHcwt2ni9Ed4z4" + "digest": "25MhkStEmB44afcLcmtdA426Qbo6a5z6sJrURSfn4wSM" } }, { "cursor": "eyJjIjoxMiwidCI6NSwiaSI6ZmFsc2V9", "node": { - "digest": "3C8ABfrDA3LAzA4ad1upVTmBXctUdUhhzYK4aiUYTDV5" + "digest": "Hutiw6GLNGCuRwMTZhxFW2CrYF6PYt2DomNMwtN1hLUo" } }, { "cursor": "eyJjIjoxMiwidCI6NiwiaSI6ZmFsc2V9", "node": { - "digest": "BuMGVrSu5PN4SXXhHEQrxo2aappDJ4xBdUbYfu9oNn4v" + "digest": "4YeKsZh5nDLNfbNVT2GRwenv1gvaVdDde9BASgiBqkv8" } }, { "cursor": "eyJjIjoxMiwidCI6NywiaSI6ZmFsc2V9", "node": { - "digest": "8FLhsBowfdJXeWQh8TSSsxbHQkKVqFSdmjPMBuHpgmas" + "digest": "3K4FAYTRRVNDcR16Z3ScNDP5W4dgvAdMorFux1xnGVvd" } } ] @@ -236,43 +236,43 @@ Response: { { "cursor": "eyJjIjo4LCJ0IjowLCJpIjpmYWxzZX0", "node": { - "digest": "6jJ5GyPr9B7aW4NTEwGJUeWX9RT2pjnXL1by8J2Qk7xV" + "digest": "CmPeQ2JKFnEKeZsYz9cYU8q57Wb1fgZxpDqYq9YinuQA" } }, { "cursor": "eyJjIjo4LCJ0IjoxLCJpIjpmYWxzZX0", "node": { - "digest": "HikJ6T9t3VKeUJ4trTq2fxMufgzE6VYGmd1sGRT9XHEk" + "digest": "Hm38QqFQFCkzedsHCXsxJt7j5VCo9KUn5ZL9zSAZVKWh" } }, { "cursor": "eyJjIjo4LCJ0IjoyLCJpIjpmYWxzZX0", "node": { - "digest": "wxTLj3hMZRjEpPVKZJ5zoM7Jjgnw3J9cCe4nHcG2WLh" + "digest": "ywf9ak8rV9kDDx73zGH5vtTJkHmfxXHvLbSGhwAyxdM" } }, { "cursor": "eyJjIjo4LCJ0IjozLCJpIjpmYWxzZX0", "node": { - "digest": "H1onPegHJqy8A2biZcqAPJF2xuA1bSVCLEtGTfGp68mt" + "digest": "Fsv6DwsUEPUqRyFP7wkd7mMDq93PXMmSXqQAgrrnsKb3" } }, { "cursor": "eyJjIjo4LCJ0Ijo0LCJpIjpmYWxzZX0", "node": { - "digest": "7e8AfYuDazeU11FQ6JDkKrKCLh1UVYHcwt2ni9Ed4z4" + "digest": "25MhkStEmB44afcLcmtdA426Qbo6a5z6sJrURSfn4wSM" } }, { "cursor": "eyJjIjo4LCJ0Ijo1LCJpIjpmYWxzZX0", "node": { - "digest": "3C8ABfrDA3LAzA4ad1upVTmBXctUdUhhzYK4aiUYTDV5" + "digest": "Hutiw6GLNGCuRwMTZhxFW2CrYF6PYt2DomNMwtN1hLUo" } }, { "cursor": "eyJjIjo4LCJ0Ijo2LCJpIjpmYWxzZX0", "node": { - "digest": "BuMGVrSu5PN4SXXhHEQrxo2aappDJ4xBdUbYfu9oNn4v" + "digest": "4YeKsZh5nDLNfbNVT2GRwenv1gvaVdDde9BASgiBqkv8" } } ] @@ -284,25 +284,25 @@ Response: { { "cursor": "eyJjIjoxMiwidCI6OCwiaSI6ZmFsc2V9", "node": { - "digest": "2dAUefr4VxY7187brTUcmS9xikyznS8QeEUHLqT4DVMX" + "digest": "EnghHbuhpcGuNpC1L2iqikieXAyHJUnanzg5urDmwgdz" } }, { "cursor": "eyJjIjoxMiwidCI6OSwiaSI6ZmFsc2V9", "node": { - "digest": "EL7ZyLYMiCub9vgKhfkRNZwJg3hyZNKuV96n6CgWrBhC" + "digest": "9G4gNmS2XYetMxBty65fKfx9iDRBetdpdNZuyK7oRd6c" } }, { "cursor": "eyJjIjoxMiwidCI6MTAsImkiOmZhbHNlfQ", "node": { - "digest": "X1CR6JjkMWjrK69CPe1jpctSLLvYGj2MieSEBDc4E7T" + "digest": "3ivB1ebWRpc4Si1vd8tsSY7XwaY7DrumxdS3KdXyZLVr" } }, { "cursor": "eyJjIjoxMiwidCI6MTEsImkiOmZhbHNlfQ", "node": { - "digest": "3vPMFAxh6VnNYzJBGqjZPsH9qNrEd1hHKeRRvfxqFYvx" + "digest": "CpC1zrGsmDThe1sPdhRPmfQCpaaTYJanFTtyr5BBNNNZ" } } ] @@ -313,67 +313,67 @@ Response: { { "cursor": "eyJjIjoxMiwidCI6MCwiaSI6ZmFsc2V9", "node": { - "digest": "6jJ5GyPr9B7aW4NTEwGJUeWX9RT2pjnXL1by8J2Qk7xV" + "digest": "CmPeQ2JKFnEKeZsYz9cYU8q57Wb1fgZxpDqYq9YinuQA" } }, { "cursor": "eyJjIjoxMiwidCI6MSwiaSI6ZmFsc2V9", "node": { - "digest": "HikJ6T9t3VKeUJ4trTq2fxMufgzE6VYGmd1sGRT9XHEk" + "digest": "Hm38QqFQFCkzedsHCXsxJt7j5VCo9KUn5ZL9zSAZVKWh" } }, { "cursor": "eyJjIjoxMiwidCI6MiwiaSI6ZmFsc2V9", "node": { - "digest": "wxTLj3hMZRjEpPVKZJ5zoM7Jjgnw3J9cCe4nHcG2WLh" + "digest": "ywf9ak8rV9kDDx73zGH5vtTJkHmfxXHvLbSGhwAyxdM" } }, { "cursor": "eyJjIjoxMiwidCI6MywiaSI6ZmFsc2V9", "node": { - "digest": "H1onPegHJqy8A2biZcqAPJF2xuA1bSVCLEtGTfGp68mt" + "digest": "Fsv6DwsUEPUqRyFP7wkd7mMDq93PXMmSXqQAgrrnsKb3" } }, { "cursor": "eyJjIjoxMiwidCI6NCwiaSI6ZmFsc2V9", "node": { - "digest": "7e8AfYuDazeU11FQ6JDkKrKCLh1UVYHcwt2ni9Ed4z4" + "digest": "25MhkStEmB44afcLcmtdA426Qbo6a5z6sJrURSfn4wSM" } }, { "cursor": "eyJjIjoxMiwidCI6NSwiaSI6ZmFsc2V9", "node": { - "digest": "3C8ABfrDA3LAzA4ad1upVTmBXctUdUhhzYK4aiUYTDV5" + "digest": "Hutiw6GLNGCuRwMTZhxFW2CrYF6PYt2DomNMwtN1hLUo" } }, { "cursor": "eyJjIjoxMiwidCI6NiwiaSI6ZmFsc2V9", "node": { - "digest": "BuMGVrSu5PN4SXXhHEQrxo2aappDJ4xBdUbYfu9oNn4v" + "digest": "4YeKsZh5nDLNfbNVT2GRwenv1gvaVdDde9BASgiBqkv8" } }, { "cursor": "eyJjIjoxMiwidCI6NywiaSI6ZmFsc2V9", "node": { - "digest": "8FLhsBowfdJXeWQh8TSSsxbHQkKVqFSdmjPMBuHpgmas" + "digest": "3K4FAYTRRVNDcR16Z3ScNDP5W4dgvAdMorFux1xnGVvd" } }, { "cursor": "eyJjIjoxMiwidCI6OCwiaSI6ZmFsc2V9", "node": { - "digest": "2dAUefr4VxY7187brTUcmS9xikyznS8QeEUHLqT4DVMX" + "digest": "EnghHbuhpcGuNpC1L2iqikieXAyHJUnanzg5urDmwgdz" } }, { "cursor": "eyJjIjoxMiwidCI6OSwiaSI6ZmFsc2V9", "node": { - "digest": "EL7ZyLYMiCub9vgKhfkRNZwJg3hyZNKuV96n6CgWrBhC" + "digest": "9G4gNmS2XYetMxBty65fKfx9iDRBetdpdNZuyK7oRd6c" } }, { "cursor": "eyJjIjoxMiwidCI6MTAsImkiOmZhbHNlfQ", "node": { - "digest": "X1CR6JjkMWjrK69CPe1jpctSLLvYGj2MieSEBDc4E7T" + "digest": "3ivB1ebWRpc4Si1vd8tsSY7XwaY7DrumxdS3KdXyZLVr" } } ] @@ -395,19 +395,19 @@ Response: { { "cursor": "eyJjIjo3LCJ0IjoxLCJpIjpmYWxzZX0", "node": { - "digest": "HikJ6T9t3VKeUJ4trTq2fxMufgzE6VYGmd1sGRT9XHEk" + "digest": "Hm38QqFQFCkzedsHCXsxJt7j5VCo9KUn5ZL9zSAZVKWh" } }, { "cursor": "eyJjIjo3LCJ0IjoyLCJpIjpmYWxzZX0", "node": { - "digest": "wxTLj3hMZRjEpPVKZJ5zoM7Jjgnw3J9cCe4nHcG2WLh" + "digest": "ywf9ak8rV9kDDx73zGH5vtTJkHmfxXHvLbSGhwAyxdM" } }, { "cursor": "eyJjIjo3LCJ0IjozLCJpIjpmYWxzZX0", "node": { - "digest": "H1onPegHJqy8A2biZcqAPJF2xuA1bSVCLEtGTfGp68mt" + "digest": "Fsv6DwsUEPUqRyFP7wkd7mMDq93PXMmSXqQAgrrnsKb3" } } ] @@ -420,19 +420,19 @@ Response: { { "cursor": "eyJjIjoxMSwidCI6NSwiaSI6ZmFsc2V9", "node": { - "digest": "3C8ABfrDA3LAzA4ad1upVTmBXctUdUhhzYK4aiUYTDV5" + "digest": "Hutiw6GLNGCuRwMTZhxFW2CrYF6PYt2DomNMwtN1hLUo" } }, { "cursor": "eyJjIjoxMSwidCI6NiwiaSI6ZmFsc2V9", "node": { - "digest": "BuMGVrSu5PN4SXXhHEQrxo2aappDJ4xBdUbYfu9oNn4v" + "digest": "4YeKsZh5nDLNfbNVT2GRwenv1gvaVdDde9BASgiBqkv8" } }, { "cursor": "eyJjIjoxMSwidCI6NywiaSI6ZmFsc2V9", "node": { - "digest": "8FLhsBowfdJXeWQh8TSSsxbHQkKVqFSdmjPMBuHpgmas" + "digest": "3K4FAYTRRVNDcR16Z3ScNDP5W4dgvAdMorFux1xnGVvd" } } ] @@ -445,19 +445,19 @@ Response: { { "cursor": "eyJjIjoxMiwidCI6OSwiaSI6ZmFsc2V9", "node": { - "digest": "EL7ZyLYMiCub9vgKhfkRNZwJg3hyZNKuV96n6CgWrBhC" + "digest": "9G4gNmS2XYetMxBty65fKfx9iDRBetdpdNZuyK7oRd6c" } }, { "cursor": "eyJjIjoxMiwidCI6MTAsImkiOmZhbHNlfQ", "node": { - "digest": "X1CR6JjkMWjrK69CPe1jpctSLLvYGj2MieSEBDc4E7T" + "digest": "3ivB1ebWRpc4Si1vd8tsSY7XwaY7DrumxdS3KdXyZLVr" } }, { "cursor": "eyJjIjoxMiwidCI6MTEsImkiOmZhbHNlfQ", "node": { - "digest": "3vPMFAxh6VnNYzJBGqjZPsH9qNrEd1hHKeRRvfxqFYvx" + "digest": "CpC1zrGsmDThe1sPdhRPmfQCpaaTYJanFTtyr5BBNNNZ" } } ] @@ -480,7 +480,7 @@ Response: { { "cursor": "eyJjIjoyLCJ0IjoyLCJpIjpmYWxzZX0", "node": { - "digest": "wxTLj3hMZRjEpPVKZJ5zoM7Jjgnw3J9cCe4nHcG2WLh" + "digest": "ywf9ak8rV9kDDx73zGH5vtTJkHmfxXHvLbSGhwAyxdM" } } ] @@ -493,7 +493,7 @@ Response: { { "cursor": "eyJjIjo2LCJ0Ijo2LCJpIjpmYWxzZX0", "node": { - "digest": "BuMGVrSu5PN4SXXhHEQrxo2aappDJ4xBdUbYfu9oNn4v" + "digest": "4YeKsZh5nDLNfbNVT2GRwenv1gvaVdDde9BASgiBqkv8" } } ] @@ -506,7 +506,7 @@ Response: { { "cursor": "eyJjIjoxMCwidCI6MTAsImkiOmZhbHNlfQ", "node": { - "digest": "X1CR6JjkMWjrK69CPe1jpctSLLvYGj2MieSEBDc4E7T" + "digest": "3ivB1ebWRpc4Si1vd8tsSY7XwaY7DrumxdS3KdXyZLVr" } } ] @@ -527,24 +527,24 @@ Response: { { "cursor": "eyJjIjo2LCJ0Ijo2LCJpIjpmYWxzZX0", "node": { - "digest": "BuMGVrSu5PN4SXXhHEQrxo2aappDJ4xBdUbYfu9oNn4v", + "digest": "4YeKsZh5nDLNfbNVT2GRwenv1gvaVdDde9BASgiBqkv8", "sender": { "objects": { "edges": [ { - "cursor": "IBpSURhn9I1wJERwRFANEXqI98bagpRsksYuuwsrFFtQBgAAAAAAAAA=" + "cursor": "IAxPzPNh6DBZ+lqchUWSL6NuS4y4vgz6pHjStN6JWpF/BgAAAAAAAAA=" }, { - "cursor": "IG5xEl2cETN2e5wvZahoOT7RPDhQ67XpDJxEYE3Y1H0wBgAAAAAAAAA=" + "cursor": "IBH2WwM6ABxADOrEJ86TGtH880uA4Ce8kx9mXnSZj2DYBgAAAAAAAAA=" }, { - "cursor": "IHZTeRSrYZdmATmYywz8eg1TCTt31tnyWtgV3HhknIL9BgAAAAAAAAA=" + "cursor": "IBpSURhn9I1wJERwRFANEXqI98bagpRsksYuuwsrFFtQBgAAAAAAAAA=" }, { - "cursor": "IH6AktGxIVXU/7gD2X/LJ7JCYi+0MPGulrMQHX+XHpnpBgAAAAAAAAA=" + "cursor": "IElmtyPGm1GRSMWeyj+lZFiOkrmPZ2oKnWeSNwmsAXf/BgAAAAAAAAA=" }, { - "cursor": "IPh2YV1gCbCl7szXeyKqwIL0jJlNuMDuCbQCmjbWpyECBgAAAAAAAAA=" + "cursor": "IH3CTzQfYFptQFnBjnyGfpphmbw0uuCt4JTcq1tQsIZRBgAAAAAAAAA=" } ] } @@ -558,33 +558,33 @@ Response: { { "cursor": "eyJjIjoxMiwidCI6MiwiaSI6ZmFsc2V9", "node": { - "digest": "wxTLj3hMZRjEpPVKZJ5zoM7Jjgnw3J9cCe4nHcG2WLh", + "digest": "ywf9ak8rV9kDDx73zGH5vtTJkHmfxXHvLbSGhwAyxdM", "sender": { "objects": { "edges": [ { - "cursor": "IBpSURhn9I1wJERwRFANEXqI98bagpRsksYuuwsrFFtQDAAAAAAAAAA=" + "cursor": "IAxPzPNh6DBZ+lqchUWSL6NuS4y4vgz6pHjStN6JWpF/DAAAAAAAAAA=" }, { - "cursor": "IG5xEl2cETN2e5wvZahoOT7RPDhQ67XpDJxEYE3Y1H0wDAAAAAAAAAA=" + "cursor": "IBH2WwM6ABxADOrEJ86TGtH880uA4Ce8kx9mXnSZj2DYDAAAAAAAAAA=" }, { - "cursor": "IHZTeRSrYZdmATmYywz8eg1TCTt31tnyWtgV3HhknIL9DAAAAAAAAAA=" + "cursor": "IBoQDKT5WktB7OuMUXNBKsoqg3oDa0b1Dc7AIuqcPPDDDAAAAAAAAAA=" }, { - "cursor": "IH6AktGxIVXU/7gD2X/LJ7JCYi+0MPGulrMQHX+XHpnpDAAAAAAAAAA=" + "cursor": "IBpSURhn9I1wJERwRFANEXqI98bagpRsksYuuwsrFFtQDAAAAAAAAAA=" }, { - "cursor": "IJL01CrKxFLA2/firA8JWvn3sWBK9YqKS9NQwvIU0Q/sDAAAAAAAAAA=" + "cursor": "IElmtyPGm1GRSMWeyj+lZFiOkrmPZ2oKnWeSNwmsAXf/DAAAAAAAAAA=" }, { - "cursor": "IJq+Y73oMKn4g+rWmohDyrR8YHPPGNCztXduUlLXDJnMDAAAAAAAAAA=" + "cursor": "IGjIsZmGLOFhLkGROat6+WyaYp65xLf0mDp34jCyG3KsDAAAAAAAAAA=" }, { - "cursor": "IJ/ICtdADlQPA4QUt0sRneRIa0g20P2ai3+rWMorvNGyDAAAAAAAAAA=" + "cursor": "IH3CTzQfYFptQFnBjnyGfpphmbw0uuCt4JTcq1tQsIZRDAAAAAAAAAA=" }, { - "cursor": "IPh2YV1gCbCl7szXeyKqwIL0jJlNuMDuCbQCmjbWpyECDAAAAAAAAAA=" + "cursor": "IOZ8ocIl02ZSSkdsdSrpt8BzDKmSCK2CZJpYvoPS+ilADAAAAAAAAAA=" } ] } @@ -594,33 +594,33 @@ Response: { { "cursor": "eyJjIjoxMiwidCI6NCwiaSI6ZmFsc2V9", "node": { - "digest": "7e8AfYuDazeU11FQ6JDkKrKCLh1UVYHcwt2ni9Ed4z4", + "digest": "25MhkStEmB44afcLcmtdA426Qbo6a5z6sJrURSfn4wSM", "sender": { "objects": { "edges": [ { - "cursor": "IBpSURhn9I1wJERwRFANEXqI98bagpRsksYuuwsrFFtQDAAAAAAAAAA=" + "cursor": "IAxPzPNh6DBZ+lqchUWSL6NuS4y4vgz6pHjStN6JWpF/DAAAAAAAAAA=" }, { - "cursor": "IG5xEl2cETN2e5wvZahoOT7RPDhQ67XpDJxEYE3Y1H0wDAAAAAAAAAA=" + "cursor": "IBH2WwM6ABxADOrEJ86TGtH880uA4Ce8kx9mXnSZj2DYDAAAAAAAAAA=" }, { - "cursor": "IHZTeRSrYZdmATmYywz8eg1TCTt31tnyWtgV3HhknIL9DAAAAAAAAAA=" + "cursor": "IBoQDKT5WktB7OuMUXNBKsoqg3oDa0b1Dc7AIuqcPPDDDAAAAAAAAAA=" }, { - "cursor": "IH6AktGxIVXU/7gD2X/LJ7JCYi+0MPGulrMQHX+XHpnpDAAAAAAAAAA=" + "cursor": "IBpSURhn9I1wJERwRFANEXqI98bagpRsksYuuwsrFFtQDAAAAAAAAAA=" }, { - "cursor": "IJL01CrKxFLA2/firA8JWvn3sWBK9YqKS9NQwvIU0Q/sDAAAAAAAAAA=" + "cursor": "IElmtyPGm1GRSMWeyj+lZFiOkrmPZ2oKnWeSNwmsAXf/DAAAAAAAAAA=" }, { - "cursor": "IJq+Y73oMKn4g+rWmohDyrR8YHPPGNCztXduUlLXDJnMDAAAAAAAAAA=" + "cursor": "IGjIsZmGLOFhLkGROat6+WyaYp65xLf0mDp34jCyG3KsDAAAAAAAAAA=" }, { - "cursor": "IJ/ICtdADlQPA4QUt0sRneRIa0g20P2ai3+rWMorvNGyDAAAAAAAAAA=" + "cursor": "IH3CTzQfYFptQFnBjnyGfpphmbw0uuCt4JTcq1tQsIZRDAAAAAAAAAA=" }, { - "cursor": "IPh2YV1gCbCl7szXeyKqwIL0jJlNuMDuCbQCmjbWpyECDAAAAAAAAAA=" + "cursor": "IOZ8ocIl02ZSSkdsdSrpt8BzDKmSCK2CZJpYvoPS+ilADAAAAAAAAAA=" } ] } @@ -630,33 +630,33 @@ Response: { { "cursor": "eyJjIjoxMiwidCI6NSwiaSI6ZmFsc2V9", "node": { - "digest": "3C8ABfrDA3LAzA4ad1upVTmBXctUdUhhzYK4aiUYTDV5", + "digest": "Hutiw6GLNGCuRwMTZhxFW2CrYF6PYt2DomNMwtN1hLUo", "sender": { "objects": { "edges": [ { - "cursor": "IBpSURhn9I1wJERwRFANEXqI98bagpRsksYuuwsrFFtQDAAAAAAAAAA=" + "cursor": "IAxPzPNh6DBZ+lqchUWSL6NuS4y4vgz6pHjStN6JWpF/DAAAAAAAAAA=" }, { - "cursor": "IG5xEl2cETN2e5wvZahoOT7RPDhQ67XpDJxEYE3Y1H0wDAAAAAAAAAA=" + "cursor": "IBH2WwM6ABxADOrEJ86TGtH880uA4Ce8kx9mXnSZj2DYDAAAAAAAAAA=" }, { - "cursor": "IHZTeRSrYZdmATmYywz8eg1TCTt31tnyWtgV3HhknIL9DAAAAAAAAAA=" + "cursor": "IBoQDKT5WktB7OuMUXNBKsoqg3oDa0b1Dc7AIuqcPPDDDAAAAAAAAAA=" }, { - "cursor": "IH6AktGxIVXU/7gD2X/LJ7JCYi+0MPGulrMQHX+XHpnpDAAAAAAAAAA=" + "cursor": "IBpSURhn9I1wJERwRFANEXqI98bagpRsksYuuwsrFFtQDAAAAAAAAAA=" }, { - "cursor": "IJL01CrKxFLA2/firA8JWvn3sWBK9YqKS9NQwvIU0Q/sDAAAAAAAAAA=" + "cursor": "IElmtyPGm1GRSMWeyj+lZFiOkrmPZ2oKnWeSNwmsAXf/DAAAAAAAAAA=" }, { - "cursor": "IJq+Y73oMKn4g+rWmohDyrR8YHPPGNCztXduUlLXDJnMDAAAAAAAAAA=" + "cursor": "IGjIsZmGLOFhLkGROat6+WyaYp65xLf0mDp34jCyG3KsDAAAAAAAAAA=" }, { - "cursor": "IJ/ICtdADlQPA4QUt0sRneRIa0g20P2ai3+rWMorvNGyDAAAAAAAAAA=" + "cursor": "IH3CTzQfYFptQFnBjnyGfpphmbw0uuCt4JTcq1tQsIZRDAAAAAAAAAA=" }, { - "cursor": "IPh2YV1gCbCl7szXeyKqwIL0jJlNuMDuCbQCmjbWpyECDAAAAAAAAAA=" + "cursor": "IOZ8ocIl02ZSSkdsdSrpt8BzDKmSCK2CZJpYvoPS+ilADAAAAAAAAAA=" } ] } @@ -666,33 +666,33 @@ Response: { { "cursor": "eyJjIjoxMiwidCI6NiwiaSI6ZmFsc2V9", "node": { - "digest": "BuMGVrSu5PN4SXXhHEQrxo2aappDJ4xBdUbYfu9oNn4v", + "digest": "4YeKsZh5nDLNfbNVT2GRwenv1gvaVdDde9BASgiBqkv8", "sender": { "objects": { "edges": [ { - "cursor": "IBpSURhn9I1wJERwRFANEXqI98bagpRsksYuuwsrFFtQDAAAAAAAAAA=" + "cursor": "IAxPzPNh6DBZ+lqchUWSL6NuS4y4vgz6pHjStN6JWpF/DAAAAAAAAAA=" }, { - "cursor": "IG5xEl2cETN2e5wvZahoOT7RPDhQ67XpDJxEYE3Y1H0wDAAAAAAAAAA=" + "cursor": "IBH2WwM6ABxADOrEJ86TGtH880uA4Ce8kx9mXnSZj2DYDAAAAAAAAAA=" }, { - "cursor": "IHZTeRSrYZdmATmYywz8eg1TCTt31tnyWtgV3HhknIL9DAAAAAAAAAA=" + "cursor": "IBoQDKT5WktB7OuMUXNBKsoqg3oDa0b1Dc7AIuqcPPDDDAAAAAAAAAA=" }, { - "cursor": "IH6AktGxIVXU/7gD2X/LJ7JCYi+0MPGulrMQHX+XHpnpDAAAAAAAAAA=" + "cursor": "IBpSURhn9I1wJERwRFANEXqI98bagpRsksYuuwsrFFtQDAAAAAAAAAA=" }, { - "cursor": "IJL01CrKxFLA2/firA8JWvn3sWBK9YqKS9NQwvIU0Q/sDAAAAAAAAAA=" + "cursor": "IElmtyPGm1GRSMWeyj+lZFiOkrmPZ2oKnWeSNwmsAXf/DAAAAAAAAAA=" }, { - "cursor": "IJq+Y73oMKn4g+rWmohDyrR8YHPPGNCztXduUlLXDJnMDAAAAAAAAAA=" + "cursor": "IGjIsZmGLOFhLkGROat6+WyaYp65xLf0mDp34jCyG3KsDAAAAAAAAAA=" }, { - "cursor": "IJ/ICtdADlQPA4QUt0sRneRIa0g20P2ai3+rWMorvNGyDAAAAAAAAAA=" + "cursor": "IH3CTzQfYFptQFnBjnyGfpphmbw0uuCt4JTcq1tQsIZRDAAAAAAAAAA=" }, { - "cursor": "IPh2YV1gCbCl7szXeyKqwIL0jJlNuMDuCbQCmjbWpyECDAAAAAAAAAA=" + "cursor": "IOZ8ocIl02ZSSkdsdSrpt8BzDKmSCK2CZJpYvoPS+ilADAAAAAAAAAA=" } ] } @@ -702,33 +702,33 @@ Response: { { "cursor": "eyJjIjoxMiwidCI6OCwiaSI6ZmFsc2V9", "node": { - "digest": "2dAUefr4VxY7187brTUcmS9xikyznS8QeEUHLqT4DVMX", + "digest": "EnghHbuhpcGuNpC1L2iqikieXAyHJUnanzg5urDmwgdz", "sender": { "objects": { "edges": [ { - "cursor": "IBpSURhn9I1wJERwRFANEXqI98bagpRsksYuuwsrFFtQDAAAAAAAAAA=" + "cursor": "IAxPzPNh6DBZ+lqchUWSL6NuS4y4vgz6pHjStN6JWpF/DAAAAAAAAAA=" }, { - "cursor": "IG5xEl2cETN2e5wvZahoOT7RPDhQ67XpDJxEYE3Y1H0wDAAAAAAAAAA=" + "cursor": "IBH2WwM6ABxADOrEJ86TGtH880uA4Ce8kx9mXnSZj2DYDAAAAAAAAAA=" }, { - "cursor": "IHZTeRSrYZdmATmYywz8eg1TCTt31tnyWtgV3HhknIL9DAAAAAAAAAA=" + "cursor": "IBoQDKT5WktB7OuMUXNBKsoqg3oDa0b1Dc7AIuqcPPDDDAAAAAAAAAA=" }, { - "cursor": "IH6AktGxIVXU/7gD2X/LJ7JCYi+0MPGulrMQHX+XHpnpDAAAAAAAAAA=" + "cursor": "IBpSURhn9I1wJERwRFANEXqI98bagpRsksYuuwsrFFtQDAAAAAAAAAA=" }, { - "cursor": "IJL01CrKxFLA2/firA8JWvn3sWBK9YqKS9NQwvIU0Q/sDAAAAAAAAAA=" + "cursor": "IElmtyPGm1GRSMWeyj+lZFiOkrmPZ2oKnWeSNwmsAXf/DAAAAAAAAAA=" }, { - "cursor": "IJq+Y73oMKn4g+rWmohDyrR8YHPPGNCztXduUlLXDJnMDAAAAAAAAAA=" + "cursor": "IGjIsZmGLOFhLkGROat6+WyaYp65xLf0mDp34jCyG3KsDAAAAAAAAAA=" }, { - "cursor": "IJ/ICtdADlQPA4QUt0sRneRIa0g20P2ai3+rWMorvNGyDAAAAAAAAAA=" + "cursor": "IH3CTzQfYFptQFnBjnyGfpphmbw0uuCt4JTcq1tQsIZRDAAAAAAAAAA=" }, { - "cursor": "IPh2YV1gCbCl7szXeyKqwIL0jJlNuMDuCbQCmjbWpyECDAAAAAAAAAA=" + "cursor": "IOZ8ocIl02ZSSkdsdSrpt8BzDKmSCK2CZJpYvoPS+ilADAAAAAAAAAA=" } ] } @@ -738,33 +738,33 @@ Response: { { "cursor": "eyJjIjoxMiwidCI6OSwiaSI6ZmFsc2V9", "node": { - "digest": "EL7ZyLYMiCub9vgKhfkRNZwJg3hyZNKuV96n6CgWrBhC", + "digest": "9G4gNmS2XYetMxBty65fKfx9iDRBetdpdNZuyK7oRd6c", "sender": { "objects": { "edges": [ { - "cursor": "IBpSURhn9I1wJERwRFANEXqI98bagpRsksYuuwsrFFtQDAAAAAAAAAA=" + "cursor": "IAxPzPNh6DBZ+lqchUWSL6NuS4y4vgz6pHjStN6JWpF/DAAAAAAAAAA=" }, { - "cursor": "IG5xEl2cETN2e5wvZahoOT7RPDhQ67XpDJxEYE3Y1H0wDAAAAAAAAAA=" + "cursor": "IBH2WwM6ABxADOrEJ86TGtH880uA4Ce8kx9mXnSZj2DYDAAAAAAAAAA=" }, { - "cursor": "IHZTeRSrYZdmATmYywz8eg1TCTt31tnyWtgV3HhknIL9DAAAAAAAAAA=" + "cursor": "IBoQDKT5WktB7OuMUXNBKsoqg3oDa0b1Dc7AIuqcPPDDDAAAAAAAAAA=" }, { - "cursor": "IH6AktGxIVXU/7gD2X/LJ7JCYi+0MPGulrMQHX+XHpnpDAAAAAAAAAA=" + "cursor": "IBpSURhn9I1wJERwRFANEXqI98bagpRsksYuuwsrFFtQDAAAAAAAAAA=" }, { - "cursor": "IJL01CrKxFLA2/firA8JWvn3sWBK9YqKS9NQwvIU0Q/sDAAAAAAAAAA=" + "cursor": "IElmtyPGm1GRSMWeyj+lZFiOkrmPZ2oKnWeSNwmsAXf/DAAAAAAAAAA=" }, { - "cursor": "IJq+Y73oMKn4g+rWmohDyrR8YHPPGNCztXduUlLXDJnMDAAAAAAAAAA=" + "cursor": "IGjIsZmGLOFhLkGROat6+WyaYp65xLf0mDp34jCyG3KsDAAAAAAAAAA=" }, { - "cursor": "IJ/ICtdADlQPA4QUt0sRneRIa0g20P2ai3+rWMorvNGyDAAAAAAAAAA=" + "cursor": "IH3CTzQfYFptQFnBjnyGfpphmbw0uuCt4JTcq1tQsIZRDAAAAAAAAAA=" }, { - "cursor": "IPh2YV1gCbCl7szXeyKqwIL0jJlNuMDuCbQCmjbWpyECDAAAAAAAAAA=" + "cursor": "IOZ8ocIl02ZSSkdsdSrpt8BzDKmSCK2CZJpYvoPS+ilADAAAAAAAAAA=" } ] } @@ -774,33 +774,33 @@ Response: { { "cursor": "eyJjIjoxMiwidCI6MTAsImkiOmZhbHNlfQ", "node": { - "digest": "X1CR6JjkMWjrK69CPe1jpctSLLvYGj2MieSEBDc4E7T", + "digest": "3ivB1ebWRpc4Si1vd8tsSY7XwaY7DrumxdS3KdXyZLVr", "sender": { "objects": { "edges": [ { - "cursor": "IBpSURhn9I1wJERwRFANEXqI98bagpRsksYuuwsrFFtQDAAAAAAAAAA=" + "cursor": "IAxPzPNh6DBZ+lqchUWSL6NuS4y4vgz6pHjStN6JWpF/DAAAAAAAAAA=" }, { - "cursor": "IG5xEl2cETN2e5wvZahoOT7RPDhQ67XpDJxEYE3Y1H0wDAAAAAAAAAA=" + "cursor": "IBH2WwM6ABxADOrEJ86TGtH880uA4Ce8kx9mXnSZj2DYDAAAAAAAAAA=" }, { - "cursor": "IHZTeRSrYZdmATmYywz8eg1TCTt31tnyWtgV3HhknIL9DAAAAAAAAAA=" + "cursor": "IBoQDKT5WktB7OuMUXNBKsoqg3oDa0b1Dc7AIuqcPPDDDAAAAAAAAAA=" }, { - "cursor": "IH6AktGxIVXU/7gD2X/LJ7JCYi+0MPGulrMQHX+XHpnpDAAAAAAAAAA=" + "cursor": "IBpSURhn9I1wJERwRFANEXqI98bagpRsksYuuwsrFFtQDAAAAAAAAAA=" }, { - "cursor": "IJL01CrKxFLA2/firA8JWvn3sWBK9YqKS9NQwvIU0Q/sDAAAAAAAAAA=" + "cursor": "IElmtyPGm1GRSMWeyj+lZFiOkrmPZ2oKnWeSNwmsAXf/DAAAAAAAAAA=" }, { - "cursor": "IJq+Y73oMKn4g+rWmohDyrR8YHPPGNCztXduUlLXDJnMDAAAAAAAAAA=" + "cursor": "IGjIsZmGLOFhLkGROat6+WyaYp65xLf0mDp34jCyG3KsDAAAAAAAAAA=" }, { - "cursor": "IJ/ICtdADlQPA4QUt0sRneRIa0g20P2ai3+rWMorvNGyDAAAAAAAAAA=" + "cursor": "IH3CTzQfYFptQFnBjnyGfpphmbw0uuCt4JTcq1tQsIZRDAAAAAAAAAA=" }, { - "cursor": "IPh2YV1gCbCl7szXeyKqwIL0jJlNuMDuCbQCmjbWpyECDAAAAAAAAAA=" + "cursor": "IOZ8ocIl02ZSSkdsdSrpt8BzDKmSCK2CZJpYvoPS+ilADAAAAAAAAAA=" } ] } diff --git a/crates/iota-graphql-e2e-tests/tests/consistency/object_at_version.exp b/crates/iota-graphql-e2e-tests/tests/consistency/object_at_version.exp index 8d52148fc7b..6e02483be2f 100644 --- a/crates/iota-graphql-e2e-tests/tests/consistency/object_at_version.exp +++ b/crates/iota-graphql-e2e-tests/tests/consistency/object_at_version.exp @@ -7,13 +7,13 @@ task 1, lines 20-57: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 7014800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7007200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 59: //# run Test::M1::create --args 0 @A created: object(2,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 61: //# create-checkpoint @@ -29,7 +29,7 @@ Response: { "asMoveObject": { "contents": { "json": { - "id": "0xcba61bbad5babbfc9773adbbbc51511f1133c3398c953826721afb929e4e8d9d", + "id": "0xc9cc2d86cf85f0448da63718fd5e7d0e47f4a707561d2f1ddcb46eabc0dcf382", "value": "0" } } @@ -41,7 +41,7 @@ Response: { task 5, line 78: //# run Test::M1::update --sender A --args object(2,0) 1 mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 1314800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 1307200, non_refundable_storage_fee: 0 task 6, line 80: //# create-checkpoint @@ -57,7 +57,7 @@ Response: { "asMoveObject": { "contents": { "json": { - "id": "0xcba61bbad5babbfc9773adbbbc51511f1133c3398c953826721afb929e4e8d9d", + "id": "0xc9cc2d86cf85f0448da63718fd5e7d0e47f4a707561d2f1ddcb46eabc0dcf382", "value": "1" } } @@ -69,7 +69,7 @@ Response: { "asMoveObject": { "contents": { "json": { - "id": "0xcba61bbad5babbfc9773adbbbc51511f1133c3398c953826721afb929e4e8d9d", + "id": "0xc9cc2d86cf85f0448da63718fd5e7d0e47f4a707561d2f1ddcb46eabc0dcf382", "value": "0" } } @@ -83,7 +83,7 @@ task 8, line 110: created: object(8,0) mutated: object(0,0) wrapped: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2553600, storage_rebate: 2302800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2538400, storage_rebate: 2287600, non_refundable_storage_fee: 0 task 9, line 112: //# create-checkpoint @@ -104,7 +104,7 @@ Response: { "asMoveObject": { "contents": { "json": { - "id": "0xcba61bbad5babbfc9773adbbbc51511f1133c3398c953826721afb929e4e8d9d", + "id": "0xc9cc2d86cf85f0448da63718fd5e7d0e47f4a707561d2f1ddcb46eabc0dcf382", "value": "1" } } @@ -118,7 +118,7 @@ task 11, line 142: mutated: object(0,0) unwrapped: object(2,0) deleted: object(8,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 2553600, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 2538400, non_refundable_storage_fee: 0 task 12, line 144: //# create-checkpoint @@ -134,7 +134,7 @@ Response: { "asMoveObject": { "contents": { "json": { - "id": "0xcba61bbad5babbfc9773adbbbc51511f1133c3398c953826721afb929e4e8d9d", + "id": "0xc9cc2d86cf85f0448da63718fd5e7d0e47f4a707561d2f1ddcb46eabc0dcf382", "value": "1" } } @@ -151,7 +151,7 @@ Response: { "asMoveObject": { "contents": { "json": { - "id": "0xcba61bbad5babbfc9773adbbbc51511f1133c3398c953826721afb929e4e8d9d", + "id": "0xc9cc2d86cf85f0448da63718fd5e7d0e47f4a707561d2f1ddcb46eabc0dcf382", "value": "0" } } @@ -164,7 +164,7 @@ task 14, line 186: //# run Test::M1::delete --sender A --args object(2,0) mutated: object(0,0) deleted: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 2302800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 2287600, non_refundable_storage_fee: 0 task 15, line 188: //# create-checkpoint @@ -205,7 +205,7 @@ Response: { "asMoveObject": { "contents": { "json": { - "id": "0xcba61bbad5babbfc9773adbbbc51511f1133c3398c953826721afb929e4e8d9d", + "id": "0xc9cc2d86cf85f0448da63718fd5e7d0e47f4a707561d2f1ddcb46eabc0dcf382", "value": "1" } } @@ -222,7 +222,7 @@ Response: { "asMoveObject": { "contents": { "json": { - "id": "0xcba61bbad5babbfc9773adbbbc51511f1133c3398c953826721afb929e4e8d9d", + "id": "0xc9cc2d86cf85f0448da63718fd5e7d0e47f4a707561d2f1ddcb46eabc0dcf382", "value": "0" } } diff --git a/crates/iota-graphql-e2e-tests/tests/consistency/objects_pagination.exp b/crates/iota-graphql-e2e-tests/tests/consistency/objects_pagination.exp index 5007dcf7251..0de0dc4a041 100644 --- a/crates/iota-graphql-e2e-tests/tests/consistency/objects_pagination.exp +++ b/crates/iota-graphql-e2e-tests/tests/consistency/objects_pagination.exp @@ -7,19 +7,19 @@ task 1, lines 16-29: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5175600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5168000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 31: //# run Test::M1::create --args 0 @A created: object(2,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 33: //# run Test::M1::create --args 1 @A created: object(3,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 35: //# create-checkpoint @@ -31,26 +31,24 @@ Response: { "data": { "one_of_these_will_yield_an_object": { "objects": { - "nodes": [] - } - }, - "if_the_other_does_not": { - "nodes": [ - { - "version": 3, - "asMoveObject": { + "nodes": [ + { + "version": 4, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xd36ba5a78e30f00425481de74079d20d96c6b3e959dbdbcf99e0cb734a139b9d", - "value": "0" + "id": "0x99897a446d53989defb6e160415609c939386acbbf3a5064839e13bdc9910da7", + "value": "1" } } } - } - ] + ] + } + }, + "if_the_other_does_not": { + "nodes": [] } } } @@ -59,13 +57,13 @@ task 6, line 67: //# run Test::M1::create --args 2 @A created: object(6,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, line 69: //# run Test::M1::create --args 3 @A created: object(7,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, line 71: //# create-checkpoint @@ -77,26 +75,24 @@ Response: { "data": { "paginating_on_checkpoint_1": { "objects": { - "nodes": [] - } - }, - "should_not_have_more_than_one_result": { - "nodes": [ - { - "version": 3, - "asMoveObject": { + "nodes": [ + { + "version": 4, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xd36ba5a78e30f00425481de74079d20d96c6b3e959dbdbcf99e0cb734a139b9d", - "value": "0" + "id": "0x99897a446d53989defb6e160415609c939386acbbf3a5064839e13bdc9910da7", + "value": "1" } } } - } - ] + ] + } + }, + "should_not_have_more_than_one_result": { + "nodes": [] } } } @@ -109,14 +105,14 @@ Response: { "objects": { "nodes": [ { - "version": 4, + "version": 3, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0x4ceffd3c1ffcf8d9db9397c5751b07aa74ed80ce74f634983b91d94777565388", - "value": "1" + "id": "0x0196134211788ab305d30e0f558ba451f6c65681c965e4ae1d1fbf4ce138aafa", + "value": "0" } } }, @@ -124,35 +120,35 @@ Response: { "version": 5, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xa3c8a81b637d4b8a7ffae7d1f01de9d75b3e112ae34bcc2b027155a4006988a6", + "id": "0x594943312691aa8916bbfc715d0c40044122de94f608d2a1cbb0c6dc49486075", "value": "2" } } }, { - "version": 6, + "version": 4, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xb7746e400cd5c28c808ff2a623e490441909a26ca33c292c271b07f19a4c9fc2", - "value": "3" + "id": "0x99897a446d53989defb6e160415609c939386acbbf3a5064839e13bdc9910da7", + "value": "1" } } }, { - "version": 3, + "version": 6, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xd36ba5a78e30f00425481de74079d20d96c6b3e959dbdbcf99e0cb734a139b9d", - "value": "0" + "id": "0xc41ad14789a46af2b7dd52aa001acfca2193147e06751a9d324c9aec011f5b54", + "value": "3" } } } @@ -170,14 +166,14 @@ Response: { "objects": { "nodes": [ { - "version": 4, + "version": 3, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0x4ceffd3c1ffcf8d9db9397c5751b07aa74ed80ce74f634983b91d94777565388", - "value": "1" + "id": "0x0196134211788ab305d30e0f558ba451f6c65681c965e4ae1d1fbf4ce138aafa", + "value": "0" } } }, @@ -185,35 +181,35 @@ Response: { "version": 5, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xa3c8a81b637d4b8a7ffae7d1f01de9d75b3e112ae34bcc2b027155a4006988a6", + "id": "0x594943312691aa8916bbfc715d0c40044122de94f608d2a1cbb0c6dc49486075", "value": "2" } } }, { - "version": 6, + "version": 4, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xb7746e400cd5c28c808ff2a623e490441909a26ca33c292c271b07f19a4c9fc2", - "value": "3" + "id": "0x99897a446d53989defb6e160415609c939386acbbf3a5064839e13bdc9910da7", + "value": "1" } } }, { - "version": 3, + "version": 6, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xd36ba5a78e30f00425481de74079d20d96c6b3e959dbdbcf99e0cb734a139b9d", - "value": "0" + "id": "0xc41ad14789a46af2b7dd52aa001acfca2193147e06751a9d324c9aec011f5b54", + "value": "3" } } } @@ -227,7 +223,7 @@ task 12, lines 147-148: //# programmable --sender A --inputs object(2,0) object(3,0) object(6,0) object(7,0) @B //> TransferObjects([Input(0), Input(1), Input(2), Input(3)], Input(4)) mutated: object(0,0), object(2,0), object(3,0), object(6,0), object(7,0) -gas summary: computation_cost: 1000000, storage_cost: 6247200, storage_rebate: 5259200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6209200, storage_rebate: 5228800, non_refundable_storage_fee: 0 task 13, line 150: //# create-checkpoint @@ -241,14 +237,14 @@ Response: { "objects": { "nodes": [ { - "version": 6, + "version": 4, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xb7746e400cd5c28c808ff2a623e490441909a26ca33c292c271b07f19a4c9fc2", - "value": "3" + "id": "0x99897a446d53989defb6e160415609c939386acbbf3a5064839e13bdc9910da7", + "value": "1" } }, "owner_at_latest_state_has_iota_only": { @@ -256,28 +252,28 @@ Response: { "objects": { "nodes": [ { - "version": 1, + "version": 3, "contents": { "type": { - "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA>" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0x1a52511867f48d7024447044500d117a88f7c6da82946c92c62ebb0b2b145b50", - "balance": { - "value": "300000000000000" - } + "id": "0x0196134211788ab305d30e0f558ba451f6c65681c965e4ae1d1fbf4ce138aafa", + "value": "0" } } }, { - "version": 4, + "version": 1, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA>" }, "json": { - "id": "0x4ceffd3c1ffcf8d9db9397c5751b07aa74ed80ce74f634983b91d94777565388", - "value": "1" + "id": "0x1a52511867f48d7024447044500d117a88f7c6da82946c92c62ebb0b2b145b50", + "balance": { + "value": "300000000000000" + } } } }, @@ -285,35 +281,35 @@ Response: { "version": 5, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xa3c8a81b637d4b8a7ffae7d1f01de9d75b3e112ae34bcc2b027155a4006988a6", + "id": "0x594943312691aa8916bbfc715d0c40044122de94f608d2a1cbb0c6dc49486075", "value": "2" } } }, { - "version": 6, + "version": 4, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xb7746e400cd5c28c808ff2a623e490441909a26ca33c292c271b07f19a4c9fc2", - "value": "3" + "id": "0x99897a446d53989defb6e160415609c939386acbbf3a5064839e13bdc9910da7", + "value": "1" } } }, { - "version": 3, + "version": 6, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xd36ba5a78e30f00425481de74079d20d96c6b3e959dbdbcf99e0cb734a139b9d", - "value": "0" + "id": "0xc41ad14789a46af2b7dd52aa001acfca2193147e06751a9d324c9aec011f5b54", + "value": "3" } } } @@ -323,14 +319,14 @@ Response: { } }, { - "version": 3, + "version": 6, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xd36ba5a78e30f00425481de74079d20d96c6b3e959dbdbcf99e0cb734a139b9d", - "value": "0" + "id": "0xc41ad14789a46af2b7dd52aa001acfca2193147e06751a9d324c9aec011f5b54", + "value": "3" } }, "owner_at_latest_state_has_iota_only": { @@ -338,28 +334,28 @@ Response: { "objects": { "nodes": [ { - "version": 1, + "version": 3, "contents": { "type": { - "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA>" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0x1a52511867f48d7024447044500d117a88f7c6da82946c92c62ebb0b2b145b50", - "balance": { - "value": "300000000000000" - } + "id": "0x0196134211788ab305d30e0f558ba451f6c65681c965e4ae1d1fbf4ce138aafa", + "value": "0" } } }, { - "version": 4, + "version": 1, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA>" }, "json": { - "id": "0x4ceffd3c1ffcf8d9db9397c5751b07aa74ed80ce74f634983b91d94777565388", - "value": "1" + "id": "0x1a52511867f48d7024447044500d117a88f7c6da82946c92c62ebb0b2b145b50", + "balance": { + "value": "300000000000000" + } } } }, @@ -367,35 +363,35 @@ Response: { "version": 5, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xa3c8a81b637d4b8a7ffae7d1f01de9d75b3e112ae34bcc2b027155a4006988a6", + "id": "0x594943312691aa8916bbfc715d0c40044122de94f608d2a1cbb0c6dc49486075", "value": "2" } } }, { - "version": 6, + "version": 4, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xb7746e400cd5c28c808ff2a623e490441909a26ca33c292c271b07f19a4c9fc2", - "value": "3" + "id": "0x99897a446d53989defb6e160415609c939386acbbf3a5064839e13bdc9910da7", + "value": "1" } } }, { - "version": 3, + "version": 6, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xd36ba5a78e30f00425481de74079d20d96c6b3e959dbdbcf99e0cb734a139b9d", - "value": "0" + "id": "0xc41ad14789a46af2b7dd52aa001acfca2193147e06751a9d324c9aec011f5b54", + "value": "3" } } } @@ -410,15 +406,15 @@ Response: { "before_obj_6_0_at_checkpoint_2": { "nodes": [ { - "version": 4, + "version": 3, "asMoveObject": { "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0x4ceffd3c1ffcf8d9db9397c5751b07aa74ed80ce74f634983b91d94777565388", - "value": "1" + "id": "0x0196134211788ab305d30e0f558ba451f6c65681c965e4ae1d1fbf4ce138aafa", + "value": "0" } }, "note_that_owner_result_should_reflect_latest_state": { @@ -426,28 +422,28 @@ Response: { "objects": { "nodes": [ { - "version": 1, + "version": 3, "contents": { "type": { - "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA>" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0x1a52511867f48d7024447044500d117a88f7c6da82946c92c62ebb0b2b145b50", - "balance": { - "value": "300000000000000" - } + "id": "0x0196134211788ab305d30e0f558ba451f6c65681c965e4ae1d1fbf4ce138aafa", + "value": "0" } } }, { - "version": 4, + "version": 1, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA>" }, "json": { - "id": "0x4ceffd3c1ffcf8d9db9397c5751b07aa74ed80ce74f634983b91d94777565388", - "value": "1" + "id": "0x1a52511867f48d7024447044500d117a88f7c6da82946c92c62ebb0b2b145b50", + "balance": { + "value": "300000000000000" + } } } }, @@ -455,35 +451,35 @@ Response: { "version": 5, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xa3c8a81b637d4b8a7ffae7d1f01de9d75b3e112ae34bcc2b027155a4006988a6", + "id": "0x594943312691aa8916bbfc715d0c40044122de94f608d2a1cbb0c6dc49486075", "value": "2" } } }, { - "version": 6, + "version": 4, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xb7746e400cd5c28c808ff2a623e490441909a26ca33c292c271b07f19a4c9fc2", - "value": "3" + "id": "0x99897a446d53989defb6e160415609c939386acbbf3a5064839e13bdc9910da7", + "value": "1" } } }, { - "version": 3, + "version": 6, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xd36ba5a78e30f00425481de74079d20d96c6b3e959dbdbcf99e0cb734a139b9d", - "value": "0" + "id": "0xc41ad14789a46af2b7dd52aa001acfca2193147e06751a9d324c9aec011f5b54", + "value": "3" } } } @@ -548,11 +544,11 @@ Response: { "version": 7, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0x4ceffd3c1ffcf8d9db9397c5751b07aa74ed80ce74f634983b91d94777565388", - "value": "1" + "id": "0x0196134211788ab305d30e0f558ba451f6c65681c965e4ae1d1fbf4ce138aafa", + "value": "0" } } }, @@ -560,10 +556,10 @@ Response: { "version": 7, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xa3c8a81b637d4b8a7ffae7d1f01de9d75b3e112ae34bcc2b027155a4006988a6", + "id": "0x594943312691aa8916bbfc715d0c40044122de94f608d2a1cbb0c6dc49486075", "value": "2" } } @@ -572,11 +568,11 @@ Response: { "version": 7, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xb7746e400cd5c28c808ff2a623e490441909a26ca33c292c271b07f19a4c9fc2", - "value": "3" + "id": "0x99897a446d53989defb6e160415609c939386acbbf3a5064839e13bdc9910da7", + "value": "1" } } }, @@ -584,11 +580,11 @@ Response: { "version": 7, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xd36ba5a78e30f00425481de74079d20d96c6b3e959dbdbcf99e0cb734a139b9d", - "value": "0" + "id": "0xc41ad14789a46af2b7dd52aa001acfca2193147e06751a9d324c9aec011f5b54", + "value": "3" } } } @@ -606,14 +602,14 @@ Response: { "objects": { "nodes": [ { - "version": 4, + "version": 3, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0x4ceffd3c1ffcf8d9db9397c5751b07aa74ed80ce74f634983b91d94777565388", - "value": "1" + "id": "0x0196134211788ab305d30e0f558ba451f6c65681c965e4ae1d1fbf4ce138aafa", + "value": "0" } } }, @@ -621,35 +617,35 @@ Response: { "version": 5, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xa3c8a81b637d4b8a7ffae7d1f01de9d75b3e112ae34bcc2b027155a4006988a6", + "id": "0x594943312691aa8916bbfc715d0c40044122de94f608d2a1cbb0c6dc49486075", "value": "2" } } }, { - "version": 6, + "version": 4, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xb7746e400cd5c28c808ff2a623e490441909a26ca33c292c271b07f19a4c9fc2", - "value": "3" + "id": "0x99897a446d53989defb6e160415609c939386acbbf3a5064839e13bdc9910da7", + "value": "1" } } }, { - "version": 3, + "version": 6, "contents": { "type": { - "repr": "0x8a6a975f939547bc1f7cb5ae18ff88c795bd82f8f97d08ba92d62960006db5da::M1::Object" + "repr": "0xf497316682c0ad2d0b757399e9db83e3ed3bceadaedbaad12029111c331445d4::M1::Object" }, "json": { - "id": "0xd36ba5a78e30f00425481de74079d20d96c6b3e959dbdbcf99e0cb734a139b9d", - "value": "0" + "id": "0xc41ad14789a46af2b7dd52aa001acfca2193147e06751a9d324c9aec011f5b54", + "value": "3" } } } diff --git a/crates/iota-graphql-e2e-tests/tests/consistency/objects_pagination_single.exp b/crates/iota-graphql-e2e-tests/tests/consistency/objects_pagination_single.exp index c594117c98e..fef91b92f80 100644 --- a/crates/iota-graphql-e2e-tests/tests/consistency/objects_pagination_single.exp +++ b/crates/iota-graphql-e2e-tests/tests/consistency/objects_pagination_single.exp @@ -7,24 +7,24 @@ task 1, lines 11-28: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5456800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5449200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 30: //# run Test::M1::create --args 0 @A created: object(2,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 32: //# run Test::M1::create --args 1 @A created: object(3,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 34: //# run Test::M1::update --sender A --args 100 object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 1314800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 1307200, non_refundable_storage_fee: 0 task 5, line 36: //# create-checkpoint @@ -46,10 +46,10 @@ Response: { "version": 4, "contents": { "type": { - "repr": "0xe9f7963289f324cd270a9acebd20bd6311720b240cbb117ef556f300abaf089f::M1::Object" + "repr": "0x8ba0645055ca9407f1fda27d9c5a12697215f596238dc5db7eaf434471bd1e0a::M1::Object" }, "json": { - "id": "0x0671f638c9a8072be327c0a5edb2238c33e2f051dbb7a9154c17d507e95fb77b", + "id": "0x0ba09e699b7a2c69fcf9e5c3b84610345a7f92bc8aad27d06a82aa10a94f0cf5", "value": "100" } } @@ -63,7 +63,7 @@ Response: { task 7, line 68: //# run Test::M1::update --sender A --args 200 object(2,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 2302800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 2287600, non_refundable_storage_fee: 0 task 8, line 70: //# create-checkpoint @@ -85,10 +85,10 @@ Response: { "version": 4, "contents": { "type": { - "repr": "0xe9f7963289f324cd270a9acebd20bd6311720b240cbb117ef556f300abaf089f::M1::Object" + "repr": "0x8ba0645055ca9407f1fda27d9c5a12697215f596238dc5db7eaf434471bd1e0a::M1::Object" }, "json": { - "id": "0x0671f638c9a8072be327c0a5edb2238c33e2f051dbb7a9154c17d507e95fb77b", + "id": "0x0ba09e699b7a2c69fcf9e5c3b84610345a7f92bc8aad27d06a82aa10a94f0cf5", "value": "100" } } @@ -110,10 +110,10 @@ Response: { "version": 5, "contents": { "type": { - "repr": "0xe9f7963289f324cd270a9acebd20bd6311720b240cbb117ef556f300abaf089f::M1::Object" + "repr": "0x8ba0645055ca9407f1fda27d9c5a12697215f596238dc5db7eaf434471bd1e0a::M1::Object" }, "json": { - "id": "0x0671f638c9a8072be327c0a5edb2238c33e2f051dbb7a9154c17d507e95fb77b", + "id": "0x0ba09e699b7a2c69fcf9e5c3b84610345a7f92bc8aad27d06a82aa10a94f0cf5", "value": "200" } } @@ -122,10 +122,10 @@ Response: { "version": 4, "contents": { "type": { - "repr": "0xe9f7963289f324cd270a9acebd20bd6311720b240cbb117ef556f300abaf089f::M1::Object" + "repr": "0x8ba0645055ca9407f1fda27d9c5a12697215f596238dc5db7eaf434471bd1e0a::M1::Object" }, "json": { - "id": "0xc9109da65e12e07a685245507fe67841b63bbf2cd7d400516c77d65947b35a19", + "id": "0x1064f0e2c1402df49da99967e53770ca27892458ce8a9ea983db9d1f13d8ce61", "value": "1" } } @@ -145,10 +145,10 @@ Response: { "version": 5, "contents": { "type": { - "repr": "0xe9f7963289f324cd270a9acebd20bd6311720b240cbb117ef556f300abaf089f::M1::Object" + "repr": "0x8ba0645055ca9407f1fda27d9c5a12697215f596238dc5db7eaf434471bd1e0a::M1::Object" }, "json": { - "id": "0x0671f638c9a8072be327c0a5edb2238c33e2f051dbb7a9154c17d507e95fb77b", + "id": "0x0ba09e699b7a2c69fcf9e5c3b84610345a7f92bc8aad27d06a82aa10a94f0cf5", "value": "200" } }, @@ -160,10 +160,10 @@ Response: { "version": 5, "contents": { "type": { - "repr": "0xe9f7963289f324cd270a9acebd20bd6311720b240cbb117ef556f300abaf089f::M1::Object" + "repr": "0x8ba0645055ca9407f1fda27d9c5a12697215f596238dc5db7eaf434471bd1e0a::M1::Object" }, "json": { - "id": "0x0671f638c9a8072be327c0a5edb2238c33e2f051dbb7a9154c17d507e95fb77b", + "id": "0x0ba09e699b7a2c69fcf9e5c3b84610345a7f92bc8aad27d06a82aa10a94f0cf5", "value": "200" } } @@ -172,10 +172,10 @@ Response: { "version": 4, "contents": { "type": { - "repr": "0xe9f7963289f324cd270a9acebd20bd6311720b240cbb117ef556f300abaf089f::M1::Object" + "repr": "0x8ba0645055ca9407f1fda27d9c5a12697215f596238dc5db7eaf434471bd1e0a::M1::Object" }, "json": { - "id": "0xc9109da65e12e07a685245507fe67841b63bbf2cd7d400516c77d65947b35a19", + "id": "0x1064f0e2c1402df49da99967e53770ca27892458ce8a9ea983db9d1f13d8ce61", "value": "1" } } @@ -194,7 +194,7 @@ Response: { task 11, line 180: //# run Test::M1::update --sender A --args 300 object(3,0) mutated: object(0,0), object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 2302800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 2287600, non_refundable_storage_fee: 0 task 12, line 182: //# create-checkpoint @@ -216,10 +216,10 @@ Response: { "version": 5, "contents": { "type": { - "repr": "0xe9f7963289f324cd270a9acebd20bd6311720b240cbb117ef556f300abaf089f::M1::Object" + "repr": "0x8ba0645055ca9407f1fda27d9c5a12697215f596238dc5db7eaf434471bd1e0a::M1::Object" }, "json": { - "id": "0x0671f638c9a8072be327c0a5edb2238c33e2f051dbb7a9154c17d507e95fb77b", + "id": "0x0ba09e699b7a2c69fcf9e5c3b84610345a7f92bc8aad27d06a82aa10a94f0cf5", "value": "200" } }, @@ -231,10 +231,10 @@ Response: { "version": 5, "contents": { "type": { - "repr": "0xe9f7963289f324cd270a9acebd20bd6311720b240cbb117ef556f300abaf089f::M1::Object" + "repr": "0x8ba0645055ca9407f1fda27d9c5a12697215f596238dc5db7eaf434471bd1e0a::M1::Object" }, "json": { - "id": "0x0671f638c9a8072be327c0a5edb2238c33e2f051dbb7a9154c17d507e95fb77b", + "id": "0x0ba09e699b7a2c69fcf9e5c3b84610345a7f92bc8aad27d06a82aa10a94f0cf5", "value": "200" } } @@ -243,10 +243,10 @@ Response: { "version": 4, "contents": { "type": { - "repr": "0xe9f7963289f324cd270a9acebd20bd6311720b240cbb117ef556f300abaf089f::M1::Object" + "repr": "0x8ba0645055ca9407f1fda27d9c5a12697215f596238dc5db7eaf434471bd1e0a::M1::Object" }, "json": { - "id": "0xc9109da65e12e07a685245507fe67841b63bbf2cd7d400516c77d65947b35a19", + "id": "0x1064f0e2c1402df49da99967e53770ca27892458ce8a9ea983db9d1f13d8ce61", "value": "1" } } @@ -273,10 +273,10 @@ Response: { "version": 5, "contents": { "type": { - "repr": "0xe9f7963289f324cd270a9acebd20bd6311720b240cbb117ef556f300abaf089f::M1::Object" + "repr": "0x8ba0645055ca9407f1fda27d9c5a12697215f596238dc5db7eaf434471bd1e0a::M1::Object" }, "json": { - "id": "0x0671f638c9a8072be327c0a5edb2238c33e2f051dbb7a9154c17d507e95fb77b", + "id": "0x0ba09e699b7a2c69fcf9e5c3b84610345a7f92bc8aad27d06a82aa10a94f0cf5", "value": "200" } } @@ -285,10 +285,10 @@ Response: { "version": 6, "contents": { "type": { - "repr": "0xe9f7963289f324cd270a9acebd20bd6311720b240cbb117ef556f300abaf089f::M1::Object" + "repr": "0x8ba0645055ca9407f1fda27d9c5a12697215f596238dc5db7eaf434471bd1e0a::M1::Object" }, "json": { - "id": "0xc9109da65e12e07a685245507fe67841b63bbf2cd7d400516c77d65947b35a19", + "id": "0x1064f0e2c1402df49da99967e53770ca27892458ce8a9ea983db9d1f13d8ce61", "value": "300" } } @@ -308,10 +308,10 @@ Response: { "version": 5, "contents": { "type": { - "repr": "0xe9f7963289f324cd270a9acebd20bd6311720b240cbb117ef556f300abaf089f::M1::Object" + "repr": "0x8ba0645055ca9407f1fda27d9c5a12697215f596238dc5db7eaf434471bd1e0a::M1::Object" }, "json": { - "id": "0x0671f638c9a8072be327c0a5edb2238c33e2f051dbb7a9154c17d507e95fb77b", + "id": "0x0ba09e699b7a2c69fcf9e5c3b84610345a7f92bc8aad27d06a82aa10a94f0cf5", "value": "200" } }, @@ -323,10 +323,10 @@ Response: { "version": 5, "contents": { "type": { - "repr": "0xe9f7963289f324cd270a9acebd20bd6311720b240cbb117ef556f300abaf089f::M1::Object" + "repr": "0x8ba0645055ca9407f1fda27d9c5a12697215f596238dc5db7eaf434471bd1e0a::M1::Object" }, "json": { - "id": "0x0671f638c9a8072be327c0a5edb2238c33e2f051dbb7a9154c17d507e95fb77b", + "id": "0x0ba09e699b7a2c69fcf9e5c3b84610345a7f92bc8aad27d06a82aa10a94f0cf5", "value": "200" } } @@ -335,10 +335,10 @@ Response: { "version": 6, "contents": { "type": { - "repr": "0xe9f7963289f324cd270a9acebd20bd6311720b240cbb117ef556f300abaf089f::M1::Object" + "repr": "0x8ba0645055ca9407f1fda27d9c5a12697215f596238dc5db7eaf434471bd1e0a::M1::Object" }, "json": { - "id": "0xc9109da65e12e07a685245507fe67841b63bbf2cd7d400516c77d65947b35a19", + "id": "0x1064f0e2c1402df49da99967e53770ca27892458ce8a9ea983db9d1f13d8ce61", "value": "300" } } diff --git a/crates/iota-graphql-e2e-tests/tests/consistency/performance/many_objects.exp b/crates/iota-graphql-e2e-tests/tests/consistency/performance/many_objects.exp index 4e3afbe7ef3..51eaea008d6 100644 --- a/crates/iota-graphql-e2e-tests/tests/consistency/performance/many_objects.exp +++ b/crates/iota-graphql-e2e-tests/tests/consistency/performance/many_objects.exp @@ -7,13 +7,13 @@ task 1, lines 13-36: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 6118000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6110400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 38: //# run Test::M1::create_many --sender A --args @A created: object(2,0), object(2,1), object(2,2), object(2,3), object(2,4), object(2,5), object(2,6), object(2,7), object(2,8), object(2,9), object(2,10), object(2,11), object(2,12), object(2,13), object(2,14), object(2,15), object(2,16), object(2,17), object(2,18), object(2,19), object(2,20), object(2,21), object(2,22), object(2,23), object(2,24), object(2,25), object(2,26), object(2,27), object(2,28), object(2,29), object(2,30), object(2,31), object(2,32), object(2,33), object(2,34), object(2,35), object(2,36), object(2,37), object(2,38), object(2,39), object(2,40), object(2,41), object(2,42), object(2,43), object(2,44), object(2,45), object(2,46), object(2,47), object(2,48), object(2,49), object(2,50), object(2,51), object(2,52), object(2,53), object(2,54), object(2,55), object(2,56), object(2,57), object(2,58), object(2,59), object(2,60), object(2,61), object(2,62), object(2,63), object(2,64), object(2,65), object(2,66), object(2,67), object(2,68), object(2,69), object(2,70), object(2,71), object(2,72), object(2,73), object(2,74), object(2,75), object(2,76), object(2,77), object(2,78), object(2,79), object(2,80), object(2,81), object(2,82), object(2,83), object(2,84), object(2,85), object(2,86), object(2,87), object(2,88), object(2,89), object(2,90), object(2,91), object(2,92), object(2,93), object(2,94), object(2,95), object(2,96), object(2,97), object(2,98), object(2,99), object(2,100), object(2,101), object(2,102), object(2,103), object(2,104), object(2,105), object(2,106), object(2,107), object(2,108), object(2,109), object(2,110), object(2,111), object(2,112), object(2,113), object(2,114), object(2,115), object(2,116), object(2,117), object(2,118), object(2,119), object(2,120), object(2,121), object(2,122), object(2,123), object(2,124), object(2,125), object(2,126), object(2,127), object(2,128), object(2,129), object(2,130), object(2,131), object(2,132), object(2,133), object(2,134), object(2,135), object(2,136), object(2,137), object(2,138), object(2,139), object(2,140), object(2,141), object(2,142), object(2,143), object(2,144), object(2,145), object(2,146), object(2,147), object(2,148), object(2,149), object(2,150), object(2,151), object(2,152), object(2,153), object(2,154), object(2,155), object(2,156), object(2,157), object(2,158), object(2,159), object(2,160), object(2,161), object(2,162), object(2,163), object(2,164), object(2,165), object(2,166), object(2,167), object(2,168), object(2,169), object(2,170), object(2,171), object(2,172), object(2,173), object(2,174), object(2,175), object(2,176), object(2,177), object(2,178), object(2,179), object(2,180), object(2,181), object(2,182), object(2,183), object(2,184), object(2,185), object(2,186), object(2,187), object(2,188), object(2,189), object(2,190), object(2,191), object(2,192), object(2,193), object(2,194), object(2,195), object(2,196), object(2,197), object(2,198), object(2,199), object(2,200), object(2,201), object(2,202), object(2,203), object(2,204), object(2,205), object(2,206), object(2,207), object(2,208), object(2,209), object(2,210), object(2,211), object(2,212), object(2,213), object(2,214), object(2,215), object(2,216), object(2,217), object(2,218), object(2,219), object(2,220), object(2,221), object(2,222), object(2,223), object(2,224), object(2,225), object(2,226), object(2,227), object(2,228), object(2,229), object(2,230), object(2,231), object(2,232), object(2,233), object(2,234), object(2,235), object(2,236), object(2,237), object(2,238), object(2,239), object(2,240), object(2,241), object(2,242), object(2,243), object(2,244), object(2,245), object(2,246), object(2,247), object(2,248), object(2,249), object(2,250), object(2,251), object(2,252), object(2,253), object(2,254), object(2,255), object(2,256), object(2,257), object(2,258), object(2,259), object(2,260), object(2,261), object(2,262), object(2,263), object(2,264), object(2,265), object(2,266), object(2,267), object(2,268), object(2,269), object(2,270), object(2,271), object(2,272), object(2,273), object(2,274), object(2,275), object(2,276), object(2,277), object(2,278), object(2,279), object(2,280), object(2,281), object(2,282), object(2,283), object(2,284), object(2,285), object(2,286), object(2,287), object(2,288), object(2,289), object(2,290), object(2,291), object(2,292), object(2,293), object(2,294), object(2,295), object(2,296), object(2,297), object(2,298), object(2,299), object(2,300), object(2,301), object(2,302), object(2,303), object(2,304), object(2,305), object(2,306), object(2,307), object(2,308), object(2,309), object(2,310), object(2,311), object(2,312), object(2,313), object(2,314), object(2,315), object(2,316), object(2,317), object(2,318), object(2,319), object(2,320), object(2,321), object(2,322), object(2,323), object(2,324), object(2,325), object(2,326), object(2,327), object(2,328), object(2,329), object(2,330), object(2,331), object(2,332), object(2,333), object(2,334), object(2,335), object(2,336), object(2,337), object(2,338), object(2,339), object(2,340), object(2,341), object(2,342), object(2,343), object(2,344), object(2,345), object(2,346), object(2,347), object(2,348), object(2,349), object(2,350), object(2,351), object(2,352), object(2,353), object(2,354), object(2,355), object(2,356), object(2,357), object(2,358), object(2,359), object(2,360), object(2,361), object(2,362), object(2,363), object(2,364), object(2,365), object(2,366), object(2,367), object(2,368), object(2,369), object(2,370), object(2,371), object(2,372), object(2,373), object(2,374), object(2,375), object(2,376), object(2,377), object(2,378), object(2,379), object(2,380), object(2,381), object(2,382), object(2,383), object(2,384), object(2,385), object(2,386), object(2,387), object(2,388), object(2,389), object(2,390), object(2,391), object(2,392), object(2,393), object(2,394), object(2,395), object(2,396), object(2,397), object(2,398), object(2,399), object(2,400), object(2,401), object(2,402), object(2,403), object(2,404), object(2,405), object(2,406), object(2,407), object(2,408), object(2,409), object(2,410), object(2,411), object(2,412), object(2,413), object(2,414), object(2,415), object(2,416), object(2,417), object(2,418), object(2,419), object(2,420), object(2,421), object(2,422), object(2,423), object(2,424), object(2,425), object(2,426), object(2,427), object(2,428), object(2,429), object(2,430), object(2,431), object(2,432), object(2,433), object(2,434), object(2,435), object(2,436), object(2,437), object(2,438), object(2,439), object(2,440), object(2,441), object(2,442), object(2,443), object(2,444), object(2,445), object(2,446), object(2,447), object(2,448), object(2,449), object(2,450), object(2,451), object(2,452), object(2,453), object(2,454), object(2,455), object(2,456), object(2,457), object(2,458), object(2,459), object(2,460), object(2,461), object(2,462), object(2,463), object(2,464), object(2,465), object(2,466), object(2,467), object(2,468), object(2,469), object(2,470), object(2,471), object(2,472), object(2,473), object(2,474), object(2,475), object(2,476), object(2,477), object(2,478), object(2,479), object(2,480), object(2,481), object(2,482), object(2,483), object(2,484), object(2,485), object(2,486), object(2,487), object(2,488), object(2,489), object(2,490), object(2,491), object(2,492), object(2,493), object(2,494), object(2,495), object(2,496), object(2,497), object(2,498), object(2,499) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 658388000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 654580400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 40: //# create-checkpoint 2 @@ -35,11 +35,11 @@ Response: { }, "contents": { "json": { - "id": "0xff39576b3855dc3ab3b4e4867613eb1bd5276f570bcd58f31a18a6f623a36aff", - "value": "340" + "id": "0xfdfdbe2471965f393fb0f1e2a849804c2951742cef2833aa5630a982927e65e5", + "value": "459" }, "type": { - "repr": "0x3b535629f01861a7b0b84cea477b926d350b1d3fb1ef5ed43c09b53d75992a16::M1::Object" + "repr": "0x7a9f66657f48f8cac66483bb31b0e47a4ad4331237664b0250794d720bff607c::M1::Object" } } } @@ -54,11 +54,11 @@ Response: { }, "contents": { "json": { - "id": "0xff3cc703d3b86054a49761ab7a448d6fe7b7ea0aa5ba4ba84e02093d1fd45e2b", - "value": "70" + "id": "0xff793ecbad3b0cb648a7f8a676d41abf9479e51e8a70f661fd8a01f1053fb117", + "value": "338" }, "type": { - "repr": "0x3b535629f01861a7b0b84cea477b926d350b1d3fb1ef5ed43c09b53d75992a16::M1::Object" + "repr": "0x7a9f66657f48f8cac66483bb31b0e47a4ad4331237664b0250794d720bff607c::M1::Object" } } } @@ -76,11 +76,11 @@ Response: { }, "contents": { "json": { - "id": "0xfefd3a70280fa3736ac30e69fbab1bddd7e8e06891e6d46ed0fdf8c56cdddf1a", - "value": "158" + "id": "0xfc58a4a75f805dda8348e39cbabdfd88a9358a37207dc08086618c8539f2c863", + "value": "314" }, "type": { - "repr": "0x3b535629f01861a7b0b84cea477b926d350b1d3fb1ef5ed43c09b53d75992a16::M1::Object" + "repr": "0x7a9f66657f48f8cac66483bb31b0e47a4ad4331237664b0250794d720bff607c::M1::Object" } } }, @@ -92,11 +92,11 @@ Response: { }, "contents": { "json": { - "id": "0xff324921a4cfe105413f9fd991d67fa546f4ff473e18fb653201f504206aae7a", - "value": "25" + "id": "0xfca8a7528a05b7a8386c8a976be57d6ddcc1a4e9697aa4c207d3853e1f7a42d8", + "value": "296" }, "type": { - "repr": "0x3b535629f01861a7b0b84cea477b926d350b1d3fb1ef5ed43c09b53d75992a16::M1::Object" + "repr": "0x7a9f66657f48f8cac66483bb31b0e47a4ad4331237664b0250794d720bff607c::M1::Object" } } }, @@ -108,11 +108,11 @@ Response: { }, "contents": { "json": { - "id": "0xff39576b3855dc3ab3b4e4867613eb1bd5276f570bcd58f31a18a6f623a36aff", - "value": "340" + "id": "0xfdfdbe2471965f393fb0f1e2a849804c2951742cef2833aa5630a982927e65e5", + "value": "459" }, "type": { - "repr": "0x3b535629f01861a7b0b84cea477b926d350b1d3fb1ef5ed43c09b53d75992a16::M1::Object" + "repr": "0x7a9f66657f48f8cac66483bb31b0e47a4ad4331237664b0250794d720bff607c::M1::Object" } } }, @@ -124,11 +124,11 @@ Response: { }, "contents": { "json": { - "id": "0xff3cc703d3b86054a49761ab7a448d6fe7b7ea0aa5ba4ba84e02093d1fd45e2b", - "value": "70" + "id": "0xff793ecbad3b0cb648a7f8a676d41abf9479e51e8a70f661fd8a01f1053fb117", + "value": "338" }, "type": { - "repr": "0x3b535629f01861a7b0b84cea477b926d350b1d3fb1ef5ed43c09b53d75992a16::M1::Object" + "repr": "0x7a9f66657f48f8cac66483bb31b0e47a4ad4331237664b0250794d720bff607c::M1::Object" } } } @@ -141,17 +141,17 @@ Response: { task 5, line 85: //# transfer-object 2,499 --sender A --recipient B mutated: object(0,0), object(2,499) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 2302800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 2287600, non_refundable_storage_fee: 0 task 6, line 87: //# transfer-object 2,498 --sender A --recipient B mutated: object(0,0), object(2,498) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 2302800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 2287600, non_refundable_storage_fee: 0 task 7, line 89: //# transfer-object 2,497 --sender A --recipient B mutated: object(0,0), object(2,497) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 2302800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 2287600, non_refundable_storage_fee: 0 task 8, line 91: //# view-object 2,498 @@ -163,7 +163,7 @@ Contents: Test::M1::Object { bytes: fake(2,498), }, }, - value: 340u64, + value: 459u64, } task 9, line 93: @@ -176,7 +176,7 @@ Contents: Test::M1::Object { bytes: fake(2,497), }, }, - value: 25u64, + value: 296u64, } task 10, line 95: @@ -199,11 +199,11 @@ Response: { }, "contents": { "json": { - "id": "0xff324921a4cfe105413f9fd991d67fa546f4ff473e18fb653201f504206aae7a", - "value": "25" + "id": "0xfca8a7528a05b7a8386c8a976be57d6ddcc1a4e9697aa4c207d3853e1f7a42d8", + "value": "296" }, "type": { - "repr": "0x3b535629f01861a7b0b84cea477b926d350b1d3fb1ef5ed43c09b53d75992a16::M1::Object" + "repr": "0x7a9f66657f48f8cac66483bb31b0e47a4ad4331237664b0250794d720bff607c::M1::Object" } } } @@ -218,11 +218,11 @@ Response: { }, "contents": { "json": { - "id": "0xff39576b3855dc3ab3b4e4867613eb1bd5276f570bcd58f31a18a6f623a36aff", - "value": "340" + "id": "0xfdfdbe2471965f393fb0f1e2a849804c2951742cef2833aa5630a982927e65e5", + "value": "459" }, "type": { - "repr": "0x3b535629f01861a7b0b84cea477b926d350b1d3fb1ef5ed43c09b53d75992a16::M1::Object" + "repr": "0x7a9f66657f48f8cac66483bb31b0e47a4ad4331237664b0250794d720bff607c::M1::Object" } } } @@ -237,11 +237,11 @@ Response: { }, "contents": { "json": { - "id": "0xff3cc703d3b86054a49761ab7a448d6fe7b7ea0aa5ba4ba84e02093d1fd45e2b", - "value": "70" + "id": "0xff793ecbad3b0cb648a7f8a676d41abf9479e51e8a70f661fd8a01f1053fb117", + "value": "338" }, "type": { - "repr": "0x3b535629f01861a7b0b84cea477b926d350b1d3fb1ef5ed43c09b53d75992a16::M1::Object" + "repr": "0x7a9f66657f48f8cac66483bb31b0e47a4ad4331237664b0250794d720bff607c::M1::Object" } } } @@ -260,11 +260,11 @@ Response: { }, "contents": { "json": { - "id": "0xfefd3a70280fa3736ac30e69fbab1bddd7e8e06891e6d46ed0fdf8c56cdddf1a", - "value": "158" + "id": "0xfc58a4a75f805dda8348e39cbabdfd88a9358a37207dc08086618c8539f2c863", + "value": "314" }, "type": { - "repr": "0x3b535629f01861a7b0b84cea477b926d350b1d3fb1ef5ed43c09b53d75992a16::M1::Object" + "repr": "0x7a9f66657f48f8cac66483bb31b0e47a4ad4331237664b0250794d720bff607c::M1::Object" } } } @@ -287,11 +287,11 @@ Response: { }, "contents": { "json": { - "id": "0xff3cc703d3b86054a49761ab7a448d6fe7b7ea0aa5ba4ba84e02093d1fd45e2b", - "value": "70" + "id": "0xff793ecbad3b0cb648a7f8a676d41abf9479e51e8a70f661fd8a01f1053fb117", + "value": "338" }, "type": { - "repr": "0x3b535629f01861a7b0b84cea477b926d350b1d3fb1ef5ed43c09b53d75992a16::M1::Object" + "repr": "0x7a9f66657f48f8cac66483bb31b0e47a4ad4331237664b0250794d720bff607c::M1::Object" } } } @@ -305,11 +305,11 @@ Response: { }, "contents": { "json": { - "id": "0xff3cc703d3b86054a49761ab7a448d6fe7b7ea0aa5ba4ba84e02093d1fd45e2b", - "value": "70" + "id": "0xff793ecbad3b0cb648a7f8a676d41abf9479e51e8a70f661fd8a01f1053fb117", + "value": "338" }, "type": { - "repr": "0x3b535629f01861a7b0b84cea477b926d350b1d3fb1ef5ed43c09b53d75992a16::M1::Object" + "repr": "0x7a9f66657f48f8cac66483bb31b0e47a4ad4331237664b0250794d720bff607c::M1::Object" } } } @@ -325,11 +325,11 @@ Response: { }, "contents": { "json": { - "id": "0xff324921a4cfe105413f9fd991d67fa546f4ff473e18fb653201f504206aae7a", - "value": "25" + "id": "0xfca8a7528a05b7a8386c8a976be57d6ddcc1a4e9697aa4c207d3853e1f7a42d8", + "value": "296" }, "type": { - "repr": "0x3b535629f01861a7b0b84cea477b926d350b1d3fb1ef5ed43c09b53d75992a16::M1::Object" + "repr": "0x7a9f66657f48f8cac66483bb31b0e47a4ad4331237664b0250794d720bff607c::M1::Object" } } } @@ -343,11 +343,11 @@ Response: { }, "contents": { "json": { - "id": "0xff39576b3855dc3ab3b4e4867613eb1bd5276f570bcd58f31a18a6f623a36aff", - "value": "340" + "id": "0xfdfdbe2471965f393fb0f1e2a849804c2951742cef2833aa5630a982927e65e5", + "value": "459" }, "type": { - "repr": "0x3b535629f01861a7b0b84cea477b926d350b1d3fb1ef5ed43c09b53d75992a16::M1::Object" + "repr": "0x7a9f66657f48f8cac66483bb31b0e47a4ad4331237664b0250794d720bff607c::M1::Object" } } } @@ -361,11 +361,11 @@ Response: { }, "contents": { "json": { - "id": "0xff3cc703d3b86054a49761ab7a448d6fe7b7ea0aa5ba4ba84e02093d1fd45e2b", - "value": "70" + "id": "0xff793ecbad3b0cb648a7f8a676d41abf9479e51e8a70f661fd8a01f1053fb117", + "value": "338" }, "type": { - "repr": "0x3b535629f01861a7b0b84cea477b926d350b1d3fb1ef5ed43c09b53d75992a16::M1::Object" + "repr": "0x7a9f66657f48f8cac66483bb31b0e47a4ad4331237664b0250794d720bff607c::M1::Object" } } } @@ -383,11 +383,11 @@ Response: { }, "contents": { "json": { - "id": "0xff324921a4cfe105413f9fd991d67fa546f4ff473e18fb653201f504206aae7a", - "value": "25" + "id": "0xfca8a7528a05b7a8386c8a976be57d6ddcc1a4e9697aa4c207d3853e1f7a42d8", + "value": "296" }, "type": { - "repr": "0x3b535629f01861a7b0b84cea477b926d350b1d3fb1ef5ed43c09b53d75992a16::M1::Object" + "repr": "0x7a9f66657f48f8cac66483bb31b0e47a4ad4331237664b0250794d720bff607c::M1::Object" } } } @@ -401,11 +401,11 @@ Response: { }, "contents": { "json": { - "id": "0xff39576b3855dc3ab3b4e4867613eb1bd5276f570bcd58f31a18a6f623a36aff", - "value": "340" + "id": "0xfdfdbe2471965f393fb0f1e2a849804c2951742cef2833aa5630a982927e65e5", + "value": "459" }, "type": { - "repr": "0x3b535629f01861a7b0b84cea477b926d350b1d3fb1ef5ed43c09b53d75992a16::M1::Object" + "repr": "0x7a9f66657f48f8cac66483bb31b0e47a4ad4331237664b0250794d720bff607c::M1::Object" } } } @@ -419,11 +419,11 @@ Response: { }, "contents": { "json": { - "id": "0xff3cc703d3b86054a49761ab7a448d6fe7b7ea0aa5ba4ba84e02093d1fd45e2b", - "value": "70" + "id": "0xff793ecbad3b0cb648a7f8a676d41abf9479e51e8a70f661fd8a01f1053fb117", + "value": "338" }, "type": { - "repr": "0x3b535629f01861a7b0b84cea477b926d350b1d3fb1ef5ed43c09b53d75992a16::M1::Object" + "repr": "0x7a9f66657f48f8cac66483bb31b0e47a4ad4331237664b0250794d720bff607c::M1::Object" } } } @@ -461,11 +461,11 @@ Response: { }, "contents": { "json": { - "id": "0xff324921a4cfe105413f9fd991d67fa546f4ff473e18fb653201f504206aae7a", - "value": "25" + "id": "0xfca8a7528a05b7a8386c8a976be57d6ddcc1a4e9697aa4c207d3853e1f7a42d8", + "value": "296" }, "type": { - "repr": "0x3b535629f01861a7b0b84cea477b926d350b1d3fb1ef5ed43c09b53d75992a16::M1::Object" + "repr": "0x7a9f66657f48f8cac66483bb31b0e47a4ad4331237664b0250794d720bff607c::M1::Object" } } }, @@ -478,11 +478,11 @@ Response: { }, "contents": { "json": { - "id": "0xff39576b3855dc3ab3b4e4867613eb1bd5276f570bcd58f31a18a6f623a36aff", - "value": "340" + "id": "0xfdfdbe2471965f393fb0f1e2a849804c2951742cef2833aa5630a982927e65e5", + "value": "459" }, "type": { - "repr": "0x3b535629f01861a7b0b84cea477b926d350b1d3fb1ef5ed43c09b53d75992a16::M1::Object" + "repr": "0x7a9f66657f48f8cac66483bb31b0e47a4ad4331237664b0250794d720bff607c::M1::Object" } } }, @@ -495,11 +495,11 @@ Response: { }, "contents": { "json": { - "id": "0xff3cc703d3b86054a49761ab7a448d6fe7b7ea0aa5ba4ba84e02093d1fd45e2b", - "value": "70" + "id": "0xff793ecbad3b0cb648a7f8a676d41abf9479e51e8a70f661fd8a01f1053fb117", + "value": "338" }, "type": { - "repr": "0x3b535629f01861a7b0b84cea477b926d350b1d3fb1ef5ed43c09b53d75992a16::M1::Object" + "repr": "0x7a9f66657f48f8cac66483bb31b0e47a4ad4331237664b0250794d720bff607c::M1::Object" } } } diff --git a/crates/iota-graphql-e2e-tests/tests/consistency/staked_iota.exp b/crates/iota-graphql-e2e-tests/tests/consistency/staked_iota.exp index 0ee9daff802..ad831cbb06f 100644 --- a/crates/iota-graphql-e2e-tests/tests/consistency/staked_iota.exp +++ b/crates/iota-graphql-e2e-tests/tests/consistency/staked_iota.exp @@ -21,7 +21,7 @@ task 2, lines 21-23: //> TransferObjects([Result(0)], Input(1)) created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 25: //# run 0x3::iota_system::request_add_stake --args object(0x5) object(2,0) @validator_0 --sender C @@ -29,7 +29,7 @@ events: Event { package_id: iota_system, transaction_module: Identifier("iota_sy created: object(3,0) mutated: object(_), 0x0000000000000000000000000000000000000000000000000000000000000005, object(0,0) deleted: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 14531200, storage_rebate: 1976000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 14500800, storage_rebate: 1960800, non_refundable_storage_fee: 0 task 4, line 27: //# create-checkpoint @@ -45,7 +45,7 @@ task 6, lines 31-33: //> TransferObjects([Result(0)], Input(1)) created: object(6,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, line 35: //# run 0x3::iota_system::request_add_stake --args object(0x5) object(6,0) @validator_0 --sender C @@ -53,7 +53,7 @@ events: Event { package_id: iota_system, transaction_module: Identifier("iota_sy created: object(7,0) mutated: object(_), 0x0000000000000000000000000000000000000000000000000000000000000005, object(0,0) deleted: object(6,0) -gas summary: computation_cost: 1000000, storage_cost: 14531200, storage_rebate: 14227200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 14500800, storage_rebate: 14196800, non_refundable_storage_fee: 0 task 8, line 37: //# create-checkpoint @@ -109,13 +109,13 @@ Response: { "stakedIotas": { "edges": [ { - "cursor": "IEhTcCR8gCwWhb3Pa6IIeNcxMuM5/AQDAChvtODEIxaTBAAAAAAAAAA=", + "cursor": "ICY/+FbG+Hqd34UX7O+7VLiMXKC/bqtTKAZwQ4YiyetzBAAAAAAAAAA=", "node": { "principal": "10000000000" } }, { - "cursor": "IFWL5fMBAvjGqySaASRTzX8LCOJmSehFXfVOmHh0TLNgBAAAAAAAAAA=", + "cursor": "IPEp6dbnEicrkwynNujLy5/Voas64Cc5Ta7ruT5oQNbTBAAAAAAAAAA=", "node": { "principal": "10000000000" } @@ -161,7 +161,7 @@ Response: { "stakedIotas": { "edges": [ { - "cursor": "IFWL5fMBAvjGqySaASRTzX8LCOJmSehFXfVOmHh0TLNgAwAAAAAAAAA=", + "cursor": "IPEp6dbnEicrkwynNujLy5/Voas64Cc5Ta7ruT5oQNbTAwAAAAAAAAA=", "node": { "principal": "10000000000" } @@ -183,7 +183,7 @@ Response: { "stakedIotas": { "edges": [ { - "cursor": "IEhTcCR8gCwWhb3Pa6IIeNcxMuM5/AQDAChvtODEIxaTAwAAAAAAAAA=", + "cursor": "ICY/+FbG+Hqd34UX7O+7VLiMXKC/bqtTKAZwQ4YiyetzAwAAAAAAAAA=", "node": { "principal": "10000000000" } diff --git a/crates/iota-graphql-e2e-tests/tests/consistency/tx_address_objects.exp b/crates/iota-graphql-e2e-tests/tests/consistency/tx_address_objects.exp index 526361bab42..0b07261f1ff 100644 --- a/crates/iota-graphql-e2e-tests/tests/consistency/tx_address_objects.exp +++ b/crates/iota-graphql-e2e-tests/tests/consistency/tx_address_objects.exp @@ -7,14 +7,14 @@ task 1, lines 18-35: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5479600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5472000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 37-38: //# programmable --sender A --inputs 0 1 @A //> 0: Test::M1::create(Input(0), Input(2)); created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 40: //# create-checkpoint @@ -27,7 +27,7 @@ task 4, lines 42-45: //> Test::M1::create(Input(3), Input(4)); created: object(4,0), object(4,1) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 4932400, storage_rebate: 2302800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4902000, storage_rebate: 2287600, non_refundable_storage_fee: 0 task 5, line 47: //# create-checkpoint @@ -41,7 +41,7 @@ task 6, lines 49-53: //> Test::M1::create(Input(4), Input(5)); created: object(6,0), object(6,1), object(6,2) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 6247200, storage_rebate: 2302800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6209200, storage_rebate: 2287600, non_refundable_storage_fee: 0 task 7, line 55: //# create-checkpoint @@ -61,66 +61,66 @@ Response: { { "contents": { "json": { - "id": "0x03670d59eaf3d6f6f4e1e3d737cfc22a000228518fcbdeb9294e21660ba790e4", - "value": "5" + "id": "0x06d5d2e9af70892fdde85874daf2c3dc5f1adc9cb3f22baabfd56e173fc8c39f", + "value": "2" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x0b0c19c7b09565e9d171b471c9411c3d1f421606794c08c06bebfcf6e1316102", - "value": "200" + "id": "0x1985e10335572563abedc5e04e975dea930a1ef4e4d87685dfc9a9256b293f46", + "value": "3" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x7b7607e9627e9d5771e63c9f67731007eb12d2f8a8c62489cd9165adc8ec7c6e", - "value": "3" + "id": "0x2f3706f4e91edbbd4a2f48a4c52581b16acacf01cbe49d0d789a522e3128bf30", + "value": "4" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x939f020df3802bdcd23a366e95866c1381a3e252fd3ca3e74027a0ca81785828", - "value": "4" + "id": "0x7137b2b53c2a2acb9a845c9c9b68de4fae6509bbff3e63ebc7b3c7c601a24f56", + "value": "200" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xe042e649e82db5a9d4458f42ca436cd7b05d1768c24d8cd62c9222d6b34f39e8", - "value": "6" + "id": "0x93205e5ec2238371d751ff89a8efb12b2436c1faf8152049b02fdfd579face26", + "value": "5" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xfa58cc5dff5e8fc5e20113a4b5bc500020d27d4a439dd0e8466cd16b9e7b31ff", - "value": "2" + "id": "0xb6e1ac11a0567db347db4c5ce1d1c609d66d1a799045352697d1ae195ed7e57c", + "value": "6" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } } @@ -136,66 +136,66 @@ Response: { { "contents": { "json": { - "id": "0x03670d59eaf3d6f6f4e1e3d737cfc22a000228518fcbdeb9294e21660ba790e4", - "value": "5" + "id": "0x06d5d2e9af70892fdde85874daf2c3dc5f1adc9cb3f22baabfd56e173fc8c39f", + "value": "2" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x0b0c19c7b09565e9d171b471c9411c3d1f421606794c08c06bebfcf6e1316102", - "value": "200" + "id": "0x1985e10335572563abedc5e04e975dea930a1ef4e4d87685dfc9a9256b293f46", + "value": "3" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x7b7607e9627e9d5771e63c9f67731007eb12d2f8a8c62489cd9165adc8ec7c6e", - "value": "3" + "id": "0x2f3706f4e91edbbd4a2f48a4c52581b16acacf01cbe49d0d789a522e3128bf30", + "value": "4" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x939f020df3802bdcd23a366e95866c1381a3e252fd3ca3e74027a0ca81785828", - "value": "4" + "id": "0x7137b2b53c2a2acb9a845c9c9b68de4fae6509bbff3e63ebc7b3c7c601a24f56", + "value": "200" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xe042e649e82db5a9d4458f42ca436cd7b05d1768c24d8cd62c9222d6b34f39e8", - "value": "6" + "id": "0x93205e5ec2238371d751ff89a8efb12b2436c1faf8152049b02fdfd579face26", + "value": "5" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xfa58cc5dff5e8fc5e20113a4b5bc500020d27d4a439dd0e8466cd16b9e7b31ff", - "value": "2" + "id": "0xb6e1ac11a0567db347db4c5ce1d1c609d66d1a799045352697d1ae195ed7e57c", + "value": "6" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } } @@ -209,66 +209,66 @@ Response: { { "contents": { "json": { - "id": "0x03670d59eaf3d6f6f4e1e3d737cfc22a000228518fcbdeb9294e21660ba790e4", - "value": "5" + "id": "0x06d5d2e9af70892fdde85874daf2c3dc5f1adc9cb3f22baabfd56e173fc8c39f", + "value": "2" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x0b0c19c7b09565e9d171b471c9411c3d1f421606794c08c06bebfcf6e1316102", - "value": "200" + "id": "0x1985e10335572563abedc5e04e975dea930a1ef4e4d87685dfc9a9256b293f46", + "value": "3" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x7b7607e9627e9d5771e63c9f67731007eb12d2f8a8c62489cd9165adc8ec7c6e", - "value": "3" + "id": "0x2f3706f4e91edbbd4a2f48a4c52581b16acacf01cbe49d0d789a522e3128bf30", + "value": "4" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x939f020df3802bdcd23a366e95866c1381a3e252fd3ca3e74027a0ca81785828", - "value": "4" + "id": "0x7137b2b53c2a2acb9a845c9c9b68de4fae6509bbff3e63ebc7b3c7c601a24f56", + "value": "200" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xe042e649e82db5a9d4458f42ca436cd7b05d1768c24d8cd62c9222d6b34f39e8", - "value": "6" + "id": "0x93205e5ec2238371d751ff89a8efb12b2436c1faf8152049b02fdfd579face26", + "value": "5" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xfa58cc5dff5e8fc5e20113a4b5bc500020d27d4a439dd0e8466cd16b9e7b31ff", - "value": "2" + "id": "0xb6e1ac11a0567db347db4c5ce1d1c609d66d1a799045352697d1ae195ed7e57c", + "value": "6" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } } @@ -286,7 +286,7 @@ Response: { "json": { "id": "0x1a52511867f48d7024447044500d117a88f7c6da82946c92c62ebb0b2b145b50", "balance": { - "value": "299999993067600" + "value": "299999993098000" } } } @@ -306,66 +306,66 @@ Response: { { "contents": { "json": { - "id": "0x03670d59eaf3d6f6f4e1e3d737cfc22a000228518fcbdeb9294e21660ba790e4", - "value": "5" + "id": "0x06d5d2e9af70892fdde85874daf2c3dc5f1adc9cb3f22baabfd56e173fc8c39f", + "value": "2" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x0b0c19c7b09565e9d171b471c9411c3d1f421606794c08c06bebfcf6e1316102", - "value": "200" + "id": "0x1985e10335572563abedc5e04e975dea930a1ef4e4d87685dfc9a9256b293f46", + "value": "3" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x7b7607e9627e9d5771e63c9f67731007eb12d2f8a8c62489cd9165adc8ec7c6e", - "value": "3" + "id": "0x2f3706f4e91edbbd4a2f48a4c52581b16acacf01cbe49d0d789a522e3128bf30", + "value": "4" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x939f020df3802bdcd23a366e95866c1381a3e252fd3ca3e74027a0ca81785828", - "value": "4" + "id": "0x7137b2b53c2a2acb9a845c9c9b68de4fae6509bbff3e63ebc7b3c7c601a24f56", + "value": "200" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xe042e649e82db5a9d4458f42ca436cd7b05d1768c24d8cd62c9222d6b34f39e8", - "value": "6" + "id": "0x93205e5ec2238371d751ff89a8efb12b2436c1faf8152049b02fdfd579face26", + "value": "5" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xfa58cc5dff5e8fc5e20113a4b5bc500020d27d4a439dd0e8466cd16b9e7b31ff", - "value": "2" + "id": "0xb6e1ac11a0567db347db4c5ce1d1c609d66d1a799045352697d1ae195ed7e57c", + "value": "6" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } } @@ -390,66 +390,66 @@ Response: { { "contents": { "json": { - "id": "0x03670d59eaf3d6f6f4e1e3d737cfc22a000228518fcbdeb9294e21660ba790e4", - "value": "5" + "id": "0x06d5d2e9af70892fdde85874daf2c3dc5f1adc9cb3f22baabfd56e173fc8c39f", + "value": "2" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x0b0c19c7b09565e9d171b471c9411c3d1f421606794c08c06bebfcf6e1316102", - "value": "200" + "id": "0x1985e10335572563abedc5e04e975dea930a1ef4e4d87685dfc9a9256b293f46", + "value": "3" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x7b7607e9627e9d5771e63c9f67731007eb12d2f8a8c62489cd9165adc8ec7c6e", - "value": "3" + "id": "0x2f3706f4e91edbbd4a2f48a4c52581b16acacf01cbe49d0d789a522e3128bf30", + "value": "4" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x939f020df3802bdcd23a366e95866c1381a3e252fd3ca3e74027a0ca81785828", - "value": "4" + "id": "0x7137b2b53c2a2acb9a845c9c9b68de4fae6509bbff3e63ebc7b3c7c601a24f56", + "value": "200" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xe042e649e82db5a9d4458f42ca436cd7b05d1768c24d8cd62c9222d6b34f39e8", - "value": "6" + "id": "0x93205e5ec2238371d751ff89a8efb12b2436c1faf8152049b02fdfd579face26", + "value": "5" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xfa58cc5dff5e8fc5e20113a4b5bc500020d27d4a439dd0e8466cd16b9e7b31ff", - "value": "2" + "id": "0xb6e1ac11a0567db347db4c5ce1d1c609d66d1a799045352697d1ae195ed7e57c", + "value": "6" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } } @@ -463,66 +463,66 @@ Response: { { "contents": { "json": { - "id": "0x03670d59eaf3d6f6f4e1e3d737cfc22a000228518fcbdeb9294e21660ba790e4", - "value": "5" + "id": "0x06d5d2e9af70892fdde85874daf2c3dc5f1adc9cb3f22baabfd56e173fc8c39f", + "value": "2" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x0b0c19c7b09565e9d171b471c9411c3d1f421606794c08c06bebfcf6e1316102", - "value": "200" + "id": "0x1985e10335572563abedc5e04e975dea930a1ef4e4d87685dfc9a9256b293f46", + "value": "3" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x7b7607e9627e9d5771e63c9f67731007eb12d2f8a8c62489cd9165adc8ec7c6e", - "value": "3" + "id": "0x2f3706f4e91edbbd4a2f48a4c52581b16acacf01cbe49d0d789a522e3128bf30", + "value": "4" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x939f020df3802bdcd23a366e95866c1381a3e252fd3ca3e74027a0ca81785828", - "value": "4" + "id": "0x7137b2b53c2a2acb9a845c9c9b68de4fae6509bbff3e63ebc7b3c7c601a24f56", + "value": "200" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xe042e649e82db5a9d4458f42ca436cd7b05d1768c24d8cd62c9222d6b34f39e8", - "value": "6" + "id": "0x93205e5ec2238371d751ff89a8efb12b2436c1faf8152049b02fdfd579face26", + "value": "5" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xfa58cc5dff5e8fc5e20113a4b5bc500020d27d4a439dd0e8466cd16b9e7b31ff", - "value": "2" + "id": "0xb6e1ac11a0567db347db4c5ce1d1c609d66d1a799045352697d1ae195ed7e57c", + "value": "6" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } } @@ -557,66 +557,66 @@ Response: { { "contents": { "json": { - "id": "0x03670d59eaf3d6f6f4e1e3d737cfc22a000228518fcbdeb9294e21660ba790e4", - "value": "5" + "id": "0x06d5d2e9af70892fdde85874daf2c3dc5f1adc9cb3f22baabfd56e173fc8c39f", + "value": "2" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x0b0c19c7b09565e9d171b471c9411c3d1f421606794c08c06bebfcf6e1316102", - "value": "200" + "id": "0x1985e10335572563abedc5e04e975dea930a1ef4e4d87685dfc9a9256b293f46", + "value": "3" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x7b7607e9627e9d5771e63c9f67731007eb12d2f8a8c62489cd9165adc8ec7c6e", - "value": "3" + "id": "0x2f3706f4e91edbbd4a2f48a4c52581b16acacf01cbe49d0d789a522e3128bf30", + "value": "4" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x939f020df3802bdcd23a366e95866c1381a3e252fd3ca3e74027a0ca81785828", - "value": "4" + "id": "0x7137b2b53c2a2acb9a845c9c9b68de4fae6509bbff3e63ebc7b3c7c601a24f56", + "value": "200" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xe042e649e82db5a9d4458f42ca436cd7b05d1768c24d8cd62c9222d6b34f39e8", - "value": "6" + "id": "0x93205e5ec2238371d751ff89a8efb12b2436c1faf8152049b02fdfd579face26", + "value": "5" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xfa58cc5dff5e8fc5e20113a4b5bc500020d27d4a439dd0e8466cd16b9e7b31ff", - "value": "2" + "id": "0xb6e1ac11a0567db347db4c5ce1d1c609d66d1a799045352697d1ae195ed7e57c", + "value": "6" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } } @@ -630,66 +630,66 @@ Response: { { "contents": { "json": { - "id": "0x03670d59eaf3d6f6f4e1e3d737cfc22a000228518fcbdeb9294e21660ba790e4", - "value": "5" + "id": "0x06d5d2e9af70892fdde85874daf2c3dc5f1adc9cb3f22baabfd56e173fc8c39f", + "value": "2" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x0b0c19c7b09565e9d171b471c9411c3d1f421606794c08c06bebfcf6e1316102", - "value": "200" + "id": "0x1985e10335572563abedc5e04e975dea930a1ef4e4d87685dfc9a9256b293f46", + "value": "3" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x7b7607e9627e9d5771e63c9f67731007eb12d2f8a8c62489cd9165adc8ec7c6e", - "value": "3" + "id": "0x2f3706f4e91edbbd4a2f48a4c52581b16acacf01cbe49d0d789a522e3128bf30", + "value": "4" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x939f020df3802bdcd23a366e95866c1381a3e252fd3ca3e74027a0ca81785828", - "value": "4" + "id": "0x7137b2b53c2a2acb9a845c9c9b68de4fae6509bbff3e63ebc7b3c7c601a24f56", + "value": "200" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xe042e649e82db5a9d4458f42ca436cd7b05d1768c24d8cd62c9222d6b34f39e8", - "value": "6" + "id": "0x93205e5ec2238371d751ff89a8efb12b2436c1faf8152049b02fdfd579face26", + "value": "5" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xfa58cc5dff5e8fc5e20113a4b5bc500020d27d4a439dd0e8466cd16b9e7b31ff", - "value": "2" + "id": "0xb6e1ac11a0567db347db4c5ce1d1c609d66d1a799045352697d1ae195ed7e57c", + "value": "6" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } } @@ -707,7 +707,7 @@ Response: { "json": { "id": "0x1a52511867f48d7024447044500d117a88f7c6da82946c92c62ebb0b2b145b50", "balance": { - "value": "299999996697200" + "value": "299999996712400" } } } @@ -724,66 +724,66 @@ Response: { { "contents": { "json": { - "id": "0x03670d59eaf3d6f6f4e1e3d737cfc22a000228518fcbdeb9294e21660ba790e4", - "value": "5" + "id": "0x06d5d2e9af70892fdde85874daf2c3dc5f1adc9cb3f22baabfd56e173fc8c39f", + "value": "2" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x0b0c19c7b09565e9d171b471c9411c3d1f421606794c08c06bebfcf6e1316102", - "value": "200" + "id": "0x1985e10335572563abedc5e04e975dea930a1ef4e4d87685dfc9a9256b293f46", + "value": "3" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x7b7607e9627e9d5771e63c9f67731007eb12d2f8a8c62489cd9165adc8ec7c6e", - "value": "3" + "id": "0x2f3706f4e91edbbd4a2f48a4c52581b16acacf01cbe49d0d789a522e3128bf30", + "value": "4" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x939f020df3802bdcd23a366e95866c1381a3e252fd3ca3e74027a0ca81785828", - "value": "4" + "id": "0x7137b2b53c2a2acb9a845c9c9b68de4fae6509bbff3e63ebc7b3c7c601a24f56", + "value": "200" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xe042e649e82db5a9d4458f42ca436cd7b05d1768c24d8cd62c9222d6b34f39e8", - "value": "6" + "id": "0x93205e5ec2238371d751ff89a8efb12b2436c1faf8152049b02fdfd579face26", + "value": "5" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xfa58cc5dff5e8fc5e20113a4b5bc500020d27d4a439dd0e8466cd16b9e7b31ff", - "value": "2" + "id": "0xb6e1ac11a0567db347db4c5ce1d1c609d66d1a799045352697d1ae195ed7e57c", + "value": "6" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } } @@ -797,66 +797,66 @@ Response: { { "contents": { "json": { - "id": "0x03670d59eaf3d6f6f4e1e3d737cfc22a000228518fcbdeb9294e21660ba790e4", - "value": "5" + "id": "0x06d5d2e9af70892fdde85874daf2c3dc5f1adc9cb3f22baabfd56e173fc8c39f", + "value": "2" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x0b0c19c7b09565e9d171b471c9411c3d1f421606794c08c06bebfcf6e1316102", - "value": "200" + "id": "0x1985e10335572563abedc5e04e975dea930a1ef4e4d87685dfc9a9256b293f46", + "value": "3" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x7b7607e9627e9d5771e63c9f67731007eb12d2f8a8c62489cd9165adc8ec7c6e", - "value": "3" + "id": "0x2f3706f4e91edbbd4a2f48a4c52581b16acacf01cbe49d0d789a522e3128bf30", + "value": "4" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x939f020df3802bdcd23a366e95866c1381a3e252fd3ca3e74027a0ca81785828", - "value": "4" + "id": "0x7137b2b53c2a2acb9a845c9c9b68de4fae6509bbff3e63ebc7b3c7c601a24f56", + "value": "200" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xe042e649e82db5a9d4458f42ca436cd7b05d1768c24d8cd62c9222d6b34f39e8", - "value": "6" + "id": "0x93205e5ec2238371d751ff89a8efb12b2436c1faf8152049b02fdfd579face26", + "value": "5" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xfa58cc5dff5e8fc5e20113a4b5bc500020d27d4a439dd0e8466cd16b9e7b31ff", - "value": "2" + "id": "0xb6e1ac11a0567db347db4c5ce1d1c609d66d1a799045352697d1ae195ed7e57c", + "value": "6" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } } @@ -874,7 +874,7 @@ Response: { "json": { "id": "0x1a52511867f48d7024447044500d117a88f7c6da82946c92c62ebb0b2b145b50", "balance": { - "value": "299999993067600" + "value": "299999993098000" } } } @@ -907,66 +907,66 @@ Response: { { "contents": { "json": { - "id": "0x03670d59eaf3d6f6f4e1e3d737cfc22a000228518fcbdeb9294e21660ba790e4", - "value": "5" + "id": "0x06d5d2e9af70892fdde85874daf2c3dc5f1adc9cb3f22baabfd56e173fc8c39f", + "value": "2" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x0b0c19c7b09565e9d171b471c9411c3d1f421606794c08c06bebfcf6e1316102", - "value": "200" + "id": "0x1985e10335572563abedc5e04e975dea930a1ef4e4d87685dfc9a9256b293f46", + "value": "3" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x7b7607e9627e9d5771e63c9f67731007eb12d2f8a8c62489cd9165adc8ec7c6e", - "value": "3" + "id": "0x2f3706f4e91edbbd4a2f48a4c52581b16acacf01cbe49d0d789a522e3128bf30", + "value": "4" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x939f020df3802bdcd23a366e95866c1381a3e252fd3ca3e74027a0ca81785828", - "value": "4" + "id": "0x7137b2b53c2a2acb9a845c9c9b68de4fae6509bbff3e63ebc7b3c7c601a24f56", + "value": "200" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xe042e649e82db5a9d4458f42ca436cd7b05d1768c24d8cd62c9222d6b34f39e8", - "value": "6" + "id": "0x93205e5ec2238371d751ff89a8efb12b2436c1faf8152049b02fdfd579face26", + "value": "5" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xfa58cc5dff5e8fc5e20113a4b5bc500020d27d4a439dd0e8466cd16b9e7b31ff", - "value": "2" + "id": "0xb6e1ac11a0567db347db4c5ce1d1c609d66d1a799045352697d1ae195ed7e57c", + "value": "6" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } } @@ -982,66 +982,66 @@ Response: { { "contents": { "json": { - "id": "0x03670d59eaf3d6f6f4e1e3d737cfc22a000228518fcbdeb9294e21660ba790e4", - "value": "5" + "id": "0x06d5d2e9af70892fdde85874daf2c3dc5f1adc9cb3f22baabfd56e173fc8c39f", + "value": "2" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x0b0c19c7b09565e9d171b471c9411c3d1f421606794c08c06bebfcf6e1316102", - "value": "200" + "id": "0x1985e10335572563abedc5e04e975dea930a1ef4e4d87685dfc9a9256b293f46", + "value": "3" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x7b7607e9627e9d5771e63c9f67731007eb12d2f8a8c62489cd9165adc8ec7c6e", - "value": "3" + "id": "0x2f3706f4e91edbbd4a2f48a4c52581b16acacf01cbe49d0d789a522e3128bf30", + "value": "4" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x939f020df3802bdcd23a366e95866c1381a3e252fd3ca3e74027a0ca81785828", - "value": "4" + "id": "0x7137b2b53c2a2acb9a845c9c9b68de4fae6509bbff3e63ebc7b3c7c601a24f56", + "value": "200" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xe042e649e82db5a9d4458f42ca436cd7b05d1768c24d8cd62c9222d6b34f39e8", - "value": "6" + "id": "0x93205e5ec2238371d751ff89a8efb12b2436c1faf8152049b02fdfd579face26", + "value": "5" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xfa58cc5dff5e8fc5e20113a4b5bc500020d27d4a439dd0e8466cd16b9e7b31ff", - "value": "2" + "id": "0xb6e1ac11a0567db347db4c5ce1d1c609d66d1a799045352697d1ae195ed7e57c", + "value": "6" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } } @@ -1055,66 +1055,66 @@ Response: { { "contents": { "json": { - "id": "0x03670d59eaf3d6f6f4e1e3d737cfc22a000228518fcbdeb9294e21660ba790e4", - "value": "5" + "id": "0x06d5d2e9af70892fdde85874daf2c3dc5f1adc9cb3f22baabfd56e173fc8c39f", + "value": "2" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x0b0c19c7b09565e9d171b471c9411c3d1f421606794c08c06bebfcf6e1316102", - "value": "200" + "id": "0x1985e10335572563abedc5e04e975dea930a1ef4e4d87685dfc9a9256b293f46", + "value": "3" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x7b7607e9627e9d5771e63c9f67731007eb12d2f8a8c62489cd9165adc8ec7c6e", - "value": "3" + "id": "0x2f3706f4e91edbbd4a2f48a4c52581b16acacf01cbe49d0d789a522e3128bf30", + "value": "4" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x939f020df3802bdcd23a366e95866c1381a3e252fd3ca3e74027a0ca81785828", - "value": "4" + "id": "0x7137b2b53c2a2acb9a845c9c9b68de4fae6509bbff3e63ebc7b3c7c601a24f56", + "value": "200" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xe042e649e82db5a9d4458f42ca436cd7b05d1768c24d8cd62c9222d6b34f39e8", - "value": "6" + "id": "0x93205e5ec2238371d751ff89a8efb12b2436c1faf8152049b02fdfd579face26", + "value": "5" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xfa58cc5dff5e8fc5e20113a4b5bc500020d27d4a439dd0e8466cd16b9e7b31ff", - "value": "2" + "id": "0xb6e1ac11a0567db347db4c5ce1d1c609d66d1a799045352697d1ae195ed7e57c", + "value": "6" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } } @@ -1132,7 +1132,7 @@ Response: { "json": { "id": "0x1a52511867f48d7024447044500d117a88f7c6da82946c92c62ebb0b2b145b50", "balance": { - "value": "299999993067600" + "value": "299999993098000" } } } @@ -1152,66 +1152,66 @@ Response: { { "contents": { "json": { - "id": "0x03670d59eaf3d6f6f4e1e3d737cfc22a000228518fcbdeb9294e21660ba790e4", - "value": "5" + "id": "0x06d5d2e9af70892fdde85874daf2c3dc5f1adc9cb3f22baabfd56e173fc8c39f", + "value": "2" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x0b0c19c7b09565e9d171b471c9411c3d1f421606794c08c06bebfcf6e1316102", - "value": "200" + "id": "0x1985e10335572563abedc5e04e975dea930a1ef4e4d87685dfc9a9256b293f46", + "value": "3" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x7b7607e9627e9d5771e63c9f67731007eb12d2f8a8c62489cd9165adc8ec7c6e", - "value": "3" + "id": "0x2f3706f4e91edbbd4a2f48a4c52581b16acacf01cbe49d0d789a522e3128bf30", + "value": "4" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x939f020df3802bdcd23a366e95866c1381a3e252fd3ca3e74027a0ca81785828", - "value": "4" + "id": "0x7137b2b53c2a2acb9a845c9c9b68de4fae6509bbff3e63ebc7b3c7c601a24f56", + "value": "200" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xe042e649e82db5a9d4458f42ca436cd7b05d1768c24d8cd62c9222d6b34f39e8", - "value": "6" + "id": "0x93205e5ec2238371d751ff89a8efb12b2436c1faf8152049b02fdfd579face26", + "value": "5" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xfa58cc5dff5e8fc5e20113a4b5bc500020d27d4a439dd0e8466cd16b9e7b31ff", - "value": "2" + "id": "0xb6e1ac11a0567db347db4c5ce1d1c609d66d1a799045352697d1ae195ed7e57c", + "value": "6" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } } @@ -1240,66 +1240,66 @@ Response: { { "contents": { "json": { - "id": "0x03670d59eaf3d6f6f4e1e3d737cfc22a000228518fcbdeb9294e21660ba790e4", - "value": "5" + "id": "0x06d5d2e9af70892fdde85874daf2c3dc5f1adc9cb3f22baabfd56e173fc8c39f", + "value": "2" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x0b0c19c7b09565e9d171b471c9411c3d1f421606794c08c06bebfcf6e1316102", - "value": "200" + "id": "0x1985e10335572563abedc5e04e975dea930a1ef4e4d87685dfc9a9256b293f46", + "value": "3" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x7b7607e9627e9d5771e63c9f67731007eb12d2f8a8c62489cd9165adc8ec7c6e", - "value": "3" + "id": "0x2f3706f4e91edbbd4a2f48a4c52581b16acacf01cbe49d0d789a522e3128bf30", + "value": "4" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x939f020df3802bdcd23a366e95866c1381a3e252fd3ca3e74027a0ca81785828", - "value": "4" + "id": "0x7137b2b53c2a2acb9a845c9c9b68de4fae6509bbff3e63ebc7b3c7c601a24f56", + "value": "200" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xe042e649e82db5a9d4458f42ca436cd7b05d1768c24d8cd62c9222d6b34f39e8", - "value": "6" + "id": "0x93205e5ec2238371d751ff89a8efb12b2436c1faf8152049b02fdfd579face26", + "value": "5" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xfa58cc5dff5e8fc5e20113a4b5bc500020d27d4a439dd0e8466cd16b9e7b31ff", - "value": "2" + "id": "0xb6e1ac11a0567db347db4c5ce1d1c609d66d1a799045352697d1ae195ed7e57c", + "value": "6" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } } @@ -1313,66 +1313,66 @@ Response: { { "contents": { "json": { - "id": "0x03670d59eaf3d6f6f4e1e3d737cfc22a000228518fcbdeb9294e21660ba790e4", - "value": "5" + "id": "0x06d5d2e9af70892fdde85874daf2c3dc5f1adc9cb3f22baabfd56e173fc8c39f", + "value": "2" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x0b0c19c7b09565e9d171b471c9411c3d1f421606794c08c06bebfcf6e1316102", - "value": "200" + "id": "0x1985e10335572563abedc5e04e975dea930a1ef4e4d87685dfc9a9256b293f46", + "value": "3" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x7b7607e9627e9d5771e63c9f67731007eb12d2f8a8c62489cd9165adc8ec7c6e", - "value": "3" + "id": "0x2f3706f4e91edbbd4a2f48a4c52581b16acacf01cbe49d0d789a522e3128bf30", + "value": "4" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x939f020df3802bdcd23a366e95866c1381a3e252fd3ca3e74027a0ca81785828", - "value": "4" + "id": "0x7137b2b53c2a2acb9a845c9c9b68de4fae6509bbff3e63ebc7b3c7c601a24f56", + "value": "200" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xe042e649e82db5a9d4458f42ca436cd7b05d1768c24d8cd62c9222d6b34f39e8", - "value": "6" + "id": "0x93205e5ec2238371d751ff89a8efb12b2436c1faf8152049b02fdfd579face26", + "value": "5" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xfa58cc5dff5e8fc5e20113a4b5bc500020d27d4a439dd0e8466cd16b9e7b31ff", - "value": "2" + "id": "0xb6e1ac11a0567db347db4c5ce1d1c609d66d1a799045352697d1ae195ed7e57c", + "value": "6" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } } @@ -1388,66 +1388,66 @@ Response: { { "contents": { "json": { - "id": "0x03670d59eaf3d6f6f4e1e3d737cfc22a000228518fcbdeb9294e21660ba790e4", - "value": "5" + "id": "0x06d5d2e9af70892fdde85874daf2c3dc5f1adc9cb3f22baabfd56e173fc8c39f", + "value": "2" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x0b0c19c7b09565e9d171b471c9411c3d1f421606794c08c06bebfcf6e1316102", - "value": "200" + "id": "0x1985e10335572563abedc5e04e975dea930a1ef4e4d87685dfc9a9256b293f46", + "value": "3" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x7b7607e9627e9d5771e63c9f67731007eb12d2f8a8c62489cd9165adc8ec7c6e", - "value": "3" + "id": "0x2f3706f4e91edbbd4a2f48a4c52581b16acacf01cbe49d0d789a522e3128bf30", + "value": "4" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x939f020df3802bdcd23a366e95866c1381a3e252fd3ca3e74027a0ca81785828", - "value": "4" + "id": "0x7137b2b53c2a2acb9a845c9c9b68de4fae6509bbff3e63ebc7b3c7c601a24f56", + "value": "200" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xe042e649e82db5a9d4458f42ca436cd7b05d1768c24d8cd62c9222d6b34f39e8", - "value": "6" + "id": "0x93205e5ec2238371d751ff89a8efb12b2436c1faf8152049b02fdfd579face26", + "value": "5" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xfa58cc5dff5e8fc5e20113a4b5bc500020d27d4a439dd0e8466cd16b9e7b31ff", - "value": "2" + "id": "0xb6e1ac11a0567db347db4c5ce1d1c609d66d1a799045352697d1ae195ed7e57c", + "value": "6" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } } @@ -1461,66 +1461,66 @@ Response: { { "contents": { "json": { - "id": "0x03670d59eaf3d6f6f4e1e3d737cfc22a000228518fcbdeb9294e21660ba790e4", - "value": "5" + "id": "0x06d5d2e9af70892fdde85874daf2c3dc5f1adc9cb3f22baabfd56e173fc8c39f", + "value": "2" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x0b0c19c7b09565e9d171b471c9411c3d1f421606794c08c06bebfcf6e1316102", - "value": "200" + "id": "0x1985e10335572563abedc5e04e975dea930a1ef4e4d87685dfc9a9256b293f46", + "value": "3" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x7b7607e9627e9d5771e63c9f67731007eb12d2f8a8c62489cd9165adc8ec7c6e", - "value": "3" + "id": "0x2f3706f4e91edbbd4a2f48a4c52581b16acacf01cbe49d0d789a522e3128bf30", + "value": "4" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x939f020df3802bdcd23a366e95866c1381a3e252fd3ca3e74027a0ca81785828", - "value": "4" + "id": "0x7137b2b53c2a2acb9a845c9c9b68de4fae6509bbff3e63ebc7b3c7c601a24f56", + "value": "200" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xe042e649e82db5a9d4458f42ca436cd7b05d1768c24d8cd62c9222d6b34f39e8", - "value": "6" + "id": "0x93205e5ec2238371d751ff89a8efb12b2436c1faf8152049b02fdfd579face26", + "value": "5" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xfa58cc5dff5e8fc5e20113a4b5bc500020d27d4a439dd0e8466cd16b9e7b31ff", - "value": "2" + "id": "0xb6e1ac11a0567db347db4c5ce1d1c609d66d1a799045352697d1ae195ed7e57c", + "value": "6" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } } @@ -1536,66 +1536,66 @@ Response: { { "contents": { "json": { - "id": "0x03670d59eaf3d6f6f4e1e3d737cfc22a000228518fcbdeb9294e21660ba790e4", - "value": "5" + "id": "0x06d5d2e9af70892fdde85874daf2c3dc5f1adc9cb3f22baabfd56e173fc8c39f", + "value": "2" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x0b0c19c7b09565e9d171b471c9411c3d1f421606794c08c06bebfcf6e1316102", - "value": "200" + "id": "0x1985e10335572563abedc5e04e975dea930a1ef4e4d87685dfc9a9256b293f46", + "value": "3" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x7b7607e9627e9d5771e63c9f67731007eb12d2f8a8c62489cd9165adc8ec7c6e", - "value": "3" + "id": "0x2f3706f4e91edbbd4a2f48a4c52581b16acacf01cbe49d0d789a522e3128bf30", + "value": "4" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x939f020df3802bdcd23a366e95866c1381a3e252fd3ca3e74027a0ca81785828", - "value": "4" + "id": "0x7137b2b53c2a2acb9a845c9c9b68de4fae6509bbff3e63ebc7b3c7c601a24f56", + "value": "200" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xe042e649e82db5a9d4458f42ca436cd7b05d1768c24d8cd62c9222d6b34f39e8", - "value": "6" + "id": "0x93205e5ec2238371d751ff89a8efb12b2436c1faf8152049b02fdfd579face26", + "value": "5" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xfa58cc5dff5e8fc5e20113a4b5bc500020d27d4a439dd0e8466cd16b9e7b31ff", - "value": "2" + "id": "0xb6e1ac11a0567db347db4c5ce1d1c609d66d1a799045352697d1ae195ed7e57c", + "value": "6" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } } @@ -1609,66 +1609,66 @@ Response: { { "contents": { "json": { - "id": "0x03670d59eaf3d6f6f4e1e3d737cfc22a000228518fcbdeb9294e21660ba790e4", - "value": "5" + "id": "0x06d5d2e9af70892fdde85874daf2c3dc5f1adc9cb3f22baabfd56e173fc8c39f", + "value": "2" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x0b0c19c7b09565e9d171b471c9411c3d1f421606794c08c06bebfcf6e1316102", - "value": "200" + "id": "0x1985e10335572563abedc5e04e975dea930a1ef4e4d87685dfc9a9256b293f46", + "value": "3" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x7b7607e9627e9d5771e63c9f67731007eb12d2f8a8c62489cd9165adc8ec7c6e", - "value": "3" + "id": "0x2f3706f4e91edbbd4a2f48a4c52581b16acacf01cbe49d0d789a522e3128bf30", + "value": "4" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0x939f020df3802bdcd23a366e95866c1381a3e252fd3ca3e74027a0ca81785828", - "value": "4" + "id": "0x7137b2b53c2a2acb9a845c9c9b68de4fae6509bbff3e63ebc7b3c7c601a24f56", + "value": "200" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xe042e649e82db5a9d4458f42ca436cd7b05d1768c24d8cd62c9222d6b34f39e8", - "value": "6" + "id": "0x93205e5ec2238371d751ff89a8efb12b2436c1faf8152049b02fdfd579face26", + "value": "5" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } }, { "contents": { "json": { - "id": "0xfa58cc5dff5e8fc5e20113a4b5bc500020d27d4a439dd0e8466cd16b9e7b31ff", - "value": "2" + "id": "0xb6e1ac11a0567db347db4c5ce1d1c609d66d1a799045352697d1ae195ed7e57c", + "value": "6" }, "type": { - "repr": "0x519f3c650d15cdc76e0b73e4cd86cf1b3d7f98546b108a9de10de897a16f1f85::M1::Object" + "repr": "0x87557ebcf30086c52715468f621fd094af7efdc79a0ed647ede304eee0e2006d::M1::Object" } } } diff --git a/crates/iota-graphql-e2e-tests/tests/epoch/chain_identifier.exp b/crates/iota-graphql-e2e-tests/tests/epoch/chain_identifier.exp index 7e13bf68c0c..7bbd7811f87 100644 --- a/crates/iota-graphql-e2e-tests/tests/epoch/chain_identifier.exp +++ b/crates/iota-graphql-e2e-tests/tests/epoch/chain_identifier.exp @@ -11,6 +11,6 @@ task 2, lines 10-13: //# run-graphql Response: { "data": { - "chainIdentifier": "408a17e4" + "chainIdentifier": "e2a97689" } } diff --git a/crates/iota-graphql-e2e-tests/tests/epoch/epoch.exp b/crates/iota-graphql-e2e-tests/tests/epoch/epoch.exp index 0033479dd44..30eef67e10a 100644 --- a/crates/iota-graphql-e2e-tests/tests/epoch/epoch.exp +++ b/crates/iota-graphql-e2e-tests/tests/epoch/epoch.exp @@ -17,7 +17,7 @@ task 3, lines 13-15: //> TransferObjects([Result(0)], Input(1)) created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 0, non_refundable_storage_fee: 0 task 4, lines 17-19: //# run 0x3::iota_system::request_add_stake --args object(0x5) object(3,0) @validator_0 --sender C @@ -25,7 +25,7 @@ events: Event { package_id: iota_system, transaction_module: Identifier("iota_sy created: object(4,0) mutated: object(_), 0x0000000000000000000000000000000000000000000000000000000000000005, object(0,0) deleted: object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 14531200, storage_rebate: 1976000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 14500800, storage_rebate: 1960800, non_refundable_storage_fee: 0 task 5, line 20: //# create-checkpoint @@ -42,7 +42,7 @@ task 7, lines 25-29: // TODO: Short term hack to get around indexer epoch issue created: object(7,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, line 30: //# create-checkpoint @@ -71,23 +71,23 @@ Response: { }, "totalGasFees": "1000000", "totalStakeRewards": "767000000000000", - "fundSize": "14531200", - "fundInflow": "1976000", - "fundOutflow": "988000", - "netInflow": "988000", + "fundSize": "14500800", + "fundInflow": "1960800", + "fundOutflow": "980400", + "netInflow": "980400", "transactionBlocks": { "nodes": [ { "kind": { "__typename": "ProgrammableTransactionBlock" }, - "digest": "EM966soJNHr5FPxc8yeuqkUmiuHcgMRtcKBAJgWbbQCj" + "digest": "7SJtdFybBPY6aTpoRw4y1Z7vShCUUGqqJUDmL5o64CDu" }, { "kind": { "__typename": "EndOfEpochTransaction" }, - "digest": "GdHpubgoMKFW1anUij9fC3ThQYSs9VQNTvDdmuQFu3aM" + "digest": "9P5t7GdBVgLofELfhVpgeTJ4JoRP3TWYWZfBWrZwrcyV" } ] } diff --git a/crates/iota-graphql-e2e-tests/tests/epoch/system_state.exp b/crates/iota-graphql-e2e-tests/tests/epoch/system_state.exp index ddc5f1ae92a..02077205f22 100644 --- a/crates/iota-graphql-e2e-tests/tests/epoch/system_state.exp +++ b/crates/iota-graphql-e2e-tests/tests/epoch/system_state.exp @@ -17,7 +17,7 @@ task 3, lines 15-17: //> TransferObjects([Result(0)], Input(1)) created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 0, non_refundable_storage_fee: 0 task 4, line 19: //# run 0x3::iota_system::request_add_stake --args object(0x5) object(3,0) @validator_0 --sender C @@ -25,7 +25,7 @@ events: Event { package_id: iota_system, transaction_module: Identifier("iota_sy created: object(4,0) mutated: object(_), 0x0000000000000000000000000000000000000000000000000000000000000005, object(0,0) deleted: object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 14531200, storage_rebate: 1976000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 14500800, storage_rebate: 1960800, non_refundable_storage_fee: 0 task 5, line 21: //# create-checkpoint @@ -49,7 +49,7 @@ task 9, lines 29-31: //> TransferObjects([Result(0)], Input(1)) created: object(9,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 10, line 33: //# create-checkpoint @@ -65,7 +65,7 @@ events: Event { package_id: iota_system, transaction_module: Identifier("iota_sy created: object(12,0) mutated: object(_), 0x0000000000000000000000000000000000000000000000000000000000000005, object(0,0) deleted: object(4,0) -gas summary: computation_cost: 1000000, storage_cost: 14227200, storage_rebate: 14531200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 14196800, storage_rebate: 14500800, non_refundable_storage_fee: 0 task 13, line 39: //# create-checkpoint @@ -81,7 +81,7 @@ task 15, lines 43-45: //> TransferObjects([Result(0)], Input(1)) created: object(15,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 16, line 47: //# create-checkpoint @@ -99,7 +99,7 @@ Response: { "epochId": 4, "systemStateVersion": 1, "storageFund": { - "totalObjectStorageRebates": "15215200", + "totalObjectStorageRebates": "15177200", "nonRefundableBalance": "0" } } @@ -114,7 +114,7 @@ Response: { "epochId": 3, "systemStateVersion": 1, "storageFund": { - "totalObjectStorageRebates": "15519200", + "totalObjectStorageRebates": "15481200", "nonRefundableBalance": "0" } } @@ -129,7 +129,7 @@ Response: { "epochId": 2, "systemStateVersion": 1, "storageFund": { - "totalObjectStorageRebates": "14531200", + "totalObjectStorageRebates": "14500800", "nonRefundableBalance": "0" } } @@ -144,7 +144,7 @@ Response: { "epochId": 1, "systemStateVersion": 1, "storageFund": { - "totalObjectStorageRebates": "14531200", + "totalObjectStorageRebates": "14500800", "nonRefundableBalance": "0" } } @@ -159,7 +159,7 @@ Response: { "epochId": 4, "systemStateVersion": 1, "storageFund": { - "totalObjectStorageRebates": "15215200", + "totalObjectStorageRebates": "15177200", "nonRefundableBalance": "0" } } diff --git a/crates/iota-graphql-e2e-tests/tests/errors/clever_errors.exp b/crates/iota-graphql-e2e-tests/tests/errors/clever_errors.exp index 55e01b58be2..d56278abb77 100644 --- a/crates/iota-graphql-e2e-tests/tests/errors/clever_errors.exp +++ b/crates/iota-graphql-e2e-tests/tests/errors/clever_errors.exp @@ -7,7 +7,7 @@ task 1, lines 7-82: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 9743200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9728000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 84: //# run P0::m::callU8 @@ -77,67 +77,67 @@ Response: { { "effects": { "status": "FAILURE", - "errors": "Error in 1st command, from '0x4d8347292ced5fc2d16559de30dc29c5e40604f152c3d0c04e184c47504a9bb3::m::callU8' (line 30), abort 'ImAU8': 0" + "errors": "Error in 1st command, from '0x322ea0fab60fef0ce07a128ba221506400816291c3e6352c547b7af4cafa9371::m::callU8' (line 30), abort 'ImAU8': 0" } }, { "effects": { "status": "FAILURE", - "errors": "Error in 1st command, from '0x4d8347292ced5fc2d16559de30dc29c5e40604f152c3d0c04e184c47504a9bb3::m::callU16' (line 33), abort 'ImAU16': 1" + "errors": "Error in 1st command, from '0x322ea0fab60fef0ce07a128ba221506400816291c3e6352c547b7af4cafa9371::m::callU16' (line 33), abort 'ImAU16': 1" } }, { "effects": { "status": "FAILURE", - "errors": "Error in 1st command, from '0x4d8347292ced5fc2d16559de30dc29c5e40604f152c3d0c04e184c47504a9bb3::m::callU32' (line 36), abort 'ImAU32': 2" + "errors": "Error in 1st command, from '0x322ea0fab60fef0ce07a128ba221506400816291c3e6352c547b7af4cafa9371::m::callU32' (line 36), abort 'ImAU32': 2" } }, { "effects": { "status": "FAILURE", - "errors": "Error in 1st command, from '0x4d8347292ced5fc2d16559de30dc29c5e40604f152c3d0c04e184c47504a9bb3::m::callU64' (line 39), abort 'ImAU64': 3" + "errors": "Error in 1st command, from '0x322ea0fab60fef0ce07a128ba221506400816291c3e6352c547b7af4cafa9371::m::callU64' (line 39), abort 'ImAU64': 3" } }, { "effects": { "status": "FAILURE", - "errors": "Error in 1st command, from '0x4d8347292ced5fc2d16559de30dc29c5e40604f152c3d0c04e184c47504a9bb3::m::callU128' (line 42), abort 'ImAU128': 4" + "errors": "Error in 1st command, from '0x322ea0fab60fef0ce07a128ba221506400816291c3e6352c547b7af4cafa9371::m::callU128' (line 42), abort 'ImAU128': 4" } }, { "effects": { "status": "FAILURE", - "errors": "Error in 1st command, from '0x4d8347292ced5fc2d16559de30dc29c5e40604f152c3d0c04e184c47504a9bb3::m::callU256' (line 45), abort 'ImAU256': 5" + "errors": "Error in 1st command, from '0x322ea0fab60fef0ce07a128ba221506400816291c3e6352c547b7af4cafa9371::m::callU256' (line 45), abort 'ImAU256': 5" } }, { "effects": { "status": "FAILURE", - "errors": "Error in 1st command, from '0x4d8347292ced5fc2d16559de30dc29c5e40604f152c3d0c04e184c47504a9bb3::m::callAddress' (line 48), abort 'ImAnAddress': 0x0000000000000000000000000000000000000000000000000000000000000006" + "errors": "Error in 1st command, from '0x322ea0fab60fef0ce07a128ba221506400816291c3e6352c547b7af4cafa9371::m::callAddress' (line 48), abort 'ImAnAddress': 0x0000000000000000000000000000000000000000000000000000000000000006" } }, { "effects": { "status": "FAILURE", - "errors": "Error in 1st command, from '0x4d8347292ced5fc2d16559de30dc29c5e40604f152c3d0c04e184c47504a9bb3::m::callString' (line 51), abort 'ImAString': This is a string" + "errors": "Error in 1st command, from '0x322ea0fab60fef0ce07a128ba221506400816291c3e6352c547b7af4cafa9371::m::callString' (line 51), abort 'ImAString': This is a string" } }, { "effects": { "status": "FAILURE", - "errors": "Error in 1st command, from '0x4d8347292ced5fc2d16559de30dc29c5e40604f152c3d0c04e184c47504a9bb3::m::callU64vec' (line 54), abort 'ImNotAString': BQEAAAAAAAAAAgAAAAAAAAADAAAAAAAAAAQAAAAAAAAABQAAAAAAAAA=" + "errors": "Error in 1st command, from '0x322ea0fab60fef0ce07a128ba221506400816291c3e6352c547b7af4cafa9371::m::callU64vec' (line 54), abort 'ImNotAString': BQEAAAAAAAAAAgAAAAAAAAADAAAAAAAAAAQAAAAAAAAABQAAAAAAAAA=" } }, { "effects": { "status": "FAILURE", - "errors": "Error in 1st command, from '0x4d8347292ced5fc2d16559de30dc29c5e40604f152c3d0c04e184c47504a9bb3::m::normalAbort' (instruction 1), abort code: 0" + "errors": "Error in 1st command, from '0x322ea0fab60fef0ce07a128ba221506400816291c3e6352c547b7af4cafa9371::m::normalAbort' (instruction 1), abort code: 0" } }, { "effects": { "status": "FAILURE", - "errors": "Error in 1st command, from '0x4d8347292ced5fc2d16559de30dc29c5e40604f152c3d0c04e184c47504a9bb3::m::assertLineNo' (line 60)" + "errors": "Error in 1st command, from '0x322ea0fab60fef0ce07a128ba221506400816291c3e6352c547b7af4cafa9371::m::assertLineNo' (line 60)" } } ] @@ -149,7 +149,7 @@ task 15, lines 120-198: //# upgrade --package P0 --upgrade-capability 1,0 --sender A created: object(15,0) mutated: object(0,0), object(1,0) -gas summary: computation_cost: 1000000, storage_cost: 9849600, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9834400, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 16, line 200: //# run P0::m::callU8 @@ -248,7 +248,7 @@ Response: { }, "errors": [ { - "message": "Internal error occurred while processing request: Error resolving Move location: Linkage not found for package: 8547f1fdaa1bfb4aabc532741f60fe6b60eeb7f5c15210f828c4fde375d99d86", + "message": "Internal error occurred while processing request: Error resolving Move location: Linkage not found for package: fae1ca9e0539e57d226f63569906b6c6aaf1b87bc59de378ddabbdff9d90792f", "locations": [ { "line": 6, @@ -264,7 +264,7 @@ Response: { ] }, { - "message": "Internal error occurred while processing request: Error resolving Move location: Linkage not found for package: 8547f1fdaa1bfb4aabc532741f60fe6b60eeb7f5c15210f828c4fde375d99d86", + "message": "Internal error occurred while processing request: Error resolving Move location: Linkage not found for package: fae1ca9e0539e57d226f63569906b6c6aaf1b87bc59de378ddabbdff9d90792f", "locations": [ { "line": 6, @@ -280,7 +280,7 @@ Response: { ] }, { - "message": "Internal error occurred while processing request: Error resolving Move location: Linkage not found for package: 8547f1fdaa1bfb4aabc532741f60fe6b60eeb7f5c15210f828c4fde375d99d86", + "message": "Internal error occurred while processing request: Error resolving Move location: Linkage not found for package: fae1ca9e0539e57d226f63569906b6c6aaf1b87bc59de378ddabbdff9d90792f", "locations": [ { "line": 6, @@ -296,7 +296,7 @@ Response: { ] }, { - "message": "Internal error occurred while processing request: Error resolving Move location: Linkage not found for package: 8547f1fdaa1bfb4aabc532741f60fe6b60eeb7f5c15210f828c4fde375d99d86", + "message": "Internal error occurred while processing request: Error resolving Move location: Linkage not found for package: fae1ca9e0539e57d226f63569906b6c6aaf1b87bc59de378ddabbdff9d90792f", "locations": [ { "line": 6, @@ -312,7 +312,7 @@ Response: { ] }, { - "message": "Internal error occurred while processing request: Error resolving Move location: Linkage not found for package: 8547f1fdaa1bfb4aabc532741f60fe6b60eeb7f5c15210f828c4fde375d99d86", + "message": "Internal error occurred while processing request: Error resolving Move location: Linkage not found for package: fae1ca9e0539e57d226f63569906b6c6aaf1b87bc59de378ddabbdff9d90792f", "locations": [ { "line": 6, @@ -328,7 +328,7 @@ Response: { ] }, { - "message": "Internal error occurred while processing request: Error resolving Move location: Linkage not found for package: 8547f1fdaa1bfb4aabc532741f60fe6b60eeb7f5c15210f828c4fde375d99d86", + "message": "Internal error occurred while processing request: Error resolving Move location: Linkage not found for package: fae1ca9e0539e57d226f63569906b6c6aaf1b87bc59de378ddabbdff9d90792f", "locations": [ { "line": 6, @@ -344,7 +344,7 @@ Response: { ] }, { - "message": "Internal error occurred while processing request: Error resolving Move location: Linkage not found for package: 8547f1fdaa1bfb4aabc532741f60fe6b60eeb7f5c15210f828c4fde375d99d86", + "message": "Internal error occurred while processing request: Error resolving Move location: Linkage not found for package: fae1ca9e0539e57d226f63569906b6c6aaf1b87bc59de378ddabbdff9d90792f", "locations": [ { "line": 6, @@ -360,7 +360,7 @@ Response: { ] }, { - "message": "Internal error occurred while processing request: Error resolving Move location: Linkage not found for package: 8547f1fdaa1bfb4aabc532741f60fe6b60eeb7f5c15210f828c4fde375d99d86", + "message": "Internal error occurred while processing request: Error resolving Move location: Linkage not found for package: fae1ca9e0539e57d226f63569906b6c6aaf1b87bc59de378ddabbdff9d90792f", "locations": [ { "line": 6, @@ -376,7 +376,7 @@ Response: { ] }, { - "message": "Internal error occurred while processing request: Error resolving Move location: Linkage not found for package: 8547f1fdaa1bfb4aabc532741f60fe6b60eeb7f5c15210f828c4fde375d99d86", + "message": "Internal error occurred while processing request: Error resolving Move location: Linkage not found for package: fae1ca9e0539e57d226f63569906b6c6aaf1b87bc59de378ddabbdff9d90792f", "locations": [ { "line": 6, diff --git a/crates/iota-graphql-e2e-tests/tests/errors/clever_errors_in_macros.exp b/crates/iota-graphql-e2e-tests/tests/errors/clever_errors_in_macros.exp index 9bb756d0b4d..a36d804579a 100644 --- a/crates/iota-graphql-e2e-tests/tests/errors/clever_errors_in_macros.exp +++ b/crates/iota-graphql-e2e-tests/tests/errors/clever_errors_in_macros.exp @@ -7,7 +7,7 @@ task 1, lines 7-35: //# publish --sender A created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4187600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4180000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 37: //# run P0::m::t_a @@ -37,19 +37,19 @@ Response: { { "effects": { "status": "FAILURE", - "errors": "Error in 1st command, from '0x1892a647f981d763ff1f6a2f372a1936401ddd233985c3c7ac0d17d220cf883f::m::t_a' (line 21)" + "errors": "Error in 1st command, from '0x11dc3ad690a3827513133bf2891ebfe4f51fc934651fb9128b788ca564d998e1::m::t_a' (line 21)" } }, { "effects": { "status": "FAILURE", - "errors": "Error in 1st command, from '0x1892a647f981d763ff1f6a2f372a1936401ddd233985c3c7ac0d17d220cf883f::m::t_calls_a' (line 24)" + "errors": "Error in 1st command, from '0x11dc3ad690a3827513133bf2891ebfe4f51fc934651fb9128b788ca564d998e1::m::t_calls_a' (line 24)" } }, { "effects": { "status": "FAILURE", - "errors": "Error in 1st command, from '0x1892a647f981d763ff1f6a2f372a1936401ddd233985c3c7ac0d17d220cf883f::m::t_const_assert' (line 10), abort 'EMsg': This is a string" + "errors": "Error in 1st command, from '0x11dc3ad690a3827513133bf2891ebfe4f51fc934651fb9128b788ca564d998e1::m::t_const_assert' (line 10), abort 'EMsg': This is a string" } } ] diff --git a/crates/iota-graphql-e2e-tests/tests/event_connection/combo_filter_error.exp b/crates/iota-graphql-e2e-tests/tests/event_connection/combo_filter_error.exp index 62475c2f565..d588d8ead95 100644 --- a/crates/iota-graphql-e2e-tests/tests/event_connection/combo_filter_error.exp +++ b/crates/iota-graphql-e2e-tests/tests/event_connection/combo_filter_error.exp @@ -7,13 +7,13 @@ task 1, lines 10-29: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5380800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5373200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 31: //# run Test::M2::emit_emit_a --sender A --args 20 events: Event { package_id: Test, transaction_module: Identifier("M2"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [20, 0, 0, 0, 0, 0, 0, 0] } mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 33: //# create-checkpoint diff --git a/crates/iota-graphql-e2e-tests/tests/event_connection/event_connection.exp b/crates/iota-graphql-e2e-tests/tests/event_connection/event_connection.exp index 83393190f54..20ea2fdff0d 100644 --- a/crates/iota-graphql-e2e-tests/tests/event_connection/event_connection.exp +++ b/crates/iota-graphql-e2e-tests/tests/event_connection/event_connection.exp @@ -7,43 +7,43 @@ task 1, lines 15-82: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 11263200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 11255600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 84: //# run Test::M1::create --sender A --args 0 @A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 86: //# run Test::M1::emit_a --sender A --args object(2,0) 0 events: Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [0, 0, 0, 0, 0, 0, 0, 0] } mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 2302800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 2287600, non_refundable_storage_fee: 0 task 4, line 88: //# run Test::M1::emit_b --sender A --args object(2,0) 1 events: Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventB"), type_params: [Struct(StructTag { address: Test, module: Identifier("M1"), name: Identifier("Object"), type_params: [] })] }, contents: [1, 0, 0, 0, 0, 0, 0, 0] } mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 2302800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 2287600, non_refundable_storage_fee: 0 task 5, line 90: //# run Test::M2::create --sender A --args 2 @A created: object(5,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, line 92: //# run Test::M2::emit_a --sender A --args object(5,0) 2 events: Event { package_id: Test, transaction_module: Identifier("M2"), sender: A, type_: StructTag { address: Test, module: Identifier("M2"), name: Identifier("EventA"), type_params: [] }, contents: [2, 0, 0, 0, 0, 0, 0, 0] } mutated: object(0,0), object(5,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 2302800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 2287600, non_refundable_storage_fee: 0 task 7, line 94: //# run Test::M2::emit_b --sender A --args object(5,0) 3 events: Event { package_id: Test, transaction_module: Identifier("M2"), sender: A, type_: StructTag { address: Test, module: Identifier("M2"), name: Identifier("EventB"), type_params: [Struct(StructTag { address: Test, module: Identifier("M2"), name: Identifier("Object"), type_params: [] })] }, contents: [3, 0, 0, 0, 0, 0, 0, 0] } mutated: object(0,0), object(5,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 2302800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 2287600, non_refundable_storage_fee: 0 task 8, line 96: //# create-checkpoint @@ -62,7 +62,7 @@ Response: { "name": "M1" }, "type": { - "repr": "0x8606f8cf4d3b368062f79e3d892075c6ce1f74c586807b7b6b21fca2d2db0b09::M1::EventA" + "repr": "0x355db42904a277506aa6b010760f2493218951e292423698a0f1cda4fca6626c::M1::EventA" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -80,7 +80,7 @@ Response: { "name": "M1" }, "type": { - "repr": "0x8606f8cf4d3b368062f79e3d892075c6ce1f74c586807b7b6b21fca2d2db0b09::M1::EventB<0x8606f8cf4d3b368062f79e3d892075c6ce1f74c586807b7b6b21fca2d2db0b09::M1::Object>" + "repr": "0x355db42904a277506aa6b010760f2493218951e292423698a0f1cda4fca6626c::M1::EventB<0x355db42904a277506aa6b010760f2493218951e292423698a0f1cda4fca6626c::M1::Object>" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -98,7 +98,7 @@ Response: { "name": "M2" }, "type": { - "repr": "0x8606f8cf4d3b368062f79e3d892075c6ce1f74c586807b7b6b21fca2d2db0b09::M2::EventA" + "repr": "0x355db42904a277506aa6b010760f2493218951e292423698a0f1cda4fca6626c::M2::EventA" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -116,7 +116,7 @@ Response: { "name": "M2" }, "type": { - "repr": "0x8606f8cf4d3b368062f79e3d892075c6ce1f74c586807b7b6b21fca2d2db0b09::M2::EventB<0x8606f8cf4d3b368062f79e3d892075c6ce1f74c586807b7b6b21fca2d2db0b09::M2::Object>" + "repr": "0x355db42904a277506aa6b010760f2493218951e292423698a0f1cda4fca6626c::M2::EventB<0x355db42904a277506aa6b010760f2493218951e292423698a0f1cda4fca6626c::M2::Object>" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -145,7 +145,7 @@ Response: { "name": "M1" }, "type": { - "repr": "0x8606f8cf4d3b368062f79e3d892075c6ce1f74c586807b7b6b21fca2d2db0b09::M1::EventA" + "repr": "0x355db42904a277506aa6b010760f2493218951e292423698a0f1cda4fca6626c::M1::EventA" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -163,7 +163,7 @@ Response: { "name": "M1" }, "type": { - "repr": "0x8606f8cf4d3b368062f79e3d892075c6ce1f74c586807b7b6b21fca2d2db0b09::M1::EventB<0x8606f8cf4d3b368062f79e3d892075c6ce1f74c586807b7b6b21fca2d2db0b09::M1::Object>" + "repr": "0x355db42904a277506aa6b010760f2493218951e292423698a0f1cda4fca6626c::M1::EventB<0x355db42904a277506aa6b010760f2493218951e292423698a0f1cda4fca6626c::M1::Object>" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -181,7 +181,7 @@ Response: { "name": "M2" }, "type": { - "repr": "0x8606f8cf4d3b368062f79e3d892075c6ce1f74c586807b7b6b21fca2d2db0b09::M2::EventA" + "repr": "0x355db42904a277506aa6b010760f2493218951e292423698a0f1cda4fca6626c::M2::EventA" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -199,7 +199,7 @@ Response: { "name": "M2" }, "type": { - "repr": "0x8606f8cf4d3b368062f79e3d892075c6ce1f74c586807b7b6b21fca2d2db0b09::M2::EventB<0x8606f8cf4d3b368062f79e3d892075c6ce1f74c586807b7b6b21fca2d2db0b09::M2::Object>" + "repr": "0x355db42904a277506aa6b010760f2493218951e292423698a0f1cda4fca6626c::M2::EventB<0x355db42904a277506aa6b010760f2493218951e292423698a0f1cda4fca6626c::M2::Object>" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -228,7 +228,7 @@ Response: { "name": "M1" }, "type": { - "repr": "0x8606f8cf4d3b368062f79e3d892075c6ce1f74c586807b7b6b21fca2d2db0b09::M1::EventA" + "repr": "0x355db42904a277506aa6b010760f2493218951e292423698a0f1cda4fca6626c::M1::EventA" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -246,7 +246,7 @@ Response: { "name": "M1" }, "type": { - "repr": "0x8606f8cf4d3b368062f79e3d892075c6ce1f74c586807b7b6b21fca2d2db0b09::M1::EventB<0x8606f8cf4d3b368062f79e3d892075c6ce1f74c586807b7b6b21fca2d2db0b09::M1::Object>" + "repr": "0x355db42904a277506aa6b010760f2493218951e292423698a0f1cda4fca6626c::M1::EventB<0x355db42904a277506aa6b010760f2493218951e292423698a0f1cda4fca6626c::M1::Object>" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -275,7 +275,7 @@ Response: { "name": "M1" }, "type": { - "repr": "0x8606f8cf4d3b368062f79e3d892075c6ce1f74c586807b7b6b21fca2d2db0b09::M1::EventA" + "repr": "0x355db42904a277506aa6b010760f2493218951e292423698a0f1cda4fca6626c::M1::EventA" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -304,7 +304,7 @@ Response: { "name": "M1" }, "type": { - "repr": "0x8606f8cf4d3b368062f79e3d892075c6ce1f74c586807b7b6b21fca2d2db0b09::M1::EventB<0x8606f8cf4d3b368062f79e3d892075c6ce1f74c586807b7b6b21fca2d2db0b09::M1::Object>" + "repr": "0x355db42904a277506aa6b010760f2493218951e292423698a0f1cda4fca6626c::M1::EventB<0x355db42904a277506aa6b010760f2493218951e292423698a0f1cda4fca6626c::M1::Object>" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" diff --git a/crates/iota-graphql-e2e-tests/tests/event_connection/nested_emit_event.exp b/crates/iota-graphql-e2e-tests/tests/event_connection/nested_emit_event.exp index 540b05e4202..10fe278d63e 100644 --- a/crates/iota-graphql-e2e-tests/tests/event_connection/nested_emit_event.exp +++ b/crates/iota-graphql-e2e-tests/tests/event_connection/nested_emit_event.exp @@ -7,13 +7,13 @@ task 1, lines 11-38: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 6095200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6087600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 40: //# run Test::M3::yeet --sender A --args 2 events: Event { package_id: Test, transaction_module: Identifier("M3"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [2, 0, 0, 0, 0, 0, 0, 0] } mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 42: //# create-checkpoint @@ -30,7 +30,7 @@ Response: { "name": "M3" }, "type": { - "repr": "0x99b61e0b8d77de3f661ca7da3c101c458f54effd266f7e0850f25c7f43bac694::M1::EventA" + "repr": "0x4ce60f0572bedc153aaa9b5515c1f8364b76fead9bd0c01dc9e5c8c39846d156::M1::EventA" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -56,7 +56,7 @@ Response: { "name": "M3" }, "type": { - "repr": "0x99b61e0b8d77de3f661ca7da3c101c458f54effd266f7e0850f25c7f43bac694::M1::EventA" + "repr": "0x4ce60f0572bedc153aaa9b5515c1f8364b76fead9bd0c01dc9e5c8c39846d156::M1::EventA" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -102,7 +102,7 @@ Response: { "name": "M3" }, "type": { - "repr": "0x99b61e0b8d77de3f661ca7da3c101c458f54effd266f7e0850f25c7f43bac694::M1::EventA" + "repr": "0x4ce60f0572bedc153aaa9b5515c1f8364b76fead9bd0c01dc9e5c8c39846d156::M1::EventA" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" diff --git a/crates/iota-graphql-e2e-tests/tests/event_connection/no_filter.exp b/crates/iota-graphql-e2e-tests/tests/event_connection/no_filter.exp index 750ac3958b3..8a1728c5601 100644 --- a/crates/iota-graphql-e2e-tests/tests/event_connection/no_filter.exp +++ b/crates/iota-graphql-e2e-tests/tests/event_connection/no_filter.exp @@ -7,13 +7,13 @@ task 1, lines 7-26: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 4970400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4962800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 28: //# run Test::M1::emit --sender A --args 0 events: Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [0, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [1, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [2, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [3, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [4, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [5, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [6, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [7, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [8, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [9, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [10, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [11, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [12, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [13, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [14, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [15, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [16, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [17, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [18, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [19, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [20, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [21, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [22, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [23, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [24, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [25, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [26, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [27, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [28, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [29, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [30, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [31, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [32, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [33, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [34, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [35, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [36, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [37, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [38, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [39, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [40, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [41, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [42, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [43, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [44, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [45, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [46, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [47, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [48, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [49, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [50, 0, 0, 0, 0, 0, 0, 0] } mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 30: //# create-checkpoint diff --git a/crates/iota-graphql-e2e-tests/tests/event_connection/pagination.exp b/crates/iota-graphql-e2e-tests/tests/event_connection/pagination.exp index 9e0419896c1..6015776f3fe 100644 --- a/crates/iota-graphql-e2e-tests/tests/event_connection/pagination.exp +++ b/crates/iota-graphql-e2e-tests/tests/event_connection/pagination.exp @@ -7,19 +7,19 @@ task 1, lines 7-23: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 4818400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4810800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 25: //# run Test::M1::emit_1 --sender A --args 0 events: Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [0, 0, 0, 0, 0, 0, 0, 0] } mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 27: //# run Test::M1::emit_2 --sender A --args 1 events: Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [1, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [2, 0, 0, 0, 0, 0, 0, 0] } mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 29: //# create-checkpoint @@ -42,7 +42,7 @@ Response: { "name": "M1" }, "type": { - "repr": "0xfd2d034e09aa942c0bdbde7bc0ee8e69fd0ae0e54ddb50fb9d86e32921459b4d::M1::EventA" + "repr": "0x999de5aa7620209919ea1dc088028fffa75c36282190e063c3df58534d2842b1::M1::EventA" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -60,7 +60,7 @@ Response: { "name": "M1" }, "type": { - "repr": "0xfd2d034e09aa942c0bdbde7bc0ee8e69fd0ae0e54ddb50fb9d86e32921459b4d::M1::EventA" + "repr": "0x999de5aa7620209919ea1dc088028fffa75c36282190e063c3df58534d2842b1::M1::EventA" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -78,7 +78,7 @@ Response: { "name": "M1" }, "type": { - "repr": "0xfd2d034e09aa942c0bdbde7bc0ee8e69fd0ae0e54ddb50fb9d86e32921459b4d::M1::EventA" + "repr": "0x999de5aa7620209919ea1dc088028fffa75c36282190e063c3df58534d2842b1::M1::EventA" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -111,7 +111,7 @@ Response: { "name": "M1" }, "type": { - "repr": "0xfd2d034e09aa942c0bdbde7bc0ee8e69fd0ae0e54ddb50fb9d86e32921459b4d::M1::EventA" + "repr": "0x999de5aa7620209919ea1dc088028fffa75c36282190e063c3df58534d2842b1::M1::EventA" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -129,7 +129,7 @@ Response: { "name": "M1" }, "type": { - "repr": "0xfd2d034e09aa942c0bdbde7bc0ee8e69fd0ae0e54ddb50fb9d86e32921459b4d::M1::EventA" + "repr": "0x999de5aa7620209919ea1dc088028fffa75c36282190e063c3df58534d2842b1::M1::EventA" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -162,7 +162,7 @@ Response: { "name": "M1" }, "type": { - "repr": "0xfd2d034e09aa942c0bdbde7bc0ee8e69fd0ae0e54ddb50fb9d86e32921459b4d::M1::EventA" + "repr": "0x999de5aa7620209919ea1dc088028fffa75c36282190e063c3df58534d2842b1::M1::EventA" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -180,7 +180,7 @@ Response: { "name": "M1" }, "type": { - "repr": "0xfd2d034e09aa942c0bdbde7bc0ee8e69fd0ae0e54ddb50fb9d86e32921459b4d::M1::EventA" + "repr": "0x999de5aa7620209919ea1dc088028fffa75c36282190e063c3df58534d2842b1::M1::EventA" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -213,7 +213,7 @@ Response: { "name": "M1" }, "type": { - "repr": "0xfd2d034e09aa942c0bdbde7bc0ee8e69fd0ae0e54ddb50fb9d86e32921459b4d::M1::EventA" + "repr": "0x999de5aa7620209919ea1dc088028fffa75c36282190e063c3df58534d2842b1::M1::EventA" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -231,7 +231,7 @@ Response: { "name": "M1" }, "type": { - "repr": "0xfd2d034e09aa942c0bdbde7bc0ee8e69fd0ae0e54ddb50fb9d86e32921459b4d::M1::EventA" + "repr": "0x999de5aa7620209919ea1dc088028fffa75c36282190e063c3df58534d2842b1::M1::EventA" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" diff --git a/crates/iota-graphql-e2e-tests/tests/event_connection/tx_digest.exp b/crates/iota-graphql-e2e-tests/tests/event_connection/tx_digest.exp index 9988f387e91..2b1087ce2ef 100644 --- a/crates/iota-graphql-e2e-tests/tests/event_connection/tx_digest.exp +++ b/crates/iota-graphql-e2e-tests/tests/event_connection/tx_digest.exp @@ -7,24 +7,24 @@ task 1, lines 11-27: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 4795600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4788000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 29: //# run Test::M1::no_emit --sender A --args 0 mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 31: //# run Test::M1::emit_2 --sender A --args 2 events: Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [2, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [3, 0, 0, 0, 0, 0, 0, 0] } mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 33: //# run Test::M1::emit_2 --sender B --args 4 events: Event { package_id: Test, transaction_module: Identifier("M1"), sender: B, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [4, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: B, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [5, 0, 0, 0, 0, 0, 0, 0] } mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 0, non_refundable_storage_fee: 0 task 5, line 35: //# create-checkpoint @@ -37,19 +37,19 @@ Response: { "transactionBlocks": { "nodes": [ { - "digest": "6jJ5GyPr9B7aW4NTEwGJUeWX9RT2pjnXL1by8J2Qk7xV" + "digest": "CmPeQ2JKFnEKeZsYz9cYU8q57Wb1fgZxpDqYq9YinuQA" }, { - "digest": "A7J7tmEk4Kceps4eLVsZa64cajF6SpvEKRUbRN33rRDi" + "digest": "Cr67aCWwfbpbrQvsdhniTfA6v6wEbyTA5cwKr7MeVo6h" }, { - "digest": "dF5dZTYwVWLpHk1YmZXxdmmNMKiG5SPcUExet74jNbK" + "digest": "F9dhDrsiFxBWatoDNmExL7PQQW6xBzpAj8iyqbzAagXj" }, { - "digest": "CdAwFF4z5yJrnXiW355M5RoMJmDH8QoepxEn2RVYYUnD" + "digest": "EkH8TQ1xRv4Lj4wtD4kRuZrsPYP2vGKSk2mtbeENDGsn" }, { - "digest": "3fQU9EzJK2yvix8asgCZCwv68ugGPWqxjxuhYrPvDm8n" + "digest": "9oZ3VdEUep1tbAAHbrACiQEPuRAwvXYU4m3TrViQSB5v" } ] } diff --git a/crates/iota-graphql-e2e-tests/tests/event_connection/tx_digest.move b/crates/iota-graphql-e2e-tests/tests/event_connection/tx_digest.move index 8ffa98e143d..e6f9ea2833d 100644 --- a/crates/iota-graphql-e2e-tests/tests/event_connection/tx_digest.move +++ b/crates/iota-graphql-e2e-tests/tests/event_connection/tx_digest.move @@ -47,7 +47,7 @@ module Test::M1 { { # `transactionDigest` is the digest of the 4th transaction returned by # task 6 (see `tx_digest.exp`) - events(filter: {transactionDigest: "CdAwFF4z5yJrnXiW355M5RoMJmDH8QoepxEn2RVYYUnD"}) { + events(filter: {transactionDigest: "EkH8TQ1xRv4Lj4wtD4kRuZrsPYP2vGKSk2mtbeENDGsn"}) { edges { cursor node { @@ -62,7 +62,7 @@ module Test::M1 { { # `transactionDigest` is the digest of the 4th transaction returned by # task 6 (see `tx_digest.exp`) - events(after: "@{cursor_0}" filter: {transactionDigest: "CdAwFF4z5yJrnXiW355M5RoMJmDH8QoepxEn2RVYYUnD"}) { + events(after: "@{cursor_0}" filter: {transactionDigest: "EkH8TQ1xRv4Lj4wtD4kRuZrsPYP2vGKSk2mtbeENDGsn"}) { edges { cursor node { @@ -79,7 +79,7 @@ module Test::M1 { { # `transactionDigest` is the digest of the 4th transaction returned by # task 6 (see `tx_digest.exp`) - events(after: "@{cursor_0}" filter: {transactionDigest: "CdAwFF4z5yJrnXiW355M5RoMJmDH8QoepxEn2RVYYUnD"}) { + events(after: "@{cursor_0}" filter: {transactionDigest: "EkH8TQ1xRv4Lj4wtD4kRuZrsPYP2vGKSk2mtbeENDGsn"}) { edges { cursor node { @@ -94,7 +94,7 @@ module Test::M1 { { # `transactionDigest` is the digest of the 5th transaction returned by # task 6 (see `tx_digest.exp`) - events(filter: {transactionDigest: "3fQU9EzJK2yvix8asgCZCwv68ugGPWqxjxuhYrPvDm8n"}) { + events(filter: {transactionDigest: "9oZ3VdEUep1tbAAHbrACiQEPuRAwvXYU4m3TrViQSB5v"}) { edges { cursor node { @@ -108,7 +108,7 @@ module Test::M1 { { # `transactionDigest` is the digest of the 5th transaction returned by # task 6 (see `tx_digest.exp`) - events(after: "@{cursor_0}" filter: {transactionDigest: "3fQU9EzJK2yvix8asgCZCwv68ugGPWqxjxuhYrPvDm8n"}) { + events(after: "@{cursor_0}" filter: {transactionDigest: "9oZ3VdEUep1tbAAHbrACiQEPuRAwvXYU4m3TrViQSB5v"}) { edges { cursor node { @@ -123,7 +123,7 @@ module Test::M1 { { # `transactionDigest` is the digest of the 4th transaction returned by # task 6 (see `tx_digest.exp`) - events(last: 10 filter: {transactionDigest: "CdAwFF4z5yJrnXiW355M5RoMJmDH8QoepxEn2RVYYUnD"}) { + events(last: 10 filter: {transactionDigest: "EkH8TQ1xRv4Lj4wtD4kRuZrsPYP2vGKSk2mtbeENDGsn"}) { edges { cursor node { @@ -138,7 +138,7 @@ module Test::M1 { { # `transactionDigest` is the digest of the 4th transaction returned by # task 6 (see `tx_digest.exp`) - events(last: 10 before: "@{cursor_0}" filter: {transactionDigest: "CdAwFF4z5yJrnXiW355M5RoMJmDH8QoepxEn2RVYYUnD"}) { + events(last: 10 before: "@{cursor_0}" filter: {transactionDigest: "EkH8TQ1xRv4Lj4wtD4kRuZrsPYP2vGKSk2mtbeENDGsn"}) { edges { cursor node { @@ -155,7 +155,7 @@ module Test::M1 { { # `transactionDigest` is the digest of the 4th transaction returned by # task 6 (see `tx_digest.exp`) - events(last: 10 before: "@{cursor_0}" filter: {transactionDigest: "CdAwFF4z5yJrnXiW355M5RoMJmDH8QoepxEn2RVYYUnD"}) { + events(last: 10 before: "@{cursor_0}" filter: {transactionDigest: "EkH8TQ1xRv4Lj4wtD4kRuZrsPYP2vGKSk2mtbeENDGsn"}) { edges { cursor node { @@ -170,7 +170,7 @@ module Test::M1 { { # `transactionDigest` is the digest of the 5th transaction returned by # task 6 (see `tx_digest.exp`) - events(last: 10 filter: {transactionDigest: "3fQU9EzJK2yvix8asgCZCwv68ugGPWqxjxuhYrPvDm8n"}) { + events(last: 10 filter: {transactionDigest: "9oZ3VdEUep1tbAAHbrACiQEPuRAwvXYU4m3TrViQSB5v"}) { edges { cursor node { @@ -184,7 +184,7 @@ module Test::M1 { { # `transactionDigest` is the digest of the 5th transaction returned by # task 6 (see `tx_digest.exp`) - events(last: 10 before: "@{cursor_0}" filter: {transactionDigest: "3fQU9EzJK2yvix8asgCZCwv68ugGPWqxjxuhYrPvDm8n"}) { + events(last: 10 before: "@{cursor_0}" filter: {transactionDigest: "9oZ3VdEUep1tbAAHbrACiQEPuRAwvXYU4m3TrViQSB5v"}) { edges { cursor node { @@ -199,7 +199,7 @@ module Test::M1 { { # `transactionDigest` is the digest of the 4th transaction returned by # task 6 (see `tx_digest.exp`) - events(filter: {sender: "@{A}" transactionDigest: "CdAwFF4z5yJrnXiW355M5RoMJmDH8QoepxEn2RVYYUnD"}) { + events(filter: {sender: "@{A}" transactionDigest: "EkH8TQ1xRv4Lj4wtD4kRuZrsPYP2vGKSk2mtbeENDGsn"}) { edges { cursor node { @@ -214,7 +214,7 @@ module Test::M1 { { # `transactionDigest` is the digest of the 5th transaction returned by # task 6 (see `tx_digest.exp`) - events(filter: {sender: "@{B}" transactionDigest: "3fQU9EzJK2yvix8asgCZCwv68ugGPWqxjxuhYrPvDm8n"}) { + events(filter: {sender: "@{B}" transactionDigest: "9oZ3VdEUep1tbAAHbrACiQEPuRAwvXYU4m3TrViQSB5v"}) { edges { cursor node { @@ -229,7 +229,7 @@ module Test::M1 { { # `transactionDigest` is the digest of the 4th transaction returned by # task 6 (see `tx_digest.exp`) - events(filter: {sender: "@{B}" transactionDigest: "CdAwFF4z5yJrnXiW355M5RoMJmDH8QoepxEn2RVYYUnD"}) { + events(filter: {sender: "@{B}" transactionDigest: "EkH8TQ1xRv4Lj4wtD4kRuZrsPYP2vGKSk2mtbeENDGsn"}) { edges { cursor node { @@ -244,7 +244,7 @@ module Test::M1 { { # `transactionDigest` is the digest of the 5th transaction returned by # task 6 (see `tx_digest.exp`) - events(filter: {sender: "@{A}" transactionDigest: "3fQU9EzJK2yvix8asgCZCwv68ugGPWqxjxuhYrPvDm8n"}) { + events(filter: {sender: "@{A}" transactionDigest: "9oZ3VdEUep1tbAAHbrACiQEPuRAwvXYU4m3TrViQSB5v"}) { edges { cursor node { diff --git a/crates/iota-graphql-e2e-tests/tests/event_connection/type_filter.exp b/crates/iota-graphql-e2e-tests/tests/event_connection/type_filter.exp index cb9459b134c..3b1903593bf 100644 --- a/crates/iota-graphql-e2e-tests/tests/event_connection/type_filter.exp +++ b/crates/iota-graphql-e2e-tests/tests/event_connection/type_filter.exp @@ -7,13 +7,13 @@ task 1, lines 7-35: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 6604400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6596800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 37: //# run Test::M2::emit_emit_a --sender A --args 20 events: Event { package_id: Test, transaction_module: Identifier("M2"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [20, 0, 0, 0, 0, 0, 0, 0] } mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 39: //# create-checkpoint @@ -30,7 +30,7 @@ Response: { "name": "M2" }, "type": { - "repr": "0x34e8ec3870c570f5dfcb93edb6490bbd005470d1750aa8cd089405c22638de10::M1::EventA" + "repr": "0x1978d81fd93431a2b3ce6565adff1d6b3608ebbc3f81bca49672392044fa0eca::M1::EventA" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -49,13 +49,13 @@ task 5, line 60: //# run Test::M2::emit_b --sender A --args 42 events: Event { package_id: Test, transaction_module: Identifier("M2"), sender: A, type_: StructTag { address: Test, module: Identifier("M2"), name: Identifier("EventB"), type_params: [] }, contents: [42, 0, 0, 0, 0, 0, 0, 0] } mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, line 62: //# run Test::M2::emit_b --sender B --args 43 events: Event { package_id: Test, transaction_module: Identifier("M2"), sender: B, type_: StructTag { address: Test, module: Identifier("M2"), name: Identifier("EventB"), type_params: [] }, contents: [43, 0, 0, 0, 0, 0, 0, 0] } mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 0, non_refundable_storage_fee: 0 task 7, line 64: //# create-checkpoint @@ -72,7 +72,7 @@ Response: { "name": "M2" }, "type": { - "repr": "0x34e8ec3870c570f5dfcb93edb6490bbd005470d1750aa8cd089405c22638de10::M1::EventA" + "repr": "0x1978d81fd93431a2b3ce6565adff1d6b3608ebbc3f81bca49672392044fa0eca::M1::EventA" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -98,7 +98,7 @@ Response: { "name": "M2" }, "type": { - "repr": "0x34e8ec3870c570f5dfcb93edb6490bbd005470d1750aa8cd089405c22638de10::M2::EventB" + "repr": "0x1978d81fd93431a2b3ce6565adff1d6b3608ebbc3f81bca49672392044fa0eca::M2::EventB" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -124,7 +124,7 @@ Response: { "name": "M2" }, "type": { - "repr": "0x34e8ec3870c570f5dfcb93edb6490bbd005470d1750aa8cd089405c22638de10::M1::EventA" + "repr": "0x1978d81fd93431a2b3ce6565adff1d6b3608ebbc3f81bca49672392044fa0eca::M1::EventA" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -139,7 +139,7 @@ Response: { "name": "M2" }, "type": { - "repr": "0x34e8ec3870c570f5dfcb93edb6490bbd005470d1750aa8cd089405c22638de10::M2::EventB" + "repr": "0x1978d81fd93431a2b3ce6565adff1d6b3608ebbc3f81bca49672392044fa0eca::M2::EventB" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -165,7 +165,7 @@ Response: { "name": "M2" }, "type": { - "repr": "0x34e8ec3870c570f5dfcb93edb6490bbd005470d1750aa8cd089405c22638de10::M1::EventA" + "repr": "0x1978d81fd93431a2b3ce6565adff1d6b3608ebbc3f81bca49672392044fa0eca::M1::EventA" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -180,7 +180,7 @@ Response: { "name": "M2" }, "type": { - "repr": "0x34e8ec3870c570f5dfcb93edb6490bbd005470d1750aa8cd089405c22638de10::M2::EventB" + "repr": "0x1978d81fd93431a2b3ce6565adff1d6b3608ebbc3f81bca49672392044fa0eca::M2::EventB" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -195,7 +195,7 @@ Response: { "name": "M2" }, "type": { - "repr": "0x34e8ec3870c570f5dfcb93edb6490bbd005470d1750aa8cd089405c22638de10::M2::EventB" + "repr": "0x1978d81fd93431a2b3ce6565adff1d6b3608ebbc3f81bca49672392044fa0eca::M2::EventB" }, "sender": { "address": "0x28f02a953f3553f51a9365593c7d4bd0643d2085f004b18c6ca9de51682b2c80" diff --git a/crates/iota-graphql-e2e-tests/tests/event_connection/type_param_filter.exp b/crates/iota-graphql-e2e-tests/tests/event_connection/type_param_filter.exp index 013bf75c6e8..034c36b518a 100644 --- a/crates/iota-graphql-e2e-tests/tests/event_connection/type_param_filter.exp +++ b/crates/iota-graphql-e2e-tests/tests/event_connection/type_param_filter.exp @@ -7,25 +7,25 @@ task 1, lines 7-30: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5996400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5988800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 33: //# run Test::M1::emit_T1 --sender A events: Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [Struct(StructTag { address: Test, module: Identifier("M1"), name: Identifier("T1"), type_params: [] })] }, contents: [0] } mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 35: //# run Test::M1::emit_T2 --sender A events: Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [Struct(StructTag { address: Test, module: Identifier("M1"), name: Identifier("T2"), type_params: [] })] }, contents: [0] } mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 37: //# run Test::M1::emit_both --sender A events: Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [Struct(StructTag { address: Test, module: Identifier("M1"), name: Identifier("T1"), type_params: [] })] }, contents: [0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [Struct(StructTag { address: Test, module: Identifier("M1"), name: Identifier("T2"), type_params: [] })] }, contents: [0] } mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 39: //# create-checkpoint @@ -38,19 +38,19 @@ Response: { "transactionBlocks": { "nodes": [ { - "digest": "6jJ5GyPr9B7aW4NTEwGJUeWX9RT2pjnXL1by8J2Qk7xV" + "digest": "CmPeQ2JKFnEKeZsYz9cYU8q57Wb1fgZxpDqYq9YinuQA" }, { - "digest": "3MojqwweH6phoNyB1zL7YYSV16jdzCcVjiWRa7swMNt5" + "digest": "ChGw1FpdLESefvbz4sAoni52P9jWpTAubgxkNsvV5kSk" }, { - "digest": "4VqNbcTqjtcp7DrxPGfwKxeH9TqKJEQbPfQRN3A2o758" + "digest": "6muLxHj13tG23qV2eyNud8ciUrKno4NUpDFFFoGMRTNW" }, { - "digest": "5EtTmeNBQkGCfRsWSd7LbchmfAP4z7EFNw9UdTdUsCe4" + "digest": "5b7G3sXWboXZSKB6zQqzH3rq15Q4UqbaFRrfS9HpQR9B" }, { - "digest": "36CS8fvTg5HVKadCKmzWu6bwh9fJfbQZermzUepoYCmB" + "digest": "mnGPbLwe3rhbRZMokPmZXJtCtrpYzBQ6wFwJ7mrg56w" } ] } @@ -65,7 +65,7 @@ Response: { "nodes": [ { "type": { - "repr": "0x68c7719354e9fcaf73a654f2bf09268dd36102a769534c79df0a818174421835::M1::EventA<0x68c7719354e9fcaf73a654f2bf09268dd36102a769534c79df0a818174421835::M1::T1>" + "repr": "0x0743c995c75b4bdcf02b9585730ea00567a502031977468fdcc80bd0e1449270::M1::EventA<0x0743c995c75b4bdcf02b9585730ea00567a502031977468fdcc80bd0e1449270::M1::T1>" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -78,7 +78,7 @@ Response: { }, { "type": { - "repr": "0x68c7719354e9fcaf73a654f2bf09268dd36102a769534c79df0a818174421835::M1::EventA<0x68c7719354e9fcaf73a654f2bf09268dd36102a769534c79df0a818174421835::M1::T2>" + "repr": "0x0743c995c75b4bdcf02b9585730ea00567a502031977468fdcc80bd0e1449270::M1::EventA<0x0743c995c75b4bdcf02b9585730ea00567a502031977468fdcc80bd0e1449270::M1::T2>" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -91,7 +91,7 @@ Response: { }, { "type": { - "repr": "0x68c7719354e9fcaf73a654f2bf09268dd36102a769534c79df0a818174421835::M1::EventA<0x68c7719354e9fcaf73a654f2bf09268dd36102a769534c79df0a818174421835::M1::T1>" + "repr": "0x0743c995c75b4bdcf02b9585730ea00567a502031977468fdcc80bd0e1449270::M1::EventA<0x0743c995c75b4bdcf02b9585730ea00567a502031977468fdcc80bd0e1449270::M1::T1>" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -104,7 +104,7 @@ Response: { }, { "type": { - "repr": "0x68c7719354e9fcaf73a654f2bf09268dd36102a769534c79df0a818174421835::M1::EventA<0x68c7719354e9fcaf73a654f2bf09268dd36102a769534c79df0a818174421835::M1::T2>" + "repr": "0x0743c995c75b4bdcf02b9585730ea00567a502031977468fdcc80bd0e1449270::M1::EventA<0x0743c995c75b4bdcf02b9585730ea00567a502031977468fdcc80bd0e1449270::M1::T2>" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -128,7 +128,7 @@ Response: { "nodes": [ { "type": { - "repr": "0x68c7719354e9fcaf73a654f2bf09268dd36102a769534c79df0a818174421835::M1::EventA<0x68c7719354e9fcaf73a654f2bf09268dd36102a769534c79df0a818174421835::M1::T1>" + "repr": "0x0743c995c75b4bdcf02b9585730ea00567a502031977468fdcc80bd0e1449270::M1::EventA<0x0743c995c75b4bdcf02b9585730ea00567a502031977468fdcc80bd0e1449270::M1::T1>" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -141,7 +141,7 @@ Response: { }, { "type": { - "repr": "0x68c7719354e9fcaf73a654f2bf09268dd36102a769534c79df0a818174421835::M1::EventA<0x68c7719354e9fcaf73a654f2bf09268dd36102a769534c79df0a818174421835::M1::T1>" + "repr": "0x0743c995c75b4bdcf02b9585730ea00567a502031977468fdcc80bd0e1449270::M1::EventA<0x0743c995c75b4bdcf02b9585730ea00567a502031977468fdcc80bd0e1449270::M1::T1>" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" @@ -165,7 +165,7 @@ Response: { "nodes": [ { "type": { - "repr": "0x68c7719354e9fcaf73a654f2bf09268dd36102a769534c79df0a818174421835::M1::EventA<0x68c7719354e9fcaf73a654f2bf09268dd36102a769534c79df0a818174421835::M1::T2>" + "repr": "0x0743c995c75b4bdcf02b9585730ea00567a502031977468fdcc80bd0e1449270::M1::EventA<0x0743c995c75b4bdcf02b9585730ea00567a502031977468fdcc80bd0e1449270::M1::T2>" }, "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" diff --git a/crates/iota-graphql-e2e-tests/tests/event_connection/type_param_filter.move b/crates/iota-graphql-e2e-tests/tests/event_connection/type_param_filter.move index 481961bae78..a8df0d44e52 100644 --- a/crates/iota-graphql-e2e-tests/tests/event_connection/type_param_filter.move +++ b/crates/iota-graphql-e2e-tests/tests/event_connection/type_param_filter.move @@ -81,7 +81,7 @@ module Test::M1 { { # `transactionDigest` is the digest of the 5th transaction returned from # task 6 (see `type_param_filter.exp`) - events(filter: {eventType: "@{Test}::M1::EventA<@{Test}::M1::T2>", transactionDigest: "36CS8fvTg5HVKadCKmzWu6bwh9fJfbQZermzUepoYCmB"}) { + events(filter: {eventType: "@{Test}::M1::EventA<@{Test}::M1::T2>", transactionDigest: "mnGPbLwe3rhbRZMokPmZXJtCtrpYzBQ6wFwJ7mrg56w"}) { nodes { type { repr diff --git a/crates/iota-graphql-e2e-tests/tests/limits/directives.exp b/crates/iota-graphql-e2e-tests/tests/limits/directives.exp index 89e3e1fee18..fbc8a46327c 100644 --- a/crates/iota-graphql-e2e-tests/tests/limits/directives.exp +++ b/crates/iota-graphql-e2e-tests/tests/limits/directives.exp @@ -73,7 +73,7 @@ task 5, lines 59-63: //# run-graphql Response: { "data": { - "chainIdentifier": "408a17e4" + "chainIdentifier": "e2a97689" } } @@ -81,7 +81,7 @@ task 6, lines 65-69: //# run-graphql Response: { "data": { - "chainIdentifier": "408a17e4" + "chainIdentifier": "e2a97689" } } diff --git a/crates/iota-graphql-e2e-tests/tests/limits/output_node_estimation.exp b/crates/iota-graphql-e2e-tests/tests/limits/output_node_estimation.exp index 7692d05e7ef..b7660421b69 100644 --- a/crates/iota-graphql-e2e-tests/tests/limits/output_node_estimation.exp +++ b/crates/iota-graphql-e2e-tests/tests/limits/output_node_estimation.exp @@ -30,7 +30,7 @@ Response: { "edges": [ { "node": { - "digest": "2B5WCAR8XmpU5mGFe225Jk8bhnh5oXNjfyfaX72VELvJ" + "digest": "EjxArvXVR7U8yu5Yi2oDmELwV74gwJFinZKhnPuTKj83" } } ] @@ -59,7 +59,7 @@ Response: { "edges": [ { "txns": { - "digest": "2B5WCAR8XmpU5mGFe225Jk8bhnh5oXNjfyfaX72VELvJ" + "digest": "EjxArvXVR7U8yu5Yi2oDmELwV74gwJFinZKhnPuTKj83" } } ] @@ -91,7 +91,7 @@ Response: { "edges": [ { "txns": { - "digest": "2B5WCAR8XmpU5mGFe225Jk8bhnh5oXNjfyfaX72VELvJ" + "digest": "EjxArvXVR7U8yu5Yi2oDmELwV74gwJFinZKhnPuTKj83" } } ] @@ -100,7 +100,7 @@ Response: { "edges": [ { "txns": { - "digest": "2B5WCAR8XmpU5mGFe225Jk8bhnh5oXNjfyfaX72VELvJ" + "digest": "EjxArvXVR7U8yu5Yi2oDmELwV74gwJFinZKhnPuTKj83" } } ] @@ -132,7 +132,7 @@ Response: { "edges": [ { "txns": { - "digest": "2B5WCAR8XmpU5mGFe225Jk8bhnh5oXNjfyfaX72VELvJ" + "digest": "EjxArvXVR7U8yu5Yi2oDmELwV74gwJFinZKhnPuTKj83" } } ] @@ -164,7 +164,7 @@ Response: { "edges": [ { "txns": { - "digest": "2B5WCAR8XmpU5mGFe225Jk8bhnh5oXNjfyfaX72VELvJ" + "digest": "EjxArvXVR7U8yu5Yi2oDmELwV74gwJFinZKhnPuTKj83" } } ] @@ -190,7 +190,7 @@ Response: { "edges": [ { "txns": { - "digest": "2B5WCAR8XmpU5mGFe225Jk8bhnh5oXNjfyfaX72VELvJ" + "digest": "EjxArvXVR7U8yu5Yi2oDmELwV74gwJFinZKhnPuTKj83" } } ] @@ -216,7 +216,7 @@ Response: { "edges": [ { "txns": { - "digest": "2B5WCAR8XmpU5mGFe225Jk8bhnh5oXNjfyfaX72VELvJ", + "digest": "EjxArvXVR7U8yu5Yi2oDmELwV74gwJFinZKhnPuTKj83", "first": null, "last": null } @@ -243,7 +243,7 @@ Response: { "transactionBlocks": { "nodes": [ { - "digest": "2B5WCAR8XmpU5mGFe225Jk8bhnh5oXNjfyfaX72VELvJ", + "digest": "EjxArvXVR7U8yu5Yi2oDmELwV74gwJFinZKhnPuTKj83", "first": null, "last": null } @@ -270,7 +270,7 @@ Response: { "edges": [ { "txns": { - "digest": "2B5WCAR8XmpU5mGFe225Jk8bhnh5oXNjfyfaX72VELvJ", + "digest": "EjxArvXVR7U8yu5Yi2oDmELwV74gwJFinZKhnPuTKj83", "a": null, "b": null } @@ -324,7 +324,7 @@ Response: { "edges": [ { "node": { - "digest": "2B5WCAR8XmpU5mGFe225Jk8bhnh5oXNjfyfaX72VELvJ", + "digest": "EjxArvXVR7U8yu5Yi2oDmELwV74gwJFinZKhnPuTKj83", "a": null } } @@ -350,14 +350,14 @@ Response: { "fragmentSpread": { "nodes": [ { - "digest": "2B5WCAR8XmpU5mGFe225Jk8bhnh5oXNjfyfaX72VELvJ" + "digest": "EjxArvXVR7U8yu5Yi2oDmELwV74gwJFinZKhnPuTKj83" } ] }, "inlineFragment": { "nodes": [ { - "digest": "2B5WCAR8XmpU5mGFe225Jk8bhnh5oXNjfyfaX72VELvJ" + "digest": "EjxArvXVR7U8yu5Yi2oDmELwV74gwJFinZKhnPuTKj83" } ] } diff --git a/crates/iota-graphql-e2e-tests/tests/objects/coin.exp b/crates/iota-graphql-e2e-tests/tests/objects/coin.exp index 1d771517c51..13c0fed33e1 100644 --- a/crates/iota-graphql-e2e-tests/tests/objects/coin.exp +++ b/crates/iota-graphql-e2e-tests/tests/objects/coin.exp @@ -8,7 +8,7 @@ task 1, lines 7-34: created: object(1,0), object(1,1), object(1,2), object(1,3), object(1,4), object(1,5) mutated: object(0,0) unchanged_shared: 0x0000000000000000000000000000000000000000000000000000000000000403 -gas summary: computation_cost: 1000000, storage_cost: 15663600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 15618000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 36: //# create-checkpoint @@ -45,7 +45,7 @@ Response: { { "cursor": "IMafGVTG0T42MAdfRilm4G2fBf7CmEbT14ECYYflQRQxAQAAAAAAAAA=", "node": { - "coinBalance": "299999983336400", + "coinBalance": "299999983382000", "contents": { "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA>" @@ -58,34 +58,34 @@ Response: { "fakeCoins": { "edges": [ { - "cursor": "IBbYMsWVo6AxaGlfd02OVFH8KateUMLaXYNGUh5dV3DUAQAAAAAAAAA=", + "cursor": "IDA83btPrJYvdZJSYxHTMwTntnb1td8qEwJabuS53VYOAQAAAAAAAAA=", "node": { - "coinBalance": "1", + "coinBalance": "2", "contents": { "type": { - "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0x1beba21393083ff5ae90e2e6e22ed3780b8d80d61b294aa408d20d2362539691::fake::FAKE>" + "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0xff92cd43d27e0af392d761a8e253e684dfcc6707854e46d94774a2751877eef5::fake::FAKE>" } } } }, { - "cursor": "ICzxZhEQH74HLzxLE05ZUVYOyKAneGmQ+xqup4XNBPtsAQAAAAAAAAA=", + "cursor": "IJa3gXgkZqu5tgHRpzZI9hvBIfX+0OV/h4KlHe/fkQXjAQAAAAAAAAA=", "node": { - "coinBalance": "2", + "coinBalance": "1", "contents": { "type": { - "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0x1beba21393083ff5ae90e2e6e22ed3780b8d80d61b294aa408d20d2362539691::fake::FAKE>" + "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0xff92cd43d27e0af392d761a8e253e684dfcc6707854e46d94774a2751877eef5::fake::FAKE>" } } } }, { - "cursor": "IEGbOluMu3umMrKpUZvnrKjpIqR20ZInY+jT7bcvW9yFAQAAAAAAAAA=", + "cursor": "IPclUYS8wwbSrJwJqrO8vj9k3Cks56yvflmE3zZQNZWSAQAAAAAAAAA=", "node": { "coinBalance": "3", "contents": { "type": { - "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0x1beba21393083ff5ae90e2e6e22ed3780b8d80d61b294aa408d20d2362539691::fake::FAKE>" + "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0xff92cd43d27e0af392d761a8e253e684dfcc6707854e46d94774a2751877eef5::fake::FAKE>" } } } @@ -98,7 +98,7 @@ Response: { { "cursor": "IMafGVTG0T42MAdfRilm4G2fBf7CmEbT14ECYYflQRQxAQAAAAAAAAA=", "node": { - "coinBalance": "299999983336400", + "coinBalance": "299999983382000", "contents": { "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA>" @@ -117,14 +117,14 @@ Response: { "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA" }, "coinObjectCount": 1, - "totalBalance": "299999983336400" + "totalBalance": "299999983382000" } }, { - "cursor": "eyJ0IjoiMHgxYmViYTIxMzkzMDgzZmY1YWU5MGUyZTZlMjJlZDM3ODBiOGQ4MGQ2MWIyOTRhYTQwOGQyMGQyMzYyNTM5NjkxOjpmYWtlOjpGQUtFIiwiYyI6MX0", + "cursor": "eyJ0IjoiMHhmZjkyY2Q0M2QyN2UwYWYzOTJkNzYxYThlMjUzZTY4NGRmY2M2NzA3ODU0ZTQ2ZDk0Nzc0YTI3NTE4NzdlZWY1OjpmYWtlOjpGQUtFIiwiYyI6MX0", "node": { "coinType": { - "repr": "0x1beba21393083ff5ae90e2e6e22ed3780b8d80d61b294aa408d20d2362539691::fake::FAKE" + "repr": "0xff92cd43d27e0af392d761a8e253e684dfcc6707854e46d94774a2751877eef5::fake::FAKE" }, "coinObjectCount": 3, "totalBalance": "6" @@ -142,7 +142,7 @@ Response: { "lastBalance": { "edges": [ { - "cursor": "eyJ0IjoiMHgxYmViYTIxMzkzMDgzZmY1YWU5MGUyZTZlMjJlZDM3ODBiOGQ4MGQ2MWIyOTRhYTQwOGQyMGQyMzYyNTM5NjkxOjpmYWtlOjpGQUtFIiwiYyI6MX0" + "cursor": "eyJ0IjoiMHhmZjkyY2Q0M2QyN2UwYWYzOTJkNzYxYThlMjUzZTY4NGRmY2M2NzA3ODU0ZTQ2ZDk0Nzc0YTI3NTE4NzdlZWY1OjpmYWtlOjpGQUtFIiwiYyI6MX0" } ] } diff --git a/crates/iota-graphql-e2e-tests/tests/objects/data.exp b/crates/iota-graphql-e2e-tests/tests/objects/data.exp index e359bd4fbc4..2fcc77702b3 100644 --- a/crates/iota-graphql-e2e-tests/tests/objects/data.exp +++ b/crates/iota-graphql-e2e-tests/tests/objects/data.exp @@ -7,7 +7,7 @@ task 1, lines 7-40: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 7622800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7615200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 42-44: //# programmable --inputs @A @@ -15,7 +15,7 @@ task 2, lines 42-44: //> TransferObjects([Result(0)], Input(0)) created: object(2,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2910800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2895600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 46: //# create-checkpoint @@ -36,7 +36,7 @@ Response: { "asMoveObject": { "contents": { "type": { - "repr": "0xcba73abc9f220072848d381c92d6671cea3879373e565fcf9f628a2dc51161ef::m::Foo" + "repr": "0xe0ef7a7ba01308537537496e046369f6664d6a66766d3ec40418a768c98ba1e8::m::Foo" }, "data": { "Struct": [ @@ -44,38 +44,38 @@ Response: { "name": "id", "value": { "UID": [ + 55, + 140, + 182, + 180, + 109, + 180, + 10, + 32, + 206, 27, - 44, - 74, - 2, - 197, - 251, - 2, - 172, + 49, + 182, + 57, + 108, + 252, 219, - 236, - 12, - 39, - 130, - 137, - 174, - 162, - 191, - 228, - 68, - 51, - 120, - 91, - 248, - 128, - 154, - 58, - 11, - 61, + 129, + 213, + 146, + 143, + 101, + 13, + 152, + 99, + 213, + 8, + 123, + 107, + 48, + 204, 87, - 67, - 168, - 171 + 150 ] } }, @@ -83,38 +83,38 @@ Response: { "name": "f0", "value": { "ID": [ + 55, + 140, + 182, + 180, + 109, + 180, + 10, + 32, + 206, 27, - 44, - 74, - 2, - 197, - 251, - 2, - 172, + 49, + 182, + 57, + 108, + 252, 219, - 236, - 12, - 39, - 130, - 137, - 174, - 162, - 191, - 228, - 68, - 51, - 120, - 91, - 248, - 128, - 154, - 58, - 11, - 61, + 129, + 213, + 146, + 143, + 101, + 13, + 152, + 99, + 213, + 8, + 123, + 107, + 48, + 204, 87, - 67, - 168, - 171 + 150 ] } }, @@ -154,38 +154,38 @@ Response: { "Vector": [ { "Address": [ + 55, + 140, + 182, + 180, + 109, + 180, + 10, + 32, + 206, 27, - 44, - 74, - 2, - 197, - 251, - 2, - 172, + 49, + 182, + 57, + 108, + 252, 219, - 236, - 12, - 39, - 130, - 137, - 174, - 162, - 191, - 228, - 68, - 51, - 120, - 91, - 248, - 128, - 154, - 58, - 11, - 61, + 129, + 213, + 146, + 143, + 101, + 13, + 152, + 99, + 213, + 8, + 123, + 107, + 48, + 204, 87, - 67, - 168, - 171 + 150 ] } ] @@ -202,15 +202,15 @@ Response: { ] }, "json": { - "id": "0x1b2c4a02c5fb02acdbec0c278289aea2bfe44433785bf8809a3a0b3d5743a8ab", - "f0": "0x1b2c4a02c5fb02acdbec0c278289aea2bfe44433785bf8809a3a0b3d5743a8ab", + "id": "0x378cb6b46db40a20ce1b31b6396cfcdb81d5928f650d9863d5087b6b30cc5796", + "f0": "0x378cb6b46db40a20ce1b31b6396cfcdb81d5928f650d9863d5087b6b30cc5796", "f1": true, "f2": 42, "f3": "43", "f4": "hello", "f5": "world", "f6": [ - "0x1b2c4a02c5fb02acdbec0c278289aea2bfe44433785bf8809a3a0b3d5743a8ab" + "0x378cb6b46db40a20ce1b31b6396cfcdb81d5928f650d9863d5087b6b30cc5796" ], "f7": 44 } @@ -273,7 +273,7 @@ Response: { { "name": "value", "value": { - "Number": "299999988454400" + "Number": "299999988469600" } } ] @@ -284,7 +284,7 @@ Response: { "json": { "id": "0x641200049cabf8f3d8f5a407c9ffd99abf3725aeb242239887d627aa76c5cbe7", "balance": { - "value": "299999988454400" + "value": "299999988469600" } } } diff --git a/crates/iota-graphql-e2e-tests/tests/objects/display.exp b/crates/iota-graphql-e2e-tests/tests/objects/display.exp index c085a5f4c00..8d17c8e4fd9 100644 --- a/crates/iota-graphql-e2e-tests/tests/objects/display.exp +++ b/crates/iota-graphql-e2e-tests/tests/objects/display.exp @@ -5,10 +5,10 @@ A: object(0,0) task 1, lines 7-131: //# publish --sender A -events: Event { package_id: Test, transaction_module: Identifier("boars"), sender: A, type_: StructTag { address: iota, module: Identifier("display"), name: Identifier("DisplayCreated"), type_params: [Struct(StructTag { address: Test, module: Identifier("boars"), name: Identifier("Boar"), type_params: [] })] }, contents: [122, 86, 17, 131, 43, 49, 169, 8, 64, 205, 230, 163, 87, 14, 109, 54, 195, 144, 240, 135, 70, 188, 161, 150, 238, 94, 64, 25, 50, 6, 223, 3] } +events: Event { package_id: Test, transaction_module: Identifier("boars"), sender: A, type_: StructTag { address: iota, module: Identifier("display"), name: Identifier("DisplayCreated"), type_params: [Struct(StructTag { address: Test, module: Identifier("boars"), name: Identifier("Boar"), type_params: [] })] }, contents: [155, 85, 136, 164, 81, 63, 109, 148, 75, 198, 60, 36, 25, 208, 95, 122, 157, 232, 18, 97, 53, 211, 101, 208, 13, 29, 31, 165, 226, 122, 237, 179] } created: object(1,0), object(1,1), object(1,2) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 21470000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 21447200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 133: //# create-checkpoint @@ -16,20 +16,20 @@ Checkpoint created: 1 task 3, line 135: //# view-checkpoint -CheckpointSummary { epoch: 0, seq: 1, content_digest: 9sHsTUse41352AgmAzAW55EgrykK45tyEopXsGy5Ghgh, - epoch_rolling_gas_cost_summary: GasCostSummary { computation_cost: 1000000, storage_cost: 21470000, storage_rebate: 0, non_refundable_storage_fee: 0 }} +CheckpointSummary { epoch: 0, seq: 1, content_digest: 4zAfAVwFXhmFipWuRjudEjJYvRVd67NfPr9qBW7F9WfZ, + epoch_rolling_gas_cost_summary: GasCostSummary { computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 21447200, storage_rebate: 0, non_refundable_storage_fee: 0 }} task 4, line 137: //# run Test::boars::create_bear --sender A created: object(4,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3556800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3541600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 139: //# run Test::boars::update_display_faulty --sender A --args object(1,1) -events: Event { package_id: Test, transaction_module: Identifier("boars"), sender: A, type_: StructTag { address: iota, module: Identifier("display"), name: Identifier("VersionUpdated"), type_params: [Struct(StructTag { address: Test, module: Identifier("boars"), name: Identifier("Boar"), type_params: [] })] }, contents: [122, 86, 17, 131, 43, 49, 169, 8, 64, 205, 230, 163, 87, 14, 109, 54, 195, 144, 240, 135, 70, 188, 161, 150, 238, 94, 64, 25, 50, 6, 223, 3, 1, 0, 3, 7, 118, 101, 99, 116, 111, 114, 115, 5, 123, 118, 101, 99, 125, 3, 105, 100, 100, 5, 123, 105, 100, 100, 125, 5, 110, 97, 109, 101, 101, 7, 123, 110, 97, 109, 101, 101, 125] } +events: Event { package_id: Test, transaction_module: Identifier("boars"), sender: A, type_: StructTag { address: iota, module: Identifier("display"), name: Identifier("VersionUpdated"), type_params: [Struct(StructTag { address: Test, module: Identifier("boars"), name: Identifier("Boar"), type_params: [] })] }, contents: [155, 85, 136, 164, 81, 63, 109, 148, 75, 198, 60, 36, 25, 208, 95, 122, 157, 232, 18, 97, 53, 211, 101, 208, 13, 29, 31, 165, 226, 122, 237, 179, 1, 0, 3, 7, 118, 101, 99, 116, 111, 114, 115, 5, 123, 118, 101, 99, 125, 3, 105, 100, 100, 5, 123, 105, 100, 100, 125, 5, 110, 97, 109, 101, 101, 7, 123, 110, 97, 109, 101, 101, 125] } mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 2941200, storage_rebate: 2652400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2926000, storage_rebate: 2637200, non_refundable_storage_fee: 0 task 6, line 141: //# create-checkpoint @@ -37,8 +37,8 @@ Checkpoint created: 2 task 7, line 143: //# view-checkpoint -CheckpointSummary { epoch: 0, seq: 2, content_digest: GponcB27L35TyQpkXgMtUwGQ9Xfqx8utc7DdF2vY5eoj, - epoch_rolling_gas_cost_summary: GasCostSummary { computation_cost: 3000000, storage_cost: 27968000, storage_rebate: 3640400, non_refundable_storage_fee: 0 }} +CheckpointSummary { epoch: 0, seq: 2, content_digest: GbyYdBVTebRQFzWA9B8nox5yAL4quujoQeZphrp9EguP, + epoch_rolling_gas_cost_summary: GasCostSummary { computation_cost: 3000000, computation_cost_burned: 3000000, storage_cost: 27914800, storage_rebate: 3617600, non_refundable_storage_fee: 0 }} task 8, lines 145-158: //# run-graphql @@ -74,9 +74,9 @@ Response: { task 9, line 160: //# run Test::boars::single_add --sender A --args object(1,1) -events: Event { package_id: Test, transaction_module: Identifier("boars"), sender: A, type_: StructTag { address: iota, module: Identifier("display"), name: Identifier("VersionUpdated"), type_params: [Struct(StructTag { address: Test, module: Identifier("boars"), name: Identifier("Boar"), type_params: [] })] }, contents: [122, 86, 17, 131, 43, 49, 169, 8, 64, 205, 230, 163, 87, 14, 109, 54, 195, 144, 240, 135, 70, 188, 161, 150, 238, 94, 64, 25, 50, 6, 223, 3, 2, 0, 4, 7, 118, 101, 99, 116, 111, 114, 115, 5, 123, 118, 101, 99, 125, 3, 105, 100, 100, 5, 123, 105, 100, 100, 125, 5, 110, 97, 109, 101, 101, 7, 123, 110, 97, 109, 101, 101, 125, 4, 110, 117, 109, 115, 6, 123, 110, 117, 109, 115, 125] } +events: Event { package_id: Test, transaction_module: Identifier("boars"), sender: A, type_: StructTag { address: iota, module: Identifier("display"), name: Identifier("VersionUpdated"), type_params: [Struct(StructTag { address: Test, module: Identifier("boars"), name: Identifier("Boar"), type_params: [] })] }, contents: [155, 85, 136, 164, 81, 63, 109, 148, 75, 198, 60, 36, 25, 208, 95, 122, 157, 232, 18, 97, 53, 211, 101, 208, 13, 29, 31, 165, 226, 122, 237, 179, 2, 0, 4, 7, 118, 101, 99, 116, 111, 114, 115, 5, 123, 118, 101, 99, 125, 3, 105, 100, 100, 5, 123, 105, 100, 100, 125, 5, 110, 97, 109, 101, 101, 7, 123, 110, 97, 109, 101, 101, 125, 4, 110, 117, 109, 115, 6, 123, 110, 117, 109, 115, 125] } mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 3032400, storage_rebate: 2941200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3017200, storage_rebate: 2926000, non_refundable_storage_fee: 0 task 10, line 162: //# create-checkpoint @@ -84,8 +84,8 @@ Checkpoint created: 3 task 11, line 164: //# view-checkpoint -CheckpointSummary { epoch: 0, seq: 3, content_digest: 2UgwAMvn8xhzqecYCRbGUuEujQHHrfM5q5QfGy5t8Cc6, - epoch_rolling_gas_cost_summary: GasCostSummary { computation_cost: 4000000, storage_cost: 31000400, storage_rebate: 6581600, non_refundable_storage_fee: 0 }} +CheckpointSummary { epoch: 0, seq: 3, content_digest: 2KBZj5iLNbskohG5KL5VtdGE6onV6YEZQigAzeXZUwUc, + epoch_rolling_gas_cost_summary: GasCostSummary { computation_cost: 4000000, computation_cost_burned: 4000000, storage_cost: 30932000, storage_rebate: 6543600, non_refundable_storage_fee: 0 }} task 12, lines 166-179: //# run-graphql @@ -126,9 +126,9 @@ Response: { task 13, line 181: //# run Test::boars::multi_add --sender A --args object(1,1) -events: Event { package_id: Test, transaction_module: Identifier("boars"), sender: A, type_: StructTag { address: iota, module: Identifier("display"), name: Identifier("VersionUpdated"), type_params: [Struct(StructTag { address: Test, module: Identifier("boars"), name: Identifier("Boar"), type_params: [] })] }, contents: [122, 86, 17, 131, 43, 49, 169, 8, 64, 205, 230, 163, 87, 14, 109, 54, 195, 144, 240, 135, 70, 188, 161, 150, 238, 94, 64, 25, 50, 6, 223, 3, 3, 0, 15, 7, 118, 101, 99, 116, 111, 114, 115, 5, 123, 118, 101, 99, 125, 3, 105, 100, 100, 5, 123, 105, 100, 100, 125, 5, 110, 97, 109, 101, 101, 7, 123, 110, 97, 109, 101, 101, 125, 4, 110, 117, 109, 115, 6, 123, 110, 117, 109, 115, 125, 5, 98, 111, 111, 108, 115, 7, 123, 98, 111, 111, 108, 115, 125, 5, 98, 117, 121, 101, 114, 7, 123, 98, 117, 121, 101, 114, 125, 4, 110, 97, 109, 101, 6, 123, 110, 97, 109, 101, 125, 7, 99, 114, 101, 97, 116, 111, 114, 9, 123, 99, 114, 101, 97, 116, 111, 114, 125, 5, 112, 114, 105, 99, 101, 7, 123, 112, 114, 105, 99, 101, 125, 11, 112, 114, 111, 106, 101, 99, 116, 95, 117, 114, 108, 58, 85, 110, 105, 113, 117, 101, 32, 66, 111, 97, 114, 32, 102, 114, 111, 109, 32, 116, 104, 101, 32, 66, 111, 97, 114, 115, 32, 99, 111, 108, 108, 101, 99, 116, 105, 111, 110, 32, 119, 105, 116, 104, 32, 123, 110, 97, 109, 101, 125, 32, 97, 110, 100, 32, 123, 105, 100, 125, 8, 98, 97, 115, 101, 95, 117, 114, 108, 32, 104, 116, 116, 112, 115, 58, 47, 47, 103, 101, 116, 45, 97, 45, 98, 111, 97, 114, 46, 99, 111, 109, 47, 123, 105, 109, 103, 95, 117, 114, 108, 125, 11, 110, 111, 95, 116, 101, 109, 112, 108, 97, 116, 101, 23, 104, 116, 116, 112, 115, 58, 47, 47, 103, 101, 116, 45, 97, 45, 98, 111, 97, 114, 46, 99, 111, 109, 47, 3, 97, 103, 101, 21, 123, 109, 101, 116, 97, 100, 97, 116, 97, 46, 110, 101, 115, 116, 101, 100, 46, 97, 103, 101, 125, 8, 102, 117, 108, 108, 95, 117, 114, 108, 10, 123, 102, 117, 108, 108, 95, 117, 114, 108, 125, 13, 101, 115, 99, 97, 112, 101, 95, 115, 121, 110, 116, 97, 120, 8, 92, 123, 110, 97, 109, 101, 92, 125] } +events: Event { package_id: Test, transaction_module: Identifier("boars"), sender: A, type_: StructTag { address: iota, module: Identifier("display"), name: Identifier("VersionUpdated"), type_params: [Struct(StructTag { address: Test, module: Identifier("boars"), name: Identifier("Boar"), type_params: [] })] }, contents: [155, 85, 136, 164, 81, 63, 109, 148, 75, 198, 60, 36, 25, 208, 95, 122, 157, 232, 18, 97, 53, 211, 101, 208, 13, 29, 31, 165, 226, 122, 237, 179, 3, 0, 15, 7, 118, 101, 99, 116, 111, 114, 115, 5, 123, 118, 101, 99, 125, 3, 105, 100, 100, 5, 123, 105, 100, 100, 125, 5, 110, 97, 109, 101, 101, 7, 123, 110, 97, 109, 101, 101, 125, 4, 110, 117, 109, 115, 6, 123, 110, 117, 109, 115, 125, 5, 98, 111, 111, 108, 115, 7, 123, 98, 111, 111, 108, 115, 125, 5, 98, 117, 121, 101, 114, 7, 123, 98, 117, 121, 101, 114, 125, 4, 110, 97, 109, 101, 6, 123, 110, 97, 109, 101, 125, 7, 99, 114, 101, 97, 116, 111, 114, 9, 123, 99, 114, 101, 97, 116, 111, 114, 125, 5, 112, 114, 105, 99, 101, 7, 123, 112, 114, 105, 99, 101, 125, 11, 112, 114, 111, 106, 101, 99, 116, 95, 117, 114, 108, 58, 85, 110, 105, 113, 117, 101, 32, 66, 111, 97, 114, 32, 102, 114, 111, 109, 32, 116, 104, 101, 32, 66, 111, 97, 114, 115, 32, 99, 111, 108, 108, 101, 99, 116, 105, 111, 110, 32, 119, 105, 116, 104, 32, 123, 110, 97, 109, 101, 125, 32, 97, 110, 100, 32, 123, 105, 100, 125, 8, 98, 97, 115, 101, 95, 117, 114, 108, 32, 104, 116, 116, 112, 115, 58, 47, 47, 103, 101, 116, 45, 97, 45, 98, 111, 97, 114, 46, 99, 111, 109, 47, 123, 105, 109, 103, 95, 117, 114, 108, 125, 11, 110, 111, 95, 116, 101, 109, 112, 108, 97, 116, 101, 23, 104, 116, 116, 112, 115, 58, 47, 47, 103, 101, 116, 45, 97, 45, 98, 111, 97, 114, 46, 99, 111, 109, 47, 3, 97, 103, 101, 21, 123, 109, 101, 116, 97, 100, 97, 116, 97, 46, 110, 101, 115, 116, 101, 100, 46, 97, 103, 101, 125, 8, 102, 117, 108, 108, 95, 117, 114, 108, 10, 123, 102, 117, 108, 108, 95, 117, 114, 108, 125, 13, 101, 115, 99, 97, 112, 101, 95, 115, 121, 110, 116, 97, 120, 8, 92, 123, 110, 97, 109, 101, 92, 125] } mutated: object(0,0), object(1,1) -gas summary: computation_cost: 1000000, storage_cost: 5236400, storage_rebate: 3032400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5221200, storage_rebate: 3017200, non_refundable_storage_fee: 0 task 14, line 183: //# create-checkpoint @@ -136,8 +136,8 @@ Checkpoint created: 4 task 15, line 185: //# view-checkpoint -CheckpointSummary { epoch: 0, seq: 4, content_digest: 6K7PEwcxCypDpJhMgADzhdJHDxFmxaKqYdDCUrDtGKqw, - epoch_rolling_gas_cost_summary: GasCostSummary { computation_cost: 5000000, storage_cost: 36236800, storage_rebate: 9614000, non_refundable_storage_fee: 0 }} +CheckpointSummary { epoch: 0, seq: 4, content_digest: D6dE1yK8HSeHb7QdiXFjf9qMKPdAYHdNWBMWkb26nbJt, + epoch_rolling_gas_cost_summary: GasCostSummary { computation_cost: 5000000, computation_cost_burned: 5000000, storage_cost: 36153200, storage_rebate: 9560800, non_refundable_storage_fee: 0 }} task 16, lines 187-200: //# run-graphql @@ -195,7 +195,7 @@ Response: { }, { "key": "project_url", - "value": "Unique Boar from the Boars collection with First Boar and 0xc5ba56c701e3a4b4fde2ed3a11147ed6702736122d3e5ba8848517fcc40bb332", + "value": "Unique Boar from the Boars collection with First Boar and 0x889962831d2d9d2273e1890c6592ea21197e4e577259171eed3fe0d49e2906d7", "error": null }, { diff --git a/crates/iota-graphql-e2e-tests/tests/objects/enum_data.exp b/crates/iota-graphql-e2e-tests/tests/objects/enum_data.exp index 14bdd3809a4..cb3b64ecc62 100644 --- a/crates/iota-graphql-e2e-tests/tests/objects/enum_data.exp +++ b/crates/iota-graphql-e2e-tests/tests/objects/enum_data.exp @@ -7,7 +7,7 @@ task 1, lines 7-55: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 10510800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 10495600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 57-59: //# programmable --inputs @A @@ -15,7 +15,7 @@ task 2, lines 57-59: //> TransferObjects([Result(0)], Input(0)) created: object(2,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 3032400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3017200, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 61: //# create-checkpoint @@ -36,80 +36,7 @@ Response: { "asMoveObject": { "contents": { "type": { - "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA>" - }, - "data": { - "Struct": [ - { - "name": "id", - "value": { - "UID": [ - 100, - 18, - 0, - 4, - 156, - 171, - 248, - 243, - 216, - 245, - 164, - 7, - 201, - 255, - 217, - 154, - 191, - 55, - 37, - 174, - 178, - 66, - 35, - 152, - 135, - 214, - 39, - 170, - 118, - 197, - 203, - 231 - ] - } - }, - { - "name": "balance", - "value": { - "Struct": [ - { - "name": "value", - "value": { - "Number": "299999995967600" - } - } - ] - } - } - ] - }, - "json": { - "id": "0x641200049cabf8f3d8f5a407c9ffd99abf3725aeb242239887d627aa76c5cbe7", - "balance": { - "value": "299999995967600" - } - } - } - } - } - }, - { - "outputState": { - "asMoveObject": { - "contents": { - "type": { - "repr": "0x44bc315472dfe257237a726662160c2c7b25467eaf06fa89f85d0038b15e0fde::m::Foo" + "repr": "0x37f6b83e93f5faa2818235a6c07c2559447623e45725f49eaf51d21311961a88::m::Foo" }, "data": { "Struct": [ @@ -117,38 +44,38 @@ Response: { "name": "id", "value": { "UID": [ - 164, - 50, - 225, - 206, - 133, - 84, - 196, + 83, + 9, + 241, + 204, + 212, 6, - 207, - 254, - 192, - 31, - 49, - 43, - 19, - 140, - 205, + 203, 57, - 122, - 163, - 123, - 199, - 43, - 247, - 117, - 88, - 184, - 80, - 69, - 104, - 78, - 223 + 197, + 134, + 234, + 65, + 158, + 61, + 177, + 15, + 53, + 250, + 79, + 130, + 156, + 148, + 26, + 3, + 100, + 56, + 147, + 127, + 45, + 103, + 230, + 95 ] } }, @@ -156,38 +83,38 @@ Response: { "name": "f0", "value": { "ID": [ - 164, - 50, - 225, - 206, - 133, - 84, - 196, + 83, + 9, + 241, + 204, + 212, 6, - 207, - 254, - 192, - 31, - 49, - 43, - 19, - 140, - 205, + 203, 57, - 122, - 163, - 123, - 199, - 43, - 247, - 117, - 88, - 184, - 80, - 69, - 104, - 78, - 223 + 197, + 134, + 234, + 65, + 158, + 61, + 177, + 15, + 53, + 250, + 79, + 130, + 156, + 148, + 26, + 3, + 100, + 56, + 147, + 127, + 45, + 103, + 230, + 95 ] } }, @@ -227,38 +154,38 @@ Response: { "Vector": [ { "Address": [ - 164, - 50, - 225, - 206, - 133, - 84, - 196, + 83, + 9, + 241, + 204, + 212, 6, - 207, - 254, - 192, - 31, - 49, - 43, - 19, - 140, - 205, + 203, 57, - 122, - 163, - 123, - 199, - 43, - 247, - 117, - 88, - 184, - 80, - 69, - 104, - 78, - 223 + 197, + 134, + 234, + 65, + 158, + 61, + 177, + 15, + 53, + 250, + 79, + 130, + 156, + 148, + 26, + 3, + 100, + 56, + 147, + 127, + 45, + 103, + 230, + 95 ] } ] @@ -325,15 +252,15 @@ Response: { ] }, "json": { - "id": "0xa432e1ce8554c406cffec01f312b138ccd397aa37bc72bf77558b85045684edf", - "f0": "0xa432e1ce8554c406cffec01f312b138ccd397aa37bc72bf77558b85045684edf", + "id": "0x5309f1ccd406cb39c586ea419e3db10f35fa4f829c941a036438937f2d67e65f", + "f0": "0x5309f1ccd406cb39c586ea419e3db10f35fa4f829c941a036438937f2d67e65f", "f1": true, "f2": 42, "f3": "43", "f4": "hello", "f5": "world", "f6": [ - "0xa432e1ce8554c406cffec01f312b138ccd397aa37bc72bf77558b85045684edf" + "0x5309f1ccd406cb39c586ea419e3db10f35fa4f829c941a036438937f2d67e65f" ], "f7": 44, "f8": { @@ -356,6 +283,79 @@ Response: { } } } + }, + { + "outputState": { + "asMoveObject": { + "contents": { + "type": { + "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA>" + }, + "data": { + "Struct": [ + { + "name": "id", + "value": { + "UID": [ + 100, + 18, + 0, + 4, + 156, + 171, + 248, + 243, + 216, + 245, + 164, + 7, + 201, + 255, + 217, + 154, + 191, + 55, + 37, + 174, + 178, + 66, + 35, + 152, + 135, + 214, + 39, + 170, + 118, + 197, + 203, + 231 + ] + } + }, + { + "name": "balance", + "value": { + "Struct": [ + { + "name": "value", + "value": { + "Number": "299999995982800" + } + } + ] + } + } + ] + }, + "json": { + "id": "0x641200049cabf8f3d8f5a407c9ffd99abf3725aeb242239887d627aa76c5cbe7", + "balance": { + "value": "299999995982800" + } + } + } + } + } } ] } diff --git a/crates/iota-graphql-e2e-tests/tests/objects/filter_by_type.exp b/crates/iota-graphql-e2e-tests/tests/objects/filter_by_type.exp index da9205052ba..ee3a4125263 100644 --- a/crates/iota-graphql-e2e-tests/tests/objects/filter_by_type.exp +++ b/crates/iota-graphql-e2e-tests/tests/objects/filter_by_type.exp @@ -17,7 +17,7 @@ task 3, lines 12-14: //> TransferObjects([Result(0)], Input(1)) created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 0, non_refundable_storage_fee: 0 task 4, lines 16-18: //# run 0x3::iota_system::request_add_stake --args object(0x5) object(3,0) @validator_0 --sender C @@ -25,7 +25,7 @@ events: Event { package_id: iota_system, transaction_module: Identifier("iota_sy created: object(4,0) mutated: object(_), 0x0000000000000000000000000000000000000000000000000000000000000005, object(0,0) deleted: object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 14531200, storage_rebate: 1976000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 14500800, storage_rebate: 1960800, non_refundable_storage_fee: 0 task 5, line 19: //# create-checkpoint diff --git a/crates/iota-graphql-e2e-tests/tests/objects/pagination.exp b/crates/iota-graphql-e2e-tests/tests/objects/pagination.exp index 1d42499e01b..38db19b6da2 100644 --- a/crates/iota-graphql-e2e-tests/tests/objects/pagination.exp +++ b/crates/iota-graphql-e2e-tests/tests/objects/pagination.exp @@ -4,37 +4,37 @@ task 1, lines 7-20: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5175600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5168000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 22-23: //# run Test::M1::create --args 0 @A created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, lines 25-26: //# run Test::M1::create --args 1 @A created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, lines 28-29: //# run Test::M1::create --args 2 @A created: object(4,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, lines 31-32: //# run Test::M1::create --args 3 @A created: object(5,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, lines 34-35: //# run Test::M1::create --args 4 @A created: object(6,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, line 37: //# create-checkpoint @@ -48,19 +48,19 @@ Response: { "objects": { "edges": [ { - "cursor": "IErD5TMZumIS88CnED3HrKllM6piXQEhdl4nJlm0anf8AQAAAAAAAAA=" + "cursor": "IAXGOxelPyat2ktykI7yExbqPi0zGAJwpEL4QOtk4i5JAQAAAAAAAAA=" }, { - "cursor": "IGbA0SLIovYnBW1JKBpVG43hvll9/RFB3wjKDZV3txcKAQAAAAAAAAA=" + "cursor": "IIhXgyfJmpDjfYgKcvjwnz8XljbqK8kWTshmtGAa1JcrAQAAAAAAAAA=" }, { - "cursor": "II/uS8unt+0PleSTFKesI3Uf2Bo3TsuzhlzOKC83nHsYAQAAAAAAAAA=" + "cursor": "IIuOKDIL3ox4W0vwl9Iys+UJ+hOhYIxg9QXA1kvE02x1AQAAAAAAAAA=" }, { - "cursor": "IKSDqGoLwVUl2Zv0vtjeLzIHLV8s68y4bIjiM11IEfvWAQAAAAAAAAA=" + "cursor": "IKaEPeEks1/XBPKzfdNHH89Pmqm8lXcmxDqL2W0EAEsyAQAAAAAAAAA=" }, { - "cursor": "ILL9JWMRyHgUdqBBL66dYJjzsfWRDxCFDtmpQ4PXek9dAQAAAAAAAAA=" + "cursor": "ILL8PT6CGnkMV6rhl3RwEvqsdGHGUNh5XsuxI1STMnrZAQAAAAAAAAA=" } ] } @@ -76,10 +76,10 @@ Response: { "objects": { "edges": [ { - "cursor": "IErD5TMZumIS88CnED3HrKllM6piXQEhdl4nJlm0anf8AQAAAAAAAAA=" + "cursor": "IAXGOxelPyat2ktykI7yExbqPi0zGAJwpEL4QOtk4i5JAQAAAAAAAAA=" }, { - "cursor": "IGbA0SLIovYnBW1JKBpVG43hvll9/RFB3wjKDZV3txcKAQAAAAAAAAA=" + "cursor": "IIhXgyfJmpDjfYgKcvjwnz8XljbqK8kWTshmtGAa1JcrAQAAAAAAAAA=" } ] } @@ -95,52 +95,52 @@ Response: { "objects": { "edges": [ { - "cursor": "IErD5TMZumIS88CnED3HrKllM6piXQEhdl4nJlm0anf8AQAAAAAAAAA=", + "cursor": "IAXGOxelPyat2ktykI7yExbqPi0zGAJwpEL4QOtk4i5JAQAAAAAAAAA=", "node": { - "address": "0x4ac3e53319ba6212f3c0a7103dc7aca96533aa625d0121765e272659b46a77fc" + "address": "0x05c63b17a53f26adda4b72908ef21316ea3e2d33180270a442f840eb64e22e49" } }, { - "cursor": "IGbA0SLIovYnBW1JKBpVG43hvll9/RFB3wjKDZV3txcKAQAAAAAAAAA=", + "cursor": "IIhXgyfJmpDjfYgKcvjwnz8XljbqK8kWTshmtGAa1JcrAQAAAAAAAAA=", "node": { - "address": "0x66c0d122c8a2f627056d49281a551b8de1be597dfd1141df08ca0d9577b7170a" + "address": "0x88578327c99a90e37d880a72f8f09f3f179636ea2bc9164ec866b4601ad4972b" } }, { - "cursor": "II/uS8unt+0PleSTFKesI3Uf2Bo3TsuzhlzOKC83nHsYAQAAAAAAAAA=", + "cursor": "IIuOKDIL3ox4W0vwl9Iys+UJ+hOhYIxg9QXA1kvE02x1AQAAAAAAAAA=", "node": { - "address": "0x8fee4bcba7b7ed0f95e49314a7ac23751fd81a374ecbb3865cce282f379c7b18" + "address": "0x8b8e28320bde8c785b4bf097d232b3e509fa13a1608c60f505c0d64bc4d36c75" } }, { - "cursor": "IKSDqGoLwVUl2Zv0vtjeLzIHLV8s68y4bIjiM11IEfvWAQAAAAAAAAA=", + "cursor": "IKaEPeEks1/XBPKzfdNHH89Pmqm8lXcmxDqL2W0EAEsyAQAAAAAAAAA=", "node": { - "address": "0xa483a86a0bc15525d99bf4bed8de2f32072d5f2cebccb86c88e2335d4811fbd6" + "address": "0xa6843de124b35fd704f2b37dd3471fcf4f9aa9bc957726c43a8bd96d04004b32" } }, { - "cursor": "ILL9JWMRyHgUdqBBL66dYJjzsfWRDxCFDtmpQ4PXek9dAQAAAAAAAAA=", + "cursor": "ILL8PT6CGnkMV6rhl3RwEvqsdGHGUNh5XsuxI1STMnrZAQAAAAAAAAA=", "node": { - "address": "0xb2fd256311c8781476a0412fae9d6098f3b1f5910f10850ed9a94383d77a4f5d" + "address": "0xb2fc3d3e821a790c57aae197747012faac7461c650d8795ecbb1235493327ad9" } } ] } }, "obj_3_0": { - "address": "0x4ac3e53319ba6212f3c0a7103dc7aca96533aa625d0121765e272659b46a77fc" + "address": "0x88578327c99a90e37d880a72f8f09f3f179636ea2bc9164ec866b4601ad4972b" }, "obj_5_0": { - "address": "0x66c0d122c8a2f627056d49281a551b8de1be597dfd1141df08ca0d9577b7170a" + "address": "0xa6843de124b35fd704f2b37dd3471fcf4f9aa9bc957726c43a8bd96d04004b32" }, "obj_6_0": { - "address": "0xa483a86a0bc15525d99bf4bed8de2f32072d5f2cebccb86c88e2335d4811fbd6" + "address": "0xb2fc3d3e821a790c57aae197747012faac7461c650d8795ecbb1235493327ad9" }, "obj_4_0": { - "address": "0xb2fd256311c8781476a0412fae9d6098f3b1f5910f10850ed9a94383d77a4f5d" + "address": "0x8b8e28320bde8c785b4bf097d232b3e509fa13a1608c60f505c0d64bc4d36c75" }, "obj_2_0": { - "address": "0x8fee4bcba7b7ed0f95e49314a7ac23751fd81a374ecbb3865cce282f379c7b18" + "address": "0x05c63b17a53f26adda4b72908ef21316ea3e2d33180270a442f840eb64e22e49" } } } @@ -153,10 +153,7 @@ Response: { "objects": { "edges": [ { - "cursor": "II/uS8unt+0PleSTFKesI3Uf2Bo3TsuzhlzOKC83nHsYAQAAAAAAAAA=" - }, - { - "cursor": "IKSDqGoLwVUl2Zv0vtjeLzIHLV8s68y4bIjiM11IEfvWAQAAAAAAAAA=" + "cursor": "ILL8PT6CGnkMV6rhl3RwEvqsdGHGUNh5XsuxI1STMnrZAQAAAAAAAAA=" } ] } @@ -170,7 +167,11 @@ Response: { "data": { "address": { "objects": { - "edges": [] + "edges": [ + { + "cursor": "IKaEPeEks1/XBPKzfdNHH89Pmqm8lXcmxDqL2W0EAEsyAQAAAAAAAAA=" + } + ] } } } @@ -182,7 +183,11 @@ Response: { "data": { "address": { "objects": { - "edges": [] + "edges": [ + { + "cursor": "IAXGOxelPyat2ktykI7yExbqPi0zGAJwpEL4QOtk4i5JAQAAAAAAAAA=" + } + ] } } } @@ -196,15 +201,15 @@ Response: { "objects": { "edges": [ { - "cursor": "IKSDqGoLwVUl2Zv0vtjeLzIHLV8s68y4bIjiM11IEfvWAQAAAAAAAAA=", + "cursor": "IKaEPeEks1/XBPKzfdNHH89Pmqm8lXcmxDqL2W0EAEsyAQAAAAAAAAA=", "node": { - "address": "0xa483a86a0bc15525d99bf4bed8de2f32072d5f2cebccb86c88e2335d4811fbd6" + "address": "0xa6843de124b35fd704f2b37dd3471fcf4f9aa9bc957726c43a8bd96d04004b32" } }, { - "cursor": "ILL9JWMRyHgUdqBBL66dYJjzsfWRDxCFDtmpQ4PXek9dAQAAAAAAAAA=", + "cursor": "ILL8PT6CGnkMV6rhl3RwEvqsdGHGUNh5XsuxI1STMnrZAQAAAAAAAAA=", "node": { - "address": "0xb2fd256311c8781476a0412fae9d6098f3b1f5910f10850ed9a94383d77a4f5d" + "address": "0xb2fc3d3e821a790c57aae197747012faac7461c650d8795ecbb1235493327ad9" } } ] diff --git a/crates/iota-graphql-e2e-tests/tests/objects/public_transfer.exp b/crates/iota-graphql-e2e-tests/tests/objects/public_transfer.exp index 6804cb24b4e..5c4f5326f97 100644 --- a/crates/iota-graphql-e2e-tests/tests/objects/public_transfer.exp +++ b/crates/iota-graphql-e2e-tests/tests/objects/public_transfer.exp @@ -7,7 +7,7 @@ task 1, lines 7-27: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 5570800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5563200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 29-32: //# programmable --inputs @A @@ -16,13 +16,13 @@ task 2, lines 29-32: //> TransferObjects([Result(0)], Input(0)) created: object(2,0), object(2,1) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 3435200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3412400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 34: //# create-checkpoint Checkpoint created: 1 -task 4, lines 36-54: +task 4, lines 36-53: //# run-graphql Response: { "data": { @@ -37,10 +37,9 @@ Response: { "asMoveObject": { "contents": { "type": { - "repr": "0x40c4a165cdc6b25f0f9764ac15ced5fb7c86130d7751083490fa5c5ced8dc9c5::m::Bar" + "repr": "0xd01ba1620a63906586ce0abe061e1f132f9581e42c616660afa3119a028c48a5::m::Bar" } - }, - "hasPublicTransfer": false + } } } }, @@ -51,8 +50,7 @@ Response: { "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA>" } - }, - "hasPublicTransfer": true + } } } }, @@ -61,10 +59,9 @@ Response: { "asMoveObject": { "contents": { "type": { - "repr": "0x40c4a165cdc6b25f0f9764ac15ced5fb7c86130d7751083490fa5c5ced8dc9c5::m::Foo" + "repr": "0xd01ba1620a63906586ce0abe061e1f132f9581e42c616660afa3119a028c48a5::m::Foo" } - }, - "hasPublicTransfer": true + } } } } diff --git a/crates/iota-graphql-e2e-tests/tests/objects/public_transfer.move b/crates/iota-graphql-e2e-tests/tests/objects/public_transfer.move index 4bba891560a..4859be85c7a 100644 --- a/crates/iota-graphql-e2e-tests/tests/objects/public_transfer.move +++ b/crates/iota-graphql-e2e-tests/tests/objects/public_transfer.move @@ -43,7 +43,6 @@ module P0::m { outputState { asMoveObject { contents { type { repr } } - hasPublicTransfer } } } diff --git a/crates/iota-graphql-e2e-tests/tests/objects/received.exp b/crates/iota-graphql-e2e-tests/tests/objects/received.exp index 3258ee0f3b2..2132f4d9a92 100644 --- a/crates/iota-graphql-e2e-tests/tests/objects/received.exp +++ b/crates/iota-graphql-e2e-tests/tests/objects/received.exp @@ -16,7 +16,7 @@ task 2, lines 18-28: //# publish created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6353600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6338400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 30: //# create-checkpoint @@ -30,7 +30,7 @@ Response: { "receivedTransactionBlocks": { "nodes": [ { - "digest": "Eu9fsGKPDzXeSNG4wEZufMBaBjnoEUAp1paXMXSUaVFB" + "digest": "87R2Us8BZN1RJYEvfdLp3LrxiiVWuwJA5UeMoCeYdJ4b" } ] } diff --git a/crates/iota-graphql-e2e-tests/tests/objects/staked_iota.exp b/crates/iota-graphql-e2e-tests/tests/objects/staked_iota.exp index 8c134761d0e..af253fa6124 100644 --- a/crates/iota-graphql-e2e-tests/tests/objects/staked_iota.exp +++ b/crates/iota-graphql-e2e-tests/tests/objects/staked_iota.exp @@ -35,7 +35,7 @@ task 2, lines 34-36: //> TransferObjects([Result(0)], Input(1)) created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 38: //# run 0x3::iota_system::request_add_stake --args object(0x5) object(2,0) @validator_0 --sender C @@ -43,7 +43,7 @@ events: Event { package_id: iota_system, transaction_module: Identifier("iota_sy created: object(3,0) mutated: object(_), 0x0000000000000000000000000000000000000000000000000000000000000005, object(0,0) deleted: object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 14531200, storage_rebate: 1976000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 14500800, storage_rebate: 1960800, non_refundable_storage_fee: 0 task 4, line 40: //# create-checkpoint @@ -71,22 +71,22 @@ Response: { } }, { - "cursor": "IFWL5fMBAvjGqySaASRTzX8LCOJmSehFXfVOmHh0TLNgAgAAAAAAAAA=", + "cursor": "IA+owYRIwFujnaEiElWV25tmsgRd3aiT7h9//oDyhQb2AgAAAAAAAAA=", "node": { "asMoveObject": { "asStakedIota": { - "principal": "10000000000", + "principal": "15340000000000", "poolId": "0x91c949208717792507652867d8639b33766f73dc2cfd908f506785f03aeb89ca" } } } }, { - "cursor": "IJBwUWU37b5wcCks4sYH9yj0in1fYITknJlXyi0qxJ9iAgAAAAAAAAA=", + "cursor": "IPEp6dbnEicrkwynNujLy5/Voas64Cc5Ta7ruT5oQNbTAgAAAAAAAAA=", "node": { "asMoveObject": { "asStakedIota": { - "principal": "15340000000000", + "principal": "10000000000", "poolId": "0x91c949208717792507652867d8639b33766f73dc2cfd908f506785f03aeb89ca" } } @@ -98,7 +98,7 @@ Response: { "stakedIotas": { "edges": [ { - "cursor": "IFWL5fMBAvjGqySaASRTzX8LCOJmSehFXfVOmHh0TLNgAgAAAAAAAAA=", + "cursor": "IPEp6dbnEicrkwynNujLy5/Voas64Cc5Ta7ruT5oQNbTAgAAAAAAAAA=", "node": { "principal": "10000000000" } diff --git a/crates/iota-graphql-e2e-tests/tests/owner/downcasts.exp b/crates/iota-graphql-e2e-tests/tests/owner/downcasts.exp index 9d989ea3aae..4c0135a646e 100644 --- a/crates/iota-graphql-e2e-tests/tests/owner/downcasts.exp +++ b/crates/iota-graphql-e2e-tests/tests/owner/downcasts.exp @@ -9,7 +9,7 @@ task 1, lines 8-10: //> TransferObjects([Result(0)], Input(1)) created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 12: //# create-checkpoint @@ -24,7 +24,7 @@ Response: { }, "coin": { "asObject": { - "digest": "EwMSkMpzBwgETBvVrrRZj3ZhLcvQ8reFL4SWvRtsgbBy" + "digest": "MCn6VCYaKu81nt3Azx9A31GtLmmmtfzuWnShjGXxBPC" } } } diff --git a/crates/iota-graphql-e2e-tests/tests/owner/root_version.exp b/crates/iota-graphql-e2e-tests/tests/owner/root_version.exp index 7fd0254ba27..32e752065fb 100644 --- a/crates/iota-graphql-e2e-tests/tests/owner/root_version.exp +++ b/crates/iota-graphql-e2e-tests/tests/owner/root_version.exp @@ -7,38 +7,38 @@ task 1, lines 7-87: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 10586800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 10579200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 89-90: //# run P0::M::new_o created: object(2,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2264800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2249600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, lines 92-93: //# run P0::M::new_w created: object(3,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2257200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2242000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, lines 95-96: //# run P0::M::new_dof created: object(4,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2272400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2257200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, lines 98-99: //# run P0::M::new_dof created: object(5,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2272400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2257200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, lines 102-105: //# run P0::M::connect --args object(2,0) object(3,0) object(4,0) object(5,0) created: object(6,0), object(6,1) mutated: object(0,1), object(2,0), object(4,0), object(5,0) wrapped: object(3,0) -gas summary: computation_cost: 1000000, storage_cost: 9940800, storage_rebate: 6102800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9895200, storage_rebate: 6064800, non_refundable_storage_fee: 0 task 7, lines 107-109: //# view-object 2,0 @@ -68,22 +68,22 @@ Contents: P0::M::O { task 8, lines 111-112: //# run P0::M::touch_root --args object(2,0) mutated: object(0,1), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2568800, storage_rebate: 2568800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2553600, storage_rebate: 2553600, non_refundable_storage_fee: 0 task 9, lines 114-115: //# run P0::M::touch_wrapped --args object(2,0) mutated: object(0,1), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 2568800, storage_rebate: 2568800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2553600, storage_rebate: 2553600, non_refundable_storage_fee: 0 task 10, lines 117-118: //# run P0::M::touch_inner --args object(2,0) mutated: object(0,1), object(2,0), object(4,0) -gas summary: computation_cost: 1000000, storage_cost: 3853200, storage_rebate: 3853200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3830400, storage_rebate: 3830400, non_refundable_storage_fee: 0 task 11, lines 120-121: //# run P0::M::touch_outer --args object(2,0) mutated: object(0,1), object(2,0), object(5,0) -gas summary: computation_cost: 1000000, storage_cost: 3853200, storage_rebate: 3853200, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3830400, storage_rebate: 3830400, non_refundable_storage_fee: 0 task 12, line 123: //# view-object 2,0 @@ -124,10 +124,10 @@ Response: { "version": 11, "contents": { "json": { - "id": "0xf1c4e02820ed98fcb155aeec20aaa714b26e619844b5c496ff365e83f5a02498", + "id": "0x92649202a7ed897a62d638e17c21515c6a948ac7be20cc41060455601883cd00", "count": "1", "wrapped": { - "id": "0x615ab07d9f060df3659832160b8f811eddb2fc4c2f38ea2482140f239c49eda9", + "id": "0xe49f0faf71c339f2bbcf1348bdc3b8ba4ece961691aed1a8d9309d400ef140e5", "count": "1" } } @@ -141,10 +141,10 @@ Response: { "version": 10, "contents": { "json": { - "id": "0xf1c4e02820ed98fcb155aeec20aaa714b26e619844b5c496ff365e83f5a02498", + "id": "0x92649202a7ed897a62d638e17c21515c6a948ac7be20cc41060455601883cd00", "count": "1", "wrapped": { - "id": "0x615ab07d9f060df3659832160b8f811eddb2fc4c2f38ea2482140f239c49eda9", + "id": "0xe49f0faf71c339f2bbcf1348bdc3b8ba4ece961691aed1a8d9309d400ef140e5", "count": "1" } } @@ -158,10 +158,10 @@ Response: { "version": 8, "contents": { "json": { - "id": "0xf1c4e02820ed98fcb155aeec20aaa714b26e619844b5c496ff365e83f5a02498", + "id": "0x92649202a7ed897a62d638e17c21515c6a948ac7be20cc41060455601883cd00", "count": "1", "wrapped": { - "id": "0x615ab07d9f060df3659832160b8f811eddb2fc4c2f38ea2482140f239c49eda9", + "id": "0xe49f0faf71c339f2bbcf1348bdc3b8ba4ece961691aed1a8d9309d400ef140e5", "count": "0" } } @@ -175,10 +175,10 @@ Response: { "version": 7, "contents": { "json": { - "id": "0xf1c4e02820ed98fcb155aeec20aaa714b26e619844b5c496ff365e83f5a02498", + "id": "0x92649202a7ed897a62d638e17c21515c6a948ac7be20cc41060455601883cd00", "count": "0", "wrapped": { - "id": "0x615ab07d9f060df3659832160b8f811eddb2fc4c2f38ea2482140f239c49eda9", + "id": "0xe49f0faf71c339f2bbcf1348bdc3b8ba4ece961691aed1a8d9309d400ef140e5", "count": "0" } } @@ -199,7 +199,7 @@ Response: { "version": 7, "contents": { "json": { - "id": "0x8a7e59b13b638038a86a520fd579142654c543af8076823edc535aef71b52bb3", + "id": "0x12b9cd665e2fba6d9cda7d1b651188c07f355ebb6258fab2fb07161606b4ab2a", "count": "0" } } @@ -212,7 +212,7 @@ Response: { "version": 10, "contents": { "json": { - "id": "0x8a7e59b13b638038a86a520fd579142654c543af8076823edc535aef71b52bb3", + "id": "0x12b9cd665e2fba6d9cda7d1b651188c07f355ebb6258fab2fb07161606b4ab2a", "count": "1" } } @@ -225,7 +225,7 @@ Response: { "version": 10, "contents": { "json": { - "id": "0x8a7e59b13b638038a86a520fd579142654c543af8076823edc535aef71b52bb3", + "id": "0x12b9cd665e2fba6d9cda7d1b651188c07f355ebb6258fab2fb07161606b4ab2a", "count": "1" } } @@ -238,7 +238,7 @@ Response: { "version": 7, "contents": { "json": { - "id": "0x8a7e59b13b638038a86a520fd579142654c543af8076823edc535aef71b52bb3", + "id": "0x12b9cd665e2fba6d9cda7d1b651188c07f355ebb6258fab2fb07161606b4ab2a", "count": "0" } } @@ -251,7 +251,7 @@ Response: { "version": 7, "contents": { "json": { - "id": "0x8a7e59b13b638038a86a520fd579142654c543af8076823edc535aef71b52bb3", + "id": "0x12b9cd665e2fba6d9cda7d1b651188c07f355ebb6258fab2fb07161606b4ab2a", "count": "0" } } @@ -271,7 +271,7 @@ Response: { "version": 7, "contents": { "json": { - "id": "0x6d8366c90356f72c43c0b197a0085659ed76cdaeb2cbae3d95bc0b33ede7f8de", + "id": "0xd466bb5f3baf46598ec3550987b3993d522e10758441b170fd2a4eab5f618320", "count": "0" } } @@ -284,7 +284,7 @@ Response: { "version": 11, "contents": { "json": { - "id": "0x6d8366c90356f72c43c0b197a0085659ed76cdaeb2cbae3d95bc0b33ede7f8de", + "id": "0xd466bb5f3baf46598ec3550987b3993d522e10758441b170fd2a4eab5f618320", "count": "1" } } @@ -297,7 +297,7 @@ Response: { "version": 7, "contents": { "json": { - "id": "0x6d8366c90356f72c43c0b197a0085659ed76cdaeb2cbae3d95bc0b33ede7f8de", + "id": "0xd466bb5f3baf46598ec3550987b3993d522e10758441b170fd2a4eab5f618320", "count": "0" } } diff --git a/crates/iota-graphql-e2e-tests/tests/packages/datatypes.exp b/crates/iota-graphql-e2e-tests/tests/packages/datatypes.exp index 30b0d848522..0b4e2611e4b 100644 --- a/crates/iota-graphql-e2e-tests/tests/packages/datatypes.exp +++ b/crates/iota-graphql-e2e-tests/tests/packages/datatypes.exp @@ -140,7 +140,7 @@ task 2, lines 57-67: //# publish --upgradeable --sender A created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5981200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5966000, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 69: //# create-checkpoint @@ -155,7 +155,7 @@ task 5, lines 73-97: Response: { "data": { "object": { - "address": "0x6fb64d985225b4ac8b1ee9c17cad1327db14cf5adfba72714bfa6d847f45f996", + "address": "0x416f86a3ae5c3eae593a2f345346265988d2d4a5a981c9635e506ccdb5417d5b", "asMovePackage": { "module": { "datatypes": { @@ -190,7 +190,7 @@ task 6, lines 99-144: Response: { "data": { "object": { - "address": "0x6fb64d985225b4ac8b1ee9c17cad1327db14cf5adfba72714bfa6d847f45f996", + "address": "0x416f86a3ae5c3eae593a2f345346265988d2d4a5a981c9635e506ccdb5417d5b", "asMovePackage": { "module": { "datatypes": { diff --git a/crates/iota-graphql-e2e-tests/tests/packages/enums.exp b/crates/iota-graphql-e2e-tests/tests/packages/enums.exp index f7938394d1d..49ab62fee88 100644 --- a/crates/iota-graphql-e2e-tests/tests/packages/enums.exp +++ b/crates/iota-graphql-e2e-tests/tests/packages/enums.exp @@ -7,7 +7,7 @@ task 1, lines 7-18: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5783600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5768400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 20: //# create-checkpoint @@ -25,13 +25,13 @@ Response: { "nodes": [ { "outputState": { - "address": "0x50a7d243b8ba613f2f99945f8c4dde635aa0fae9235cb5b64d5b9eb6817319d6", + "address": "0x70d8121ec58cb9e0c1e7af1e2d2b255737dc0b9a63e845d1357d78d371f3b858", "asMovePackage": null } }, { "outputState": { - "address": "0x888a64ae050f1a10028960f8db5127e74f73c1d30fd3fefb7d8a41d424eeb8ee", + "address": "0xbf719126a219999498cda62d638ec3e5bafded8aeff2183e30876ba3f4b88870", "asMovePackage": { "module": { "enum": { @@ -107,7 +107,7 @@ task 4, lines 69-82: //# upgrade --package P0 --upgrade-capability 1,0 --sender A created: object(4,0) mutated: object(0,0), object(1,0) -gas summary: computation_cost: 1000000, storage_cost: 6657600, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6642400, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 5, line 84: //# create-checkpoint @@ -125,19 +125,13 @@ Response: { "nodes": [ { "outputState": { - "address": "0x50a7d243b8ba613f2f99945f8c4dde635aa0fae9235cb5b64d5b9eb6817319d6", - "asMovePackage": null - } - }, - { - "outputState": { - "address": "0x592a42acb1ea711144cca47f5aedbbf6267e2d2fd25c4c5d5bb576fd42d03708", + "address": "0x5f826526feff5ea347f55fc824285e273961ae527be45af5b4267fade97c6fa8", "asMovePackage": { "module": { "s": { "module": { "package": { - "address": "0x888a64ae050f1a10028960f8db5127e74f73c1d30fd3fefb7d8a41d424eeb8ee" + "address": "0xbf719126a219999498cda62d638ec3e5bafded8aeff2183e30876ba3f4b88870" } }, "name": "S", @@ -192,7 +186,7 @@ Response: { "t": { "module": { "package": { - "address": "0x592a42acb1ea711144cca47f5aedbbf6267e2d2fd25c4c5d5bb576fd42d03708" + "address": "0x5f826526feff5ea347f55fc824285e273961ae527be45af5b4267fade97c6fa8" } }, "name": "T", @@ -222,12 +216,12 @@ Response: { { "name": "s", "type": { - "repr": "0x888a64ae050f1a10028960f8db5127e74f73c1d30fd3fefb7d8a41d424eeb8ee::m::S", + "repr": "0xbf719126a219999498cda62d638ec3e5bafded8aeff2183e30876ba3f4b88870::m::S", "signature": { "ref": null, "body": { "datatype": { - "package": "0x888a64ae050f1a10028960f8db5127e74f73c1d30fd3fefb7d8a41d424eeb8ee", + "package": "0xbf719126a219999498cda62d638ec3e5bafded8aeff2183e30876ba3f4b88870", "module": "m", "type": "S", "typeParameters": [] @@ -261,7 +255,7 @@ Response: { { "name": "t", "type": { - "repr": "0x888a64ae050f1a10028960f8db5127e74f73c1d30fd3fefb7d8a41d424eeb8ee::m::T<0x888a64ae050f1a10028960f8db5127e74f73c1d30fd3fefb7d8a41d424eeb8ee::m::S>" + "repr": "0xbf719126a219999498cda62d638ec3e5bafded8aeff2183e30876ba3f4b88870::m::T<0xbf719126a219999498cda62d638ec3e5bafded8aeff2183e30876ba3f4b88870::m::S>" } } ] @@ -272,6 +266,12 @@ Response: { } } }, + { + "outputState": { + "address": "0x70d8121ec58cb9e0c1e7af1e2d2b255737dc0b9a63e845d1357d78d371f3b858", + "asMovePackage": null + } + }, { "outputState": { "address": "0xc69f1954c6d13e3630075f462966e06d9f05fec29846d3d781026187e5411431", @@ -297,11 +297,6 @@ Response: { "effects": { "objectChanges": { "nodes": [ - { - "outputState": { - "asMovePackage": null - } - }, { "outputState": { "asMovePackage": { @@ -322,6 +317,11 @@ Response: { } } }, + { + "outputState": { + "asMovePackage": null + } + }, { "outputState": { "asMovePackage": null diff --git a/crates/iota-graphql-e2e-tests/tests/packages/friends.exp b/crates/iota-graphql-e2e-tests/tests/packages/friends.exp index b004b4bc7ad..ad3f49f048c 100644 --- a/crates/iota-graphql-e2e-tests/tests/packages/friends.exp +++ b/crates/iota-graphql-e2e-tests/tests/packages/friends.exp @@ -7,7 +7,7 @@ task 1, lines 7-15: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 7379600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 7364400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 17: //# create-checkpoint @@ -288,7 +288,7 @@ task 6, lines 175-184: //# upgrade --package P0 --upgrade-capability 1,0 --sender A created: object(6,0) mutated: object(0,0), object(1,0) -gas summary: computation_cost: 1000000, storage_cost: 8139600, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8124400, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 7, line 186: //# create-checkpoint diff --git a/crates/iota-graphql-e2e-tests/tests/packages/functions.exp b/crates/iota-graphql-e2e-tests/tests/packages/functions.exp index 953af68f99b..bb7442d617f 100644 --- a/crates/iota-graphql-e2e-tests/tests/packages/functions.exp +++ b/crates/iota-graphql-e2e-tests/tests/packages/functions.exp @@ -77,7 +77,7 @@ task 2, lines 41-45: //# publish --upgradeable --sender A created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5183200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5168000, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 47: //# create-checkpoint @@ -95,19 +95,19 @@ Response: { "nodes": [ { "outputState": { - "address": "0x10644229987ef68773ba80dea2977b6fb68cc7f6337be18dffd6da717cf45a3f", + "address": "0x0d5aebe6f12ff71a237457c35211f4c584b2223a4f2702affa8d58975bc149c9", "asMovePackage": null } }, { "outputState": { - "address": "0x23243e483446c7a4bc37b4261206cdbc67457ae1650459c85c1fd04e5cf3518b", + "address": "0x807e4a90bae0ebd4b5726bf685fedcd12877ab1a0feb7b67ecdc648e270356d4", "asMovePackage": { "module": { "function": { "module": { "package": { - "address": "0x23243e483446c7a4bc37b4261206cdbc67457ae1650459c85c1fd04e5cf3518b" + "address": "0x807e4a90bae0ebd4b5726bf685fedcd12877ab1a0feb7b67ecdc648e270356d4" } }, "name": "f", @@ -157,7 +157,7 @@ task 5, lines 89-94: //# upgrade --package P0 --upgrade-capability 2,0 --sender A created: object(5,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 5418800, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5403600, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 6, line 96: //# create-checkpoint @@ -175,13 +175,25 @@ Response: { "nodes": [ { "outputState": { - "address": "0x0793d651e819cfa1447acfaf1d5d4e58bbeaea1a66bcabd2ef6c788ace0b86e0", + "address": "0x0d5aebe6f12ff71a237457c35211f4c584b2223a4f2702affa8d58975bc149c9", + "asMovePackage": null + } + }, + { + "outputState": { + "address": "0xc69f1954c6d13e3630075f462966e06d9f05fec29846d3d781026187e5411431", + "asMovePackage": null + } + }, + { + "outputState": { + "address": "0xe57e6628d5170a1fc4209c1f4cf1cfb8bcf42f6874ab8f90fda217600741f46a", "asMovePackage": { "module": { "f": { "module": { "package": { - "address": "0x0793d651e819cfa1447acfaf1d5d4e58bbeaea1a66bcabd2ef6c788ace0b86e0" + "address": "0xe57e6628d5170a1fc4209c1f4cf1cfb8bcf42f6874ab8f90fda217600741f46a" } }, "name": "f", @@ -211,7 +223,7 @@ Response: { "g": { "module": { "package": { - "address": "0x0793d651e819cfa1447acfaf1d5d4e58bbeaea1a66bcabd2ef6c788ace0b86e0" + "address": "0xe57e6628d5170a1fc4209c1f4cf1cfb8bcf42f6874ab8f90fda217600741f46a" } }, "name": "g", @@ -228,18 +240,6 @@ Response: { } } } - }, - { - "outputState": { - "address": "0x10644229987ef68773ba80dea2977b6fb68cc7f6337be18dffd6da717cf45a3f", - "asMovePackage": null - } - }, - { - "outputState": { - "address": "0xc69f1954c6d13e3630075f462966e06d9f05fec29846d3d781026187e5411431", - "asMovePackage": null - } } ] } diff --git a/crates/iota-graphql-e2e-tests/tests/packages/modules.exp b/crates/iota-graphql-e2e-tests/tests/packages/modules.exp index a2b672b74ca..9351971dcea 100644 --- a/crates/iota-graphql-e2e-tests/tests/packages/modules.exp +++ b/crates/iota-graphql-e2e-tests/tests/packages/modules.exp @@ -4,7 +4,7 @@ task 1, lines 7-32: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6019200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6011600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 34: //# create-checkpoint @@ -22,16 +22,16 @@ Response: { "nodes": [ { "outputState": { - "address": "0x5f6c07d6c4e3053699e4ced9afd2ec8b1a2c6d774707087d2b587e9bb2fe31f1", + "address": "0x3a391c29453c2e07af1eb0befd50b903f0cc1609df8826e1a79d3e1eceab6481", "asMovePackage": { "module": { "name": "m", "package": { - "address": "0x5f6c07d6c4e3053699e4ced9afd2ec8b1a2c6d774707087d2b587e9bb2fe31f1" + "address": "0x3a391c29453c2e07af1eb0befd50b903f0cc1609df8826e1a79d3e1eceab6481" }, "fileFormatVersion": 6, - "bytes": "oRzrCwYAAAAIAQAGAgYKAxARBCEEBSUfB0QkCGhADKgBMAAGAQMBBQEADAEAAQIBAgAABAABAQIAAgIBAAEHBQEBAAIEAAYCAwYLAAEJAAEDAQYLAAEIAQABCQABBgsAAQkAAQgBBENvaW4ESU9UQQNiYXIEY29pbgNmb28EaW90YQFtBXZhbHVlX2wH1sTjBTaZ5M7Zr9LsixosbXdHBwh9K1h+m7L+MfEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgABAAADBQsBOAALABYCAQEAAAMIBioAAAAAAAAACgA4AQYrAAAAAAAAAAsAOAEYAgA=", - "disassembly": "// Move bytecode v6\nmodule 5f6c07d6c4e3053699e4ced9afd2ec8b1a2c6d774707087d2b587e9bb2fe31f1.m {\nuse 0000000000000000000000000000000000000000000000000000000000000002::coin;\nuse 0000000000000000000000000000000000000000000000000000000000000002::iota;\n\n\n\n\n\n\npublic foo(Arg0: u64, Arg1: &Coin): u64 {\nB0:\n\t0: MoveLoc[1](Arg1: &Coin)\n\t1: Call coin::value(&Coin): u64\n\t2: MoveLoc[0](Arg0: u64)\n\t3: Add\n\t4: Ret\n\n}\npublic bar(Arg0: &Coin): u64 {\nB0:\n\t0: LdU64(42)\n\t1: CopyLoc[0](Arg0: &Coin)\n\t2: Call foo(u64, &Coin): u64\n\t3: LdU64(43)\n\t4: MoveLoc[0](Arg0: &Coin)\n\t5: Call foo(u64, &Coin): u64\n\t6: Mul\n\t7: Ret\n\n}\n}" + "bytes": "oRzrCwYAAAAIAQAGAgYKAxARBCEEBSUfB0QkCGhADKgBMAAGAQMBBQEADAEAAQIBAgAABAABAQIAAgIBAAEHBQEBAAIEAAYCAwYLAAEJAAEDAQYLAAEIAQABCQABBgsAAQkAAQgBBENvaW4ESU9UQQNiYXIEY29pbgNmb28EaW90YQFtBXZhbHVlOjkcKUU8LgevHrC+/VC5A/DMFgnfiCbhp50+Hs6rZIEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgABAAADBQsBOAALABYCAQEAAAMIBioAAAAAAAAACgA4AQYrAAAAAAAAAAsAOAEYAgA=", + "disassembly": "// Move bytecode v6\nmodule 3a391c29453c2e07af1eb0befd50b903f0cc1609df8826e1a79d3e1eceab6481.m {\nuse 0000000000000000000000000000000000000000000000000000000000000002::coin;\nuse 0000000000000000000000000000000000000000000000000000000000000002::iota;\n\n\n\n\n\n\npublic foo(Arg0: u64, Arg1: &Coin): u64 {\nB0:\n\t0: MoveLoc[1](Arg1: &Coin)\n\t1: Call coin::value(&Coin): u64\n\t2: MoveLoc[0](Arg0: u64)\n\t3: Add\n\t4: Ret\n\n}\npublic bar(Arg0: &Coin): u64 {\nB0:\n\t0: LdU64(42)\n\t1: CopyLoc[0](Arg0: &Coin)\n\t2: Call foo(u64, &Coin): u64\n\t3: LdU64(43)\n\t4: MoveLoc[0](Arg0: &Coin)\n\t5: Call foo(u64, &Coin): u64\n\t6: Mul\n\t7: Ret\n\n}\n}" } } } @@ -63,7 +63,7 @@ Response: { "nodes": [ { "outputState": { - "address": "0x5f6c07d6c4e3053699e4ced9afd2ec8b1a2c6d774707087d2b587e9bb2fe31f1", + "address": "0x3a391c29453c2e07af1eb0befd50b903f0cc1609df8826e1a79d3e1eceab6481", "asMovePackage": { "all": { "edges": [ @@ -161,7 +161,7 @@ Response: { "nodes": [ { "outputState": { - "address": "0x5f6c07d6c4e3053699e4ced9afd2ec8b1a2c6d774707087d2b587e9bb2fe31f1", + "address": "0x3a391c29453c2e07af1eb0befd50b903f0cc1609df8826e1a79d3e1eceab6481", "asMovePackage": { "prefix": { "edges": [ diff --git a/crates/iota-graphql-e2e-tests/tests/packages/structs.exp b/crates/iota-graphql-e2e-tests/tests/packages/structs.exp index 20c389e3738..32e3769f08f 100644 --- a/crates/iota-graphql-e2e-tests/tests/packages/structs.exp +++ b/crates/iota-graphql-e2e-tests/tests/packages/structs.exp @@ -136,7 +136,7 @@ task 2, lines 53-57: //# publish --upgradeable --sender A created: object(2,0), object(2,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5213600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5198400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 59: //# create-checkpoint @@ -154,7 +154,19 @@ Response: { "nodes": [ { "outputState": { - "address": "0x0a14a715d9be828476504320c2fdcf225312fd35513b5f5cf68128c56c16f053", + "address": "0x84c38f8d9019f1e508e97d3496da69da808df7482086053358996b7679e9e8b0", + "asMovePackage": null + } + }, + { + "outputState": { + "address": "0xc69f1954c6d13e3630075f462966e06d9f05fec29846d3d781026187e5411431", + "asMovePackage": null + } + }, + { + "outputState": { + "address": "0xfc8d5ed0a9e91f3edc482b1494ad1d010721fa25b3542147604d9dc4194c5b56", "asMovePackage": { "module": { "struct": { @@ -180,18 +192,6 @@ Response: { } } } - }, - { - "outputState": { - "address": "0x814a9e61782972fdbe03024dacfc000888b3a4ec0e79805e4c60ef2dca8b6b86", - "asMovePackage": null - } - }, - { - "outputState": { - "address": "0xc69f1954c6d13e3630075f462966e06d9f05fec29846d3d781026187e5411431", - "asMovePackage": null - } } ] } @@ -206,7 +206,7 @@ task 5, lines 105-111: //# upgrade --package P0 --upgrade-capability 2,0 --sender A created: object(5,0) mutated: object(0,0), object(2,0) -gas summary: computation_cost: 1000000, storage_cost: 6049600, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6034400, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 6, line 113: //# create-checkpoint @@ -224,13 +224,13 @@ Response: { "nodes": [ { "outputState": { - "address": "0x77fbbfd7cfa31aaf09f87ef5eda9dd55a665ce6cd9f7f2b9dd7492150a9d88d7", + "address": "0x0fcbd15c6fc4129828bd9551a7c79b672a801b095eb2009787bd81372c91b7ed", "asMovePackage": { "module": { "s": { "module": { "package": { - "address": "0x0a14a715d9be828476504320c2fdcf225312fd35513b5f5cf68128c56c16f053" + "address": "0xfc8d5ed0a9e91f3edc482b1494ad1d010721fa25b3542147604d9dc4194c5b56" } }, "name": "S", @@ -255,7 +255,7 @@ Response: { "t": { "module": { "package": { - "address": "0x77fbbfd7cfa31aaf09f87ef5eda9dd55a665ce6cd9f7f2b9dd7492150a9d88d7" + "address": "0x0fcbd15c6fc4129828bd9551a7c79b672a801b095eb2009787bd81372c91b7ed" } }, "name": "T", @@ -282,12 +282,12 @@ Response: { { "name": "s", "type": { - "repr": "0x0a14a715d9be828476504320c2fdcf225312fd35513b5f5cf68128c56c16f053::m::S", + "repr": "0xfc8d5ed0a9e91f3edc482b1494ad1d010721fa25b3542147604d9dc4194c5b56::m::S", "signature": { "ref": null, "body": { "datatype": { - "package": "0x0a14a715d9be828476504320c2fdcf225312fd35513b5f5cf68128c56c16f053", + "package": "0xfc8d5ed0a9e91f3edc482b1494ad1d010721fa25b3542147604d9dc4194c5b56", "module": "m", "type": "S", "typeParameters": [] @@ -316,7 +316,7 @@ Response: { { "name": "t", "type": { - "repr": "0x0a14a715d9be828476504320c2fdcf225312fd35513b5f5cf68128c56c16f053::m::T<0x0a14a715d9be828476504320c2fdcf225312fd35513b5f5cf68128c56c16f053::m::S>" + "repr": "0xfc8d5ed0a9e91f3edc482b1494ad1d010721fa25b3542147604d9dc4194c5b56::m::T<0xfc8d5ed0a9e91f3edc482b1494ad1d010721fa25b3542147604d9dc4194c5b56::m::S>" } } ] @@ -327,7 +327,7 @@ Response: { }, { "outputState": { - "address": "0x814a9e61782972fdbe03024dacfc000888b3a4ec0e79805e4c60ef2dca8b6b86", + "address": "0x84c38f8d9019f1e508e97d3496da69da808df7482086053358996b7679e9e8b0", "asMovePackage": null } }, diff --git a/crates/iota-graphql-e2e-tests/tests/packages/types.exp b/crates/iota-graphql-e2e-tests/tests/packages/types.exp index cedb5979480..f8cbbd79690 100644 --- a/crates/iota-graphql-e2e-tests/tests/packages/types.exp +++ b/crates/iota-graphql-e2e-tests/tests/packages/types.exp @@ -263,7 +263,7 @@ task 9, lines 124-141: //# publish created: object(9,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4461200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4453600, storage_rebate: 0, non_refundable_storage_fee: 0 task 10, line 143: //# create-checkpoint @@ -275,7 +275,7 @@ Response: { "data": null, "errors": [ { - "message": "Internal error occurred while processing request: Error calculating layout for 0x237315fa57d7c90c666ab786ff8c541d669179c8c250eacd39c544b0c22b64d3::m::S1: Type layout nesting exceeded limit of 128", + "message": "Internal error occurred while processing request: Error calculating layout for 0xe61abd7728c5a61dbd0ee1088e5686724388708bfd5bdc55e1e546a1e4cf92fd::m::S1: Type layout nesting exceeded limit of 128", "locations": [ { "line": 4, diff --git a/crates/iota-graphql-e2e-tests/tests/packages/versioning.exp b/crates/iota-graphql-e2e-tests/tests/packages/versioning.exp index 255830dd95a..9c380f32b9f 100644 --- a/crates/iota-graphql-e2e-tests/tests/packages/versioning.exp +++ b/crates/iota-graphql-e2e-tests/tests/packages/versioning.exp @@ -7,7 +7,7 @@ task 1, lines 7-10: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5076800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5061600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 12: //# create-checkpoint @@ -31,14 +31,14 @@ Response: { "packageVersions": { "nodes": [ { - "address": "0xe5dbc5f8788c905f2a2ceb3da977f732f0bff6f51a95fbc7560795e4c45be055", + "address": "0xb9a97ea1dd36f9c94f0c363c663258dfe85c540c6f276d77e93421ad41bf8bcb", "version": 1 } ] } }, "firstPackage": { - "address": "0xe5dbc5f8788c905f2a2ceb3da977f732f0bff6f51a95fbc7560795e4c45be055", + "address": "0xb9a97ea1dd36f9c94f0c363c663258dfe85c540c6f276d77e93421ad41bf8bcb", "version": 1, "module": { "functions": { @@ -52,7 +52,7 @@ Response: { "packageVersions": { "nodes": [ { - "address": "0xe5dbc5f8788c905f2a2ceb3da977f732f0bff6f51a95fbc7560795e4c45be055", + "address": "0xb9a97ea1dd36f9c94f0c363c663258dfe85c540c6f276d77e93421ad41bf8bcb", "version": 1 } ] @@ -81,7 +81,7 @@ Response: { "version": 1 }, { - "address": "0xe5dbc5f8788c905f2a2ceb3da977f732f0bff6f51a95fbc7560795e4c45be055", + "address": "0xb9a97ea1dd36f9c94f0c363c663258dfe85c540c6f276d77e93421ad41bf8bcb", "version": 1 } ] @@ -93,7 +93,7 @@ task 4, lines 53-57: //# upgrade --package P0 --upgrade-capability 1,0 --sender A created: object(4,0) mutated: object(0,0), object(1,0) -gas summary: computation_cost: 1000000, storage_cost: 5251600, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5236400, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 5, line 59: //# create-checkpoint @@ -120,18 +120,18 @@ Response: { "packageVersions": { "nodes": [ { - "address": "0xe5dbc5f8788c905f2a2ceb3da977f732f0bff6f51a95fbc7560795e4c45be055", + "address": "0xb9a97ea1dd36f9c94f0c363c663258dfe85c540c6f276d77e93421ad41bf8bcb", "version": 1 }, { - "address": "0xc58112792c2e41458412565379ee79d9f8e0ce8fbed6b4acdc63b4c1e69caa8b", + "address": "0x0f5c2c0da4e480bb873754b7c89ab178e2c328995b6cf89b836f08a164745acb", "version": 2 } ] } }, "firstPackage": { - "address": "0xe5dbc5f8788c905f2a2ceb3da977f732f0bff6f51a95fbc7560795e4c45be055", + "address": "0xb9a97ea1dd36f9c94f0c363c663258dfe85c540c6f276d77e93421ad41bf8bcb", "version": 1, "module": { "functions": { @@ -145,11 +145,11 @@ Response: { "packageVersions": { "nodes": [ { - "address": "0xe5dbc5f8788c905f2a2ceb3da977f732f0bff6f51a95fbc7560795e4c45be055", + "address": "0xb9a97ea1dd36f9c94f0c363c663258dfe85c540c6f276d77e93421ad41bf8bcb", "version": 1 }, { - "address": "0xc58112792c2e41458412565379ee79d9f8e0ce8fbed6b4acdc63b4c1e69caa8b", + "address": "0x0f5c2c0da4e480bb873754b7c89ab178e2c328995b6cf89b836f08a164745acb", "version": 2 } ] @@ -178,11 +178,11 @@ Response: { "version": 1 }, { - "address": "0xe5dbc5f8788c905f2a2ceb3da977f732f0bff6f51a95fbc7560795e4c45be055", + "address": "0xb9a97ea1dd36f9c94f0c363c663258dfe85c540c6f276d77e93421ad41bf8bcb", "version": 1 }, { - "address": "0xc58112792c2e41458412565379ee79d9f8e0ce8fbed6b4acdc63b4c1e69caa8b", + "address": "0x0f5c2c0da4e480bb873754b7c89ab178e2c328995b6cf89b836f08a164745acb", "version": 2 } ] @@ -194,7 +194,7 @@ task 7, lines 100-105: //# upgrade --package P1 --upgrade-capability 1,0 --sender A created: object(7,0) mutated: object(0,0), object(1,0) -gas summary: computation_cost: 1000000, storage_cost: 5426400, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5411200, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 8, line 107: //# create-checkpoint @@ -224,22 +224,22 @@ Response: { "packageVersions": { "nodes": [ { - "address": "0xe5dbc5f8788c905f2a2ceb3da977f732f0bff6f51a95fbc7560795e4c45be055", + "address": "0xb9a97ea1dd36f9c94f0c363c663258dfe85c540c6f276d77e93421ad41bf8bcb", "version": 1 }, { - "address": "0xc58112792c2e41458412565379ee79d9f8e0ce8fbed6b4acdc63b4c1e69caa8b", + "address": "0x0f5c2c0da4e480bb873754b7c89ab178e2c328995b6cf89b836f08a164745acb", "version": 2 }, { - "address": "0x595520f4386371cb9e5163e105dccac852a84d2bffcf3b2f2a3e31f8f7fae86c", + "address": "0xb4d563e260d9c18a8d6c929bb330e0dc1abfd55023e6b3e1d47524919b24e732", "version": 3 } ] } }, "firstPackage": { - "address": "0xe5dbc5f8788c905f2a2ceb3da977f732f0bff6f51a95fbc7560795e4c45be055", + "address": "0xb9a97ea1dd36f9c94f0c363c663258dfe85c540c6f276d77e93421ad41bf8bcb", "version": 1, "module": { "functions": { @@ -253,15 +253,15 @@ Response: { "packageVersions": { "nodes": [ { - "address": "0xe5dbc5f8788c905f2a2ceb3da977f732f0bff6f51a95fbc7560795e4c45be055", + "address": "0xb9a97ea1dd36f9c94f0c363c663258dfe85c540c6f276d77e93421ad41bf8bcb", "version": 1 }, { - "address": "0xc58112792c2e41458412565379ee79d9f8e0ce8fbed6b4acdc63b4c1e69caa8b", + "address": "0x0f5c2c0da4e480bb873754b7c89ab178e2c328995b6cf89b836f08a164745acb", "version": 2 }, { - "address": "0x595520f4386371cb9e5163e105dccac852a84d2bffcf3b2f2a3e31f8f7fae86c", + "address": "0xb4d563e260d9c18a8d6c929bb330e0dc1abfd55023e6b3e1d47524919b24e732", "version": 3 } ] @@ -290,15 +290,15 @@ Response: { "version": 1 }, { - "address": "0xe5dbc5f8788c905f2a2ceb3da977f732f0bff6f51a95fbc7560795e4c45be055", + "address": "0xb9a97ea1dd36f9c94f0c363c663258dfe85c540c6f276d77e93421ad41bf8bcb", "version": 1 }, { - "address": "0xc58112792c2e41458412565379ee79d9f8e0ce8fbed6b4acdc63b4c1e69caa8b", + "address": "0x0f5c2c0da4e480bb873754b7c89ab178e2c328995b6cf89b836f08a164745acb", "version": 2 }, { - "address": "0x595520f4386371cb9e5163e105dccac852a84d2bffcf3b2f2a3e31f8f7fae86c", + "address": "0xb4d563e260d9c18a8d6c929bb330e0dc1abfd55023e6b3e1d47524919b24e732", "version": 3 } ] @@ -715,7 +715,7 @@ Response: { "after": { "nodes": [ { - "address": "0xc58112792c2e41458412565379ee79d9f8e0ce8fbed6b4acdc63b4c1e69caa8b", + "address": "0x0f5c2c0da4e480bb873754b7c89ab178e2c328995b6cf89b836f08a164745acb", "version": 2, "previousTransactionBlock": { "effects": { @@ -726,7 +726,7 @@ Response: { } }, { - "address": "0x595520f4386371cb9e5163e105dccac852a84d2bffcf3b2f2a3e31f8f7fae86c", + "address": "0xb4d563e260d9c18a8d6c929bb330e0dc1abfd55023e6b3e1d47524919b24e732", "version": 3, "previousTransactionBlock": { "effects": { @@ -741,7 +741,7 @@ Response: { "between": { "nodes": [ { - "address": "0xc58112792c2e41458412565379ee79d9f8e0ce8fbed6b4acdc63b4c1e69caa8b", + "address": "0x0f5c2c0da4e480bb873754b7c89ab178e2c328995b6cf89b836f08a164745acb", "version": 2, "previousTransactionBlock": { "effects": { @@ -763,15 +763,15 @@ Response: { "packageVersions": { "nodes": [ { - "address": "0xe5dbc5f8788c905f2a2ceb3da977f732f0bff6f51a95fbc7560795e4c45be055", + "address": "0xb9a97ea1dd36f9c94f0c363c663258dfe85c540c6f276d77e93421ad41bf8bcb", "version": 1 }, { - "address": "0xc58112792c2e41458412565379ee79d9f8e0ce8fbed6b4acdc63b4c1e69caa8b", + "address": "0x0f5c2c0da4e480bb873754b7c89ab178e2c328995b6cf89b836f08a164745acb", "version": 2 }, { - "address": "0x595520f4386371cb9e5163e105dccac852a84d2bffcf3b2f2a3e31f8f7fae86c", + "address": "0xb4d563e260d9c18a8d6c929bb330e0dc1abfd55023e6b3e1d47524919b24e732", "version": 3 } ] @@ -779,11 +779,11 @@ Response: { "after": { "nodes": [ { - "address": "0xc58112792c2e41458412565379ee79d9f8e0ce8fbed6b4acdc63b4c1e69caa8b", + "address": "0x0f5c2c0da4e480bb873754b7c89ab178e2c328995b6cf89b836f08a164745acb", "version": 2 }, { - "address": "0x595520f4386371cb9e5163e105dccac852a84d2bffcf3b2f2a3e31f8f7fae86c", + "address": "0xb4d563e260d9c18a8d6c929bb330e0dc1abfd55023e6b3e1d47524919b24e732", "version": 3 } ] @@ -791,11 +791,11 @@ Response: { "before": { "nodes": [ { - "address": "0xe5dbc5f8788c905f2a2ceb3da977f732f0bff6f51a95fbc7560795e4c45be055", + "address": "0xb9a97ea1dd36f9c94f0c363c663258dfe85c540c6f276d77e93421ad41bf8bcb", "version": 1 }, { - "address": "0xc58112792c2e41458412565379ee79d9f8e0ce8fbed6b4acdc63b4c1e69caa8b", + "address": "0x0f5c2c0da4e480bb873754b7c89ab178e2c328995b6cf89b836f08a164745acb", "version": 2 } ] @@ -803,7 +803,7 @@ Response: { "between": { "nodes": [ { - "address": "0xc58112792c2e41458412565379ee79d9f8e0ce8fbed6b4acdc63b4c1e69caa8b", + "address": "0x0f5c2c0da4e480bb873754b7c89ab178e2c328995b6cf89b836f08a164745acb", "version": 2 } ] diff --git a/crates/iota-graphql-e2e-tests/tests/transaction_block_effects/balance_changes.exp b/crates/iota-graphql-e2e-tests/tests/transaction_block_effects/balance_changes.exp index f2abc5bd6c4..397cfbbfa29 100644 --- a/crates/iota-graphql-e2e-tests/tests/transaction_block_effects/balance_changes.exp +++ b/crates/iota-graphql-e2e-tests/tests/transaction_block_effects/balance_changes.exp @@ -9,7 +9,7 @@ task 1, lines 7-9: //> TransferObjects([NestedResult(0,0), NestedResult(0,1), NestedResult(0,2), NestedResult(0,3), NestedResult(0,4)], Input(0)); created: object(1,0), object(1,1), object(1,2), object(1,3), object(1,4) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5928000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5882400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 11-16: //# programmable --sender C --inputs object(1,0) object(1,1) object(1,2) object(1,3) object(1,4) @O @P @Q @R @S @@ -19,7 +19,7 @@ task 2, lines 11-16: //> TransferObjects([Input(3)], Input(8)); //> TransferObjects([Input(4)], Input(9)); mutated: object(0,0), object(1,0), object(1,1), object(1,2), object(1,3), object(1,4) -gas summary: computation_cost: 1000000, storage_cost: 5928000, storage_rebate: 5928000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5882400, storage_rebate: 5882400, non_refundable_storage_fee: 0 task 3, line 18: //# create-checkpoint @@ -72,13 +72,13 @@ Response: { }, { "node": { - "amount": "4000" + "amount": "2000" }, "cursor": "eyJpIjo0LCJjIjoyfQ" }, { "node": { - "amount": "2000" + "amount": "4000" }, "cursor": "eyJpIjo1LCJjIjoyfQ" } @@ -117,7 +117,7 @@ Response: { }, { "node": { - "amount": "4000" + "amount": "2000" }, "cursor": "eyJpIjo0LCJjIjoxfQ" } diff --git a/crates/iota-graphql-e2e-tests/tests/transaction_block_effects/dependencies.exp b/crates/iota-graphql-e2e-tests/tests/transaction_block_effects/dependencies.exp index 4c2968717bd..2419d46d870 100644 --- a/crates/iota-graphql-e2e-tests/tests/transaction_block_effects/dependencies.exp +++ b/crates/iota-graphql-e2e-tests/tests/transaction_block_effects/dependencies.exp @@ -7,37 +7,37 @@ task 1, lines 7-34: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 6194000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6186400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 36: //# run Test::M1::create --args 2 @A created: object(2,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 38: //# run Test::M1::create --args 3 @A created: object(3,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 40: //# run Test::M1::create --args 4 @A created: object(4,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 42: //# run Test::M1::create --args 5 @A created: object(5,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, line 44: //# run Test::M1::create --args 6 @A created: object(6,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, lines 46-50: //# programmable --sender A --inputs object(2,0) object(3,0) object(4,0) object(5,0) object(6,0) @A @@ -47,12 +47,12 @@ task 7, lines 46-50: //> 3: Test::M1::create(Result(2), Input(5)); created: object(7,0) mutated: object(0,0), object(2,0), object(3,0), object(4,0), object(5,0), object(6,0) -gas summary: computation_cost: 1000000, storage_cost: 8876800, storage_rebate: 6574000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8823600, storage_rebate: 6536000, non_refundable_storage_fee: 0 task 8, line 52: //# run Test::M1::increment --sender A --args object(7,0) 100 mutated: object(0,0), object(7,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 2302800, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 2287600, non_refundable_storage_fee: 0 task 9, line 54: //# create-checkpoint @@ -65,7 +65,7 @@ Response: { "transactionBlocks": { "nodes": [ { - "digest": "EjzXToHA9vFBCh9PQuKmQuoWPnxyDqVjHvRiaw3e9kpc", + "digest": "Nj6ihexZgq92WRmwPhTFoHW5LqE8YKDYgBNj6uRve5S", "effects": { "dependencies": { "pageInfo": { @@ -78,7 +78,7 @@ Response: { { "cursor": "eyJpIjowLCJjIjoxfQ", "node": { - "digest": "8aggw6hFNvMqB8A1ig1cwBdZ2etYWv4nfskbtstk1nh2", + "digest": "5vV7Am92rPPM9VLDV2oqA6SzNTrMLt8V3yiCkWGYeYtb", "kind": { "__typename": "ProgrammableTransactionBlock", "transactions": { @@ -107,7 +107,7 @@ Response: { { "cursor": "eyJpIjoxLCJjIjoxfQ", "node": { - "digest": "GwkM5KrkL2LCGu6L5uT9nuGnPrngiGV4xw4YqrLLdQYp", + "digest": "7DzPqWyTbh35vX6NZriBXftsRotmqRueMd7uib8VBrFt", "kind": { "__typename": "ProgrammableTransactionBlock", "transactions": { @@ -138,7 +138,7 @@ Response: { "transactionBlocks": { "nodes": [ { - "digest": "EjzXToHA9vFBCh9PQuKmQuoWPnxyDqVjHvRiaw3e9kpc", + "digest": "Nj6ihexZgq92WRmwPhTFoHW5LqE8YKDYgBNj6uRve5S", "effects": { "dependencies": { "pageInfo": { @@ -151,7 +151,7 @@ Response: { { "cursor": "eyJpIjoxLCJjIjoxfQ", "node": { - "digest": "GwkM5KrkL2LCGu6L5uT9nuGnPrngiGV4xw4YqrLLdQYp", + "digest": "7DzPqWyTbh35vX6NZriBXftsRotmqRueMd7uib8VBrFt", "kind": { "__typename": "ProgrammableTransactionBlock", "transactions": { diff --git a/crates/iota-graphql-e2e-tests/tests/transaction_block_effects/events.exp b/crates/iota-graphql-e2e-tests/tests/transaction_block_effects/events.exp index 825a05769f7..61265476233 100644 --- a/crates/iota-graphql-e2e-tests/tests/transaction_block_effects/events.exp +++ b/crates/iota-graphql-e2e-tests/tests/transaction_block_effects/events.exp @@ -7,25 +7,25 @@ task 1, lines 7-29: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 5251600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5244000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 31: //# run Test::M1::emit_1 --sender A --args 1 events: Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [1, 0, 0, 0, 0, 0, 0, 0] } mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 33: //# run Test::M1::emit_2 --sender A --args 10 events: Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [10, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [11, 0, 0, 0, 0, 0, 0, 0] } mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, line 35: //# run Test::M1::emit_3 --sender A --args 100 events: Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [100, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [101, 0, 0, 0, 0, 0, 0, 0] }, Event { package_id: Test, transaction_module: Identifier("M1"), sender: A, type_: StructTag { address: Test, module: Identifier("M1"), name: Identifier("EventA"), type_params: [] }, contents: [102, 0, 0, 0, 0, 0, 0, 0] } mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 37: //# create-checkpoint diff --git a/crates/iota-graphql-e2e-tests/tests/transaction_block_effects/object_changes.exp b/crates/iota-graphql-e2e-tests/tests/transaction_block_effects/object_changes.exp index 04c6f550e86..bb8a7b9f4d4 100644 --- a/crates/iota-graphql-e2e-tests/tests/transaction_block_effects/object_changes.exp +++ b/crates/iota-graphql-e2e-tests/tests/transaction_block_effects/object_changes.exp @@ -7,13 +7,13 @@ task 1, lines 7-26: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 5570800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5563200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 28: //# run Test::M1::create --args 0 @A --gas-price 1000 created: object(2,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, line 30: //# create-checkpoint diff --git a/crates/iota-graphql-e2e-tests/tests/transactions/at_checkpoint.exp b/crates/iota-graphql-e2e-tests/tests/transactions/at_checkpoint.exp index 05e6f8f6495..3bafc470eb3 100644 --- a/crates/iota-graphql-e2e-tests/tests/transactions/at_checkpoint.exp +++ b/crates/iota-graphql-e2e-tests/tests/transactions/at_checkpoint.exp @@ -9,7 +9,7 @@ task 2, lines 11-13: //> TransferObjects([Result(0)], Input(1)) created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 1976000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 1960800, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, line 15: //# create-checkpoint @@ -30,7 +30,7 @@ Response: { "c0": { "nodes": [ { - "digest": "C6iwtuE4nRj6VQugN6RrFxuCpcHJe5NYWY89yRtpSGJx", + "digest": "Bg37EsAT4gAL589upKSw92NUKGpxHk1ejmfkUoXdJzMo", "kind": { "__typename": "GenesisTransaction" } @@ -46,7 +46,7 @@ Response: { } }, { - "digest": "GfZCVfFqd5xbzuNzNPzjqXYbG81cSA6dNde74gsDnRn", + "digest": "973SQ6oCuqnAVPYxHBfki8ZbCj1fNLjoakbS3VjvTaPa", "kind": { "__typename": "ProgrammableTransactionBlock" } @@ -87,7 +87,7 @@ Response: { "transactionBlocks": { "nodes": [ { - "digest": "C6iwtuE4nRj6VQugN6RrFxuCpcHJe5NYWY89yRtpSGJx", + "digest": "Bg37EsAT4gAL589upKSw92NUKGpxHk1ejmfkUoXdJzMo", "kind": { "__typename": "GenesisTransaction" } @@ -105,7 +105,7 @@ Response: { } }, { - "digest": "GfZCVfFqd5xbzuNzNPzjqXYbG81cSA6dNde74gsDnRn", + "digest": "973SQ6oCuqnAVPYxHBfki8ZbCj1fNLjoakbS3VjvTaPa", "kind": { "__typename": "ProgrammableTransactionBlock" } @@ -154,7 +154,7 @@ Response: { "transactionBlocks": { "nodes": [ { - "digest": "C6iwtuE4nRj6VQugN6RrFxuCpcHJe5NYWY89yRtpSGJx", + "digest": "Bg37EsAT4gAL589upKSw92NUKGpxHk1ejmfkUoXdJzMo", "kind": { "__typename": "GenesisTransaction" } @@ -172,7 +172,7 @@ Response: { } }, { - "digest": "GfZCVfFqd5xbzuNzNPzjqXYbG81cSA6dNde74gsDnRn", + "digest": "973SQ6oCuqnAVPYxHBfki8ZbCj1fNLjoakbS3VjvTaPa", "kind": { "__typename": "ProgrammableTransactionBlock" } diff --git a/crates/iota-graphql-e2e-tests/tests/transactions/errors.exp b/crates/iota-graphql-e2e-tests/tests/transactions/errors.exp index f6f5ac9bafc..5515b71fcc6 100644 --- a/crates/iota-graphql-e2e-tests/tests/transactions/errors.exp +++ b/crates/iota-graphql-e2e-tests/tests/transactions/errors.exp @@ -4,7 +4,7 @@ task 1, lines 7-12: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3663200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3655600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 14-15: //# programmable @@ -25,7 +25,7 @@ Response: { { "effects": { "status": "FAILURE", - "errors": "Error in 1st command, from '0x39fb2ab9290285b990624994efdf9c5b54cb06a2d6492ef6e1058139a3422418::m::boom' (instruction 1), abort code: 42" + "errors": "Error in 1st command, from '0xb7d000e6ce024756ce5f7f7a50dc9ab34f9727d72b0ff528917b08087360bfed::m::boom' (instruction 1), abort code: 42" } } ] @@ -54,7 +54,7 @@ Response: { { "effects": { "status": "FAILURE", - "errors": "Error in 3rd command, from '0x39fb2ab9290285b990624994efdf9c5b54cb06a2d6492ef6e1058139a3422418::m::boom' (instruction 1), abort code: 42" + "errors": "Error in 3rd command, from '0xb7d000e6ce024756ce5f7f7a50dc9ab34f9727d72b0ff528917b08087360bfed::m::boom' (instruction 1), abort code: 42" } } ] diff --git a/crates/iota-graphql-e2e-tests/tests/transactions/filters/kind.exp b/crates/iota-graphql-e2e-tests/tests/transactions/filters/kind.exp index 1dd4cea2898..ddb946f16fd 100644 --- a/crates/iota-graphql-e2e-tests/tests/transactions/filters/kind.exp +++ b/crates/iota-graphql-e2e-tests/tests/transactions/filters/kind.exp @@ -7,7 +7,7 @@ task 1, lines 7-20: //# publish created: object(1,0) mutated: object(0,5) -gas summary: computation_cost: 1000000, storage_cost: 5175600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5168000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 22: //# create-checkpoint @@ -17,31 +17,31 @@ task 3, line 24: //# run Test::M1::create --args 0 @A --sender A created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 4, line 26: //# run Test::M1::create --args 1 @A --sender B created: object(4,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 5, line 28: //# run Test::M1::create --args 2 @A --sender C created: object(5,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 6, line 30: //# run Test::M1::create --args 3 @A --sender D created: object(6,0) mutated: object(0,3) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 7, line 32: //# run Test::M1::create --args 4 @A --sender E created: object(7,0) mutated: object(0,4) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 8, line 34: //# create-checkpoint @@ -60,7 +60,7 @@ Response: { }, "nodes": [ { - "digest": "9QsADBJCUStCnwMe9mUbAbbWeJdm1hD6RzYa3jV6LMcB", + "digest": "DyfoVXSwG2QBCqLzozzoUBpcBzMtyqbeqxtrx16kKJ75", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -68,7 +68,7 @@ Response: { } }, { - "digest": "8XqhpeJ3we9cNwW2rA5CotQZgwVBnVFT9PgNsziytDfr", + "digest": "7aGyUPRRVEVDWCLuAhY56ZW8BrkWqkRhVo1jG2zbFdJw", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -76,7 +76,7 @@ Response: { } }, { - "digest": "488uwXSrUQ2Yn3d1PNvXMVxJRjKk228wck1sN4sXooGw", + "digest": "64FRv4LtnfGQ5fSQ3VsFmVdCyhU3Fm5rpsb3aYmEAwP4", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -84,7 +84,7 @@ Response: { } }, { - "digest": "4HmSLnKrZcShU4EZ3iUimzYxEyMpqpJYVXK19pKzBBzz", + "digest": "EQHDejPTtkNQUbqmNrcyruptdePpxhBXoWxkrZJ1eS7r", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -92,7 +92,7 @@ Response: { } }, { - "digest": "CsdQ7PymdxgBfy9PknLLHnj8kTFLqtnayXphjahzYGqV", + "digest": "GikQy5k3EytSDpKEdQLLzXyZmpzCAejQPyiBJJLJ8az4", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -117,7 +117,7 @@ Response: { }, "nodes": [ { - "digest": "9QsADBJCUStCnwMe9mUbAbbWeJdm1hD6RzYa3jV6LMcB", + "digest": "DyfoVXSwG2QBCqLzozzoUBpcBzMtyqbeqxtrx16kKJ75", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -142,7 +142,7 @@ Response: { }, "nodes": [ { - "digest": "8XqhpeJ3we9cNwW2rA5CotQZgwVBnVFT9PgNsziytDfr", + "digest": "7aGyUPRRVEVDWCLuAhY56ZW8BrkWqkRhVo1jG2zbFdJw", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -167,7 +167,7 @@ Response: { }, "nodes": [ { - "digest": "488uwXSrUQ2Yn3d1PNvXMVxJRjKk228wck1sN4sXooGw", + "digest": "64FRv4LtnfGQ5fSQ3VsFmVdCyhU3Fm5rpsb3aYmEAwP4", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -192,7 +192,7 @@ Response: { }, "nodes": [ { - "digest": "4HmSLnKrZcShU4EZ3iUimzYxEyMpqpJYVXK19pKzBBzz", + "digest": "EQHDejPTtkNQUbqmNrcyruptdePpxhBXoWxkrZJ1eS7r", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -217,7 +217,7 @@ Response: { }, "nodes": [ { - "digest": "CsdQ7PymdxgBfy9PknLLHnj8kTFLqtnayXphjahzYGqV", + "digest": "GikQy5k3EytSDpKEdQLLzXyZmpzCAejQPyiBJJLJ8az4", "effects": { "checkpoint": { "sequenceNumber": 2 diff --git a/crates/iota-graphql-e2e-tests/tests/transactions/filters/transaction_ids.exp b/crates/iota-graphql-e2e-tests/tests/transactions/filters/transaction_ids.exp index b780f05f826..4832a909527 100644 --- a/crates/iota-graphql-e2e-tests/tests/transactions/filters/transaction_ids.exp +++ b/crates/iota-graphql-e2e-tests/tests/transactions/filters/transaction_ids.exp @@ -7,7 +7,7 @@ task 1, lines 7-20: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 5175600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5168000, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 22: //# create-checkpoint @@ -17,7 +17,7 @@ task 3, line 24: //# run Test::M1::create --args 0 @A --sender A created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 4, line 26: //# create-checkpoint diff --git a/crates/iota-graphql-e2e-tests/tests/transactions/programmable.exp b/crates/iota-graphql-e2e-tests/tests/transactions/programmable.exp index bbd6b00fd67..ece5d01d0ae 100644 --- a/crates/iota-graphql-e2e-tests/tests/transactions/programmable.exp +++ b/crates/iota-graphql-e2e-tests/tests/transactions/programmable.exp @@ -7,7 +7,7 @@ task 1, lines 7-17: //# publish --upgradeable --sender A created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6315600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6300400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 19: //# create-checkpoint @@ -20,12 +20,12 @@ Response: { "transactionBlocks": { "nodes": [ { - "digest": "2MUxrjysEwGdMf7NyDjUsZy6tcbHAHyXDfsB1Wo8mPH2", + "digest": "tvDgE7mmbtwGC6Kg1tyUptAZyjVxSxCpLPYmSSv7tLe", "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" }, "signatures": [ - "AGs3zo0WQvZue0clp4H4fb2yWFicRp9QElAVCu7QVCLWIGSxdRfpwo8HcO0AyP0hx+QeH1bQQ9RUYfvUq8QQcQl/UUY663bYjcm3XmNyULIgxJz1t5Z9vxfB+fp8WUoJKA==" + "ABKf28j4W1zD01A94qW7ugvONKCQo3SWIeU025zhQFzKq5EI7FvY8fKAnxBlFfRM0SBj9V0+F5xflied0rGECQJ/UUY663bYjcm3XmNyULIgxJz1t5Z9vxfB+fp8WUoJKA==" ], "gasInput": { "gasSponsor": { @@ -96,7 +96,7 @@ Response: { "dependencies": { "nodes": [ { - "digest": "C6iwtuE4nRj6VQugN6RrFxuCpcHJe5NYWY89yRtpSGJx" + "digest": "Bg37EsAT4gAL589upKSw92NUKGpxHk1ejmfkUoXdJzMo" } ] }, @@ -106,7 +106,7 @@ Response: { "owner": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" }, - "amount": "-7315600", + "amount": "-7300400", "coinType": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA" } @@ -116,30 +116,30 @@ Response: { "objectChanges": { "nodes": [ { - "address": "0x1f268cce37163faf272ffb7404237b30864e158e35d578c34bf09be1117db47f", + "address": "0x1b0961cd4993fc5cdc89e30b433a4de9cde01b12e15c8e2fb88754d653992822", "idCreated": true, "idDeleted": false, "outputState": { - "address": "0x1f268cce37163faf272ffb7404237b30864e158e35d578c34bf09be1117db47f", - "digest": "DBH9fiDneZnyYezJei1k296N2Qms1yBoP3DyquJGUiyt" + "address": "0x1b0961cd4993fc5cdc89e30b433a4de9cde01b12e15c8e2fb88754d653992822", + "digest": "6C9ZpyBYqwBB1xzcMkoSmGybPA7FsStqMHgW6zEo1Snm" } }, { - "address": "0x3513deafe141b09e3e74ade0c10ad7cfef1f28913e0dfa5890447b7aadc68271", - "idCreated": true, + "address": "0xc69f1954c6d13e3630075f462966e06d9f05fec29846d3d781026187e5411431", + "idCreated": false, "idDeleted": false, "outputState": { - "address": "0x3513deafe141b09e3e74ade0c10ad7cfef1f28913e0dfa5890447b7aadc68271", - "digest": "C4vpRpboCVaR3kadwpibKdymYjBnCigfRJitoonyvuGM" + "address": "0xc69f1954c6d13e3630075f462966e06d9f05fec29846d3d781026187e5411431", + "digest": "CpcjnZm8q5CZHgyAGAAQM6HaTcKtPiEUv7wBk44gpCh9" } }, { - "address": "0xc69f1954c6d13e3630075f462966e06d9f05fec29846d3d781026187e5411431", - "idCreated": false, + "address": "0xfb3eadec34edec1ac979b6f1752b399ddc68480ffc15dcbe7163b0acc89c548e", + "idCreated": true, "idDeleted": false, "outputState": { - "address": "0xc69f1954c6d13e3630075f462966e06d9f05fec29846d3d781026187e5411431", - "digest": "8ScfsyhHBDxQm6jr66NKUfnM64eJsQuB9jFR6DBdQNnH" + "address": "0xfb3eadec34edec1ac979b6f1752b399ddc68480ffc15dcbe7163b0acc89c548e", + "digest": "Eq9cwQBnFuUphwJmmkJnzMKdSDMG7TejrjjRbm8Pxrxk" } } ] @@ -150,7 +150,7 @@ Response: { }, "gasSummary": { "computationCost": "1000000", - "storageCost": "6315600", + "storageCost": "6300400", "storageRebate": "0", "nonRefundableStorageFee": "0" } @@ -163,7 +163,7 @@ Response: { "sequenceNumber": 1 }, "transactionBlock": { - "digest": "2MUxrjysEwGdMf7NyDjUsZy6tcbHAHyXDfsB1Wo8mPH2" + "digest": "tvDgE7mmbtwGC6Kg1tyUptAZyjVxSxCpLPYmSSv7tLe" } }, "expiration": null @@ -177,7 +177,7 @@ task 4, lines 202-217: //# upgrade --package P0 --upgrade-capability 1,0 --sender A created: object(4,0) mutated: object(0,0), object(1,0) -gas summary: computation_cost: 1000000, storage_cost: 6589200, storage_rebate: 2622000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6574000, storage_rebate: 2606800, non_refundable_storage_fee: 0 task 5, line 219: //# create-checkpoint @@ -190,12 +190,12 @@ Response: { "transactionBlocks": { "nodes": [ { - "digest": "DPd6z9jYxhFxDzXU9LY2LT14Cr2aE6mmHoq4LG78rEfM", + "digest": "JCZvDpBa2RK5ypkUY5bwY2nTpTCpHUCc8DEz62B8nzL", "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" }, "signatures": [ - "AF1QOI9E2qiLqT99GzC5wH8EsYf4wLx22TUvP1+OrDc3J9adqvn3xoVyojhbDqdTbax2Si4HhNepJBVCUR4Q5Ah/UUY663bYjcm3XmNyULIgxJz1t5Z9vxfB+fp8WUoJKA==" + "AATfZcSufT+0WT8TPvA21GyB7SWGr4L84+OZDLnfNILU446/Y4FUXZRfA8ZAlK83T23HuTDJM51bvufBlH3LJg1/UUY663bYjcm3XmNyULIgxJz1t5Z9vxfB+fp8WUoJKA==" ], "gasInput": { "gasSponsor": { @@ -219,21 +219,21 @@ Response: { "cursor": "eyJpIjowLCJjIjoyfQ", "node": { "__typename": "OwnedOrImmutable", - "address": "0x3513deafe141b09e3e74ade0c10ad7cfef1f28913e0dfa5890447b7aadc68271", + "address": "0xfb3eadec34edec1ac979b6f1752b399ddc68480ffc15dcbe7163b0acc89c548e", "version": 2, - "digest": "C4vpRpboCVaR3kadwpibKdymYjBnCigfRJitoonyvuGM", + "digest": "Eq9cwQBnFuUphwJmmkJnzMKdSDMG7TejrjjRbm8Pxrxk", "object": { - "address": "0x3513deafe141b09e3e74ade0c10ad7cfef1f28913e0dfa5890447b7aadc68271", + "address": "0xfb3eadec34edec1ac979b6f1752b399ddc68480ffc15dcbe7163b0acc89c548e", "version": 2, - "digest": "C4vpRpboCVaR3kadwpibKdymYjBnCigfRJitoonyvuGM", + "digest": "Eq9cwQBnFuUphwJmmkJnzMKdSDMG7TejrjjRbm8Pxrxk", "asMoveObject": { "contents": { "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::package::UpgradeCap" }, "json": { - "id": "0x3513deafe141b09e3e74ade0c10ad7cfef1f28913e0dfa5890447b7aadc68271", - "package": "0x1f268cce37163faf272ffb7404237b30864e158e35d578c34bf09be1117db47f", + "id": "0xfb3eadec34edec1ac979b6f1752b399ddc68480ffc15dcbe7163b0acc89c548e", + "package": "0x1b0961cd4993fc5cdc89e30b433a4de9cde01b12e15c8e2fb88754d653992822", "version": "1", "policy": 0 } @@ -315,7 +315,7 @@ Response: { "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000002" ], - "currentPackage": "0x1f268cce37163faf272ffb7404237b30864e158e35d578c34bf09be1117db47f", + "currentPackage": "0x1b0961cd4993fc5cdc89e30b433a4de9cde01b12e15c8e2fb88754d653992822", "upgradeTicket": { "__typename": "Result", "cmd": 0, @@ -367,10 +367,10 @@ Response: { "dependencies": { "nodes": [ { - "digest": "2MUxrjysEwGdMf7NyDjUsZy6tcbHAHyXDfsB1Wo8mPH2" + "digest": "tvDgE7mmbtwGC6Kg1tyUptAZyjVxSxCpLPYmSSv7tLe" }, { - "digest": "C6iwtuE4nRj6VQugN6RrFxuCpcHJe5NYWY89yRtpSGJx" + "digest": "Bg37EsAT4gAL589upKSw92NUKGpxHk1ejmfkUoXdJzMo" } ] }, @@ -390,30 +390,30 @@ Response: { "objectChanges": { "nodes": [ { - "address": "0x3513deafe141b09e3e74ade0c10ad7cfef1f28913e0dfa5890447b7aadc68271", - "idCreated": false, + "address": "0xc4d534b3b62e9e99d3b8a20abc757dccfc3b7a32f6fff8e47cf8cf1cd906cf64", + "idCreated": true, "idDeleted": false, "outputState": { - "address": "0x3513deafe141b09e3e74ade0c10ad7cfef1f28913e0dfa5890447b7aadc68271", - "digest": "8PrCtMzw1mk82qsVW9eDVi3TbCRDWC1t19JZ5qh85Dch" + "address": "0xc4d534b3b62e9e99d3b8a20abc757dccfc3b7a32f6fff8e47cf8cf1cd906cf64", + "digest": "2NMQpbTkNrUxaTApQHYhN8z4jJj9bs8DFC4g7Pb5psoP" } }, { - "address": "0x37024660df6c85f6cf4b852d0b7a4e60b2db23af53c39159b587409c9eb552bd", - "idCreated": true, + "address": "0xc69f1954c6d13e3630075f462966e06d9f05fec29846d3d781026187e5411431", + "idCreated": false, "idDeleted": false, "outputState": { - "address": "0x37024660df6c85f6cf4b852d0b7a4e60b2db23af53c39159b587409c9eb552bd", - "digest": "2a1BSB63ZdQvbUGDNWLQaqqkzX4rnZpB7sPV6yPqY657" + "address": "0xc69f1954c6d13e3630075f462966e06d9f05fec29846d3d781026187e5411431", + "digest": "HSn5KHX97NhZi1ovsPZQbRgYdfYnTwmE6aamc6o2bxYq" } }, { - "address": "0xc69f1954c6d13e3630075f462966e06d9f05fec29846d3d781026187e5411431", + "address": "0xfb3eadec34edec1ac979b6f1752b399ddc68480ffc15dcbe7163b0acc89c548e", "idCreated": false, "idDeleted": false, "outputState": { - "address": "0xc69f1954c6d13e3630075f462966e06d9f05fec29846d3d781026187e5411431", - "digest": "7UepzubAJ5fYMtTgUPRfNiqJAdek4TyQ34RkqhsHMw8F" + "address": "0xfb3eadec34edec1ac979b6f1752b399ddc68480ffc15dcbe7163b0acc89c548e", + "digest": "HH96DACodGczUapLY4eCrByvdAzg5iadrjtadPtj6EXw" } } ] @@ -424,8 +424,8 @@ Response: { }, "gasSummary": { "computationCost": "1000000", - "storageCost": "6589200", - "storageRebate": "2622000", + "storageCost": "6574000", + "storageRebate": "2606800", "nonRefundableStorageFee": "0" } }, @@ -437,7 +437,7 @@ Response: { "sequenceNumber": 2 }, "transactionBlock": { - "digest": "DPd6z9jYxhFxDzXU9LY2LT14Cr2aE6mmHoq4LG78rEfM" + "digest": "JCZvDpBa2RK5ypkUY5bwY2nTpTCpHUCc8DEz62B8nzL" } }, "expiration": null @@ -454,7 +454,7 @@ task 7, lines 402-405: //> iota::transfer::public_transfer(Result(1), Input(1)) created: object(7,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2280000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2264800, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, lines 407-416: //# programmable --sender A --inputs 42u64 43u64 1000 @A @@ -469,7 +469,7 @@ task 8, lines 407-416: //> TransferObjects([NestedResult(2,0)], Input(3)) created: object(8,0), object(8,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3328800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3306000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 9, line 418: //# create-checkpoint @@ -482,12 +482,12 @@ Response: { "transactionBlocks": { "nodes": [ { - "digest": "HspCTE5Co5uBXcdincQ6jEwBQY1giMQYGLjy1boHeGNs", + "digest": "FiPjt6NaBmwTXNSQJDPvTEfwoWJQ1tfpe8P87ajeKfn4", "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" }, "signatures": [ - "AKsBuzqPMoivJqZBBIGchFgks7rJY1ZnXKjLSykp++5+XkrZodPl6z9QhPkYebNrLMfBSzO9r+lkH2PNR+pOXg5/UUY663bYjcm3XmNyULIgxJz1t5Z9vxfB+fp8WUoJKA==" + "AImFtPn31VRGRTd3pkm8Ho2hfbGtkyJHUyPyDFPCw5wSYbc4DK0zM2CfP4znyyquxSTZrkbhdc68v6DBVrGc0wN/UUY663bYjcm3XmNyULIgxJz1t5Z9vxfB+fp8WUoJKA==" ], "gasInput": { "gasSponsor": { @@ -591,7 +591,7 @@ Response: { "cursor": "eyJpIjozLCJjIjozfQ", "node": { "__typename": "MoveCallTransaction", - "package": "0x37024660df6c85f6cf4b852d0b7a4e60b2db23af53c39159b587409c9eb552bd", + "package": "0xc4d534b3b62e9e99d3b8a20abc757dccfc3b7a32f6fff8e47cf8cf1cd906cf64", "module": "m", "functionName": "new", "typeArguments": [], @@ -615,7 +615,7 @@ Response: { ], "return": [ { - "repr": "0x1f268cce37163faf272ffb7404237b30864e158e35d578c34bf09be1117db47f::m::Foo" + "repr": "0x1b0961cd4993fc5cdc89e30b433a4de9cde01b12e15c8e2fb88754d653992822::m::Foo" } ] } @@ -642,7 +642,7 @@ Response: { "cursor": "eyJpIjo1LCJjIjozfQ", "node": { "__typename": "MoveCallTransaction", - "package": "0x37024660df6c85f6cf4b852d0b7a4e60b2db23af53c39159b587409c9eb552bd", + "package": "0xc4d534b3b62e9e99d3b8a20abc757dccfc3b7a32f6fff8e47cf8cf1cd906cf64", "module": "m", "functionName": "new", "typeArguments": [], @@ -666,7 +666,7 @@ Response: { ], "return": [ { - "repr": "0x1f268cce37163faf272ffb7404237b30864e158e35d578c34bf09be1117db47f::m::Foo" + "repr": "0x1b0961cd4993fc5cdc89e30b433a4de9cde01b12e15c8e2fb88754d653992822::m::Foo" } ] } @@ -676,7 +676,7 @@ Response: { "cursor": "eyJpIjo2LCJjIjozfQ", "node": { "__typename": "MoveCallTransaction", - "package": "0x37024660df6c85f6cf4b852d0b7a4e60b2db23af53c39159b587409c9eb552bd", + "package": "0xc4d534b3b62e9e99d3b8a20abc757dccfc3b7a32f6fff8e47cf8cf1cd906cf64", "module": "m", "functionName": "burn", "typeArguments": [], @@ -692,7 +692,7 @@ Response: { "typeParameters": [], "parameters": [ { - "repr": "0x1f268cce37163faf272ffb7404237b30864e158e35d578c34bf09be1117db47f::m::Foo" + "repr": "0x1b0961cd4993fc5cdc89e30b433a4de9cde01b12e15c8e2fb88754d653992822::m::Foo" } ], "return": [] @@ -744,10 +744,10 @@ Response: { "dependencies": { "nodes": [ { - "digest": "5dRCum6yGH8yf3AE1r674Ejvecm7VgNjTSZx25NRuXKj" + "digest": "JCZvDpBa2RK5ypkUY5bwY2nTpTCpHUCc8DEz62B8nzL" }, { - "digest": "DPd6z9jYxhFxDzXU9LY2LT14Cr2aE6mmHoq4LG78rEfM" + "digest": "GhnCeKNzadasPxvEHpaNqHYrBn72Ge9vYoFU3h4tAeBv" } ] }, @@ -757,7 +757,7 @@ Response: { "owner": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" }, - "amount": "-3340800", + "amount": "-3325600", "coinType": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA" } @@ -767,66 +767,66 @@ Response: { "objectChanges": { "nodes": [ { - "address": "0x6098eab27dea4e7a28d81d183cf5885f907abad719cff51d4b44d4caf777367e", + "address": "0xb4e14ddd214a4ddb9acca83017dc8fd05f8ad433e4d7e6676087e6c0368e68a0", "idCreated": true, "idDeleted": false, "outputState": { - "address": "0x6098eab27dea4e7a28d81d183cf5885f907abad719cff51d4b44d4caf777367e", - "digest": "9Uw6Bm2Qx4T5C4Eqb1pXLV4uFPq3oYUV1EYCUFqLRYWE", + "address": "0xb4e14ddd214a4ddb9acca83017dc8fd05f8ad433e4d7e6676087e6c0368e68a0", + "digest": "8qv3yd7bS9w4MqkxCgjzGe6QHzWnqBYC7yu84FLJi1G1", "asMoveObject": { "contents": { "type": { - "repr": "0x1f268cce37163faf272ffb7404237b30864e158e35d578c34bf09be1117db47f::m::Foo" + "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA>" }, "json": { - "id": "0x6098eab27dea4e7a28d81d183cf5885f907abad719cff51d4b44d4caf777367e", - "xs": [ - "42", - "43" - ] + "id": "0xb4e14ddd214a4ddb9acca83017dc8fd05f8ad433e4d7e6676087e6c0368e68a0", + "balance": { + "value": "2000" + } } } } } }, { - "address": "0xc69f1954c6d13e3630075f462966e06d9f05fec29846d3d781026187e5411431", - "idCreated": false, + "address": "0xb83a5a53f7d1dd5b87d9d829da34ef11375bf8acae96f8ca7fe5dfbf49c87d14", + "idCreated": true, "idDeleted": false, "outputState": { - "address": "0xc69f1954c6d13e3630075f462966e06d9f05fec29846d3d781026187e5411431", - "digest": "JA2ShgjgZj3QuVUC88YnYsYmaSDSww12TyJm6UsYGLxf", + "address": "0xb83a5a53f7d1dd5b87d9d829da34ef11375bf8acae96f8ca7fe5dfbf49c87d14", + "digest": "7DJMVrZRXv1iuuVTNmv8LEuuMBSoTLw9h6AHxFGHbWE7", "asMoveObject": { "contents": { "type": { - "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA>" + "repr": "0x1b0961cd4993fc5cdc89e30b433a4de9cde01b12e15c8e2fb88754d653992822::m::Foo" }, "json": { - "id": "0xc69f1954c6d13e3630075f462966e06d9f05fec29846d3d781026187e5411431", - "balance": { - "value": "299999982082400" - } + "id": "0xb83a5a53f7d1dd5b87d9d829da34ef11375bf8acae96f8ca7fe5dfbf49c87d14", + "xs": [ + "42", + "43" + ] } } } } }, { - "address": "0xe0cf72b0f7b4a5cfed63514352a8082fa088c83e2a01efa8e9395230a3641d3c", - "idCreated": true, + "address": "0xc69f1954c6d13e3630075f462966e06d9f05fec29846d3d781026187e5411431", + "idCreated": false, "idDeleted": false, "outputState": { - "address": "0xe0cf72b0f7b4a5cfed63514352a8082fa088c83e2a01efa8e9395230a3641d3c", - "digest": "zunK6i6YgFZ2QNKyPMGAnLQVsv8EB1oGoG4orrbuPZp", + "address": "0xc69f1954c6d13e3630075f462966e06d9f05fec29846d3d781026187e5411431", + "digest": "739cLjqpEeSvaT8Ta9qXAVV2bAFRXcmf9F6Zt3cCnXij", "asMoveObject": { "contents": { "type": { "repr": "0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0x0000000000000000000000000000000000000000000000000000000000000002::iota::IOTA>" }, "json": { - "id": "0xe0cf72b0f7b4a5cfed63514352a8082fa088c83e2a01efa8e9395230a3641d3c", + "id": "0xc69f1954c6d13e3630075f462966e06d9f05fec29846d3d781026187e5411431", "balance": { - "value": "2000" + "value": "299999982120400" } } } @@ -841,8 +841,8 @@ Response: { }, "gasSummary": { "computationCost": "1000000", - "storageCost": "3328800", - "storageRebate": "988000", + "storageCost": "3306000", + "storageRebate": "980400", "nonRefundableStorageFee": "0" } }, @@ -854,7 +854,7 @@ Response: { "sequenceNumber": 3 }, "transactionBlock": { - "digest": "HspCTE5Co5uBXcdincQ6jEwBQY1giMQYGLjy1boHeGNs" + "digest": "FiPjt6NaBmwTXNSQJDPvTEfwoWJQ1tfpe8P87ajeKfn4" } }, "expiration": null @@ -881,12 +881,12 @@ Response: { "transactionBlocks": { "nodes": [ { - "digest": "6sfdCNCQ8ub3Y9oZGGStjMH1uCmvSXUEiGzoBqH421dG", + "digest": "65qUXtK1a5gysqwhVKmxj5VQd3YndguWE1q9V7dZyVez", "sender": { "address": "0x8cca4e1ce0ba5904cea61df9242da2f7d29e3ef328fb7ec07c086b3bf47ca61a" }, "signatures": [ - "AG6a6dB7HvUZ7noeZWRonauEF6lDeTc596CAc5/rZSwkXPbFIwcZG3n3s5apce38odI03XO7XeECE9IQbK9Ngwx/UUY663bYjcm3XmNyULIgxJz1t5Z9vxfB+fp8WUoJKA==" + "ANpvkSQpMbmKm+dKBWFWsUa1GUaKYomXv9GXi3cfVe4ek3G9xb0AzX27HMyl7Odsbw+wyYuW30RoRH0tmBjXwQl/UUY663bYjcm3XmNyULIgxJz1t5Z9vxfB+fp8WUoJKA==" ], "gasInput": { "gasSponsor": { @@ -942,7 +942,7 @@ Response: { "dependencies": { "nodes": [ { - "digest": "HspCTE5Co5uBXcdincQ6jEwBQY1giMQYGLjy1boHeGNs" + "digest": "FiPjt6NaBmwTXNSQJDPvTEfwoWJQ1tfpe8P87ajeKfn4" } ] }, @@ -967,7 +967,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0xc69f1954c6d13e3630075f462966e06d9f05fec29846d3d781026187e5411431", - "digest": "2bRQUkHdUVNbyTfXJUcTkKgcZ4v6XhYXfvkQPnELWtQa" + "digest": "EXucdLBcKqADNerCwsbSi5PjvyFRjYn4wLB5Binbc4jZ" } } ] @@ -978,8 +978,8 @@ Response: { }, "gasSummary": { "computationCost": "1000000", - "storageCost": "988000", - "storageRebate": "988000", + "storageCost": "980400", + "storageRebate": "980400", "nonRefundableStorageFee": "0" } }, @@ -991,7 +991,7 @@ Response: { "sequenceNumber": 4 }, "transactionBlock": { - "digest": "6sfdCNCQ8ub3Y9oZGGStjMH1uCmvSXUEiGzoBqH421dG" + "digest": "65qUXtK1a5gysqwhVKmxj5VQd3YndguWE1q9V7dZyVez" } }, "expiration": null diff --git a/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/alternating.exp b/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/alternating.exp index 1012fcbc6b0..157691e81c5 100644 --- a/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/alternating.exp +++ b/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/alternating.exp @@ -7,7 +7,7 @@ task 1, lines 9-30: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5798800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5791200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 32: //# create-checkpoint @@ -17,31 +17,31 @@ task 3, line 34: //# run Test::M1::create --args 0 @A --sender A created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 4, line 36: //# run Test::M1::create --args 1 @B --sender B created: object(4,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 5, line 38: //# run Test::M1::create --args 2 @A --sender A created: object(5,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, line 40: //# run Test::M1::create --args 3 @B --sender B created: object(6,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, line 42: //# run Test::M1::create --args 4 @A --sender A created: object(7,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, line 44: //# create-checkpoint @@ -51,31 +51,31 @@ task 9, line 46: //# run Test::M1::create --args 100 @B --sender B created: object(9,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 10, line 48: //# run Test::M1::create --args 101 @A --sender A created: object(10,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 11, line 50: //# run Test::M1::create --args 102 @B --sender B created: object(11,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 12, line 52: //# run Test::M1::create --args 103 @A --sender A created: object(12,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 13, line 54: //# run Test::M1::create --args 104 @B --sender B created: object(13,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 14, line 56: //# create-checkpoint @@ -96,7 +96,7 @@ Response: { { "cursor": "eyJjIjozLCJ0IjoyLCJpIjpmYWxzZX0", "node": { - "digest": "8cpGKSTWaeL8reosZMhS5id4QZCrvXSgUpgiRMPNjxC3", + "digest": "EnWpFFgRUBm3LbuTfjJ6oF3RXVcnzpth6L9nn4Q18RNk", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -124,7 +124,7 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo0LCJpIjpmYWxzZX0", "node": { - "digest": "5qZ1vACpwiYmHNW7N53GsALNYXjwsTDHffLiiTWef6Be", + "digest": "613degbde4DuvwwAZcQngGJzZkZ6GZJ9g8CwygpA1s1a", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -135,7 +135,7 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo2LCJpIjpmYWxzZX0", "node": { - "digest": "CHV4FyUtTkwoEQAFDBdGvWp7yVLvkeLY1x6uExfaJw2n", + "digest": "AYmLYSfPbk4sVdBLcV76UmZgPTETP7XsVCaNKHTJ5qzs", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -163,7 +163,7 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo0LCJpIjpmYWxzZX0", "node": { - "digest": "5qZ1vACpwiYmHNW7N53GsALNYXjwsTDHffLiiTWef6Be", + "digest": "613degbde4DuvwwAZcQngGJzZkZ6GZJ9g8CwygpA1s1a", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -191,7 +191,7 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo4LCJpIjpmYWxzZX0", "node": { - "digest": "7iyfoh3MRgZTaHufEhoLsvpzAqm1MVcf7GoENqSeoyVk", + "digest": "4kA8BHJRwCdE8BjFTpTfSGt9nvoii37twZRM91uxMuvi", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -219,7 +219,7 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo2LCJpIjpmYWxzZX0", "node": { - "digest": "CHV4FyUtTkwoEQAFDBdGvWp7yVLvkeLY1x6uExfaJw2n", + "digest": "AYmLYSfPbk4sVdBLcV76UmZgPTETP7XsVCaNKHTJ5qzs", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -230,7 +230,7 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo4LCJpIjpmYWxzZX0", "node": { - "digest": "7iyfoh3MRgZTaHufEhoLsvpzAqm1MVcf7GoENqSeoyVk", + "digest": "4kA8BHJRwCdE8BjFTpTfSGt9nvoii37twZRM91uxMuvi", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -258,7 +258,7 @@ Response: { { "cursor": "eyJjIjozLCJ0IjoxMCwiaSI6ZmFsc2V9", "node": { - "digest": "D8QqFoKJBSNuM7pg11YtHMfwuyaYCFkysDM9vDdtABQP", + "digest": "Dqi2D27TQ531EiXzEonQGrANt8kJh9w5JZ6SMtmRpm9b", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -286,7 +286,7 @@ Response: { { "cursor": "eyJjIjozLCJ0IjoxMCwiaSI6ZmFsc2V9", "node": { - "digest": "D8QqFoKJBSNuM7pg11YtHMfwuyaYCFkysDM9vDdtABQP", + "digest": "Dqi2D27TQ531EiXzEonQGrANt8kJh9w5JZ6SMtmRpm9b", "effects": { "checkpoint": { "sequenceNumber": 3 diff --git a/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/both_cursors.exp b/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/both_cursors.exp index 711a1244140..00684e0720f 100644 --- a/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/both_cursors.exp +++ b/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/both_cursors.exp @@ -7,7 +7,7 @@ task 1, lines 10-31: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5798800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5791200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 33: //# create-checkpoint @@ -17,31 +17,31 @@ task 3, line 35: //# run Test::M1::create --args 0 @B --sender A created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 4, line 37: //# run Test::M1::create --args 1 @A --sender A created: object(4,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 39: //# run Test::M1::create --args 2 @B --sender A created: object(5,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, line 41: //# run Test::M1::create --args 3 @A --sender A created: object(6,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, line 43: //# run Test::M1::create --args 4 @B --sender A created: object(7,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, line 45: //# create-checkpoint @@ -51,31 +51,31 @@ task 9, line 47: //# run Test::M1::create --args 100 @A --sender A created: object(9,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 10, line 49: //# run Test::M1::create --args 101 @A --sender A created: object(10,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 11, line 51: //# run Test::M1::create --args 102 @A --sender A created: object(11,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 12, line 53: //# run Test::M1::create --args 103 @B --sender A created: object(12,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 13, line 55: //# run Test::M1::create --args 104 @B --sender A created: object(13,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 14, line 57: //# create-checkpoint @@ -96,7 +96,7 @@ Response: { { "cursor": "eyJjIjo0LCJ0Ijo0LCJpIjpmYWxzZX0", "node": { - "digest": "BXT54PdMqXqVD9dX8Theh5qaF4xfGPGaNmcpicfnSrJv", + "digest": "CQYnSfH6y3QuQjbzBYRDRYPr8sNMYp34tLf2NES2SdGm", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -124,7 +124,7 @@ Response: { { "cursor": "eyJjIjo0LCJ0Ijo0LCJpIjpmYWxzZX0", "node": { - "digest": "BXT54PdMqXqVD9dX8Theh5qaF4xfGPGaNmcpicfnSrJv", + "digest": "CQYnSfH6y3QuQjbzBYRDRYPr8sNMYp34tLf2NES2SdGm", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -135,7 +135,7 @@ Response: { { "cursor": "eyJjIjo0LCJ0Ijo2LCJpIjpmYWxzZX0", "node": { - "digest": "9SuLzZ4KjmPmEGSH2yxda1bN4Uc1MLkfXENGr4x4r8kg", + "digest": "7jDvB5qNfUzvhzSer2KBHYwYvuXwfRemZ6TjpUZvcEjA", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -163,7 +163,7 @@ Response: { { "cursor": "eyJjIjo0LCJ0Ijo1LCJpIjpmYWxzZX0", "node": { - "digest": "4fPz4jRWsoSWZhL3tkdkuW2qKeSWVgtkffCW1EaNsT3B", + "digest": "6hvDK848GxrWavhtQx6613ALsYctTEayGjqJw6z1qDvJ", "effects": { "checkpoint": { "sequenceNumber": 2 diff --git a/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/equal/first.exp b/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/equal/first.exp index d0592ebd8b6..4f313117c03 100644 --- a/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/equal/first.exp +++ b/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/equal/first.exp @@ -7,7 +7,7 @@ task 1, lines 10-31: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5798800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5791200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 33: //# create-checkpoint @@ -17,31 +17,31 @@ task 3, line 35: //# run Test::M1::create --args 0 @B --sender A created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 4, line 37: //# run Test::M1::create --args 1 @A --sender A created: object(4,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 39: //# run Test::M1::create --args 2 @B --sender A created: object(5,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, line 41: //# run Test::M1::create --args 3 @A --sender A created: object(6,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, line 43: //# run Test::M1::create --args 4 @B --sender A created: object(7,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, line 45: //# create-checkpoint @@ -51,31 +51,31 @@ task 9, line 47: //# run Test::M1::create --args 100 @A --sender A created: object(9,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 10, line 49: //# run Test::M1::create --args 101 @A --sender A created: object(10,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 11, line 51: //# run Test::M1::create --args 102 @A --sender A created: object(11,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 12, line 53: //# run Test::M1::create --args 103 @B --sender A created: object(12,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 13, line 55: //# run Test::M1::create --args 104 @B --sender A created: object(13,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 14, line 57: //# create-checkpoint @@ -96,7 +96,7 @@ Response: { { "cursor": "eyJjIjozLCJ0IjoyLCJpIjpmYWxzZX0", "node": { - "digest": "57AHRnaYzfkSHWFvDUGLRzwYCAuPYEqW1qRiraXM1ojX", + "digest": "ABweY1pDPKFhZX77kk48ofYU9KpAvXHBZUYyPK8JZf8p", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -107,7 +107,7 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo0LCJpIjpmYWxzZX0", "node": { - "digest": "BXT54PdMqXqVD9dX8Theh5qaF4xfGPGaNmcpicfnSrJv", + "digest": "CQYnSfH6y3QuQjbzBYRDRYPr8sNMYp34tLf2NES2SdGm", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -118,7 +118,7 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo2LCJpIjpmYWxzZX0", "node": { - "digest": "9SuLzZ4KjmPmEGSH2yxda1bN4Uc1MLkfXENGr4x4r8kg", + "digest": "7jDvB5qNfUzvhzSer2KBHYwYvuXwfRemZ6TjpUZvcEjA", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -129,7 +129,7 @@ Response: { { "cursor": "eyJjIjozLCJ0IjoxMCwiaSI6ZmFsc2V9", "node": { - "digest": "7t5vBT9SQ9huJhs1naw3wYm6F5XGWgUfw7UmGMUmybU7", + "digest": "66KKZQ7bxz9uM5Jhc651Txh57S4s9xJMDJs6dmBkeDUz", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -140,7 +140,7 @@ Response: { { "cursor": "eyJjIjozLCJ0IjoxMSwiaSI6ZmFsc2V9", "node": { - "digest": "EaX6VYsBJhzHKfa8FrnQdJEZLcjs398YJH9YP7JvhdiJ", + "digest": "78g29WY1ZjXGJmRjGWQNKnowtmDvftTDsQd9HbpUBn7g", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -168,7 +168,7 @@ Response: { { "cursor": "eyJjIjozLCJ0IjoyLCJpIjpmYWxzZX0", "node": { - "digest": "57AHRnaYzfkSHWFvDUGLRzwYCAuPYEqW1qRiraXM1ojX", + "digest": "ABweY1pDPKFhZX77kk48ofYU9KpAvXHBZUYyPK8JZf8p", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -196,7 +196,7 @@ Response: { { "cursor": "eyJjIjo0LCJ0Ijo0LCJpIjpmYWxzZX0", "node": { - "digest": "BXT54PdMqXqVD9dX8Theh5qaF4xfGPGaNmcpicfnSrJv", + "digest": "CQYnSfH6y3QuQjbzBYRDRYPr8sNMYp34tLf2NES2SdGm", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -224,7 +224,7 @@ Response: { { "cursor": "eyJjIjo0LCJ0Ijo2LCJpIjpmYWxzZX0", "node": { - "digest": "9SuLzZ4KjmPmEGSH2yxda1bN4Uc1MLkfXENGr4x4r8kg", + "digest": "7jDvB5qNfUzvhzSer2KBHYwYvuXwfRemZ6TjpUZvcEjA", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -268,7 +268,7 @@ Response: { { "cursor": "eyJjIjo0LCJ0IjoxMCwiaSI6ZmFsc2V9", "node": { - "digest": "7t5vBT9SQ9huJhs1naw3wYm6F5XGWgUfw7UmGMUmybU7", + "digest": "66KKZQ7bxz9uM5Jhc651Txh57S4s9xJMDJs6dmBkeDUz", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -279,7 +279,7 @@ Response: { { "cursor": "eyJjIjo0LCJ0IjoxMSwiaSI6ZmFsc2V9", "node": { - "digest": "EaX6VYsBJhzHKfa8FrnQdJEZLcjs398YJH9YP7JvhdiJ", + "digest": "78g29WY1ZjXGJmRjGWQNKnowtmDvftTDsQd9HbpUBn7g", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -296,7 +296,7 @@ task 21, line 223: //# run Test::M1::create --args 105 @A --sender A created: object(21,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 22, line 225: //# create-checkpoint @@ -333,7 +333,7 @@ Response: { { "cursor": "eyJjIjo0LCJ0IjoxMCwiaSI6ZmFsc2V9", "node": { - "digest": "7t5vBT9SQ9huJhs1naw3wYm6F5XGWgUfw7UmGMUmybU7", + "digest": "66KKZQ7bxz9uM5Jhc651Txh57S4s9xJMDJs6dmBkeDUz", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -344,7 +344,7 @@ Response: { { "cursor": "eyJjIjo0LCJ0IjoxMSwiaSI6ZmFsc2V9", "node": { - "digest": "EaX6VYsBJhzHKfa8FrnQdJEZLcjs398YJH9YP7JvhdiJ", + "digest": "78g29WY1ZjXGJmRjGWQNKnowtmDvftTDsQd9HbpUBn7g", "effects": { "checkpoint": { "sequenceNumber": 3 diff --git a/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/equal/last.exp b/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/equal/last.exp index fd5a84283ed..f70d192b281 100644 --- a/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/equal/last.exp +++ b/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/equal/last.exp @@ -7,7 +7,7 @@ task 1, lines 9-30: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5798800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5791200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 32: //# create-checkpoint @@ -17,31 +17,31 @@ task 3, line 34: //# run Test::M1::create --args 0 @B --sender A created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 4, line 36: //# run Test::M1::create --args 1 @B --sender A created: object(4,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 38: //# run Test::M1::create --args 2 @A --sender A created: object(5,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, line 40: //# run Test::M1::create --args 3 @A --sender A created: object(6,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, line 42: //# run Test::M1::create --args 4 @A --sender A created: object(7,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, line 44: //# create-checkpoint @@ -51,31 +51,31 @@ task 9, line 46: //# run Test::M1::create --args 100 @B --sender A created: object(9,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 10, line 48: //# run Test::M1::create --args 101 @A --sender A created: object(10,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 11, line 50: //# run Test::M1::create --args 102 @B --sender A created: object(11,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 12, line 52: //# run Test::M1::create --args 103 @A --sender A created: object(12,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 13, line 54: //# run Test::M1::create --args 104 @B --sender A created: object(13,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 14, line 56: //# create-checkpoint @@ -96,7 +96,7 @@ Response: { { "cursor": "eyJjIjozLCJ0IjoyLCJpIjpmYWxzZX0", "node": { - "digest": "57AHRnaYzfkSHWFvDUGLRzwYCAuPYEqW1qRiraXM1ojX", + "digest": "ABweY1pDPKFhZX77kk48ofYU9KpAvXHBZUYyPK8JZf8p", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -107,7 +107,7 @@ Response: { { "cursor": "eyJjIjozLCJ0IjozLCJpIjpmYWxzZX0", "node": { - "digest": "F2aqQMFU4LQb2geYPrBFPx7BpCs2n6Fco6jmVUaeeR79", + "digest": "8v4rn79YoSv3Drbkqbz8ttsX7EJDPEoDNbvLXpZnNXvE", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -118,7 +118,7 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo3LCJpIjpmYWxzZX0", "node": { - "digest": "H4SDVW7xfJZE4jDyPif6eTB7eqXrfHMMyiky6vVL7HUA", + "digest": "6ZXmX1p1yNyfqE4fhJKqQAjv1CFfM6qJoF5MwAFc578k", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -129,7 +129,7 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo5LCJpIjpmYWxzZX0", "node": { - "digest": "3KnZHraPVgdxPD4TRwcJWQmNt2kTgt2Rc1PJN57kHqer", + "digest": "EWYMoiDshwh4KMAXKQPcHUxfCHMx5zvsJ249L36moUWD", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -140,7 +140,7 @@ Response: { { "cursor": "eyJjIjozLCJ0IjoxMSwiaSI6ZmFsc2V9", "node": { - "digest": "3nrJaF4X7wBpFhh7Ga6gqt5FE7Bq8u5FSNfRhuDLrQop", + "digest": "BcK8vqpPuVeCkSM5LAEanttduQNAyhiK6psakqN8dyYY", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -168,7 +168,7 @@ Response: { { "cursor": "eyJjIjozLCJ0IjoxMSwiaSI6ZmFsc2V9", "node": { - "digest": "3nrJaF4X7wBpFhh7Ga6gqt5FE7Bq8u5FSNfRhuDLrQop", + "digest": "BcK8vqpPuVeCkSM5LAEanttduQNAyhiK6psakqN8dyYY", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -196,7 +196,7 @@ Response: { { "cursor": "eyJjIjo0LCJ0Ijo5LCJpIjpmYWxzZX0", "node": { - "digest": "3KnZHraPVgdxPD4TRwcJWQmNt2kTgt2Rc1PJN57kHqer", + "digest": "EWYMoiDshwh4KMAXKQPcHUxfCHMx5zvsJ249L36moUWD", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -224,7 +224,7 @@ Response: { { "cursor": "eyJjIjo0LCJ0Ijo3LCJpIjpmYWxzZX0", "node": { - "digest": "H4SDVW7xfJZE4jDyPif6eTB7eqXrfHMMyiky6vVL7HUA", + "digest": "6ZXmX1p1yNyfqE4fhJKqQAjv1CFfM6qJoF5MwAFc578k", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -268,7 +268,7 @@ Response: { { "cursor": "eyJjIjo0LCJ0IjoyLCJpIjpmYWxzZX0", "node": { - "digest": "57AHRnaYzfkSHWFvDUGLRzwYCAuPYEqW1qRiraXM1ojX", + "digest": "ABweY1pDPKFhZX77kk48ofYU9KpAvXHBZUYyPK8JZf8p", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -279,7 +279,7 @@ Response: { { "cursor": "eyJjIjo0LCJ0IjozLCJpIjpmYWxzZX0", "node": { - "digest": "F2aqQMFU4LQb2geYPrBFPx7BpCs2n6Fco6jmVUaeeR79", + "digest": "8v4rn79YoSv3Drbkqbz8ttsX7EJDPEoDNbvLXpZnNXvE", "effects": { "checkpoint": { "sequenceNumber": 2 diff --git a/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/ge_page/first.exp b/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/ge_page/first.exp index 5ce51667c15..ef865977112 100644 --- a/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/ge_page/first.exp +++ b/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/ge_page/first.exp @@ -7,7 +7,7 @@ task 1, lines 7-28: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5798800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5791200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 30: //# create-checkpoint @@ -17,31 +17,31 @@ task 3, line 32: //# run Test::M1::create --args 0 @A --sender A created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 4, line 34: //# run Test::M1::create --args 1 @A --sender A created: object(4,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 36: //# run Test::M1::create --args 2 @B --sender B created: object(5,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 6, line 38: //# run Test::M1::create --args 3 @B --sender B created: object(6,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, line 40: //# run Test::M1::create --args 4 @B --sender B created: object(7,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, line 42: //# create-checkpoint @@ -51,31 +51,31 @@ task 9, line 44: //# run Test::M1::create --args 100 @B --sender B created: object(9,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 10, line 46: //# run Test::M1::create --args 101 @B --sender B created: object(10,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 11, line 48: //# run Test::M1::create --args 102 @B --sender B created: object(11,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 12, line 50: //# run Test::M1::create --args 103 @B --sender B created: object(12,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 13, line 52: //# run Test::M1::create --args 104 @B --sender B created: object(13,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 14, line 54: //# create-checkpoint @@ -85,31 +85,31 @@ task 15, line 56: //# run Test::M1::create --args 100 @B --sender B created: object(15,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 16, line 58: //# run Test::M1::create --args 101 @B --sender B created: object(16,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 17, line 60: //# run Test::M1::create --args 102 @B --sender B created: object(17,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 18, line 62: //# run Test::M1::create --args 103 @B --sender B created: object(18,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 19, line 64: //# run Test::M1::create --args 104 @B --sender B created: object(19,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 20, line 66: //# create-checkpoint @@ -119,31 +119,31 @@ task 21, line 68: //# run Test::M1::create --args 200 @A --sender A created: object(21,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 22, line 70: //# run Test::M1::create --args 201 @B --sender A created: object(22,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 23, line 72: //# run Test::M1::create --args 202 @B --sender B created: object(23,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 24, line 74: //# run Test::M1::create --args 203 @B --sender B created: object(24,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 25, line 76: //# run Test::M1::create --args 204 @A --sender A created: object(25,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 26, line 78: //# create-checkpoint @@ -164,7 +164,7 @@ Response: { { "cursor": "eyJjIjo1LCJ0IjoyLCJpIjpmYWxzZX0", "node": { - "digest": "8cpGKSTWaeL8reosZMhS5id4QZCrvXSgUpgiRMPNjxC3", + "digest": "EnWpFFgRUBm3LbuTfjJ6oF3RXVcnzpth6L9nn4Q18RNk", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -175,7 +175,7 @@ Response: { { "cursor": "eyJjIjo1LCJ0IjozLCJpIjpmYWxzZX0", "node": { - "digest": "FFGzqxZFuV4ydaJjKHfkjuiiPKdRXu3hVeEQvhVKboHW", + "digest": "3fmkhmMgShCMM9HWgLR13ovdiBTy2Zoe6MgVfy8Wi8nt", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -186,7 +186,7 @@ Response: { { "cursor": "eyJjIjo1LCJ0IjoxNywiaSI6ZmFsc2V9", "node": { - "digest": "Cipdc7dC4aE4HoRTzMgVTBWdPeM8mF1wJyX55WzPQb1G", + "digest": "8NagxHteFzUuAvwvzjFAorD1dNfqfKnqwwviDaAt8j1z", "effects": { "checkpoint": { "sequenceNumber": 5 @@ -197,7 +197,7 @@ Response: { { "cursor": "eyJjIjo1LCJ0IjoxOCwiaSI6ZmFsc2V9", "node": { - "digest": "D4xVWGvfbiuofY7A15zpXmC3FqHeo1C5GWuRVeXw2Qds", + "digest": "Ep8Q9KBacxFkYEvaxsm7CJAUqQ85WUi5z6oZudBEyFSP", "effects": { "checkpoint": { "sequenceNumber": 5 @@ -208,7 +208,7 @@ Response: { { "cursor": "eyJjIjo1LCJ0IjoyMSwiaSI6ZmFsc2V9", "node": { - "digest": "DKETSCpkRmjKaoU6ckThV9sdk7BjC7bRZeF3gaj8xW6N", + "digest": "636Q9XJw6aZQ4RGEnej49Z99Nn21GgPBQDmCGGhNQ2Rm", "effects": { "checkpoint": { "sequenceNumber": 5 @@ -236,7 +236,7 @@ Response: { { "cursor": "eyJjIjo1LCJ0IjoyLCJpIjpmYWxzZX0", "node": { - "digest": "8cpGKSTWaeL8reosZMhS5id4QZCrvXSgUpgiRMPNjxC3", + "digest": "EnWpFFgRUBm3LbuTfjJ6oF3RXVcnzpth6L9nn4Q18RNk", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -264,7 +264,7 @@ Response: { { "cursor": "eyJjIjo3LCJ0IjozLCJpIjpmYWxzZX0", "node": { - "digest": "FFGzqxZFuV4ydaJjKHfkjuiiPKdRXu3hVeEQvhVKboHW", + "digest": "3fmkhmMgShCMM9HWgLR13ovdiBTy2Zoe6MgVfy8Wi8nt", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -308,7 +308,7 @@ Response: { { "cursor": "eyJjIjo3LCJ0IjoxNywiaSI6ZmFsc2V9", "node": { - "digest": "Cipdc7dC4aE4HoRTzMgVTBWdPeM8mF1wJyX55WzPQb1G", + "digest": "8NagxHteFzUuAvwvzjFAorD1dNfqfKnqwwviDaAt8j1z", "effects": { "checkpoint": { "sequenceNumber": 5 @@ -336,7 +336,7 @@ Response: { { "cursor": "eyJjIjo3LCJ0IjoxOCwiaSI6ZmFsc2V9", "node": { - "digest": "D4xVWGvfbiuofY7A15zpXmC3FqHeo1C5GWuRVeXw2Qds", + "digest": "Ep8Q9KBacxFkYEvaxsm7CJAUqQ85WUi5z6oZudBEyFSP", "effects": { "checkpoint": { "sequenceNumber": 5 @@ -364,7 +364,7 @@ Response: { { "cursor": "eyJjIjo3LCJ0IjoyMSwiaSI6ZmFsc2V9", "node": { - "digest": "DKETSCpkRmjKaoU6ckThV9sdk7BjC7bRZeF3gaj8xW6N", + "digest": "636Q9XJw6aZQ4RGEnej49Z99Nn21GgPBQDmCGGhNQ2Rm", "effects": { "checkpoint": { "sequenceNumber": 5 diff --git a/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/ge_page/last.exp b/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/ge_page/last.exp index 7e5df3804eb..237670042df 100644 --- a/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/ge_page/last.exp +++ b/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/ge_page/last.exp @@ -7,7 +7,7 @@ task 1, lines 7-28: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5798800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5791200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 30: //# create-checkpoint @@ -17,31 +17,31 @@ task 3, line 32: //# run Test::M1::create --args 0 @A --sender A created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 4, line 34: //# run Test::M1::create --args 1 @A --sender A created: object(4,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 36: //# run Test::M1::create --args 2 @B --sender B created: object(5,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 6, line 38: //# run Test::M1::create --args 3 @B --sender B created: object(6,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, line 40: //# run Test::M1::create --args 4 @B --sender B created: object(7,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, line 42: //# create-checkpoint @@ -51,31 +51,31 @@ task 9, line 44: //# run Test::M1::create --args 100 @B --sender B created: object(9,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 10, line 46: //# run Test::M1::create --args 101 @B --sender B created: object(10,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 11, line 48: //# run Test::M1::create --args 102 @B --sender B created: object(11,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 12, line 50: //# run Test::M1::create --args 103 @B --sender B created: object(12,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 13, line 52: //# run Test::M1::create --args 104 @B --sender B created: object(13,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 14, line 54: //# create-checkpoint @@ -85,31 +85,31 @@ task 15, line 56: //# run Test::M1::create --args 100 @B --sender B created: object(15,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 16, line 58: //# run Test::M1::create --args 101 @B --sender B created: object(16,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 17, line 60: //# run Test::M1::create --args 102 @B --sender B created: object(17,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 18, line 62: //# run Test::M1::create --args 103 @B --sender B created: object(18,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 19, line 64: //# run Test::M1::create --args 104 @B --sender B created: object(19,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 20, line 66: //# create-checkpoint @@ -119,31 +119,31 @@ task 21, line 68: //# run Test::M1::create --args 200 @A --sender A created: object(21,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 22, line 70: //# run Test::M1::create --args 201 @B --sender B created: object(22,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 23, line 72: //# run Test::M1::create --args 202 @B --sender B created: object(23,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 24, line 74: //# run Test::M1::create --args 203 @B --sender B created: object(24,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 25, line 76: //# run Test::M1::create --args 204 @A --sender A created: object(25,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 26, line 78: //# create-checkpoint @@ -164,7 +164,7 @@ Response: { { "cursor": "eyJjIjo1LCJ0IjoyLCJpIjpmYWxzZX0", "node": { - "digest": "8cpGKSTWaeL8reosZMhS5id4QZCrvXSgUpgiRMPNjxC3", + "digest": "EnWpFFgRUBm3LbuTfjJ6oF3RXVcnzpth6L9nn4Q18RNk", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -175,7 +175,7 @@ Response: { { "cursor": "eyJjIjo1LCJ0IjozLCJpIjpmYWxzZX0", "node": { - "digest": "FFGzqxZFuV4ydaJjKHfkjuiiPKdRXu3hVeEQvhVKboHW", + "digest": "3fmkhmMgShCMM9HWgLR13ovdiBTy2Zoe6MgVfy8Wi8nt", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -186,7 +186,7 @@ Response: { { "cursor": "eyJjIjo1LCJ0IjoxNywiaSI6ZmFsc2V9", "node": { - "digest": "Cipdc7dC4aE4HoRTzMgVTBWdPeM8mF1wJyX55WzPQb1G", + "digest": "8NagxHteFzUuAvwvzjFAorD1dNfqfKnqwwviDaAt8j1z", "effects": { "checkpoint": { "sequenceNumber": 5 @@ -197,7 +197,7 @@ Response: { { "cursor": "eyJjIjo1LCJ0IjoyMSwiaSI6ZmFsc2V9", "node": { - "digest": "4F7HvMEkm1GpScHmGmvTR9tcE3kY5yZmmmA37NPKdmJa", + "digest": "9xCVVc6YyR55DpQifNUbt7ixYuficCkWkSreszCdHL1g", "effects": { "checkpoint": { "sequenceNumber": 5 @@ -225,7 +225,7 @@ Response: { { "cursor": "eyJjIjo1LCJ0IjoyMSwiaSI6ZmFsc2V9", "node": { - "digest": "4F7HvMEkm1GpScHmGmvTR9tcE3kY5yZmmmA37NPKdmJa", + "digest": "9xCVVc6YyR55DpQifNUbt7ixYuficCkWkSreszCdHL1g", "effects": { "checkpoint": { "sequenceNumber": 5 @@ -253,7 +253,7 @@ Response: { { "cursor": "eyJjIjo3LCJ0IjoxNywiaSI6ZmFsc2V9", "node": { - "digest": "Cipdc7dC4aE4HoRTzMgVTBWdPeM8mF1wJyX55WzPQb1G", + "digest": "8NagxHteFzUuAvwvzjFAorD1dNfqfKnqwwviDaAt8j1z", "effects": { "checkpoint": { "sequenceNumber": 5 @@ -313,7 +313,7 @@ Response: { { "cursor": "eyJjIjo3LCJ0IjozLCJpIjpmYWxzZX0", "node": { - "digest": "FFGzqxZFuV4ydaJjKHfkjuiiPKdRXu3hVeEQvhVKboHW", + "digest": "3fmkhmMgShCMM9HWgLR13ovdiBTy2Zoe6MgVfy8Wi8nt", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -341,7 +341,7 @@ Response: { { "cursor": "eyJjIjo3LCJ0IjoyLCJpIjpmYWxzZX0", "node": { - "digest": "8cpGKSTWaeL8reosZMhS5id4QZCrvXSgUpgiRMPNjxC3", + "digest": "EnWpFFgRUBm3LbuTfjJ6oF3RXVcnzpth6L9nn4Q18RNk", "effects": { "checkpoint": { "sequenceNumber": 2 diff --git a/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/invalid_limits.exp b/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/invalid_limits.exp index 8c5615c2715..86eb2be6ee7 100644 --- a/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/invalid_limits.exp +++ b/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/invalid_limits.exp @@ -7,7 +7,7 @@ task 1, lines 9-30: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5798800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5791200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 32: //# create-checkpoint @@ -17,31 +17,31 @@ task 3, line 34: //# run Test::M1::create --args 0 @B --sender A created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 4, line 36: //# run Test::M1::create --args 1 @A --sender A created: object(4,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 38: //# run Test::M1::create --args 2 @B --sender A created: object(5,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, line 40: //# run Test::M1::create --args 3 @A --sender A created: object(6,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, line 42: //# run Test::M1::create --args 4 @B --sender A created: object(7,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, line 44: //# create-checkpoint diff --git a/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/le_page/first.exp b/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/le_page/first.exp index b95c38aae6d..377000f6c75 100644 --- a/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/le_page/first.exp +++ b/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/le_page/first.exp @@ -7,7 +7,7 @@ task 1, lines 11-32: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5798800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5791200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 34: //# create-checkpoint @@ -17,31 +17,31 @@ task 3, line 36: //# run Test::M1::create --args 0 @A --sender A created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 4, line 38: //# run Test::M1::create --args 1 @B --sender B created: object(4,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 5, line 40: //# run Test::M1::create --args 2 @A --sender A created: object(5,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, line 42: //# run Test::M1::create --args 3 @B --sender B created: object(6,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, line 44: //# run Test::M1::create --args 4 @A --sender A created: object(7,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, line 46: //# create-checkpoint @@ -51,31 +51,31 @@ task 9, line 48: //# run Test::M1::create --args 100 @B --sender B created: object(9,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 10, line 50: //# run Test::M1::create --args 101 @A --sender A created: object(10,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 11, line 52: //# run Test::M1::create --args 102 @B --sender B created: object(11,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 12, line 54: //# run Test::M1::create --args 103 @A --sender A created: object(12,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 13, line 56: //# run Test::M1::create --args 104 @B --sender B created: object(13,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 14, line 58: //# create-checkpoint @@ -96,7 +96,7 @@ Response: { { "cursor": "eyJjIjozLCJ0IjoyLCJpIjpmYWxzZX0", "node": { - "digest": "8cpGKSTWaeL8reosZMhS5id4QZCrvXSgUpgiRMPNjxC3", + "digest": "EnWpFFgRUBm3LbuTfjJ6oF3RXVcnzpth6L9nn4Q18RNk", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -107,7 +107,7 @@ Response: { { "cursor": "eyJjIjozLCJ0IjozLCJpIjpmYWxzZX0", "node": { - "digest": "Gts5gc9mhL6eXcgSc2cQki5uSbbNtHDAhRT5zPp7UhUc", + "digest": "GA1cT6FjP8qBTMegHadnXpjq7kTkD4Fw68jDJPci9C9r", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -118,7 +118,7 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo0LCJpIjpmYWxzZX0", "node": { - "digest": "5qZ1vACpwiYmHNW7N53GsALNYXjwsTDHffLiiTWef6Be", + "digest": "613degbde4DuvwwAZcQngGJzZkZ6GZJ9g8CwygpA1s1a", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -129,7 +129,7 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo1LCJpIjpmYWxzZX0", "node": { - "digest": "kuf4SWydaHNfzu9F8Ag9niPFnizTHT8sJ4RZJMudCsg", + "digest": "GELgyKASGaZrZrgUw3C3TwaYjXwRme8StabM1zRrHDc7", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -140,7 +140,7 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo2LCJpIjpmYWxzZX0", "node": { - "digest": "CHV4FyUtTkwoEQAFDBdGvWp7yVLvkeLY1x6uExfaJw2n", + "digest": "AYmLYSfPbk4sVdBLcV76UmZgPTETP7XsVCaNKHTJ5qzs", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -151,7 +151,7 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo3LCJpIjpmYWxzZX0", "node": { - "digest": "9HYaydpBhdEs5tMoS9mG5qotEBWQRETvJkS1d11eqbT7", + "digest": "CkoEZRVMsPm3VJbX7gdwTrmfVMyHyNWDMk7tPKR6DdF2", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -162,7 +162,7 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo4LCJpIjpmYWxzZX0", "node": { - "digest": "7iyfoh3MRgZTaHufEhoLsvpzAqm1MVcf7GoENqSeoyVk", + "digest": "4kA8BHJRwCdE8BjFTpTfSGt9nvoii37twZRM91uxMuvi", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -173,7 +173,7 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo5LCJpIjpmYWxzZX0", "node": { - "digest": "F5ZQkXN659ZGTyqJ27yrbt4KPCVUbpQ5b6MTDybKrLK2", + "digest": "ALqmnvW1wprABKAdtX8Zz49UYtTYshzXUC1fvsWx2ik9", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -184,7 +184,7 @@ Response: { { "cursor": "eyJjIjozLCJ0IjoxMCwiaSI6ZmFsc2V9", "node": { - "digest": "D8QqFoKJBSNuM7pg11YtHMfwuyaYCFkysDM9vDdtABQP", + "digest": "Dqi2D27TQ531EiXzEonQGrANt8kJh9w5JZ6SMtmRpm9b", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -195,7 +195,7 @@ Response: { { "cursor": "eyJjIjozLCJ0IjoxMSwiaSI6ZmFsc2V9", "node": { - "digest": "6wxk85Fgq9mmYmcrAggdMci1VR4UCmW2ensqUvbHLyyp", + "digest": "3Hs1AweW2BsmMaeicbKyhJ2DetgX5Q13Ev1S97wfBfHK", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -223,7 +223,7 @@ Response: { { "cursor": "eyJjIjozLCJ0IjoyLCJpIjpmYWxzZX0", "node": { - "digest": "8cpGKSTWaeL8reosZMhS5id4QZCrvXSgUpgiRMPNjxC3", + "digest": "EnWpFFgRUBm3LbuTfjJ6oF3RXVcnzpth6L9nn4Q18RNk", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -251,7 +251,7 @@ Response: { { "cursor": "eyJjIjo0LCJ0Ijo0LCJpIjpmYWxzZX0", "node": { - "digest": "5qZ1vACpwiYmHNW7N53GsALNYXjwsTDHffLiiTWef6Be", + "digest": "613degbde4DuvwwAZcQngGJzZkZ6GZJ9g8CwygpA1s1a", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -279,7 +279,7 @@ Response: { { "cursor": "eyJjIjo0LCJ0Ijo2LCJpIjpmYWxzZX0", "node": { - "digest": "CHV4FyUtTkwoEQAFDBdGvWp7yVLvkeLY1x6uExfaJw2n", + "digest": "AYmLYSfPbk4sVdBLcV76UmZgPTETP7XsVCaNKHTJ5qzs", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -290,7 +290,7 @@ Response: { { "cursor": "eyJjIjo0LCJ0Ijo4LCJpIjpmYWxzZX0", "node": { - "digest": "7iyfoh3MRgZTaHufEhoLsvpzAqm1MVcf7GoENqSeoyVk", + "digest": "4kA8BHJRwCdE8BjFTpTfSGt9nvoii37twZRM91uxMuvi", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -318,7 +318,7 @@ Response: { { "cursor": "eyJjIjo0LCJ0IjoxMCwiaSI6ZmFsc2V9", "node": { - "digest": "D8QqFoKJBSNuM7pg11YtHMfwuyaYCFkysDM9vDdtABQP", + "digest": "Dqi2D27TQ531EiXzEonQGrANt8kJh9w5JZ6SMtmRpm9b", "effects": { "checkpoint": { "sequenceNumber": 3 diff --git a/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/le_page/last.exp b/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/le_page/last.exp index 4c319872112..3330dbf0293 100644 --- a/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/le_page/last.exp +++ b/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/le_page/last.exp @@ -7,7 +7,7 @@ task 1, lines 11-32: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5798800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5791200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 34: //# create-checkpoint @@ -17,31 +17,31 @@ task 3, line 36: //# run Test::M1::create --args 0 @A --sender A created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 4, line 38: //# run Test::M1::create --args 1 @B --sender B created: object(4,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 5, line 40: //# run Test::M1::create --args 2 @A --sender A created: object(5,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, line 42: //# run Test::M1::create --args 3 @B --sender B created: object(6,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, line 44: //# run Test::M1::create --args 4 @A --sender A created: object(7,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, line 46: //# create-checkpoint @@ -51,31 +51,31 @@ task 9, line 48: //# run Test::M1::create --args 100 @B --sender B created: object(9,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 10, line 50: //# run Test::M1::create --args 101 @A --sender A created: object(10,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 11, line 52: //# run Test::M1::create --args 102 @B --sender B created: object(11,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 12, line 54: //# run Test::M1::create --args 103 @A --sender A created: object(12,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 13, line 56: //# run Test::M1::create --args 104 @B --sender B created: object(13,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 14, line 58: //# create-checkpoint @@ -96,7 +96,7 @@ Response: { { "cursor": "eyJjIjozLCJ0IjoyLCJpIjpmYWxzZX0", "node": { - "digest": "8cpGKSTWaeL8reosZMhS5id4QZCrvXSgUpgiRMPNjxC3", + "digest": "EnWpFFgRUBm3LbuTfjJ6oF3RXVcnzpth6L9nn4Q18RNk", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -107,7 +107,7 @@ Response: { { "cursor": "eyJjIjozLCJ0IjozLCJpIjpmYWxzZX0", "node": { - "digest": "Gts5gc9mhL6eXcgSc2cQki5uSbbNtHDAhRT5zPp7UhUc", + "digest": "GA1cT6FjP8qBTMegHadnXpjq7kTkD4Fw68jDJPci9C9r", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -118,7 +118,7 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo0LCJpIjpmYWxzZX0", "node": { - "digest": "5qZ1vACpwiYmHNW7N53GsALNYXjwsTDHffLiiTWef6Be", + "digest": "613degbde4DuvwwAZcQngGJzZkZ6GZJ9g8CwygpA1s1a", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -129,7 +129,7 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo1LCJpIjpmYWxzZX0", "node": { - "digest": "kuf4SWydaHNfzu9F8Ag9niPFnizTHT8sJ4RZJMudCsg", + "digest": "GELgyKASGaZrZrgUw3C3TwaYjXwRme8StabM1zRrHDc7", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -140,7 +140,7 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo2LCJpIjpmYWxzZX0", "node": { - "digest": "CHV4FyUtTkwoEQAFDBdGvWp7yVLvkeLY1x6uExfaJw2n", + "digest": "AYmLYSfPbk4sVdBLcV76UmZgPTETP7XsVCaNKHTJ5qzs", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -151,7 +151,7 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo3LCJpIjpmYWxzZX0", "node": { - "digest": "9HYaydpBhdEs5tMoS9mG5qotEBWQRETvJkS1d11eqbT7", + "digest": "CkoEZRVMsPm3VJbX7gdwTrmfVMyHyNWDMk7tPKR6DdF2", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -162,7 +162,7 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo4LCJpIjpmYWxzZX0", "node": { - "digest": "7iyfoh3MRgZTaHufEhoLsvpzAqm1MVcf7GoENqSeoyVk", + "digest": "4kA8BHJRwCdE8BjFTpTfSGt9nvoii37twZRM91uxMuvi", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -173,7 +173,7 @@ Response: { { "cursor": "eyJjIjozLCJ0Ijo5LCJpIjpmYWxzZX0", "node": { - "digest": "F5ZQkXN659ZGTyqJ27yrbt4KPCVUbpQ5b6MTDybKrLK2", + "digest": "ALqmnvW1wprABKAdtX8Zz49UYtTYshzXUC1fvsWx2ik9", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -184,7 +184,7 @@ Response: { { "cursor": "eyJjIjozLCJ0IjoxMCwiaSI6ZmFsc2V9", "node": { - "digest": "D8QqFoKJBSNuM7pg11YtHMfwuyaYCFkysDM9vDdtABQP", + "digest": "Dqi2D27TQ531EiXzEonQGrANt8kJh9w5JZ6SMtmRpm9b", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -195,7 +195,7 @@ Response: { { "cursor": "eyJjIjozLCJ0IjoxMSwiaSI6ZmFsc2V9", "node": { - "digest": "6wxk85Fgq9mmYmcrAggdMci1VR4UCmW2ensqUvbHLyyp", + "digest": "3Hs1AweW2BsmMaeicbKyhJ2DetgX5Q13Ev1S97wfBfHK", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -223,7 +223,7 @@ Response: { { "cursor": "eyJjIjozLCJ0IjoxMCwiaSI6ZmFsc2V9", "node": { - "digest": "D8QqFoKJBSNuM7pg11YtHMfwuyaYCFkysDM9vDdtABQP", + "digest": "Dqi2D27TQ531EiXzEonQGrANt8kJh9w5JZ6SMtmRpm9b", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -251,7 +251,7 @@ Response: { { "cursor": "eyJjIjo0LCJ0Ijo4LCJpIjpmYWxzZX0", "node": { - "digest": "7iyfoh3MRgZTaHufEhoLsvpzAqm1MVcf7GoENqSeoyVk", + "digest": "4kA8BHJRwCdE8BjFTpTfSGt9nvoii37twZRM91uxMuvi", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -279,7 +279,7 @@ Response: { { "cursor": "eyJjIjo0LCJ0Ijo2LCJpIjpmYWxzZX0", "node": { - "digest": "CHV4FyUtTkwoEQAFDBdGvWp7yVLvkeLY1x6uExfaJw2n", + "digest": "AYmLYSfPbk4sVdBLcV76UmZgPTETP7XsVCaNKHTJ5qzs", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -307,7 +307,7 @@ Response: { { "cursor": "eyJjIjo0LCJ0Ijo0LCJpIjpmYWxzZX0", "node": { - "digest": "5qZ1vACpwiYmHNW7N53GsALNYXjwsTDHffLiiTWef6Be", + "digest": "613degbde4DuvwwAZcQngGJzZkZ6GZJ9g8CwygpA1s1a", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -335,7 +335,7 @@ Response: { { "cursor": "eyJjIjo0LCJ0IjoyLCJpIjpmYWxzZX0", "node": { - "digest": "8cpGKSTWaeL8reosZMhS5id4QZCrvXSgUpgiRMPNjxC3", + "digest": "EnWpFFgRUBm3LbuTfjJ6oF3RXVcnzpth6L9nn4Q18RNk", "effects": { "checkpoint": { "sequenceNumber": 2 diff --git a/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/require.exp b/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/require.exp index cb09e06f8e5..f3a557539a2 100644 --- a/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/require.exp +++ b/crates/iota-graphql-e2e-tests/tests/transactions/scan_limit/require.exp @@ -7,7 +7,7 @@ task 1, lines 7-28: //# publish created: object(1,0) mutated: object(0,2) -gas summary: computation_cost: 1000000, storage_cost: 5798800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5791200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 30: //# create-checkpoint @@ -17,31 +17,31 @@ task 3, line 32: //# run Test::M1::create --args 0 @B --sender A created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 0, non_refundable_storage_fee: 0 task 4, line 34: //# run Test::M1::create --args 1 @B --sender A created: object(4,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 36: //# run Test::M1::create --args 2 @B --sender A created: object(5,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, line 38: //# run Test::M1::create --args 3 @B --sender A created: object(6,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, line 40: //# run Test::M1::create --args 4 @B --sender A created: object(7,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, line 42: //# create-checkpoint @@ -51,31 +51,31 @@ task 9, line 44: //# run Test::M1::create --args 100 @B --sender A created: object(9,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 10, line 46: //# run Test::M1::create --args 101 @B --sender A created: object(10,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 11, line 48: //# run Test::M1::create --args 102 @B --sender A created: object(11,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 12, line 50: //# run Test::M1::create --args 103 @B --sender A created: object(12,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 13, line 52: //# run Test::M1::create --args 104 @B --sender A created: object(13,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 2302800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2287600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 14, line 54: //# create-checkpoint @@ -94,7 +94,7 @@ Response: { }, "nodes": [ { - "digest": "57AHRnaYzfkSHWFvDUGLRzwYCAuPYEqW1qRiraXM1ojX", + "digest": "ABweY1pDPKFhZX77kk48ofYU9KpAvXHBZUYyPK8JZf8p", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -102,7 +102,7 @@ Response: { } }, { - "digest": "F2aqQMFU4LQb2geYPrBFPx7BpCs2n6Fco6jmVUaeeR79", + "digest": "8v4rn79YoSv3Drbkqbz8ttsX7EJDPEoDNbvLXpZnNXvE", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -110,7 +110,7 @@ Response: { } }, { - "digest": "eQFpQNaXZuYztmab9sKuCvV7BE2P3s6pxWcAABaRRVb", + "digest": "DeaCABc78S9mn6vSdNcNpabxYuazUfc1gsb87KMKbcyk", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -118,7 +118,7 @@ Response: { } }, { - "digest": "4yREuZtBiN1wAjXnLba5N6BWCDuWNX1CaMh4QT7exaWB", + "digest": "6YBm7aNbGN3XrFBmateAnVZ1tCdi2sattswFEHJztyrB", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -126,7 +126,7 @@ Response: { } }, { - "digest": "2sQk7WeF1PuQkwpyMCs6wrGXNzKCgXGHAamzYWgarTbx", + "digest": "Gb2DhrKwqpXxHGt7q8XN5arTdGHf1fBKu8h8a86KYWR7", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -134,7 +134,7 @@ Response: { } }, { - "digest": "6gmeApTpV7wXajaCmbdGkqTaf4DwapRLvWbFeDuAgBnC", + "digest": "DigC9u79Qh7rJB9jkthYucTwZmrrnB9j9Ggf7r8wZZYZ", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -142,7 +142,7 @@ Response: { } }, { - "digest": "EBVoDkV5a3up4MzuKf2g671pYMBQBMKMBaKtDFEjuS3o", + "digest": "CMWP39HwdMdEhgHh54EonhUkmG3B5xTBdsxy493DfAxa", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -150,7 +150,7 @@ Response: { } }, { - "digest": "7TYZ4v2BBB4Mw7e9vJvD75FsERSzvvVtzvDuCjoG8qos", + "digest": "k7uqYEVDRKmcSV51NiyNASiTM6SnrFGSV4DmvWvPt2R", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -158,7 +158,7 @@ Response: { } }, { - "digest": "5Vthwaj7H5tdU7dGb42NbZeX7WC8be3sJqD4uMQeavsG", + "digest": "3FjYZKGUcbVYqHKSvzPuWJBTBtZHQMkVC6e23dPBLkxy", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -166,7 +166,7 @@ Response: { } }, { - "digest": "M9rn2G7nw97kmn5iyvjf3bptqJa98S8LQoJCmvp77x4", + "digest": "9c34rk4iWpmURFjPQNXCHCTFZXXwYwDXgBKn22q674jE", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -191,7 +191,7 @@ Response: { }, "nodes": [ { - "digest": "57AHRnaYzfkSHWFvDUGLRzwYCAuPYEqW1qRiraXM1ojX", + "digest": "ABweY1pDPKFhZX77kk48ofYU9KpAvXHBZUYyPK8JZf8p", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -199,7 +199,7 @@ Response: { } }, { - "digest": "F2aqQMFU4LQb2geYPrBFPx7BpCs2n6Fco6jmVUaeeR79", + "digest": "8v4rn79YoSv3Drbkqbz8ttsX7EJDPEoDNbvLXpZnNXvE", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -207,7 +207,7 @@ Response: { } }, { - "digest": "eQFpQNaXZuYztmab9sKuCvV7BE2P3s6pxWcAABaRRVb", + "digest": "DeaCABc78S9mn6vSdNcNpabxYuazUfc1gsb87KMKbcyk", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -215,7 +215,7 @@ Response: { } }, { - "digest": "4yREuZtBiN1wAjXnLba5N6BWCDuWNX1CaMh4QT7exaWB", + "digest": "6YBm7aNbGN3XrFBmateAnVZ1tCdi2sattswFEHJztyrB", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -223,7 +223,7 @@ Response: { } }, { - "digest": "2sQk7WeF1PuQkwpyMCs6wrGXNzKCgXGHAamzYWgarTbx", + "digest": "Gb2DhrKwqpXxHGt7q8XN5arTdGHf1fBKu8h8a86KYWR7", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -231,7 +231,7 @@ Response: { } }, { - "digest": "6gmeApTpV7wXajaCmbdGkqTaf4DwapRLvWbFeDuAgBnC", + "digest": "DigC9u79Qh7rJB9jkthYucTwZmrrnB9j9Ggf7r8wZZYZ", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -239,7 +239,7 @@ Response: { } }, { - "digest": "EBVoDkV5a3up4MzuKf2g671pYMBQBMKMBaKtDFEjuS3o", + "digest": "CMWP39HwdMdEhgHh54EonhUkmG3B5xTBdsxy493DfAxa", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -247,7 +247,7 @@ Response: { } }, { - "digest": "7TYZ4v2BBB4Mw7e9vJvD75FsERSzvvVtzvDuCjoG8qos", + "digest": "k7uqYEVDRKmcSV51NiyNASiTM6SnrFGSV4DmvWvPt2R", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -255,7 +255,7 @@ Response: { } }, { - "digest": "5Vthwaj7H5tdU7dGb42NbZeX7WC8be3sJqD4uMQeavsG", + "digest": "3FjYZKGUcbVYqHKSvzPuWJBTBtZHQMkVC6e23dPBLkxy", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -263,7 +263,7 @@ Response: { } }, { - "digest": "M9rn2G7nw97kmn5iyvjf3bptqJa98S8LQoJCmvp77x4", + "digest": "9c34rk4iWpmURFjPQNXCHCTFZXXwYwDXgBKn22q674jE", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -311,7 +311,7 @@ Response: { }, "nodes": [ { - "digest": "57AHRnaYzfkSHWFvDUGLRzwYCAuPYEqW1qRiraXM1ojX", + "digest": "ABweY1pDPKFhZX77kk48ofYU9KpAvXHBZUYyPK8JZf8p", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -319,7 +319,7 @@ Response: { } }, { - "digest": "F2aqQMFU4LQb2geYPrBFPx7BpCs2n6Fco6jmVUaeeR79", + "digest": "8v4rn79YoSv3Drbkqbz8ttsX7EJDPEoDNbvLXpZnNXvE", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -327,7 +327,7 @@ Response: { } }, { - "digest": "eQFpQNaXZuYztmab9sKuCvV7BE2P3s6pxWcAABaRRVb", + "digest": "DeaCABc78S9mn6vSdNcNpabxYuazUfc1gsb87KMKbcyk", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -335,7 +335,7 @@ Response: { } }, { - "digest": "4yREuZtBiN1wAjXnLba5N6BWCDuWNX1CaMh4QT7exaWB", + "digest": "6YBm7aNbGN3XrFBmateAnVZ1tCdi2sattswFEHJztyrB", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -343,7 +343,7 @@ Response: { } }, { - "digest": "2sQk7WeF1PuQkwpyMCs6wrGXNzKCgXGHAamzYWgarTbx", + "digest": "Gb2DhrKwqpXxHGt7q8XN5arTdGHf1fBKu8h8a86KYWR7", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -351,7 +351,7 @@ Response: { } }, { - "digest": "6gmeApTpV7wXajaCmbdGkqTaf4DwapRLvWbFeDuAgBnC", + "digest": "DigC9u79Qh7rJB9jkthYucTwZmrrnB9j9Ggf7r8wZZYZ", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -359,7 +359,7 @@ Response: { } }, { - "digest": "EBVoDkV5a3up4MzuKf2g671pYMBQBMKMBaKtDFEjuS3o", + "digest": "CMWP39HwdMdEhgHh54EonhUkmG3B5xTBdsxy493DfAxa", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -367,7 +367,7 @@ Response: { } }, { - "digest": "7TYZ4v2BBB4Mw7e9vJvD75FsERSzvvVtzvDuCjoG8qos", + "digest": "k7uqYEVDRKmcSV51NiyNASiTM6SnrFGSV4DmvWvPt2R", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -375,7 +375,7 @@ Response: { } }, { - "digest": "5Vthwaj7H5tdU7dGb42NbZeX7WC8be3sJqD4uMQeavsG", + "digest": "3FjYZKGUcbVYqHKSvzPuWJBTBtZHQMkVC6e23dPBLkxy", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -383,7 +383,7 @@ Response: { } }, { - "digest": "M9rn2G7nw97kmn5iyvjf3bptqJa98S8LQoJCmvp77x4", + "digest": "9c34rk4iWpmURFjPQNXCHCTFZXXwYwDXgBKn22q674jE", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -431,7 +431,7 @@ Response: { }, "nodes": [ { - "digest": "57AHRnaYzfkSHWFvDUGLRzwYCAuPYEqW1qRiraXM1ojX", + "digest": "ABweY1pDPKFhZX77kk48ofYU9KpAvXHBZUYyPK8JZf8p", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -439,7 +439,7 @@ Response: { } }, { - "digest": "F2aqQMFU4LQb2geYPrBFPx7BpCs2n6Fco6jmVUaeeR79", + "digest": "8v4rn79YoSv3Drbkqbz8ttsX7EJDPEoDNbvLXpZnNXvE", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -447,7 +447,7 @@ Response: { } }, { - "digest": "eQFpQNaXZuYztmab9sKuCvV7BE2P3s6pxWcAABaRRVb", + "digest": "DeaCABc78S9mn6vSdNcNpabxYuazUfc1gsb87KMKbcyk", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -455,7 +455,7 @@ Response: { } }, { - "digest": "4yREuZtBiN1wAjXnLba5N6BWCDuWNX1CaMh4QT7exaWB", + "digest": "6YBm7aNbGN3XrFBmateAnVZ1tCdi2sattswFEHJztyrB", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -463,7 +463,7 @@ Response: { } }, { - "digest": "2sQk7WeF1PuQkwpyMCs6wrGXNzKCgXGHAamzYWgarTbx", + "digest": "Gb2DhrKwqpXxHGt7q8XN5arTdGHf1fBKu8h8a86KYWR7", "effects": { "checkpoint": { "sequenceNumber": 2 @@ -471,7 +471,7 @@ Response: { } }, { - "digest": "6gmeApTpV7wXajaCmbdGkqTaf4DwapRLvWbFeDuAgBnC", + "digest": "DigC9u79Qh7rJB9jkthYucTwZmrrnB9j9Ggf7r8wZZYZ", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -479,7 +479,7 @@ Response: { } }, { - "digest": "EBVoDkV5a3up4MzuKf2g671pYMBQBMKMBaKtDFEjuS3o", + "digest": "CMWP39HwdMdEhgHh54EonhUkmG3B5xTBdsxy493DfAxa", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -487,7 +487,7 @@ Response: { } }, { - "digest": "7TYZ4v2BBB4Mw7e9vJvD75FsERSzvvVtzvDuCjoG8qos", + "digest": "k7uqYEVDRKmcSV51NiyNASiTM6SnrFGSV4DmvWvPt2R", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -495,7 +495,7 @@ Response: { } }, { - "digest": "5Vthwaj7H5tdU7dGb42NbZeX7WC8be3sJqD4uMQeavsG", + "digest": "3FjYZKGUcbVYqHKSvzPuWJBTBtZHQMkVC6e23dPBLkxy", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -503,7 +503,7 @@ Response: { } }, { - "digest": "M9rn2G7nw97kmn5iyvjf3bptqJa98S8LQoJCmvp77x4", + "digest": "9c34rk4iWpmURFjPQNXCHCTFZXXwYwDXgBKn22q674jE", "effects": { "checkpoint": { "sequenceNumber": 3 @@ -592,7 +592,7 @@ Response: { { "cursor": "eyJjIjozLCJ0IjoyLCJpIjpmYWxzZX0", "node": { - "digest": "57AHRnaYzfkSHWFvDUGLRzwYCAuPYEqW1qRiraXM1ojX", + "digest": "ABweY1pDPKFhZX77kk48ofYU9KpAvXHBZUYyPK8JZf8p", "effects": { "checkpoint": { "sequenceNumber": 2 diff --git a/crates/iota-graphql-e2e-tests/tests/transactions/shared.exp b/crates/iota-graphql-e2e-tests/tests/transactions/shared.exp index d8c146374ad..13ed627e781 100644 --- a/crates/iota-graphql-e2e-tests/tests/transactions/shared.exp +++ b/crates/iota-graphql-e2e-tests/tests/transactions/shared.exp @@ -4,27 +4,27 @@ task 1, lines 7-23: //# publish created: object(1,0), object(1,1) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 6862800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 6847600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, lines 25-26: //# programmable --inputs immshared(1,0) //> 0: P0::m::get(Input(0)) mutated: object(0,0) unchanged_shared: object(1,0) -gas summary: computation_cost: 1000000, storage_cost: 988000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 980400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, lines 28-29: //# programmable --inputs object(1,0) //> 0: P0::m::inc(Input(0)) mutated: object(0,0), object(1,0) -gas summary: computation_cost: 1000000, storage_cost: 2272400, storage_rebate: 2272400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2257200, storage_rebate: 2257200, non_refundable_storage_fee: 0 task 4, lines 31-33: //# programmable --inputs object(1,0) //> 0: P0::m::get(Input(0)); //> P0::m::inc(Input(0)) mutated: object(0,0), object(1,0) -gas summary: computation_cost: 1000000, storage_cost: 2272400, storage_rebate: 2272400, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2257200, storage_rebate: 2257200, non_refundable_storage_fee: 0 task 5, line 35: //# create-checkpoint @@ -42,7 +42,7 @@ Response: { "transactions": { "nodes": [ { - "package": "0xb5ad900f81fd3006c1b3c56c475bed46736974cf0fd032f6eba446610b5abc1e", + "package": "0xf40350dd9cb77160579b0e2511443ac8079495baf4a63202dc7a62b1a383a181", "module": "m", "functionName": "get" } @@ -55,17 +55,17 @@ Response: { "nodes": [ { "__typename": "SharedObjectRead", - "address": "0xfb57e6dd1e6913ce203679610ade10b0ea836c3724c989502ad08d24d6e812c6", + "address": "0xa2f6f4538016aceca519479b3992959c2bb84f2a95db0cff1415422fa499ddbe", "version": 2, - "digest": "9uSF5KxVT2iBa61QmUhd1K79iqh3JkeYKvQ4n2p1isfz", + "digest": "53nzg2NiA6eZd4BxKfy88MmasZSGRat3313Azf266AfJ", "object": { "asMoveObject": { "contents": { "type": { - "repr": "0xb5ad900f81fd3006c1b3c56c475bed46736974cf0fd032f6eba446610b5abc1e::m::Foo" + "repr": "0xf40350dd9cb77160579b0e2511443ac8079495baf4a63202dc7a62b1a383a181::m::Foo" }, "json": { - "id": "0xfb57e6dd1e6913ce203679610ade10b0ea836c3724c989502ad08d24d6e812c6", + "id": "0xa2f6f4538016aceca519479b3992959c2bb84f2a95db0cff1415422fa499ddbe", "x": "0" } } @@ -82,7 +82,7 @@ Response: { "transactions": { "nodes": [ { - "package": "0xb5ad900f81fd3006c1b3c56c475bed46736974cf0fd032f6eba446610b5abc1e", + "package": "0xf40350dd9cb77160579b0e2511443ac8079495baf4a63202dc7a62b1a383a181", "module": "m", "functionName": "inc" } @@ -102,12 +102,12 @@ Response: { "transactions": { "nodes": [ { - "package": "0xb5ad900f81fd3006c1b3c56c475bed46736974cf0fd032f6eba446610b5abc1e", + "package": "0xf40350dd9cb77160579b0e2511443ac8079495baf4a63202dc7a62b1a383a181", "module": "m", "functionName": "get" }, { - "package": "0xb5ad900f81fd3006c1b3c56c475bed46736974cf0fd032f6eba446610b5abc1e", + "package": "0xf40350dd9cb77160579b0e2511443ac8079495baf4a63202dc7a62b1a383a181", "module": "m", "functionName": "inc" } diff --git a/crates/iota-graphql-e2e-tests/tests/transactions/system.exp b/crates/iota-graphql-e2e-tests/tests/transactions/system.exp index 9c21063d678..bdad7857c2f 100644 --- a/crates/iota-graphql-e2e-tests/tests/transactions/system.exp +++ b/crates/iota-graphql-e2e-tests/tests/transactions/system.exp @@ -7,7 +7,7 @@ Response: { "transactionBlocks": { "nodes": [ { - "digest": "2B5WCAR8XmpU5mGFe225Jk8bhnh5oXNjfyfaX72VELvJ", + "digest": "EjxArvXVR7U8yu5Yi2oDmELwV74gwJFinZKhnPuTKj83", "sender": null, "signatures": [ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==" @@ -1225,7 +1225,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0x0000000000000000000000000000000000000000000000000000000000000001", - "digest": "ENjiFoxPrZM9nyeHuhGaWKLQmUaW7AGumKmKAtYRAkMx" + "digest": "BWPzkyHoTWnZGNLBbza1xvEYP9hgm7dogXoi1DUjtpM7" } }, { @@ -1234,7 +1234,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0x0000000000000000000000000000000000000000000000000000000000000002", - "digest": "25LNU4kgDKzmLynUBdNydovvBxmFcaqytbpP4v1uDeUb" + "digest": "63DagAxEDkLwscMq1tGaPAhLR9dCYKwMTRFZugpfDiMq" } }, { @@ -1243,7 +1243,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0x0000000000000000000000000000000000000000000000000000000000000003", - "digest": "Hp85vhPRftDufuLYqnkgsj6NXkjqBjAAFTt8Y1kTvi7E" + "digest": "3X6wUAwmH2pcVR5yHWcUMoJKs5gwhxfCRh42jq7xVZM3" } }, { @@ -1252,7 +1252,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0x0000000000000000000000000000000000000000000000000000000000000005", - "digest": "BHCkaFS2xS78pxZH9p8zi5thePij2x57c9svkPEGm3KZ" + "digest": "6XeCa8r3ai3FXCgp2kcz85fDjW4rJ5FZLeQJf2Nzwm75" } }, { @@ -1261,7 +1261,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0x0000000000000000000000000000000000000000000000000000000000000006", - "digest": "CTBkMWme6atVxkSS7PgV55smTTQKWk84yNT2mqUuJYte" + "digest": "gCx8m8h2RGFjajzMdfBdk4MyevRi34XxhWobMZVRyZV" } }, { @@ -1270,7 +1270,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0x0000000000000000000000000000000000000000000000000000000000000008", - "digest": "DSwZ4FmppSRBHwCQPuiuWFeiQ1DWA8XifY26iMoijDpP" + "digest": "3oxqmiP9tw1RZ5idND2hZ6sQ7bCM8qU3MT7PYS8wWEuB" } }, { @@ -1279,7 +1279,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0x000000000000000000000000000000000000000000000000000000000000000b", - "digest": "3p6UjMn8i1hnqDYz8Y6ES6MB7Af2tgss6FPhXCyeLSPi" + "digest": "8m58ysCbvvBpAN54w4fww8Y6nXm4GAQfovuswD1vGFFP" } }, { @@ -1288,7 +1288,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0x0000000000000000000000000000000000000000000000000000000000000403", - "digest": "E3jwUuD8t2nzrDBTv6noK2PUyyvuVAysVUqW7KqnbfCc" + "digest": "Eg1CzeQBR3AGwxnDq8TJo8A9gHSZjFpXNMk8zeMc5jXe" } }, { @@ -1297,7 +1297,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0x000000000000000000000000000000000000000000000000000000000000107a", - "digest": "3cUy8tgrqu5Xk1wgBkDz8ZUes4r9ezn3rx1aJcEEcpo4" + "digest": "Ds3kGXwgK3MWzFVW6wHPEDoPzLtU3mtRnvxF1PC7WTWp" } }, { @@ -1306,7 +1306,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0x1b19651d3c2723e7f6c1eca23c13b72cd7f274524223391e75994dad311828df", - "digest": "6nG9sPDXR5jHQaGWhbbAX3rUg7EXtmWe1DxAzaGCoRG5" + "digest": "EPdNi4i16VS8Ji3xn4DAPVAJ5xi4pZHpCXGuKbqeNkzz" } }, { @@ -1315,7 +1315,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0x27982f48a697a9f61e3f738993c2d00e16b89938eedb74af1849ba6c6d82303b", - "digest": "emzdESgN7RfkPjnaP1pvcyQDjVbU5U6iRrhAxLmMCq9" + "digest": "GdkVYasCkoM1F9zBqytqzNtU5oKBsJnt7bvNeM7BQESg" } }, { @@ -1324,7 +1324,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0x6af2a2b7ca60bf76174adfd3e9c4957f8e937759603182f9b46c7f6c5f19c6d2", - "digest": "7HLikfNn3xnU7J3BZWtbdtX4sjceNmeM8qZdXgJvGWK4" + "digest": "96gSoSvev5VaU8BfPEYSBpXkTfSLEhMjzcLtk3PAxBzn" } }, { @@ -1333,7 +1333,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0xa0f947f895ffe5715ab529ed16659e9c099bee48524f56c8d5a2eab8e842bd99", - "digest": "5HqXsg38zJApoSepyKxKMGjkzXgC2mpXJB7TWTmu3jqm" + "digest": "BNLVZMqwpvMRqGDAvLXND3zWvHJ3tcbfn5LgC1FvmNw7" } }, { @@ -1342,7 +1342,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0xbb5caa62668e66be9dd0a5a74534814bf789fd6ab6335e08eff62a58ee1f287e", - "digest": "GbpQCkRKETYZ1mZaCXD1dDVencXtFgjjGHTDLLZLmyKs" + "digest": "713ee9qPuf6j6nXZVs6jQNaURCHXprZfwwbFnmuVRBDu" } }, { @@ -1351,7 +1351,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0xc28024efc650d31011065697e676b6738732dad9f709e54a13b116672c298f25", - "digest": "uxV9PrgZ8ufgYxPKEbYoND3RVHajt2ggHn2p3biNM9z" + "digest": "BEPbAyocJgB6QtEAKQQUgyfYFf8RkWPWUpvRpuwobNHC" } }, { @@ -1360,7 +1360,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0xc928f6f78781333f87efac974403df5a8565e3accb3c16a891a60a18dd2f2f42", - "digest": "9htprPEX2u5fQquygzgGj9nP6UaNBP31J6PVSwxwcmwk" + "digest": "FzFjGUJ3FBJRZ4eVE7y9F3LRqxWyDY4JT1pmg7g1BU4X" } }, { @@ -1369,7 +1369,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0xdd6b3a50df67a765e8c59bd37030224138f36bba296535846f490d8dede3c502", - "digest": "EwNpAgeEnd1fEmfUDf3xquRkE4RsA7QBetPGvbfAx78q" + "digest": "EJ4XFN8AQCbwg3rqF1uksR2gKLDyadnCN1dYvJ3Um713" } }, { @@ -1378,7 +1378,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0xe9ee601e69a2f4274ca5f23c16190823a7af496b5b9f2eac0d2c2645634b2737", - "digest": "CKk9xibx6DCsz5frc1ponJCY85Wp1TC71NpkJd4TPL6q" + "digest": "9oBq9oxHbMER3WeW5DudYyXecorCy5yjcaLJVBzrAJmw" } }, { @@ -1387,7 +1387,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0xf22e2f7e20b84f57fdcf1f44c79c321533b922fa9488c23556356ae3f906b0bb", - "digest": "CQvMCiaVuXqqwk8rLcEzYycJkLGkx1K3fKsrWxA5vovf" + "digest": "D6VFrTAqMGZjMktBnEhGkZ9MXyea8WisE4vdn8fBAjgV" } } ] @@ -1409,7 +1409,7 @@ Response: { "sequenceNumber": 0 }, "transactionBlock": { - "digest": "2B5WCAR8XmpU5mGFe225Jk8bhnh5oXNjfyfaX72VELvJ" + "digest": "EjxArvXVR7U8yu5Yi2oDmELwV74gwJFinZKhnPuTKj83" } }, "expiration": null @@ -1461,7 +1461,7 @@ Response: { "dependencies": { "nodes": [ { - "digest": "2B5WCAR8XmpU5mGFe225Jk8bhnh5oXNjfyfaX72VELvJ" + "digest": "EjxArvXVR7U8yu5Yi2oDmELwV74gwJFinZKhnPuTKj83" } ] }, @@ -1476,7 +1476,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0x0000000000000000000000000000000000000000000000000000000000000006", - "digest": "7uXNaHWi3mgndvU5ucJ5SompTEpJAgV9TKY8c6H5tH2R" + "digest": "FQsvyRc9HAiReCY3aNX4CwyAZujqeWGhZDYddNsuL8NT" } } ] @@ -1561,7 +1561,7 @@ Response: { "dependencies": { "nodes": [ { - "digest": "2B5WCAR8XmpU5mGFe225Jk8bhnh5oXNjfyfaX72VELvJ" + "digest": "EjxArvXVR7U8yu5Yi2oDmELwV74gwJFinZKhnPuTKj83" } ] }, @@ -1576,7 +1576,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0x0000000000000000000000000000000000000000000000000000000000000005", - "digest": "Do9BxST2vAmc7ZRsxohXXg5S3QLzmgUYYQnP2ejXtP93" + "digest": "G1xvDacDJsdTTLoLq8tjhLbTDCR6MYL9yVStX9e8GKi" } }, { @@ -1585,7 +1585,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0x0d8feaf1c714777ad5401781c55794e0b8f6dda166924176279914bed08951e0", - "digest": "DXX64y9MQSS9WD6oemyeURG3ui88kg4Cm4wirWqx9Uzy" + "digest": "92GwpFNwQDbmoJRDkH6crad72SMMubKs3HdpMhncAwbp" } }, { @@ -1594,7 +1594,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0x4509fa198370254af0418248c9718bb206e810e1bce9fc8ffd0c500aef972f4d", - "digest": "BeJhqfZpuFRhdM55Fhu6KUCSz2173Ea6Kmm9NSsUoLvR" + "digest": "5wumBetyyshU5rCK2f6GUDCohAWpmVrus9D4QS5bambg" } }, { @@ -1603,7 +1603,7 @@ Response: { "idDeleted": false, "outputState": { "address": "0x6af2a2b7ca60bf76174adfd3e9c4957f8e937759603182f9b46c7f6c5f19c6d2", - "digest": "XMY7xLE7B9ucBNQsgHgjYJ1vDHfEie94oV7yM46VD5C" + "digest": "CNxCh8MK8JrDGgHFwQyJ3oBV6njo5bRSWcEy8HPAakha" } } ] diff --git a/crates/iota-graphql-e2e-tests/tests/validator/validator.exp b/crates/iota-graphql-e2e-tests/tests/validator/validator.exp index 7e0878ca87a..628c1f986e1 100644 --- a/crates/iota-graphql-e2e-tests/tests/validator/validator.exp +++ b/crates/iota-graphql-e2e-tests/tests/validator/validator.exp @@ -15,31 +15,31 @@ task 3, lines 13-38: //# publish --sender A --gas-budget 9999999999 created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5920400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5912800, storage_rebate: 0, non_refundable_storage_fee: 0 task 4, line 40: //# run P0::m::new --sender A created: object(4,0) mutated: object(0,0) -gas summary: computation_cost: 1441000000, storage_cost: 1932269600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1441000000, computation_cost_burned: 1441000000, storage_cost: 1932254400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 5, line 42: //# run P0::m::new --sender A created: object(5,0) mutated: object(0,0) -gas summary: computation_cost: 1441000000, storage_cost: 1932269600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1441000000, computation_cost_burned: 1441000000, storage_cost: 1932254400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 6, line 44: //# run P0::m::new --sender A created: object(6,0) mutated: object(0,0) -gas summary: computation_cost: 1441000000, storage_cost: 1932269600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1441000000, computation_cost_burned: 1441000000, storage_cost: 1932254400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, line 46: //# run P0::m::new --sender A created: object(7,0) mutated: object(0,0) -gas summary: computation_cost: 1441000000, storage_cost: 1932269600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1441000000, computation_cost_burned: 1441000000, storage_cost: 1932254400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 8, line 48: //# create-checkpoint @@ -71,91 +71,91 @@ task 11, line 65: //# run P0::m::new --sender A created: object(11,0) mutated: object(0,0) -gas summary: computation_cost: 1441000000, storage_cost: 1932269600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1441000000, computation_cost_burned: 1441000000, storage_cost: 1932254400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 12, line 67: //# run P0::m::new --sender A created: object(12,0) mutated: object(0,0) -gas summary: computation_cost: 1441000000, storage_cost: 1932269600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1441000000, computation_cost_burned: 1441000000, storage_cost: 1932254400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 13, line 69: //# run P0::m::new --sender A created: object(13,0) mutated: object(0,0) -gas summary: computation_cost: 1441000000, storage_cost: 1932269600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1441000000, computation_cost_burned: 1441000000, storage_cost: 1932254400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 14, line 71: //# run P0::m::new --sender A created: object(14,0) mutated: object(0,0) -gas summary: computation_cost: 1441000000, storage_cost: 1932269600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1441000000, computation_cost_burned: 1441000000, storage_cost: 1932254400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 15, line 73: //# run P0::m::new --sender A created: object(15,0) mutated: object(0,0) -gas summary: computation_cost: 1441000000, storage_cost: 1932269600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1441000000, computation_cost_burned: 1441000000, storage_cost: 1932254400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 16, line 75: //# run P0::m::new --sender A created: object(16,0) mutated: object(0,0) -gas summary: computation_cost: 1441000000, storage_cost: 1932269600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1441000000, computation_cost_burned: 1441000000, storage_cost: 1932254400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 17, line 77: //# run P0::m::new --sender A created: object(17,0) mutated: object(0,0) -gas summary: computation_cost: 1441000000, storage_cost: 1932269600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1441000000, computation_cost_burned: 1441000000, storage_cost: 1932254400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 18, line 79: //# run P0::m::new --sender A created: object(18,0) mutated: object(0,0) -gas summary: computation_cost: 1441000000, storage_cost: 1932269600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1441000000, computation_cost_burned: 1441000000, storage_cost: 1932254400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 19, line 81: //# run P0::m::new --sender A created: object(19,0) mutated: object(0,0) -gas summary: computation_cost: 1441000000, storage_cost: 1932269600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1441000000, computation_cost_burned: 1441000000, storage_cost: 1932254400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 20, line 83: //# run P0::m::new --sender A created: object(20,0) mutated: object(0,0) -gas summary: computation_cost: 1441000000, storage_cost: 1932269600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1441000000, computation_cost_burned: 1441000000, storage_cost: 1932254400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 21, line 85: //# run P0::m::new --sender A created: object(21,0) mutated: object(0,0) -gas summary: computation_cost: 1441000000, storage_cost: 1932269600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1441000000, computation_cost_burned: 1441000000, storage_cost: 1932254400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 22, line 87: //# run P0::m::new --sender A created: object(22,0) mutated: object(0,0) -gas summary: computation_cost: 1441000000, storage_cost: 1932269600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1441000000, computation_cost_burned: 1441000000, storage_cost: 1932254400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 23, line 89: //# run P0::m::new --sender A created: object(23,0) mutated: object(0,0) -gas summary: computation_cost: 1441000000, storage_cost: 1932269600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1441000000, computation_cost_burned: 1441000000, storage_cost: 1932254400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 24, line 91: //# run P0::m::new --sender A created: object(24,0) mutated: object(0,0) -gas summary: computation_cost: 1441000000, storage_cost: 1932269600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1441000000, computation_cost_burned: 1441000000, storage_cost: 1932254400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 25, line 93: //# run P0::m::new --sender A created: object(25,0) mutated: object(0,0) -gas summary: computation_cost: 1441000000, storage_cost: 1932269600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1441000000, computation_cost_burned: 1441000000, storage_cost: 1932254400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 26, line 95: //# create-checkpoint diff --git a/crates/iota-graphql-rpc-client/Cargo.toml b/crates/iota-graphql-rpc-client/Cargo.toml index 9e255bcb29c..79c6b799ba6 100644 --- a/crates/iota-graphql-rpc-client/Cargo.toml +++ b/crates/iota-graphql-rpc-client/Cargo.toml @@ -17,3 +17,7 @@ thiserror.workspace = true # internal dependencies iota-graphql-rpc-headers.workspace = true + +[dev-dependencies] +anyhow.workspace = true +tokio = { workspace = true, features = ["macros", "rt-multi-thread"] } diff --git a/crates/iota-graphql-rpc-client/examples/checkpoint.rs b/crates/iota-graphql-rpc-client/examples/checkpoint.rs new file mode 100644 index 00000000000..d147719c37d --- /dev/null +++ b/crates/iota-graphql-rpc-client/examples/checkpoint.rs @@ -0,0 +1,67 @@ +// Copyright (c) 2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +//! This example showcases how to use the GraphQL API by querying data about the +//! latest checkpoint. +//! +//! cargo run --example checkpoint + +use iota_graphql_rpc_client::simple_client::SimpleClient; + +#[tokio::main] +async fn main() -> Result<(), anyhow::Error> { + let graphql_client = SimpleClient::new("http://127.0.0.1:8000"); + let query = r#"{ + checkpoint { + digest + sequenceNumber + validatorSignatures + previousCheckpointDigest + networkTotalTransactions + rollingGasSummary { + computationCost + storageCost + storageRebate + nonRefundableStorageFee + } + epoch { + epochId + referenceGasPrice + startTimestamp + endTimestamp + } + transactionBlocks(first: 2) { + edges { + node { + kind { + __typename + } + digest + sender { + address + } + } + } + } + } + }"#; + let res = graphql_client + .execute_to_graphql(query.to_string(), true, vec![], vec![]) + .await?; + anyhow::ensure!(res.errors().is_empty(), "{:?}", res.errors()); + + let resp_body = res.response_body().data.clone().into_json()?; + // Access a nested field + println!( + "Selected data for checkpoint {}:", + resp_body + .get("checkpoint") + .ok_or(anyhow::anyhow!("missing checkpoint"))? + .get("sequenceNumber") + .ok_or(anyhow::anyhow!("missing sequenceNumber"))? + ); + // Full response + println!("{:#?}", resp_body); + + Ok(()) +} diff --git a/crates/iota-graphql-rpc/examples/coin_metadata/coin_metadata.graphql b/crates/iota-graphql-rpc/examples/coin_metadata/coin_metadata.graphql index dd185d359a6..4760171042e 100644 --- a/crates/iota-graphql-rpc/examples/coin_metadata/coin_metadata.graphql +++ b/crates/iota-graphql-rpc/examples/coin_metadata/coin_metadata.graphql @@ -6,6 +6,5 @@ query CoinMetadata { description iconUrl supply - hasPublicTransfer } } diff --git a/crates/iota-graphql-rpc/examples/epoch/specific_epoch.graphql b/crates/iota-graphql-rpc/examples/epoch/specific_epoch.graphql index c83732c6f91..a64ab50aaa6 100644 --- a/crates/iota-graphql-rpc/examples/epoch/specific_epoch.graphql +++ b/crates/iota-graphql-rpc/examples/epoch/specific_epoch.graphql @@ -23,7 +23,6 @@ exchangeRates { storageRebate bcs - hasPublicTransfer } exchangeRatesSize stakingPoolActivationEpoch diff --git a/crates/iota-graphql-rpc/examples/owner/dynamic_field.graphql b/crates/iota-graphql-rpc/examples/owner/dynamic_field.graphql index af370be7b55..54bf66cbff2 100644 --- a/crates/iota-graphql-rpc/examples/owner/dynamic_field.graphql +++ b/crates/iota-graphql-rpc/examples/owner/dynamic_field.graphql @@ -7,7 +7,6 @@ fragment DynamicFieldValueSelection on DynamicFieldValue { __typename } ... on MoveObject { - hasPublicTransfer contents { type { repr diff --git a/crates/iota-graphql-rpc/examples/owner/dynamic_field_connection.graphql b/crates/iota-graphql-rpc/examples/owner/dynamic_field_connection.graphql index 87fa63ba1b0..075fe05d1c5 100644 --- a/crates/iota-graphql-rpc/examples/owner/dynamic_field_connection.graphql +++ b/crates/iota-graphql-rpc/examples/owner/dynamic_field_connection.graphql @@ -6,7 +6,6 @@ fragment DynamicFieldValueSelection on DynamicFieldValue { data } ... on MoveObject { - hasPublicTransfer contents { type { repr diff --git a/crates/iota-graphql-rpc/examples/owner/dynamic_object_field.graphql b/crates/iota-graphql-rpc/examples/owner/dynamic_object_field.graphql index 5dac91cf024..00a4f443f3c 100644 --- a/crates/iota-graphql-rpc/examples/owner/dynamic_object_field.graphql +++ b/crates/iota-graphql-rpc/examples/owner/dynamic_object_field.graphql @@ -7,7 +7,6 @@ fragment DynamicFieldValueSelection on DynamicFieldValue { __typename } ... on MoveObject { - hasPublicTransfer contents { type { repr diff --git a/crates/iota-graphql-rpc/schema.graphql b/crates/iota-graphql-rpc/schema.graphql index be787e02e22..8821213b8ef 100644 --- a/crates/iota-graphql-rpc/schema.graphql +++ b/crates/iota-graphql-rpc/schema.graphql @@ -603,13 +603,6 @@ type Coin implements IMoveObject & IObject & IOwner { """ contents: MoveValue """ - Determines whether a transaction can transfer this object, using the - TransferObjects transaction command or - `iota::transfer::public_transfer`, both of which require the object to - have the `key` and `store` abilities. - """ - hasPublicTransfer: Boolean! - """ The set of named templates defined on-chain for the type of this object, to be handled off-chain. The server substitutes data from the object into these templates to generate a display string per template. @@ -777,13 +770,6 @@ type CoinMetadata implements IMoveObject & IObject & IOwner { """ contents: MoveValue """ - Determines whether a transaction can transfer this object, using the - TransferObjects transaction command or - `iota::transfer::public_transfer`, both of which require the object to - have the `key` and `store` abilities. - """ - hasPublicTransfer: Boolean! - """ The set of named templates defined on-chain for the type of this object, to be handled off-chain. The server substitutes data from the object into these templates to generate a display string per template. @@ -1399,6 +1385,10 @@ type GasCostSummary { """ computationCost: BigInt """ + Gas burned for executing this transactions (in NANOS). + """ + computationCostBurned: BigInt + """ Gas paid for the data stored on-chain by this transaction (in NANOS). """ storageCost: BigInt @@ -1501,10 +1491,6 @@ interface IMoveObject { """ contents: MoveValue """ - Determines whether a transaction can transfer this object, using the TransferObjects transaction command or `iota::transfer::public_transfer`, both of which require the object to have the `key` and `store` abilities. - """ - hasPublicTransfer: Boolean! - """ The set of named templates defined on-chain for the type of this object, to be handled off-chain. The server substitutes data from the object into these templates to generate a display string per template. """ display: [DisplayEntry!] @@ -2143,13 +2129,6 @@ type MoveObject implements IMoveObject & IObject & IOwner { """ contents: MoveValue """ - Determines whether a transaction can transfer this object, using the - TransferObjects transaction command or - `iota::transfer::public_transfer`, both of which require the object to - have the `key` and `store` abilities. - """ - hasPublicTransfer: Boolean! - """ The set of named templates defined on-chain for the type of this object, to be handled off-chain. The server substitutes data from the object into these templates to generate a display string per template. @@ -3856,13 +3835,6 @@ type StakedIota implements IMoveObject & IObject & IOwner { """ contents: MoveValue """ - Determines whether a transaction can transfer this object, using the - TransferObjects transaction command or - `iota::transfer::public_transfer`, both of which require the object to - have the `key` and `store` abilities. - """ - hasPublicTransfer: Boolean! - """ The set of named templates defined on-chain for the type of this object, to be handled off-chain. The server substitutes data from the object into these templates to generate a display string per template. diff --git a/crates/iota-graphql-rpc/src/types/checkpoint.rs b/crates/iota-graphql-rpc/src/types/checkpoint.rs index 03727fad37d..ab464fe101a 100644 --- a/crates/iota-graphql-rpc/src/types/checkpoint.rs +++ b/crates/iota-graphql-rpc/src/types/checkpoint.rs @@ -136,6 +136,7 @@ impl Checkpoint { async fn rolling_gas_summary(&self) -> Option { Some(GasCostSummary { computation_cost: self.stored.computation_cost as u64, + computation_cost_burned: self.stored.computation_cost as u64, storage_cost: self.stored.storage_cost as u64, storage_rebate: self.stored.storage_rebate as u64, non_refundable_storage_fee: self.stored.non_refundable_storage_fee as u64, diff --git a/crates/iota-graphql-rpc/src/types/coin.rs b/crates/iota-graphql-rpc/src/types/coin.rs index a1c5057fb02..d63729f7b8a 100644 --- a/crates/iota-graphql-rpc/src/types/coin.rs +++ b/crates/iota-graphql-rpc/src/types/coin.rs @@ -228,14 +228,6 @@ impl Coin { MoveObjectImpl(&self.super_).contents().await } - /// Determines whether a transaction can transfer this object, using the - /// TransferObjects transaction command or - /// `iota::transfer::public_transfer`, both of which require the object to - /// have the `key` and `store` abilities. - pub(crate) async fn has_public_transfer(&self, ctx: &Context<'_>) -> Result { - MoveObjectImpl(&self.super_).has_public_transfer(ctx).await - } - /// The set of named templates defined on-chain for the type of this object, /// to be handled off-chain. The server substitutes data from the object /// into these templates to generate a display string per template. diff --git a/crates/iota-graphql-rpc/src/types/coin_metadata.rs b/crates/iota-graphql-rpc/src/types/coin_metadata.rs index f3a9208f829..5a9cc8913a5 100644 --- a/crates/iota-graphql-rpc/src/types/coin_metadata.rs +++ b/crates/iota-graphql-rpc/src/types/coin_metadata.rs @@ -220,14 +220,6 @@ impl CoinMetadata { MoveObjectImpl(&self.super_).contents().await } - /// Determines whether a transaction can transfer this object, using the - /// TransferObjects transaction command or - /// `iota::transfer::public_transfer`, both of which require the object to - /// have the `key` and `store` abilities. - pub(crate) async fn has_public_transfer(&self, ctx: &Context<'_>) -> Result { - MoveObjectImpl(&self.super_).has_public_transfer(ctx).await - } - /// The set of named templates defined on-chain for the type of this object, /// to be handled off-chain. The server substitutes data from the object /// into these templates to generate a display string per template. diff --git a/crates/iota-graphql-rpc/src/types/gas.rs b/crates/iota-graphql-rpc/src/types/gas.rs index be6ce2b20a9..7171cf843f6 100644 --- a/crates/iota-graphql-rpc/src/types/gas.rs +++ b/crates/iota-graphql-rpc/src/types/gas.rs @@ -30,6 +30,7 @@ pub(crate) struct GasInput { #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub(crate) struct GasCostSummary { pub computation_cost: u64, + pub computation_cost_burned: u64, pub storage_cost: u64, pub storage_rebate: u64, pub non_refundable_storage_fee: u64, @@ -110,6 +111,11 @@ impl GasCostSummary { Some(BigInt::from(self.computation_cost)) } + /// Gas burned for executing this transactions (in NANOS). + async fn computation_cost_burned(&self) -> Option { + Some(BigInt::from(self.computation_cost_burned)) + } + /// Gas paid for the data stored on-chain by this transaction (in NANOS). async fn storage_cost(&self) -> Option { Some(BigInt::from(self.storage_cost)) @@ -192,6 +198,7 @@ impl From<&NativeGasCostSummary> for GasCostSummary { fn from(gcs: &NativeGasCostSummary) -> Self { Self { computation_cost: gcs.computation_cost, + computation_cost_burned: gcs.computation_cost_burned, storage_cost: gcs.storage_cost, storage_rebate: gcs.storage_rebate, non_refundable_storage_fee: gcs.non_refundable_storage_fee, diff --git a/crates/iota-graphql-rpc/src/types/move_object.rs b/crates/iota-graphql-rpc/src/types/move_object.rs index ea46ed5a81b..8f74494b841 100644 --- a/crates/iota-graphql-rpc/src/types/move_object.rs +++ b/crates/iota-graphql-rpc/src/types/move_object.rs @@ -22,7 +22,6 @@ use crate::{ display::DisplayEntry, dynamic_field::{DynamicField, DynamicFieldName}, iota_address::IotaAddress, - move_type::MoveType, move_value::MoveValue, object::{self, Object, ObjectFilter, ObjectImpl, ObjectLookup, ObjectOwner, ObjectStatus}, owner::OwnerImpl, @@ -64,13 +63,6 @@ pub(crate) enum MoveObjectDowncastError { types. Also provides the flat representation of the type signature, and the BCS of \ the corresponding data." ), - field( - name = "has_public_transfer", - ty = "bool", - desc = "Determines whether a transaction can transfer this object, using the \ - TransferObjects transaction command or `iota::transfer::public_transfer`, both of \ - which require the object to have the `key` and `store` abilities." - ), field( name = "display", ty = "Option>", @@ -296,14 +288,6 @@ impl MoveObject { MoveObjectImpl(self).contents().await } - /// Determines whether a transaction can transfer this object, using the - /// TransferObjects transaction command or - /// `iota::transfer::public_transfer`, both of which require the object to - /// have the `key` and `store` abilities. - pub(crate) async fn has_public_transfer(&self, ctx: &Context<'_>) -> Result { - MoveObjectImpl(self).has_public_transfer(ctx).await - } - /// The set of named templates defined on-chain for the type of this object, /// to be handled off-chain. The server substitutes data from the object /// into these templates to generate a display string per template. @@ -404,12 +388,6 @@ impl MoveObjectImpl<'_> { let type_ = TypeTag::from(self.0.native.type_().clone()); Some(MoveValue::new(type_, self.0.native.contents().into())) } - - pub(crate) async fn has_public_transfer(&self, ctx: &Context<'_>) -> Result { - let type_ = MoveType::new(TypeTag::from(self.0.native.type_().clone())); - let set = type_.abilities_impl(ctx.data_unchecked()).await.extend()?; - Ok(set.has_key() && set.has_store()) - } } impl MoveObject { diff --git a/crates/iota-graphql-rpc/src/types/stake.rs b/crates/iota-graphql-rpc/src/types/stake.rs index f7e55cb659c..e2f39245f2e 100644 --- a/crates/iota-graphql-rpc/src/types/stake.rs +++ b/crates/iota-graphql-rpc/src/types/stake.rs @@ -237,14 +237,6 @@ impl StakedIota { MoveObjectImpl(&self.super_).contents().await } - /// Determines whether a transaction can transfer this object, using the - /// TransferObjects transaction command or - /// `iota::transfer::public_transfer`, both of which require the object to - /// have the `key` and `store` abilities. - pub(crate) async fn has_public_transfer(&self, ctx: &Context<'_>) -> Result { - MoveObjectImpl(&self.super_).has_public_transfer(ctx).await - } - /// The set of named templates defined on-chain for the type of this object, /// to be handled off-chain. The server substitutes data from the object /// into these templates to generate a display string per template. diff --git a/crates/iota-graphql-rpc/src/types/system_state_summary.rs b/crates/iota-graphql-rpc/src/types/system_state_summary.rs index dd55c46437c..e283e7e5564 100644 --- a/crates/iota-graphql-rpc/src/types/system_state_summary.rs +++ b/crates/iota-graphql-rpc/src/types/system_state_summary.rs @@ -39,6 +39,8 @@ impl SystemStateSummary { enabled: Some(self.native.safe_mode), gas_summary: Some(GasCostSummary { computation_cost: self.native.safe_mode_computation_rewards, + // All computation costs are burned in protocol v1. + computation_cost_burned: self.native.safe_mode_computation_rewards, storage_cost: self.native.safe_mode_storage_charges, storage_rebate: self.native.safe_mode_storage_rebates, non_refundable_storage_fee: self.native.safe_mode_non_refundable_storage_fee, diff --git a/crates/iota-graphql-rpc/src/types/validator.rs b/crates/iota-graphql-rpc/src/types/validator.rs index 350d5ce9d9a..5da4992d84c 100644 --- a/crates/iota-graphql-rpc/src/types/validator.rs +++ b/crates/iota-graphql-rpc/src/types/validator.rs @@ -74,9 +74,22 @@ impl Loader for Db { .await .map_err(|_| Error::Internal("Failed to fetch latest Iota system state".to_string()))?; let governance_api = GovernanceReadApi::new(self.inner.clone()); - let exchange_rates = exchange_rates(&governance_api, &latest_iota_system_state) + + let pending_validators_exchange_rate = governance_api + .pending_validators_exchange_rate() + .await + .map_err(|e| { + Error::Internal(format!( + "Error fetching pending validators exchange rates. {e}" + )) + })?; + + let mut exchange_rates = exchange_rates(&governance_api, &latest_iota_system_state) .await .map_err(|e| Error::Internal(format!("Error fetching exchange rates. {e}")))?; + + exchange_rates.extend(pending_validators_exchange_rate.into_iter()); + let mut results = BTreeMap::new(); // The requested epoch is the epoch for which we want to compute the APY. For diff --git a/crates/iota-graphql-rpc/tests/snapshots/snapshot_tests__schema_sdl_export.snap b/crates/iota-graphql-rpc/tests/snapshots/snapshot_tests__schema_sdl_export.snap index b8f1c96b155..b1c9a00a5ac 100644 --- a/crates/iota-graphql-rpc/tests/snapshots/snapshot_tests__schema_sdl_export.snap +++ b/crates/iota-graphql-rpc/tests/snapshots/snapshot_tests__schema_sdl_export.snap @@ -607,13 +607,6 @@ type Coin implements IMoveObject & IObject & IOwner { """ contents: MoveValue """ - Determines whether a transaction can transfer this object, using the - TransferObjects transaction command or - `iota::transfer::public_transfer`, both of which require the object to - have the `key` and `store` abilities. - """ - hasPublicTransfer: Boolean! - """ The set of named templates defined on-chain for the type of this object, to be handled off-chain. The server substitutes data from the object into these templates to generate a display string per template. @@ -781,13 +774,6 @@ type CoinMetadata implements IMoveObject & IObject & IOwner { """ contents: MoveValue """ - Determines whether a transaction can transfer this object, using the - TransferObjects transaction command or - `iota::transfer::public_transfer`, both of which require the object to - have the `key` and `store` abilities. - """ - hasPublicTransfer: Boolean! - """ The set of named templates defined on-chain for the type of this object, to be handled off-chain. The server substitutes data from the object into these templates to generate a display string per template. @@ -1403,6 +1389,10 @@ type GasCostSummary { """ computationCost: BigInt """ + Gas burned for executing this transactions (in NANOS). + """ + computationCostBurned: BigInt + """ Gas paid for the data stored on-chain by this transaction (in NANOS). """ storageCost: BigInt @@ -1505,10 +1495,6 @@ interface IMoveObject { """ contents: MoveValue """ - Determines whether a transaction can transfer this object, using the TransferObjects transaction command or `iota::transfer::public_transfer`, both of which require the object to have the `key` and `store` abilities. - """ - hasPublicTransfer: Boolean! - """ The set of named templates defined on-chain for the type of this object, to be handled off-chain. The server substitutes data from the object into these templates to generate a display string per template. """ display: [DisplayEntry!] @@ -2147,13 +2133,6 @@ type MoveObject implements IMoveObject & IObject & IOwner { """ contents: MoveValue """ - Determines whether a transaction can transfer this object, using the - TransferObjects transaction command or - `iota::transfer::public_transfer`, both of which require the object to - have the `key` and `store` abilities. - """ - hasPublicTransfer: Boolean! - """ The set of named templates defined on-chain for the type of this object, to be handled off-chain. The server substitutes data from the object into these templates to generate a display string per template. @@ -3860,13 +3839,6 @@ type StakedIota implements IMoveObject & IObject & IOwner { """ contents: MoveValue """ - Determines whether a transaction can transfer this object, using the - TransferObjects transaction command or - `iota::transfer::public_transfer`, both of which require the object to - have the `key` and `store` abilities. - """ - hasPublicTransfer: Boolean! - """ The set of named templates defined on-chain for the type of this object, to be handled off-chain. The server substitutes data from the object into these templates to generate a display string per template. diff --git a/crates/iota-indexer/src/apis/governance_api.rs b/crates/iota-indexer/src/apis/governance_api.rs index 57e42103b26..e82247cbf5c 100644 --- a/crates/iota-indexer/src/apis/governance_api.rs +++ b/crates/iota-indexer/src/apis/governance_api.rs @@ -170,6 +170,7 @@ impl GovernanceReadApi { let rates = exchange_rates(self, &system_state_summary) .await? .into_iter() + .chain(self.pending_validators_exchange_rate().await?.into_iter()) .map(|rates| (rates.pool_id, rates)) .collect::>(); @@ -292,6 +293,73 @@ impl GovernanceReadApi { ret } + + // Get validator exchange rates + async fn validator_exchange_rates( + &self, + tables: Vec<(IotaAddress, ObjectID, ObjectID, u64, bool)>, + ) -> Result, IndexerError> { + if tables.is_empty() { + return Ok(vec![]); + }; + + let mut exchange_rates = vec![]; + // Get exchange rates for each validator + for (address, pool_id, exchange_rates_id, exchange_rates_size, active) in tables { + let mut rates = vec![]; + for df in self + .inner + .get_dynamic_fields_raw_in_blocking_task( + exchange_rates_id, + None, + exchange_rates_size as usize, + ) + .await? + { + let dynamic_field = df + .to_dynamic_field::() + .ok_or_else(|| iota_types::error::IotaError::ObjectDeserialization { + error: "dynamic field malformed".to_owned(), + })?; + + rates.push((dynamic_field.name, dynamic_field.value)); + } + + rates.sort_by(|(a, _), (b, _)| a.cmp(b).reverse()); + + exchange_rates.push(ValidatorExchangeRates { + address, + pool_id, + active, + rates, + }); + } + Ok(exchange_rates) + } + + /// Check if there is any pending validator and get its exchange rates + pub async fn pending_validators_exchange_rate( + &self, + ) -> Result, IndexerError> { + // Try to find for any pending active validator + let tables = self + .inner + .pending_active_validators() + .await? + .into_iter() + .map(|pending_active_validator| { + ( + pending_active_validator.iota_address, + pending_active_validator.staking_pool_id, + pending_active_validator.exchange_rates_id, + pending_active_validator.exchange_rates_size, + false, + ) + }) + .collect::>(); + + self.validator_exchange_rates(tables).await + } } fn stake_status( @@ -397,38 +465,7 @@ pub async fn compute_exchange_rates( )); } - let mut exchange_rates = vec![]; - // Get exchange rates for each validator - for (address, pool_id, exchange_rates_id, exchange_rates_size, active) in tables { - let mut rates = vec![]; - for df in state - .inner - .get_dynamic_fields_raw_in_blocking_task( - exchange_rates_id, - None, - exchange_rates_size as usize, - ) - .await? - { - let dynamic_field = df - .to_dynamic_field::() - .ok_or_else(|| iota_types::error::IotaError::ObjectDeserialization { - error: "dynamic field malformed".to_owned(), - })?; - - rates.push((dynamic_field.name, dynamic_field.value)); - } - - rates.sort_by(|(a, _), (b, _)| a.cmp(b).reverse()); - - exchange_rates.push(ValidatorExchangeRates { - address, - pool_id, - active, - rates, - }); - } - Ok(exchange_rates) + state.validator_exchange_rates(tables).await } #[async_trait] diff --git a/crates/iota-indexer/src/indexer_reader.rs b/crates/iota-indexer/src/indexer_reader.rs index 7f98bc442be..94fa737b6d6 100644 --- a/crates/iota-indexer/src/indexer_reader.rs +++ b/crates/iota-indexer/src/indexer_reader.rs @@ -32,7 +32,10 @@ use iota_types::{ dynamic_field::{DynamicFieldInfo, DynamicFieldName}, effects::TransactionEvents, event::EventID, - iota_system_state::{IotaSystemStateTrait, iota_system_state_summary::IotaSystemStateSummary}, + iota_system_state::{ + IotaSystemStateTrait, + iota_system_state_summary::{IotaSystemStateSummary, IotaValidatorSummary}, + }, is_system_package, object::{Object, ObjectRead}, }; @@ -1735,6 +1738,17 @@ impl IndexerReader { pub fn package_resolver(&self) -> PackageResolver { self.package_resolver.clone() } + + pub async fn pending_active_validators( + &self, + ) -> Result, IndexerError> { + self.spawn_blocking(move |this| { + iota_types::iota_system_state::get_iota_system_state(&this) + .and_then(|system_state| system_state.get_pending_active_validators(&this)) + }) + .await + .map_err(Into::into) + } } impl iota_types::storage::ObjectStore for IndexerReader { diff --git a/crates/iota-indexer/src/models/checkpoints.rs b/crates/iota-indexer/src/models/checkpoints.rs index b2bca102061..0f2cba1ea41 100644 --- a/crates/iota-indexer/src/models/checkpoints.rs +++ b/crates/iota-indexer/src/models/checkpoints.rs @@ -203,6 +203,9 @@ impl TryFrom for RpcCheckpoint { end_of_epoch_data, epoch_rolling_gas_cost_summary: GasCostSummary { computation_cost: checkpoint.computation_cost as u64, + // TODO_FIXED_BASE_FEE: update computation cost burned in checkpoint to be used + // here in issue #3122 + computation_cost_burned: checkpoint.computation_cost as u64, storage_cost: checkpoint.storage_cost as u64, storage_rebate: checkpoint.storage_rebate as u64, non_refundable_storage_fee: checkpoint.non_refundable_storage_fee as u64, diff --git a/crates/iota-indexer/src/models/objects.rs b/crates/iota-indexer/src/models/objects.rs index 1d90151de86..50aeee95151 100644 --- a/crates/iota-indexer/src/models/objects.rs +++ b/crates/iota-indexer/src/models/objects.rs @@ -622,10 +622,9 @@ mod tests { let contents = bcs::to_bytes(&vec![GasCoin::new(id, gas)]).unwrap(); let data = Data::Move( - unsafe { + { MoveObject::new_from_execution_with_limit( object_type.into(), - true, 1.into(), contents, 256, diff --git a/crates/iota-indexer/src/store/pg_indexer_analytical_store.rs b/crates/iota-indexer/src/store/pg_indexer_analytical_store.rs index c3eb50711e9..6f75904e742 100644 --- a/crates/iota-indexer/src/store/pg_indexer_analytical_store.rs +++ b/crates/iota-indexer/src/store/pg_indexer_analytical_store.rs @@ -637,7 +637,7 @@ fn construct_move_call_persist_query(start_tx_seq: i64, end_tx_seq: i64) -> Stri m.package AS move_package, m.module AS move_module, m.func AS move_function - FROM tx_calls m + FROM tx_calls_fun m INNER JOIN transactions t ON m.tx_sequence_number = t.tx_sequence_number INNER JOIN checkpoints c diff --git a/crates/iota-indexer/tests/common/mod.rs b/crates/iota-indexer/tests/common/mod.rs index 8d87b97da0a..55273b8a1d9 100644 --- a/crates/iota-indexer/tests/common/mod.rs +++ b/crates/iota-indexer/tests/common/mod.rs @@ -196,16 +196,18 @@ pub async fn indexer_wait_for_object( ) { tokio::time::timeout(Duration::from_secs(30), async { loop { - if client - .get_object(object_id, None) - .await - .unwrap() + let Ok(obj_res) = client.get_object(object_id, None).await else { + continue; + }; + + if obj_res .data .map(|obj| obj.version == sequence_number) .unwrap_or_default() { break; } + tokio::time::sleep(Duration::from_millis(100)).await; } }) diff --git a/crates/iota-indexer/tests/rpc-tests/transaction_builder.rs b/crates/iota-indexer/tests/rpc-tests/transaction_builder.rs index c541e2ea65f..ae4612d465b 100644 --- a/crates/iota-indexer/tests/rpc-tests/transaction_builder.rs +++ b/crates/iota-indexer/tests/rpc-tests/transaction_builder.rs @@ -829,10 +829,9 @@ async fn create_cluster_with_timelocked_iota( let expiration_timestamp_ms = u64::MAX; let label = Option::Some(label_struct_tag_to_string(stardust_upgrade_label_type())); - let timelock_iota = unsafe { + let timelock_iota = { MoveObject::new_from_execution( MoveObjectType::timelocked_iota_balance(), - false, OBJECT_START_VERSION, TimeLock::::new( UID::new(ObjectID::random()), diff --git a/crates/iota-json-rpc-tests/README.md b/crates/iota-json-rpc-tests/README.md index eb7d2955e9a..1efda5fa695 100644 --- a/crates/iota-json-rpc-tests/README.md +++ b/crates/iota-json-rpc-tests/README.md @@ -50,13 +50,6 @@ That is, expect for the `WriteApi` methods that serve requests relayed by `iota- - [x] `get_coin_metadata` - [x] `get_total_supply` -### `ExtendedApi` (0/4) - -- [ ] `get_epochs` -- [ ] `get_current_epoch` -- [ ] `query_objects` -- [ ] `get_total_transactions` - ### `GovernanceReadApi` (8/8) - [x] `get_stakes_by_ids` diff --git a/crates/iota-json-rpc-tests/tests/governance_api.rs b/crates/iota-json-rpc-tests/tests/governance_api.rs index 7bd72ee0e31..1ff47a3aa86 100644 --- a/crates/iota-json-rpc-tests/tests/governance_api.rs +++ b/crates/iota-json-rpc-tests/tests/governance_api.rs @@ -1,7 +1,7 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use std::time::Duration; +use std::{collections::BTreeSet, time::Duration}; use iota_json_rpc_api::{ CoinReadApiClient, GovernanceReadApiClient, IndexerApiClient, TransactionBuilderClient, @@ -14,12 +14,17 @@ use iota_json_rpc_types::{ }; use iota_macros::sim_test; use iota_protocol_config::ProtocolConfig; -use iota_swarm_config::genesis_config::AccountConfig; +use iota_swarm_config::genesis_config::{ + AccountConfig, ValidatorGenesisConfig, ValidatorGenesisConfigBuilder, +}; +use iota_test_transaction_builder::TestTransactionBuilder; use iota_types::{ base_types::{MoveObjectType, ObjectID}, crypto::deterministic_random_account_key, digests::TransactionDigest, + governance::MIN_VALIDATOR_JOINING_STAKE_NANOS, id::UID, + iota_system_state::IotaSystemStateTrait, object::{Data, MoveObject, OBJECT_START_VERSION, ObjectInner, Owner}, quorum_driver_types::ExecuteTransactionRequestType, timelock::{ @@ -28,9 +33,182 @@ use iota_types::{ }, utils::to_sender_signed_transaction, }; -use test_cluster::TestClusterBuilder; +use rand::rngs::OsRng; +use test_cluster::{TestCluster, TestClusterBuilder}; use tokio::time::sleep; +/// Execute a sequence of transactions to add a validator, including adding +/// candidate, adding stake and activate the validator. +/// It does not however trigger reconfiguration yet. +async fn execute_add_validator_transactions( + test_cluster: &TestCluster, + new_validator: &ValidatorGenesisConfig, +) { + let pending_active_count = test_cluster.fullnode_handle.iota_node.with(|node| { + let system_state = node + .state() + .get_iota_system_state_object_for_testing() + .unwrap(); + system_state + .get_pending_active_validators(node.state().get_object_store().as_ref()) + .unwrap() + .len() + }); + + let cur_validator_candidate_count = test_cluster.fullnode_handle.iota_node.with(|node| { + node.state() + .get_iota_system_state_object_for_testing() + .unwrap() + .into_iota_system_state_summary() + .validator_candidates_size + }); + let address = (&new_validator.account_key_pair.public()).into(); + let gas = test_cluster + .wallet + .get_one_gas_object_owned_by_address(address) + .await + .unwrap() + .unwrap(); + + let tx = + TestTransactionBuilder::new(address, gas, test_cluster.get_reference_gas_price().await) + .call_request_add_validator_candidate( + &new_validator.to_validator_info_with_random_name().into(), + ) + .build_and_sign(&new_validator.account_key_pair); + test_cluster.execute_transaction(tx).await; + + // Check that the candidate can be found in the candidate table now. + test_cluster.fullnode_handle.iota_node.with(|node| { + let system_state = node + .state() + .get_iota_system_state_object_for_testing() + .unwrap(); + let system_state_summary = system_state.into_iota_system_state_summary(); + assert_eq!( + system_state_summary.validator_candidates_size, + cur_validator_candidate_count + 1 + ); + }); + + let address = (&new_validator.account_key_pair.public()).into(); + let stake_coin = test_cluster + .wallet + .gas_for_owner_budget( + address, + MIN_VALIDATOR_JOINING_STAKE_NANOS, + Default::default(), + ) + .await + .unwrap() + .1 + .object_ref(); + let gas = test_cluster + .wallet + .gas_for_owner_budget(address, 0, BTreeSet::from([stake_coin.0])) + .await + .unwrap() + .1 + .object_ref(); + + let rgp = test_cluster.get_reference_gas_price().await; + let stake_tx = TestTransactionBuilder::new(address, gas, rgp) + .call_staking(stake_coin, address) + .build_and_sign(&new_validator.account_key_pair); + test_cluster.execute_transaction(stake_tx).await; + + let gas = test_cluster.wallet.get_object_ref(gas.0).await.unwrap(); + let tx = TestTransactionBuilder::new(address, gas, rgp) + .call_request_add_validator() + .build_and_sign(&new_validator.account_key_pair); + test_cluster.execute_transaction(tx).await; + + // Check that we can get the pending validator from 0x5. + test_cluster.fullnode_handle.iota_node.with(|node| { + let system_state = node + .state() + .get_iota_system_state_object_for_testing() + .unwrap(); + let pending_active_validators = system_state + .get_pending_active_validators(node.state().get_object_store().as_ref()) + .unwrap(); + assert_eq!(pending_active_validators.len(), pending_active_count + 1); + assert_eq!( + pending_active_validators[pending_active_validators.len() - 1].iota_address, + address + ); + }); +} + +#[sim_test] +async fn get_stakes_with_new_validator() { + // Create the keypair for the new validator candidate + let new_validator = ValidatorGenesisConfigBuilder::new().build(&mut OsRng); + let address = (&new_validator.account_key_pair.public()).into(); + + let mut test_cluster = TestClusterBuilder::new() + .with_validator_candidates([address]) + .with_num_validators(4) + .build() + .await; + + let client = test_cluster.rpc_client().clone(); + + assert_eq!(test_cluster.committee().epoch, 0); + + let stakes = client.get_stakes(address).await.unwrap(); + assert!(stakes.is_empty()); + + // 1. Add validator as candidate + // 2. Stake the required tokens + // 3. Submit staking transaction + // 4. Request to join validator set + execute_add_validator_transactions(&test_cluster, &new_validator).await; + + // We just added the validator, it's not active yet, it will be on epoch change. + let stakes = test_cluster.rpc_client().get_stakes(address).await.unwrap(); + assert!(matches!(stakes[0].stakes[0].status, StakeStatus::Pending)); + + test_cluster.force_new_epoch().await; + + assert_eq!(test_cluster.committee().epoch, 1); + + // Check that a new validator has joined the committee. + test_cluster.fullnode_handle.iota_node.with(|node| { + assert_eq!( + node.state() + .epoch_store_for_testing() + .committee() + .num_members(), + 5 + ); + }); + + // after epoch change the new validator is active and part of the committee + let stakes = client.get_stakes(address).await.unwrap(); + assert!(matches!(stakes[0].stakes[0].status, StakeStatus::Active { + estimated_reward: 0 + })); + + // Starts the validator node process + let new_validator_handle = test_cluster.spawn_new_validator(new_validator).await; + test_cluster.wait_for_epoch_all_nodes(1).await; + + new_validator_handle.with(|node| { + assert!( + node.state() + .is_validator(&node.state().epoch_store_for_testing()) + ); + }); + + test_cluster.force_new_epoch().await; + + let stakes = client.get_stakes(address).await.unwrap(); + assert!(matches!(stakes[0].stakes[0].status, StakeStatus::Active { + estimated_reward + } if estimated_reward > 0)); +} + #[sim_test] async fn test_staking() -> Result<(), anyhow::Error> { let cluster = TestClusterBuilder::new().build().await; @@ -53,10 +231,6 @@ async fn test_staking() -> Result<(), anyhow::Error> { .await?; assert_eq!(5, objects.data.len()); - // Check StakedIota object before test - let staked_iota: Vec = http_client.get_stakes(address).await?; - assert!(staked_iota.is_empty()); - let validator = http_client .get_latest_iota_system_state() .await? @@ -251,10 +425,9 @@ async fn test_timelocked_staking() -> Result<(), anyhow::Error> { let expiration_timestamp_ms = u64::MAX; let label = Option::Some(label_struct_tag_to_string(stardust_upgrade_label_type())); - let timelock_iota = unsafe { + let timelock_iota = { MoveObject::new_from_execution( MoveObjectType::timelocked_iota_balance(), - false, OBJECT_START_VERSION, TimeLock::::new( UID::new(ObjectID::random()), @@ -403,10 +576,9 @@ async fn test_timelocked_unstaking() -> Result<(), anyhow::Error> { let expiration_timestamp_ms = u64::MAX; let label = Option::Some(label_struct_tag_to_string(stardust_upgrade_label_type())); - let timelock_iota = unsafe { + let timelock_iota = { MoveObject::new_from_execution( MoveObjectType::timelocked_iota_balance(), - false, OBJECT_START_VERSION, TimeLock::::new( UID::new(ObjectID::random()), diff --git a/crates/iota-json-rpc-tests/tests/indexer_api.rs b/crates/iota-json-rpc-tests/tests/indexer_api.rs index 793e3b85154..5ceab5078fb 100644 --- a/crates/iota-json-rpc-tests/tests/indexer_api.rs +++ b/crates/iota-json-rpc-tests/tests/indexer_api.rs @@ -66,10 +66,9 @@ async fn test_nft_display_object() -> Result<(), anyhow::Error> { }, }; - let nft_move_object = unsafe { + let nft_move_object = { MoveObject::new_from_execution( MoveObjectType::stardust_nft(), - true, OBJECT_START_VERSION, bcs::to_bytes(&nft).unwrap(), &ProtocolConfig::get_for_min_version(), diff --git a/crates/iota-json-rpc-types/src/iota_object.rs b/crates/iota-json-rpc-types/src/iota_object.rs index 380c2ab512d..45d1eaff03d 100644 --- a/crates/iota-json-rpc-types/src/iota_object.rs +++ b/crates/iota-json-rpc-types/src/iota_object.rs @@ -586,10 +586,9 @@ impl TryInto for IotaObjectData { fn try_into(self) -> Result { let protocol_config = ProtocolConfig::get_for_min_version(); let data = match self.bcs { - Some(IotaRawData::MoveObject(o)) => Data::Move(unsafe { + Some(IotaRawData::MoveObject(o)) => Data::Move({ MoveObject::new_from_execution( o.type_().clone().into(), - o.has_public_transfer, o.version, o.bcs_bytes, &protocol_config, @@ -841,7 +840,6 @@ pub struct IotaParsedMoveObject { #[serde_as(as = "IotaStructTag")] #[schemars(with = "String")] pub type_: StructTag, - pub has_public_transfer: bool, pub fields: IotaMoveStruct, } @@ -856,13 +854,11 @@ impl IotaMoveObject for IotaParsedMoveObject { if let IotaMoveStruct::WithTypes { type_, fields } = move_struct { IotaParsedMoveObject { type_, - has_public_transfer: object.has_public_transfer(), fields: IotaMoveStruct::WithFields(fields), } } else { IotaParsedMoveObject { type_: object.type_().clone().into(), - has_public_transfer: object.has_public_transfer(), fields: move_struct, } }, @@ -925,7 +921,6 @@ pub struct IotaRawMoveObject { #[serde(rename = "type")] #[serde_as(as = "IotaStructTag")] pub type_: StructTag, - pub has_public_transfer: bool, pub version: SequenceNumber, #[serde_as(as = "Base64")] #[schemars(with = "Base64")] @@ -936,7 +931,6 @@ impl From for IotaRawMoveObject { fn from(o: MoveObject) -> Self { Self { type_: o.type_().clone().into(), - has_public_transfer: o.has_public_transfer(), version: o.version(), bcs_bytes: o.into_contents(), } @@ -950,7 +944,6 @@ impl IotaMoveObject for IotaRawMoveObject { ) -> Result { Ok(Self { type_: object.type_().clone().into(), - has_public_transfer: object.has_public_transfer(), version: object.version(), bcs_bytes: object.into_contents(), }) diff --git a/crates/iota-json-rpc/src/governance_api.rs b/crates/iota-json-rpc/src/governance_api.rs index 86d88d0aeb3..e4ad229134c 100644 --- a/crates/iota-json-rpc/src/governance_api.rs +++ b/crates/iota-json-rpc/src/governance_api.rs @@ -42,7 +42,6 @@ use crate::{ error::{Error, IotaRpcInputError, RpcInterimResult}, logger::FutureWithTracing as _, }; - #[derive(Clone)] pub struct GovernanceReadApi { state: Arc, @@ -194,12 +193,13 @@ impl GovernanceReadApi { ); let system_state = self.get_system_state()?; - let system_state_summary: IotaSystemStateSummary = - system_state.clone().into_iota_system_state_summary(); + let system_state_summary = system_state.clone().into_iota_system_state_summary(); let rates = exchange_rates(&self.state, system_state_summary.epoch) .await? .into_iter() + // Try to find for any pending active validator + .chain(pending_validator_exchange_rate(&self.state)?.into_iter()) .map(|rates| (rates.pool_id, rates)) .collect::>(); @@ -568,6 +568,18 @@ async fn exchange_rates( )); } + validator_exchange_rates(state, tables) +} + +/// Get validator exchange rates +fn validator_exchange_rates( + state: &Arc, + tables: Vec<(IotaAddress, ObjectID, ObjectID, u64, bool)>, +) -> RpcInterimResult> { + if tables.is_empty() { + return Ok(vec![]); + }; + let mut exchange_rates = vec![]; // Get exchange rates for each validator for (address, pool_id, exchange_rates_id, exchange_rates_size, active) in tables { @@ -600,9 +612,34 @@ async fn exchange_rates( rates, }); } + Ok(exchange_rates) } +/// Check if there is any pending validator and get its exchange rates +fn pending_validator_exchange_rate( + state: &Arc, +) -> RpcInterimResult> { + let system_state = state.get_system_state()?; + let object_store = state.get_object_store(); + + // Try to find for any pending active validator + let tables = system_state + .get_pending_active_validators(object_store)? + .into_iter() + .map(|pending_active_validator| { + ( + pending_active_validator.iota_address, + pending_active_validator.staking_pool_id, + pending_active_validator.exchange_rates_id, + pending_active_validator.exchange_rates_size, + false, + ) + }) + .collect::>(); + + validator_exchange_rates(state, tables) +} #[derive(Clone, Debug)] pub struct ValidatorExchangeRates { pub address: IotaAddress, diff --git a/crates/iota-light-client/example_config/528.chk b/crates/iota-light-client/example_config/528.chk new file mode 100644 index 00000000000..a01f1b7b831 Binary files /dev/null and b/crates/iota-light-client/example_config/528.chk differ diff --git a/crates/iota-light-client/example_config/532.json b/crates/iota-light-client/example_config/528.json similarity index 77% rename from crates/iota-light-client/example_config/532.json rename to crates/iota-light-client/example_config/528.json index ce2a2fb8831..b9582183b37 100644 --- a/crates/iota-light-client/example_config/532.json +++ b/crates/iota-light-client/example_config/528.json @@ -1,17 +1,18 @@ { "data": { "epoch": 1, - "sequence_number": 532, - "network_total_transactions": 2332, - "content_digest": "2tKPsa73Wd5LTzLKUE13GCsM9dekswsGtq4hFdsG1WGb", - "previous_digest": "6yZrXpcw5B5zwEoZK5TRHoJBDJu6GjYKzqpbaVdpc8j5", + "sequence_number": 528, + "network_total_transactions": 2316, + "content_digest": "4Vp72xpiXb9UqY9U5JxKRuyphDVxxjbsz833nFekCsLp", + "previous_digest": "46Yic5WRk9aFANVfjdd59YvSNpgHbbqFupYg6LUZp6t7", "epoch_rolling_gas_cost_summary": { "computationCost": "0", + "computationCostBurned": "0", "storageCost": "0", "storageRebate": "0", "nonRefundableStorageFee": "0" }, - "timestamp_ms": 1730201217234, + "timestamp_ms": 1731087154542, "checkpoint_commitments": [], "end_of_epoch_data": { "nextEpochCommittee": [ @@ -36,7 +37,7 @@ "epochCommitments": [ { "ECMHLiveObjectSetDigest": { - "digest": "Cx7QDKwottqp4bs2eP5pL4XApGvopmXB1KmpYAZY1Gf5" + "digest": "C4emJ4QDne9bar95SWEF6MsbyRDY7jf3o18YSKUWTe2G" } } ], @@ -49,7 +50,7 @@ }, "auth_signature": { "epoch": 1, - "signature": "tx6eEhYvWH0wOk2yiuZmpzelWbIRLpVz4D8IN5iz1HVeQXClzEqVSlgQpnAkDMil", + "signature": "l/Aj6W6FGHe+E23yLCFyTaoPm3LWXqWE6yIRzX79SNifh1q5D9Ude1H7yRHsOaE2", "signers_map": [ 58, 48, @@ -67,11 +68,11 @@ 0, 0, 0, + 0, + 0, 1, 0, 2, - 0, - 3, 0 ] } diff --git a/crates/iota-light-client/example_config/532_full.json b/crates/iota-light-client/example_config/528_full.json similarity index 84% rename from crates/iota-light-client/example_config/532_full.json rename to crates/iota-light-client/example_config/528_full.json index e5cc2b4a22a..987942c5ee0 100644 --- a/crates/iota-light-client/example_config/532_full.json +++ b/crates/iota-light-client/example_config/528_full.json @@ -2,17 +2,18 @@ "checkpoint_summary": { "data": { "epoch": 1, - "sequence_number": 532, - "network_total_transactions": 2332, - "content_digest": "2tKPsa73Wd5LTzLKUE13GCsM9dekswsGtq4hFdsG1WGb", - "previous_digest": "6yZrXpcw5B5zwEoZK5TRHoJBDJu6GjYKzqpbaVdpc8j5", + "sequence_number": 528, + "network_total_transactions": 2316, + "content_digest": "4Vp72xpiXb9UqY9U5JxKRuyphDVxxjbsz833nFekCsLp", + "previous_digest": "46Yic5WRk9aFANVfjdd59YvSNpgHbbqFupYg6LUZp6t7", "epoch_rolling_gas_cost_summary": { "computationCost": "0", + "computationCostBurned": "0", "storageCost": "0", "storageRebate": "0", "nonRefundableStorageFee": "0" }, - "timestamp_ms": 1730201217234, + "timestamp_ms": 1731087154542, "checkpoint_commitments": [], "end_of_epoch_data": { "nextEpochCommittee": [ @@ -37,7 +38,7 @@ "epochCommitments": [ { "ECMHLiveObjectSetDigest": { - "digest": "Cx7QDKwottqp4bs2eP5pL4XApGvopmXB1KmpYAZY1Gf5" + "digest": "C4emJ4QDne9bar95SWEF6MsbyRDY7jf3o18YSKUWTe2G" } } ], @@ -50,7 +51,7 @@ }, "auth_signature": { "epoch": 1, - "signature": "tx6eEhYvWH0wOk2yiuZmpzelWbIRLpVz4D8IN5iz1HVeQXClzEqVSlgQpnAkDMil", + "signature": "l/Aj6W6FGHe+E23yLCFyTaoPm3LWXqWE6yIRzX79SNifh1q5D9Ude1H7yRHsOaE2", "signers_map": [ 58, 48, @@ -68,11 +69,11 @@ 0, 0, 0, + 0, + 0, 1, 0, 2, - 0, - 3, 0 ] } @@ -81,12 +82,12 @@ "V1": { "transactions": [ { - "transaction": "23TybmpYcTxZ76cHK3WnyVZhcmjjH7PnpZfMLvEeaG2U", - "effects": "77cTGQ5A97R1kNCqxBXJEyviz6eJJV6GKMtXRh6ZEXfu" + "transaction": "5rPwBdt6MqTmwNeCbBNTzdXStempK81mHpd3MuCfN4Mt", + "effects": "5x7jAFA56ZyMVKmAomcbP2uwLLqLgRzuRcQfZJHSW53h" }, { - "transaction": "326n9ZcQDrJVxyFL8aWkknSmFahVxwpqZQ5q5ySmWrUy", - "effects": "3heGnAzfkz3DcoBMVUh5T6RhNtoUJ6MM5nCuk45u6vfw" + "transaction": "99opjMtEQQnYWw48gQLkHazPoKU4yUkZ15rC92L12XGy", + "effects": "Gvi8UkU5VYbcpG1aQizESXe6pYsRQZQRirkb3goT5Yt2" } ], "user_signatures": [ @@ -113,10 +114,10 @@ "kind": { "ConsensusCommitPrologueV1": { "epoch": 1, - "round": 1058, + "round": 1057, "sub_dag_index": null, - "commit_timestamp_ms": 1730201217234, - "consensus_commit_digest": "4gKnNQLRsxwGyXvXtT4UvufbV6TRhfqWm5HpLn4ayQ3V", + "commit_timestamp_ms": 1731087154542, + "consensus_commit_digest": "3ioKAMf1LYS9UGBxbfxUWR9SmHeEDmURKCiS3XgV5xZT", "consensus_determined_version_assignments": { "CancelledTransactions": [] } @@ -152,17 +153,18 @@ "executed_epoch": 1, "gas_used": { "computationCost": "0", + "computationCostBurned": "0", "storageCost": "0", "storageRebate": "0", "nonRefundableStorageFee": "0" }, - "transaction_digest": "23TybmpYcTxZ76cHK3WnyVZhcmjjH7PnpZfMLvEeaG2U", + "transaction_digest": "5rPwBdt6MqTmwNeCbBNTzdXStempK81mHpd3MuCfN4Mt", "gas_object_index": null, "events_digest": null, "dependencies": [ - "HViuzxiXGNhxBy9yrWoTSS1d7YNJcZBkGi7UhBoYN8CK" + "ENnkQFHpkBxGwTji348YxusCbSSdrJhF3UY1fFyZbabX" ], - "lamport_version": 2112, + "lamport_version": 2098, "changed_objects": [ [ "0x0000000000000000000000000000000000000000000000000000000000000006", @@ -170,8 +172,8 @@ "input_state": { "Exist": [ [ - 2111, - "3bfq3QcfkrPWos8abZYhtp4unj2e5H8RWiSFae6RWb7S" + 2097, + "4pq7ERmcJ5po6R4zc7nEbE9LkJ8o1o7X6UQZTRFdZQ3a" ], { "Shared": { @@ -182,7 +184,7 @@ }, "output_state": { "ObjectWrite": [ - "BdMXkcFA1K7j3aGkNq5sop1sGfHhLjjsBYXEAhsU9AHi", + "7tCgmTb1XUtbTnCj8zyBGP5NwKyEC63i6YjLMDiwd81k", { "Shared": { "initial_shared_version": 1 @@ -211,8 +213,7 @@ "type_args": [] } }, - "has_public_transfer": false, - "version": 2111, + "version": 2097, "contents": [ 0, 0, @@ -246,11 +247,11 @@ 0, 0, 6, - 152, - 104, - 7, - 216, - 146, + 52, + 189, + 213, + 12, + 147, 1, 0, 0 @@ -262,7 +263,7 @@ "initial_shared_version": 1 } }, - "previous_transaction": "HViuzxiXGNhxBy9yrWoTSS1d7YNJcZBkGi7UhBoYN8CK", + "previous_transaction": "ENnkQFHpkBxGwTji348YxusCbSSdrJhF3UY1fFyZbabX", "storage_rebate": 0 } ], @@ -278,8 +279,7 @@ "type_args": [] } }, - "has_public_transfer": false, - "version": 2112, + "version": 2098, "contents": [ 0, 0, @@ -313,11 +313,11 @@ 0, 0, 6, - 210, - 104, - 7, - 216, - 146, + 110, + 189, + 213, + 12, + 147, 1, 0, 0 @@ -329,7 +329,7 @@ "initial_shared_version": 1 } }, - "previous_transaction": "23TybmpYcTxZ76cHK3WnyVZhcmjjH7PnpZfMLvEeaG2U", + "previous_transaction": "5rPwBdt6MqTmwNeCbBNTzdXStempK81mHpd3MuCfN4Mt", "storage_rebate": 0 } ] @@ -356,7 +356,7 @@ "computation_charge": 0, "storage_rebate": 0, "non_refundable_storage_fee": 0, - "epoch_start_timestamp_ms": 1730201217234, + "epoch_start_timestamp_ms": 1731087154542, "system_packages": [] } } @@ -392,15 +392,16 @@ "executed_epoch": 1, "gas_used": { "computationCost": "0", + "computationCostBurned": "0", "storageCost": "0", "storageRebate": "0", "nonRefundableStorageFee": "0" }, - "transaction_digest": "326n9ZcQDrJVxyFL8aWkknSmFahVxwpqZQ5q5ySmWrUy", + "transaction_digest": "99opjMtEQQnYWw48gQLkHazPoKU4yUkZ15rC92L12XGy", "gas_object_index": null, - "events_digest": "62T8x8JxJ1wmGNoNKnmboPNFPN19vfqZeupbQ5NQpCDH", + "events_digest": "FM8iE2p9uBkVSuFHwMXCinwAkBcR3iw1efnhH6ECQjUh", "dependencies": [ - "8eZxmVup35tyyVdZ31sKB9av3iNMKuJrxZ8ouJ4SRWtu" + "4DYVUL5tad1oC5xusubpY17vffqAyBkjmQfCQRdd3KRu" ], "lamport_version": 3, "changed_objects": [ @@ -411,7 +412,7 @@ "Exist": [ [ 2, - "EYoEn9QcWfA3rxFQdSGSaouNXj2D21tGvWM7ctmBhqyo" + "DufRhDaFeic4pohypZWdB1yTpTixroHerWkQu4Rpc6fo" ], { "Shared": { @@ -422,7 +423,7 @@ }, "output_state": { "ObjectWrite": [ - "5KJjRy2WknTpWbU9Nr5Z9AVRyFErsJMi228npzNXksGN", + "4r7zPgS4bzG14TVFgfSE1xp547UYqtEmEct9QxYtMtDt", { "Shared": { "initial_shared_version": 1 @@ -434,29 +435,14 @@ } ], [ - "0x0ff024c8e20d71bc9762bd852772536512584460b920ec9235a6651a4305faeb", - { - "input_state": "NotExist", - "output_state": { - "ObjectWrite": [ - "7Xz4Bp4cqfdYB2zBM7XZyJBHfWMdexT4e4eAacrZYa1D", - { - "AddressOwner": "0x2db19ce7b296633e49f48e863c2b08d5ea0a885273bfa574e2db0a85ece225e5" - } - ] - }, - "id_operation": "Created" - } - ], - [ - "0x28ca70d96d6d9ccd8719332ebbde3fb0485d1559920d852609cba643bd113c35", + "0x2ebc467a4825ed64ea9fabb6e403dfa784dff2d0e61e45841246bb96e581b4ef", { "input_state": "NotExist", "output_state": { "ObjectWrite": [ - "5ZzaULPNAAfMrR8rA9Vv34dp2wkQ6VqNBjcCx55hfwSA", + "BsqgHwwnGL9GTdamcUMitvvKGvvYAGQ6sZAPRGGv2eAW", { - "AddressOwner": "0x3bfb34ad6f452c61add36979ce9308a507f4ca7749817ba5a19a57d4ff2cd53f" + "ObjectOwner": "0x8c95d95a13b79ed01819067ed1093f99db1cf958a83c445013c7b3592bdbcb98" } ] }, @@ -464,14 +450,14 @@ } ], [ - "0x37b6a35be5fd952c828961ceb90d1c8c5aa6c78c2803540773ea898af97c0edd", + "0x507caa85cf7ecec5ed3364aec3340c512e74adbb5d21a4976084c4af66786245", { "input_state": "NotExist", "output_state": { "ObjectWrite": [ - "5zQUpRzN7FhVaNdBcBziTHh9tdiQQGYiYhpfCDfgLZbS", + "6NKL9jrJ9AjL3QxRXqfE1ecy2Lgb7bvKAXLsSmFb684c", { - "ObjectOwner": "0x3c32b42be3a2db1d7ddd51c85375127ff6aefb276834193e469e01e25d48f555" + "AddressOwner": "0x2919b85edd777017e40be03ad63ab6cee20a788d6eb2019559a558ada19ae71b" } ] }, @@ -485,7 +471,7 @@ "Exist": [ [ 2, - "BiBPtr9KpWGrxjeWSFdLWbMCEHjT5TJxocYs6bzkW8dn" + "3pSX1fF1p39Rvx84UbJWhNHKAwnuo8FYBGR2i3CCpFVW" ], { "ObjectOwner": "0x0000000000000000000000000000000000000000000000000000000000000005" @@ -494,7 +480,7 @@ }, "output_state": { "ObjectWrite": [ - "GxfNuA2vW1Zdrj5G289Tdh6HsWdACP89oFniTQuuZfEM", + "FeQXd2zM4oBcJpfdB7WMs8W9UwQoL6EH1yuWabJfxZZs", { "ObjectOwner": "0x0000000000000000000000000000000000000000000000000000000000000005" } @@ -504,14 +490,29 @@ } ], [ - "0x8ee75273d26a842889b6af6298184c70aa954955e0a8e4d85fe3eb35fef8eea2", + "0x71424ed073121a1911f3687403699b2389ab0365a0f7f8c37cc6d035cbda4097", + { + "input_state": "NotExist", + "output_state": { + "ObjectWrite": [ + "7FuHXSSce6kgiuYGirm9Se5AWtGD23aY2pJXzj8mBN8v", + { + "ObjectOwner": "0x19b777f952e60d1e9269f30c271c56b77638e11e915f3a247c141f11eabd11d9" + } + ] + }, + "id_operation": "Created" + } + ], + [ + "0x8db6bd54ad4f222063e3fe2b959d6254798224316ca407cfc21b66eaca1b9547", { "input_state": "NotExist", "output_state": { "ObjectWrite": [ - "BLdGrapxU3yDKCuaNfMnhfUFvE5q9JLFYUrRsvzqeaJT", + "6WUTpi3KJUkA4wwamKTQhQYwPoMdMahF1ec5yF1P15pW", { - "ObjectOwner": "0x131c437cac81c9875e4840c5265f232c2b4be1b28becda2d90e308fb722d2889" + "AddressOwner": "0xc0afe4713f5f894ab2d5696899cec27c8dd3ebcb8dd06811193f1cdd2f7458e3" } ] }, @@ -519,14 +520,14 @@ } ], [ - "0xba3c6b79e9185ef9be04d56695397a9020301c2978ad56afc9baab620fda1989", + "0x8fc3ae151d8cd905880fe12a704d7c52bef474f686d475b1ed0e0413e947761c", { "input_state": "NotExist", "output_state": { "ObjectWrite": [ - "CczgkG3YpZXaX94wSTqovyhiKxqP1paMrHsezHYBRyv3", + "BBm7ikSuKKhc9te9hQW1EbtFFtAi7BKhycqLK96MkZyt", { - "AddressOwner": "0x32482a229f83bace2da4c90b4dd99c8a73063a6a8ddc5bd6cc99ded87064912a" + "AddressOwner": "0x43e8b5e5be1ac68e8ca24f3fa4e9a850fa2ef000f7fcc805243dde365ee94408" } ] }, @@ -534,14 +535,14 @@ } ], [ - "0xbfe048dd2f0450df5e8647ec18e648a3aea1246992701bc9a851037dc7279298", + "0x9f1198b4e3c97e133e613a37cefadf96ea2ec4116d4f2cbf5289641789eadf86", { "input_state": "NotExist", "output_state": { "ObjectWrite": [ - "CqjWmJFDEBgijLvHHc6ozHnUJR6c63SDDc3u2D73pjk6", + "8mdv9nUigSM28UTLLF62rm8NTNP9AsibhJoCqpR2VRJQ", { - "ObjectOwner": "0x791f65cc868cc6ef0bc0ff4028939f10b96270274481cdebf421d647bef00b6e" + "ObjectOwner": "0xdf3e1b495d7540f4d64bbc79acf8e256e2b9a52b53cc9d0e74295ddf153fcd08" } ] }, @@ -549,14 +550,14 @@ } ], [ - "0xc13d95c6c09f720c4c667184663093b88898e331e4911dc8077197936f470359", + "0xb0904ece1dd63f57a317eac4cce3a14af68a14311109f2b586d5cac5940759cd", { "input_state": "NotExist", "output_state": { "ObjectWrite": [ - "H4XcYS3o3LpVog76LBcyuqzf6L4vHYXFRG8eUHeydS2g", + "w8zdCmdcfNTqj334KxaGNkF1itoWgyj3xP89etnJYZA", { - "AddressOwner": "0x45e45dbd905642cc2ca9c3cfd1a0a1f9517758e5d98deb676040c49340c8b267" + "ObjectOwner": "0x8392eceb8bc7a250d4488ce8fdbaf3651333ef18e5732b56416337839fad5d85" } ] }, @@ -564,14 +565,14 @@ } ], [ - "0xfc4360fe27e0682f68fa6cb7286e5d136b36ac6337d12fa2337f912db919e42a", + "0xc1d3030ebdcdf46f1fa65366df84ac76439b1b5cc105a9aaf31291029f6393f6", { "input_state": "NotExist", "output_state": { "ObjectWrite": [ - "J2PeXcQtyqshCogHU5p6impsjTTuiUpcKUTh6KkWUgTR", + "2D8CGVWTXh3ypJRkgmF5svcWxkkHUGbancwYdECpSjHn", { - "ObjectOwner": "0x6450460d7e7be475407908e48144f095500bc73cf7254f91c182a45570d0cac6" + "AddressOwner": "0xbee62a773a02ad22d9565589f6f2c344308f6d6f084e2539f51b04685e4c63d5" } ] }, @@ -596,102 +597,102 @@ "type_args": [] }, "contents": [ - 15, - 179, - 7, - 220, - 99, - 116, - 11, - 43, - 34, - 99, - 124, - 173, - 183, - 91, - 122, - 153, - 83, - 227, - 216, - 174, - 143, - 123, - 179, - 93, - 16, + 205, + 23, + 237, + 101, + 196, 223, - 139, - 50, - 20, - 184, - 146, - 41, - 59, - 251, - 52, - 173, - 111, - 69, - 44, - 97, - 173, - 211, - 105, - 121, - 206, - 147, - 8, 165, - 7, - 244, - 202, - 119, + 144, 73, - 129, - 123, - 165, - 161, - 154, - 87, - 212, - 255, - 44, - 213, - 63, - 59, - 251, - 52, - 173, - 111, - 69, - 44, - 97, - 173, - 211, + 40, + 152, + 156, + 38, + 172, + 6, + 187, + 80, + 131, + 252, + 156, + 198, 105, + 210, + 20, + 227, + 192, 121, - 206, - 147, + 85, + 126, + 84, + 209, + 174, + 67, + 232, + 181, + 229, + 190, + 26, + 198, + 142, + 140, + 162, + 79, + 63, + 164, + 233, + 168, + 80, + 250, + 46, + 240, + 0, + 247, + 252, + 200, + 5, + 36, + 61, + 222, + 54, + 94, + 233, + 68, 8, - 165, - 7, - 244, - 202, - 119, - 73, - 129, - 123, - 165, - 161, - 154, - 87, - 212, - 255, - 44, - 213, + 67, + 232, + 181, + 229, + 190, + 26, + 198, + 142, + 140, + 162, + 79, 63, + 164, + 233, + 168, + 80, + 250, + 46, + 240, + 0, + 247, + 252, + 200, + 5, + 36, + 61, + 222, + 54, + 94, + 233, + 68, + 8, 1, 0, 0, @@ -721,102 +722,102 @@ "type_args": [] }, "contents": [ - 209, - 123, - 224, - 206, - 121, - 241, - 77, - 244, - 72, - 86, - 107, - 103, - 131, + 207, + 45, + 23, + 237, + 112, + 22, + 155, + 235, + 198, + 250, + 75, + 26, + 133, 192, - 239, - 101, - 12, - 50, - 118, - 14, - 142, - 183, - 157, - 157, + 213, + 197, + 147, 157, - 178, - 187, - 220, - 115, - 108, - 181, - 43, - 45, - 177, - 156, + 67, + 6, + 247, + 136, + 54, + 200, + 184, 231, - 178, - 150, - 99, - 62, - 73, - 244, - 142, - 134, - 60, + 36, + 53, + 236, 43, - 8, + 58, + 87, + 192, + 175, + 228, + 113, + 63, + 95, + 137, + 74, + 178, 213, - 234, - 10, - 136, - 82, - 115, - 191, - 165, + 105, + 104, + 153, + 206, + 194, + 124, + 141, + 211, + 235, + 203, + 141, + 208, + 104, + 17, + 25, + 63, + 28, + 221, + 47, 116, - 226, - 219, - 10, - 133, - 236, - 226, - 37, - 229, - 45, - 177, - 156, - 231, + 88, + 227, + 192, + 175, + 228, + 113, + 63, + 95, + 137, + 74, 178, - 150, - 99, - 62, - 73, - 244, - 142, - 134, - 60, - 43, - 8, 213, - 234, - 10, - 136, - 82, - 115, - 191, - 165, + 105, + 104, + 153, + 206, + 194, + 124, + 141, + 211, + 235, + 203, + 141, + 208, + 104, + 17, + 25, + 63, + 28, + 221, + 47, 116, - 226, - 219, - 10, - 133, - 236, - 226, - 37, - 229, + 88, + 227, 1, 0, 0, @@ -846,102 +847,102 @@ "type_args": [] }, "contents": [ - 242, - 245, - 215, - 89, - 82, - 128, + 66, + 108, + 22, + 0, + 65, + 68, + 62, + 159, + 93, + 172, + 188, + 21, 97, - 158, - 1, - 156, - 124, - 176, - 4, - 137, - 192, - 182, - 113, - 144, - 74, - 11, - 72, - 130, - 17, - 145, - 107, - 150, - 212, - 219, - 236, + 116, + 162, + 25, + 223, + 118, + 233, + 195, + 163, + 193, + 85, 228, - 205, - 29, - 50, - 72, + 59, + 227, + 48, + 169, + 105, + 90, + 104, + 169, + 190, + 230, 42, + 119, + 58, + 2, + 173, 34, - 159, - 131, - 186, - 206, - 45, - 164, - 201, - 11, - 77, 217, - 156, - 138, - 115, - 6, - 58, - 106, - 141, - 220, - 91, - 214, - 204, - 153, - 222, - 216, - 112, - 100, - 145, - 42, - 50, - 72, + 86, + 85, + 137, + 246, + 242, + 195, + 68, + 48, + 143, + 109, + 111, + 8, + 78, + 37, + 57, + 245, + 27, + 4, + 104, + 94, + 76, + 99, + 213, + 190, + 230, 42, + 119, + 58, + 2, + 173, 34, - 159, - 131, - 186, - 206, - 45, - 164, - 201, - 11, - 77, 217, - 156, - 138, - 115, - 6, - 58, - 106, - 141, - 220, - 91, - 214, - 204, - 153, - 222, - 216, - 112, - 100, - 145, - 42, + 86, + 85, + 137, + 246, + 242, + 195, + 68, + 48, + 143, + 109, + 111, + 8, + 78, + 37, + 57, + 245, + 27, + 4, + 104, + 94, + 76, + 99, + 213, 1, 0, 0, @@ -971,102 +972,102 @@ "type_args": [] }, "contents": [ - 26, - 73, - 49, - 169, - 67, - 19, - 121, - 35, - 127, - 251, - 115, - 102, - 203, - 11, - 73, - 57, - 227, - 115, - 5, - 39, - 92, - 71, - 87, - 245, - 250, + 82, + 40, + 18, + 20, + 33, + 187, + 48, + 175, 108, - 229, - 163, - 116, - 21, - 52, - 122, - 69, - 228, - 93, - 189, - 144, - 86, - 66, - 204, - 44, - 169, - 195, - 207, - 209, - 160, - 161, - 249, - 81, + 237, + 18, + 12, + 140, + 4, + 173, + 180, + 59, + 61, + 219, + 227, + 74, + 70, + 145, + 19, + 139, + 4, + 25, + 29, + 158, + 51, + 100, + 176, + 41, + 25, + 184, + 94, + 221, 119, - 88, - 229, - 217, + 112, + 23, + 228, + 11, + 224, + 58, + 214, + 58, + 182, + 206, + 226, + 10, + 120, 141, - 235, - 103, - 96, - 64, - 196, - 147, - 64, - 200, + 110, 178, - 103, - 69, - 228, - 93, - 189, - 144, - 86, - 66, - 204, - 44, - 169, - 195, - 207, - 209, - 160, + 1, + 149, + 89, + 165, + 88, + 173, 161, - 249, - 81, + 154, + 231, + 27, + 41, + 25, + 184, + 94, + 221, 119, - 88, - 229, - 217, + 112, + 23, + 228, + 11, + 224, + 58, + 214, + 58, + 182, + 206, + 226, + 10, + 120, 141, - 235, - 103, - 96, - 64, - 196, - 147, - 64, - 200, + 110, 178, - 103, + 1, + 149, + 89, + 165, + 88, + 173, + 161, + 154, + 231, + 27, 1, 0, 0, @@ -1104,41 +1105,41 @@ 0, 0, 0, - 59, - 251, - 52, - 173, - 111, - 69, - 44, - 97, - 173, - 211, - 105, - 121, - 206, - 147, - 8, - 165, - 7, - 244, - 202, - 119, - 73, - 129, - 123, - 165, - 161, - 154, - 87, - 212, - 255, - 44, - 213, - 63, + 67, 232, - 3, - 0, + 181, + 229, + 190, + 26, + 198, + 142, + 140, + 162, + 79, + 63, + 164, + 233, + 168, + 80, + 250, + 46, + 240, + 0, + 247, + 252, + 200, + 5, + 36, + 61, + 222, + 54, + 94, + 233, + 68, + 8, + 232, + 3, + 0, 0, 0, 0, @@ -1222,38 +1223,38 @@ 0, 0, 0, - 45, - 177, - 156, - 231, + 192, + 175, + 228, + 113, + 63, + 95, + 137, + 74, 178, - 150, - 99, - 62, - 73, - 244, - 142, - 134, - 60, - 43, - 8, 213, - 234, - 10, - 136, - 82, - 115, - 191, - 165, + 105, + 104, + 153, + 206, + 194, + 124, + 141, + 211, + 235, + 203, + 141, + 208, + 104, + 17, + 25, + 63, + 28, + 221, + 47, 116, - 226, - 219, - 10, - 133, - 236, - 226, - 37, - 229, + 88, + 227, 232, 3, 0, @@ -1340,38 +1341,38 @@ 0, 0, 0, - 50, - 72, + 190, + 230, 42, + 119, + 58, + 2, + 173, 34, - 159, - 131, - 186, - 206, - 45, - 164, - 201, - 11, - 77, 217, - 156, - 138, - 115, - 6, - 58, - 106, - 141, - 220, - 91, - 214, - 204, - 153, - 222, - 216, - 112, - 100, - 145, - 42, + 86, + 85, + 137, + 246, + 242, + 195, + 68, + 48, + 143, + 109, + 111, + 8, + 78, + 37, + 57, + 245, + 27, + 4, + 104, + 94, + 76, + 99, + 213, 232, 3, 0, @@ -1458,38 +1459,38 @@ 0, 0, 0, - 69, - 228, - 93, - 189, - 144, - 86, - 66, - 204, - 44, - 169, - 195, - 207, - 209, - 160, - 161, - 249, - 81, + 41, + 25, + 184, + 94, + 221, 119, - 88, - 229, - 217, + 112, + 23, + 228, + 11, + 224, + 58, + 214, + 58, + 182, + 206, + 226, + 10, + 120, 141, - 235, - 103, - 96, - 64, - 196, - 147, - 64, - 200, + 110, 178, - 103, + 1, + 149, + 89, + 165, + 88, + 173, + 161, + 154, + 231, + 27, 232, 3, 0, @@ -1672,7 +1673,6 @@ "type_args": [] } }, - "has_public_transfer": false, "version": 2, "contents": [ 0, @@ -1723,7 +1723,7 @@ "initial_shared_version": 1 } }, - "previous_transaction": "8eZxmVup35tyyVdZ31sKB9av3iNMKuJrxZ8ouJ4SRWtu", + "previous_transaction": "4DYVUL5tad1oC5xusubpY17vffqAyBkjmQfCQRdd3KRu", "storage_rebate": 0 }, { @@ -1747,7 +1747,6 @@ ] } }, - "has_public_transfer": false, "version": 2, "contents": [ 106, @@ -1814,38 +1813,38 @@ 0, 0, 0, - 57, - 250, - 115, - 22, - 182, - 11, - 178, - 229, - 253, - 205, - 92, - 179, - 236, - 134, - 160, - 75, - 54, - 44, - 186, 33, - 145, - 160, - 137, - 160, - 136, - 5, - 12, - 185, - 38, - 134, 120, - 155, + 211, + 59, + 94, + 251, + 190, + 29, + 133, + 24, + 140, + 237, + 130, + 57, + 191, + 221, + 188, + 132, + 174, + 6, + 148, + 192, + 142, + 32, + 59, + 66, + 217, + 202, + 103, + 195, + 2, + 210, 0, 240, 105, @@ -1863,38 +1862,38 @@ 24, 0, 4, - 59, - 251, - 52, - 173, - 111, - 69, - 44, - 97, - 173, - 211, - 105, - 121, - 206, - 147, - 8, - 165, - 7, - 244, - 202, - 119, - 73, - 129, - 123, - 165, - 161, - 154, - 87, - 212, - 255, - 44, - 213, + 67, + 232, + 181, + 229, + 190, + 26, + 198, + 142, + 140, + 162, + 79, 63, + 164, + 233, + 168, + 80, + 250, + 46, + 240, + 0, + 247, + 252, + 200, + 5, + 36, + 61, + 222, + 54, + 94, + 233, + 68, + 8, 96, 141, 207, @@ -1993,120 +1992,120 @@ 56, 212, 32, - 32, - 38, - 163, - 54, - 223, - 222, - 200, - 16, - 231, - 136, - 101, - 109, - 60, - 170, - 54, - 183, - 183, - 132, - 232, - 253, - 218, - 17, - 151, - 230, - 164, - 94, - 212, + 196, + 62, 132, - 90, - 230, - 7, + 24, + 163, + 189, + 82, + 102, + 141, + 245, 98, - 32, - 217, - 53, - 60, - 49, - 54, 152, - 131, - 119, - 1, - 32, - 5, - 215, - 206, - 234, - 120, - 214, - 210, - 148, - 142, - 129, - 161, - 106, - 254, - 253, - 73, - 188, - 78, - 237, - 59, - 75, - 133, - 63, - 48, - 175, - 52, - 76, - 124, 156, - 164, - 117, - 75, - 204, - 212, - 49, - 8, - 33, - 96, - 102, - 254, - 60, - 113, + 97, 252, - 79, - 3, - 66, - 110, - 30, - 211, - 234, - 248, - 46, - 26, + 197, + 195, + 47, + 86, 12, - 142, - 136, + 85, + 19, + 174, + 41, + 58, + 124, + 46, + 194, + 31, + 214, + 202, + 227, + 32, + 19, + 59, + 167, + 93, + 117, + 58, + 188, + 191, + 5, + 119, + 233, + 190, + 18, + 97, + 124, + 116, 104, - 199, - 247, - 129, + 64, + 49, + 71, + 93, + 217, + 56, + 139, + 72, + 40, + 147, + 175, + 70, + 71, + 25, + 63, 48, + 137, + 184, + 29, + 114, + 29, + 48, + 118, + 206, 228, - 61, + 215, + 24, + 238, + 59, + 87, + 84, + 81, + 230, + 3, + 166, + 206, + 229, + 252, + 87, + 57, + 38, + 113, 39, - 13, - 72, - 101, - 101, - 199, - 19, - 109, - 21, + 177, + 195, + 229, + 217, + 100, + 174, + 220, + 140, + 204, + 243, + 229, + 203, + 82, + 41, + 10, + 146, + 240, + 229, + 138, + 122, + 9, 11, 118, 97, @@ -2142,11 +2141,11 @@ 99, 112, 47, - 54, - 53, - 52, 52, - 54, + 50, + 53, + 48, + 53, 47, 104, 116, @@ -2172,11 +2171,11 @@ 100, 112, 47, - 54, - 53, - 52, 52, - 56, + 50, + 50, + 53, + 55, 24, 47, 105, @@ -2197,11 +2196,11 @@ 100, 112, 47, - 54, - 53, - 52, - 53, 52, + 49, + 50, + 55, + 51, 0, 0, 0, @@ -2209,38 +2208,38 @@ 0, 0, 0, - 237, - 202, - 141, - 82, - 243, - 82, - 185, - 130, + 193, 172, - 46, - 92, - 14, - 227, + 150, + 93, + 42, + 76, + 232, + 112, + 27, + 20, + 5, 72, - 139, - 162, - 213, - 206, - 89, - 121, - 179, - 214, - 64, - 241, - 40, - 30, - 200, - 224, - 136, - 215, - 39, - 57, + 216, + 182, + 218, + 2, + 154, + 69, + 196, + 72, + 211, + 177, + 54, + 182, + 188, + 223, + 197, + 33, + 134, + 9, + 159, + 212, 0, 0, 0, @@ -2257,38 +2256,38 @@ 0, 0, 0, - 74, - 247, - 153, - 224, - 143, - 124, - 199, - 167, - 208, - 50, - 229, - 166, + 177, + 240, + 130, + 136, + 211, + 97, + 82, 53, - 141, - 230, - 155, - 237, - 8, - 69, - 247, - 162, - 221, - 120, - 65, - 215, - 137, - 47, - 111, - 156, - 51, - 80, - 173, + 42, + 159, + 55, + 118, + 64, + 200, + 24, + 224, + 95, + 133, + 217, + 207, + 178, + 27, + 2, + 36, + 238, + 5, + 33, + 211, + 56, + 174, + 138, + 160, 232, 3, 0, @@ -2297,38 +2296,38 @@ 0, 0, 0, - 15, - 179, - 7, - 220, - 99, - 116, - 11, - 43, - 34, - 99, - 124, - 173, - 183, - 91, - 122, - 153, - 83, - 227, - 216, - 174, - 143, - 123, - 179, - 93, - 16, + 205, + 23, + 237, + 101, + 196, 223, - 139, - 50, + 165, + 144, + 73, + 40, + 152, + 156, + 38, + 172, + 6, + 187, + 80, + 131, + 252, + 156, + 198, + 105, + 210, 20, - 184, - 146, - 41, + 227, + 192, + 121, + 85, + 126, + 84, + 209, + 174, 1, 0, 0, @@ -2363,38 +2362,38 @@ 87, 5, 0, - 100, - 80, - 70, - 13, + 140, + 149, + 217, + 90, + 19, + 183, + 158, + 208, + 24, + 25, + 6, 126, - 123, - 228, - 117, - 64, - 121, - 8, - 228, - 129, + 209, + 9, + 63, + 153, + 219, + 28, + 249, + 88, + 168, + 60, 68, - 240, - 149, 80, - 11, + 19, 199, - 60, - 247, - 37, - 79, - 145, - 193, - 130, - 164, - 85, - 112, - 208, - 202, - 198, + 179, + 89, + 43, + 219, + 203, + 152, 2, 0, 0, @@ -2427,38 +2426,38 @@ 0, 0, 0, - 66, - 171, - 40, - 184, - 198, - 248, - 37, - 80, - 178, - 91, + 165, + 143, + 84, + 159, + 166, + 25, + 12, + 161, + 141, + 32, + 3, + 3, + 139, + 169, 133, - 208, - 36, - 170, - 67, - 205, - 191, - 10, - 49, - 13, - 172, - 27, - 248, - 33, - 15, - 228, - 163, - 61, - 156, - 207, + 182, + 69, + 119, + 237, + 71, + 47, + 66, + 63, + 192, + 99, + 180, + 148, + 177, + 252, + 179, 73, - 153, + 49, 0, 0, 0, @@ -2499,38 +2498,38 @@ 0, 0, 0, - 154, - 63, - 153, - 219, - 190, - 60, - 107, - 172, - 161, - 128, - 223, - 192, - 219, - 114, - 132, - 40, + 88, + 133, + 61, + 66, + 13, + 222, + 200, + 212, + 234, 213, - 246, - 227, - 9, - 177, - 93, - 243, - 81, - 126, - 145, - 127, - 241, - 139, - 224, - 194, + 88, + 180, + 147, + 113, + 102, + 159, + 0, + 78, + 17, + 138, + 135, + 26, + 79, + 98, + 16, 8, + 194, + 99, + 131, + 241, + 33, + 37, 0, 0, 0, @@ -2539,38 +2538,38 @@ 0, 0, 0, - 45, - 177, - 156, - 231, + 192, + 175, + 228, + 113, + 63, + 95, + 137, + 74, 178, - 150, - 99, - 62, - 73, - 244, - 142, - 134, - 60, - 43, - 8, 213, - 234, - 10, - 136, - 82, - 115, - 191, - 165, + 105, + 104, + 153, + 206, + 194, + 124, + 141, + 211, + 235, + 203, + 141, + 208, + 104, + 17, + 25, + 63, + 28, + 221, + 47, 116, - 226, - 219, - 10, - 133, - 236, - 226, - 37, - 229, + 88, + 227, 96, 153, 242, @@ -2669,120 +2668,120 @@ 26, 16, 32, - 122, - 3, - 30, - 157, - 52, - 195, - 36, - 160, - 76, - 194, - 183, - 16, - 106, - 36, - 32, - 2, - 216, - 206, - 21, - 7, - 4, - 151, - 70, - 39, - 234, - 215, - 20, - 41, - 150, - 113, - 224, + 124, + 182, + 186, 91, - 32, - 3, - 60, - 195, - 7, + 12, + 170, + 131, 177, - 11, - 189, - 198, - 69, - 193, - 118, - 101, - 132, - 133, - 243, - 255, - 102, - 108, - 2, - 133, - 7, + 61, + 203, + 127, + 80, + 232, + 52, + 130, + 1, + 139, + 38, + 18, + 19, + 17, 68, - 189, - 150, - 46, - 93, - 146, + 191, + 185, + 79, + 7, + 213, + 179, + 21, + 145, + 211, + 187, + 32, + 94, + 91, + 130, + 163, + 159, + 253, + 136, + 192, + 238, + 131, + 218, + 155, + 62, + 192, 0, + 198, + 173, + 130, + 103, + 59, + 148, + 58, + 239, 141, - 222, - 107, - 252, + 231, + 179, + 8, + 76, + 140, + 228, + 117, + 96, 48, - 173, - 72, - 33, - 196, - 123, - 102, - 115, - 188, - 207, - 117, - 48, - 189, - 20, - 63, - 36, - 94, - 101, - 110, - 96, - 96, + 149, + 156, + 76, + 233, + 34, + 137, + 19, 218, - 135, - 207, - 130, - 60, - 108, - 28, - 33, - 226, - 4, - 178, - 120, - 120, - 61, - 127, - 163, - 62, + 66, + 180, + 247, + 89, + 225, + 191, + 83, + 121, + 39, + 43, + 112, + 84, + 165, + 35, 231, - 69, - 205, - 199, - 183, - 145, - 196, - 92, - 33, - 251, - 211, + 134, + 23, + 125, + 5, + 153, + 229, + 197, + 243, + 25, + 147, + 7, + 167, + 218, + 65, + 169, + 20, + 123, + 151, + 209, + 118, + 154, + 4, + 53, + 71, + 105, 11, 118, 97, @@ -2818,11 +2817,11 @@ 99, 112, 47, - 54, + 51, + 51, 53, 52, - 51, - 54, + 57, 47, 104, 116, @@ -2848,11 +2847,11 @@ 100, 112, 47, - 54, - 53, 52, - 51, - 56, + 53, + 53, + 55, + 55, 24, 47, 105, @@ -2873,11 +2872,11 @@ 100, 112, 47, - 54, - 53, - 52, - 52, + 51, + 51, 52, + 57, + 49, 0, 0, 0, @@ -2885,38 +2884,38 @@ 0, 0, 0, - 139, - 224, - 68, - 32, - 91, - 176, - 203, - 154, - 171, - 120, - 35, - 40, - 91, - 57, - 179, - 164, - 23, - 110, - 253, - 173, - 253, - 143, - 209, - 90, - 0, + 250, + 44, + 99, + 101, + 202, + 88, + 5, 61, - 90, - 186, - 109, - 177, + 253, + 24, + 51, + 26, + 87, + 210, + 184, + 240, + 42, + 40, + 131, + 205, 59, - 90, + 201, + 168, + 247, + 101, + 11, + 54, + 150, + 130, + 210, + 2, + 86, 0, 0, 0, @@ -2933,38 +2932,38 @@ 0, 0, 0, - 18, - 5, + 102, + 140, + 54, + 205, + 193, + 218, + 197, + 97, + 35, + 198, + 30, + 231, + 98, + 41, + 134, + 110, + 115, + 97, + 203, 29, - 220, - 228, - 186, - 162, - 227, - 204, - 127, - 217, - 247, - 93, 81, - 88, - 63, - 196, - 75, - 65, - 142, - 11, - 57, - 159, - 31, - 113, - 251, - 185, - 116, - 209, - 4, - 123, - 14, + 3, + 42, + 58, + 45, + 152, + 33, + 80, + 128, + 118, + 115, + 111, 232, 3, 0, @@ -2973,38 +2972,38 @@ 0, 0, 0, - 209, - 123, - 224, - 206, - 121, - 241, - 77, - 244, - 72, - 86, - 107, - 103, - 131, - 192, - 239, - 101, - 12, - 50, - 118, - 14, - 142, - 183, - 157, - 157, + 207, + 45, + 23, + 237, + 112, + 22, + 155, + 235, + 198, + 250, + 75, + 26, + 133, + 192, + 213, + 197, + 147, 157, - 178, - 187, - 220, - 115, - 108, - 181, + 67, + 6, + 247, + 136, + 54, + 200, + 184, + 231, + 36, + 53, + 236, 43, + 58, + 87, 1, 0, 0, @@ -3039,38 +3038,38 @@ 87, 5, 0, - 121, - 31, - 101, - 204, - 134, - 140, - 198, - 239, - 11, - 192, - 255, + 223, + 62, + 27, + 73, + 93, + 117, 64, - 40, - 147, - 159, - 16, - 185, - 98, - 112, - 39, - 68, - 129, - 205, - 235, 244, - 33, 214, - 71, - 190, - 240, - 11, - 110, + 75, + 188, + 121, + 172, + 248, + 226, + 86, + 226, + 185, + 165, + 43, + 83, + 204, + 157, + 14, + 116, + 41, + 93, + 223, + 21, + 63, + 205, + 8, 2, 0, 0, @@ -3103,38 +3102,38 @@ 0, 0, 0, - 162, + 60, + 19, + 165, + 167, + 113, + 73, + 173, + 158, + 249, + 1, + 137, + 200, + 167, 2, - 46, - 57, - 140, - 215, - 171, - 207, - 199, - 51, - 119, - 103, - 99, - 159, - 136, - 104, - 178, - 52, - 54, - 253, - 140, + 6, + 36, + 233, + 143, + 38, + 144, + 146, + 157, + 93, + 201, + 6, + 141, + 179, 74, - 230, - 132, - 248, - 104, - 75, + 31, + 1, + 243, 249, - 252, - 181, - 229, - 232, 0, 0, 0, @@ -3175,38 +3174,38 @@ 0, 0, 0, - 251, - 213, - 102, - 25, - 149, - 159, - 37, - 192, + 174, + 227, + 90, + 63, + 120, + 139, + 75, 210, - 95, - 204, - 21, - 18, - 42, - 226, - 5, - 226, - 152, - 81, - 144, - 191, - 110, - 76, - 51, - 233, - 213, - 87, - 45, - 246, - 101, - 58, - 130, + 232, + 201, + 40, + 254, + 61, + 139, + 164, + 135, + 89, + 80, + 67, + 197, + 79, + 23, + 193, + 220, + 192, + 27, + 225, + 247, + 132, + 19, + 170, + 106, 0, 0, 0, @@ -3215,46 +3214,46 @@ 0, 0, 0, - 50, - 72, + 190, + 230, 42, - 34, - 159, - 131, - 186, - 206, - 45, - 164, - 201, - 11, - 77, - 217, - 156, - 138, - 115, - 6, + 119, 58, - 106, - 141, - 220, - 91, - 214, - 204, - 153, - 222, - 216, - 112, - 100, - 145, - 42, - 96, + 2, 173, - 222, - 239, - 148, - 216, - 152, - 200, + 34, + 217, + 86, + 85, + 137, + 246, + 242, + 195, + 68, + 48, + 143, + 109, + 111, + 8, + 78, + 37, + 57, + 245, + 27, + 4, + 104, + 94, + 76, + 99, + 213, + 96, + 173, + 222, + 239, + 148, + 216, + 152, + 200, 142, 64, 219, @@ -3345,120 +3344,120 @@ 88, 242, 32, - 97, - 138, - 198, - 62, - 136, - 198, + 30, + 37, + 183, + 240, 103, - 175, - 249, - 91, - 77, - 120, - 56, - 146, - 191, - 105, - 25, - 87, - 27, - 118, - 59, - 62, - 33, - 84, - 159, - 132, - 242, - 67, - 253, - 50, - 9, - 132, - 32, - 211, - 127, - 23, - 124, - 68, - 158, - 122, - 141, - 69, - 188, - 41, - 144, - 117, - 211, - 169, - 65, + 163, + 179, + 125, + 63, + 45, + 181, + 93, + 28, + 89, + 229, + 5, + 106, + 163, + 206, + 78, + 29, + 199, + 170, + 104, + 45, + 224, 239, - 69, 38, - 170, - 84, - 174, - 198, - 7, - 179, + 161, + 81, + 144, + 126, + 32, + 126, + 135, + 13, + 21, 110, - 215, 182, - 252, - 113, - 72, - 226, - 48, - 133, - 8, - 105, - 153, - 110, - 47, - 196, - 176, - 44, - 252, + 43, + 100, + 73, + 50, + 39, + 165, + 30, + 73, + 87, + 94, + 30, 140, - 171, - 99, - 25, - 5, - 109, - 170, - 61, - 34, + 210, + 23, + 43, + 12, 234, - 19, + 159, + 61, + 202, + 207, + 104, + 212, + 250, + 231, + 63, + 48, + 130, + 188, + 193, + 4, + 218, + 97, + 149, + 191, + 5, 78, - 134, - 220, - 12, + 7, + 112, + 33, + 68, + 224, + 59, + 39, + 98, + 169, + 118, + 239, + 107, + 148, + 29, + 214, 12, - 146, - 181, - 134, - 46, - 50, - 246, - 204, - 83, - 195, - 216, + 75, + 189, + 224, + 32, + 251, + 184, + 107, + 66, + 33, + 222, + 190, + 35, + 51, + 112, + 199, 58, - 47, - 246, - 133, - 52, - 153, - 89, - 95, - 128, - 57, - 13, - 156, + 214, + 198, + 43, + 186, + 235, + 19, 11, 118, 97, @@ -3494,11 +3493,11 @@ 99, 112, 47, + 51, 54, + 55, + 48, 53, - 52, - 53, - 54, 47, 104, 116, @@ -3524,11 +3523,11 @@ 100, 112, 47, + 51, + 57, + 50, 54, - 53, - 52, - 53, - 56, + 57, 24, 47, 105, @@ -3549,11 +3548,11 @@ 100, 112, 47, - 54, - 53, 52, - 54, 52, + 50, + 53, + 55, 0, 0, 0, @@ -3561,38 +3560,38 @@ 0, 0, 0, - 121, - 245, - 173, - 214, - 62, - 45, - 78, - 231, - 42, - 141, - 80, - 70, - 101, - 210, - 114, - 51, - 185, + 209, + 106, + 60, + 28, + 216, + 87, + 117, + 44, + 84, + 47, + 230, + 60, 135, - 223, - 13, - 169, - 239, - 245, - 68, - 254, + 6, + 51, + 174, + 41, + 241, + 66, + 2, + 40, + 192, + 103, + 218, + 11, 122, - 133, - 237, - 80, - 108, - 161, - 30, + 250, + 66, + 79, + 142, + 211, + 4, 0, 0, 0, @@ -3609,38 +3608,38 @@ 0, 0, 0, - 164, - 51, - 96, - 252, - 84, - 166, - 231, - 126, - 125, + 155, 69, - 141, - 222, - 212, - 230, - 206, - 158, - 145, - 216, - 89, - 46, - 224, - 195, 37, - 168, - 53, - 214, - 209, - 133, - 68, - 191, - 142, - 226, + 119, + 94, + 101, + 203, + 127, + 114, + 40, + 83, + 87, + 40, + 234, + 215, + 188, + 58, + 35, + 220, + 69, + 167, + 187, + 76, + 163, + 122, + 10, + 181, + 147, + 70, + 189, + 87, + 154, 232, 3, 0, @@ -3649,38 +3648,38 @@ 0, 0, 0, - 242, - 245, - 215, - 89, - 82, - 128, + 66, + 108, + 22, + 0, + 65, + 68, + 62, + 159, + 93, + 172, + 188, + 21, 97, - 158, - 1, - 156, - 124, - 176, - 4, - 137, - 192, - 182, - 113, - 144, - 74, - 11, - 72, - 130, - 17, - 145, - 107, - 150, - 212, - 219, - 236, + 116, + 162, + 25, + 223, + 118, + 233, + 195, + 163, + 193, + 85, 228, - 205, - 29, + 59, + 227, + 48, + 169, + 105, + 90, + 104, + 169, 1, 0, 0, @@ -3715,38 +3714,38 @@ 87, 5, 0, - 60, - 50, - 180, - 43, - 227, + 131, + 146, + 236, + 235, + 139, + 199, 162, - 219, - 29, - 125, - 221, - 81, - 200, - 83, - 117, - 18, - 127, - 246, - 174, - 251, - 39, - 104, - 52, - 25, - 62, - 70, - 158, - 1, - 226, - 93, + 80, + 212, 72, - 245, - 85, + 140, + 232, + 253, + 186, + 243, + 101, + 19, + 51, + 239, + 24, + 229, + 115, + 43, + 86, + 65, + 99, + 55, + 131, + 159, + 173, + 93, + 133, 2, 0, 0, @@ -3779,38 +3778,38 @@ 0, 0, 0, - 81, - 125, - 125, - 70, - 103, + 78, + 224, + 13, + 230, 63, - 184, - 12, - 3, - 228, - 100, - 158, - 86, - 236, - 215, - 25, - 233, - 65, - 9, - 225, - 127, - 207, - 98, - 242, - 200, - 41, - 56, - 223, + 173, + 19, + 87, 20, - 82, - 36, - 144, + 241, + 227, + 85, + 250, + 133, + 57, + 177, + 238, + 152, + 194, + 210, + 123, + 166, + 245, + 195, + 78, + 24, + 150, + 68, + 210, + 194, + 135, + 90, 0, 0, 0, @@ -3851,38 +3850,38 @@ 0, 0, 0, - 49, - 246, - 218, - 38, - 205, - 194, - 217, - 99, + 131, + 5, + 19, + 173, + 71, + 85, + 34, + 154, + 188, 178, - 200, - 79, - 165, - 209, - 164, - 114, - 99, - 171, - 118, - 230, - 130, - 90, - 255, - 202, - 41, - 223, - 145, - 76, - 62, - 88, - 164, - 241, - 120, + 2, + 156, + 113, + 213, + 174, + 54, + 18, + 43, + 140, + 17, + 237, + 175, + 95, + 125, + 104, + 199, + 61, + 170, + 9, + 101, + 233, + 169, 0, 0, 0, @@ -3891,38 +3890,38 @@ 0, 0, 0, - 69, - 228, - 93, - 189, - 144, - 86, - 66, - 204, - 44, - 169, - 195, - 207, - 209, - 160, - 161, - 249, - 81, + 41, + 25, + 184, + 94, + 221, 119, - 88, - 229, - 217, + 112, + 23, + 228, + 11, + 224, + 58, + 214, + 58, + 182, + 206, + 226, + 10, + 120, 141, - 235, - 103, - 96, - 64, - 196, - 147, - 64, - 200, + 110, 178, - 103, + 1, + 149, + 89, + 165, + 88, + 173, + 161, + 154, + 231, + 27, 96, 179, 253, @@ -4021,120 +4020,120 @@ 116, 244, 32, - 44, - 195, - 142, - 100, - 204, - 221, - 210, - 56, + 201, + 240, + 172, + 219, + 174, + 239, + 53, + 226, + 13, 220, - 159, - 252, - 43, + 210, + 185, + 203, + 133, + 146, + 206, + 6, + 139, + 173, + 40, + 92, + 214, + 151, + 52, + 6, + 137, + 118, + 144, + 242, + 19, 109, - 45, - 129, - 212, - 168, - 89, + 86, + 32, + 81, + 29, + 75, 191, - 44, - 18, - 142, - 55, + 136, + 151, + 177, 166, - 147, - 169, - 39, - 81, - 113, - 109, - 74, - 111, - 32, - 67, - 83, - 247, - 195, - 31, + 53, + 182, + 127, 24, - 188, - 165, - 86, - 175, - 68, - 17, + 25, + 179, + 223, 34, - 236, - 33, - 55, - 120, - 104, - 114, - 61, - 167, - 69, - 129, - 149, - 36, - 40, - 216, - 145, - 186, - 240, - 203, - 190, + 251, + 7, + 173, + 106, + 47, + 67, + 193, + 58, + 192, + 103, + 173, + 85, + 118, + 125, + 57, + 17, 48, - 181, - 111, - 79, - 167, - 197, - 9, - 154, - 150, - 224, - 28, - 60, - 46, - 8, - 148, - 63, - 84, - 203, 153, - 87, - 15, - 26, - 86, - 208, - 145, - 204, - 145, - 25, - 124, - 35, - 62, - 14, - 136, - 91, + 255, + 85, + 74, + 254, + 22, + 45, + 78, + 194, + 45, + 69, + 22, + 157, + 104, + 32, + 132, + 29, + 176, 231, - 161, - 80, - 201, - 205, - 64, - 58, - 13, - 96, - 245, + 38, 185, - 36, - 46, - 134, + 55, + 215, + 253, + 84, + 132, + 62, + 124, + 59, + 5, + 26, + 27, + 11, + 119, + 18, + 94, 189, + 55, + 92, + 233, + 0, + 84, + 93, + 186, + 196, + 29, + 103, + 167, 11, 118, 97, @@ -4170,11 +4169,11 @@ 99, 112, 47, - 54, - 53, 52, - 54, - 54, + 52, + 53, + 49, + 55, 47, 104, 116, @@ -4200,11 +4199,11 @@ 100, 112, 47, - 54, - 53, + 51, 52, - 54, - 56, + 48, + 51, + 55, 24, 47, 105, @@ -4225,11 +4224,11 @@ 100, 112, 47, - 54, - 53, 52, + 53, + 56, + 53, 55, - 52, 0, 0, 0, @@ -4237,38 +4236,38 @@ 0, 0, 0, - 209, - 199, - 154, - 78, + 66, + 169, 21, - 110, - 135, - 195, + 132, + 190, + 62, + 174, + 59, + 27, + 25, + 169, + 27, + 16, + 219, + 37, + 141, + 250, + 49, + 205, 67, - 136, - 35, - 94, - 39, - 97, - 239, - 158, - 2, - 153, - 53, - 161, - 61, - 9, - 6, - 74, - 159, 148, - 70, - 72, - 180, - 122, - 44, - 178, + 42, + 101, + 170, + 175, + 157, + 115, + 136, + 211, + 126, + 55, + 241, 0, 0, 0, @@ -4285,38 +4284,38 @@ 0, 0, 0, - 38, - 175, - 8, - 245, - 39, - 20, - 18, - 239, - 5, + 230, 160, - 19, - 43, - 237, - 138, - 215, - 107, + 169, + 226, + 177, + 83, + 119, + 70, + 254, 149, + 70, + 131, + 56, + 219, + 173, + 172, + 209, + 121, + 245, + 182, + 94, 49, - 242, - 105, - 61, + 48, + 13, + 108, 6, - 20, - 174, - 86, + 173, + 172, 220, - 229, - 145, - 50, - 170, - 76, - 138, + 23, + 236, + 48, 232, 3, 0, @@ -4325,38 +4324,38 @@ 0, 0, 0, - 26, - 73, - 49, - 169, - 67, - 19, - 121, - 35, - 127, - 251, - 115, - 102, - 203, - 11, - 73, - 57, - 227, - 115, - 5, - 39, - 92, - 71, - 87, - 245, - 250, + 82, + 40, + 18, + 20, + 33, + 187, + 48, + 175, 108, - 229, - 163, - 116, - 21, - 52, - 122, + 237, + 18, + 12, + 140, + 4, + 173, + 180, + 59, + 61, + 219, + 227, + 74, + 70, + 145, + 19, + 139, + 4, + 25, + 29, + 158, + 51, + 100, + 176, 1, 0, 0, @@ -4391,38 +4390,38 @@ 87, 5, 0, - 19, + 25, + 183, + 119, + 249, + 82, + 230, + 13, + 30, + 146, + 105, + 243, + 12, + 39, 28, - 67, - 124, - 172, - 129, - 201, - 135, - 94, - 72, - 64, - 197, - 38, - 95, - 35, - 44, - 43, - 75, + 86, + 183, + 118, + 56, 225, - 178, - 139, - 236, - 218, - 45, - 144, - 227, - 8, - 251, - 114, - 45, - 40, - 137, + 30, + 145, + 95, + 58, + 36, + 124, + 20, + 31, + 17, + 234, + 189, + 17, + 217, 2, 0, 0, @@ -4455,38 +4454,38 @@ 0, 0, 0, - 225, - 151, - 122, - 183, - 140, - 80, - 88, - 134, + 44, + 118, + 58, + 249, + 246, + 128, + 40, + 44, + 113, + 168, 103, - 4, - 35, - 29, - 155, - 30, - 74, - 213, - 228, - 35, - 178, - 125, - 105, - 167, - 234, - 254, - 209, + 159, + 201, + 41, + 71, + 22, + 179, + 109, + 66, + 96, + 65, + 41, + 238, 95, - 150, - 138, - 239, - 111, - 38, - 232, + 63, + 159, + 128, + 82, + 6, + 19, + 230, + 36, 0, 0, 0, @@ -4527,39 +4526,38 @@ 0, 0, 0, - 119, - 115, - 238, - 13, - 243, - 22, - 28, - 78, - 108, - 60, - 101, - 25, - 123, - 138, - 116, - 103, - 87, - 57, - 235, - 83, - 123, - 185, - 5, - 43, - 108, - 250, - 199, + 227, + 214, + 106, + 80, + 49, + 236, + 230, + 181, 194, + 71, + 204, + 47, + 195, + 108, + 37, 8, - 58, - 14, - 13, - 0, + 136, + 161, + 95, + 189, + 20, + 240, + 60, + 188, + 53, + 215, + 47, + 169, + 187, + 142, + 12, + 183, 0, 0, 0, @@ -4567,38 +4565,39 @@ 0, 0, 0, - 255, - 42, - 54, - 155, - 16, - 100, - 224, - 39, - 217, - 65, - 114, 0, - 139, - 225, - 83, - 252, - 84, - 75, - 243, - 235, - 17, - 199, - 41, - 252, - 146, - 124, - 26, + 51, + 175, + 121, + 165, + 254, + 196, 180, - 181, - 181, - 29, + 235, + 206, + 116, 244, + 241, + 228, + 36, + 190, + 59, + 96, + 143, + 116, + 246, + 216, + 37, + 10, + 154, + 151, + 190, + 78, + 196, + 88, + 135, + 200, + 232, 0, 0, 0, @@ -4608,38 +4607,38 @@ 0, 0, 0, + 120, + 9, + 122, + 172, 245, - 64, - 131, - 228, - 230, - 202, - 193, + 199, + 26, + 84, 136, - 58, - 201, - 134, - 167, - 174, - 61, - 63, - 171, - 27, - 171, - 150, - 193, - 39, - 53, - 93, - 49, - 184, - 198, - 180, 117, - 20, - 160, + 70, + 158, + 255, + 24, + 211, + 244, + 197, + 162, + 129, + 243, + 195, + 40, + 145, + 83, + 186, + 142, + 252, 225, - 139, + 90, + 228, + 10, + 22, 4, 0, 0, @@ -4648,38 +4647,38 @@ 0, 0, 0, - 100, - 96, - 140, - 115, - 178, - 133, - 212, - 21, - 85, - 180, - 158, - 44, - 146, - 235, - 132, + 52, + 218, + 54, + 70, + 39, + 183, + 172, + 251, + 39, 110, - 13, - 239, - 115, - 223, + 165, + 191, 110, - 114, - 226, + 18, + 214, + 133, + 142, + 58, + 2, + 129, + 211, + 233, + 105, + 29, + 227, + 196, + 74, + 133, 165, - 144, - 102, - 85, - 239, - 12, - 249, - 109, - 45, + 252, + 30, + 31, 0, 0, 0, @@ -4688,38 +4687,38 @@ 0, 0, 0, - 171, - 39, - 109, - 25, - 86, - 101, - 155, - 65, - 21, - 200, + 30, + 14, + 118, + 33, + 118, + 50, 37, - 226, - 115, - 169, - 182, - 74, - 60, - 111, - 254, - 140, - 247, - 230, - 222, - 63, - 45, - 45, - 35, - 196, - 16, - 111, + 105, + 218, 145, - 85, + 149, + 140, + 58, + 51, + 117, + 227, + 59, + 70, + 65, + 100, + 117, + 18, + 195, + 168, + 46, + 87, + 3, + 3, + 152, + 147, + 232, + 163, 0, 0, 0, @@ -4729,38 +4728,38 @@ 0, 0, 0, - 254, - 222, - 88, - 194, - 222, - 164, - 236, - 45, - 117, 125, - 80, - 122, - 1, - 119, - 21, - 186, - 58, - 42, - 210, - 122, + 137, + 139, + 51, + 202, + 91, + 166, + 12, + 15, 75, - 254, - 158, - 92, - 161, - 201, - 100, - 39, - 218, - 24, - 41, - 151, + 138, + 98, + 249, + 0, + 8, + 119, + 3, + 153, + 33, + 231, + 43, + 31, + 82, + 19, + 144, + 211, + 94, + 36, + 188, + 80, + 170, + 27, 0, 0, 0, @@ -4841,38 +4840,39 @@ 0, 0, 0, - 166, - 4, - 47, - 112, - 189, - 16, - 209, - 252, - 102, - 57, - 148, - 80, - 98, + 79, + 17, 167, - 43, - 219, - 234, - 27, - 136, - 160, - 254, - 187, - 150, - 197, - 7, - 70, - 7, - 202, - 220, - 47, - 159, - 89, + 207, + 224, + 118, + 62, + 44, + 178, + 174, + 165, + 143, + 18, + 121, + 59, + 240, + 243, + 203, + 209, + 186, + 63, + 64, + 104, + 6, + 206, + 83, + 237, + 242, + 44, + 248, + 198, + 158, + 0, 0, 0, 0, @@ -4923,46 +4923,46 @@ 0, 0, 0, - 83, - 125, - 6, - 216, - 146, + 43, + 210, + 212, + 12, + 147, 1, 0, 0, - 36, - 82, - 30, - 65, - 183, - 192, - 23, - 72, - 123, - 231, - 100, - 128, - 86, - 159, - 136, - 163, + 106, + 236, + 253, + 115, + 168, + 184, + 12, + 164, + 172, + 208, + 106, + 220, + 69, 24, - 82, - 67, - 139, - 141, - 248, - 200, - 171, - 163, - 5, - 98, - 244, - 137, - 223, - 150, - 206, + 89, + 198, + 2, + 213, + 236, + 72, + 90, + 211, + 34, + 72, + 153, + 83, + 221, + 101, + 158, + 252, + 168, + 143, 0, 0, 0, @@ -4977,7 +4977,7 @@ "owner": { "ObjectOwner": "0x0000000000000000000000000000000000000000000000000000000000000005" }, - "previous_transaction": "8eZxmVup35tyyVdZ31sKB9av3iNMKuJrxZ8ouJ4SRWtu", + "previous_transaction": "4DYVUL5tad1oC5xusubpY17vffqAyBkjmQfCQRdd3KRu", "storage_rebate": 0 } ], @@ -4993,7 +4993,6 @@ "type_args": [] } }, - "has_public_transfer": false, "version": 3, "contents": [ 0, @@ -5044,7 +5043,7 @@ "initial_shared_version": 1 } }, - "previous_transaction": "326n9ZcQDrJVxyFL8aWkknSmFahVxwpqZQ5q5ySmWrUy", + "previous_transaction": "99opjMtEQQnYWw48gQLkHazPoKU4yUkZ15rC92L12XGy", "storage_rebate": 0 }, { @@ -5068,7 +5067,6 @@ ] } }, - "has_public_transfer": false, "version": 3, "contents": [ 106, @@ -5135,38 +5133,38 @@ 0, 0, 0, - 57, - 250, - 115, - 22, - 182, - 11, - 178, - 229, - 253, - 205, - 92, - 179, - 236, - 134, - 160, - 75, - 54, - 44, - 186, 33, - 145, - 160, - 137, - 160, - 136, - 5, - 12, - 185, - 38, - 134, 120, - 155, + 211, + 59, + 94, + 251, + 190, + 29, + 133, + 24, + 140, + 237, + 130, + 57, + 191, + 221, + 188, + 132, + 174, + 6, + 148, + 192, + 142, + 32, + 59, + 66, + 217, + 202, + 103, + 195, + 2, + 210, 0, 224, 244, @@ -5184,38 +5182,38 @@ 26, 0, 4, - 59, - 251, - 52, - 173, - 111, - 69, - 44, - 97, - 173, - 211, - 105, - 121, - 206, - 147, - 8, - 165, - 7, - 244, - 202, - 119, - 73, - 129, - 123, - 165, - 161, - 154, - 87, - 212, - 255, - 44, - 213, + 67, + 232, + 181, + 229, + 190, + 26, + 198, + 142, + 140, + 162, + 79, 63, + 164, + 233, + 168, + 80, + 250, + 46, + 240, + 0, + 247, + 252, + 200, + 5, + 36, + 61, + 222, + 54, + 94, + 233, + 68, + 8, 96, 141, 207, @@ -5314,120 +5312,120 @@ 56, 212, 32, - 32, - 38, - 163, - 54, - 223, - 222, - 200, - 16, - 231, - 136, - 101, - 109, - 60, - 170, - 54, - 183, - 183, - 132, - 232, - 253, - 218, - 17, - 151, - 230, - 164, - 94, - 212, + 196, + 62, 132, - 90, - 230, - 7, + 24, + 163, + 189, + 82, + 102, + 141, + 245, 98, - 32, - 217, - 53, - 60, - 49, - 54, 152, - 131, - 119, - 1, - 32, - 5, - 215, - 206, - 234, - 120, - 214, - 210, - 148, - 142, - 129, - 161, - 106, - 254, - 253, - 73, - 188, - 78, - 237, - 59, - 75, - 133, - 63, - 48, - 175, - 52, - 76, - 124, 156, - 164, - 117, - 75, - 204, - 212, - 49, - 8, - 33, - 96, - 102, - 254, - 60, - 113, + 97, 252, - 79, - 3, - 66, - 110, - 30, - 211, - 234, - 248, - 46, - 26, + 197, + 195, + 47, + 86, 12, - 142, - 136, + 85, + 19, + 174, + 41, + 58, + 124, + 46, + 194, + 31, + 214, + 202, + 227, + 32, + 19, + 59, + 167, + 93, + 117, + 58, + 188, + 191, + 5, + 119, + 233, + 190, + 18, + 97, + 124, + 116, 104, - 199, - 247, - 129, + 64, + 49, + 71, + 93, + 217, + 56, + 139, + 72, + 40, + 147, + 175, + 70, + 71, + 25, + 63, + 48, + 137, + 184, + 29, + 114, + 29, 48, + 118, + 206, 228, - 61, + 215, + 24, + 238, + 59, + 87, + 84, + 81, + 230, + 3, + 166, + 206, + 229, + 252, + 87, + 57, + 38, + 113, 39, - 13, - 72, - 101, - 101, - 199, - 19, - 109, - 21, + 177, + 195, + 229, + 217, + 100, + 174, + 220, + 140, + 204, + 243, + 229, + 203, + 82, + 41, + 10, + 146, + 240, + 229, + 138, + 122, + 9, 11, 118, 97, @@ -5463,11 +5461,11 @@ 99, 112, 47, - 54, - 53, - 52, 52, - 54, + 50, + 53, + 48, + 53, 47, 104, 116, @@ -5493,11 +5491,11 @@ 100, 112, 47, - 54, - 53, - 52, 52, - 56, + 50, + 50, + 53, + 55, 24, 47, 105, @@ -5518,11 +5516,11 @@ 100, 112, 47, - 54, - 53, - 52, - 53, 52, + 49, + 50, + 55, + 51, 0, 0, 0, @@ -5530,38 +5528,38 @@ 0, 0, 0, - 237, - 202, - 141, - 82, - 243, - 82, - 185, - 130, + 193, 172, - 46, - 92, - 14, - 227, + 150, + 93, + 42, + 76, + 232, + 112, + 27, + 20, + 5, 72, - 139, - 162, - 213, - 206, - 89, - 121, - 179, - 214, - 64, - 241, - 40, - 30, - 200, - 224, - 136, - 215, - 39, - 57, + 216, + 182, + 218, + 2, + 154, + 69, + 196, + 72, + 211, + 177, + 54, + 182, + 188, + 223, + 197, + 33, + 134, + 9, + 159, + 212, 0, 0, 0, @@ -5578,38 +5576,38 @@ 0, 0, 0, - 74, - 247, - 153, - 224, - 143, - 124, - 199, - 167, - 208, - 50, - 229, - 166, + 177, + 240, + 130, + 136, + 211, + 97, + 82, 53, - 141, - 230, - 155, - 237, - 8, - 69, - 247, - 162, - 221, - 120, - 65, - 215, - 137, - 47, - 111, - 156, - 51, - 80, - 173, + 42, + 159, + 55, + 118, + 64, + 200, + 24, + 224, + 95, + 133, + 217, + 207, + 178, + 27, + 2, + 36, + 238, + 5, + 33, + 211, + 56, + 174, + 138, + 160, 232, 3, 0, @@ -5618,38 +5616,38 @@ 0, 0, 0, - 15, - 179, - 7, - 220, - 99, - 116, - 11, - 43, - 34, - 99, - 124, - 173, - 183, - 91, - 122, - 153, - 83, - 227, - 216, - 174, - 143, - 123, - 179, - 93, - 16, + 205, + 23, + 237, + 101, + 196, 223, - 139, - 50, + 165, + 144, + 73, + 40, + 152, + 156, + 38, + 172, + 6, + 187, + 80, + 131, + 252, + 156, + 198, + 105, + 210, 20, - 184, - 146, - 41, + 227, + 192, + 121, + 85, + 126, + 84, + 209, + 174, 1, 0, 0, @@ -5684,38 +5682,38 @@ 90, 5, 0, - 100, - 80, - 70, - 13, + 140, + 149, + 217, + 90, + 19, + 183, + 158, + 208, + 24, + 25, + 6, 126, - 123, - 228, - 117, - 64, - 121, - 8, - 228, - 129, + 209, + 9, + 63, + 153, + 219, + 28, + 249, + 88, + 168, + 60, 68, - 240, - 149, 80, - 11, + 19, 199, - 60, - 247, - 37, - 79, - 145, - 193, - 130, - 164, - 85, - 112, - 208, - 202, - 198, + 179, + 89, + 43, + 219, + 203, + 152, 3, 0, 0, @@ -5748,38 +5746,38 @@ 0, 0, 0, - 66, - 171, - 40, - 184, - 198, - 248, - 37, - 80, - 178, - 91, - 133, - 208, - 36, - 170, - 67, - 205, - 191, - 10, - 49, - 13, - 172, - 27, - 248, - 33, - 15, - 228, - 163, - 61, - 156, - 207, + 165, + 143, + 84, + 159, + 166, + 25, + 12, + 161, + 141, + 32, + 3, + 3, + 139, + 169, + 133, + 182, + 69, + 119, + 237, + 71, + 47, + 66, + 63, + 192, + 99, + 180, + 148, + 177, + 252, + 179, 73, - 153, + 49, 0, 0, 0, @@ -5820,38 +5818,38 @@ 0, 0, 0, - 154, - 63, - 153, - 219, - 190, - 60, - 107, - 172, - 161, - 128, - 223, - 192, - 219, - 114, - 132, - 40, + 88, + 133, + 61, + 66, + 13, + 222, + 200, + 212, + 234, 213, - 246, - 227, - 9, - 177, - 93, - 243, - 81, - 126, - 145, - 127, - 241, - 139, - 224, - 194, + 88, + 180, + 147, + 113, + 102, + 159, + 0, + 78, + 17, + 138, + 135, + 26, + 79, + 98, + 16, 8, + 194, + 99, + 131, + 241, + 33, + 37, 0, 0, 0, @@ -5860,38 +5858,38 @@ 0, 0, 0, - 45, - 177, - 156, - 231, + 192, + 175, + 228, + 113, + 63, + 95, + 137, + 74, 178, - 150, - 99, - 62, - 73, - 244, - 142, - 134, - 60, - 43, - 8, 213, - 234, - 10, - 136, - 82, - 115, - 191, - 165, + 105, + 104, + 153, + 206, + 194, + 124, + 141, + 211, + 235, + 203, + 141, + 208, + 104, + 17, + 25, + 63, + 28, + 221, + 47, 116, - 226, - 219, - 10, - 133, - 236, - 226, - 37, - 229, + 88, + 227, 96, 153, 242, @@ -5990,120 +5988,120 @@ 26, 16, 32, - 122, - 3, - 30, - 157, - 52, - 195, - 36, - 160, - 76, - 194, - 183, - 16, - 106, - 36, - 32, - 2, - 216, - 206, - 21, - 7, - 4, - 151, - 70, - 39, - 234, - 215, - 20, - 41, - 150, - 113, - 224, + 124, + 182, + 186, 91, - 32, - 3, - 60, - 195, - 7, + 12, + 170, + 131, 177, - 11, - 189, - 198, - 69, - 193, - 118, - 101, - 132, - 133, - 243, - 255, - 102, - 108, - 2, - 133, - 7, + 61, + 203, + 127, + 80, + 232, + 52, + 130, + 1, + 139, + 38, + 18, + 19, + 17, 68, - 189, - 150, - 46, - 93, - 146, + 191, + 185, + 79, + 7, + 213, + 179, + 21, + 145, + 211, + 187, + 32, + 94, + 91, + 130, + 163, + 159, + 253, + 136, + 192, + 238, + 131, + 218, + 155, + 62, + 192, 0, - 141, - 222, - 107, - 252, - 48, + 198, 173, - 72, - 33, - 196, - 123, - 102, - 115, - 188, - 207, + 130, + 103, + 59, + 148, + 58, + 239, + 141, + 231, + 179, + 8, + 76, + 140, + 228, 117, - 48, - 189, - 20, - 63, - 36, - 94, - 101, - 110, - 96, 96, + 48, + 149, + 156, + 76, + 233, + 34, + 137, + 19, 218, - 135, - 207, - 130, - 60, - 108, - 28, - 33, - 226, - 4, - 178, - 120, - 120, - 61, - 127, - 163, - 62, + 66, + 180, + 247, + 89, + 225, + 191, + 83, + 121, + 39, + 43, + 112, + 84, + 165, + 35, 231, - 69, - 205, - 199, - 183, - 145, - 196, - 92, - 33, - 251, - 211, + 134, + 23, + 125, + 5, + 153, + 229, + 197, + 243, + 25, + 147, + 7, + 167, + 218, + 65, + 169, + 20, + 123, + 151, + 209, + 118, + 154, + 4, + 53, + 71, + 105, 11, 118, 97, @@ -6139,11 +6137,11 @@ 99, 112, 47, - 54, + 51, + 51, 53, 52, - 51, - 54, + 57, 47, 104, 116, @@ -6169,11 +6167,11 @@ 100, 112, 47, - 54, - 53, 52, - 51, - 56, + 53, + 53, + 55, + 55, 24, 47, 105, @@ -6194,11 +6192,11 @@ 100, 112, 47, - 54, - 53, - 52, - 52, + 51, + 51, 52, + 57, + 49, 0, 0, 0, @@ -6206,38 +6204,38 @@ 0, 0, 0, - 139, - 224, - 68, - 32, - 91, - 176, - 203, - 154, - 171, - 120, - 35, - 40, - 91, - 57, - 179, - 164, - 23, - 110, - 253, - 173, - 253, - 143, - 209, - 90, - 0, + 250, + 44, + 99, + 101, + 202, + 88, + 5, 61, - 90, - 186, - 109, - 177, + 253, + 24, + 51, + 26, + 87, + 210, + 184, + 240, + 42, + 40, + 131, + 205, 59, - 90, + 201, + 168, + 247, + 101, + 11, + 54, + 150, + 130, + 210, + 2, + 86, 0, 0, 0, @@ -6254,78 +6252,78 @@ 0, 0, 0, - 18, - 5, + 102, + 140, + 54, + 205, + 193, + 218, + 197, + 97, + 35, + 198, + 30, + 231, + 98, + 41, + 134, + 110, + 115, + 97, + 203, 29, - 220, - 228, - 186, - 162, - 227, - 204, - 127, - 217, - 247, - 93, 81, - 88, - 63, - 196, - 75, - 65, - 142, - 11, - 57, - 159, - 31, - 113, - 251, - 185, - 116, - 209, - 4, - 123, - 14, - 232, 3, - 0, - 0, - 0, - 0, - 0, - 0, - 209, - 123, - 224, - 206, - 121, - 241, - 77, - 244, - 72, - 86, - 107, - 103, - 131, - 192, - 239, - 101, - 12, - 50, + 42, + 58, + 45, + 152, + 33, + 80, + 128, 118, - 14, - 142, - 183, - 157, - 157, - 157, - 178, - 187, - 220, 115, - 108, - 181, + 111, + 232, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 207, + 45, + 23, + 237, + 112, + 22, + 155, + 235, + 198, + 250, + 75, + 26, + 133, + 192, + 213, + 197, + 147, + 157, + 67, + 6, + 247, + 136, + 54, + 200, + 184, + 231, + 36, + 53, + 236, 43, + 58, + 87, 1, 0, 0, @@ -6360,38 +6358,38 @@ 90, 5, 0, - 121, - 31, - 101, - 204, - 134, - 140, - 198, - 239, - 11, - 192, - 255, + 223, + 62, + 27, + 73, + 93, + 117, 64, - 40, - 147, - 159, - 16, - 185, - 98, - 112, - 39, - 68, - 129, - 205, - 235, 244, - 33, 214, - 71, - 190, - 240, - 11, - 110, + 75, + 188, + 121, + 172, + 248, + 226, + 86, + 226, + 185, + 165, + 43, + 83, + 204, + 157, + 14, + 116, + 41, + 93, + 223, + 21, + 63, + 205, + 8, 3, 0, 0, @@ -6424,38 +6422,38 @@ 0, 0, 0, - 162, + 60, + 19, + 165, + 167, + 113, + 73, + 173, + 158, + 249, + 1, + 137, + 200, + 167, 2, - 46, - 57, - 140, - 215, - 171, - 207, - 199, - 51, - 119, - 103, - 99, - 159, - 136, - 104, - 178, - 52, - 54, - 253, - 140, + 6, + 36, + 233, + 143, + 38, + 144, + 146, + 157, + 93, + 201, + 6, + 141, + 179, 74, - 230, - 132, - 248, - 104, - 75, + 31, + 1, + 243, 249, - 252, - 181, - 229, - 232, 0, 0, 0, @@ -6496,78 +6494,78 @@ 0, 0, 0, - 251, - 213, - 102, - 25, - 149, - 159, - 37, - 192, + 174, + 227, + 90, + 63, + 120, + 139, + 75, 210, - 95, - 204, - 21, - 18, + 232, + 201, + 40, + 254, + 61, + 139, + 164, + 135, + 89, + 80, + 67, + 197, + 79, + 23, + 193, + 220, + 192, + 27, + 225, + 247, + 132, + 19, + 170, + 106, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 190, + 230, 42, - 226, - 5, - 226, - 152, - 81, - 144, - 191, - 110, + 119, + 58, + 2, + 173, + 34, + 217, + 86, + 85, + 137, + 246, + 242, + 195, + 68, + 48, + 143, + 109, + 111, + 8, + 78, + 37, + 57, + 245, + 27, + 4, + 104, + 94, 76, - 51, - 233, + 99, 213, - 87, - 45, - 246, - 101, - 58, - 130, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 50, - 72, - 42, - 34, - 159, - 131, - 186, - 206, - 45, - 164, - 201, - 11, - 77, - 217, - 156, - 138, - 115, - 6, - 58, - 106, - 141, - 220, - 91, - 214, - 204, - 153, - 222, - 216, - 112, - 100, - 145, - 42, 96, 173, 222, @@ -6666,120 +6664,120 @@ 88, 242, 32, - 97, - 138, - 198, - 62, - 136, - 198, + 30, + 37, + 183, + 240, 103, - 175, - 249, - 91, - 77, - 120, - 56, - 146, - 191, - 105, - 25, - 87, - 27, - 118, - 59, - 62, - 33, - 84, - 159, - 132, - 242, - 67, - 253, - 50, - 9, - 132, - 32, - 211, - 127, - 23, - 124, - 68, - 158, - 122, - 141, - 69, - 188, - 41, - 144, - 117, - 211, - 169, - 65, + 163, + 179, + 125, + 63, + 45, + 181, + 93, + 28, + 89, + 229, + 5, + 106, + 163, + 206, + 78, + 29, + 199, + 170, + 104, + 45, + 224, 239, - 69, 38, - 170, - 84, - 174, - 198, - 7, - 179, + 161, + 81, + 144, + 126, + 32, + 126, + 135, + 13, + 21, 110, - 215, 182, - 252, - 113, - 72, - 226, - 48, - 133, - 8, - 105, - 153, - 110, - 47, - 196, - 176, - 44, - 252, + 43, + 100, + 73, + 50, + 39, + 165, + 30, + 73, + 87, + 94, + 30, 140, - 171, - 99, - 25, - 5, - 109, - 170, - 61, - 34, + 210, + 23, + 43, + 12, 234, - 19, + 159, + 61, + 202, + 207, + 104, + 212, + 250, + 231, + 63, + 48, + 130, + 188, + 193, + 4, + 218, + 97, + 149, + 191, + 5, 78, - 134, - 220, - 12, + 7, + 112, + 33, + 68, + 224, + 59, + 39, + 98, + 169, + 118, + 239, + 107, + 148, + 29, + 214, 12, - 146, - 181, - 134, - 46, - 50, - 246, - 204, - 83, - 195, - 216, + 75, + 189, + 224, + 32, + 251, + 184, + 107, + 66, + 33, + 222, + 190, + 35, + 51, + 112, + 199, 58, - 47, - 246, - 133, - 52, - 153, - 89, - 95, - 128, - 57, - 13, - 156, + 214, + 198, + 43, + 186, + 235, + 19, 11, 118, 97, @@ -6815,11 +6813,11 @@ 99, 112, 47, + 51, 54, + 55, + 48, 53, - 52, - 53, - 54, 47, 104, 116, @@ -6845,11 +6843,11 @@ 100, 112, 47, + 51, + 57, + 50, 54, - 53, - 52, - 53, - 56, + 57, 24, 47, 105, @@ -6870,11 +6868,11 @@ 100, 112, 47, - 54, - 53, 52, - 54, 52, + 50, + 53, + 55, 0, 0, 0, @@ -6882,38 +6880,38 @@ 0, 0, 0, - 121, - 245, - 173, - 214, - 62, - 45, - 78, - 231, - 42, - 141, - 80, - 70, - 101, - 210, - 114, - 51, - 185, + 209, + 106, + 60, + 28, + 216, + 87, + 117, + 44, + 84, + 47, + 230, + 60, 135, - 223, - 13, - 169, - 239, - 245, - 68, - 254, + 6, + 51, + 174, + 41, + 241, + 66, + 2, + 40, + 192, + 103, + 218, + 11, 122, - 133, - 237, - 80, - 108, - 161, - 30, + 250, + 66, + 79, + 142, + 211, + 4, 0, 0, 0, @@ -6930,38 +6928,38 @@ 0, 0, 0, - 164, - 51, - 96, - 252, - 84, - 166, - 231, - 126, - 125, + 155, 69, - 141, - 222, - 212, - 230, - 206, - 158, - 145, - 216, - 89, - 46, - 224, - 195, 37, - 168, - 53, - 214, - 209, - 133, - 68, - 191, - 142, - 226, + 119, + 94, + 101, + 203, + 127, + 114, + 40, + 83, + 87, + 40, + 234, + 215, + 188, + 58, + 35, + 220, + 69, + 167, + 187, + 76, + 163, + 122, + 10, + 181, + 147, + 70, + 189, + 87, + 154, 232, 3, 0, @@ -6970,38 +6968,38 @@ 0, 0, 0, - 242, - 245, - 215, - 89, - 82, - 128, + 66, + 108, + 22, + 0, + 65, + 68, + 62, + 159, + 93, + 172, + 188, + 21, 97, - 158, - 1, - 156, - 124, - 176, - 4, - 137, - 192, - 182, - 113, - 144, - 74, - 11, - 72, - 130, - 17, - 145, - 107, - 150, - 212, - 219, - 236, + 116, + 162, + 25, + 223, + 118, + 233, + 195, + 163, + 193, + 85, 228, - 205, - 29, + 59, + 227, + 48, + 169, + 105, + 90, + 104, + 169, 1, 0, 0, @@ -7036,38 +7034,38 @@ 90, 5, 0, - 60, - 50, - 180, - 43, - 227, + 131, + 146, + 236, + 235, + 139, + 199, 162, - 219, - 29, - 125, - 221, - 81, - 200, - 83, - 117, - 18, - 127, - 246, - 174, - 251, - 39, - 104, - 52, - 25, - 62, - 70, - 158, - 1, - 226, + 80, + 212, + 72, + 140, + 232, + 253, + 186, + 243, + 101, + 19, + 51, + 239, + 24, + 229, + 115, + 43, + 86, + 65, + 99, + 55, + 131, + 159, + 173, 93, - 72, - 245, - 85, + 133, 3, 0, 0, @@ -7100,38 +7098,38 @@ 0, 0, 0, - 81, - 125, - 125, - 70, - 103, + 78, + 224, + 13, + 230, 63, - 184, - 12, - 3, - 228, - 100, - 158, - 86, - 236, - 215, - 25, - 233, - 65, - 9, - 225, - 127, - 207, - 98, - 242, - 200, - 41, - 56, - 223, + 173, + 19, + 87, 20, - 82, - 36, - 144, + 241, + 227, + 85, + 250, + 133, + 57, + 177, + 238, + 152, + 194, + 210, + 123, + 166, + 245, + 195, + 78, + 24, + 150, + 68, + 210, + 194, + 135, + 90, 0, 0, 0, @@ -7172,38 +7170,38 @@ 0, 0, 0, - 49, - 246, - 218, - 38, - 205, - 194, - 217, - 99, + 131, + 5, + 19, + 173, + 71, + 85, + 34, + 154, + 188, 178, - 200, - 79, - 165, - 209, - 164, - 114, - 99, - 171, - 118, - 230, - 130, - 90, - 255, - 202, - 41, - 223, - 145, - 76, - 62, - 88, - 164, - 241, - 120, + 2, + 156, + 113, + 213, + 174, + 54, + 18, + 43, + 140, + 17, + 237, + 175, + 95, + 125, + 104, + 199, + 61, + 170, + 9, + 101, + 233, + 169, 0, 0, 0, @@ -7212,38 +7210,38 @@ 0, 0, 0, - 69, - 228, - 93, - 189, - 144, - 86, - 66, - 204, - 44, - 169, - 195, - 207, - 209, - 160, - 161, - 249, - 81, + 41, + 25, + 184, + 94, + 221, 119, - 88, - 229, - 217, + 112, + 23, + 228, + 11, + 224, + 58, + 214, + 58, + 182, + 206, + 226, + 10, + 120, 141, - 235, - 103, - 96, - 64, - 196, - 147, - 64, - 200, + 110, 178, - 103, + 1, + 149, + 89, + 165, + 88, + 173, + 161, + 154, + 231, + 27, 96, 179, 253, @@ -7342,120 +7340,120 @@ 116, 244, 32, - 44, - 195, - 142, - 100, - 204, - 221, - 210, - 56, + 201, + 240, + 172, + 219, + 174, + 239, + 53, + 226, + 13, 220, - 159, - 252, - 43, - 109, - 45, - 129, - 212, - 168, - 89, - 191, - 44, - 18, - 142, - 55, - 166, - 147, - 169, - 39, - 81, - 113, + 210, + 185, + 203, + 133, + 146, + 206, + 6, + 139, + 173, + 40, + 92, + 214, + 151, + 52, + 6, + 137, + 118, + 144, + 242, + 19, 109, - 74, - 111, + 86, 32, - 67, - 83, - 247, - 195, - 31, + 81, + 29, + 75, + 191, + 136, + 151, + 177, + 166, + 53, + 182, + 127, 24, - 188, - 165, - 86, - 175, - 68, - 17, + 25, + 179, + 223, 34, - 236, - 33, - 55, - 120, - 104, - 114, - 61, - 167, - 69, - 129, - 149, - 36, - 40, - 216, - 145, - 186, - 240, - 203, - 190, + 251, + 7, + 173, + 106, + 47, + 67, + 193, + 58, + 192, + 103, + 173, + 85, + 118, + 125, + 57, + 17, 48, - 181, - 111, - 79, - 167, - 197, - 9, - 154, - 150, - 224, - 28, - 60, - 46, - 8, - 148, - 63, - 84, - 203, 153, - 87, - 15, - 26, - 86, - 208, - 145, - 204, - 145, - 25, - 124, - 35, - 62, - 14, - 136, - 91, + 255, + 85, + 74, + 254, + 22, + 45, + 78, + 194, + 45, + 69, + 22, + 157, + 104, + 32, + 132, + 29, + 176, 231, - 161, - 80, - 201, - 205, - 64, - 58, - 13, - 96, - 245, + 38, 185, - 36, - 46, - 134, + 55, + 215, + 253, + 84, + 132, + 62, + 124, + 59, + 5, + 26, + 27, + 11, + 119, + 18, + 94, 189, + 55, + 92, + 233, + 0, + 84, + 93, + 186, + 196, + 29, + 103, + 167, 11, 118, 97, @@ -7491,11 +7489,11 @@ 99, 112, 47, - 54, - 53, 52, - 54, - 54, + 52, + 53, + 49, + 55, 47, 104, 116, @@ -7521,11 +7519,11 @@ 100, 112, 47, - 54, - 53, + 51, 52, - 54, - 56, + 48, + 51, + 55, 24, 47, 105, @@ -7546,11 +7544,11 @@ 100, 112, 47, - 54, - 53, 52, + 53, + 56, + 53, 55, - 52, 0, 0, 0, @@ -7558,38 +7556,38 @@ 0, 0, 0, - 209, - 199, - 154, - 78, + 66, + 169, 21, - 110, - 135, - 195, + 132, + 190, + 62, + 174, + 59, + 27, + 25, + 169, + 27, + 16, + 219, + 37, + 141, + 250, + 49, + 205, 67, - 136, - 35, - 94, - 39, - 97, - 239, - 158, - 2, - 153, - 53, - 161, - 61, - 9, - 6, - 74, - 159, 148, - 70, - 72, - 180, - 122, - 44, - 178, + 42, + 101, + 170, + 175, + 157, + 115, + 136, + 211, + 126, + 55, + 241, 0, 0, 0, @@ -7606,38 +7604,38 @@ 0, 0, 0, - 38, - 175, - 8, - 245, - 39, - 20, - 18, - 239, - 5, + 230, 160, - 19, - 43, - 237, - 138, - 215, - 107, + 169, + 226, + 177, + 83, + 119, + 70, + 254, 149, + 70, + 131, + 56, + 219, + 173, + 172, + 209, + 121, + 245, + 182, + 94, 49, - 242, - 105, - 61, + 48, + 13, + 108, 6, - 20, - 174, - 86, + 173, + 172, 220, - 229, - 145, - 50, - 170, - 76, - 138, + 23, + 236, + 48, 232, 3, 0, @@ -7646,38 +7644,38 @@ 0, 0, 0, - 26, - 73, - 49, - 169, - 67, - 19, - 121, - 35, - 127, - 251, - 115, - 102, - 203, - 11, - 73, - 57, - 227, - 115, - 5, - 39, - 92, - 71, - 87, - 245, - 250, + 82, + 40, + 18, + 20, + 33, + 187, + 48, + 175, 108, - 229, - 163, - 116, - 21, - 52, - 122, + 237, + 18, + 12, + 140, + 4, + 173, + 180, + 59, + 61, + 219, + 227, + 74, + 70, + 145, + 19, + 139, + 4, + 25, + 29, + 158, + 51, + 100, + 176, 1, 0, 0, @@ -7712,38 +7710,38 @@ 90, 5, 0, - 19, + 25, + 183, + 119, + 249, + 82, + 230, + 13, + 30, + 146, + 105, + 243, + 12, + 39, 28, - 67, - 124, - 172, - 129, - 201, - 135, - 94, - 72, - 64, - 197, - 38, - 95, - 35, - 44, - 43, - 75, + 86, + 183, + 118, + 56, 225, - 178, - 139, - 236, - 218, - 45, - 144, - 227, - 8, - 251, - 114, - 45, - 40, - 137, + 30, + 145, + 95, + 58, + 36, + 124, + 20, + 31, + 17, + 234, + 189, + 17, + 217, 3, 0, 0, @@ -7776,38 +7774,38 @@ 0, 0, 0, - 225, - 151, - 122, - 183, - 140, - 80, - 88, - 134, + 44, + 118, + 58, + 249, + 246, + 128, + 40, + 44, + 113, + 168, 103, - 4, - 35, - 29, - 155, - 30, - 74, - 213, - 228, - 35, - 178, - 125, - 105, - 167, - 234, - 254, - 209, + 159, + 201, + 41, + 71, + 22, + 179, + 109, + 66, + 96, + 65, + 41, + 238, 95, - 150, - 138, - 239, - 111, - 38, - 232, + 63, + 159, + 128, + 82, + 6, + 19, + 230, + 36, 0, 0, 0, @@ -7848,39 +7846,38 @@ 0, 0, 0, - 119, - 115, - 238, - 13, - 243, - 22, - 28, - 78, - 108, - 60, - 101, - 25, - 123, - 138, - 116, - 103, - 87, - 57, - 235, - 83, - 123, - 185, - 5, - 43, - 108, - 250, - 199, + 227, + 214, + 106, + 80, + 49, + 236, + 230, + 181, 194, + 71, + 204, + 47, + 195, + 108, + 37, 8, - 58, - 14, - 13, - 0, + 136, + 161, + 95, + 189, + 20, + 240, + 60, + 188, + 53, + 215, + 47, + 169, + 187, + 142, + 12, + 183, 0, 0, 0, @@ -7888,38 +7885,39 @@ 0, 0, 0, - 255, - 42, - 54, - 155, - 16, - 100, - 224, - 39, - 217, - 65, - 114, 0, - 139, - 225, - 83, - 252, - 84, - 75, - 243, - 235, - 17, - 199, - 41, - 252, - 146, - 124, - 26, + 51, + 175, + 121, + 165, + 254, + 196, 180, - 181, - 181, - 29, + 235, + 206, + 116, 244, + 241, + 228, + 36, + 190, + 59, + 96, + 143, + 116, + 246, + 216, + 37, + 10, + 154, + 151, + 190, + 78, + 196, + 88, + 135, + 200, + 232, 0, 0, 0, @@ -7929,38 +7927,38 @@ 0, 0, 0, + 120, + 9, + 122, + 172, 245, - 64, - 131, - 228, - 230, - 202, - 193, + 199, + 26, + 84, 136, - 58, - 201, - 134, - 167, - 174, - 61, - 63, - 171, - 27, - 171, - 150, - 193, - 39, - 53, - 93, - 49, - 184, - 198, - 180, 117, - 20, - 160, + 70, + 158, + 255, + 24, + 211, + 244, + 197, + 162, + 129, + 243, + 195, + 40, + 145, + 83, + 186, + 142, + 252, 225, - 139, + 90, + 228, + 10, + 22, 4, 0, 0, @@ -7969,38 +7967,38 @@ 0, 0, 0, - 100, - 96, - 140, - 115, - 178, - 133, - 212, - 21, - 85, - 180, - 158, - 44, - 146, - 235, - 132, + 52, + 218, + 54, + 70, + 39, + 183, + 172, + 251, + 39, 110, - 13, - 239, - 115, - 223, + 165, + 191, 110, - 114, - 226, + 18, + 214, + 133, + 142, + 58, + 2, + 129, + 211, + 233, + 105, + 29, + 227, + 196, + 74, + 133, 165, - 144, - 102, - 85, - 239, - 12, - 249, - 109, - 45, + 252, + 30, + 31, 0, 0, 0, @@ -8009,39 +8007,38 @@ 0, 0, 0, - 171, - 39, - 109, - 25, - 86, - 101, - 155, - 65, - 21, - 200, + 30, + 14, + 118, + 33, + 118, + 50, 37, - 226, - 115, - 169, - 182, - 74, - 60, - 111, - 254, - 140, - 247, - 230, - 222, - 63, - 45, - 45, - 35, - 196, - 16, - 111, + 105, + 218, 145, - 85, - 0, + 149, + 140, + 58, + 51, + 117, + 227, + 59, + 70, + 65, + 100, + 117, + 18, + 195, + 168, + 46, + 87, + 3, + 3, + 152, + 147, + 232, + 163, 0, 0, 0, @@ -8050,38 +8047,39 @@ 0, 0, 0, - 254, - 222, - 88, - 194, - 222, - 164, - 236, - 45, - 117, - 125, - 80, - 122, - 1, - 119, - 21, - 186, - 58, - 42, - 210, - 122, + 0, + 125, + 137, + 139, + 51, + 202, + 91, + 166, + 12, + 15, 75, - 254, - 158, - 92, - 161, - 201, - 100, - 39, - 218, - 24, - 41, - 151, + 138, + 98, + 249, + 0, + 8, + 119, + 3, + 153, + 33, + 231, + 43, + 31, + 82, + 19, + 144, + 211, + 94, + 36, + 188, + 80, + 170, + 27, 0, 0, 0, @@ -8162,38 +8160,39 @@ 0, 0, 0, - 166, - 4, - 47, - 112, - 189, - 16, - 209, - 252, - 102, - 57, - 148, - 80, - 98, + 79, + 17, 167, - 43, - 219, - 234, - 27, - 136, - 160, - 254, - 187, - 150, - 197, - 7, - 70, - 7, - 202, - 220, - 47, - 159, - 89, + 207, + 224, + 118, + 62, + 44, + 178, + 174, + 165, + 143, + 18, + 121, + 59, + 240, + 243, + 203, + 209, + 186, + 63, + 64, + 104, + 6, + 206, + 83, + 237, + 242, + 44, + 248, + 198, + 158, + 0, 0, 0, 0, @@ -8244,46 +8243,46 @@ 0, 0, 0, - 210, - 104, - 7, - 216, - 146, + 110, + 189, + 213, + 12, + 147, 1, 0, 0, - 36, - 82, - 30, - 65, - 183, - 192, - 23, - 72, - 123, - 231, - 100, - 128, - 86, - 159, - 136, - 163, + 106, + 236, + 253, + 115, + 168, + 184, + 12, + 164, + 172, + 208, + 106, + 220, + 69, 24, - 82, - 67, - 139, - 141, - 248, - 200, - 171, - 163, - 5, - 98, - 244, - 137, - 223, - 150, - 206, + 89, + 198, + 2, + 213, + 236, + 72, + 90, + 211, + 34, + 72, + 153, + 83, + 221, + 101, + 158, + 252, + 168, + 143, 0, 0, 0, @@ -8298,80 +8297,64 @@ "owner": { "ObjectOwner": "0x0000000000000000000000000000000000000000000000000000000000000005" }, - "previous_transaction": "326n9ZcQDrJVxyFL8aWkknSmFahVxwpqZQ5q5ySmWrUy", + "previous_transaction": "99opjMtEQQnYWw48gQLkHazPoKU4yUkZ15rC92L12XGy", "storage_rebate": 0 }, { "data": { "Move": { - "type_": "StakedIota", - "has_public_transfer": true, + "type_": { + "Other": { + "address": "0000000000000000000000000000000000000000000000000000000000000002", + "module": "dynamic_field", + "name": "Field", + "type_args": [ + "u64", + { + "struct": { + "address": "0000000000000000000000000000000000000000000000000000000000000003", + "module": "staking_pool", + "name": "PoolTokenExchangeRate", + "type_args": [] + } + } + ] + } + }, "version": 3, "contents": [ - 15, - 240, - 36, - 200, - 226, - 13, - 113, + 46, 188, - 151, - 98, - 189, - 133, - 39, - 114, - 83, - 101, - 18, - 88, - 68, - 96, - 185, - 32, - 236, - 146, - 53, - 166, - 101, - 26, - 67, - 5, - 250, - 235, - 209, - 123, - 224, - 206, - 121, - 241, - 77, - 244, + 70, + 122, 72, - 86, - 107, - 103, - 131, - 192, - 239, - 101, - 12, - 50, - 118, - 14, - 142, - 183, - 157, - 157, - 157, - 178, + 37, + 237, + 100, + 234, + 159, + 171, + 182, + 228, + 3, + 223, + 167, + 132, + 223, + 242, + 208, + 230, + 30, + 69, + 132, + 18, + 70, 187, - 220, - 115, - 108, - 181, - 43, + 150, + 229, + 129, + 180, + 239, 2, 0, 0, @@ -8381,93 +8364,100 @@ 0, 0, 0, - 14, - 208, - 231, - 124, - 3, + 56, + 111, + 132, + 8, + 177, + 6, 0, + 161, + 32, + 121, + 162, + 33, + 90, + 5, 0 ] } }, "owner": { - "AddressOwner": "0x2db19ce7b296633e49f48e863c2b08d5ea0a885273bfa574e2db0a85ece225e5" + "ObjectOwner": "0x8c95d95a13b79ed01819067ed1093f99db1cf958a83c445013c7b3592bdbcb98" }, - "previous_transaction": "326n9ZcQDrJVxyFL8aWkknSmFahVxwpqZQ5q5ySmWrUy", + "previous_transaction": "99opjMtEQQnYWw48gQLkHazPoKU4yUkZ15rC92L12XGy", "storage_rebate": 0 }, { "data": { "Move": { "type_": "StakedIota", - "has_public_transfer": true, "version": 3, "contents": [ - 40, - 202, - 112, - 217, - 109, - 109, - 156, - 205, - 135, - 25, + 80, + 124, + 170, + 133, + 207, + 126, + 206, + 197, + 237, 51, + 100, + 174, + 195, + 52, + 12, + 81, 46, + 116, + 173, 187, - 222, - 63, - 176, - 72, 93, - 21, - 89, - 146, - 13, - 133, - 38, - 9, - 203, - 166, - 67, - 189, - 17, - 60, - 53, - 15, - 179, - 7, - 220, - 99, - 116, - 11, - 43, - 34, - 99, - 124, + 33, + 164, + 151, + 96, + 132, + 196, + 175, + 102, + 120, + 98, + 69, + 82, + 40, + 18, + 20, + 33, + 187, + 48, + 175, + 108, + 237, + 18, + 12, + 140, + 4, 173, - 183, - 91, - 122, - 153, - 83, + 180, + 59, + 61, + 219, 227, - 216, - 174, - 143, - 123, - 179, - 93, - 16, - 223, + 74, + 70, + 145, + 19, 139, - 50, - 20, - 184, - 146, - 41, + 4, + 25, + 29, + 158, + 51, + 100, + 176, 2, 0, 0, @@ -8488,9 +8478,9 @@ } }, "owner": { - "AddressOwner": "0x3bfb34ad6f452c61add36979ce9308a507f4ca7749817ba5a19a57d4ff2cd53f" + "AddressOwner": "0x2919b85edd777017e40be03ad63ab6cee20a788d6eb2019559a558ada19ae71b" }, - "previous_transaction": "326n9ZcQDrJVxyFL8aWkknSmFahVxwpqZQ5q5ySmWrUy", + "previous_transaction": "99opjMtEQQnYWw48gQLkHazPoKU4yUkZ15rC92L12XGy", "storage_rebate": 0 }, { @@ -8514,41 +8504,40 @@ ] } }, - "has_public_transfer": false, "version": 3, "contents": [ - 55, - 182, - 163, - 91, - 229, - 253, - 149, - 44, - 130, - 137, - 97, - 206, - 185, - 13, - 28, - 140, - 90, - 166, - 199, - 140, - 40, - 3, - 84, - 7, + 113, + 66, + 78, + 208, 115, - 234, + 18, + 26, + 25, + 17, + 243, + 104, + 116, + 3, + 105, + 155, + 35, 137, - 138, - 249, + 171, + 3, + 101, + 160, + 247, + 248, + 195, 124, - 14, - 221, + 198, + 208, + 53, + 203, + 218, + 64, + 151, 2, 0, 0, @@ -8577,67 +8566,81 @@ } }, "owner": { - "ObjectOwner": "0x3c32b42be3a2db1d7ddd51c85375127ff6aefb276834193e469e01e25d48f555" + "ObjectOwner": "0x19b777f952e60d1e9269f30c271c56b77638e11e915f3a247c141f11eabd11d9" }, - "previous_transaction": "326n9ZcQDrJVxyFL8aWkknSmFahVxwpqZQ5q5ySmWrUy", + "previous_transaction": "99opjMtEQQnYWw48gQLkHazPoKU4yUkZ15rC92L12XGy", "storage_rebate": 0 }, { "data": { "Move": { - "type_": { - "Other": { - "address": "0000000000000000000000000000000000000000000000000000000000000002", - "module": "dynamic_field", - "name": "Field", - "type_args": [ - "u64", - { - "struct": { - "address": "0000000000000000000000000000000000000000000000000000000000000003", - "module": "staking_pool", - "name": "PoolTokenExchangeRate", - "type_args": [] - } - } - ] - } - }, - "has_public_transfer": false, + "type_": "StakedIota", "version": 3, "contents": [ - 142, - 231, - 82, - 115, - 210, - 106, - 132, - 40, - 137, + 141, 182, - 175, + 189, + 84, + 173, + 79, + 34, + 32, + 99, + 227, + 254, + 43, + 149, + 157, 98, - 152, - 24, - 76, - 112, - 170, + 84, + 121, + 130, + 36, + 49, + 108, + 164, + 7, + 207, + 194, + 27, + 102, + 234, + 202, + 27, 149, - 73, - 85, - 224, - 168, - 228, - 216, - 95, - 227, + 71, + 207, + 45, + 23, + 237, + 112, + 22, + 155, 235, + 198, + 250, + 75, + 26, + 133, + 192, + 213, + 197, + 147, + 157, + 67, + 6, + 247, + 136, + 54, + 200, + 184, + 231, + 36, 53, - 254, - 248, - 238, - 162, + 236, + 43, + 58, + 87, 2, 0, 0, @@ -8647,101 +8650,92 @@ 0, 0, 0, - 56, - 111, - 132, - 8, - 177, - 6, + 14, + 208, + 231, + 124, + 3, 0, - 161, - 32, - 121, - 162, - 33, - 90, - 5, 0 ] } }, "owner": { - "ObjectOwner": "0x131c437cac81c9875e4840c5265f232c2b4be1b28becda2d90e308fb722d2889" + "AddressOwner": "0xc0afe4713f5f894ab2d5696899cec27c8dd3ebcb8dd06811193f1cdd2f7458e3" }, - "previous_transaction": "326n9ZcQDrJVxyFL8aWkknSmFahVxwpqZQ5q5ySmWrUy", + "previous_transaction": "99opjMtEQQnYWw48gQLkHazPoKU4yUkZ15rC92L12XGy", "storage_rebate": 0 }, { "data": { "Move": { "type_": "StakedIota", - "has_public_transfer": true, "version": 3, "contents": [ - 186, - 60, - 107, - 121, - 233, - 24, - 94, - 249, + 143, + 195, + 174, + 21, + 29, + 140, + 217, + 5, + 136, + 15, + 225, + 42, + 112, + 77, + 124, + 82, 190, + 244, + 116, + 246, + 134, + 212, + 117, + 177, + 237, + 14, 4, - 213, - 102, - 149, - 57, - 122, - 144, - 32, - 48, + 19, + 233, + 71, + 118, 28, - 41, - 120, - 173, - 86, - 175, - 201, - 186, - 171, - 98, - 15, - 218, - 25, - 137, - 242, - 245, - 215, - 89, - 82, - 128, - 97, - 158, - 1, + 205, + 23, + 237, + 101, + 196, + 223, + 165, + 144, + 73, + 40, + 152, 156, - 124, - 176, - 4, - 137, + 38, + 172, + 6, + 187, + 80, + 131, + 252, + 156, + 198, + 105, + 210, + 20, + 227, 192, - 182, - 113, - 144, - 74, - 11, - 72, - 130, - 17, - 145, - 107, - 150, - 212, - 219, - 236, - 228, - 205, - 29, + 121, + 85, + 126, + 84, + 209, + 174, 2, 0, 0, @@ -8762,9 +8756,9 @@ } }, "owner": { - "AddressOwner": "0x32482a229f83bace2da4c90b4dd99c8a73063a6a8ddc5bd6cc99ded87064912a" + "AddressOwner": "0x43e8b5e5be1ac68e8ca24f3fa4e9a850fa2ef000f7fcc805243dde365ee94408" }, - "previous_transaction": "326n9ZcQDrJVxyFL8aWkknSmFahVxwpqZQ5q5ySmWrUy", + "previous_transaction": "99opjMtEQQnYWw48gQLkHazPoKU4yUkZ15rC92L12XGy", "storage_rebate": 0 }, { @@ -8788,41 +8782,40 @@ ] } }, - "has_public_transfer": false, "version": 3, "contents": [ - 191, - 224, - 72, - 221, - 47, - 4, - 80, - 223, - 94, - 134, - 71, - 236, - 24, - 230, - 72, - 163, - 174, - 161, - 36, - 105, - 146, - 112, - 27, - 201, - 168, - 81, - 3, - 125, - 199, - 39, - 146, + 159, + 17, 152, + 180, + 227, + 201, + 126, + 19, + 62, + 97, + 58, + 55, + 206, + 250, + 223, + 150, + 234, + 46, + 196, + 17, + 109, + 79, + 44, + 191, + 82, + 137, + 100, + 23, + 137, + 234, + 223, + 134, 2, 0, 0, @@ -8851,82 +8844,66 @@ } }, "owner": { - "ObjectOwner": "0x791f65cc868cc6ef0bc0ff4028939f10b96270274481cdebf421d647bef00b6e" + "ObjectOwner": "0xdf3e1b495d7540f4d64bbc79acf8e256e2b9a52b53cc9d0e74295ddf153fcd08" }, - "previous_transaction": "326n9ZcQDrJVxyFL8aWkknSmFahVxwpqZQ5q5ySmWrUy", + "previous_transaction": "99opjMtEQQnYWw48gQLkHazPoKU4yUkZ15rC92L12XGy", "storage_rebate": 0 }, { "data": { "Move": { - "type_": "StakedIota", - "has_public_transfer": true, + "type_": { + "Other": { + "address": "0000000000000000000000000000000000000000000000000000000000000002", + "module": "dynamic_field", + "name": "Field", + "type_args": [ + "u64", + { + "struct": { + "address": "0000000000000000000000000000000000000000000000000000000000000003", + "module": "staking_pool", + "name": "PoolTokenExchangeRate", + "type_args": [] + } + } + ] + } + }, "version": 3, "contents": [ - 193, - 61, - 149, - 198, - 192, - 159, - 114, - 12, - 76, - 102, - 113, - 132, - 102, - 48, - 147, - 184, - 136, - 152, + 176, + 144, + 78, + 206, + 29, + 214, + 63, + 87, + 163, + 23, + 234, + 196, + 204, 227, + 161, + 74, + 246, + 138, + 20, 49, - 228, - 145, - 29, - 200, + 17, + 9, + 242, + 181, + 134, + 213, + 202, + 197, + 148, 7, - 113, - 151, - 147, - 111, - 71, - 3, 89, - 26, - 73, - 49, - 169, - 67, - 19, - 121, - 35, - 127, - 251, - 115, - 102, - 203, - 11, - 73, - 57, - 227, - 115, - 5, - 39, - 92, - 71, - 87, - 245, - 250, - 108, - 229, - 163, - 116, - 21, - 52, - 122, + 205, 2, 0, 0, @@ -8936,78 +8913,100 @@ 0, 0, 0, - 14, - 208, - 231, - 124, - 3, + 56, + 111, + 132, + 8, + 177, + 6, 0, + 161, + 32, + 121, + 162, + 33, + 90, + 5, 0 ] } }, "owner": { - "AddressOwner": "0x45e45dbd905642cc2ca9c3cfd1a0a1f9517758e5d98deb676040c49340c8b267" + "ObjectOwner": "0x8392eceb8bc7a250d4488ce8fdbaf3651333ef18e5732b56416337839fad5d85" }, - "previous_transaction": "326n9ZcQDrJVxyFL8aWkknSmFahVxwpqZQ5q5ySmWrUy", + "previous_transaction": "99opjMtEQQnYWw48gQLkHazPoKU4yUkZ15rC92L12XGy", "storage_rebate": 0 }, { "data": { "Move": { - "type_": { - "Other": { - "address": "0000000000000000000000000000000000000000000000000000000000000002", - "module": "dynamic_field", - "name": "Field", - "type_args": [ - "u64", - { - "struct": { - "address": "0000000000000000000000000000000000000000000000000000000000000003", - "module": "staking_pool", - "name": "PoolTokenExchangeRate", - "type_args": [] - } - } - ] - } - }, - "has_public_transfer": false, + "type_": "StakedIota", "version": 3, "contents": [ - 252, + 193, + 211, + 3, + 14, + 189, + 205, + 244, + 111, + 31, + 166, + 83, + 102, + 223, + 132, + 172, + 118, 67, - 96, - 254, - 39, - 224, - 104, - 47, - 104, - 250, + 155, + 27, + 92, + 193, + 5, + 169, + 170, + 243, + 18, + 145, + 2, + 159, + 99, + 147, + 246, + 66, 108, - 183, - 40, - 110, + 22, + 0, + 65, + 68, + 62, + 159, 93, - 19, - 107, - 54, 172, - 99, - 55, - 209, - 47, + 188, + 21, + 97, + 116, 162, - 51, - 127, - 145, - 45, - 185, 25, + 223, + 118, + 233, + 195, + 163, + 193, + 85, 228, - 42, + 59, + 227, + 48, + 169, + 105, + 90, + 104, + 169, 2, 0, 0, @@ -9017,28 +9016,20 @@ 0, 0, 0, - 56, - 111, - 132, - 8, - 177, - 6, + 14, + 208, + 231, + 124, + 3, 0, - 161, - 32, - 121, - 162, - 33, - 90, - 5, 0 ] } }, "owner": { - "ObjectOwner": "0x6450460d7e7be475407908e48144f095500bc73cf7254f91c182a45570d0cac6" + "AddressOwner": "0xbee62a773a02ad22d9565589f6f2c344308f6d6f084e2539f51b04685e4c63d5" }, - "previous_transaction": "326n9ZcQDrJVxyFL8aWkknSmFahVxwpqZQ5q5ySmWrUy", + "previous_transaction": "99opjMtEQQnYWw48gQLkHazPoKU4yUkZ15rC92L12XGy", "storage_rebate": 0 } ] diff --git a/crates/iota-light-client/example_config/532.chk b/crates/iota-light-client/example_config/532.chk deleted file mode 100644 index be1c182f162..00000000000 Binary files a/crates/iota-light-client/example_config/532.chk and /dev/null differ diff --git a/crates/iota-light-client/example_config/788.chk b/crates/iota-light-client/example_config/788.chk new file mode 100644 index 00000000000..876019fa35a Binary files /dev/null and b/crates/iota-light-client/example_config/788.chk differ diff --git a/crates/iota-light-client/example_config/801.json b/crates/iota-light-client/example_config/788.json similarity index 76% rename from crates/iota-light-client/example_config/801.json rename to crates/iota-light-client/example_config/788.json index 5335cb581bc..f67d7fa2a6a 100644 --- a/crates/iota-light-client/example_config/801.json +++ b/crates/iota-light-client/example_config/788.json @@ -1,17 +1,18 @@ { "data": { "epoch": 2, - "sequence_number": 801, - "network_total_transactions": 3498, - "content_digest": "2UJiT2bAw2jKqPXTgpQDVaQkWfQeUXhZNfo8q4PBAoGs", - "previous_digest": "5LLp9134guMunGhK7fFSSusyX24MmpEEpZh81qGJWeUE", + "sequence_number": 788, + "network_total_transactions": 3455, + "content_digest": "6QxcyMHUfp1xjCohXncwvZh8MMTtbay2ALSV7jAkTtDE", + "previous_digest": "6NXS2BMwgYWUQ5XLY8SnWK9C84v8zGvSmsenjYZBvjG2", "epoch_rolling_gas_cost_summary": { "computationCost": "0", + "computationCostBurned": "0", "storageCost": "0", "storageRebate": "0", "nonRefundableStorageFee": "0" }, - "timestamp_ms": 1730201277471, + "timestamp_ms": 1731087214937, "checkpoint_commitments": [], "end_of_epoch_data": { "nextEpochCommittee": [ @@ -36,28 +37,20 @@ "epochCommitments": [ { "ECMHLiveObjectSetDigest": { - "digest": "BcGNBp2x8z6g7PztfV8gH83mqwn6kFbVUCujttE31aMz" + "digest": "ATtMurTEvHDssU9MWeXjzETxJ5kqbouX2nb3eUx1XTTD" } } ], "epochSupplyChange": 767000000000000 }, "version_specific_data": [ - 0, - 1, - 109, - 0, - 0, - 0, - 0, - 0, 0, 0 ] }, "auth_signature": { "epoch": 2, - "signature": "iZf2OsWQ2VwXEVaMjKP7A/dMXlWBHB9nJkybu2Slbyv0hblfLkZ43L94G85k3KBZ", + "signature": "iLCTx09dJtXuYa5USgQebPw5Lk6EOI4PmCo7wG35YWND8LC2tj0HPnenTvWHH6Ih", "signers_map": [ 58, 48, @@ -75,11 +68,11 @@ 0, 0, 0, + 0, + 0, 1, 0, 2, - 0, - 3, 0 ] } diff --git a/crates/iota-light-client/example_config/801_full.json b/crates/iota-light-client/example_config/788_full.json similarity index 81% rename from crates/iota-light-client/example_config/801_full.json rename to crates/iota-light-client/example_config/788_full.json index 888b7d0df7b..163d669fce4 100644 --- a/crates/iota-light-client/example_config/801_full.json +++ b/crates/iota-light-client/example_config/788_full.json @@ -2,17 +2,18 @@ "checkpoint_summary": { "data": { "epoch": 2, - "sequence_number": 801, - "network_total_transactions": 3498, - "content_digest": "2UJiT2bAw2jKqPXTgpQDVaQkWfQeUXhZNfo8q4PBAoGs", - "previous_digest": "5LLp9134guMunGhK7fFSSusyX24MmpEEpZh81qGJWeUE", + "sequence_number": 788, + "network_total_transactions": 3455, + "content_digest": "6QxcyMHUfp1xjCohXncwvZh8MMTtbay2ALSV7jAkTtDE", + "previous_digest": "6NXS2BMwgYWUQ5XLY8SnWK9C84v8zGvSmsenjYZBvjG2", "epoch_rolling_gas_cost_summary": { "computationCost": "0", + "computationCostBurned": "0", "storageCost": "0", "storageRebate": "0", "nonRefundableStorageFee": "0" }, - "timestamp_ms": 1730201277471, + "timestamp_ms": 1731087214937, "checkpoint_commitments": [], "end_of_epoch_data": { "nextEpochCommittee": [ @@ -37,28 +38,20 @@ "epochCommitments": [ { "ECMHLiveObjectSetDigest": { - "digest": "BcGNBp2x8z6g7PztfV8gH83mqwn6kFbVUCujttE31aMz" + "digest": "ATtMurTEvHDssU9MWeXjzETxJ5kqbouX2nb3eUx1XTTD" } } ], "epochSupplyChange": 767000000000000 }, "version_specific_data": [ - 0, - 1, - 109, - 0, - 0, - 0, - 0, - 0, 0, 0 ] }, "auth_signature": { "epoch": 2, - "signature": "iZf2OsWQ2VwXEVaMjKP7A/dMXlWBHB9nJkybu2Slbyv0hblfLkZ43L94G85k3KBZ", + "signature": "iLCTx09dJtXuYa5USgQebPw5Lk6EOI4PmCo7wG35YWND8LC2tj0HPnenTvWHH6Ih", "signers_map": [ 58, 48, @@ -76,11 +69,11 @@ 0, 0, 0, + 0, + 0, 1, 0, 2, - 0, - 3, 0 ] } @@ -89,12 +82,12 @@ "V1": { "transactions": [ { - "transaction": "DXZzJ1raMzBmmoS3r1Qj183zfptm6CKAu9757eCfTXs6", - "effects": "HswoF6b5c4uf9e99vLd9owXKLYrkAvChqaExrCgfduaV" + "transaction": "Fdq98tofNo7d2iBeXo1bwicjngPHjKoAjh2Hzw1bNiTh", + "effects": "BbpszGgeae1YyN8iseSgSkisR9LcxAWrhT3xacZufR3T" }, { - "transaction": "Hero19xTN5BAmbkRVMG5HDAhrcp3ZiGiZwV2AFQSY1zX", - "effects": "ENitC7PnAdA8xLEPr7ZLizg7UDVHsaK9m6Mp74ufoSkr" + "transaction": "51gCftcvBJ8LQkfDpxBFommeJ8vy8YC9CDt6yssrKnZo", + "effects": "BSFgR4xwrxHpGrWEnEEzJLJusKndHYiWm3Quu1DzkFp" } ], "user_signatures": [ @@ -119,60 +112,15 @@ "value": { "V1": { "kind": { - "RandomnessStateUpdate": { + "ConsensusCommitPrologueV1": { "epoch": 2, - "randomness_round": 109, - "random_bytes": [ - 143, - 70, - 187, - 46, - 201, - 185, - 110, - 224, - 52, - 24, - 25, - 44, - 218, - 30, - 83, - 163, - 233, - 49, - 75, - 176, - 48, - 0, - 33, - 58, - 199, - 58, - 25, - 226, - 68, - 103, - 77, - 28, - 148, - 250, - 40, - 238, - 85, - 78, - 224, - 227, - 232, - 247, - 121, - 174, - 235, - 58, - 26, - 55 - ], - "randomness_obj_initial_shared_version": 1 + "round": 1041, + "sub_dag_index": null, + "commit_timestamp_ms": 1731087214937, + "consensus_commit_digest": "6nhnMgCXqkW3isa7anquFsA5tCrFFgh7dN56yXdNNaT2", + "consensus_determined_version_assignments": { + "CancelledTransactions": [] + } } }, "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -205,26 +153,27 @@ "executed_epoch": 2, "gas_used": { "computationCost": "0", + "computationCostBurned": "0", "storageCost": "0", "storageRebate": "0", "nonRefundableStorageFee": "0" }, - "transaction_digest": "DXZzJ1raMzBmmoS3r1Qj183zfptm6CKAu9757eCfTXs6", + "transaction_digest": "Fdq98tofNo7d2iBeXo1bwicjngPHjKoAjh2Hzw1bNiTh", "gas_object_index": null, "events_digest": null, "dependencies": [ - "8VWr4hezGA89bdrsFjhiHwhH3Yb7Sgdiu7TpMF2qg6xL" + "GKj4hyaBoS3t3QBfMRYTyxdQPvxqoAUWiEdeMxRUbhFp" ], - "lamport_version": 329, + "lamport_version": 3130, "changed_objects": [ [ - "0x0000000000000000000000000000000000000000000000000000000000000008", + "0x0000000000000000000000000000000000000000000000000000000000000006", { "input_state": { "Exist": [ [ - 328, - "7u3YmRT2a3owh7BP75FKfYtNNCW5sTWTLHsCcYCmRkmb" + 3129, + "54LV7k5dAMY9on3zxgg3gSNsZRrqTjNhfanrvQCTjcfg" ], { "Shared": { @@ -235,7 +184,7 @@ }, "output_state": { "ObjectWrite": [ - "9W7RdccHD415DSncTEKvNirUywndbc5n5so9VQpGtVuT", + "5hwt1AkB5jHBGYLCsStfjpirbUvUHPgfNknWnG14ZzXc", { "Shared": { "initial_shared_version": 1 @@ -245,31 +194,6 @@ }, "id_operation": "None" } - ], - [ - "0x5cd128d21b2c32cae57bcf06001d3974a7ab361a0b6d8defe085cc0b1fcfa371", - { - "input_state": { - "Exist": [ - [ - 328, - "CdMjLDFMZTJhvMJFVDfppTusWSmsfYj9yEVPaZ58Ldcd" - ], - { - "ObjectOwner": "0x401e3e380c24085ca4b94e3e96cfa8f501e112b2bfe8e8e44f9cd576bb76ff1c" - } - ] - }, - "output_state": { - "ObjectWrite": [ - "E9VNXVnAgiatQt1sWrm12CYwjn9Q6LuUueQ2dxF7aCTN", - { - "ObjectOwner": "0x401e3e380c24085ca4b94e3e96cfa8f501e112b2bfe8e8e44f9cd576bb76ff1c" - } - ] - }, - "id_operation": "None" - } ] ], "unchanged_shared_objects": [], @@ -284,13 +208,12 @@ "type_": { "Other": { "address": "0000000000000000000000000000000000000000000000000000000000000002", - "module": "random", - "name": "Random", + "module": "clock", + "name": "Clock", "type_args": [] } }, - "has_public_transfer": false, - "version": 328, + "version": 3129, "contents": [ 0, 0, @@ -323,46 +246,14 @@ 0, 0, 0, - 8, - 64, + 6, 30, - 62, - 56, + 169, + 214, 12, - 36, - 8, - 92, - 164, - 185, - 78, - 62, - 150, - 207, - 168, - 245, - 1, - 225, - 18, - 178, - 191, - 232, - 232, - 228, - 79, - 156, - 213, - 118, - 187, - 118, - 255, - 28, + 147, 1, 0, - 0, - 0, - 0, - 0, - 0, 0 ] } @@ -372,153 +263,7 @@ "initial_shared_version": 1 } }, - "previous_transaction": "8VWr4hezGA89bdrsFjhiHwhH3Yb7Sgdiu7TpMF2qg6xL", - "storage_rebate": 0 - }, - { - "data": { - "Move": { - "type_": { - "Other": { - "address": "0000000000000000000000000000000000000000000000000000000000000002", - "module": "dynamic_field", - "name": "Field", - "type_args": [ - "u64", - { - "struct": { - "address": "0000000000000000000000000000000000000000000000000000000000000002", - "module": "random", - "name": "RandomInner", - "type_args": [] - } - } - ] - } - }, - "has_public_transfer": false, - "version": 328, - "contents": [ - 92, - 209, - 40, - 210, - 27, - 44, - 50, - 202, - 229, - 123, - 207, - 6, - 0, - 29, - 57, - 116, - 167, - 171, - 54, - 26, - 11, - 109, - 141, - 239, - 224, - 133, - 204, - 11, - 31, - 207, - 163, - 113, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 2, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 108, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 48, - 164, - 110, - 211, - 246, - 211, - 190, - 255, - 174, - 222, - 95, - 69, - 18, - 72, - 13, - 39, - 119, - 147, - 117, - 189, - 160, - 110, - 172, - 213, - 13, - 0, - 73, - 207, - 170, - 88, - 241, - 96, - 229, - 134, - 24, - 212, - 132, - 18, - 147, - 38, - 197, - 101, - 22, - 103, - 31, - 249, - 151, - 98, - 238 - ] - } - }, - "owner": { - "ObjectOwner": "0x401e3e380c24085ca4b94e3e96cfa8f501e112b2bfe8e8e44f9cd576bb76ff1c" - }, - "previous_transaction": "8VWr4hezGA89bdrsFjhiHwhH3Yb7Sgdiu7TpMF2qg6xL", + "previous_transaction": "GKj4hyaBoS3t3QBfMRYTyxdQPvxqoAUWiEdeMxRUbhFp", "storage_rebate": 0 } ], @@ -529,13 +274,12 @@ "type_": { "Other": { "address": "0000000000000000000000000000000000000000000000000000000000000002", - "module": "random", - "name": "Random", + "module": "clock", + "name": "Clock", "type_args": [] } }, - "has_public_transfer": false, - "version": 329, + "version": 3130, "contents": [ 0, 0, @@ -568,46 +312,14 @@ 0, 0, 0, - 8, - 64, - 30, - 62, - 56, + 6, + 89, + 169, + 214, 12, - 36, - 8, - 92, - 164, - 185, - 78, - 62, - 150, - 207, - 168, - 245, - 1, - 225, - 18, - 178, - 191, - 232, - 232, - 228, - 79, - 156, - 213, - 118, - 187, - 118, - 255, - 28, + 147, 1, 0, - 0, - 0, - 0, - 0, - 0, 0 ] } @@ -617,153 +329,7 @@ "initial_shared_version": 1 } }, - "previous_transaction": "DXZzJ1raMzBmmoS3r1Qj183zfptm6CKAu9757eCfTXs6", - "storage_rebate": 0 - }, - { - "data": { - "Move": { - "type_": { - "Other": { - "address": "0000000000000000000000000000000000000000000000000000000000000002", - "module": "dynamic_field", - "name": "Field", - "type_args": [ - "u64", - { - "struct": { - "address": "0000000000000000000000000000000000000000000000000000000000000002", - "module": "random", - "name": "RandomInner", - "type_args": [] - } - } - ] - } - }, - "has_public_transfer": false, - "version": 329, - "contents": [ - 92, - 209, - 40, - 210, - 27, - 44, - 50, - 202, - 229, - 123, - 207, - 6, - 0, - 29, - 57, - 116, - 167, - 171, - 54, - 26, - 11, - 109, - 141, - 239, - 224, - 133, - 204, - 11, - 31, - 207, - 163, - 113, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 2, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 109, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 48, - 143, - 70, - 187, - 46, - 201, - 185, - 110, - 224, - 52, - 24, - 25, - 44, - 218, - 30, - 83, - 163, - 233, - 49, - 75, - 176, - 48, - 0, - 33, - 58, - 199, - 58, - 25, - 226, - 68, - 103, - 77, - 28, - 148, - 250, - 40, - 238, - 85, - 78, - 224, - 227, - 232, - 247, - 121, - 174, - 235, - 58, - 26, - 55 - ] - } - }, - "owner": { - "ObjectOwner": "0x401e3e380c24085ca4b94e3e96cfa8f501e112b2bfe8e8e44f9cd576bb76ff1c" - }, - "previous_transaction": "DXZzJ1raMzBmmoS3r1Qj183zfptm6CKAu9757eCfTXs6", + "previous_transaction": "Fdq98tofNo7d2iBeXo1bwicjngPHjKoAjh2Hzw1bNiTh", "storage_rebate": 0 } ] @@ -790,7 +356,7 @@ "computation_charge": 0, "storage_rebate": 0, "non_refundable_storage_fee": 0, - "epoch_start_timestamp_ms": 1730201277471, + "epoch_start_timestamp_ms": 1731087214937, "system_packages": [] } } @@ -826,15 +392,16 @@ "executed_epoch": 2, "gas_used": { "computationCost": "0", + "computationCostBurned": "0", "storageCost": "0", "storageRebate": "0", "nonRefundableStorageFee": "0" }, - "transaction_digest": "Hero19xTN5BAmbkRVMG5HDAhrcp3ZiGiZwV2AFQSY1zX", + "transaction_digest": "51gCftcvBJ8LQkfDpxBFommeJ8vy8YC9CDt6yssrKnZo", "gas_object_index": null, - "events_digest": "9zGaJCuLCC2T5Ng6GQAEWzRfMSLtVkD1eByq4PNLXDXv", + "events_digest": "3PHyT1KFkpkhB4MqinEYGFv3KhFjkE7eGX6y11tfmHWW", "dependencies": [ - "326n9ZcQDrJVxyFL8aWkknSmFahVxwpqZQ5q5ySmWrUy" + "99opjMtEQQnYWw48gQLkHazPoKU4yUkZ15rC92L12XGy" ], "lamport_version": 4, "changed_objects": [ @@ -845,7 +412,7 @@ "Exist": [ [ 3, - "5KJjRy2WknTpWbU9Nr5Z9AVRyFErsJMi228npzNXksGN" + "4r7zPgS4bzG14TVFgfSE1xp547UYqtEmEct9QxYtMtDt" ], { "Shared": { @@ -856,7 +423,7 @@ }, "output_state": { "ObjectWrite": [ - "2wUUiT25J3c3kte6kKAwvBUx3S1ZfHw4EgRCtAC4LbUd", + "2hX9ZbhdSSRHy8vrb67tpj835SWsAkpgCvLsuPFuKj6P", { "Shared": { "initial_shared_version": 1 @@ -868,29 +435,14 @@ } ], [ - "0x383d6594155b73cb9e5d18e7b56964f605074e7c25b3efd71d627c6ac1210c7e", - { - "input_state": "NotExist", - "output_state": { - "ObjectWrite": [ - "CuwSptictsLKd3g1vHrrRziicFKo7oxKmmrMR8d71Yqc", - { - "AddressOwner": "0x32482a229f83bace2da4c90b4dd99c8a73063a6a8ddc5bd6cc99ded87064912a" - } - ] - }, - "id_operation": "Created" - } - ], - [ - "0x5a64d0121c78b4bc393c9f00707edffcb49723d54f2093a4055289ff31809456", + "0x285e65d7ecfd912ce0d7cdaea4099e414f6febc7d8277f351c32d91ee21bfc85", { "input_state": "NotExist", "output_state": { "ObjectWrite": [ - "FczboLsuwe8Ryc2VGPN93722u4fPiv4bH5WGb6pG3PTJ", + "EHsD9LVzKcTF891q8MEXZ5L1SZ7KFEvzmYuGduCWP3ou", { - "AddressOwner": "0x3bfb34ad6f452c61add36979ce9308a507f4ca7749817ba5a19a57d4ff2cd53f" + "AddressOwner": "0x2919b85edd777017e40be03ad63ab6cee20a788d6eb2019559a558ada19ae71b" } ] }, @@ -898,14 +450,14 @@ } ], [ - "0x62cc849198f570f3a5c73c230b3e853aa75b875d18ea1f6081c391499cb9d7f1", + "0x3434098927a1b47dc0db93724b0fbaee1dd40fcd46801b14b6ae4be937f72a9b", { "input_state": "NotExist", "output_state": { "ObjectWrite": [ - "HaQ2Vb5kvxSHDJw5KsuRRxESdCP5i78LHXuqGhQi4NLy", + "Ao4LEu6ApN55Em1qKTjDKDofS6PnMyp9XKFGRBqhDJTs", { - "AddressOwner": "0x2db19ce7b296633e49f48e863c2b08d5ea0a885273bfa574e2db0a85ece225e5" + "ObjectOwner": "0x19b777f952e60d1e9269f30c271c56b77638e11e915f3a247c141f11eabd11d9" } ] }, @@ -919,7 +471,7 @@ "Exist": [ [ 3, - "GxfNuA2vW1Zdrj5G289Tdh6HsWdACP89oFniTQuuZfEM" + "FeQXd2zM4oBcJpfdB7WMs8W9UwQoL6EH1yuWabJfxZZs" ], { "ObjectOwner": "0x0000000000000000000000000000000000000000000000000000000000000005" @@ -928,7 +480,7 @@ }, "output_state": { "ObjectWrite": [ - "A7o1zRNRy3ego9n8Ug3BBi1wvDKMbMnKx4B3dgwXRtyC", + "BKr2ES3UekBSxUzRihMpiUey1cJRa5WUDzGt2NmMma4q", { "ObjectOwner": "0x0000000000000000000000000000000000000000000000000000000000000005" } @@ -938,14 +490,29 @@ } ], [ - "0x79535254784472b647d6df04a62c75c0660db5d569ce4650c6a874843188fff4", + "0x7dea723b0d1163cc7270c5382dbba701861816244c38cd1c8c2c3c5b6dde23b5", + { + "input_state": "NotExist", + "output_state": { + "ObjectWrite": [ + "JD5fSn4vA9uaNoAKC2xaN8rU9XGGoBTWMHQn9zPG4Lib", + { + "AddressOwner": "0xbee62a773a02ad22d9565589f6f2c344308f6d6f084e2539f51b04685e4c63d5" + } + ] + }, + "id_operation": "Created" + } + ], + [ + "0x821a81992c25cbfae0a6d29320439f41fc364a94f46ab4b035e9212bbc6afd34", { "input_state": "NotExist", "output_state": { "ObjectWrite": [ - "Gcteu6N6dbLaKxquYCFa7oBhALSGaPfeCTdTky8iCBWP", + "3aSNtr3Hdn3yHjG42KHTczkfWn4GaSR1kV1JRuhb7Gbj", { - "AddressOwner": "0x45e45dbd905642cc2ca9c3cfd1a0a1f9517758e5d98deb676040c49340c8b267" + "AddressOwner": "0xc0afe4713f5f894ab2d5696899cec27c8dd3ebcb8dd06811193f1cdd2f7458e3" } ] }, @@ -953,14 +520,14 @@ } ], [ - "0xb3c39b21e8d2c1ec5bd3bc65e3cad5bf042982d2c1970f1175f1b79123467574", + "0x91e4677b9f0be503aa643cdd21d5447a389ef915d4d793ca4a6adbfddae558ac", { "input_state": "NotExist", "output_state": { "ObjectWrite": [ - "FsriCX8APrLJhBTEH3uRo2YJHKoxsYcL215QGGeastWu", + "8agQNxTa3XnYMxb59mcYCCw3RFphXwFWk3zuTRCVMUUg", { - "ObjectOwner": "0x791f65cc868cc6ef0bc0ff4028939f10b96270274481cdebf421d647bef00b6e" + "ObjectOwner": "0xdf3e1b495d7540f4d64bbc79acf8e256e2b9a52b53cc9d0e74295ddf153fcd08" } ] }, @@ -968,14 +535,14 @@ } ], [ - "0xc7f052327e4a6cf61cbe61fe6ac46df43ecc35a0d5eb5281e07e763fd16844b9", + "0x972fad70ed3b24aa22bacc4a8a537a9a24eda71cd2f445accd5617c6fc44bdfa", { "input_state": "NotExist", "output_state": { "ObjectWrite": [ - "3d4zH1TQunqSbR4nx4yuSBbcZEoLwpQwJ3W3GbUqQWbx", + "C9uixEFj5WDwG3tS12LLCxez4Yot611kL4EQrpZdtp4Y", { - "ObjectOwner": "0x3c32b42be3a2db1d7ddd51c85375127ff6aefb276834193e469e01e25d48f555" + "AddressOwner": "0x43e8b5e5be1ac68e8ca24f3fa4e9a850fa2ef000f7fcc805243dde365ee94408" } ] }, @@ -983,14 +550,14 @@ } ], [ - "0xd973de93992ad56b18aa6ac1e5d84f88bd5a8945ba7401b8eabe1bb146ad397c", + "0xb27bed796fcdb3b454a7b31a469d7b9b74d611dee039be4bad48b9ab0ca1d7c5", { "input_state": "NotExist", "output_state": { "ObjectWrite": [ - "4ugJueQBifbvyqEcCPvrTaiG4RhCRDz2yiQSuPsma3oS", + "8n7iqfycy1C5cCkQeCiQpr1CppPvucqMn6LUCr7q7dHW", { - "ObjectOwner": "0x131c437cac81c9875e4840c5265f232c2b4be1b28becda2d90e308fb722d2889" + "ObjectOwner": "0x8c95d95a13b79ed01819067ed1093f99db1cf958a83c445013c7b3592bdbcb98" } ] }, @@ -998,14 +565,14 @@ } ], [ - "0xf1d4a76687efb7cac99372318b9632e10fe38eae83e572980a45732f30e7a3aa", + "0xd0ce22a50856a335bc6af588b31f4444515146761c021a1991c82e764c3e12a5", { "input_state": "NotExist", "output_state": { "ObjectWrite": [ - "BcJfCmzAkJC46fCsGGfbRPuCkqe1yktGfU4yHCAq3fmq", + "6Us2QwVZdPh3NgFdmKzyH2Q7pmgF8vk7AkHADKkUWWBA", { - "ObjectOwner": "0x6450460d7e7be475407908e48144f095500bc73cf7254f91c182a45570d0cac6" + "ObjectOwner": "0x8392eceb8bc7a250d4488ce8fdbaf3651333ef18e5732b56416337839fad5d85" } ] }, @@ -1030,227 +597,102 @@ "type_args": [] }, "contents": [ - 15, - 179, - 7, - 220, - 99, - 116, - 11, - 43, - 34, - 99, - 124, - 173, - 183, - 91, - 122, - 153, - 83, - 227, - 216, - 174, - 143, - 123, - 179, - 93, - 16, + 205, + 23, + 237, + 101, + 196, 223, - 139, - 50, - 20, - 184, - 146, - 41, - 59, - 251, - 52, - 173, - 111, - 69, - 44, - 97, - 173, - 211, - 105, - 121, - 206, - 147, - 8, 165, - 7, - 244, - 202, - 119, + 144, 73, - 129, - 123, - 165, - 161, - 154, - 87, - 212, - 255, - 44, - 213, - 63, - 59, - 251, - 52, - 173, - 111, - 69, - 44, - 97, - 173, - 211, + 40, + 152, + 156, + 38, + 172, + 6, + 187, + 80, + 131, + 252, + 156, + 198, 105, + 210, + 20, + 227, + 192, 121, - 206, - 147, - 8, - 165, - 7, - 244, - 202, - 119, - 73, - 129, - 123, - 165, - 161, - 154, - 87, - 212, - 255, - 44, - 213, + 85, + 126, + 84, + 209, + 174, + 67, + 232, + 181, + 229, + 190, + 26, + 198, + 142, + 140, + 162, + 79, 63, - 2, - 0, - 0, - 0, - 0, - 0, - 0, - 0, + 164, + 233, + 168, + 80, + 250, + 46, + 240, 0, - 14, - 208, - 231, - 124, - 3, - 0, - 0 - ] - }, - { - "package_id": "0x0000000000000000000000000000000000000000000000000000000000000003", - "transaction_module": "iota_system", - "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", - "type_": { - "address": "0000000000000000000000000000000000000000000000000000000000000003", - "module": "validator", - "name": "StakingRequestEvent", - "type_args": [] - }, - "contents": [ - 209, - 123, - 224, - 206, - 121, - 241, - 77, - 244, - 72, - 86, - 107, - 103, - 131, - 192, - 239, - 101, - 12, - 50, - 118, - 14, - 142, - 183, - 157, - 157, - 157, - 178, - 187, - 220, - 115, - 108, - 181, - 43, - 45, - 177, - 156, - 231, - 178, - 150, - 99, - 62, - 73, - 244, - 142, - 134, - 60, - 43, + 247, + 252, + 200, + 5, + 36, + 61, + 222, + 54, + 94, + 233, + 68, 8, - 213, - 234, - 10, - 136, - 82, - 115, - 191, - 165, - 116, - 226, - 219, - 10, - 133, - 236, - 226, - 37, + 67, + 232, + 181, 229, - 45, - 177, - 156, - 231, - 178, - 150, - 99, - 62, - 73, - 244, + 190, + 26, + 198, 142, - 134, - 60, - 43, + 140, + 162, + 79, + 63, + 164, + 233, + 168, + 80, + 250, + 46, + 240, + 0, + 247, + 252, + 200, + 5, + 36, + 61, + 222, + 54, + 94, + 233, + 68, 8, - 213, - 234, - 10, - 136, - 82, - 115, - 191, - 165, - 116, - 226, - 219, - 10, - 133, - 236, - 226, - 37, - 229, 2, 0, 0, @@ -1280,102 +722,102 @@ "type_args": [] }, "contents": [ - 242, - 245, - 215, - 89, - 82, - 128, - 97, - 158, - 1, - 156, - 124, - 176, - 4, - 137, + 207, + 45, + 23, + 237, + 112, + 22, + 155, + 235, + 198, + 250, + 75, + 26, + 133, 192, - 182, - 113, - 144, - 74, - 11, - 72, - 130, - 17, - 145, - 107, - 150, - 212, - 219, + 213, + 197, + 147, + 157, + 67, + 6, + 247, + 136, + 54, + 200, + 184, + 231, + 36, + 53, 236, + 43, + 58, + 87, + 192, + 175, 228, - 205, - 29, - 50, - 72, - 42, - 34, - 159, - 131, - 186, + 113, + 63, + 95, + 137, + 74, + 178, + 213, + 105, + 104, + 153, 206, - 45, - 164, - 201, - 11, - 77, - 217, - 156, - 138, - 115, - 6, - 58, - 106, + 194, + 124, 141, - 220, - 91, - 214, - 204, + 211, + 235, + 203, + 141, + 208, + 104, + 17, + 25, + 63, + 28, + 221, + 47, + 116, + 88, + 227, + 192, + 175, + 228, + 113, + 63, + 95, + 137, + 74, + 178, + 213, + 105, + 104, 153, - 222, - 216, - 112, - 100, - 145, - 42, - 50, - 72, - 42, - 34, - 159, - 131, - 186, 206, - 45, - 164, - 201, - 11, - 77, - 217, - 156, - 138, - 115, - 6, - 58, - 106, + 194, + 124, 141, - 220, - 91, - 214, - 204, - 153, - 222, - 216, - 112, - 100, - 145, - 42, + 211, + 235, + 203, + 141, + 208, + 104, + 17, + 25, + 63, + 28, + 221, + 47, + 116, + 88, + 227, 2, 0, 0, @@ -1405,102 +847,227 @@ "type_args": [] }, "contents": [ - 26, - 73, - 49, - 169, - 67, - 19, - 121, - 35, - 127, - 251, - 115, - 102, - 203, - 11, - 73, - 57, - 227, - 115, - 5, - 39, - 92, - 71, - 87, - 245, - 250, + 66, 108, - 229, - 163, - 116, + 22, + 0, + 65, + 68, + 62, + 159, + 93, + 172, + 188, 21, - 52, - 122, - 69, + 97, + 116, + 162, + 25, + 223, + 118, + 233, + 195, + 163, + 193, + 85, 228, - 93, - 189, - 144, - 86, - 66, - 204, - 44, + 59, + 227, + 48, + 169, + 105, + 90, + 104, 169, + 190, + 230, + 42, + 119, + 58, + 2, + 173, + 34, + 217, + 86, + 85, + 137, + 246, + 242, 195, - 207, - 209, - 160, - 161, - 249, - 81, + 68, + 48, + 143, + 109, + 111, + 8, + 78, + 37, + 57, + 245, + 27, + 4, + 104, + 94, + 76, + 99, + 213, + 190, + 230, + 42, 119, - 88, - 229, + 58, + 2, + 173, + 34, 217, - 141, - 235, - 103, - 96, - 64, - 196, - 147, - 64, - 200, - 178, - 103, - 69, - 228, - 93, - 189, - 144, 86, - 66, - 204, - 44, - 169, + 85, + 137, + 246, + 242, 195, - 207, - 209, - 160, - 161, - 249, - 81, + 68, + 48, + 143, + 109, + 111, + 8, + 78, + 37, + 57, + 245, + 27, + 4, + 104, + 94, + 76, + 99, + 213, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 14, + 208, + 231, + 124, + 3, + 0, + 0 + ] + }, + { + "package_id": "0x0000000000000000000000000000000000000000000000000000000000000003", + "transaction_module": "iota_system", + "sender": "0x0000000000000000000000000000000000000000000000000000000000000000", + "type_": { + "address": "0000000000000000000000000000000000000000000000000000000000000003", + "module": "validator", + "name": "StakingRequestEvent", + "type_args": [] + }, + "contents": [ + 82, + 40, + 18, + 20, + 33, + 187, + 48, + 175, + 108, + 237, + 18, + 12, + 140, + 4, + 173, + 180, + 59, + 61, + 219, + 227, + 74, + 70, + 145, + 19, + 139, + 4, + 25, + 29, + 158, + 51, + 100, + 176, + 41, + 25, + 184, + 94, + 221, 119, + 112, + 23, + 228, + 11, + 224, + 58, + 214, + 58, + 182, + 206, + 226, + 10, + 120, + 141, + 110, + 178, + 1, + 149, + 89, + 165, 88, - 229, - 217, + 173, + 161, + 154, + 231, + 27, + 41, + 25, + 184, + 94, + 221, + 119, + 112, + 23, + 228, + 11, + 224, + 58, + 214, + 58, + 182, + 206, + 226, + 10, + 120, 141, - 235, - 103, - 96, - 64, - 196, - 147, - 64, - 200, + 110, 178, - 103, + 1, + 149, + 89, + 165, + 88, + 173, + 161, + 154, + 231, + 27, 2, 0, 0, @@ -1538,38 +1105,38 @@ 0, 0, 0, - 59, - 251, - 52, - 173, - 111, - 69, - 44, - 97, - 173, - 211, - 105, - 121, - 206, - 147, - 8, - 165, - 7, - 244, - 202, - 119, - 73, - 129, - 123, - 165, - 161, - 154, - 87, - 212, - 255, - 44, - 213, + 67, + 232, + 181, + 229, + 190, + 26, + 198, + 142, + 140, + 162, + 79, 63, + 164, + 233, + 168, + 80, + 250, + 46, + 240, + 0, + 247, + 252, + 200, + 5, + 36, + 61, + 222, + 54, + 94, + 233, + 68, + 8, 232, 3, 0, @@ -1656,38 +1223,38 @@ 0, 0, 0, - 45, - 177, - 156, - 231, + 192, + 175, + 228, + 113, + 63, + 95, + 137, + 74, 178, - 150, - 99, - 62, - 73, - 244, - 142, - 134, - 60, - 43, - 8, 213, - 234, - 10, - 136, - 82, - 115, - 191, - 165, + 105, + 104, + 153, + 206, + 194, + 124, + 141, + 211, + 235, + 203, + 141, + 208, + 104, + 17, + 25, + 63, + 28, + 221, + 47, 116, - 226, - 219, - 10, - 133, - 236, - 226, - 37, - 229, + 88, + 227, 232, 3, 0, @@ -1774,38 +1341,38 @@ 0, 0, 0, - 50, - 72, + 190, + 230, 42, + 119, + 58, + 2, + 173, 34, - 159, - 131, - 186, - 206, - 45, - 164, - 201, - 11, - 77, 217, - 156, - 138, - 115, - 6, - 58, - 106, - 141, - 220, - 91, - 214, - 204, - 153, - 222, - 216, - 112, - 100, - 145, - 42, + 86, + 85, + 137, + 246, + 242, + 195, + 68, + 48, + 143, + 109, + 111, + 8, + 78, + 37, + 57, + 245, + 27, + 4, + 104, + 94, + 76, + 99, + 213, 232, 3, 0, @@ -1892,38 +1459,38 @@ 0, 0, 0, - 69, - 228, - 93, - 189, - 144, - 86, - 66, - 204, - 44, - 169, - 195, - 207, - 209, - 160, - 161, - 249, - 81, + 41, + 25, + 184, + 94, + 221, 119, - 88, - 229, - 217, + 112, + 23, + 228, + 11, + 224, + 58, + 214, + 58, + 182, + 206, + 226, + 10, + 120, 141, - 235, - 103, - 96, - 64, - 196, - 147, - 64, - 200, + 110, 178, - 103, + 1, + 149, + 89, + 165, + 88, + 173, + 161, + 154, + 231, + 27, 232, 3, 0, @@ -2106,7 +1673,6 @@ "type_args": [] } }, - "has_public_transfer": false, "version": 3, "contents": [ 0, @@ -2157,7 +1723,7 @@ "initial_shared_version": 1 } }, - "previous_transaction": "326n9ZcQDrJVxyFL8aWkknSmFahVxwpqZQ5q5ySmWrUy", + "previous_transaction": "99opjMtEQQnYWw48gQLkHazPoKU4yUkZ15rC92L12XGy", "storage_rebate": 0 }, { @@ -2181,7 +1747,6 @@ ] } }, - "has_public_transfer": false, "version": 3, "contents": [ 106, @@ -2248,38 +1813,38 @@ 0, 0, 0, - 57, - 250, - 115, - 22, - 182, - 11, - 178, - 229, - 253, - 205, - 92, - 179, - 236, - 134, - 160, - 75, - 54, - 44, - 186, 33, - 145, - 160, - 137, - 160, - 136, - 5, - 12, - 185, - 38, - 134, 120, - 155, + 211, + 59, + 94, + 251, + 190, + 29, + 133, + 24, + 140, + 237, + 130, + 57, + 191, + 221, + 188, + 132, + 174, + 6, + 148, + 192, + 142, + 32, + 59, + 66, + 217, + 202, + 103, + 195, + 2, + 210, 0, 224, 244, @@ -2297,38 +1862,38 @@ 26, 0, 4, - 59, - 251, - 52, - 173, - 111, - 69, - 44, - 97, - 173, - 211, - 105, - 121, - 206, - 147, - 8, - 165, - 7, - 244, - 202, - 119, - 73, - 129, - 123, - 165, - 161, - 154, - 87, - 212, - 255, - 44, - 213, + 67, + 232, + 181, + 229, + 190, + 26, + 198, + 142, + 140, + 162, + 79, 63, + 164, + 233, + 168, + 80, + 250, + 46, + 240, + 0, + 247, + 252, + 200, + 5, + 36, + 61, + 222, + 54, + 94, + 233, + 68, + 8, 96, 141, 207, @@ -2427,120 +1992,120 @@ 56, 212, 32, - 32, - 38, - 163, - 54, - 223, - 222, - 200, - 16, - 231, - 136, - 101, - 109, - 60, - 170, - 54, - 183, - 183, - 132, - 232, - 253, - 218, - 17, - 151, - 230, - 164, - 94, - 212, + 196, + 62, 132, - 90, - 230, - 7, + 24, + 163, + 189, + 82, + 102, + 141, + 245, 98, - 32, - 217, - 53, - 60, - 49, - 54, 152, - 131, - 119, - 1, + 156, + 97, + 252, + 197, + 195, + 47, + 86, + 12, + 85, + 19, + 174, + 41, + 58, + 124, + 46, + 194, + 31, + 214, + 202, + 227, 32, - 5, - 215, - 206, - 234, - 120, - 214, - 210, - 148, - 142, - 129, - 161, - 106, - 254, - 253, - 73, - 188, - 78, - 237, + 19, 59, - 75, - 133, - 63, - 48, - 175, - 52, - 76, - 124, - 156, - 164, + 167, + 93, 117, - 75, - 204, - 212, - 49, - 8, - 33, - 96, - 102, - 254, - 60, - 113, - 252, - 79, - 3, - 66, - 110, - 30, - 211, - 234, - 248, - 46, - 26, - 12, - 142, - 136, + 58, + 188, + 191, + 5, + 119, + 233, + 190, + 18, + 97, + 124, + 116, 104, - 199, - 247, - 129, + 64, + 49, + 71, + 93, + 217, + 56, + 139, + 72, + 40, + 147, + 175, + 70, + 71, + 25, + 63, + 48, + 137, + 184, + 29, + 114, + 29, 48, + 118, + 206, 228, - 61, + 215, + 24, + 238, + 59, + 87, + 84, + 81, + 230, + 3, + 166, + 206, + 229, + 252, + 87, + 57, + 38, + 113, 39, - 13, - 72, - 101, - 101, - 199, - 19, - 109, - 21, + 177, + 195, + 229, + 217, + 100, + 174, + 220, + 140, + 204, + 243, + 229, + 203, + 82, + 41, + 10, + 146, + 240, + 229, + 138, + 122, + 9, 11, 118, 97, @@ -2576,11 +2141,11 @@ 99, 112, 47, - 54, - 53, 52, - 52, - 54, + 50, + 53, + 48, + 53, 47, 104, 116, @@ -2606,11 +2171,11 @@ 100, 112, 47, - 54, - 53, 52, - 52, - 56, + 50, + 50, + 53, + 55, 24, 47, 105, @@ -2631,11 +2196,11 @@ 100, 112, 47, - 54, - 53, - 52, - 53, 52, + 49, + 50, + 55, + 51, 0, 0, 0, @@ -2643,38 +2208,38 @@ 0, 0, 0, - 237, - 202, - 141, - 82, - 243, - 82, - 185, - 130, + 193, 172, - 46, - 92, - 14, - 227, + 150, + 93, + 42, + 76, + 232, + 112, + 27, + 20, + 5, 72, - 139, - 162, - 213, - 206, - 89, - 121, - 179, - 214, - 64, - 241, - 40, - 30, - 200, - 224, - 136, - 215, - 39, - 57, + 216, + 182, + 218, + 2, + 154, + 69, + 196, + 72, + 211, + 177, + 54, + 182, + 188, + 223, + 197, + 33, + 134, + 9, + 159, + 212, 0, 0, 0, @@ -2691,38 +2256,38 @@ 0, 0, 0, - 74, - 247, - 153, - 224, - 143, - 124, - 199, - 167, - 208, - 50, - 229, - 166, + 177, + 240, + 130, + 136, + 211, + 97, + 82, 53, - 141, - 230, - 155, - 237, - 8, - 69, - 247, - 162, - 221, - 120, - 65, - 215, - 137, - 47, - 111, - 156, - 51, - 80, - 173, + 42, + 159, + 55, + 118, + 64, + 200, + 24, + 224, + 95, + 133, + 217, + 207, + 178, + 27, + 2, + 36, + 238, + 5, + 33, + 211, + 56, + 174, + 138, + 160, 232, 3, 0, @@ -2731,38 +2296,38 @@ 0, 0, 0, - 15, - 179, - 7, - 220, - 99, - 116, - 11, - 43, - 34, - 99, - 124, - 173, - 183, - 91, - 122, - 153, - 83, - 227, - 216, - 174, - 143, - 123, - 179, - 93, - 16, + 205, + 23, + 237, + 101, + 196, 223, - 139, - 50, + 165, + 144, + 73, + 40, + 152, + 156, + 38, + 172, + 6, + 187, + 80, + 131, + 252, + 156, + 198, + 105, + 210, 20, - 184, - 146, - 41, + 227, + 192, + 121, + 85, + 126, + 84, + 209, + 174, 1, 0, 0, @@ -2797,38 +2362,38 @@ 90, 5, 0, - 100, - 80, - 70, - 13, + 140, + 149, + 217, + 90, + 19, + 183, + 158, + 208, + 24, + 25, + 6, 126, - 123, - 228, - 117, - 64, - 121, - 8, - 228, - 129, + 209, + 9, + 63, + 153, + 219, + 28, + 249, + 88, + 168, + 60, 68, - 240, - 149, 80, - 11, + 19, 199, - 60, - 247, - 37, - 79, - 145, - 193, - 130, - 164, - 85, - 112, - 208, - 202, - 198, + 179, + 89, + 43, + 219, + 203, + 152, 3, 0, 0, @@ -2861,38 +2426,38 @@ 0, 0, 0, - 66, - 171, - 40, - 184, - 198, - 248, - 37, - 80, - 178, - 91, + 165, + 143, + 84, + 159, + 166, + 25, + 12, + 161, + 141, + 32, + 3, + 3, + 139, + 169, 133, - 208, - 36, - 170, - 67, - 205, - 191, - 10, - 49, - 13, - 172, - 27, - 248, - 33, - 15, - 228, - 163, - 61, - 156, - 207, + 182, + 69, + 119, + 237, + 71, + 47, + 66, + 63, + 192, + 99, + 180, + 148, + 177, + 252, + 179, 73, - 153, + 49, 0, 0, 0, @@ -2933,78 +2498,78 @@ 0, 0, 0, - 154, - 63, - 153, - 219, - 190, - 60, - 107, - 172, - 161, - 128, - 223, - 192, - 219, - 114, - 132, - 40, + 88, + 133, + 61, + 66, + 13, + 222, + 200, + 212, + 234, 213, - 246, - 227, - 9, - 177, - 93, - 243, - 81, - 126, - 145, - 127, - 241, - 139, - 224, - 194, - 8, - 0, - 0, - 0, - 0, - 0, - 0, + 88, + 180, + 147, + 113, + 102, + 159, 0, + 78, + 17, + 138, + 135, + 26, + 79, + 98, + 16, + 8, + 194, + 99, + 131, + 241, + 33, + 37, 0, - 45, - 177, - 156, - 231, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 192, + 175, + 228, + 113, + 63, + 95, + 137, + 74, 178, - 150, - 99, - 62, - 73, - 244, - 142, - 134, - 60, - 43, - 8, 213, - 234, - 10, - 136, - 82, - 115, - 191, - 165, + 105, + 104, + 153, + 206, + 194, + 124, + 141, + 211, + 235, + 203, + 141, + 208, + 104, + 17, + 25, + 63, + 28, + 221, + 47, 116, - 226, - 219, - 10, - 133, - 236, - 226, - 37, - 229, + 88, + 227, 96, 153, 242, @@ -3103,135 +2668,135 @@ 26, 16, 32, - 122, - 3, - 30, - 157, - 52, - 195, - 36, - 160, - 76, - 194, - 183, - 16, - 106, - 36, - 32, - 2, - 216, - 206, - 21, - 7, - 4, - 151, - 70, - 39, - 234, - 215, - 20, - 41, - 150, - 113, - 224, + 124, + 182, + 186, 91, - 32, - 3, - 60, - 195, - 7, + 12, + 170, + 131, 177, - 11, - 189, - 198, - 69, - 193, - 118, - 101, - 132, - 133, - 243, - 255, - 102, - 108, - 2, - 133, - 7, + 61, + 203, + 127, + 80, + 232, + 52, + 130, + 1, + 139, + 38, + 18, + 19, + 17, 68, - 189, - 150, - 46, - 93, - 146, - 0, - 141, - 222, - 107, - 252, - 48, - 173, - 72, - 33, - 196, - 123, - 102, - 115, - 188, - 207, - 117, - 48, - 189, - 20, - 63, - 36, + 191, + 185, + 79, + 7, + 213, + 179, + 21, + 145, + 211, + 187, + 32, 94, - 101, - 110, - 96, - 96, - 218, - 135, - 207, + 91, 130, - 60, - 108, - 28, - 33, - 226, - 4, - 178, - 120, - 120, - 61, - 127, 163, + 159, + 253, + 136, + 192, + 238, + 131, + 218, + 155, 62, + 192, + 0, + 198, + 173, + 130, + 103, + 59, + 148, + 58, + 239, + 141, 231, - 69, - 205, - 199, - 183, - 145, - 196, - 92, - 33, - 251, - 211, - 11, - 118, - 97, - 108, - 105, - 100, - 97, - 116, - 111, - 114, - 45, + 179, + 8, + 76, + 140, + 228, + 117, + 96, + 48, + 149, + 156, + 76, + 233, + 34, + 137, + 19, + 218, + 66, + 180, + 247, + 89, + 225, + 191, + 83, + 121, + 39, + 43, + 112, + 84, + 165, + 35, + 231, + 134, + 23, + 125, + 5, + 153, + 229, + 197, + 243, + 25, + 147, + 7, + 167, + 218, + 65, + 169, + 20, + 123, + 151, + 209, + 118, + 154, + 4, + 53, + 71, + 105, + 11, + 118, + 97, + 108, + 105, + 100, + 97, + 116, + 111, + 114, + 45, 48, 0, - 0, - 0, + 0, + 0, 29, 47, 105, @@ -3252,11 +2817,11 @@ 99, 112, 47, - 54, + 51, + 51, 53, 52, - 51, - 54, + 57, 47, 104, 116, @@ -3282,11 +2847,11 @@ 100, 112, 47, - 54, - 53, 52, - 51, - 56, + 53, + 53, + 55, + 55, 24, 47, 105, @@ -3307,11 +2872,11 @@ 100, 112, 47, - 54, - 53, - 52, - 52, + 51, + 51, 52, + 57, + 49, 0, 0, 0, @@ -3319,38 +2884,38 @@ 0, 0, 0, - 139, - 224, - 68, - 32, - 91, - 176, - 203, - 154, - 171, - 120, - 35, - 40, - 91, - 57, - 179, - 164, - 23, - 110, - 253, - 173, - 253, - 143, - 209, - 90, - 0, + 250, + 44, + 99, + 101, + 202, + 88, + 5, 61, - 90, - 186, - 109, - 177, + 253, + 24, + 51, + 26, + 87, + 210, + 184, + 240, + 42, + 40, + 131, + 205, 59, - 90, + 201, + 168, + 247, + 101, + 11, + 54, + 150, + 130, + 210, + 2, + 86, 0, 0, 0, @@ -3367,38 +2932,38 @@ 0, 0, 0, - 18, - 5, + 102, + 140, + 54, + 205, + 193, + 218, + 197, + 97, + 35, + 198, + 30, + 231, + 98, + 41, + 134, + 110, + 115, + 97, + 203, 29, - 220, - 228, - 186, - 162, - 227, - 204, - 127, - 217, - 247, - 93, 81, - 88, - 63, - 196, - 75, - 65, - 142, - 11, - 57, - 159, - 31, - 113, - 251, - 185, - 116, - 209, - 4, - 123, - 14, + 3, + 42, + 58, + 45, + 152, + 33, + 80, + 128, + 118, + 115, + 111, 232, 3, 0, @@ -3407,44 +2972,44 @@ 0, 0, 0, - 209, - 123, - 224, - 206, - 121, - 241, - 77, - 244, - 72, - 86, - 107, - 103, - 131, + 207, + 45, + 23, + 237, + 112, + 22, + 155, + 235, + 198, + 250, + 75, + 26, + 133, 192, - 239, - 101, - 12, - 50, - 118, - 14, - 142, - 183, - 157, - 157, + 213, + 197, + 147, 157, - 178, - 187, - 220, - 115, - 108, - 181, - 43, - 1, - 0, - 0, - 0, - 0, - 0, + 67, + 6, + 247, + 136, + 54, + 200, + 184, + 231, + 36, + 53, + 236, + 43, + 58, + 87, + 1, + 0, + 0, + 0, + 0, + 0, 0, 0, 0, @@ -3473,38 +3038,38 @@ 90, 5, 0, - 121, - 31, - 101, - 204, - 134, - 140, - 198, - 239, - 11, - 192, - 255, + 223, + 62, + 27, + 73, + 93, + 117, 64, - 40, - 147, - 159, - 16, - 185, - 98, - 112, - 39, - 68, - 129, - 205, - 235, 244, - 33, 214, - 71, - 190, - 240, - 11, - 110, + 75, + 188, + 121, + 172, + 248, + 226, + 86, + 226, + 185, + 165, + 43, + 83, + 204, + 157, + 14, + 116, + 41, + 93, + 223, + 21, + 63, + 205, + 8, 3, 0, 0, @@ -3537,38 +3102,38 @@ 0, 0, 0, - 162, + 60, + 19, + 165, + 167, + 113, + 73, + 173, + 158, + 249, + 1, + 137, + 200, + 167, 2, - 46, - 57, - 140, - 215, - 171, - 207, - 199, - 51, - 119, - 103, - 99, - 159, - 136, - 104, - 178, - 52, - 54, - 253, - 140, + 6, + 36, + 233, + 143, + 38, + 144, + 146, + 157, + 93, + 201, + 6, + 141, + 179, 74, - 230, - 132, - 248, - 104, - 75, + 31, + 1, + 243, 249, - 252, - 181, - 229, - 232, 0, 0, 0, @@ -3609,38 +3174,38 @@ 0, 0, 0, - 251, - 213, - 102, - 25, - 149, - 159, - 37, - 192, + 174, + 227, + 90, + 63, + 120, + 139, + 75, 210, - 95, - 204, - 21, - 18, - 42, - 226, - 5, - 226, - 152, - 81, - 144, - 191, - 110, - 76, - 51, - 233, - 213, - 87, - 45, - 246, - 101, - 58, - 130, + 232, + 201, + 40, + 254, + 61, + 139, + 164, + 135, + 89, + 80, + 67, + 197, + 79, + 23, + 193, + 220, + 192, + 27, + 225, + 247, + 132, + 19, + 170, + 106, 0, 0, 0, @@ -3649,38 +3214,38 @@ 0, 0, 0, - 50, - 72, + 190, + 230, 42, + 119, + 58, + 2, + 173, 34, - 159, - 131, - 186, - 206, - 45, - 164, - 201, - 11, - 77, 217, - 156, - 138, - 115, - 6, - 58, - 106, - 141, - 220, - 91, - 214, - 204, - 153, - 222, - 216, - 112, - 100, - 145, - 42, + 86, + 85, + 137, + 246, + 242, + 195, + 68, + 48, + 143, + 109, + 111, + 8, + 78, + 37, + 57, + 245, + 27, + 4, + 104, + 94, + 76, + 99, + 213, 96, 173, 222, @@ -3779,120 +3344,120 @@ 88, 242, 32, - 97, - 138, - 198, - 62, - 136, - 198, + 30, + 37, + 183, + 240, 103, - 175, - 249, - 91, - 77, - 120, - 56, - 146, - 191, - 105, - 25, - 87, - 27, - 118, - 59, - 62, - 33, - 84, - 159, - 132, - 242, - 67, - 253, - 50, - 9, - 132, - 32, - 211, - 127, - 23, - 124, - 68, - 158, - 122, - 141, - 69, - 188, - 41, - 144, - 117, - 211, - 169, - 65, + 163, + 179, + 125, + 63, + 45, + 181, + 93, + 28, + 89, + 229, + 5, + 106, + 163, + 206, + 78, + 29, + 199, + 170, + 104, + 45, + 224, 239, - 69, 38, - 170, - 84, - 174, - 198, - 7, - 179, + 161, + 81, + 144, + 126, + 32, + 126, + 135, + 13, + 21, 110, - 215, 182, - 252, - 113, - 72, - 226, - 48, - 133, - 8, - 105, - 153, - 110, - 47, - 196, - 176, - 44, - 252, + 43, + 100, + 73, + 50, + 39, + 165, + 30, + 73, + 87, + 94, + 30, 140, - 171, - 99, - 25, - 5, - 109, - 170, - 61, - 34, + 210, + 23, + 43, + 12, 234, - 19, + 159, + 61, + 202, + 207, + 104, + 212, + 250, + 231, + 63, + 48, + 130, + 188, + 193, + 4, + 218, + 97, + 149, + 191, + 5, 78, - 134, - 220, - 12, + 7, + 112, + 33, + 68, + 224, + 59, + 39, + 98, + 169, + 118, + 239, + 107, + 148, + 29, + 214, 12, - 146, - 181, - 134, - 46, - 50, - 246, - 204, - 83, - 195, - 216, + 75, + 189, + 224, + 32, + 251, + 184, + 107, + 66, + 33, + 222, + 190, + 35, + 51, + 112, + 199, 58, - 47, - 246, - 133, - 52, - 153, - 89, - 95, - 128, - 57, - 13, - 156, + 214, + 198, + 43, + 186, + 235, + 19, 11, 118, 97, @@ -3928,11 +3493,11 @@ 99, 112, 47, + 51, 54, + 55, + 48, 53, - 52, - 53, - 54, 47, 104, 116, @@ -3958,11 +3523,11 @@ 100, 112, 47, + 51, + 57, + 50, 54, - 53, - 52, - 53, - 56, + 57, 24, 47, 105, @@ -3983,11 +3548,11 @@ 100, 112, 47, - 54, - 53, 52, - 54, 52, + 50, + 53, + 55, 0, 0, 0, @@ -3995,38 +3560,38 @@ 0, 0, 0, - 121, - 245, - 173, - 214, - 62, - 45, - 78, - 231, - 42, - 141, - 80, - 70, - 101, - 210, - 114, - 51, - 185, - 135, - 223, - 13, - 169, - 239, - 245, - 68, - 254, - 122, - 133, - 237, - 80, - 108, - 161, - 30, + 209, + 106, + 60, + 28, + 216, + 87, + 117, + 44, + 84, + 47, + 230, + 60, + 135, + 6, + 51, + 174, + 41, + 241, + 66, + 2, + 40, + 192, + 103, + 218, + 11, + 122, + 250, + 66, + 79, + 142, + 211, + 4, 0, 0, 0, @@ -4043,38 +3608,38 @@ 0, 0, 0, - 164, - 51, - 96, - 252, - 84, - 166, - 231, - 126, - 125, + 155, 69, - 141, - 222, - 212, - 230, - 206, - 158, - 145, - 216, - 89, - 46, - 224, - 195, 37, - 168, - 53, - 214, - 209, - 133, - 68, - 191, - 142, - 226, + 119, + 94, + 101, + 203, + 127, + 114, + 40, + 83, + 87, + 40, + 234, + 215, + 188, + 58, + 35, + 220, + 69, + 167, + 187, + 76, + 163, + 122, + 10, + 181, + 147, + 70, + 189, + 87, + 154, 232, 3, 0, @@ -4083,38 +3648,38 @@ 0, 0, 0, - 242, - 245, - 215, - 89, - 82, - 128, + 66, + 108, + 22, + 0, + 65, + 68, + 62, + 159, + 93, + 172, + 188, + 21, 97, - 158, - 1, - 156, - 124, - 176, - 4, - 137, - 192, - 182, - 113, - 144, - 74, - 11, - 72, - 130, - 17, - 145, - 107, - 150, - 212, - 219, - 236, + 116, + 162, + 25, + 223, + 118, + 233, + 195, + 163, + 193, + 85, 228, - 205, - 29, + 59, + 227, + 48, + 169, + 105, + 90, + 104, + 169, 1, 0, 0, @@ -4149,38 +3714,38 @@ 90, 5, 0, - 60, - 50, - 180, - 43, - 227, + 131, + 146, + 236, + 235, + 139, + 199, 162, - 219, - 29, - 125, - 221, - 81, - 200, - 83, - 117, - 18, - 127, - 246, - 174, - 251, - 39, - 104, - 52, - 25, - 62, - 70, - 158, - 1, - 226, - 93, + 80, + 212, 72, - 245, - 85, + 140, + 232, + 253, + 186, + 243, + 101, + 19, + 51, + 239, + 24, + 229, + 115, + 43, + 86, + 65, + 99, + 55, + 131, + 159, + 173, + 93, + 133, 3, 0, 0, @@ -4213,41 +3778,41 @@ 0, 0, 0, - 81, - 125, - 125, - 70, - 103, + 78, + 224, + 13, + 230, 63, - 184, - 12, - 3, - 228, - 100, - 158, - 86, - 236, - 215, - 25, - 233, - 65, - 9, - 225, - 127, - 207, - 98, - 242, - 200, - 41, - 56, - 223, + 173, + 19, + 87, 20, - 82, - 36, - 144, - 0, - 0, - 0, + 241, + 227, + 85, + 250, + 133, + 57, + 177, + 238, + 152, + 194, + 210, + 123, + 166, + 245, + 195, + 78, + 24, + 150, + 68, + 210, + 194, + 135, + 90, + 0, + 0, + 0, 0, 0, 0, @@ -4285,38 +3850,38 @@ 0, 0, 0, - 49, - 246, - 218, - 38, - 205, - 194, - 217, - 99, + 131, + 5, + 19, + 173, + 71, + 85, + 34, + 154, + 188, 178, - 200, - 79, - 165, - 209, - 164, - 114, - 99, - 171, - 118, - 230, - 130, - 90, - 255, - 202, - 41, - 223, - 145, - 76, - 62, - 88, - 164, - 241, - 120, + 2, + 156, + 113, + 213, + 174, + 54, + 18, + 43, + 140, + 17, + 237, + 175, + 95, + 125, + 104, + 199, + 61, + 170, + 9, + 101, + 233, + 169, 0, 0, 0, @@ -4325,38 +3890,38 @@ 0, 0, 0, - 69, - 228, - 93, - 189, - 144, - 86, - 66, - 204, - 44, - 169, - 195, - 207, - 209, - 160, - 161, - 249, - 81, + 41, + 25, + 184, + 94, + 221, 119, - 88, - 229, - 217, + 112, + 23, + 228, + 11, + 224, + 58, + 214, + 58, + 182, + 206, + 226, + 10, + 120, 141, - 235, - 103, - 96, - 64, - 196, - 147, - 64, - 200, + 110, 178, - 103, + 1, + 149, + 89, + 165, + 88, + 173, + 161, + 154, + 231, + 27, 96, 179, 253, @@ -4455,120 +4020,120 @@ 116, 244, 32, - 44, - 195, - 142, - 100, - 204, - 221, - 210, - 56, + 201, + 240, + 172, + 219, + 174, + 239, + 53, + 226, + 13, 220, - 159, - 252, - 43, + 210, + 185, + 203, + 133, + 146, + 206, + 6, + 139, + 173, + 40, + 92, + 214, + 151, + 52, + 6, + 137, + 118, + 144, + 242, + 19, 109, - 45, - 129, - 212, - 168, - 89, + 86, + 32, + 81, + 29, + 75, 191, - 44, - 18, - 142, - 55, + 136, + 151, + 177, 166, - 147, - 169, - 39, - 81, - 113, - 109, - 74, - 111, - 32, - 67, - 83, - 247, - 195, - 31, + 53, + 182, + 127, 24, - 188, - 165, - 86, - 175, - 68, - 17, + 25, + 179, + 223, 34, - 236, - 33, - 55, - 120, - 104, - 114, - 61, - 167, - 69, - 129, - 149, - 36, - 40, - 216, - 145, - 186, - 240, - 203, - 190, - 48, - 181, - 111, - 79, - 167, - 197, - 9, - 154, - 150, - 224, - 28, - 60, - 46, - 8, - 148, - 63, - 84, - 203, + 251, + 7, + 173, + 106, + 47, + 67, + 193, + 58, + 192, + 103, + 173, + 85, + 118, + 125, + 57, + 17, + 48, 153, - 87, - 15, - 26, - 86, - 208, - 145, - 204, - 145, - 25, - 124, - 35, - 62, - 14, - 136, - 91, + 255, + 85, + 74, + 254, + 22, + 45, + 78, + 194, + 45, + 69, + 22, + 157, + 104, + 32, + 132, + 29, + 176, 231, - 161, - 80, - 201, - 205, - 64, - 58, - 13, - 96, - 245, + 38, 185, - 36, - 46, - 134, + 55, + 215, + 253, + 84, + 132, + 62, + 124, + 59, + 5, + 26, + 27, + 11, + 119, + 18, + 94, 189, + 55, + 92, + 233, + 0, + 84, + 93, + 186, + 196, + 29, + 103, + 167, 11, 118, 97, @@ -4604,11 +4169,11 @@ 99, 112, 47, - 54, - 53, 52, - 54, - 54, + 52, + 53, + 49, + 55, 47, 104, 116, @@ -4634,11 +4199,11 @@ 100, 112, 47, - 54, - 53, + 51, 52, - 54, - 56, + 48, + 51, + 55, 24, 47, 105, @@ -4659,11 +4224,11 @@ 100, 112, 47, - 54, - 53, 52, + 53, + 56, + 53, 55, - 52, 0, 0, 0, @@ -4671,38 +4236,38 @@ 0, 0, 0, - 209, - 199, - 154, - 78, + 66, + 169, 21, - 110, - 135, - 195, + 132, + 190, + 62, + 174, + 59, + 27, + 25, + 169, + 27, + 16, + 219, + 37, + 141, + 250, + 49, + 205, 67, - 136, - 35, - 94, - 39, - 97, - 239, - 158, - 2, - 153, - 53, - 161, - 61, - 9, - 6, - 74, - 159, 148, - 70, - 72, - 180, - 122, - 44, - 178, + 42, + 101, + 170, + 175, + 157, + 115, + 136, + 211, + 126, + 55, + 241, 0, 0, 0, @@ -4719,38 +4284,38 @@ 0, 0, 0, - 38, - 175, - 8, - 245, - 39, - 20, - 18, - 239, - 5, + 230, 160, - 19, - 43, - 237, - 138, - 215, - 107, + 169, + 226, + 177, + 83, + 119, + 70, + 254, 149, + 70, + 131, + 56, + 219, + 173, + 172, + 209, + 121, + 245, + 182, + 94, 49, - 242, - 105, - 61, + 48, + 13, + 108, 6, - 20, - 174, - 86, + 173, + 172, 220, - 229, - 145, - 50, - 170, - 76, - 138, + 23, + 236, + 48, 232, 3, 0, @@ -4759,38 +4324,38 @@ 0, 0, 0, - 26, - 73, - 49, - 169, - 67, - 19, - 121, - 35, - 127, - 251, - 115, - 102, - 203, - 11, - 73, - 57, - 227, - 115, - 5, - 39, - 92, - 71, - 87, - 245, - 250, + 82, + 40, + 18, + 20, + 33, + 187, + 48, + 175, 108, - 229, - 163, - 116, - 21, - 52, - 122, + 237, + 18, + 12, + 140, + 4, + 173, + 180, + 59, + 61, + 219, + 227, + 74, + 70, + 145, + 19, + 139, + 4, + 25, + 29, + 158, + 51, + 100, + 176, 1, 0, 0, @@ -4825,38 +4390,38 @@ 90, 5, 0, - 19, + 25, + 183, + 119, + 249, + 82, + 230, + 13, + 30, + 146, + 105, + 243, + 12, + 39, 28, - 67, - 124, - 172, - 129, - 201, - 135, - 94, - 72, - 64, - 197, - 38, - 95, - 35, - 44, - 43, - 75, + 86, + 183, + 118, + 56, 225, - 178, - 139, - 236, - 218, - 45, - 144, - 227, - 8, - 251, - 114, - 45, - 40, - 137, + 30, + 145, + 95, + 58, + 36, + 124, + 20, + 31, + 17, + 234, + 189, + 17, + 217, 3, 0, 0, @@ -4889,38 +4454,38 @@ 0, 0, 0, - 225, - 151, - 122, - 183, - 140, - 80, - 88, - 134, + 44, + 118, + 58, + 249, + 246, + 128, + 40, + 44, + 113, + 168, 103, - 4, - 35, - 29, - 155, - 30, - 74, - 213, - 228, - 35, - 178, - 125, - 105, - 167, - 234, - 254, - 209, + 159, + 201, + 41, + 71, + 22, + 179, + 109, + 66, + 96, + 65, + 41, + 238, 95, - 150, - 138, - 239, - 111, - 38, - 232, + 63, + 159, + 128, + 82, + 6, + 19, + 230, + 36, 0, 0, 0, @@ -4961,39 +4526,38 @@ 0, 0, 0, - 119, - 115, - 238, - 13, - 243, - 22, - 28, - 78, - 108, - 60, - 101, - 25, - 123, - 138, - 116, - 103, - 87, - 57, - 235, - 83, - 123, - 185, - 5, - 43, - 108, - 250, - 199, + 227, + 214, + 106, + 80, + 49, + 236, + 230, + 181, 194, + 71, + 204, + 47, + 195, + 108, + 37, 8, - 58, - 14, - 13, - 0, + 136, + 161, + 95, + 189, + 20, + 240, + 60, + 188, + 53, + 215, + 47, + 169, + 187, + 142, + 12, + 183, 0, 0, 0, @@ -5001,39 +4565,40 @@ 0, 0, 0, - 255, - 42, - 54, - 155, - 16, - 100, - 224, - 39, - 217, - 65, - 114, 0, - 139, - 225, - 83, - 252, - 84, - 75, - 243, - 235, - 17, - 199, - 41, - 252, - 146, - 124, - 26, + 51, + 175, + 121, + 165, + 254, + 196, 180, - 181, - 181, - 29, - 244, - 0, + 235, + 206, + 116, + 244, + 241, + 228, + 36, + 190, + 59, + 96, + 143, + 116, + 246, + 216, + 37, + 10, + 154, + 151, + 190, + 78, + 196, + 88, + 135, + 200, + 232, + 0, 0, 0, 0, @@ -5042,38 +4607,38 @@ 0, 0, 0, + 120, + 9, + 122, + 172, 245, - 64, - 131, - 228, - 230, - 202, - 193, + 199, + 26, + 84, 136, - 58, - 201, - 134, - 167, - 174, - 61, - 63, - 171, - 27, - 171, - 150, - 193, - 39, - 53, - 93, - 49, - 184, - 198, - 180, 117, - 20, - 160, + 70, + 158, + 255, + 24, + 211, + 244, + 197, + 162, + 129, + 243, + 195, + 40, + 145, + 83, + 186, + 142, + 252, 225, - 139, + 90, + 228, + 10, + 22, 4, 0, 0, @@ -5082,38 +4647,38 @@ 0, 0, 0, - 100, - 96, - 140, - 115, - 178, - 133, - 212, - 21, - 85, - 180, - 158, - 44, - 146, - 235, - 132, + 52, + 218, + 54, + 70, + 39, + 183, + 172, + 251, + 39, 110, - 13, - 239, - 115, - 223, + 165, + 191, 110, - 114, - 226, + 18, + 214, + 133, + 142, + 58, + 2, + 129, + 211, + 233, + 105, + 29, + 227, + 196, + 74, + 133, 165, - 144, - 102, - 85, - 239, - 12, - 249, - 109, - 45, + 252, + 30, + 31, 0, 0, 0, @@ -5122,38 +4687,38 @@ 0, 0, 0, - 171, - 39, - 109, - 25, - 86, - 101, - 155, - 65, - 21, - 200, + 30, + 14, + 118, + 33, + 118, + 50, 37, - 226, - 115, - 169, - 182, - 74, - 60, - 111, - 254, - 140, - 247, - 230, - 222, - 63, - 45, - 45, - 35, - 196, - 16, - 111, + 105, + 218, 145, - 85, + 149, + 140, + 58, + 51, + 117, + 227, + 59, + 70, + 65, + 100, + 117, + 18, + 195, + 168, + 46, + 87, + 3, + 3, + 152, + 147, + 232, + 163, 0, 0, 0, @@ -5163,38 +4728,38 @@ 0, 0, 0, - 254, - 222, - 88, - 194, - 222, - 164, - 236, - 45, - 117, 125, - 80, - 122, - 1, - 119, - 21, - 186, - 58, - 42, - 210, - 122, + 137, + 139, + 51, + 202, + 91, + 166, + 12, + 15, 75, - 254, - 158, - 92, - 161, - 201, - 100, - 39, - 218, - 24, - 41, - 151, + 138, + 98, + 249, + 0, + 8, + 119, + 3, + 153, + 33, + 231, + 43, + 31, + 82, + 19, + 144, + 211, + 94, + 36, + 188, + 80, + 170, + 27, 0, 0, 0, @@ -5275,38 +4840,39 @@ 0, 0, 0, - 166, - 4, - 47, - 112, - 189, - 16, - 209, - 252, - 102, - 57, - 148, - 80, - 98, + 79, + 17, 167, - 43, - 219, - 234, - 27, - 136, - 160, - 254, - 187, - 150, - 197, - 7, - 70, - 7, - 202, - 220, - 47, - 159, - 89, + 207, + 224, + 118, + 62, + 44, + 178, + 174, + 165, + 143, + 18, + 121, + 59, + 240, + 243, + 203, + 209, + 186, + 63, + 64, + 104, + 6, + 206, + 83, + 237, + 242, + 44, + 248, + 198, + 158, + 0, 0, 0, 0, @@ -5357,46 +4923,46 @@ 0, 0, 0, - 210, - 104, - 7, - 216, - 146, + 110, + 189, + 213, + 12, + 147, 1, 0, 0, - 36, - 82, - 30, - 65, - 183, - 192, - 23, - 72, - 123, - 231, - 100, - 128, - 86, - 159, - 136, - 163, + 106, + 236, + 253, + 115, + 168, + 184, + 12, + 164, + 172, + 208, + 106, + 220, + 69, 24, - 82, - 67, - 139, - 141, - 248, - 200, - 171, - 163, - 5, - 98, - 244, - 137, - 223, - 150, - 206, + 89, + 198, + 2, + 213, + 236, + 72, + 90, + 211, + 34, + 72, + 153, + 83, + 221, + 101, + 158, + 252, + 168, + 143, 0, 0, 0, @@ -5411,7 +4977,7 @@ "owner": { "ObjectOwner": "0x0000000000000000000000000000000000000000000000000000000000000005" }, - "previous_transaction": "326n9ZcQDrJVxyFL8aWkknSmFahVxwpqZQ5q5ySmWrUy", + "previous_transaction": "99opjMtEQQnYWw48gQLkHazPoKU4yUkZ15rC92L12XGy", "storage_rebate": 0 } ], @@ -5427,7 +4993,6 @@ "type_args": [] } }, - "has_public_transfer": false, "version": 4, "contents": [ 0, @@ -5478,7 +5043,7 @@ "initial_shared_version": 1 } }, - "previous_transaction": "Hero19xTN5BAmbkRVMG5HDAhrcp3ZiGiZwV2AFQSY1zX", + "previous_transaction": "51gCftcvBJ8LQkfDpxBFommeJ8vy8YC9CDt6yssrKnZo", "storage_rebate": 0 }, { @@ -5502,7 +5067,6 @@ ] } }, - "has_public_transfer": false, "version": 4, "contents": [ 106, @@ -5569,38 +5133,38 @@ 0, 0, 0, - 57, - 250, - 115, - 22, - 182, - 11, - 178, - 229, - 253, - 205, - 92, - 179, - 236, - 134, - 160, - 75, - 54, - 44, - 186, 33, - 145, - 160, - 137, - 160, - 136, - 5, - 12, - 185, - 38, - 134, 120, - 155, + 211, + 59, + 94, + 251, + 190, + 29, + 133, + 24, + 140, + 237, + 130, + 57, + 191, + 221, + 188, + 132, + 174, + 6, + 148, + 192, + 142, + 32, + 59, + 66, + 217, + 202, + 103, + 195, + 2, + 210, 0, 208, 127, @@ -5618,38 +5182,38 @@ 29, 0, 4, - 59, - 251, - 52, - 173, - 111, - 69, - 44, - 97, - 173, - 211, - 105, - 121, - 206, - 147, - 8, - 165, - 7, - 244, - 202, - 119, - 73, - 129, - 123, - 165, - 161, - 154, - 87, - 212, - 255, - 44, - 213, + 67, + 232, + 181, + 229, + 190, + 26, + 198, + 142, + 140, + 162, + 79, 63, + 164, + 233, + 168, + 80, + 250, + 46, + 240, + 0, + 247, + 252, + 200, + 5, + 36, + 61, + 222, + 54, + 94, + 233, + 68, + 8, 96, 141, 207, @@ -5748,120 +5312,120 @@ 56, 212, 32, - 32, - 38, - 163, - 54, - 223, - 222, - 200, - 16, - 231, - 136, - 101, - 109, - 60, - 170, - 54, - 183, - 183, - 132, - 232, - 253, - 218, - 17, - 151, - 230, - 164, - 94, - 212, + 196, + 62, 132, - 90, - 230, - 7, + 24, + 163, + 189, + 82, + 102, + 141, + 245, 98, - 32, - 217, - 53, - 60, - 49, - 54, 152, - 131, - 119, - 1, - 32, - 5, - 215, - 206, - 234, - 120, - 214, - 210, - 148, - 142, - 129, - 161, - 106, - 254, - 253, - 73, - 188, - 78, - 237, - 59, - 75, - 133, - 63, - 48, - 175, - 52, - 76, - 124, 156, - 164, - 117, - 75, - 204, - 212, - 49, - 8, - 33, - 96, - 102, - 254, - 60, - 113, + 97, 252, - 79, - 3, - 66, - 110, - 30, - 211, - 234, - 248, - 46, - 26, + 197, + 195, + 47, + 86, 12, - 142, - 136, + 85, + 19, + 174, + 41, + 58, + 124, + 46, + 194, + 31, + 214, + 202, + 227, + 32, + 19, + 59, + 167, + 93, + 117, + 58, + 188, + 191, + 5, + 119, + 233, + 190, + 18, + 97, + 124, + 116, 104, - 199, - 247, - 129, + 64, + 49, + 71, + 93, + 217, + 56, + 139, + 72, + 40, + 147, + 175, + 70, + 71, + 25, + 63, + 48, + 137, + 184, + 29, + 114, + 29, 48, + 118, + 206, 228, - 61, + 215, + 24, + 238, + 59, + 87, + 84, + 81, + 230, + 3, + 166, + 206, + 229, + 252, + 87, + 57, + 38, + 113, 39, - 13, - 72, - 101, - 101, - 199, - 19, - 109, - 21, + 177, + 195, + 229, + 217, + 100, + 174, + 220, + 140, + 204, + 243, + 229, + 203, + 82, + 41, + 10, + 146, + 240, + 229, + 138, + 122, + 9, 11, 118, 97, @@ -5897,11 +5461,11 @@ 99, 112, 47, - 54, - 53, - 52, 52, - 54, + 50, + 53, + 48, + 53, 47, 104, 116, @@ -5927,11 +5491,11 @@ 100, 112, 47, - 54, - 53, - 52, 52, - 56, + 50, + 50, + 53, + 55, 24, 47, 105, @@ -5952,11 +5516,11 @@ 100, 112, 47, - 54, - 53, - 52, - 53, 52, + 49, + 50, + 55, + 51, 0, 0, 0, @@ -5964,38 +5528,38 @@ 0, 0, 0, - 237, - 202, - 141, - 82, - 243, - 82, - 185, - 130, + 193, 172, - 46, - 92, - 14, - 227, + 150, + 93, + 42, + 76, + 232, + 112, + 27, + 20, + 5, 72, - 139, - 162, - 213, - 206, - 89, - 121, - 179, - 214, - 64, - 241, - 40, - 30, - 200, - 224, - 136, - 215, - 39, - 57, + 216, + 182, + 218, + 2, + 154, + 69, + 196, + 72, + 211, + 177, + 54, + 182, + 188, + 223, + 197, + 33, + 134, + 9, + 159, + 212, 0, 0, 0, @@ -6012,38 +5576,38 @@ 0, 0, 0, - 74, - 247, - 153, - 224, - 143, - 124, - 199, - 167, - 208, - 50, - 229, - 166, + 177, + 240, + 130, + 136, + 211, + 97, + 82, 53, - 141, - 230, - 155, - 237, - 8, - 69, - 247, - 162, - 221, - 120, - 65, - 215, - 137, - 47, - 111, - 156, - 51, - 80, - 173, + 42, + 159, + 55, + 118, + 64, + 200, + 24, + 224, + 95, + 133, + 217, + 207, + 178, + 27, + 2, + 36, + 238, + 5, + 33, + 211, + 56, + 174, + 138, + 160, 232, 3, 0, @@ -6052,38 +5616,38 @@ 0, 0, 0, - 15, - 179, - 7, - 220, - 99, - 116, - 11, - 43, - 34, - 99, - 124, - 173, - 183, - 91, - 122, - 153, - 83, - 227, - 216, - 174, - 143, - 123, - 179, - 93, - 16, + 205, + 23, + 237, + 101, + 196, 223, - 139, - 50, + 165, + 144, + 73, + 40, + 152, + 156, + 38, + 172, + 6, + 187, + 80, + 131, + 252, + 156, + 198, + 105, + 210, 20, - 184, - 146, - 41, + 227, + 192, + 121, + 85, + 126, + 84, + 209, + 174, 1, 0, 0, @@ -6118,38 +5682,38 @@ 92, 5, 0, - 100, - 80, - 70, - 13, + 140, + 149, + 217, + 90, + 19, + 183, + 158, + 208, + 24, + 25, + 6, 126, - 123, - 228, - 117, - 64, - 121, - 8, - 228, - 129, + 209, + 9, + 63, + 153, + 219, + 28, + 249, + 88, + 168, + 60, 68, - 240, - 149, 80, - 11, + 19, 199, - 60, - 247, - 37, - 79, - 145, - 193, - 130, - 164, - 85, - 112, - 208, - 202, - 198, + 179, + 89, + 43, + 219, + 203, + 152, 4, 0, 0, @@ -6182,38 +5746,38 @@ 0, 0, 0, - 66, - 171, - 40, - 184, - 198, - 248, - 37, - 80, - 178, - 91, + 165, + 143, + 84, + 159, + 166, + 25, + 12, + 161, + 141, + 32, + 3, + 3, + 139, + 169, 133, - 208, - 36, - 170, - 67, - 205, - 191, - 10, - 49, - 13, - 172, - 27, - 248, - 33, - 15, - 228, - 163, - 61, - 156, - 207, + 182, + 69, + 119, + 237, + 71, + 47, + 66, + 63, + 192, + 99, + 180, + 148, + 177, + 252, + 179, 73, - 153, + 49, 0, 0, 0, @@ -6254,38 +5818,38 @@ 0, 0, 0, - 154, - 63, - 153, - 219, - 190, - 60, - 107, - 172, - 161, - 128, - 223, - 192, - 219, - 114, - 132, - 40, + 88, + 133, + 61, + 66, + 13, + 222, + 200, + 212, + 234, 213, - 246, - 227, - 9, - 177, - 93, - 243, - 81, - 126, - 145, - 127, - 241, - 139, - 224, - 194, + 88, + 180, + 147, + 113, + 102, + 159, + 0, + 78, + 17, + 138, + 135, + 26, + 79, + 98, + 16, 8, + 194, + 99, + 131, + 241, + 33, + 37, 0, 0, 0, @@ -6294,38 +5858,38 @@ 0, 0, 0, - 45, - 177, - 156, - 231, + 192, + 175, + 228, + 113, + 63, + 95, + 137, + 74, 178, - 150, - 99, - 62, - 73, - 244, - 142, - 134, - 60, - 43, - 8, 213, - 234, - 10, - 136, - 82, - 115, - 191, - 165, + 105, + 104, + 153, + 206, + 194, + 124, + 141, + 211, + 235, + 203, + 141, + 208, + 104, + 17, + 25, + 63, + 28, + 221, + 47, 116, - 226, - 219, - 10, - 133, - 236, - 226, - 37, - 229, + 88, + 227, 96, 153, 242, @@ -6416,128 +5980,128 @@ 154, 128, 62, - 35, + 35, + 48, + 149, + 94, + 189, + 26, + 16, + 32, + 124, + 182, + 186, + 91, + 12, + 170, + 131, + 177, + 61, + 203, + 127, + 80, + 232, + 52, + 130, + 1, + 139, + 38, + 18, + 19, + 17, + 68, + 191, + 185, + 79, + 7, + 213, + 179, + 21, + 145, + 211, + 187, + 32, + 94, + 91, + 130, + 163, + 159, + 253, + 136, + 192, + 238, + 131, + 218, + 155, + 62, + 192, + 0, + 198, + 173, + 130, + 103, + 59, + 148, + 58, + 239, + 141, + 231, + 179, + 8, + 76, + 140, + 228, + 117, + 96, 48, 149, - 94, - 189, - 26, - 16, - 32, - 122, - 3, - 30, - 157, - 52, - 195, - 36, - 160, + 156, 76, - 194, - 183, - 16, - 106, - 36, - 32, - 2, - 216, - 206, - 21, - 7, - 4, - 151, - 70, + 233, + 34, + 137, + 19, + 218, + 66, + 180, + 247, + 89, + 225, + 191, + 83, + 121, 39, - 234, - 215, - 20, - 41, - 150, - 113, - 224, - 91, - 32, - 3, - 60, - 195, - 7, - 177, - 11, - 189, - 198, - 69, - 193, - 118, - 101, - 132, - 133, + 43, + 112, + 84, + 165, + 35, + 231, + 134, + 23, + 125, + 5, + 153, + 229, + 197, 243, - 255, - 102, - 108, - 2, - 133, + 25, + 147, 7, - 68, - 189, - 150, - 46, - 93, - 146, - 0, - 141, - 222, - 107, - 252, - 48, - 173, - 72, - 33, - 196, - 123, - 102, - 115, - 188, - 207, - 117, - 48, - 189, - 20, - 63, - 36, - 94, - 101, - 110, - 96, - 96, + 167, 218, - 135, - 207, - 130, - 60, - 108, - 28, - 33, - 226, + 65, + 169, + 20, + 123, + 151, + 209, + 118, + 154, 4, - 178, - 120, - 120, - 61, - 127, - 163, - 62, - 231, - 69, - 205, - 199, - 183, - 145, - 196, - 92, - 33, - 251, - 211, + 53, + 71, + 105, 11, 118, 97, @@ -6573,11 +6137,11 @@ 99, 112, 47, - 54, + 51, + 51, 53, 52, - 51, - 54, + 57, 47, 104, 116, @@ -6603,11 +6167,11 @@ 100, 112, 47, - 54, - 53, 52, - 51, - 56, + 53, + 53, + 55, + 55, 24, 47, 105, @@ -6628,11 +6192,11 @@ 100, 112, 47, - 54, - 53, - 52, - 52, + 51, + 51, 52, + 57, + 49, 0, 0, 0, @@ -6640,38 +6204,38 @@ 0, 0, 0, - 139, - 224, - 68, - 32, - 91, - 176, - 203, - 154, - 171, - 120, - 35, - 40, - 91, - 57, - 179, - 164, - 23, - 110, - 253, - 173, - 253, - 143, - 209, - 90, - 0, + 250, + 44, + 99, + 101, + 202, + 88, + 5, 61, - 90, - 186, - 109, - 177, + 253, + 24, + 51, + 26, + 87, + 210, + 184, + 240, + 42, + 40, + 131, + 205, 59, - 90, + 201, + 168, + 247, + 101, + 11, + 54, + 150, + 130, + 210, + 2, + 86, 0, 0, 0, @@ -6688,38 +6252,38 @@ 0, 0, 0, - 18, - 5, + 102, + 140, + 54, + 205, + 193, + 218, + 197, + 97, + 35, + 198, + 30, + 231, + 98, + 41, + 134, + 110, + 115, + 97, + 203, 29, - 220, - 228, - 186, - 162, - 227, - 204, - 127, - 217, - 247, - 93, 81, - 88, - 63, - 196, - 75, - 65, - 142, - 11, - 57, - 159, - 31, - 113, - 251, - 185, - 116, - 209, - 4, - 123, - 14, + 3, + 42, + 58, + 45, + 152, + 33, + 80, + 128, + 118, + 115, + 111, 232, 3, 0, @@ -6728,38 +6292,38 @@ 0, 0, 0, - 209, - 123, - 224, - 206, - 121, - 241, - 77, - 244, - 72, - 86, - 107, - 103, - 131, + 207, + 45, + 23, + 237, + 112, + 22, + 155, + 235, + 198, + 250, + 75, + 26, + 133, 192, - 239, - 101, - 12, - 50, - 118, - 14, - 142, - 183, - 157, - 157, + 213, + 197, + 147, 157, - 178, - 187, - 220, - 115, - 108, - 181, + 67, + 6, + 247, + 136, + 54, + 200, + 184, + 231, + 36, + 53, + 236, 43, + 58, + 87, 1, 0, 0, @@ -6794,38 +6358,38 @@ 92, 5, 0, - 121, - 31, - 101, - 204, - 134, - 140, - 198, - 239, - 11, - 192, - 255, + 223, + 62, + 27, + 73, + 93, + 117, 64, - 40, - 147, - 159, - 16, - 185, - 98, - 112, - 39, - 68, - 129, - 205, - 235, 244, - 33, 214, - 71, - 190, - 240, - 11, - 110, + 75, + 188, + 121, + 172, + 248, + 226, + 86, + 226, + 185, + 165, + 43, + 83, + 204, + 157, + 14, + 116, + 41, + 93, + 223, + 21, + 63, + 205, + 8, 4, 0, 0, @@ -6858,38 +6422,38 @@ 0, 0, 0, - 162, + 60, + 19, + 165, + 167, + 113, + 73, + 173, + 158, + 249, + 1, + 137, + 200, + 167, 2, - 46, - 57, - 140, - 215, - 171, - 207, - 199, - 51, - 119, - 103, - 99, - 159, - 136, - 104, - 178, - 52, - 54, - 253, - 140, + 6, + 36, + 233, + 143, + 38, + 144, + 146, + 157, + 93, + 201, + 6, + 141, + 179, 74, - 230, - 132, - 248, - 104, - 75, + 31, + 1, + 243, 249, - 252, - 181, - 229, - 232, 0, 0, 0, @@ -6930,38 +6494,38 @@ 0, 0, 0, - 251, - 213, - 102, - 25, - 149, - 159, - 37, + 174, + 227, + 90, + 63, + 120, + 139, + 75, + 210, + 232, + 201, + 40, + 254, + 61, + 139, + 164, + 135, + 89, + 80, + 67, + 197, + 79, + 23, + 193, + 220, 192, - 210, - 95, - 204, - 21, - 18, - 42, - 226, - 5, - 226, - 152, - 81, - 144, - 191, - 110, - 76, - 51, - 233, - 213, - 87, - 45, - 246, - 101, - 58, - 130, + 27, + 225, + 247, + 132, + 19, + 170, + 106, 0, 0, 0, @@ -6970,38 +6534,38 @@ 0, 0, 0, - 50, - 72, + 190, + 230, 42, + 119, + 58, + 2, + 173, 34, - 159, - 131, - 186, - 206, - 45, - 164, - 201, - 11, - 77, 217, - 156, - 138, - 115, - 6, - 58, - 106, - 141, - 220, - 91, - 214, - 204, - 153, - 222, - 216, - 112, - 100, - 145, - 42, + 86, + 85, + 137, + 246, + 242, + 195, + 68, + 48, + 143, + 109, + 111, + 8, + 78, + 37, + 57, + 245, + 27, + 4, + 104, + 94, + 76, + 99, + 213, 96, 173, 222, @@ -7100,120 +6664,120 @@ 88, 242, 32, - 97, - 138, - 198, - 62, - 136, - 198, + 30, + 37, + 183, + 240, 103, - 175, - 249, - 91, - 77, - 120, - 56, - 146, - 191, - 105, - 25, - 87, - 27, - 118, - 59, - 62, - 33, - 84, - 159, - 132, - 242, - 67, - 253, - 50, - 9, - 132, - 32, - 211, - 127, - 23, - 124, - 68, - 158, - 122, - 141, - 69, - 188, - 41, - 144, - 117, - 211, - 169, - 65, + 163, + 179, + 125, + 63, + 45, + 181, + 93, + 28, + 89, + 229, + 5, + 106, + 163, + 206, + 78, + 29, + 199, + 170, + 104, + 45, + 224, 239, - 69, 38, - 170, - 84, - 174, - 198, - 7, - 179, + 161, + 81, + 144, + 126, + 32, + 126, + 135, + 13, + 21, 110, - 215, 182, - 252, - 113, - 72, - 226, - 48, - 133, - 8, - 105, - 153, - 110, - 47, - 196, - 176, - 44, - 252, + 43, + 100, + 73, + 50, + 39, + 165, + 30, + 73, + 87, + 94, + 30, 140, - 171, - 99, - 25, - 5, - 109, - 170, - 61, - 34, + 210, + 23, + 43, + 12, 234, - 19, + 159, + 61, + 202, + 207, + 104, + 212, + 250, + 231, + 63, + 48, + 130, + 188, + 193, + 4, + 218, + 97, + 149, + 191, + 5, 78, - 134, - 220, - 12, + 7, + 112, + 33, + 68, + 224, + 59, + 39, + 98, + 169, + 118, + 239, + 107, + 148, + 29, + 214, 12, - 146, - 181, - 134, - 46, - 50, - 246, - 204, - 83, - 195, - 216, + 75, + 189, + 224, + 32, + 251, + 184, + 107, + 66, + 33, + 222, + 190, + 35, + 51, + 112, + 199, 58, - 47, - 246, - 133, - 52, - 153, - 89, - 95, - 128, - 57, - 13, - 156, + 214, + 198, + 43, + 186, + 235, + 19, 11, 118, 97, @@ -7249,11 +6813,11 @@ 99, 112, 47, + 51, 54, + 55, + 48, 53, - 52, - 53, - 54, 47, 104, 116, @@ -7279,11 +6843,11 @@ 100, 112, 47, + 51, + 57, + 50, 54, - 53, - 52, - 53, - 56, + 57, 24, 47, 105, @@ -7304,11 +6868,11 @@ 100, 112, 47, - 54, - 53, 52, - 54, 52, + 50, + 53, + 55, 0, 0, 0, @@ -7316,38 +6880,38 @@ 0, 0, 0, - 121, - 245, - 173, - 214, - 62, - 45, - 78, - 231, - 42, - 141, - 80, - 70, - 101, - 210, - 114, - 51, - 185, + 209, + 106, + 60, + 28, + 216, + 87, + 117, + 44, + 84, + 47, + 230, + 60, 135, - 223, - 13, - 169, - 239, - 245, - 68, - 254, + 6, + 51, + 174, + 41, + 241, + 66, + 2, + 40, + 192, + 103, + 218, + 11, 122, - 133, - 237, - 80, - 108, - 161, - 30, + 250, + 66, + 79, + 142, + 211, + 4, 0, 0, 0, @@ -7364,38 +6928,38 @@ 0, 0, 0, - 164, - 51, - 96, - 252, - 84, - 166, - 231, - 126, - 125, + 155, 69, - 141, - 222, - 212, - 230, - 206, - 158, - 145, - 216, - 89, - 46, - 224, - 195, 37, - 168, - 53, - 214, - 209, - 133, - 68, - 191, - 142, - 226, + 119, + 94, + 101, + 203, + 127, + 114, + 40, + 83, + 87, + 40, + 234, + 215, + 188, + 58, + 35, + 220, + 69, + 167, + 187, + 76, + 163, + 122, + 10, + 181, + 147, + 70, + 189, + 87, + 154, 232, 3, 0, @@ -7404,38 +6968,38 @@ 0, 0, 0, - 242, - 245, - 215, - 89, - 82, - 128, + 66, + 108, + 22, + 0, + 65, + 68, + 62, + 159, + 93, + 172, + 188, + 21, 97, - 158, - 1, - 156, - 124, - 176, - 4, - 137, - 192, - 182, - 113, - 144, - 74, - 11, - 72, - 130, - 17, - 145, - 107, - 150, - 212, - 219, - 236, + 116, + 162, + 25, + 223, + 118, + 233, + 195, + 163, + 193, + 85, 228, - 205, - 29, + 59, + 227, + 48, + 169, + 105, + 90, + 104, + 169, 1, 0, 0, @@ -7470,38 +7034,38 @@ 92, 5, 0, - 60, - 50, - 180, - 43, - 227, + 131, + 146, + 236, + 235, + 139, + 199, 162, - 219, - 29, - 125, - 221, - 81, - 200, - 83, - 117, - 18, - 127, - 246, - 174, - 251, - 39, - 104, - 52, - 25, - 62, - 70, - 158, - 1, - 226, - 93, + 80, + 212, 72, - 245, - 85, + 140, + 232, + 253, + 186, + 243, + 101, + 19, + 51, + 239, + 24, + 229, + 115, + 43, + 86, + 65, + 99, + 55, + 131, + 159, + 173, + 93, + 133, 4, 0, 0, @@ -7534,38 +7098,38 @@ 0, 0, 0, - 81, - 125, - 125, - 70, - 103, + 78, + 224, + 13, + 230, 63, - 184, - 12, - 3, - 228, - 100, - 158, - 86, - 236, - 215, - 25, - 233, - 65, - 9, - 225, - 127, - 207, - 98, - 242, - 200, - 41, - 56, - 223, + 173, + 19, + 87, 20, - 82, - 36, - 144, + 241, + 227, + 85, + 250, + 133, + 57, + 177, + 238, + 152, + 194, + 210, + 123, + 166, + 245, + 195, + 78, + 24, + 150, + 68, + 210, + 194, + 135, + 90, 0, 0, 0, @@ -7606,38 +7170,38 @@ 0, 0, 0, - 49, - 246, - 218, - 38, - 205, - 194, - 217, - 99, + 131, + 5, + 19, + 173, + 71, + 85, + 34, + 154, + 188, 178, - 200, - 79, - 165, - 209, - 164, - 114, - 99, - 171, - 118, - 230, - 130, - 90, - 255, - 202, - 41, - 223, - 145, - 76, - 62, - 88, - 164, - 241, - 120, + 2, + 156, + 113, + 213, + 174, + 54, + 18, + 43, + 140, + 17, + 237, + 175, + 95, + 125, + 104, + 199, + 61, + 170, + 9, + 101, + 233, + 169, 0, 0, 0, @@ -7646,38 +7210,38 @@ 0, 0, 0, - 69, - 228, - 93, - 189, - 144, - 86, - 66, - 204, - 44, - 169, - 195, - 207, - 209, - 160, - 161, - 249, - 81, + 41, + 25, + 184, + 94, + 221, 119, - 88, - 229, - 217, + 112, + 23, + 228, + 11, + 224, + 58, + 214, + 58, + 182, + 206, + 226, + 10, + 120, 141, - 235, - 103, - 96, - 64, - 196, - 147, - 64, - 200, + 110, 178, - 103, + 1, + 149, + 89, + 165, + 88, + 173, + 161, + 154, + 231, + 27, 96, 179, 253, @@ -7771,125 +7335,125 @@ 23, 114, 52, - 126, + 126, + 242, + 116, + 244, + 32, + 201, + 240, + 172, + 219, + 174, + 239, + 53, + 226, + 13, + 220, + 210, + 185, + 203, + 133, + 146, + 206, + 6, + 139, + 173, + 40, + 92, + 214, + 151, + 52, + 6, + 137, + 118, + 144, 242, - 116, - 244, - 32, - 44, - 195, - 142, - 100, - 204, - 221, - 210, - 56, - 220, - 159, - 252, - 43, + 19, 109, - 45, - 129, - 212, - 168, - 89, + 86, + 32, + 81, + 29, + 75, 191, - 44, - 18, - 142, - 55, + 136, + 151, + 177, 166, - 147, - 169, - 39, - 81, - 113, - 109, - 74, - 111, - 32, - 67, - 83, - 247, - 195, - 31, + 53, + 182, + 127, 24, - 188, - 165, - 86, - 175, - 68, - 17, + 25, + 179, + 223, 34, - 236, - 33, - 55, - 120, - 104, - 114, - 61, - 167, - 69, - 129, - 149, - 36, - 40, - 216, - 145, - 186, - 240, - 203, - 190, + 251, + 7, + 173, + 106, + 47, + 67, + 193, + 58, + 192, + 103, + 173, + 85, + 118, + 125, + 57, + 17, 48, - 181, - 111, - 79, - 167, - 197, - 9, - 154, - 150, - 224, - 28, - 60, - 46, - 8, - 148, - 63, - 84, - 203, 153, - 87, - 15, - 26, - 86, - 208, - 145, - 204, - 145, - 25, - 124, - 35, - 62, - 14, - 136, - 91, + 255, + 85, + 74, + 254, + 22, + 45, + 78, + 194, + 45, + 69, + 22, + 157, + 104, + 32, + 132, + 29, + 176, 231, - 161, - 80, - 201, - 205, - 64, - 58, - 13, - 96, - 245, + 38, 185, - 36, - 46, - 134, + 55, + 215, + 253, + 84, + 132, + 62, + 124, + 59, + 5, + 26, + 27, + 11, + 119, + 18, + 94, 189, + 55, + 92, + 233, + 0, + 84, + 93, + 186, + 196, + 29, + 103, + 167, 11, 118, 97, @@ -7925,11 +7489,11 @@ 99, 112, 47, - 54, - 53, 52, - 54, - 54, + 52, + 53, + 49, + 55, 47, 104, 116, @@ -7955,11 +7519,11 @@ 100, 112, 47, - 54, - 53, + 51, 52, - 54, - 56, + 48, + 51, + 55, 24, 47, 105, @@ -7980,11 +7544,11 @@ 100, 112, 47, - 54, - 53, 52, + 53, + 56, + 53, 55, - 52, 0, 0, 0, @@ -7992,38 +7556,38 @@ 0, 0, 0, - 209, - 199, - 154, - 78, + 66, + 169, 21, - 110, - 135, - 195, - 67, - 136, - 35, - 94, - 39, - 97, - 239, - 158, - 2, - 153, - 53, - 161, - 61, - 9, - 6, - 74, - 159, + 132, + 190, + 62, + 174, + 59, + 27, + 25, + 169, + 27, + 16, + 219, + 37, + 141, + 250, + 49, + 205, + 67, 148, - 70, - 72, - 180, - 122, - 44, - 178, + 42, + 101, + 170, + 175, + 157, + 115, + 136, + 211, + 126, + 55, + 241, 0, 0, 0, @@ -8040,38 +7604,38 @@ 0, 0, 0, - 38, - 175, - 8, - 245, - 39, - 20, - 18, - 239, - 5, + 230, 160, - 19, - 43, - 237, - 138, - 215, - 107, + 169, + 226, + 177, + 83, + 119, + 70, + 254, 149, + 70, + 131, + 56, + 219, + 173, + 172, + 209, + 121, + 245, + 182, + 94, 49, - 242, - 105, - 61, + 48, + 13, + 108, 6, - 20, - 174, - 86, + 173, + 172, 220, - 229, - 145, - 50, - 170, - 76, - 138, + 23, + 236, + 48, 232, 3, 0, @@ -8080,38 +7644,38 @@ 0, 0, 0, - 26, - 73, - 49, - 169, - 67, - 19, - 121, - 35, - 127, - 251, - 115, - 102, - 203, - 11, - 73, - 57, - 227, - 115, - 5, - 39, - 92, - 71, - 87, - 245, - 250, + 82, + 40, + 18, + 20, + 33, + 187, + 48, + 175, 108, - 229, - 163, - 116, - 21, - 52, - 122, + 237, + 18, + 12, + 140, + 4, + 173, + 180, + 59, + 61, + 219, + 227, + 74, + 70, + 145, + 19, + 139, + 4, + 25, + 29, + 158, + 51, + 100, + 176, 1, 0, 0, @@ -8146,38 +7710,38 @@ 92, 5, 0, - 19, + 25, + 183, + 119, + 249, + 82, + 230, + 13, + 30, + 146, + 105, + 243, + 12, + 39, 28, - 67, - 124, - 172, - 129, - 201, - 135, - 94, - 72, - 64, - 197, - 38, - 95, - 35, - 44, - 43, - 75, + 86, + 183, + 118, + 56, 225, - 178, - 139, - 236, - 218, - 45, - 144, - 227, - 8, - 251, - 114, - 45, - 40, - 137, + 30, + 145, + 95, + 58, + 36, + 124, + 20, + 31, + 17, + 234, + 189, + 17, + 217, 4, 0, 0, @@ -8210,38 +7774,38 @@ 0, 0, 0, - 225, - 151, - 122, - 183, - 140, - 80, - 88, - 134, + 44, + 118, + 58, + 249, + 246, + 128, + 40, + 44, + 113, + 168, 103, - 4, - 35, - 29, - 155, - 30, - 74, - 213, - 228, - 35, - 178, - 125, - 105, - 167, - 234, - 254, - 209, + 159, + 201, + 41, + 71, + 22, + 179, + 109, + 66, + 96, + 65, + 41, + 238, 95, - 150, - 138, - 239, - 111, - 38, - 232, + 63, + 159, + 128, + 82, + 6, + 19, + 230, + 36, 0, 0, 0, @@ -8282,39 +7846,38 @@ 0, 0, 0, - 119, - 115, - 238, - 13, - 243, - 22, - 28, - 78, - 108, - 60, - 101, - 25, - 123, - 138, - 116, - 103, - 87, - 57, - 235, - 83, - 123, - 185, - 5, - 43, - 108, - 250, - 199, + 227, + 214, + 106, + 80, + 49, + 236, + 230, + 181, 194, + 71, + 204, + 47, + 195, + 108, + 37, 8, - 58, - 14, - 13, - 0, + 136, + 161, + 95, + 189, + 20, + 240, + 60, + 188, + 53, + 215, + 47, + 169, + 187, + 142, + 12, + 183, 0, 0, 0, @@ -8322,38 +7885,39 @@ 0, 0, 0, - 255, - 42, - 54, - 155, - 16, - 100, - 224, - 39, - 217, - 65, - 114, 0, - 139, - 225, - 83, - 252, - 84, - 75, - 243, - 235, - 17, - 199, - 41, - 252, - 146, - 124, - 26, + 51, + 175, + 121, + 165, + 254, + 196, 180, - 181, - 181, - 29, + 235, + 206, + 116, 244, + 241, + 228, + 36, + 190, + 59, + 96, + 143, + 116, + 246, + 216, + 37, + 10, + 154, + 151, + 190, + 78, + 196, + 88, + 135, + 200, + 232, 0, 0, 0, @@ -8363,38 +7927,38 @@ 0, 0, 0, + 120, + 9, + 122, + 172, 245, - 64, - 131, - 228, - 230, - 202, - 193, + 199, + 26, + 84, 136, - 58, - 201, - 134, - 167, - 174, - 61, - 63, - 171, - 27, - 171, - 150, - 193, - 39, - 53, - 93, - 49, - 184, - 198, - 180, 117, - 20, - 160, + 70, + 158, + 255, + 24, + 211, + 244, + 197, + 162, + 129, + 243, + 195, + 40, + 145, + 83, + 186, + 142, + 252, 225, - 139, + 90, + 228, + 10, + 22, 4, 0, 0, @@ -8403,78 +7967,78 @@ 0, 0, 0, - 100, - 96, - 140, - 115, - 178, - 133, - 212, - 21, - 85, - 180, - 158, - 44, - 146, - 235, - 132, - 110, - 13, - 239, - 115, - 223, + 52, + 218, + 54, + 70, + 39, + 183, + 172, + 251, + 39, 110, - 114, - 226, 165, - 144, - 102, - 85, - 239, - 12, - 249, - 109, - 45, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 171, - 39, - 109, - 25, - 86, - 101, - 155, - 65, - 21, - 200, - 37, - 226, - 115, - 169, - 182, - 74, - 60, - 111, - 254, - 140, - 247, - 230, - 222, - 63, - 45, - 45, - 35, + 191, + 110, + 18, + 214, + 133, + 142, + 58, + 2, + 129, + 211, + 233, + 105, + 29, + 227, 196, - 16, - 111, + 74, + 133, + 165, + 252, + 30, + 31, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 30, + 14, + 118, + 33, + 118, + 50, + 37, + 105, + 218, 145, - 85, + 149, + 140, + 58, + 51, + 117, + 227, + 59, + 70, + 65, + 100, + 117, + 18, + 195, + 168, + 46, + 87, + 3, + 3, + 152, + 147, + 232, + 163, 0, 0, 0, @@ -8484,38 +8048,38 @@ 0, 0, 0, - 254, - 222, - 88, - 194, - 222, - 164, - 236, - 45, - 117, 125, - 80, - 122, - 1, - 119, - 21, - 186, - 58, - 42, - 210, - 122, + 137, + 139, + 51, + 202, + 91, + 166, + 12, + 15, 75, - 254, - 158, - 92, - 161, - 201, - 100, - 39, - 218, - 24, - 41, - 151, + 138, + 98, + 249, + 0, + 8, + 119, + 3, + 153, + 33, + 231, + 43, + 31, + 82, + 19, + 144, + 211, + 94, + 36, + 188, + 80, + 170, + 27, 0, 0, 0, @@ -8596,38 +8160,39 @@ 0, 0, 0, - 166, - 4, - 47, - 112, - 189, - 16, - 209, - 252, - 102, - 57, - 148, - 80, - 98, + 79, + 17, 167, - 43, - 219, - 234, - 27, - 136, - 160, - 254, - 187, - 150, - 197, - 7, - 70, - 7, - 202, - 220, - 47, - 159, - 89, + 207, + 224, + 118, + 62, + 44, + 178, + 174, + 165, + 143, + 18, + 121, + 59, + 240, + 243, + 203, + 209, + 186, + 63, + 64, + 104, + 6, + 206, + 83, + 237, + 242, + 44, + 248, + 198, + 158, + 0, 0, 0, 0, @@ -8678,46 +8243,46 @@ 0, 0, 0, - 31, - 84, - 8, - 216, - 146, + 89, + 169, + 214, + 12, + 147, 1, 0, 0, - 36, - 82, - 30, - 65, - 183, - 192, - 23, - 72, - 123, - 231, - 100, - 128, - 86, - 159, - 136, - 163, + 106, + 236, + 253, + 115, + 168, + 184, + 12, + 164, + 172, + 208, + 106, + 220, + 69, 24, - 82, - 67, - 139, - 141, - 248, - 200, - 171, - 163, - 5, - 98, - 244, - 137, - 223, - 150, - 206, + 89, + 198, + 2, + 213, + 236, + 72, + 90, + 211, + 34, + 72, + 153, + 83, + 221, + 101, + 158, + 252, + 168, + 143, 0, 0, 0, @@ -8732,80 +8297,79 @@ "owner": { "ObjectOwner": "0x0000000000000000000000000000000000000000000000000000000000000005" }, - "previous_transaction": "Hero19xTN5BAmbkRVMG5HDAhrcp3ZiGiZwV2AFQSY1zX", + "previous_transaction": "51gCftcvBJ8LQkfDpxBFommeJ8vy8YC9CDt6yssrKnZo", "storage_rebate": 0 }, { "data": { "Move": { "type_": "StakedIota", - "has_public_transfer": true, "version": 4, "contents": [ - 56, - 61, + 40, + 94, 101, - 148, - 21, - 91, - 115, - 203, - 158, - 93, - 24, - 231, - 181, - 105, - 100, - 246, - 5, - 7, - 78, - 124, - 37, - 179, - 239, 215, - 29, - 98, - 124, - 106, - 193, - 33, - 12, - 126, - 242, - 245, + 236, + 253, + 145, + 44, + 224, 215, - 89, - 82, - 128, - 97, + 205, + 174, + 164, + 9, 158, - 1, - 156, - 124, - 176, + 65, + 79, + 111, + 235, + 199, + 216, + 39, + 127, + 53, + 28, + 50, + 217, + 30, + 226, + 27, + 252, + 133, + 82, + 40, + 18, + 20, + 33, + 187, + 48, + 175, + 108, + 237, + 18, + 12, + 140, 4, - 137, - 192, - 182, - 113, - 144, + 173, + 180, + 59, + 61, + 219, + 227, 74, - 11, - 72, - 130, - 17, + 70, 145, - 107, - 150, - 212, - 219, - 236, - 228, - 205, + 19, + 139, + 4, + 25, 29, + 158, + 51, + 100, + 176, 3, 0, 0, @@ -8826,82 +8390,66 @@ } }, "owner": { - "AddressOwner": "0x32482a229f83bace2da4c90b4dd99c8a73063a6a8ddc5bd6cc99ded87064912a" + "AddressOwner": "0x2919b85edd777017e40be03ad63ab6cee20a788d6eb2019559a558ada19ae71b" }, - "previous_transaction": "Hero19xTN5BAmbkRVMG5HDAhrcp3ZiGiZwV2AFQSY1zX", + "previous_transaction": "51gCftcvBJ8LQkfDpxBFommeJ8vy8YC9CDt6yssrKnZo", "storage_rebate": 0 }, { "data": { "Move": { - "type_": "StakedIota", - "has_public_transfer": true, + "type_": { + "Other": { + "address": "0000000000000000000000000000000000000000000000000000000000000002", + "module": "dynamic_field", + "name": "Field", + "type_args": [ + "u64", + { + "struct": { + "address": "0000000000000000000000000000000000000000000000000000000000000003", + "module": "staking_pool", + "name": "PoolTokenExchangeRate", + "type_args": [] + } + } + ] + } + }, "version": 4, "contents": [ - 90, - 100, - 208, - 18, - 28, - 120, - 180, - 188, - 57, - 60, - 159, - 0, - 112, - 126, - 223, - 252, + 52, + 52, + 9, + 137, + 39, + 161, 180, - 151, - 35, - 213, - 79, - 32, + 125, + 192, + 219, 147, - 164, - 5, - 82, - 137, - 255, - 49, - 128, - 148, - 86, + 114, + 75, 15, - 179, - 7, - 220, - 99, - 116, - 11, - 43, - 34, - 99, - 124, - 173, - 183, - 91, - 122, - 153, - 83, - 227, - 216, - 174, - 143, - 123, - 179, - 93, - 16, - 223, - 139, - 50, + 186, + 238, + 29, + 212, + 15, + 205, + 70, + 128, + 27, 20, - 184, - 146, - 41, + 182, + 174, + 75, + 233, + 55, + 247, + 42, + 155, 3, 0, 0, @@ -8911,93 +8459,100 @@ 0, 0, 0, - 14, - 208, - 231, - 124, - 3, + 244, + 17, + 203, + 109, + 95, + 7, 0, + 73, + 5, + 86, + 4, + 171, + 92, + 5, 0 ] } }, "owner": { - "AddressOwner": "0x3bfb34ad6f452c61add36979ce9308a507f4ca7749817ba5a19a57d4ff2cd53f" + "ObjectOwner": "0x19b777f952e60d1e9269f30c271c56b77638e11e915f3a247c141f11eabd11d9" }, - "previous_transaction": "Hero19xTN5BAmbkRVMG5HDAhrcp3ZiGiZwV2AFQSY1zX", + "previous_transaction": "51gCftcvBJ8LQkfDpxBFommeJ8vy8YC9CDt6yssrKnZo", "storage_rebate": 0 }, { "data": { "Move": { "type_": "StakedIota", - "has_public_transfer": true, "version": 4, "contents": [ - 98, + 125, + 234, + 114, + 59, + 13, + 17, + 99, 204, - 132, - 145, - 152, - 245, + 114, 112, - 243, - 165, - 199, + 197, + 56, + 45, + 187, + 167, + 1, + 134, + 24, + 22, + 36, + 76, + 56, + 205, + 28, + 140, + 44, 60, + 91, + 109, + 222, 35, - 11, + 181, + 66, + 108, + 22, + 0, + 65, + 68, 62, - 133, - 58, - 167, - 91, - 135, + 159, 93, - 24, - 234, - 31, - 96, - 129, - 195, - 145, - 73, - 156, - 185, - 215, - 241, - 209, - 123, - 224, - 206, - 121, - 241, - 77, - 244, - 72, - 86, - 107, - 103, - 131, - 192, - 239, - 101, - 12, - 50, + 172, + 188, + 21, + 97, + 116, + 162, + 25, + 223, 118, - 14, - 142, - 183, - 157, - 157, - 157, - 178, - 187, - 220, - 115, - 108, - 181, - 43, + 233, + 195, + 163, + 193, + 85, + 228, + 59, + 227, + 48, + 169, + 105, + 90, + 104, + 169, 3, 0, 0, @@ -9018,82 +8573,81 @@ } }, "owner": { - "AddressOwner": "0x2db19ce7b296633e49f48e863c2b08d5ea0a885273bfa574e2db0a85ece225e5" + "AddressOwner": "0xbee62a773a02ad22d9565589f6f2c344308f6d6f084e2539f51b04685e4c63d5" }, - "previous_transaction": "Hero19xTN5BAmbkRVMG5HDAhrcp3ZiGiZwV2AFQSY1zX", + "previous_transaction": "51gCftcvBJ8LQkfDpxBFommeJ8vy8YC9CDt6yssrKnZo", "storage_rebate": 0 }, { "data": { "Move": { "type_": "StakedIota", - "has_public_transfer": true, "version": 4, "contents": [ - 121, - 83, - 82, - 84, - 120, - 68, - 114, - 182, - 71, - 214, - 223, - 4, - 166, + 130, + 26, + 129, + 153, 44, - 117, - 192, - 102, - 13, - 181, - 213, - 105, - 206, - 70, - 80, - 198, - 168, - 116, - 132, - 49, - 136, - 255, + 37, + 203, + 250, + 224, + 166, + 210, + 147, + 32, + 67, + 159, + 65, + 252, + 54, + 74, + 148, 244, + 106, + 180, + 176, + 53, + 233, + 33, + 43, + 188, + 106, + 253, + 52, + 207, + 45, + 23, + 237, + 112, + 22, + 155, + 235, + 198, + 250, + 75, 26, - 73, - 49, - 169, + 133, + 192, + 213, + 197, + 147, + 157, 67, - 19, - 121, - 35, - 127, - 251, - 115, - 102, - 203, - 11, - 73, - 57, - 227, - 115, - 5, - 39, - 92, - 71, + 6, + 247, + 136, + 54, + 200, + 184, + 231, + 36, + 53, + 236, + 43, + 58, 87, - 245, - 250, - 108, - 229, - 163, - 116, - 21, - 52, - 122, 3, 0, 0, @@ -9114,9 +8668,9 @@ } }, "owner": { - "AddressOwner": "0x45e45dbd905642cc2ca9c3cfd1a0a1f9517758e5d98deb676040c49340c8b267" + "AddressOwner": "0xc0afe4713f5f894ab2d5696899cec27c8dd3ebcb8dd06811193f1cdd2f7458e3" }, - "previous_transaction": "Hero19xTN5BAmbkRVMG5HDAhrcp3ZiGiZwV2AFQSY1zX", + "previous_transaction": "51gCftcvBJ8LQkfDpxBFommeJ8vy8YC9CDt6yssrKnZo", "storage_rebate": 0 }, { @@ -9140,41 +8694,40 @@ ] } }, - "has_public_transfer": false, "version": 4, "contents": [ - 179, - 195, - 155, + 145, + 228, + 103, + 123, + 159, + 11, + 229, + 3, + 170, + 100, + 60, + 221, 33, - 232, - 210, - 193, - 236, - 91, - 211, - 188, - 101, - 227, - 202, 213, - 191, - 4, - 41, - 130, - 210, - 193, - 151, - 15, - 17, - 117, - 241, - 183, - 145, - 35, - 70, - 117, - 116, + 68, + 122, + 56, + 158, + 249, + 21, + 212, + 215, + 147, + 202, + 74, + 106, + 219, + 253, + 218, + 229, + 88, + 172, 3, 0, 0, @@ -9203,67 +8756,81 @@ } }, "owner": { - "ObjectOwner": "0x791f65cc868cc6ef0bc0ff4028939f10b96270274481cdebf421d647bef00b6e" + "ObjectOwner": "0xdf3e1b495d7540f4d64bbc79acf8e256e2b9a52b53cc9d0e74295ddf153fcd08" }, - "previous_transaction": "Hero19xTN5BAmbkRVMG5HDAhrcp3ZiGiZwV2AFQSY1zX", + "previous_transaction": "51gCftcvBJ8LQkfDpxBFommeJ8vy8YC9CDt6yssrKnZo", "storage_rebate": 0 }, { "data": { "Move": { - "type_": { - "Other": { - "address": "0000000000000000000000000000000000000000000000000000000000000002", - "module": "dynamic_field", - "name": "Field", - "type_args": [ - "u64", - { - "struct": { - "address": "0000000000000000000000000000000000000000000000000000000000000003", - "module": "staking_pool", - "name": "PoolTokenExchangeRate", - "type_args": [] - } - } - ] - } - }, - "has_public_transfer": false, + "type_": "StakedIota", "version": 4, "contents": [ - 199, - 240, - 82, - 50, - 126, + 151, + 47, + 173, + 112, + 237, + 59, + 36, + 170, + 34, + 186, + 204, 74, - 108, - 246, + 138, + 83, + 122, + 154, + 36, + 237, + 167, 28, - 190, - 97, - 254, - 106, - 196, - 109, + 210, 244, - 62, - 204, - 53, - 160, - 213, - 235, - 82, - 129, - 224, + 69, + 172, + 205, + 86, + 23, + 198, + 252, + 68, + 189, + 250, + 205, + 23, + 237, + 101, + 196, + 223, + 165, + 144, + 73, + 40, + 152, + 156, + 38, + 172, + 6, + 187, + 80, + 131, + 252, + 156, + 198, + 105, + 210, + 20, + 227, + 192, + 121, + 85, 126, - 118, - 63, + 84, 209, - 104, - 68, - 185, + 174, 3, 0, 0, @@ -9273,28 +8840,20 @@ 0, 0, 0, - 244, - 17, - 203, - 109, - 95, - 7, + 14, + 208, + 231, + 124, + 3, 0, - 73, - 5, - 86, - 4, - 171, - 92, - 5, 0 ] } }, "owner": { - "ObjectOwner": "0x3c32b42be3a2db1d7ddd51c85375127ff6aefb276834193e469e01e25d48f555" + "AddressOwner": "0x43e8b5e5be1ac68e8ca24f3fa4e9a850fa2ef000f7fcc805243dde365ee94408" }, - "previous_transaction": "Hero19xTN5BAmbkRVMG5HDAhrcp3ZiGiZwV2AFQSY1zX", + "previous_transaction": "51gCftcvBJ8LQkfDpxBFommeJ8vy8YC9CDt6yssrKnZo", "storage_rebate": 0 }, { @@ -9318,41 +8877,40 @@ ] } }, - "has_public_transfer": false, "version": 4, "contents": [ - 217, - 115, - 222, - 147, - 153, - 42, - 213, - 107, - 24, - 170, - 106, - 193, - 229, - 216, - 79, - 136, - 189, - 90, - 137, - 69, - 186, + 178, + 123, + 237, + 121, + 111, + 205, + 179, + 180, + 84, + 167, + 179, + 26, + 70, + 157, + 123, + 155, 116, - 1, - 184, - 234, + 214, + 17, + 222, + 224, + 57, 190, - 27, - 177, - 70, + 75, 173, - 57, - 124, + 72, + 185, + 171, + 12, + 161, + 215, + 197, 3, 0, 0, @@ -9381,9 +8939,9 @@ } }, "owner": { - "ObjectOwner": "0x131c437cac81c9875e4840c5265f232c2b4be1b28becda2d90e308fb722d2889" + "ObjectOwner": "0x8c95d95a13b79ed01819067ed1093f99db1cf958a83c445013c7b3592bdbcb98" }, - "previous_transaction": "Hero19xTN5BAmbkRVMG5HDAhrcp3ZiGiZwV2AFQSY1zX", + "previous_transaction": "51gCftcvBJ8LQkfDpxBFommeJ8vy8YC9CDt6yssrKnZo", "storage_rebate": 0 }, { @@ -9407,41 +8965,40 @@ ] } }, - "has_public_transfer": false, "version": 4, "contents": [ - 241, - 212, - 167, - 102, - 135, - 239, - 183, - 202, - 201, - 147, - 114, - 49, - 139, - 150, - 50, - 225, - 15, - 227, - 142, - 174, - 131, - 229, - 114, - 152, - 10, - 69, - 115, - 47, - 48, - 231, + 208, + 206, + 34, + 165, + 8, + 86, 163, - 170, + 53, + 188, + 106, + 245, + 136, + 179, + 31, + 68, + 68, + 81, + 81, + 70, + 118, + 28, + 2, + 26, + 25, + 145, + 200, + 46, + 118, + 76, + 62, + 18, + 165, 3, 0, 0, @@ -9470,9 +9027,9 @@ } }, "owner": { - "ObjectOwner": "0x6450460d7e7be475407908e48144f095500bc73cf7254f91c182a45570d0cac6" + "ObjectOwner": "0x8392eceb8bc7a250d4488ce8fdbaf3651333ef18e5732b56416337839fad5d85" }, - "previous_transaction": "Hero19xTN5BAmbkRVMG5HDAhrcp3ZiGiZwV2AFQSY1zX", + "previous_transaction": "51gCftcvBJ8LQkfDpxBFommeJ8vy8YC9CDt6yssrKnZo", "storage_rebate": 0 } ] diff --git a/crates/iota-light-client/example_config/801.chk b/crates/iota-light-client/example_config/801.chk deleted file mode 100644 index d23a3fcbea8..00000000000 Binary files a/crates/iota-light-client/example_config/801.chk and /dev/null differ diff --git a/crates/iota-light-client/example_config/checkpoints.yaml b/crates/iota-light-client/example_config/checkpoints.yaml index 5f8a341f905..ec73c130330 100644 --- a/crates/iota-light-client/example_config/checkpoints.yaml +++ b/crates/iota-light-client/example_config/checkpoints.yaml @@ -1,4 +1,4 @@ --- checkpoints: - - 532 - - 801 + - 528 + - 788 diff --git a/crates/iota-light-client/src/bin/generate_chk_snapshots.rs b/crates/iota-light-client/src/bin/generate_chk_snapshots.rs index e67d759f1d9..47747fe8826 100644 --- a/crates/iota-light-client/src/bin/generate_chk_snapshots.rs +++ b/crates/iota-light-client/src/bin/generate_chk_snapshots.rs @@ -4,7 +4,7 @@ use std::fs; use iota_light_client::utils::{ - CheckpointsList, Config, read_checkpoint_list, sync_checkpoint_list_to_latest, + CheckpointsList, Config, read_checkpoint_list_from_config, sync_checkpoint_list_to_latest, }; use iota_rest_api::Client; @@ -19,7 +19,7 @@ pub async fn main() { ) .unwrap(); sync_checkpoint_list_to_latest(&config).await.unwrap(); - let checkpoints_list: CheckpointsList = read_checkpoint_list(&config).unwrap(); + let checkpoints_list: CheckpointsList = read_checkpoint_list_from_config(&config).unwrap(); let client = Client::new(format!("{}/rest", config.full_node_url())); for ckp in checkpoints_list.checkpoints { diff --git a/crates/iota-light-client/src/bin/light_client.rs b/crates/iota-light-client/src/bin/light_client.rs index bbfbfaee721..64f6f97df0b 100644 --- a/crates/iota-light-client/src/bin/light_client.rs +++ b/crates/iota-light-client/src/bin/light_client.rs @@ -129,6 +129,8 @@ mod tests { use iota_types::{ committee::Committee, crypto::AuthorityQuorumSignInfo, + effects::TransactionEvents, + event::Event, message_envelope::Envelope, messages_checkpoint::{CheckpointSummary, FullCheckpointContents}, }; @@ -149,9 +151,13 @@ mod tests { Ok(()) } + // TODO: why is this function here with hardcoded indexes? + // Can't this be done like in "read_test_data"? + // Maybe move "read_test_data" to some other place, so we don't need + // to duplicate the code here. async fn read_data() -> (Committee, CheckpointData) { let mut d = PathBuf::from(env!("CARGO_MANIFEST_DIR")); - d.push("example_config/532.json"); + d.push("example_config/528.json"); let checkpoint: Envelope> = serde_json::from_reader(&fs::File::open(&d).unwrap()) @@ -174,7 +180,7 @@ mod tests { let committee = Committee::new(checkpoint.epoch().checked_add(1).unwrap(), prev_committee); let mut d = PathBuf::from(env!("CARGO_MANIFEST_DIR")); - d.push("example_config/801.chk"); + d.push("example_config/788.chk"); let full_checkpoint = read_full_checkpoint(&d).await.unwrap(); @@ -185,29 +191,23 @@ mod tests { async fn test_checkpoint_all_good() { let (committee, full_checkpoint) = read_data().await; - extract_verified_effects_and_events( - &full_checkpoint, - &committee, - TransactionDigest::from_str("Hero19xTN5BAmbkRVMG5HDAhrcp3ZiGiZwV2AFQSY1zX").unwrap(), - ) - .unwrap(); + let tx_digest_0 = *full_checkpoint.transactions[0].transaction.digest(); + + extract_verified_effects_and_events(&full_checkpoint, &committee, tx_digest_0).unwrap(); } #[tokio::test] async fn test_checkpoint_bad_committee() { let (mut committee, full_checkpoint) = read_data().await; + let tx_digest_0 = *full_checkpoint.transactions[0].transaction.digest(); + // Change committee committee.epoch += 10; assert!( - extract_verified_effects_and_events( - &full_checkpoint, - &committee, - TransactionDigest::from_str("DpSZVwqohRzF7ASz7PMM8xL1ZkMnNvWMLJfjadt9ybE9") - .unwrap(), - ) - .is_err() + extract_verified_effects_and_events(&full_checkpoint, &committee, tx_digest_0,) + .is_err() ); } @@ -219,8 +219,8 @@ mod tests { extract_verified_effects_and_events( &full_checkpoint, &committee, - TransactionDigest::from_str("6ciKBJF3gZ2zNNKLqwRMBL4ftZRGL2kHPgKepWP2thbs") - .unwrap(), + // tx does not exist + TransactionDigest::from_str("11111111111111111111111111111111").unwrap(), ) .is_err() ); @@ -230,18 +230,15 @@ mod tests { async fn test_checkpoint_bad_contents() { let (committee, mut full_checkpoint) = read_data().await; + let tx_digest_0 = *full_checkpoint.transactions[0].transaction.digest(); + // Change contents let random_contents = FullCheckpointContents::random_for_testing(); full_checkpoint.checkpoint_contents = random_contents.checkpoint_contents(); assert!( - extract_verified_effects_and_events( - &full_checkpoint, - &committee, - TransactionDigest::from_str("9AoR24Tcmss7K3DgBZYiUZNxHFuk8kdAbZEMcFe9mcAi") - .unwrap(), - ) - .is_err() + extract_verified_effects_and_events(&full_checkpoint, &committee, tx_digest_0,) + .is_err() ); } @@ -249,27 +246,26 @@ mod tests { async fn test_checkpoint_bad_events() { let (committee, mut full_checkpoint) = read_data().await; - let event = full_checkpoint.transactions[1] - .events - .as_ref() - .unwrap() - .data[0] - .clone(); - - for t in &mut full_checkpoint.transactions { - if let Some(events) = &mut t.events { - events.data.push(event.clone()); - } + // Add a random event to the transaction, so the event digest doesn't match + let tx0 = &mut full_checkpoint.transactions[0]; + let tx_digest_0 = *tx0.transaction.digest(); + + if tx0.events.is_none() { + // if there are no events yet, add them + tx0.events = Some(TransactionEvents { + data: vec![Event::random_for_testing()], + }); + } else { + tx0.events + .as_mut() + .unwrap() + .data + .push(Event::random_for_testing()); } assert!( - extract_verified_effects_and_events( - &full_checkpoint, - &committee, - TransactionDigest::from_str("Hj7mZdET3fKqxbSnbdcVbx9N2pqvHtkoKbPy6MEeFsfB") - .unwrap(), - ) - .is_err() + extract_verified_effects_and_events(&full_checkpoint, &committee, tx_digest_0,) + .is_err() ); } } diff --git a/crates/iota-light-client/src/utils.rs b/crates/iota-light-client/src/utils.rs index 80d1845f959..caeef1a4bce 100644 --- a/crates/iota-light-client/src/utils.rs +++ b/crates/iota-light-client/src/utils.rs @@ -32,7 +32,7 @@ pub async fn check_and_sync_checkpoints(config: &Config) -> anyhow::Result<()> { sync_checkpoint_list_to_latest(config).await?; // Get the local checkpoint list - let checkpoints_list: CheckpointsList = read_checkpoint_list(config)?; + let checkpoints_list: CheckpointsList = read_checkpoint_list_from_config(config)?; // Load the genesis committee let mut genesis_path = config.checkpoint_summary_dir.clone(); @@ -138,7 +138,7 @@ pub async fn download_checkpoint_summary( /// between the latest on the list and the latest checkpoint. pub async fn sync_checkpoint_list_to_latest(config: &Config) -> anyhow::Result<()> { // Get the local checkpoint list - let mut checkpoints_list: CheckpointsList = read_checkpoint_list(config)?; + let mut checkpoints_list: CheckpointsList = read_checkpoint_list_from_config(config)?; let mut last_epoch = 0; let mut last_checkpoint_seq = 0; @@ -270,7 +270,7 @@ pub async fn get_verified_effects_and_events( let full_check_point = get_full_checkpoint(config, seq).await?; // Load the list of stored checkpoints - let checkpoints_list: CheckpointsList = read_checkpoint_list(config)?; + let checkpoints_list: CheckpointsList = read_checkpoint_list_from_config(config)?; // find the stored checkpoint before the seq checkpoint let prev_ckp_id = checkpoints_list @@ -406,14 +406,18 @@ pub struct CheckpointsList { pub checkpoints: Vec, } -pub fn read_checkpoint_list(config: &Config) -> anyhow::Result { - let mut checkpoints_path = config.checkpoint_summary_dir.clone(); - checkpoints_path.push("checkpoints.yaml"); +pub fn read_checkpoint_list(file_path: PathBuf) -> anyhow::Result { // Read the resulting file and parse the yaml checkpoint list - let reader = fs::File::open(&checkpoints_path)?; + let reader = fs::File::open(&file_path)?; Ok(serde_yaml::from_reader(reader)?) } +pub fn read_checkpoint_list_from_config(config: &Config) -> anyhow::Result { + let mut checkpoints_path = config.checkpoint_summary_dir.clone(); + checkpoints_path.push("checkpoints.yaml"); + read_checkpoint_list(checkpoints_path) +} + pub fn read_checkpoint( config: &Config, seq: u64, diff --git a/crates/iota-light-client/tests/check_proof.rs b/crates/iota-light-client/tests/check_proof.rs index 7af7206ad3f..7a5298e1aba 100644 --- a/crates/iota-light-client/tests/check_proof.rs +++ b/crates/iota-light-client/tests/check_proof.rs @@ -2,12 +2,17 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use std::{fs, io::Read, path::PathBuf}; +use std::{ + fs::{self}, + io::Read, + path::PathBuf, +}; use anyhow::anyhow; use iota_light_client::{ construct::construct_proof, proof::{Proof, ProofTarget, verify_proof}, + utils::{CheckpointsList, read_checkpoint_list}, }; use iota_rest_api::CheckpointData; use iota_types::{ @@ -27,6 +32,25 @@ async fn read_full_checkpoint(checkpoint_path: &PathBuf) -> anyhow::Result (Committee, CheckpointData) { + let mut d = PathBuf::from(env!("CARGO_MANIFEST_DIR")); + d.push("example_config/checkpoints.yaml"); + + let checkpoints_list: CheckpointsList = + read_checkpoint_list(d).expect("reading the checkpoints.yaml should not fail"); + + let committee_seq = checkpoints_list + .checkpoints + .first() + .expect("there should be a first checkpoint in the checkpoints.yaml"); + let seq = checkpoints_list + .checkpoints + .get(1) + .expect("there should be a second checkpoint in the checkpoints.yaml"); + + read_data(*committee_seq, *seq).await +} + async fn read_data(committee_seq: u64, seq: u64) -> (Committee, CheckpointData) { let mut d = PathBuf::from(env!("CARGO_MANIFEST_DIR")); d.push(format!("example_config/{}.chk", committee_seq)); @@ -64,7 +88,7 @@ async fn read_data(committee_seq: u64, seq: u64) -> (Committee, CheckpointData) #[tokio::test] async fn check_can_read_test_data() { - let (_committee, full_checkpoint) = read_data(532, 801).await; + let (_committee, full_checkpoint) = read_test_data().await; assert!( full_checkpoint .checkpoint_summary @@ -75,7 +99,7 @@ async fn check_can_read_test_data() { #[tokio::test] async fn test_new_committee() { - let (committee, full_checkpoint) = read_data(532, 801).await; + let (committee, full_checkpoint) = read_test_data().await; let new_committee_data = full_checkpoint .checkpoint_summary @@ -110,7 +134,7 @@ async fn test_new_committee() { // Fail if the new committee does not match the target of the proof #[tokio::test] async fn test_incorrect_new_committee() { - let (committee, full_checkpoint) = read_data(532, 801).await; + let (committee, full_checkpoint) = read_test_data().await; let committee_proof = Proof { checkpoint_summary: full_checkpoint.checkpoint_summary.clone(), @@ -124,7 +148,7 @@ async fn test_incorrect_new_committee() { // Fail if the certificate is incorrect even if no proof targets are given #[tokio::test] async fn test_fail_incorrect_cert() { - let (_committee, full_checkpoint) = read_data(532, 801).await; + let (_committee, full_checkpoint) = read_test_data().await; let new_committee_data = full_checkpoint .checkpoint_summary @@ -164,7 +188,7 @@ async fn test_fail_incorrect_cert() { #[tokio::test] async fn test_object_target_fail_no_data() { - let (committee, full_checkpoint) = read_data(532, 801).await; + let (committee, full_checkpoint) = read_test_data().await; let sample_object: Object = full_checkpoint.transactions[0].output_objects[0].clone(); let sample_ref = sample_object.compute_object_reference(); @@ -180,7 +204,7 @@ async fn test_object_target_fail_no_data() { #[tokio::test] async fn test_object_target_success() { - let (committee, full_checkpoint) = read_data(532, 801).await; + let (committee, full_checkpoint) = read_test_data().await; let sample_object: Object = full_checkpoint.transactions[0].output_objects[0].clone(); let sample_ref = sample_object.compute_object_reference(); @@ -193,7 +217,7 @@ async fn test_object_target_success() { #[tokio::test] async fn test_object_target_fail_wrong_object() { - let (committee, full_checkpoint) = read_data(532, 801).await; + let (committee, full_checkpoint) = read_test_data().await; let sample_object: Object = full_checkpoint.transactions[0].output_objects[0].clone(); let wrong_object: Object = full_checkpoint.transactions[1].output_objects[1].clone(); @@ -214,7 +238,7 @@ async fn test_object_target_fail_wrong_object() { #[tokio::test] async fn test_event_target_fail_no_data() { - let (committee, full_checkpoint) = read_data(532, 801).await; + let (committee, full_checkpoint) = read_test_data().await; let sample_event: Event = full_checkpoint.transactions[1] .events @@ -238,7 +262,7 @@ async fn test_event_target_fail_no_data() { #[tokio::test] async fn test_event_target_success() { - let (committee, full_checkpoint) = read_data(532, 801).await; + let (committee, full_checkpoint) = read_test_data().await; let sample_event: Event = full_checkpoint.transactions[1] .events @@ -259,7 +283,7 @@ async fn test_event_target_success() { #[tokio::test] async fn test_event_target_fail_bad_event() { - let (committee, full_checkpoint) = read_data(532, 801).await; + let (committee, full_checkpoint) = read_test_data().await; let sample_event: Event = full_checkpoint.transactions[1] .events diff --git a/crates/iota-open-rpc/spec/openrpc.json b/crates/iota-open-rpc/spec/openrpc.json index 6676283013b..89343df8e73 100644 --- a/crates/iota-open-rpc/spec/openrpc.json +++ b/crates/iota-open-rpc/spec/openrpc.json @@ -12,7 +12,7 @@ "name": "Apache-2.0", "url": "https://raw.githubusercontent.com/iotaledger/iota/main/LICENSE" }, - "version": "0.6.0-alpha" + "version": "0.7.0-alpha" }, "methods": [ { @@ -104,6 +104,7 @@ "executedEpoch": "0", "gasUsed": { "computationCost": "100", + "computationCostBurned": "100", "storageCost": "100", "storageRebate": "10", "nonRefundableStorageFee": "0" @@ -247,6 +248,7 @@ "executedEpoch": "0", "gasUsed": { "computationCost": "100", + "computationCostBurned": "100", "storageCost": "100", "storageRebate": "10", "nonRefundableStorageFee": "0" @@ -450,6 +452,7 @@ "executedEpoch": "0", "gasUsed": { "computationCost": "100", + "computationCostBurned": "100", "storageCost": "100", "storageRebate": "10", "nonRefundableStorageFee": "0" @@ -578,6 +581,7 @@ "previousDigest": "6tBy8RXZKrdrB4XkMQn7J3MNG4fQCo9XcRduFFvYrL5Z", "epochRollingGasCostSummary": { "computationCost": "0", + "computationCostBurned": "0", "storageCost": "0", "storageRebate": "0", "nonRefundableStorageFee": "0" @@ -663,6 +667,7 @@ "previousDigest": "8BLFxLTjWZ2KqaGc3FjR1o9aL6kbyYrmhuNfJLU1ehYt", "epochRollingGasCostSummary": { "computationCost": "0", + "computationCostBurned": "0", "storageCost": "0", "storageRebate": "0", "nonRefundableStorageFee": "0" @@ -682,6 +687,7 @@ "previousDigest": "6Pn25cieaE62AT6BwCeBoca13AGZuneucaaTGqt3gNCo", "epochRollingGasCostSummary": { "computationCost": "0", + "computationCostBurned": "0", "storageCost": "0", "storageRebate": "0", "nonRefundableStorageFee": "0" @@ -701,6 +707,7 @@ "previousDigest": "CnHTfdUJr1UUqwXkYUhbQjXeM16xR33UR62jE72toCis", "epochRollingGasCostSummary": { "computationCost": "0", + "computationCostBurned": "0", "storageCost": "0", "storageRebate": "0", "nonRefundableStorageFee": "0" @@ -720,6 +727,7 @@ "previousDigest": "38fLUfuigyzLPEDrsmRhcQmhKtbEUohuFBP9NDcWBmFz", "epochRollingGasCostSummary": { "computationCost": "0", + "computationCostBurned": "0", "storageCost": "0", "storageRebate": "0", "nonRefundableStorageFee": "0" @@ -1242,7 +1250,6 @@ "content": { "dataType": "moveObject", "type": "0x2::coin::Coin<0x2::iota::IOTA>", - "hasPublicTransfer": true, "fields": { "balance": "100000000", "id": { @@ -2258,6 +2265,7 @@ "executedEpoch": "0", "gasUsed": { "computationCost": "100", + "computationCostBurned": "100", "storageCost": "100", "storageRebate": "10", "nonRefundableStorageFee": "0" @@ -2397,7 +2405,6 @@ "content": { "dataType": "moveObject", "type": "0x2::coin::Coin<0x2::iota::IOTA>", - "hasPublicTransfer": true, "fields": { "balance": "100000000", "id": { @@ -2421,7 +2428,6 @@ "content": { "dataType": "moveObject", "type": "0x2::coin::Coin<0x2::iota::IOTA>", - "hasPublicTransfer": true, "fields": { "balance": "100000000", "id": { @@ -2445,7 +2451,6 @@ "content": { "dataType": "moveObject", "type": "0x2::coin::Coin<0x2::iota::IOTA>", - "hasPublicTransfer": true, "fields": { "balance": "100000000", "id": { @@ -2469,7 +2474,6 @@ "content": { "dataType": "moveObject", "type": "0x2::coin::Coin<0x2::iota::IOTA>", - "hasPublicTransfer": true, "fields": { "balance": "100000000", "id": { @@ -2493,7 +2497,6 @@ "content": { "dataType": "moveObject", "type": "0x2::coin::Coin<0x2::iota::IOTA>", - "hasPublicTransfer": true, "fields": { "balance": "100000000", "id": { @@ -2637,6 +2640,7 @@ "executedEpoch": "0", "gasUsed": { "computationCost": "100", + "computationCostBurned": "100", "storageCost": "100", "storageRebate": "10", "nonRefundableStorageFee": "0" @@ -2753,6 +2757,7 @@ "executedEpoch": "0", "gasUsed": { "computationCost": "100", + "computationCostBurned": "100", "storageCost": "100", "storageRebate": "10", "nonRefundableStorageFee": "0" @@ -2869,6 +2874,7 @@ "executedEpoch": "0", "gasUsed": { "computationCost": "100", + "computationCostBurned": "100", "storageCost": "100", "storageRebate": "10", "nonRefundableStorageFee": "0" @@ -3009,7 +3015,6 @@ "content": { "dataType": "moveObject", "type": "0x2::coin::Coin<0x2::iota::IOTA>", - "hasPublicTransfer": true, "fields": { "balance": "10000", "id": { @@ -3109,7 +3114,6 @@ "content": { "dataType": "moveObject", "type": "0x2::coin::Coin<0x2::iota::IOTA>", - "hasPublicTransfer": true, "fields": { "balance": "10000", "id": { @@ -3134,7 +3138,6 @@ "content": { "dataType": "moveObject", "type": "0x2::coin::Coin<0x2::iota::IOTA>", - "hasPublicTransfer": true, "fields": { "balance": "20000", "id": { @@ -3695,7 +3698,6 @@ "content": { "dataType": "moveObject", "type": "0x0000000000000000000000000000000000000000000000000000000000000009::test::TestField", - "hasPublicTransfer": true, "fields": {} } } @@ -6134,7 +6136,6 @@ "required": [ "dataType", "fields", - "hasPublicTransfer", "type" ], "properties": { @@ -6147,9 +6148,6 @@ "fields": { "$ref": "#/components/schemas/MoveStruct" }, - "hasPublicTransfer": { - "type": "boolean" - }, "type": { "type": "string" } @@ -7115,6 +7113,7 @@ "type": "object", "required": [ "computationCost", + "computationCostBurned", "nonRefundableStorageFee", "storageCost", "storageRebate" @@ -7128,6 +7127,14 @@ } ] }, + "computationCostBurned": { + "description": "The burned component of the computation/execution costs", + "allOf": [ + { + "$ref": "#/components/schemas/BigInt_for_uint64" + } + ] + }, "nonRefundableStorageFee": { "description": "The fee for the rebate. The portion of the storage rebate kept by the system.", "allOf": [ @@ -10645,7 +10652,6 @@ "required": [ "bcsBytes", "dataType", - "hasPublicTransfer", "type", "version" ], @@ -10659,9 +10665,6 @@ "moveObject" ] }, - "hasPublicTransfer": { - "type": "boolean" - }, "type": { "type": "string" }, diff --git a/crates/iota-open-rpc/src/examples.rs b/crates/iota-open-rpc/src/examples.rs index 82dec134b65..a98c62a0623 100644 --- a/crates/iota-open-rpc/src/examples.rs +++ b/crates/iota-open-rpc/src/examples.rs @@ -668,6 +668,7 @@ impl RpcExampleProvider { modified_at_versions: vec![], gas_used: GasCostSummary { computation_cost: 100, + computation_cost_burned: 100, storage_cost: 100, storage_rebate: 10, non_refundable_storage_fee: 0, @@ -1099,10 +1100,9 @@ impl RpcExampleProvider { let resp = IotaObjectResponse::new_with_data(IotaObjectData { content: Some( IotaParsedData::try_from_object( - unsafe { + { MoveObject::new_from_execution_with_limit( MoveObjectType::from(struct_tag.clone()), - true, SequenceNumber::from_u64(1), Vec::new(), 5, diff --git a/crates/iota-package-management/src/lib.rs b/crates/iota-package-management/src/lib.rs index 1ea32aad450..12de07b4ccf 100644 --- a/crates/iota-package-management/src/lib.rs +++ b/crates/iota-package-management/src/lib.rs @@ -80,7 +80,7 @@ pub async fn update_lock_file( ) }; let install_dir = install_dir.unwrap_or(PathBuf::from(".")); - let env = context.config.get_active_env().context( + let env = context.config().get_active_env().context( "Could not resolve environment from active wallet context. \ Try ensure `iota client active-env` is valid.", )?; @@ -89,7 +89,7 @@ pub async fn update_lock_file( match command { LockCommand::Publish => lock_file::schema::update_managed_address( &mut lock, - &env.alias, + env.alias(), lock_file::schema::ManagedAddressUpdate::Published { chain_id: chain_identifier, original_id: original_id.to_string(), @@ -97,7 +97,7 @@ pub async fn update_lock_file( ), LockCommand::Upgrade => lock_file::schema::update_managed_address( &mut lock, - &env.alias, + env.alias(), lock_file::schema::ManagedAddressUpdate::Upgraded { latest_id: original_id.to_string(), version: version.into(), diff --git a/crates/iota-rest-api/openapi/openapi.json b/crates/iota-rest-api/openapi/openapi.json index 0a59da60bdf..3b39f531479 100644 --- a/crates/iota-rest-api/openapi/openapi.json +++ b/crates/iota-rest-api/openapi/openapi.json @@ -2739,6 +2739,7 @@ "type": "object", "required": [ "computation_cost", + "computation_cost_burned", "non_refundable_storage_fee", "storage_cost", "storage_rebate" @@ -2749,6 +2750,11 @@ "type": "string", "format": "u64" }, + "computation_cost_burned": { + "description": "The burned component of the computation/execution costs", + "type": "string", + "format": "u64" + }, "non_refundable_storage_fee": { "description": "The fee for the rebate. The portion of the storage rebate kept by the system.", "type": "string", @@ -3047,17 +3053,13 @@ "MoveStruct": { "type": "object", "required": [ - "contents", - "has_public_transfer" + "contents" ], "properties": { "contents": { "description": "Base64 encoded data", "type": "string", "format": "base64" - }, - "has_public_transfer": { - "type": "boolean" } } }, diff --git a/crates/iota-rosetta/src/unit_tests/balance_changing_tx_tests.rs b/crates/iota-rosetta/src/unit_tests/balance_changing_tx_tests.rs index 855c0a875a4..f6e3f1904f5 100644 --- a/crates/iota-rosetta/src/unit_tests/balance_changing_tx_tests.rs +++ b/crates/iota-rosetta/src/unit_tests/balance_changing_tx_tests.rs @@ -52,7 +52,7 @@ use crate::{ async fn test_transfer_iota() { let network = TestClusterBuilder::new().build().await; let client = network.wallet.get_client().await.unwrap(); - let keystore = &network.wallet.config.keystore; + let keystore = network.wallet.config().keystore(); let rgp = network.get_reference_gas_price().await; // Test Transfer Iota @@ -82,7 +82,7 @@ async fn test_transfer_iota() { async fn test_transfer_iota_whole_coin() { let network = TestClusterBuilder::new().build().await; let client = network.wallet.get_client().await.unwrap(); - let keystore = &network.wallet.config.keystore; + let keystore = network.wallet.config().keystore(); let rgp = network.get_reference_gas_price().await; // Test transfer iota whole coin @@ -112,7 +112,7 @@ async fn test_transfer_iota_whole_coin() { async fn test_transfer_object() { let network = TestClusterBuilder::new().build().await; let client = network.wallet.get_client().await.unwrap(); - let keystore = &network.wallet.config.keystore; + let keystore = network.wallet.config().keystore(); let rgp = network.get_reference_gas_price().await; // Test transfer object @@ -143,7 +143,7 @@ async fn test_transfer_object() { async fn test_publish_and_move_call() { let network = TestClusterBuilder::new().build().await; let client = network.wallet.get_client().await.unwrap(); - let keystore = &network.wallet.config.keystore; + let keystore = network.wallet.config().keystore(); let rgp = network.get_reference_gas_price().await; // Test publish @@ -237,7 +237,7 @@ async fn test_publish_and_move_call() { async fn test_split_coin() { let network = TestClusterBuilder::new().build().await; let client = network.wallet.get_client().await.unwrap(); - let keystore = &network.wallet.config.keystore; + let keystore = network.wallet.config().keystore(); let rgp = network.get_reference_gas_price().await; // Test spilt coin @@ -270,7 +270,7 @@ async fn test_split_coin() { async fn test_merge_coin() { let network = TestClusterBuilder::new().build().await; let client = network.wallet.get_client().await.unwrap(); - let keystore = &network.wallet.config.keystore; + let keystore = network.wallet.config().keystore(); let rgp = network.get_reference_gas_price().await; // Test merge coin @@ -304,7 +304,7 @@ async fn test_merge_coin() { async fn test_pay() { let network = TestClusterBuilder::new().build().await; let client = network.wallet.get_client().await.unwrap(); - let keystore = &network.wallet.config.keystore; + let keystore = network.wallet.config().keystore(); let rgp = network.get_reference_gas_price().await; // Test Pay @@ -337,7 +337,7 @@ async fn test_pay() { async fn test_pay_multiple_coin_multiple_recipient() { let network = TestClusterBuilder::new().build().await; let client = network.wallet.get_client().await.unwrap(); - let keystore = &network.wallet.config.keystore; + let keystore = network.wallet.config().keystore(); let rgp = network.get_reference_gas_price().await; // Test Pay multiple coin multiple recipient @@ -374,7 +374,7 @@ async fn test_pay_multiple_coin_multiple_recipient() { async fn test_pay_iota_multiple_coin_same_recipient() { let network = TestClusterBuilder::new().build().await; let client = network.wallet.get_client().await.unwrap(); - let keystore = &network.wallet.config.keystore; + let keystore = network.wallet.config().keystore(); let rgp = network.get_reference_gas_price().await; // Test Pay multiple coin same recipient @@ -410,7 +410,7 @@ async fn test_pay_iota_multiple_coin_same_recipient() { async fn test_pay_iota() { let network = TestClusterBuilder::new().build().await; let client = network.wallet.get_client().await.unwrap(); - let keystore = &network.wallet.config.keystore; + let keystore = network.wallet.config().keystore(); let rgp = network.get_reference_gas_price().await; // Test Pay Iota @@ -445,7 +445,7 @@ async fn test_pay_iota() { async fn test_failed_pay_iota() { let network = TestClusterBuilder::new().build().await; let client = network.wallet.get_client().await.unwrap(); - let keystore = &network.wallet.config.keystore; + let keystore = network.wallet.config().keystore(); let rgp = network.get_reference_gas_price().await; // Test failed Pay Iota @@ -480,7 +480,7 @@ async fn test_failed_pay_iota() { async fn test_stake_iota() { let network = TestClusterBuilder::new().build().await; let client = network.wallet.get_client().await.unwrap(); - let keystore = &network.wallet.config.keystore; + let keystore = network.wallet.config().keystore(); let rgp = network.get_reference_gas_price().await; // Test Delegate Iota @@ -528,7 +528,7 @@ async fn test_stake_iota() { async fn test_stake_iota_with_none_amount() { let network = TestClusterBuilder::new().build().await; let client = network.wallet.get_client().await.unwrap(); - let keystore = &network.wallet.config.keystore; + let keystore = network.wallet.config().keystore(); let rgp = network.get_reference_gas_price().await; // Test Staking Iota @@ -576,7 +576,7 @@ async fn test_stake_iota_with_none_amount() { async fn test_pay_all_iota() { let network = TestClusterBuilder::new().build().await; let client = network.wallet.get_client().await.unwrap(); - let keystore = &network.wallet.config.keystore; + let keystore = network.wallet.config().keystore(); let rgp = network.get_reference_gas_price().await; // Test Pay All Iota diff --git a/crates/iota-rosetta/tests/end_to_end_tests.rs b/crates/iota-rosetta/tests/end_to_end_tests.rs index f421237fe7a..4a933bf29b8 100644 --- a/crates/iota-rosetta/tests/end_to_end_tests.rs +++ b/crates/iota-rosetta/tests/end_to_end_tests.rs @@ -31,7 +31,7 @@ async fn test_get_staked_iota() { let test_cluster = TestClusterBuilder::new().build().await; let address = test_cluster.get_address_0(); let client = test_cluster.wallet.get_client().await.unwrap(); - let keystore = &test_cluster.wallet.config.keystore; + let keystore = test_cluster.wallet.config().keystore(); let (rosetta_client, _handle) = start_rosetta_test_server(client.clone()).await; @@ -132,7 +132,7 @@ async fn test_stake() { let test_cluster = TestClusterBuilder::new().build().await; let sender = test_cluster.get_address_0(); let client = test_cluster.wallet.get_client().await.unwrap(); - let keystore = &test_cluster.wallet.config.keystore; + let keystore = test_cluster.wallet.config().keystore(); let (rosetta_client, _handle) = start_rosetta_test_server(client.clone()).await; @@ -193,7 +193,7 @@ async fn test_stake_all() { let test_cluster = TestClusterBuilder::new().build().await; let sender = test_cluster.get_address_0(); let client = test_cluster.wallet.get_client().await.unwrap(); - let keystore = &test_cluster.wallet.config.keystore; + let keystore = test_cluster.wallet.config().keystore(); let (rosetta_client, _handle) = start_rosetta_test_server(client.clone()).await; @@ -258,7 +258,7 @@ async fn test_withdraw_stake() { .await; let sender = test_cluster.get_address_0(); let client = test_cluster.wallet.get_client().await.unwrap(); - let keystore = &test_cluster.wallet.config.keystore; + let keystore = test_cluster.wallet.config().keystore(); let (rosetta_client, _handle) = start_rosetta_test_server(client.clone()).await; @@ -382,7 +382,7 @@ async fn test_pay_iota() { let sender = test_cluster.get_address_0(); let recipient = test_cluster.get_address_1(); let client = test_cluster.wallet.get_client().await.unwrap(); - let keystore = &test_cluster.wallet.config.keystore; + let keystore = test_cluster.wallet.config().keystore(); let (rosetta_client, _handle) = start_rosetta_test_server(client.clone()).await; @@ -440,7 +440,7 @@ async fn test_pay_iota_multiple_times() { let sender = test_cluster.get_address_0(); let recipient = test_cluster.get_address_1(); let client = test_cluster.wallet.get_client().await.unwrap(); - let keystore = &test_cluster.wallet.config.keystore; + let keystore = test_cluster.wallet.config().keystore(); let (rosetta_client, _handle) = start_rosetta_test_server(client.clone()).await; diff --git a/crates/iota-rosetta/tests/gas_budget_tests.rs b/crates/iota-rosetta/tests/gas_budget_tests.rs index b3b79359a5d..2029cfaa9ef 100644 --- a/crates/iota-rosetta/tests/gas_budget_tests.rs +++ b/crates/iota-rosetta/tests/gas_budget_tests.rs @@ -54,7 +54,7 @@ async fn pay_with_gas_budget(budget: u64) -> TransactionIdentifierResponseResult let sender = test_cluster.get_address_0(); let recipient = test_cluster.get_address_1(); let client = test_cluster.wallet.get_client().await.unwrap(); - let keystore = &test_cluster.wallet.config.keystore; + let keystore = test_cluster.wallet.config().keystore(); let (rosetta_client, _handle) = start_rosetta_test_server(client.clone()).await; diff --git a/crates/iota-sdk/Cargo.toml b/crates/iota-sdk/Cargo.toml index 6acd1cfdc8c..ed15f8733a8 100644 --- a/crates/iota-sdk/Cargo.toml +++ b/crates/iota-sdk/Cargo.toml @@ -17,6 +17,7 @@ colored.workspace = true fastcrypto.workspace = true futures.workspace = true futures-core = "0.3.21" +getset = "0.1" jsonrpsee.workspace = true reqwest.workspace = true rustls.workspace = true diff --git a/crates/iota-sdk/README.md b/crates/iota-sdk/README.md index 21ae42ca4ea..bb144dd7c1c 100644 --- a/crates/iota-sdk/README.md +++ b/crates/iota-sdk/README.md @@ -59,7 +59,7 @@ Unless otherwise specified, most of these examples assume `Rust` and `cargo` are In the root folder of the `iota` repository (or in the `iota-sdk` crate folder), you can individually run examples using the command `cargo run --example filename` (without `.rs` extension). For example: -- `cargo run --example iota_client` -- this one requires a local Iota network running (see [#Connecting to Iota Network](https://wiki.iota.cafe/developer/getting-started/local-network#start-the-local-network). If you do not have a local Iota network running, please skip this example. +- `cargo run --example iota_client` -- this one requires a local Iota network running (see [#Connecting to Iota Network](https://docs.iota.org/developer/getting-started/local-network#start-a-local-network). If you do not have a local Iota network running, please skip this example. - `cargo run --example coin_read_api` - `cargo run --example event_api` -- note that this will subscribe to a stream and thus the program will not terminate unless forced (Ctrl+C) - `cargo run --example governance_api` @@ -80,7 +80,7 @@ The `IotaClientBuilder` struct provides a connection to the JSON-RPC server that For all available servers, see [here](TODO: https://github.com/iotaledger/iota/issues/1614). -For running a local IOTA network, please follow [this guide](https://wiki.iota.cafe/developer/getting-started/iota-install) for installing IOTA and [this guide](https://wiki.iota.cafe/developer/getting-started/local-network#start-the-local-network) for starting the local IOTA network. +For running a local IOTA network, please follow [this guide](https://docs.iota.org/developer/getting-started/install-iota) for installing IOTA and [this guide](https://docs.iota.org/developer/getting-started/local-network#start-a-local-network) for starting the local IOTA network. ```rust use iota_sdk::IotaClientBuilder; @@ -141,15 +141,15 @@ See the programmable transactions [example](https://github.com/iotaledger/iota/b 1. Prepare the environment - 1. Install `iota` binary following the [IOTA installation](https://wiki.iota.cafe/developer/getting-started/iota-install) docs. - 1. [Connect to IOTA Devnet](https://wiki.iota.cafe/developer/getting-started/connect). - 1. [Make sure you have two addresses with gas](https://wiki.iota.cafe/developer/getting-started/get-address) by using the `new-address` command to create new addresses: + 1. Install `iota` binary following the [IOTA installation](https://docs.iota.org/developer/getting-started/install-iota) docs. + 1. [Connect to IOTA Devnet](https://docs.iota.org/developer/getting-started/connect). + 1. [Make sure you have two addresses with gas](https://docs.iota.org/developer/getting-started/get-address) by using the `new-address` command to create new addresses: ```shell iota client new-address ed25519 ``` You must specify the key scheme, one of `ed25519` or `secp256k1` or `secp256r1`. You can skip this step if you are going to play with a friend. :) - 1. [Request IOTA tokens](https://wiki.iota.cafe/developer/getting-started/get-coins) for all addresses that will be used to join the game. + 1. [Request IOTA tokens](https://docs.iota.org/developer/getting-started/get-coins) for all addresses that will be used to join the game. 2. Publish the move contract diff --git a/crates/iota-sdk/examples/utils.rs b/crates/iota-sdk/examples/utils.rs index 6c24f449593..02356041cff 100644 --- a/crates/iota-sdk/examples/utils.rs +++ b/crates/iota-sdk/examples/utils.rs @@ -260,14 +260,15 @@ pub fn retrieve_wallet() -> Result { if !wallet_conf.exists() { let keystore = FileBasedKeystore::new(&keystore_path)?; - let mut client_config = IotaClientConfig::new(keystore.into()); + let mut client_config = IotaClientConfig::new(keystore); client_config.add_env(IotaEnv::testnet()); client_config.add_env(IotaEnv::devnet()); client_config.add_env(IotaEnv::localnet()); - if client_config.active_env.is_none() { - client_config.active_env = client_config.envs.first().map(|env| env.alias.clone()); + if client_config.active_env().is_none() { + client_config + .set_active_env(client_config.envs().first().map(|env| env.alias().clone())); } client_config.save(&wallet_conf)?; @@ -289,7 +290,7 @@ pub fn retrieve_wallet() -> Result { keystore.generate_and_add_new_key(ED25519, None, None, None)?; } - client_config.active_address = Some(default_active_address); + client_config.set_active_address(default_active_address); client_config.save(&wallet_conf)?; let wallet = WalletContext::new(&wallet_conf, std::time::Duration::from_secs(60), None)?; diff --git a/crates/iota-sdk/src/iota_client_config.rs b/crates/iota-sdk/src/iota_client_config.rs index 1d17c82fbb5..1af4d479611 100644 --- a/crates/iota-sdk/src/iota_client_config.rs +++ b/crates/iota-sdk/src/iota_client_config.rs @@ -5,6 +5,7 @@ use std::fmt::{Display, Formatter, Write}; use anyhow::anyhow; +use getset::{Getters, MutGetters}; use iota_config::Config; use iota_keys::keystore::{AccountKeystore, Keystore}; use iota_types::base_types::*; @@ -16,24 +17,52 @@ use crate::{ }; #[serde_as] -#[derive(Serialize, Deserialize)] +#[derive(Serialize, Deserialize, Getters, MutGetters)] +#[getset(get = "pub", get_mut = "pub")] pub struct IotaClientConfig { - pub keystore: Keystore, - pub envs: Vec, - pub active_env: Option, - pub active_address: Option, + pub(crate) keystore: Keystore, + pub(crate) envs: Vec, + pub(crate) active_env: Option, + pub(crate) active_address: Option, } impl IotaClientConfig { - pub fn new(keystore: Keystore) -> Self { + pub fn new(keystore: impl Into) -> Self { IotaClientConfig { - keystore, - envs: vec![], + keystore: keystore.into(), + envs: Default::default(), active_env: None, active_address: None, } } + pub fn with_envs(mut self, envs: impl IntoIterator) -> Self { + self.set_envs(envs); + self + } + + pub fn set_envs(&mut self, envs: impl IntoIterator) { + self.envs = envs.into_iter().collect(); + } + + pub fn with_active_env(mut self, env: impl Into>) -> Self { + self.set_active_env(env); + self + } + + pub fn set_active_env(&mut self, env: impl Into>) { + self.active_env = env.into(); + } + + pub fn with_active_address(mut self, address: impl Into>) -> Self { + self.set_active_address(address); + self + } + + pub fn set_active_address(&mut self, address: impl Into>) { + self.active_address = address.into(); + } + pub fn get_env(&self, alias: &Option) -> Option<&IotaEnv> { if let Some(alias) = alias { self.envs.iter().find(|env| &env.alias == alias) @@ -62,17 +91,45 @@ impl IotaClientConfig { } } -#[derive(Debug, Clone, Serialize, Deserialize)] +#[derive(Debug, Clone, Serialize, Deserialize, Getters, MutGetters)] +#[getset(get = "pub", get_mut = "pub")] pub struct IotaEnv { - pub alias: String, - pub rpc: String, - pub ws: Option, + pub(crate) alias: String, + pub(crate) rpc: String, + pub(crate) ws: Option, /// Basic HTTP access authentication in the format of username:password, if /// needed. - pub basic_auth: Option, + pub(crate) basic_auth: Option, } impl IotaEnv { + pub fn new(alias: impl Into, rpc: impl Into) -> Self { + Self { + alias: alias.into(), + rpc: rpc.into(), + ws: None, + basic_auth: None, + } + } + + pub fn with_ws(mut self, ws: impl Into>) -> Self { + self.set_ws(ws); + self + } + + pub fn set_ws(&mut self, ws: impl Into>) { + self.ws = ws.into(); + } + + pub fn with_basic_auth(mut self, basic_auth: impl Into>) -> Self { + self.set_ws(basic_auth); + self + } + + pub fn set_basic_auth(&mut self, basic_auth: impl Into>) { + self.basic_auth = basic_auth.into(); + } + pub async fn create_rpc_client( &self, request_timeout: impl Into>, diff --git a/crates/iota-sdk/src/lib.rs b/crates/iota-sdk/src/lib.rs index b6f4e03b537..e35306a3824 100644 --- a/crates/iota-sdk/src/lib.rs +++ b/crates/iota-sdk/src/lib.rs @@ -118,8 +118,8 @@ pub const IOTA_COIN_TYPE: &str = "0x2::iota::IOTA"; pub const IOTA_LOCAL_NETWORK_URL: &str = "http://127.0.0.1:9000"; pub const IOTA_LOCAL_NETWORK_URL_0: &str = "http://0.0.0.0:9000"; pub const IOTA_LOCAL_NETWORK_GAS_URL: &str = "http://127.0.0.1:5003/gas"; -pub const IOTA_DEVNET_URL: &str = "https://fullnode.devnet.iota.io:443"; -pub const IOTA_TESTNET_URL: &str = "https://fullnode.testnet.iota.io:443"; +pub const IOTA_DEVNET_URL: &str = "https://api.devnet.iota.cafe"; +pub const IOTA_TESTNET_URL: &str = "https://api.testnet.iota.cafe"; /// Builder for creating an [IotaClient] for connecting to the Iota network. /// diff --git a/crates/iota-sdk/src/wallet_context.rs b/crates/iota-sdk/src/wallet_context.rs index a8ee2a85a30..e0199986515 100644 --- a/crates/iota-sdk/src/wallet_context.rs +++ b/crates/iota-sdk/src/wallet_context.rs @@ -6,6 +6,7 @@ use std::{collections::BTreeSet, path::Path, sync::Arc}; use anyhow::anyhow; use colored::Colorize; +use getset::{Getters, MutGetters}; use iota_config::{Config, PersistedConfig}; use iota_json_rpc_types::{ IotaObjectData, IotaObjectDataFilter, IotaObjectDataOptions, IotaObjectResponse, @@ -24,8 +25,10 @@ use tracing::warn; use crate::{IotaClient, iota_client_config::IotaClientConfig}; +#[derive(Getters, MutGetters)] +#[getset(get = "pub", get_mut = "pub")] pub struct WalletContext { - pub config: PersistedConfig, + config: PersistedConfig, request_timeout: Option, client: Arc>>, max_concurrent_requests: Option, diff --git a/crates/iota-transaction-builder/src/lib.rs b/crates/iota-transaction-builder/src/lib.rs index 67da55f5ffa..126286c6723 100644 --- a/crates/iota-transaction-builder/src/lib.rs +++ b/crates/iota-transaction-builder/src/lib.rs @@ -186,6 +186,7 @@ impl TransactionBuilder { Ok(TransactionKind::programmable(builder.finish())) } + /// Transfer an object to the specified recipient address. pub async fn transfer_object( &self, signer: IotaAddress, @@ -232,6 +233,8 @@ impl TransactionBuilder { TransactionKind::programmable(pt) } + /// Transfer IOTA from the provided coin object to the recipient address. + /// The provided coin object is also used for the gas payment. pub async fn transfer_iota( &self, signer: IotaAddress, @@ -264,6 +267,14 @@ impl TransactionBuilder { let pt = builder.finish(); Ok(TransactionKind::programmable(pt)) } + + /// Take multiple coins and send to multiple addresses following the + /// specified amount list. The length of the vectors must be the same. + /// Take any type of coin, including IOTA. + /// A separate IOTA object will be used for gas payment. + /// + /// If the recipient and sender are the same, it's effectively a + /// generalized version of `split_coin` and `merge_coin`. pub async fn pay( &self, signer: IotaAddress, @@ -304,10 +315,11 @@ impl TransactionBuilder { Ok(obj_refs) } - /// Construct a transaction kind for the PayIota transaction type + /// Construct a transaction kind for the PayIota transaction type. /// /// Use this function together with tx_data_for_dry_run or tx_data - /// for maximum reusability + /// for maximum reusability. + /// The length of the vectors must be the same. pub fn pay_iota_tx_kind( &self, recipients: Vec, @@ -320,6 +332,15 @@ impl TransactionBuilder { Ok(tx_kind) } + /// Take multiple IOTA coins and send to multiple addresses following the + /// specified amount list. The length of the vectors must be the same. + /// Only takes IOTA coins and does not require a gas coin object. + /// + /// The first IOTA coin object input will be used for gas payment, so the + /// balance of this IOTA coin has to be equal to or greater than the gas + /// budget. + /// The total IOTA coin balance input must be sufficient to cover both the + /// gas budget and the amounts to be transferred. pub async fn pay_iota( &self, signer: IotaAddress, @@ -356,6 +377,16 @@ impl TransactionBuilder { TransactionKind::programmable(pt) } + /// Take multiple IOTA coins and send them to one recipient, after gas + /// payment deduction. After the transaction, strictly zero of the IOTA + /// coins input will be left under the sender’s address. + /// + /// The first IOTA coin object input will be used for gas payment, so the + /// balance of this IOTA coin has to be equal or greater than the gas + /// budget. + /// A sender can transfer all their IOTA coins to another + /// address with strictly zero IOTA left in one transaction via this + /// transaction type. pub async fn pay_all_iota( &self, signer: IotaAddress, @@ -405,6 +436,7 @@ impl TransactionBuilder { Ok(TransactionKind::programmable(pt)) } + /// Call a move function from a published package. pub async fn move_call( &self, signer: IotaAddress, @@ -614,6 +646,7 @@ impl TransactionBuilder { Ok(TransactionKind::programmable(pt)) } + /// Publish a new move package. pub async fn publish( &self, sender: IotaAddress, @@ -704,6 +737,7 @@ impl TransactionBuilder { Ok(TransactionKind::programmable(pt)) } + /// Upgrade an existing move package. pub async fn upgrade( &self, sender: IotaAddress, @@ -1006,6 +1040,7 @@ impl TransactionBuilder { )) } + /// Add stake to a validator's staking pool using multiple IOTA coins. pub async fn request_add_stake( &self, signer: IotaAddress, @@ -1074,6 +1109,7 @@ impl TransactionBuilder { )) } + /// Withdraw stake from a validator's staking pool. pub async fn request_withdraw_stake( &self, signer: IotaAddress, @@ -1102,6 +1138,7 @@ impl TransactionBuilder { ) } + /// Add stake to a validator's staking pool using a timelocked IOTA coin. pub async fn request_add_timelocked_stake( &self, signer: IotaAddress, @@ -1150,6 +1187,7 @@ impl TransactionBuilder { )) } + /// Withdraw timelocked stake from a validator's staking pool. pub async fn request_withdraw_timelocked_stake( &self, signer: IotaAddress, @@ -1185,6 +1223,8 @@ impl TransactionBuilder { .map(|(oref, _)| oref) } + /// Helper function to get the latest ObjectRef (ObjectID, SequenceNumber, + /// ObjectDigest) and ObjectType for a provided ObjectID. async fn get_object_ref_and_type( &self, object_id: ObjectID, diff --git a/crates/iota-types/src/effects/mod.rs b/crates/iota-types/src/effects/mod.rs index b67048f2473..0843ffe0d55 100644 --- a/crates/iota-types/src/effects/mod.rs +++ b/crates/iota-types/src/effects/mod.rs @@ -43,7 +43,7 @@ pub const APPROX_SIZE_OF_EXECUTION_STATUS: usize = 120; // Approximate size of `EpochId` type in bytes pub const APPROX_SIZE_OF_EPOCH_ID: usize = 10; // Approximate size of `GasCostSummary` type in bytes -pub const APPROX_SIZE_OF_GAS_COST_SUMMARY: usize = 40; +pub const APPROX_SIZE_OF_GAS_COST_SUMMARY: usize = 50; // Approximate size of `Option` type in bytes pub const APPROX_SIZE_OF_OPT_TX_EVENTS_DIGEST: usize = 40; // Approximate size of `TransactionDigest` type in bytes diff --git a/crates/iota-types/src/gas.rs b/crates/iota-types/src/gas.rs index 8df712a0797..5763c16de35 100644 --- a/crates/iota-types/src/gas.rs +++ b/crates/iota-types/src/gas.rs @@ -141,6 +141,10 @@ pub mod checked { #[schemars(with = "BigInt")] #[serde_as(as = "Readable, _>")] pub computation_cost: u64, + /// The burned component of the computation/execution costs + #[schemars(with = "BigInt")] + #[serde_as(as = "Readable, _>")] + pub computation_cost_burned: u64, /// Storage cost, it's the sum of all storage cost for all objects /// created or mutated. #[schemars(with = "BigInt")] @@ -161,12 +165,14 @@ pub mod checked { impl GasCostSummary { pub fn new( computation_cost: u64, + computation_cost_burned: u64, storage_cost: u64, storage_rebate: u64, non_refundable_storage_fee: u64, ) -> GasCostSummary { GasCostSummary { computation_cost, + computation_cost_burned, storage_cost, storage_rebate, non_refundable_storage_fee, @@ -195,19 +201,22 @@ pub mod checked { self.gas_used() as i64 - self.storage_rebate as i64 } + #[allow(clippy::type_complexity)] pub fn new_from_txn_effects<'a>( transactions: impl Iterator, ) -> GasCostSummary { - let (storage_costs, computation_costs, storage_rebates, non_refundable_storage_fee): ( - Vec, - Vec, - Vec, - Vec, - ) = transactions + let ( + storage_costs, + computation_costs, + computation_costs_burned, + storage_rebates, + non_refundable_storage_fee, + ): (Vec, Vec, Vec, Vec, Vec) = transactions .map(|e| { ( e.gas_cost_summary().storage_cost, e.gas_cost_summary().computation_cost, + e.gas_cost_summary().computation_cost_burned, e.gas_cost_summary().storage_rebate, e.gas_cost_summary().non_refundable_storage_fee, ) @@ -217,6 +226,7 @@ pub mod checked { GasCostSummary { storage_cost: storage_costs.iter().sum(), computation_cost: computation_costs.iter().sum(), + computation_cost_burned: computation_costs_burned.iter().sum(), storage_rebate: storage_rebates.iter().sum(), non_refundable_storage_fee: non_refundable_storage_fee.iter().sum(), } @@ -227,8 +237,9 @@ pub mod checked { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!( f, - "computation_cost: {}, storage_cost: {}, storage_rebate: {}, non_refundable_storage_fee: {}", + "computation_cost: {}, computation_cost_burned: {}, storage_cost: {}, storage_rebate: {}, non_refundable_storage_fee: {}", self.computation_cost, + self.computation_cost_burned, self.storage_cost, self.storage_rebate, self.non_refundable_storage_fee, @@ -239,6 +250,7 @@ pub mod checked { impl std::ops::AddAssign<&Self> for GasCostSummary { fn add_assign(&mut self, other: &Self) { self.computation_cost += other.computation_cost; + self.computation_cost_burned += other.computation_cost_burned; self.storage_cost += other.storage_cost; self.storage_rebate += other.storage_rebate; self.non_refundable_storage_fee += other.non_refundable_storage_fee; diff --git a/crates/iota-types/src/gas_model/gas_v1.rs b/crates/iota-types/src/gas_model/gas_v1.rs index f3e8d463fb1..da872086f33 100644 --- a/crates/iota-types/src/gas_model/gas_v1.rs +++ b/crates/iota-types/src/gas_model/gas_v1.rs @@ -405,6 +405,8 @@ mod checked { let non_refundable_storage_fee = storage_rebate - sender_rebate; GasCostSummary { computation_cost: self.computation_cost, + // entire computation cost is burned. + computation_cost_burned: self.computation_cost, storage_cost: self.storage_cost(), storage_rebate: sender_rebate, non_refundable_storage_fee, diff --git a/crates/iota-types/src/iota_sdk2_conversions.rs b/crates/iota-types/src/iota_sdk2_conversions.rs index dc79e3e6973..4ca1631cc76 100644 --- a/crates/iota-types/src/iota_sdk2_conversions.rs +++ b/crates/iota-types/src/iota_sdk2_conversions.rs @@ -144,7 +144,6 @@ fn sdk_package_to_move(package: MovePackage) -> crate::move_package::MovePackage fn move_object_to_sdk(obj: crate::object::MoveObject) -> MoveStruct { MoveStruct { type_: move_object_type_to_sdk(obj.type_), - has_public_transfer: obj.has_public_transfer, version: obj.version.value(), contents: obj.contents, } @@ -153,7 +152,6 @@ fn move_object_to_sdk(obj: crate::object::MoveObject) -> MoveStruct { fn sdk_object_to_move(obj: MoveStruct) -> crate::object::MoveObject { crate::object::MoveObject { type_: sdk_object_type_to_move(obj.type_), - has_public_transfer: obj.has_public_transfer, version: obj.version.into(), contents: obj.contents, } @@ -650,6 +648,7 @@ impl From for TransactionEffects { epoch: effects.executed_epoch, gas_used: GasCostSummary::new( effects.gas_used.computation_cost, + effects.gas_used.computation_cost_burned, effects.gas_used.storage_cost, effects.gas_used.storage_rebate, effects.gas_used.non_refundable_storage_fee, @@ -749,6 +748,7 @@ impl From for crate::effects::TransactionEffects { executed_epoch: transaction_effects_v1.epoch, gas_used: crate::gas::GasCostSummary::new( transaction_effects_v1.gas_used.computation_cost, + transaction_effects_v1.gas_used.computation_cost_burned, transaction_effects_v1.gas_used.storage_cost, transaction_effects_v1.gas_used.storage_rebate, transaction_effects_v1.gas_used.non_refundable_storage_fee, @@ -1595,6 +1595,7 @@ impl From for GasCostSummary { fn from(value: crate::gas::GasCostSummary) -> Self { Self::new( value.computation_cost, + value.computation_cost_burned, value.storage_cost, value.storage_rebate, value.non_refundable_storage_fee, @@ -1606,6 +1607,7 @@ impl From for crate::gas::GasCostSummary { fn from(value: GasCostSummary) -> Self { Self::new( value.computation_cost, + value.computation_cost_burned, value.storage_cost, value.storage_rebate, value.non_refundable_storage_fee, diff --git a/crates/iota-types/src/object.rs b/crates/iota-types/src/object.rs index 9be8217a25d..4cfe292d222 100644 --- a/crates/iota-types/src/object.rs +++ b/crates/iota-types/src/object.rs @@ -51,10 +51,6 @@ pub const OBJECT_START_VERSION: SequenceNumber = SequenceNumber::from_u64(1); pub struct MoveObject { /// The type of this object. Immutable pub(crate) type_: MoveObjectType, - /// DEPRECATED this field is no longer used to determine whether a tx can - /// transfer this object. Instead, it is always calculated from the - /// objects type when loaded in execution - pub(crate) has_public_transfer: bool, /// Number that increases each time a tx takes this object as a mutable /// input This is a lamport timestamp, not a sequentially increasing /// version @@ -69,47 +65,29 @@ pub const ID_END_INDEX: usize = ObjectID::LENGTH; impl MoveObject { /// Creates a new Move object of type `type_` with BCS encoded bytes in - /// `contents` `has_public_transfer` is determined by the abilities of - /// the `type_`, but resolving the abilities requires the compiled - /// modules of the `type_: StructTag`. In other words, - /// `has_public_transfer` will be the same for all objects of the same - /// `type_`. - /// - /// # Safety - /// - /// This function should ONLY be called if has_public_transfer has been - /// determined by the type_. Yes, this is a bit of an abuse of the - /// `unsafe` marker, but bad things will happen if this is inconsistent - pub unsafe fn new_from_execution( + /// `contents`. + pub fn new_from_execution( type_: MoveObjectType, - has_public_transfer: bool, version: SequenceNumber, contents: Vec, protocol_config: &ProtocolConfig, ) -> Result { Self::new_from_execution_with_limit( type_, - has_public_transfer, version, contents, protocol_config.max_move_object_size(), ) } - /// # Safety - /// This function should ONLY be called if has_public_transfer has been - /// determined by the type_ - pub unsafe fn new_from_execution_with_limit( + /// Creates a new Move object of type `type_` with BCS encoded bytes in + /// `contents`. It allows to set a `max_move_object_size` for that. + pub fn new_from_execution_with_limit( type_: MoveObjectType, - has_public_transfer: bool, version: SequenceNumber, contents: Vec, max_move_object_size: u64, ) -> Result { - // coins should always have public transfer, as they always should have store. - // Thus, type_ == GasCoin::type_() ==> has_public_transfer - // TODO: think this can be generalized to is_coin - debug_assert!(!type_.is_gas_coin() || has_public_transfer); if contents.len() as u64 > max_move_object_size { return Err(ExecutionError::from_kind( ExecutionErrorKind::MoveObjectTooBig { @@ -120,7 +98,6 @@ impl MoveObject { } Ok(Self { type_, - has_public_transfer, version, contents, }) @@ -128,10 +105,9 @@ impl MoveObject { pub fn new_gas_coin(version: SequenceNumber, id: ObjectID, value: u64) -> Self { // unwrap safe because coins are always smaller than the max object size - unsafe { + { Self::new_from_execution_with_limit( GasCoin::type_().into(), - true, version, GasCoin::new(id, value).to_bcs_bytes(), 256, @@ -147,10 +123,9 @@ impl MoveObject { value: u64, ) -> Self { // unwrap safe because coins are always smaller than the max object size - unsafe { + { Self::new_from_execution_with_limit( coin_type, - true, version, GasCoin::new(id, value).to_bcs_bytes(), 256, @@ -167,10 +142,6 @@ impl MoveObject { self.type_.is(s) } - pub fn has_public_transfer(&self) -> bool { - self.has_public_transfer - } - pub fn id(&self) -> ObjectID { Self::id_opt(&self.contents).unwrap() } @@ -359,9 +330,8 @@ impl MoveObject { pub fn object_size_for_gas_metering(&self) -> usize { let serialized_type_tag_size = bcs::serialized_size(&self.type_).expect("Serializing type tag should not fail"); - // + 1 for 'has_public_transfer' // + 8 for `version` - self.contents.len() + serialized_type_tag_size + 1 + 8 + self.contents.len() + serialized_type_tag_size + 8 } /// Get the total amount of IOTA embedded in `self`. Intended for testing @@ -936,7 +906,6 @@ impl Object { pub fn immutable_with_id_for_testing(id: ObjectID) -> Self { let data = Data::Move(MoveObject { type_: GasCoin::type_().into(), - has_public_transfer: true, version: OBJECT_START_VERSION, contents: GasCoin::new(id, GAS_VALUE_FOR_TESTING).to_bcs_bytes(), }); @@ -970,7 +939,6 @@ impl Object { pub fn with_id_owner_gas_for_testing(id: ObjectID, owner: IotaAddress, gas: u64) -> Self { let data = Data::Move(MoveObject { type_: GasCoin::type_().into(), - has_public_transfer: true, version: OBJECT_START_VERSION, contents: GasCoin::new(id, gas).to_bcs_bytes(), }); @@ -986,7 +954,6 @@ impl Object { pub fn treasury_cap_for_testing(struct_tag: StructTag, treasury_cap: TreasuryCap) -> Self { let data = Data::Move(MoveObject { type_: TreasuryCap::type_(struct_tag).into(), - has_public_transfer: true, version: OBJECT_START_VERSION, contents: bcs::to_bytes(&treasury_cap).expect("Failed to serialize"), }); @@ -1002,7 +969,6 @@ impl Object { pub fn coin_metadata_for_testing(struct_tag: StructTag, metadata: CoinMetadata) -> Self { let data = Data::Move(MoveObject { type_: CoinMetadata::type_(struct_tag).into(), - has_public_transfer: true, version: OBJECT_START_VERSION, contents: bcs::to_bytes(&metadata).expect("Failed to serialize"), }); @@ -1018,7 +984,6 @@ impl Object { pub fn with_object_owner_for_testing(id: ObjectID, owner: ObjectID) -> Self { let data = Data::Move(MoveObject { type_: GasCoin::type_().into(), - has_public_transfer: true, version: OBJECT_START_VERSION, contents: GasCoin::new(id, GAS_VALUE_FOR_TESTING).to_bcs_bytes(), }); @@ -1043,7 +1008,6 @@ impl Object { ) -> Self { let data = Data::Move(MoveObject { type_: GasCoin::type_().into(), - has_public_transfer: true, version, contents: GasCoin::new(id, GAS_VALUE_FOR_TESTING).to_bcs_bytes(), }); @@ -1247,17 +1211,17 @@ fn test_object_digest_and_serialized_format() { let bytes = bcs::to_bytes(&o).unwrap(); assert_eq!(bytes, [ - 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 40, 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, 0, 123, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, + 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 40, 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, 0, 123, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 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, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0 + 0, 0, 0, 0, 0 ]); let objref = format!("{:?}", o.compute_object_reference()); assert_eq!( objref, - "(0x0000000000000000000000000000000000000000000000000000000000000000, SequenceNumber(1), o#59tZq65HVqZjUyNtD7BCGLTD87N5cpayYwEFrtwR4aMz)" + "(0x0000000000000000000000000000000000000000000000000000000000000000, SequenceNumber(1), o#Ba4YyVBcpc9jgX4PMLRoyt9dKLftYVSDvuKbtMr9f4NM)" ); } diff --git a/crates/iota-types/src/stardust/output/alias.rs b/crates/iota-types/src/stardust/output/alias.rs index d32a7fd60af..92d6716abd7 100644 --- a/crates/iota-types/src/stardust/output/alias.rs +++ b/crates/iota-types/src/stardust/output/alias.rs @@ -114,12 +114,9 @@ impl Alias { version: SequenceNumber, ) -> anyhow::Result { // Construct the Alias object. - let move_alias_object = unsafe { - // Safety: we know from the definition of `Alias` in the stardust package - // that it has public transfer (`store` ability is present). + let move_alias_object = { MoveObject::new_from_execution( Self::tag().into(), - true, version, bcs::to_bytes(&self)?, protocol_config, @@ -187,12 +184,9 @@ impl AliasOutput { coin_type: CoinType, ) -> anyhow::Result { // Construct the Alias Output object. - let move_alias_output_object = unsafe { - // Safety: we know from the definition of `AliasOutput` in the stardust package - // that it does not have public transfer (`store` ability is absent). + let move_alias_output_object = { MoveObject::new_from_execution( AliasOutput::tag(coin_type.to_type_tag()).into(), - false, version, bcs::to_bytes(&self)?, protocol_config, diff --git a/crates/iota-types/src/stardust/output/basic.rs b/crates/iota-types/src/stardust/output/basic.rs index 30e944d87ab..fa664dbb944 100644 --- a/crates/iota-types/src/stardust/output/basic.rs +++ b/crates/iota-types/src/stardust/output/basic.rs @@ -139,12 +139,9 @@ impl BasicOutput { version: SequenceNumber, coin_type: &CoinType, ) -> Result { - let move_object = unsafe { - // Safety: we know from the definition of `BasicOutput` in the stardust package - // that it is not publicly transferable (`store` ability is absent). + let move_object = { MoveObject::new_from_execution( BasicOutput::tag(coin_type.to_type_tag()).into(), - false, version, bcs::to_bytes(self)?, protocol_config, @@ -195,12 +192,9 @@ pub(crate) fn create_coin( coin_type: &CoinType, ) -> Result { let coin = Coin::new(object_id, amount); - let move_object = unsafe { - // Safety: we know from the definition of `Coin` - // that it has public transfer (`store` ability is present). + let move_object = { MoveObject::new_from_execution( MoveObjectType::from(Coin::type_(coin_type.to_type_tag())), - true, version, bcs::to_bytes(&coin)?, protocol_config, diff --git a/crates/iota-types/src/stardust/output/nft.rs b/crates/iota-types/src/stardust/output/nft.rs index 651f842f4be..1af82fafc00 100644 --- a/crates/iota-types/src/stardust/output/nft.rs +++ b/crates/iota-types/src/stardust/output/nft.rs @@ -357,12 +357,9 @@ impl Nft { version: SequenceNumber, ) -> anyhow::Result { // Construct the Nft object. - let move_nft_object = unsafe { - // Safety: we know from the definition of `Nft` in the stardust package - // that it has public transfer (`store` ability is present). + let move_nft_object = { MoveObject::new_from_execution( Self::tag().into(), - true, version, bcs::to_bytes(&self)?, protocol_config, @@ -447,12 +444,9 @@ impl NftOutput { coin_type: CoinType, ) -> anyhow::Result { // Construct the Nft Output object. - let move_nft_output_object = unsafe { - // Safety: we know from the definition of `NftOutput` in the stardust package - // that it does not have public transfer (`store` ability is absent). + let move_nft_output_object = { MoveObject::new_from_execution( NftOutput::tag(coin_type.to_type_tag()).into(), - false, version, bcs::to_bytes(&self)?, protocol_config, diff --git a/crates/iota-types/src/timelock/timelock.rs b/crates/iota-types/src/timelock/timelock.rs index 1a6f35a9303..840a3d2ede2 100644 --- a/crates/iota-types/src/timelock/timelock.rs +++ b/crates/iota-types/src/timelock/timelock.rs @@ -122,12 +122,9 @@ pub fn to_genesis_object( tx_context: &TxContext, version: SequenceNumber, ) -> Result { - let move_object = unsafe { - // Safety: we know from the definition of `TimeLock` in the timelock package - // that it is not publicly transferable (`store` ability is absent). + let move_object = { MoveObject::new_from_execution( MoveObjectType::timelocked_iota_balance(), - false, version, timelock.to_bcs_bytes(), protocol_config, diff --git a/crates/iota-verifier-transactional-tests/tests/entry_points/clock_ref.exp b/crates/iota-verifier-transactional-tests/tests/entry_points/clock_ref.exp index d43338c607b..b1a8d06a779 100644 --- a/crates/iota-verifier-transactional-tests/tests/entry_points/clock_ref.exp +++ b/crates/iota-verifier-transactional-tests/tests/entry_points/clock_ref.exp @@ -4,4 +4,4 @@ task 0, lines 7-15: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3952000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3944400, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/entry_points/generic_and_generic_object_params.exp b/crates/iota-verifier-transactional-tests/tests/entry_points/generic_and_generic_object_params.exp index bda5fc31ee7..1f41055a689 100644 --- a/crates/iota-verifier-transactional-tests/tests/entry_points/generic_and_generic_object_params.exp +++ b/crates/iota-verifier-transactional-tests/tests/entry_points/generic_and_generic_object_params.exp @@ -4,4 +4,4 @@ task 0, lines 5-17: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4598000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4590400, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/entry_points/generic_param_after_primitive.exp b/crates/iota-verifier-transactional-tests/tests/entry_points/generic_param_after_primitive.exp index fc42a2b1685..511de926e2e 100644 --- a/crates/iota-verifier-transactional-tests/tests/entry_points/generic_param_after_primitive.exp +++ b/crates/iota-verifier-transactional-tests/tests/entry_points/generic_param_after_primitive.exp @@ -4,4 +4,4 @@ task 0, lines 5-17: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4560000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4552400, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/entry_points/generic_with_key_valid.exp b/crates/iota-verifier-transactional-tests/tests/entry_points/generic_with_key_valid.exp index 78ad5574bcb..4529b502b44 100644 --- a/crates/iota-verifier-transactional-tests/tests/entry_points/generic_with_key_valid.exp +++ b/crates/iota-verifier-transactional-tests/tests/entry_points/generic_with_key_valid.exp @@ -4,4 +4,4 @@ task 0, lines 7-17: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4332000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4324400, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/entry_points/id.exp b/crates/iota-verifier-transactional-tests/tests/entry_points/id.exp index 5de6a33c268..ab8208ee397 100644 --- a/crates/iota-verifier-transactional-tests/tests/entry_points/id.exp +++ b/crates/iota-verifier-transactional-tests/tests/entry_points/id.exp @@ -4,4 +4,4 @@ task 0, lines 7-22: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4149600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4142000, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/entry_points/nested_generic_vector_param.exp b/crates/iota-verifier-transactional-tests/tests/entry_points/nested_generic_vector_param.exp index 6d9ad518757..33ad1081352 100644 --- a/crates/iota-verifier-transactional-tests/tests/entry_points/nested_generic_vector_param.exp +++ b/crates/iota-verifier-transactional-tests/tests/entry_points/nested_generic_vector_param.exp @@ -4,4 +4,4 @@ task 0, lines 5-14: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3982400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3974800, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/entry_points/non_key_struct_generic_valid.exp b/crates/iota-verifier-transactional-tests/tests/entry_points/non_key_struct_generic_valid.exp index a0bae416a0d..5c532e70095 100644 --- a/crates/iota-verifier-transactional-tests/tests/entry_points/non_key_struct_generic_valid.exp +++ b/crates/iota-verifier-transactional-tests/tests/entry_points/non_key_struct_generic_valid.exp @@ -4,4 +4,4 @@ task 0, lines 7-19: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4567600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4560000, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/entry_points/ok.exp b/crates/iota-verifier-transactional-tests/tests/entry_points/ok.exp index 7ab1f8a8e11..a7a879c6b86 100644 --- a/crates/iota-verifier-transactional-tests/tests/entry_points/ok.exp +++ b/crates/iota-verifier-transactional-tests/tests/entry_points/ok.exp @@ -4,10 +4,10 @@ task 0, lines 5-12: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3929200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3921600, storage_rebate: 0, non_refundable_storage_fee: 0 task 1, lines 14-21: //# publish created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3929200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3921600, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/entry_points/option.exp b/crates/iota-verifier-transactional-tests/tests/entry_points/option.exp index 16b325bb1ad..3b9432e6dc1 100644 --- a/crates/iota-verifier-transactional-tests/tests/entry_points/option.exp +++ b/crates/iota-verifier-transactional-tests/tests/entry_points/option.exp @@ -4,4 +4,4 @@ task 0, lines 7-24: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4590400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4582800, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/entry_points/optional_txn_context.exp b/crates/iota-verifier-transactional-tests/tests/entry_points/optional_txn_context.exp index 6a37cf34033..9c8fafdf010 100644 --- a/crates/iota-verifier-transactional-tests/tests/entry_points/optional_txn_context.exp +++ b/crates/iota-verifier-transactional-tests/tests/entry_points/optional_txn_context.exp @@ -4,10 +4,10 @@ task 0, lines 5-12: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3769600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3762000, storage_rebate: 0, non_refundable_storage_fee: 0 task 1, lines 15-24: //# publish created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4392800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4385200, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/entry_points/random_ref.exp b/crates/iota-verifier-transactional-tests/tests/entry_points/random_ref.exp index 8befd844f07..9a33b066926 100644 --- a/crates/iota-verifier-transactional-tests/tests/entry_points/random_ref.exp +++ b/crates/iota-verifier-transactional-tests/tests/entry_points/random_ref.exp @@ -4,4 +4,4 @@ task 0, lines 7-15: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3974800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3967200, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/entry_points/return_values.exp b/crates/iota-verifier-transactional-tests/tests/entry_points/return_values.exp index fa7ba0e9720..54afe3df31d 100644 --- a/crates/iota-verifier-transactional-tests/tests/entry_points/return_values.exp +++ b/crates/iota-verifier-transactional-tests/tests/entry_points/return_values.exp @@ -4,28 +4,28 @@ task 0, lines 7-14: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3959600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3952000, storage_rebate: 0, non_refundable_storage_fee: 0 task 1, lines 16-23: //# publish created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3967200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3959600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 2, lines 25-32: //# publish created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3967200, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3959600, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, lines 34-42: //# publish created: object(4,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4506800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4499200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 4, lines 44-52: //# publish created: object(5,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4522000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4514400, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/entry_points/single_generic_vector_param.exp b/crates/iota-verifier-transactional-tests/tests/entry_points/single_generic_vector_param.exp index 96293fc1c9c..c4932632630 100644 --- a/crates/iota-verifier-transactional-tests/tests/entry_points/single_generic_vector_param.exp +++ b/crates/iota-verifier-transactional-tests/tests/entry_points/single_generic_vector_param.exp @@ -4,4 +4,4 @@ task 0, lines 5-14: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3974800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3967200, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/entry_points/single_type_param.exp b/crates/iota-verifier-transactional-tests/tests/entry_points/single_type_param.exp index 00a76d829cd..9d5ec25bdfc 100644 --- a/crates/iota-verifier-transactional-tests/tests/entry_points/single_type_param.exp +++ b/crates/iota-verifier-transactional-tests/tests/entry_points/single_type_param.exp @@ -4,4 +4,4 @@ task 0, lines 5-14: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3967200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3959600, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/entry_points/single_type_param_generic_object.exp b/crates/iota-verifier-transactional-tests/tests/entry_points/single_type_param_generic_object.exp index 2bc46715f53..417dbd7b339 100644 --- a/crates/iota-verifier-transactional-tests/tests/entry_points/single_type_param_generic_object.exp +++ b/crates/iota-verifier-transactional-tests/tests/entry_points/single_type_param_generic_object.exp @@ -4,4 +4,4 @@ task 0, lines 5-17: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4575200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4567600, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/entry_points/single_type_param_key.exp b/crates/iota-verifier-transactional-tests/tests/entry_points/single_type_param_key.exp index 00a76d829cd..9d5ec25bdfc 100644 --- a/crates/iota-verifier-transactional-tests/tests/entry_points/single_type_param_key.exp +++ b/crates/iota-verifier-transactional-tests/tests/entry_points/single_type_param_key.exp @@ -4,4 +4,4 @@ task 0, lines 5-14: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3967200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3959600, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/entry_points/string.exp b/crates/iota-verifier-transactional-tests/tests/entry_points/string.exp index 8e8c7e825ca..1f12c6f4f6e 100644 --- a/crates/iota-verifier-transactional-tests/tests/entry_points/string.exp +++ b/crates/iota-verifier-transactional-tests/tests/entry_points/string.exp @@ -4,4 +4,4 @@ task 0, lines 7-32: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4894400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4886800, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/id_immutable/mut_borrow_generic_key_struct_id_field.exp b/crates/iota-verifier-transactional-tests/tests/id_immutable/mut_borrow_generic_key_struct_id_field.exp index d102b9cd219..90cfdeb41c0 100644 --- a/crates/iota-verifier-transactional-tests/tests/id_immutable/mut_borrow_generic_key_struct_id_field.exp +++ b/crates/iota-verifier-transactional-tests/tests/id_immutable/mut_borrow_generic_key_struct_id_field.exp @@ -4,4 +4,4 @@ task 0, lines 5-19: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4461200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4453600, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/id_immutable/mut_borrow_key_struct_id_field.exp b/crates/iota-verifier-transactional-tests/tests/id_immutable/mut_borrow_key_struct_id_field.exp index 70bf25b33c8..6e6f56db45e 100644 --- a/crates/iota-verifier-transactional-tests/tests/id_immutable/mut_borrow_key_struct_id_field.exp +++ b/crates/iota-verifier-transactional-tests/tests/id_immutable/mut_borrow_key_struct_id_field.exp @@ -4,4 +4,4 @@ task 0, lines 5-19: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4370000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4362400, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/id_immutable/mut_borrow_key_struct_non_id_field.exp b/crates/iota-verifier-transactional-tests/tests/id_immutable/mut_borrow_key_struct_non_id_field.exp index bec291595c9..caa6434cf6f 100644 --- a/crates/iota-verifier-transactional-tests/tests/id_immutable/mut_borrow_key_struct_non_id_field.exp +++ b/crates/iota-verifier-transactional-tests/tests/id_immutable/mut_borrow_key_struct_non_id_field.exp @@ -4,4 +4,4 @@ task 0, lines 5-20: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4438400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4430800, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/id_immutable/mut_borrow_non_key_struct_id_field.exp b/crates/iota-verifier-transactional-tests/tests/id_immutable/mut_borrow_non_key_struct_id_field.exp index 70bf25b33c8..6e6f56db45e 100644 --- a/crates/iota-verifier-transactional-tests/tests/id_immutable/mut_borrow_non_key_struct_id_field.exp +++ b/crates/iota-verifier-transactional-tests/tests/id_immutable/mut_borrow_non_key_struct_id_field.exp @@ -4,4 +4,4 @@ task 0, lines 5-19: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4370000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4362400, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/id_leak/direct_leak_through_call.exp b/crates/iota-verifier-transactional-tests/tests/id_leak/direct_leak_through_call.exp index 9747f39630c..31828aeba4a 100644 --- a/crates/iota-verifier-transactional-tests/tests/id_leak/direct_leak_through_call.exp +++ b/crates/iota-verifier-transactional-tests/tests/id_leak/direct_leak_through_call.exp @@ -4,4 +4,4 @@ task 0, lines 5-27: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4590400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4582800, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/id_leak/indirect_leak_through_call.exp b/crates/iota-verifier-transactional-tests/tests/id_leak/indirect_leak_through_call.exp index 178337a8bc5..addb3329cd5 100644 --- a/crates/iota-verifier-transactional-tests/tests/id_leak/indirect_leak_through_call.exp +++ b/crates/iota-verifier-transactional-tests/tests/id_leak/indirect_leak_through_call.exp @@ -9,4 +9,4 @@ task 1, lines 29-51: //# publish created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4590400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4582800, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/id_leak/infinite_loop.exp b/crates/iota-verifier-transactional-tests/tests/id_leak/infinite_loop.exp index f4ef9d5329d..dd8f2d34588 100644 --- a/crates/iota-verifier-transactional-tests/tests/id_leak/infinite_loop.exp +++ b/crates/iota-verifier-transactional-tests/tests/id_leak/infinite_loop.exp @@ -4,10 +4,10 @@ task 0, lines 7-29: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4970400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4962800, storage_rebate: 0, non_refundable_storage_fee: 0 task 1, lines 31-60: //# publish created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5168000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5160400, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/id_leak/loop.exp b/crates/iota-verifier-transactional-tests/tests/id_leak/loop.exp index d20e8e4e86b..e70c58291ae 100644 --- a/crates/iota-verifier-transactional-tests/tests/id_leak/loop.exp +++ b/crates/iota-verifier-transactional-tests/tests/id_leak/loop.exp @@ -4,4 +4,4 @@ task 0, lines 5-35: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5631600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5624000, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/id_leak/through_direct_return.exp b/crates/iota-verifier-transactional-tests/tests/id_leak/through_direct_return.exp index fec2acca242..ae322a7e96a 100644 --- a/crates/iota-verifier-transactional-tests/tests/id_leak/through_direct_return.exp +++ b/crates/iota-verifier-transactional-tests/tests/id_leak/through_direct_return.exp @@ -4,4 +4,4 @@ task 0, lines 5-21: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4294000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4286400, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/id_leak/through_pack.exp b/crates/iota-verifier-transactional-tests/tests/id_leak/through_pack.exp index 199d2bdaf7f..448a15d26c1 100644 --- a/crates/iota-verifier-transactional-tests/tests/id_leak/through_pack.exp +++ b/crates/iota-verifier-transactional-tests/tests/id_leak/through_pack.exp @@ -9,4 +9,4 @@ task 1, lines 40-63: //# publish created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4902000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4894400, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/id_leak/through_vector.exp b/crates/iota-verifier-transactional-tests/tests/id_leak/through_vector.exp index 477bc8b6b73..ee3c16bc984 100644 --- a/crates/iota-verifier-transactional-tests/tests/id_leak/through_vector.exp +++ b/crates/iota-verifier-transactional-tests/tests/id_leak/through_vector.exp @@ -4,4 +4,4 @@ task 0, lines 5-22: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4362400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4354800, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/one_time_witness/bool_field.exp b/crates/iota-verifier-transactional-tests/tests/one_time_witness/bool_field.exp index 66b8c202893..b83fbe432cf 100644 --- a/crates/iota-verifier-transactional-tests/tests/one_time_witness/bool_field.exp +++ b/crates/iota-verifier-transactional-tests/tests/one_time_witness/bool_field.exp @@ -4,4 +4,4 @@ task 0, lines 7-17: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4362400, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4354800, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/one_time_witness/many_fields_valid.exp b/crates/iota-verifier-transactional-tests/tests/one_time_witness/many_fields_valid.exp index ee4b0f28abc..b5ad247d346 100644 --- a/crates/iota-verifier-transactional-tests/tests/one_time_witness/many_fields_valid.exp +++ b/crates/iota-verifier-transactional-tests/tests/one_time_witness/many_fields_valid.exp @@ -4,4 +4,4 @@ task 0, lines 7-15: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4005200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3997600, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/one_time_witness/wrong_field_type.exp b/crates/iota-verifier-transactional-tests/tests/one_time_witness/wrong_field_type.exp index 7681e17a23d..2320e02e386 100644 --- a/crates/iota-verifier-transactional-tests/tests/one_time_witness/wrong_field_type.exp +++ b/crates/iota-verifier-transactional-tests/tests/one_time_witness/wrong_field_type.exp @@ -4,10 +4,10 @@ task 0, lines 7-24: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4613200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4605600, storage_rebate: 0, non_refundable_storage_fee: 0 task 1, lines 26-44: //# publish created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4932400, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4924800, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/private_generics/no_public_transfer_explicit.exp b/crates/iota-verifier-transactional-tests/tests/private_generics/no_public_transfer_explicit.exp index 003b3341304..f227e1b7b2d 100644 --- a/crates/iota-verifier-transactional-tests/tests/private_generics/no_public_transfer_explicit.exp +++ b/crates/iota-verifier-transactional-tests/tests/private_generics/no_public_transfer_explicit.exp @@ -4,7 +4,7 @@ task 1, lines 9-25: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 5175600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 5168000, storage_rebate: 0, non_refundable_storage_fee: 0 task 3, lines 31-40: //# publish diff --git a/crates/iota-verifier-transactional-tests/tests/private_generics/private_event_emit.exp b/crates/iota-verifier-transactional-tests/tests/private_generics/private_event_emit.exp index 70f5b05dd3e..a85e79543d0 100644 --- a/crates/iota-verifier-transactional-tests/tests/private_generics/private_event_emit.exp +++ b/crates/iota-verifier-transactional-tests/tests/private_generics/private_event_emit.exp @@ -24,7 +24,7 @@ task 5, lines 61-70: //# publish created: object(5,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3990000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3982400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 7, lines 74-84: //# publish --dependencies test diff --git a/crates/iota-verifier-transactional-tests/tests/private_generics/public_transfer_with_store.exp b/crates/iota-verifier-transactional-tests/tests/private_generics/public_transfer_with_store.exp index 7a16cf77f1c..87d61979b72 100644 --- a/crates/iota-verifier-transactional-tests/tests/private_generics/public_transfer_with_store.exp +++ b/crates/iota-verifier-transactional-tests/tests/private_generics/public_transfer_with_store.exp @@ -4,22 +4,22 @@ task 0, lines 8-18: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4461200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4453600, storage_rebate: 0, non_refundable_storage_fee: 0 task 1, lines 20-30: //# publish created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4187600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4180000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 2, lines 32-42: //# publish created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4180000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4172400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, lines 44-56: //# publish created: object(4,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4582800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4575200, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/private_generics/public_transfer_with_store_generic.exp b/crates/iota-verifier-transactional-tests/tests/private_generics/public_transfer_with_store_generic.exp index 0de845e6a27..9858367cfd9 100644 --- a/crates/iota-verifier-transactional-tests/tests/private_generics/public_transfer_with_store_generic.exp +++ b/crates/iota-verifier-transactional-tests/tests/private_generics/public_transfer_with_store_generic.exp @@ -4,22 +4,22 @@ task 0, lines 8-23: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4689200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4681600, storage_rebate: 0, non_refundable_storage_fee: 0 task 1, lines 25-40: //# publish created: object(2,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4377600, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4370000, storage_rebate: 980400, non_refundable_storage_fee: 0 task 2, lines 42-57: //# publish created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4370000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4362400, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, lines 59-77: //# publish created: object(4,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4826000, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4818400, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/private_generics/receive_with_and_without_store.exp b/crates/iota-verifier-transactional-tests/tests/private_generics/receive_with_and_without_store.exp index de5cd042a53..dba2c2207a4 100644 --- a/crates/iota-verifier-transactional-tests/tests/private_generics/receive_with_and_without_store.exp +++ b/crates/iota-verifier-transactional-tests/tests/private_generics/receive_with_and_without_store.exp @@ -14,10 +14,10 @@ task 2, lines 27-41: //# publish created: object(3,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4848800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4841200, storage_rebate: 980400, non_refundable_storage_fee: 0 task 3, lines 43-54: //# publish created: object(4,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 4430800, storage_rebate: 988000, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 4423200, storage_rebate: 980400, non_refundable_storage_fee: 0 diff --git a/crates/iota-verifier-transactional-tests/tests/struct_with_key/key_struct_id_field_valid.exp b/crates/iota-verifier-transactional-tests/tests/struct_with_key/key_struct_id_field_valid.exp index 7125ed0c0ab..c9613c626fb 100644 --- a/crates/iota-verifier-transactional-tests/tests/struct_with_key/key_struct_id_field_valid.exp +++ b/crates/iota-verifier-transactional-tests/tests/struct_with_key/key_struct_id_field_valid.exp @@ -4,4 +4,4 @@ task 0, lines 5-11: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, storage_cost: 3967200, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3959600, storage_rebate: 0, non_refundable_storage_fee: 0 diff --git a/crates/iota/Cargo.toml b/crates/iota/Cargo.toml index cdd190c361f..8f6435f5f12 100644 --- a/crates/iota/Cargo.toml +++ b/crates/iota/Cargo.toml @@ -45,6 +45,7 @@ serde_json.workspace = true serde_yaml.workspace = true shell-words = "1.1.0" signature.workspace = true +strum.workspace = true tabled.workspace = true tap.workspace = true tempfile.workspace = true diff --git a/crates/iota/src/client_commands.rs b/crates/iota/src/client_commands.rs index b297d6ddc3f..3ddd783aac7 100644 --- a/crates/iota/src/client_commands.rs +++ b/crates/iota/src/client_commands.rs @@ -3,7 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 use std::{ - collections::{BTreeMap, btree_map::Entry}, + cmp::Eq, + collections::{BTreeMap, HashSet, btree_map::Entry}, fmt::{Debug, Display, Formatter, Write}, fs, path::{Path, PathBuf}, @@ -57,6 +58,7 @@ use iota_types::{ move_package::UpgradeCap, object::Owner, parse_iota_type_tag, + quorum_driver_types::ExecuteTransactionRequestType, signature::GenericSignature, transaction::{ SenderSignedData, Transaction, TransactionData, TransactionDataAPI, TransactionKind, @@ -72,6 +74,7 @@ use reqwest::StatusCode; use serde::Serialize; use serde_json::{Value, json}; use shared_crypto::intent::Intent; +use strum::EnumString; use tabled::{ builder::Builder as TableBuilder, settings::{ @@ -649,6 +652,13 @@ pub struct Opts { /// --signed-tx-bytes `. #[arg(long, required = false)] pub serialize_signed_transaction: bool, + + /// Select which fields of the response to display. + /// If not provided, all fields are displayed. + /// The fields are: effects, input, events, object_changes, + /// balance_changes. + #[clap(long, required = false, num_args = 0.., value_parser = parse_emit_option, default_value = "effects,input,events,object_changes,balance_changes")] + pub emit: HashSet, } /// Global options with gas @@ -665,23 +675,40 @@ pub struct OptsWithGas { impl Opts { /// Uses the passed gas_budget for the gas budget variable and sets all - /// other flags to false. + /// other flags to false, and emit to an empty vector(defaulting to all emit + /// options). pub fn for_testing(gas_budget: u64) -> Self { Self { gas_budget: Some(gas_budget), dry_run: false, serialize_unsigned_transaction: false, serialize_signed_transaction: false, + emit: HashSet::new(), } } /// Uses the passed gas_budget for the gas budget variable, sets dry run to - /// true, and sets all other flags to false. + /// true, and sets all other flags to false, and emit to an empty + /// vector(defaulting to all emit options). pub fn for_testing_dry_run(gas_budget: u64) -> Self { Self { gas_budget: Some(gas_budget), dry_run: true, serialize_unsigned_transaction: false, serialize_signed_transaction: false, + emit: HashSet::new(), + } + } + + /// Uses the passed gas_budget for the gas budget variable, sets dry run to + /// false, and sets all other flags to false, and emit to the passed emit + /// vector. + pub fn for_testing_emit_options(gas_budget: u64, emit: HashSet) -> Self { + Self { + gas_budget: Some(gas_budget), + dry_run: false, + serialize_unsigned_transaction: false, + serialize_signed_transaction: false, + emit, } } } @@ -703,6 +730,30 @@ impl OptsWithGas { rest: Opts::for_testing_dry_run(gas_budget), } } + + /// Sets the gas object to gas, and uses the passed gas_budget for the gas + /// budget variable. Dry run is set to false, and emit to the passed emit + /// vector. All other flags are set to false. + pub fn for_testing_emit_options( + gas: Option, + gas_budget: u64, + emit: HashSet, + ) -> Self { + Self { + gas, + rest: Opts::for_testing_emit_options(gas_budget, emit), + } + } +} + +#[derive(Clone, Debug, EnumString, Hash, Eq, PartialEq)] +#[strum(serialize_all = "snake_case")] +pub enum EmitOption { + Effects, + Input, + Events, + ObjectChanges, + BalanceChanges, } #[derive(serde::Deserialize)] @@ -734,7 +785,7 @@ impl IotaClientCommands { profile_output, config_objects: None, }; - let rpc = context.config.get_active_env()?.rpc.clone(); + let rpc = context.config().get_active_env()?.rpc().clone(); let _command_result = iota_replay::execute_replay_command(Some(rpc), false, false, None, None, cmd) .await?; @@ -756,7 +807,7 @@ impl IotaClientCommands { config_objects: None, }; - let rpc = context.config.get_active_env()?.rpc.clone(); + let rpc = context.config().get_active_env()?.rpc().clone(); let _command_result = iota_replay::execute_replay_command(Some(rpc), false, false, None, None, cmd) .await?; @@ -773,7 +824,7 @@ impl IotaClientCommands { num_tasks: 16, persist_path: None, }; - let rpc = context.config.get_active_env()?.rpc.clone(); + let rpc = context.config().get_active_env()?.rpc().clone(); let _command_result = iota_replay::execute_replay_command(Some(rpc), false, false, None, None, cmd) .await?; @@ -791,7 +842,7 @@ impl IotaClientCommands { terminate_early, max_tasks: 16, }; - let rpc = context.config.get_active_env()?.rpc.clone(); + let rpc = context.config().get_active_env()?.rpc().clone(); let _command_result = iota_replay::execute_replay_command(Some(rpc), false, false, None, None, cmd) .await?; @@ -801,8 +852,8 @@ impl IotaClientCommands { IotaClientCommands::Addresses { sort_by_alias } => { let active_address = context.active_address()?; let mut addresses: Vec<(String, IotaAddress)> = context - .config - .keystore + .config() + .keystore() .addresses_with_alias() .into_iter() .map(|(address, alias)| (alias.alias.to_string(), *address)) @@ -932,9 +983,9 @@ impl IotaClientCommands { None }; let env_alias = context - .config + .config() .get_active_env() - .map(|e| e.alias.clone()) + .map(|e| e.alias().clone()) .ok(); let upgrade_result = upgrade_package( client.read_api(), @@ -1448,16 +1499,19 @@ impl IotaClientCommands { derivation_path, word_length, } => { - let (address, phrase, scheme) = context.config.keystore.generate_and_add_new_key( - key_scheme, - alias.clone(), - derivation_path, - word_length, - )?; + let (address, phrase, scheme) = context + .config_mut() + .keystore_mut() + .generate_and_add_new_key( + key_scheme, + alias.clone(), + derivation_path, + word_length, + )?; let alias = match alias { Some(x) => x, - None => context.config.keystore.get_alias_by_address(&address)?, + None => context.config().keystore().get_alias_by_address(&address)?, }; IotaClientCommandResult::NewAddress(NewAddressOutput { @@ -1483,12 +1537,12 @@ impl IotaClientCommands { let url = if let Some(url) = url { url } else { - let active_env = context.config.get_active_env(); + let active_env = context.config().get_active_env(); if let Ok(env) = active_env { - let network = match env.rpc.as_str() { - IOTA_DEVNET_URL => "https://faucet.devnet.iota.io/v1/gas", - IOTA_TESTNET_URL => "https://faucet.testnet.iota.io/v1/gas", + let network = match env.rpc().as_str() { + IOTA_DEVNET_URL => "https://faucet.devnet.iota.cafe/v1/gas", + IOTA_TESTNET_URL => "https://faucet.testnet.iota.cafe/v1/gas", IOTA_LOCAL_NETWORK_URL | IOTA_LOCAL_NETWORK_URL_0 => { "http://127.0.0.1:9123/gas" } @@ -1564,17 +1618,17 @@ impl IotaClientCommands { if let Some(address) = address { let address = get_identity_address(Some(address), context)?; - if !context.config.keystore.addresses().contains(&address) { + if !context.config().keystore().addresses().contains(&address) { return Err(anyhow!("Address {} not managed by wallet", address)); } - context.config.active_address = Some(address); + context.config_mut().set_active_address(address); addr = Some(address.to_string()); } if let Some(ref env) = env { - Self::switch_env(&mut context.config, env)?; + Self::switch_env(context.config_mut(), env)?; } - context.config.save()?; + context.config().save()?; IotaClientCommandResult::Switch(SwitchResponse { address: addr, env }) } IotaClientCommands::ActiveAddress => { @@ -1626,30 +1680,32 @@ impl IotaClientCommands { ws, basic_auth, } => { - if context.config.envs.iter().any(|env| env.alias == alias) { + if context + .config() + .envs() + .iter() + .any(|env| env.alias() == &alias) + { return Err(anyhow!( "Environment config with name [{alias}] already exists." )); } - let env = IotaEnv { - alias, - rpc, - ws, - basic_auth, - }; + let env = IotaEnv::new(alias, rpc) + .with_ws(ws) + .with_basic_auth(basic_auth); // Check urls are valid and server is reachable env.create_rpc_client(None, None).await?; - context.config.envs.push(env.clone()); - context.config.save()?; + context.config_mut().add_env(env.clone()); + context.config().save()?; IotaClientCommandResult::NewEnv(env) } IotaClientCommands::ActiveEnv => { - IotaClientCommandResult::ActiveEnv(context.config.active_env.clone()) + IotaClientCommandResult::ActiveEnv(context.config().active_env().clone()) } IotaClientCommands::Envs => IotaClientCommandResult::Envs( - context.config.envs.clone(), - context.config.active_env.clone(), + context.config().envs().clone(), + context.config().active_env().clone(), ), IotaClientCommands::VerifySource { package_path, @@ -1707,7 +1763,7 @@ impl IotaClientCommands { config.get_env(&env).is_some(), "Environment config not found for [{env:?}], add new environment config using the `iota client new-env` command." ); - config.active_env = env; + config.set_active_env(env); Ok(()) } } @@ -2162,14 +2218,14 @@ impl Display for IotaClientCommandResult { write!(writer, "{}", env.as_deref().unwrap_or("None"))?; } IotaClientCommandResult::NewEnv(env) => { - writeln!(writer, "Added new Iota env [{}] to config.", env.alias)?; + writeln!(writer, "Added new Iota env [{}] to config.", env.alias())?; } IotaClientCommandResult::Envs(envs, active) => { let mut builder = TableBuilder::default(); builder.set_header(["alias", "url", "active"]); for env in envs { - builder.push_record(vec![env.alias.clone(), env.rpc.clone(), { - if Some(env.alias.as_str()) == active.as_deref() { + builder.push_record(vec![env.alias().clone(), env.rpc().clone(), { + if Some(env.alias().as_str()) == active.as_deref() { "*".to_string() } else { "".to_string() @@ -2918,7 +2974,7 @@ pub(crate) async fn dry_run_or_execute_or_serialize( tx_data, )) } else { - let signature = context.config.keystore.sign_secure( + let signature = context.config().keystore().sign_secure( &tx_data.sender(), &tx_data, Intent::iota_transaction(), @@ -2930,7 +2986,15 @@ pub(crate) async fn dry_run_or_execute_or_serialize( )) } else { let transaction = Transaction::new(sender_signed_data); - let mut response = context.execute_transaction_may_fail(transaction).await?; + let mut response = client + .quorum_driver_api() + .execute_transaction_block( + transaction, + opts_from_cli(opts.emit), + Some(ExecuteTransactionRequestType::WaitForLocalExecution), + ) + .await?; + if let Some(effects) = response.effects.as_mut() { prerender_clever_errors(effects, client.read_api()).await; } @@ -2959,3 +3023,42 @@ pub(crate) async fn prerender_clever_errors( } } } + +fn opts_from_cli(opts: HashSet) -> IotaTransactionBlockResponseOptions { + if opts.is_empty() { + IotaTransactionBlockResponseOptions::new() + .with_effects() + .with_input() + .with_events() + .with_object_changes() + .with_balance_changes() + } else { + IotaTransactionBlockResponseOptions { + show_input: opts.contains(&EmitOption::Input), + show_events: opts.contains(&EmitOption::Events), + show_object_changes: opts.contains(&EmitOption::ObjectChanges), + show_balance_changes: opts.contains(&EmitOption::BalanceChanges), + show_effects: true, + show_raw_effects: false, + show_raw_input: false, + } + } +} + +fn parse_emit_option(s: &str) -> Result, String> { + let mut options = HashSet::new(); + + // Split the input string by commas and try to parse each part + for part in s.split(',') { + let part = part.trim(); // Trim whitespace + match EmitOption::from_str(part) { + Ok(option) => { + options.insert(option); + } + Err(_) => return Err(format!("Invalid emit option: {}", part)), /* Return error if + * invalid */ + } + } + + Ok(options) +} diff --git a/crates/iota/src/client_ptb/ptb.rs b/crates/iota/src/client_ptb/ptb.rs index f82fbe70636..e179fd914a2 100644 --- a/crates/iota/src/client_ptb/ptb.rs +++ b/crates/iota/src/client_ptb/ptb.rs @@ -2,6 +2,8 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 +use std::collections::HashSet; + use anyhow::{Error, anyhow, ensure}; use clap::{Args, ValueHint, arg}; use iota_json_rpc_types::{IotaExecutionStatus, IotaTransactionBlockEffectsAPI}; @@ -136,8 +138,8 @@ impl PTB { .await .map_err(|_| anyhow!("Could not find owner for gas object ID"))?, None => context - .config - .active_address + .config() + .active_address() .ok_or_else(|| anyhow!("No active address, cannot execute PTB"))?, }; @@ -154,6 +156,7 @@ impl PTB { gas_budget: program_metadata.gas_budget.map(|x| x.value), serialize_unsigned_transaction: program_metadata.serialize_unsigned_set, serialize_signed_transaction: program_metadata.serialize_signed_set, + emit: HashSet::new(), }, }; @@ -225,8 +228,8 @@ impl PTB { Vec, ) { let starting_addresses = context - .config - .keystore + .config() + .keystore() .addresses_with_alias() .into_iter() .map(|(sa, alias)| (alias.alias.clone(), AccountAddress::from(*sa))) diff --git a/crates/iota/src/console.rs b/crates/iota/src/console.rs index e7781d58b23..990ed73a30c 100644 --- a/crates/iota/src/console.rs +++ b/crates/iota/src/console.rs @@ -49,7 +49,7 @@ pub async fn start_console( } writeln!(out, "--- IOTA Console {version} ---")?; writeln!(out)?; - writeln!(out, "{}", context.config.deref())?; + writeln!(out, "{}", context.config().deref())?; let client = context.get_client().await?; writeln!( diff --git a/crates/iota/src/displays/gas_cost_summary.rs b/crates/iota/src/displays/gas_cost_summary.rs index 42d0b5e25c5..8880db90553 100644 --- a/crates/iota/src/displays/gas_cost_summary.rs +++ b/crates/iota/src/displays/gas_cost_summary.rs @@ -13,14 +13,16 @@ impl<'a> Display for Pretty<'a, GasCostSummary> { let Pretty(gcs) = self; let GasCostSummary { computation_cost, + computation_cost_burned, storage_cost, storage_rebate, non_refundable_storage_fee, } = gcs; let output = format!( "Gas Cost Summary:\n \ - Storage Cost: {storage_cost}\n \ Computation Cost: {computation_cost}\n \ + Computation Cost Burned: {computation_cost_burned}\n \ + Storage Cost: {storage_cost}\n \ Storage Rebate: {storage_rebate}\n \ Non-refundable Storage Fee: {non_refundable_storage_fee}", ); diff --git a/crates/iota/src/genesis_inspector.rs b/crates/iota/src/genesis_inspector.rs index 5944e61ff8b..6cba3824f43 100644 --- a/crates/iota/src/genesis_inspector.rs +++ b/crates/iota/src/genesis_inspector.rs @@ -226,7 +226,6 @@ fn examine_object( for other_obj in other_object_map.values() { println!("{:#?}", other_obj.type_()); println!("{:?}", other_obj.version()); - println!("Has Public Transfer: {}\n", other_obj.has_public_transfer()); } print_divider("Other"); } diff --git a/crates/iota/src/iota_commands.rs b/crates/iota/src/iota_commands.rs index f7ea6d1ddc7..ea99709667a 100644 --- a/crates/iota/src/iota_commands.rs +++ b/crates/iota/src/iota_commands.rs @@ -535,7 +535,7 @@ impl IotaCommand { client_config.unwrap_or(iota_config_dir()?.join(IOTA_CLIENT_CONFIG)); let mut context = WalletContext::new(&config_path, None, None)?; let rgp = context.get_reference_gas_price().await?; - let rpc_url = &context.config.get_active_env()?.rpc; + let rpc_url = context.config().get_active_env()?.rpc(); println!("rpc_url: {}", rpc_url); let iota_bridge_client = IotaBridgeClient::new(rpc_url).await?; let bridge_arg = iota_bridge_client @@ -828,20 +828,13 @@ async fn start( let mut keystore = Keystore::from(FileBasedKeystore::new(&keystore_path).unwrap()); let address: IotaAddress = kp.public().into(); keystore.add_key(None, IotaKeyPair::Ed25519(kp)).unwrap(); - IotaClientConfig { - keystore, - envs: vec![IotaEnv { - alias: "localnet".to_string(), - rpc: fullnode_url, - ws: None, - basic_auth: None, - }], - active_address: Some(address), - active_env: Some("localnet".to_string()), - } - .persisted(config_dir.join(IOTA_CLIENT_CONFIG).as_path()) - .save() - .unwrap(); + IotaClientConfig::new(keystore) + .with_envs([IotaEnv::new("localnet", fullnode_url)]) + .with_active_address(address) + .with_active_env("localnet".to_string()) + .persisted(config_dir.join(IOTA_CLIENT_CONFIG).as_path()) + .save() + .unwrap(); } let faucet_wal = config_dir.join("faucet.wal"); let simple_faucet = SimpleFaucet::new( @@ -1117,11 +1110,11 @@ async fn genesis( let mut client_config = if client_path.exists() { PersistedConfig::read(&client_path)? } else { - IotaClientConfig::new(keystore.into()) + IotaClientConfig::new(keystore) }; - if client_config.active_address.is_none() { - client_config.active_address = active_address; + if client_config.active_address().is_none() { + client_config.set_active_address(active_address); } // On windows, using 0.0.0.0 will usually yield in an networking error. This @@ -1133,20 +1126,18 @@ async fn genesis( } else { fullnode_config.json_rpc_address.ip().to_string() }; - client_config.add_env(IotaEnv { - alias: "localnet".to_string(), - rpc: format!( + client_config.add_env(IotaEnv::new( + "localnet", + format!( "http://{}:{}", localnet_ip, fullnode_config.json_rpc_address.port() ), - ws: None, - basic_auth: None, - }); + )); client_config.add_env(IotaEnv::devnet()); - if client_config.active_env.is_none() { - client_config.active_env = client_config.envs.first().map(|env| env.alias.clone()); + if client_config.active_env().is_none() { + client_config.set_active_env(client_config.envs().first().map(|env| env.alias().clone())); } client_config.save(&client_path)?; @@ -1162,12 +1153,7 @@ async fn prompt_if_no_config( // Prompt user for connect to devnet fullnode if config does not exist. if !wallet_conf_path.exists() { let env = match std::env::var_os("IOTA_CONFIG_WITH_RPC_URL") { - Some(v) => Some(IotaEnv { - alias: "custom".to_string(), - rpc: v.into_string().unwrap(), - ws: None, - basic_auth: None, - }), + Some(v) => Some(IotaEnv::new("custom", v.into_string().unwrap())), None => { if accept_defaults { print!( @@ -1201,12 +1187,7 @@ async fn prompt_if_no_config( } else { alias }; - IotaEnv { - alias, - rpc: url, - ws: None, - basic_auth: None, - } + IotaEnv::new(alias, url) }) } else { None @@ -1239,15 +1220,13 @@ async fn prompt_if_no_config( scheme.to_string() ); println!("Secret Recovery Phrase : [{phrase}]"); - let alias = env.alias.clone(); - IotaClientConfig { - keystore, - envs: vec![env], - active_address: Some(new_address), - active_env: Some(alias), - } - .persisted(wallet_conf_path) - .save()?; + let alias = env.alias().clone(); + IotaClientConfig::new(keystore) + .with_envs([env]) + .with_active_address(new_address) + .with_active_env(alias) + .persisted(wallet_conf_path) + .save()?; } } Ok(()) diff --git a/crates/iota/src/key_identity.rs b/crates/iota/src/key_identity.rs index daeed5e5457..eca7cff6d3f 100644 --- a/crates/iota/src/key_identity.rs +++ b/crates/iota/src/key_identity.rs @@ -47,7 +47,7 @@ pub fn get_identity_address( ctx: &mut WalletContext, ) -> Result { if let Some(addr) = input { - get_identity_address_from_keystore(addr, &ctx.config.keystore) + get_identity_address_from_keystore(addr, ctx.config().keystore()) } else { Ok(ctx.active_address()?) } diff --git a/crates/iota/src/keytool.rs b/crates/iota/src/keytool.rs index 4d6dea3c898..246848e4c10 100644 --- a/crates/iota/src/keytool.rs +++ b/crates/iota/src/keytool.rs @@ -605,14 +605,14 @@ impl KeyToolCommand { )); } keystore.import_from_seed(&seed, key_scheme, derivation_path, alias)? - }, + } Err(_) => { info!("Importing mnemonic to keystore"); keystore.import_from_mnemonic( &input_string, key_scheme, derivation_path, - alias + alias, )? } }; @@ -621,7 +621,7 @@ impl KeyToolCommand { let key = Key::from(ikp); CommandOutput::Import(key) } - } + }, KeyToolCommand::Export { key_identity } => { let address = get_identity_address_from_keystore(key_identity, keystore)?; let ikp = keystore.get_key(&address)?; @@ -798,8 +798,7 @@ impl KeyToolCommand { CommandOutput::SignKMS(SerializedSig { serialized_sig_base64: serialized_sig, }) - } - /* Commented for now: https://github.com/iotaledger/iota/issues/1777 + } /* Commented for now: https://github.com/iotaledger/iota/issues/1777 * KeyToolCommand::ZkLoginInsecureSignPersonalMessage { data, max_epoch } => { * let msg = PersonalMessage { * message: data.as_bytes().to_vec(), @@ -1106,10 +1105,10 @@ impl KeyToolCommand { * e))?, )?; */ /* let sig = - * GenericSignature::ZkLoginAuthenticator(zk.clone()); - * let res = sig.verify_authenticator( - * &IntentMessage::new( - * Intent::iota_transaction(), + * GenericSignature::ZkLoginAuthenticator(zk.clone()); + * let res = sig.verify_authenticator( + * &IntentMessage::new( + * Intent::iota_transaction(), * tx_data.clone(), ), * tx_data.execution_parts().1, * cur_epoch.unwrap(), @@ -1126,8 +1125,8 @@ impl KeyToolCommand { * }; */ /* let sig = - * GenericSignature::ZkLoginAuthenticator(zk.clone()); - * let res = sig.verify_authenticator( + * GenericSignature::ZkLoginAuthenticator(zk.clone()); + * let res = sig.verify_authenticator( * &IntentMessage::new(Intent::personal_message(), data.clone()), * (&zk).try_into()?, * cur_epoch.unwrap(), diff --git a/crates/iota/src/unit_tests/profiler_tests.rs b/crates/iota/src/unit_tests/profiler_tests.rs index 75730d1762b..f9b6aadf208 100644 --- a/crates/iota/src/unit_tests/profiler_tests.rs +++ b/crates/iota/src/unit_tests/profiler_tests.rs @@ -48,7 +48,7 @@ async fn test_profiler() { let output_dir = tempdir().unwrap(); let profile_output = output_dir.path().join("profile.json"); - let testnet_url = "https://fullnode.testnet.iota.io:443".to_string(); + let testnet_url = "https://api.testnet.iota.cafe".to_string(); let tx_digest = "98KxVD14f2JgceKx4X27HaVAA2YGJ3Aazf6Y4tabpHa8".to_string(); let cmd = ReplayToolCommand::ProfileTransaction { diff --git a/crates/iota/src/validator_commands.rs b/crates/iota/src/validator_commands.rs index 536892299f2..d08eca9eced 100644 --- a/crates/iota/src/validator_commands.rs +++ b/crates/iota/src/validator_commands.rs @@ -305,7 +305,7 @@ impl IotaValidatorCommand { } => { let dir = std::env::current_dir()?; let authority_key_file_name = dir.join("authority.key"); - let account_key = match context.config.keystore.get_key(&iota_address)? { + let account_key = match context.config().keystore().get_key(&iota_address)? { IotaKeyPair::Ed25519(account_key) => IotaKeyPair::Ed25519(account_key.copy()), _ => panic!( "Other account key types supported yet, please use Ed25519 keys for now." @@ -565,7 +565,7 @@ impl IotaValidatorCommand { "Starting bridge committee registration for Iota validator: {address}, with bridge public key: {} and url: {}", ecdsa_keypair.public, bridge_authority_url ); - let iota_rpc_url = &context.config.get_active_env().unwrap().rpc; + let iota_rpc_url = context.config().get_active_env().unwrap().rpc(); let bridge_client = IotaBridgeClient::new(iota_rpc_url).await?; let bridge = bridge_client .get_mutable_bridge_object_arg_must_succeed() @@ -626,7 +626,7 @@ impl IotaValidatorCommand { validator_address, print_unsigned_transaction_only, )?; - let iota_rpc_url = &context.config.get_active_env().unwrap().rpc; + let iota_rpc_url = context.config().get_active_env().unwrap().rpc(); let bridge_client = IotaBridgeClient::new(iota_rpc_url).await?; let committee_members = bridge_client .get_bridge_summary() @@ -927,8 +927,8 @@ async fn call_0x5( construct_unsigned_0x5_txn(context, sender, function, call_args, gas_budget).await?; let signature = context - .config - .keystore + .config() + .keystore() .sign_secure(&sender, &tx_data, Intent::iota_transaction())?; let transaction = Transaction::from_data(tx_data, vec![signature]); let iota_client = context.get_client().await?; diff --git a/crates/iota/tests/cli_tests.rs b/crates/iota/tests/cli_tests.rs index a82107f46c5..f9fe7dac8e1 100644 --- a/crates/iota/tests/cli_tests.rs +++ b/crates/iota/tests/cli_tests.rs @@ -9,8 +9,15 @@ use std::os::windows::fs::FileExt; #[cfg(not(msim))] use std::str::FromStr; use std::{ - collections::BTreeSet, env, fmt::Write, fs::read_dir, io::Read, net::SocketAddr, path::PathBuf, - str, thread, time::Duration, + collections::{BTreeSet, HashSet}, + env, + fmt::Write, + fs::read_dir, + io::Read, + net::SocketAddr, + path::PathBuf, + str, thread, + time::Duration, }; use expect_test::expect; @@ -18,7 +25,7 @@ use expect_test::expect; use iota::iota_commands::IndexerFeatureArgs; use iota::{ client_commands::{ - IotaClientCommandResult, IotaClientCommands, Opts, OptsWithGas, SwitchResponse, + EmitOption, IotaClientCommandResult, IotaClientCommands, Opts, OptsWithGas, SwitchResponse, estimate_gas_budget, }, client_ptb::ptb::PTB, @@ -110,9 +117,9 @@ async fn test_genesis() -> Result<(), anyhow::Error> { let wallet_conf = PersistedConfig::::read(&working_dir.join(IOTA_CLIENT_CONFIG))?; - assert!(!wallet_conf.envs.is_empty()); + assert!(!wallet_conf.envs().is_empty()); - assert_eq!(5, wallet_conf.keystore.addresses().len()); + assert_eq!(5, wallet_conf.keystore().addresses().len()); // Genesis 2nd time should fail let result = IotaCommand::Genesis { @@ -183,9 +190,9 @@ async fn test_start() -> Result<(), anyhow::Error> { let wallet_conf = PersistedConfig::::read(&working_dir.join(IOTA_CLIENT_CONFIG))?; - assert!(!wallet_conf.envs.is_empty()); + assert!(!wallet_conf.envs().is_empty()); - assert_eq!(5, wallet_conf.keystore.addresses().len()); + assert_eq!(5, wallet_conf.keystore().addresses().len()); temp_dir.close()?; Ok(()) @@ -199,8 +206,8 @@ async fn test_addresses_command() -> Result<(), anyhow::Error> { // Add 3 accounts for _ in 0..3 { context - .config - .keystore + .config_mut() + .keystore_mut() .add_key(None, IotaKeyPair::Ed25519(get_key_pair().1))?; } @@ -222,8 +229,8 @@ async fn test_objects_command() -> Result<(), anyhow::Error> { let address = test_cluster.get_address_0(); let context = &mut test_cluster.wallet; let alias = context - .config - .keystore + .config() + .keystore() .get_alias_by_address(&address) .unwrap(); // Print objects owned by `address` @@ -460,7 +467,7 @@ async fn test_custom_genesis() -> Result<(), anyhow::Error> { let address = cluster.get_address_0(); let context = cluster.wallet_mut(); - assert_eq!(1, context.config.keystore.addresses().len()); + assert_eq!(1, context.config().keystore().addresses().len()); // Print objects owned by `address` IotaClientCommands::Objects { @@ -523,8 +530,8 @@ async fn test_gas_command() -> Result<(), anyhow::Error> { let address = test_cluster.get_address_0(); let context = &mut test_cluster.wallet; let alias = context - .config - .keystore + .config() + .keystore() .get_alias_by_address(&address) .unwrap(); @@ -2113,6 +2120,10 @@ async fn test_package_management_on_upgrade_command_conflict() -> Result<(), any // Purposely add a conflicting `published-at` address to the Move manifest. lines.insert(idx + 1, "published-at = \"0xbad\"".to_string()); let new = lines.join("\n"); + + #[cfg(target_os = "windows")] + move_toml.seek_write(new.as_bytes(), 0).unwrap(); + #[cfg(not(target_os = "windows"))] move_toml.write_at(new.as_bytes(), 0).unwrap(); // Create a new build config for the upgrade. Initialize its lock file to the @@ -2400,7 +2411,7 @@ async fn test_switch_command() -> Result<(), anyhow::Error> { ); // Wipe all the address info - context.config.active_address = None; + context.config_mut().set_active_address(None); // Create a new address let os = IotaClientCommands::NewAddress { @@ -2447,8 +2458,8 @@ async fn test_new_address_command_by_flag() -> Result<(), anyhow::Error> { // keypairs loaded from config are Ed25519 assert_eq!( context - .config - .keystore + .config() + .keystore() .keys() .iter() .filter(|k| k.flag() == Ed25519IotaSignature::SCHEME.flag()) @@ -2468,8 +2479,8 @@ async fn test_new_address_command_by_flag() -> Result<(), anyhow::Error> { // new keypair generated is Secp256k1 assert_eq!( context - .config - .keystore + .config() + .keystore() .keys() .iter() .filter(|k| k.flag() == Secp256k1IotaSignature::SCHEME.flag()) @@ -2500,7 +2511,13 @@ async fn test_active_address_command() -> Result<(), anyhow::Error> { }; assert_eq!(a, addr1); - let addr2 = context.config.keystore.addresses().get(1).cloned().unwrap(); + let addr2 = context + .config() + .keystore() + .addresses() + .get(1) + .cloned() + .unwrap(); let resp = IotaClientCommands::Switch { address: Some(KeyIdentity::Address(addr2)), env: None, @@ -2520,8 +2537,8 @@ async fn test_active_address_command() -> Result<(), anyhow::Error> { // switch back to addr1 by using its alias let alias1 = context - .config - .keystore + .config() + .keystore() .get_alias_by_address(&addr1) .unwrap(); let resp = IotaClientCommands::Switch { @@ -2934,8 +2951,8 @@ async fn test_serialize_tx() -> Result<(), anyhow::Error> { let address1 = test_cluster.get_address_1(); let context = &mut test_cluster.wallet; let alias1 = context - .config - .keystore + .config() + .keystore() .get_alias_by_address(&address1) .unwrap(); let client = context.get_client().await?; @@ -2965,6 +2982,7 @@ async fn test_serialize_tx() -> Result<(), anyhow::Error> { dry_run: false, serialize_unsigned_transaction: true, serialize_signed_transaction: false, + emit: HashSet::new(), }, } .execute(context) @@ -2979,6 +2997,7 @@ async fn test_serialize_tx() -> Result<(), anyhow::Error> { dry_run: false, serialize_unsigned_transaction: false, serialize_signed_transaction: true, + emit: HashSet::new(), }, } .execute(context) @@ -2994,6 +3013,7 @@ async fn test_serialize_tx() -> Result<(), anyhow::Error> { dry_run: false, serialize_unsigned_transaction: false, serialize_signed_transaction: true, + emit: HashSet::new(), }, } .execute(context) @@ -3247,8 +3267,8 @@ async fn key_identity_test() { let address = test_cluster.get_address_0(); let context = &mut test_cluster.wallet; let alias = context - .config - .keystore + .config() + .keystore() .get_alias_by_address(&address) .unwrap(); @@ -3845,6 +3865,7 @@ async fn test_gas_estimation() -> Result<(), anyhow::Error> { dry_run: false, serialize_unsigned_transaction: false, serialize_signed_transaction: false, + emit: HashSet::new(), }, } .execute(context) @@ -4240,3 +4261,152 @@ async fn test_move_new() -> Result<(), anyhow::Error> { std::fs::remove_dir_all(package_name)?; Ok(()) } + +#[sim_test] +async fn test_call_command_emit_args() -> Result<(), anyhow::Error> { + // Publish the package + move_package::package_hooks::register_package_hooks(Box::new(IotaPackageHooks)); + let mut test_cluster = TestClusterBuilder::new().build().await; + let rgp = test_cluster.get_reference_gas_price().await; + let address = test_cluster.get_address_0(); + let context = &mut test_cluster.wallet; + let client = context.get_client().await?; + let object_refs = client + .read_api() + .get_owned_objects( + address, + Some(IotaObjectResponseQuery::new_with_options( + IotaObjectDataOptions::new() + .with_type() + .with_owner() + .with_previous_transaction(), + )), + None, + None, + ) + .await? + .data; + + let gas_obj_id = object_refs.first().unwrap().object().unwrap().object_id; + + // Provide path to well formed package sources + let mut package_path = PathBuf::from(TEST_DATA_DIR); + package_path.push("dummy_modules_upgrade"); + let build_config = BuildConfig::new_for_testing().config; + let resp = IotaClientCommands::Publish { + package_path: package_path.clone(), + build_config, + skip_dependency_verification: false, + with_unpublished_dependencies: false, + opts: OptsWithGas::for_testing(Some(gas_obj_id), rgp * TEST_ONLY_GAS_UNIT_FOR_PUBLISH), + } + .execute(context) + .await?; + + let effects = match resp { + IotaClientCommandResult::TransactionBlock(response) => response.effects.unwrap(), + _ => panic!("Expected TransactionBlock response"), + }; + + let package = effects + .created() + .iter() + .find(|refe| matches!(refe.owner, Owner::Immutable)) + .unwrap(); + + let start_call_result = IotaClientCommands::Call { + package: package.reference.object_id, + module: "trusted_coin".to_string(), + function: "f".to_string(), + type_args: vec![], + gas_price: None, + args: vec![], + opts: OptsWithGas::for_testing_emit_options( + None, + rgp * TEST_ONLY_GAS_UNIT_FOR_PUBLISH, + HashSet::from([EmitOption::BalanceChanges]), + ), + } + .execute(context) + .await?; + + if let Some(tx_block_response) = start_call_result.tx_block_response() { + // Assert Balance Changes are present in the response + assert!(tx_block_response.balance_changes.is_some()); + // effects are always in the response + assert!(tx_block_response.effects.is_some()); + + // Assert every other field is not present in the response + assert!(tx_block_response.object_changes.is_none()); + assert!(tx_block_response.events.is_none()); + assert!(tx_block_response.transaction.is_none()); + } else { + panic!("Transaction block response is None"); + } + + // Make another call, this time with multiple emit args + let start_call_result = IotaClientCommands::Call { + package: package.reference.object_id, + module: "trusted_coin".to_string(), + function: "f".to_string(), + type_args: vec![], + gas_price: None, + args: vec![], + opts: OptsWithGas::for_testing_emit_options( + None, + rgp * TEST_ONLY_GAS_UNIT_FOR_PUBLISH, + HashSet::from([ + EmitOption::BalanceChanges, + EmitOption::Effects, + EmitOption::ObjectChanges, + ]), + ), + } + .execute(context) + .await?; + + start_call_result.print(true); + + // Assert Balance Changes, effects and object changes are present in the + // response + if let Some(tx_block_response) = start_call_result.tx_block_response() { + assert!(tx_block_response.balance_changes.is_some()); + assert!(tx_block_response.effects.is_some()); + assert!(tx_block_response.object_changes.is_some()); + assert!(tx_block_response.events.is_none()); + assert!(tx_block_response.transaction.is_none()); + } else { + panic!("Transaction block response is None"); + } + + // Make another call, this time with no emit args. This should return the full + // response + let start_call_result = IotaClientCommands::Call { + package: package.reference.object_id, + module: "trusted_coin".to_string(), + function: "f".to_string(), + type_args: vec![], + gas_price: None, + args: vec![], + opts: OptsWithGas::for_testing_emit_options( + None, + rgp * TEST_ONLY_GAS_UNIT_FOR_PUBLISH, + HashSet::new(), + ), + } + .execute(context) + .await?; + + // Assert all fields are present in the response + if let Some(tx_block_response) = start_call_result.tx_block_response() { + assert!(tx_block_response.balance_changes.is_some()); + assert!(tx_block_response.effects.is_some()); + assert!(tx_block_response.object_changes.is_some()); + assert!(tx_block_response.events.is_some()); + assert!(tx_block_response.transaction.is_some()); + } else { + panic!("Transaction block response is None"); + } + + Ok(()) +} diff --git a/crates/test-cluster/src/lib.rs b/crates/test-cluster/src/lib.rs index 3dec57c6f1b..82173c02135 100644 --- a/crates/test-cluster/src/lib.rs +++ b/crates/test-cluster/src/lib.rs @@ -1363,13 +1363,8 @@ impl TestClusterBuilder { let fullnode_handle = FullNodeHandle::new(fullnode.get_node_handle().unwrap(), json_rpc_address).await; - wallet_conf.envs.push(IotaEnv { - alias: "localnet".to_string(), - rpc: fullnode_handle.rpc_url.clone(), - ws: None, - basic_auth: None, - }); - wallet_conf.active_env = Some("localnet".to_string()); + wallet_conf.add_env(IotaEnv::new("localnet", fullnode_handle.rpc_url.clone())); + wallet_conf.set_active_env(Some("localnet".to_string())); wallet_conf .persisted(&working_dir.join(IOTA_CLIENT_CONFIG)) @@ -1662,13 +1657,9 @@ impl TestClusterBuilder { let active_address = keystore.addresses().first().cloned(); // Create wallet config with stated authorities port - IotaClientConfig { - keystore: Keystore::from(FileBasedKeystore::new(&keystore_path)?), - envs: Default::default(), - active_address, - active_env: Default::default(), - } - .save(wallet_path)?; + IotaClientConfig::new(FileBasedKeystore::new(&keystore_path)?) + .with_active_address(active_address) + .save(wallet_path)?; // Return network handle Ok(swarm) diff --git a/crates/transaction-fuzzer/src/account_universe/transfer_gen.rs b/crates/transaction-fuzzer/src/account_universe/transfer_gen.rs index 7bdeb9adfdc..131a55443e5 100644 --- a/crates/transaction-fuzzer/src/account_universe/transfer_gen.rs +++ b/crates/transaction-fuzzer/src/account_universe/transfer_gen.rs @@ -29,8 +29,8 @@ use crate::{ const GAS_UNIT_PRICE: u64 = 2; const DEFAULT_TRANSFER_AMOUNT: u64 = 1; const P2P_COMPUTE_GAS_USAGE: u64 = 1000; -const P2P_SUCCESS_STORAGE_USAGE: u64 = 1976000; -const P2P_FAILURE_STORAGE_USAGE: u64 = 988000; +const P2P_SUCCESS_STORAGE_USAGE: u64 = 1976000 - 15200; // this needs to be adapted if the size of objects changes +const P2P_FAILURE_STORAGE_USAGE: u64 = 988000 - 7600; // this needs to be adapted if the size of objects change const INSUFFICIENT_GAS_UNITS_THRESHOLD: u64 = 2; static PROTOCOL_CONFIG: Lazy = diff --git a/crates/transaction-fuzzer/tests/p2p_fuzz.proptest-regressions b/crates/transaction-fuzzer/tests/p2p_fuzz.proptest-regressions deleted file mode 100644 index 26be6e94fab..00000000000 --- a/crates/transaction-fuzzer/tests/p2p_fuzz.proptest-regressions +++ /dev/null @@ -1,9 +0,0 @@ -# Seeds for failure cases proptest has generated in the past. It is -# automatically read and these particular cases re-run before any -# novel cases are generated. -# -# It is recommended to check this file in to source control so that -# everyone who runs the test benefits from these saved cases. -cc 08bdb8404ce8b505f7094f1bb90bb711a69f090c486fab8fa23e14e72444bac9 # shrinks to universe = AccountUniverseGen { accounts: [AccountData { account: Account { address: 0x4e00ad66b64f0d1cb9e336dd3d6367a2f427ad95af643f2ec91ff2474f49f43b, key: Ed25519KeyPair { public: NcbyqS0716uTVZl1edU5OBU74qx8iTs/ihgOOIsb7qw=, private: } }, coins: [Object { data: Move(MoveObject { type_: MoveObjectType(GasCoin), has_public_transfer: true, version: SequenceNumber(1), contents: [116, 135, 23, 129, 8, 219, 229, 98, 220, 54, 141, 130, 57, 227, 205, 50, 164, 123, 72, 14, 68, 66, 193, 111, 161, 234, 234, 14, 178, 1, 84, 201, 64, 66, 15, 0, 0, 0, 0, 0] }), owner: AddressOwner(0x4e00ad66b64f0d1cb9e336dd3d6367a2f427ad95af643f2ec91ff2474f49f43b), previous_transaction: TransactionDigest(11111111111111111111111111111111), storage_rebate: 0 }], initial_balances: [1000000], balance_creation_amt: 1000000 }, AccountData { account: Account { address: 0x980a0c3e02b8f503131cf6b7972e204488a9ebf822292276851f6e17a8efb19e, key: Ed25519KeyPair { public: X3v00XKA98DcN66xzSYwWHuRi50+y144VUxMmkxYOko=, private: } }, coins: [Object { data: Move(MoveObject { type_: MoveObjectType(GasCoin), has_public_transfer: true, version: SequenceNumber(1), contents: [232, 191, 41, 244, 81, 202, 162, 130, 7, 150, 17, 85, 198, 212, 18, 234, 191, 167, 162, 182, 207, 134, 59, 181, 49, 42, 214, 135, 248, 161, 225, 248, 64, 66, 15, 0, 0, 0, 0, 0] }), owner: AddressOwner(0x980a0c3e02b8f503131cf6b7972e204488a9ebf822292276851f6e17a8efb19e), previous_transaction: TransactionDigest(11111111111111111111111111111111), storage_rebate: 0 }], initial_balances: [1000000], balance_creation_amt: 1000000 }], pick_style: Unlimited }, transfers = [P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(18288145114072499620)), Index(Index(5212807000446992808))], reverse: true }, amount: 5797269, gas: 49999999999, gas_price: 100001 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(2182774797876979154)), Index(Index(18118046312446203829))], reverse: true }, amount: 34053315, gas: 50000000001, gas_price: 99999 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(12724724746027467463)), Index(Index(2639544393043659734))], reverse: true }, amount: 81759758, gas: 18446744073709551615, gas_price: 0 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(6903438638779216032)), Index(Index(5706255863129732732))], reverse: true }, amount: 6350680, gas: 2682409, gas_price: 100000 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(1486571054784756724)), Index(Index(4737890739911649601))], reverse: true }, amount: 79998820, gas: 18446744073709551614, gas_price: 99999 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(17553673241964777484)), Index(Index(6373055354758281867))], reverse: true }, amount: 13171138, gas: 18446744073709551615, gas_price: 18446744071733550 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(7108078328225857749)), Index(Index(10241435462368313418))], reverse: true }, amount: 71679498, gas: 18446744073709551614, gas_price: 0 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(2116930997392421083)), Index(Index(3745702001071475207))], reverse: true }, amount: 91211981, gas: 49999999999, gas_price: 0 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(14360474896797313330)), Index(Index(17910060345219620754))], reverse: true }, amount: 24115629, gas: 49999999999, gas_price: 99999 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(7474716198892511211)), Index(Index(11019222129342160552))], reverse: false }, amount: 8181239, gas: 18446744073709551614, gas_price: 100001 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(6089512887553974181)), Index(Index(13843820755338290859))], reverse: true }, amount: 14182418, gas: 2000, gas_price: 0 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(9086950498511134835)), Index(Index(7530500219497385122))], reverse: true }, amount: 58291730, gas: 50000000001, gas_price: 0 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(8059680131886843479)), Index(Index(8193936568123332916))], reverse: false }, amount: 30909750, gas: 2000, gas_price: 2136 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(117207751552774649)), Index(Index(17143506027733118828))], reverse: false }, amount: 48335535, gas: 2001, gas_price: 1067 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(11239624597663591715)), Index(Index(7858506235246722929))], reverse: false }, amount: 30372840, gas: 18446744073709551615, gas_price: 18446744071733551 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(2366456936215081780)), Index(Index(6893709264161195103))], reverse: true }, amount: 57739982, gas: 50000000001, gas_price: 18446744071733551 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(9264128121271264070)), Index(Index(9091443161382129098))], reverse: true }, amount: 65793438, gas: 49999999999, gas_price: 100001 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(7384998357000590790)), Index(Index(9227401841641566148))], reverse: true }, amount: 79063572, gas: 1999, gas_price: 100001 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(18040229937695860906)), Index(Index(15523056308504259118))], reverse: false }, amount: 12114211, gas: 0, gas_price: 18446744071733550 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(12919421580063897735)), Index(Index(6321895867789132359))], reverse: false }, amount: 48707646, gas: 50000000000, gas_price: 99999 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(12208316459268382449)), Index(Index(7515501851841231927))], reverse: true }, amount: 22459557, gas: 18446744073709551614, gas_price: 4088 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(12630883974489325698)), Index(Index(810663632597529177))], reverse: true }, amount: 37751158, gas: 0, gas_price: 0 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(11077358947069392194)), Index(Index(4122488414703574891))], reverse: false }, amount: 79098944, gas: 2000, gas_price: 99999 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(17540302116049708243)), Index(Index(13847224512649520486))], reverse: true }, amount: 27777613, gas: 0, gas_price: 0 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(6340904059156029769)), Index(Index(13889907817659378970))], reverse: true }, amount: 64844805, gas: 50000000000, gas_price: 100000 }] -cc a53514f7cd6910e28f28dd6d1cca9fe9316a688409ca5ca0a3651b9c7c9a46ad # shrinks to universe = AccountUniverseGen { accounts: [AccountData { account: Account { address: 0x520bbb67ce1225958f5628480db07bcc545b5f23143d7f24871e7174906d2109, key: Ed25519KeyPair { public: XjAicW7IQl9lxyaoxFwVaK0aMK7AH9P71Xl3ZZJvyIw=, private: } }, coins: [Object { data: Move(MoveObject { type_: MoveObjectType(GasCoin), has_public_transfer: true, version: SequenceNumber(1), contents: [64, 141, 116, 85, 40, 221, 91, 120, 229, 94, 53, 39, 173, 42, 57, 146, 204, 99, 236, 184, 201, 70, 165, 244, 236, 167, 26, 89, 152, 65, 161, 130, 64, 66, 15, 0, 0, 0, 0, 0] }), owner: AddressOwner(0x520bbb67ce1225958f5628480db07bcc545b5f23143d7f24871e7174906d2109), previous_transaction: TransactionDigest(11111111111111111111111111111111), storage_rebate: 0 }], initial_balances: [1000000], balance_creation_amt: 1000000 }, AccountData { account: Account { address: 0x813e3f00a08cf60dd0d1a6f2acedf7c90ce00c0962156310279b82d1d95d9147, key: Ed25519KeyPair { public: mt0kPLWKTqzgg8WqsbqHhDrpzGnsi9LwnICvmktSZOo=, private: } }, coins: [Object { data: Move(MoveObject { type_: MoveObjectType(GasCoin), has_public_transfer: true, version: SequenceNumber(1), contents: [16, 145, 90, 227, 205, 104, 86, 180, 163, 87, 43, 181, 231, 16, 147, 161, 226, 105, 11, 173, 48, 10, 135, 228, 79, 219, 48, 98, 126, 22, 102, 215, 64, 66, 15, 0, 0, 0, 0, 0] }), owner: AddressOwner(0x813e3f00a08cf60dd0d1a6f2acedf7c90ce00c0962156310279b82d1d95d9147), previous_transaction: TransactionDigest(11111111111111111111111111111111), storage_rebate: 0 }], initial_balances: [1000000], balance_creation_amt: 1000000 }], pick_style: Unlimited }, transfers = [P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(227577)), Index(Index(1177286761574244893))], reverse: false }, amount: 68227073, gas: 2000, gas_price: 888 }] -cc 495f1fe6cd26c21c0318d0e766a855e7fc33afb8421db98ce5a40d371d631839 # shrinks to universe = AccountUniverseGen { accounts: [AccountData { account: Account { address: 0xf21af185f75a03f03ecd906b0f2a7cad604cb32de490e2f50fea182f3deb6108, key: Ed25519KeyPair { public: 9ooNmlSBVJRQZS0PBMnTfJjychjeuu85kYRxVSxJDh8=, private: } }, coins: [Object { data: Move(MoveObject { type_: MoveObjectType(GasCoin), has_public_transfer: true, version: SequenceNumber(1), contents: [57, 47, 69, 2, 1, 66, 116, 28, 195, 172, 138, 133, 180, 40, 104, 5, 119, 147, 219, 87, 39, 15, 214, 78, 98, 243, 196, 188, 33, 200, 31, 66, 64, 66, 15, 0, 0, 0, 0, 0] }), owner: AddressOwner(0xf21af185f75a03f03ecd906b0f2a7cad604cb32de490e2f50fea182f3deb6108), previous_transaction: TransactionDigest(11111111111111111111111111111111), storage_rebate: 0 }], initial_balances: [1000000], balance_creation_amt: 1000000 }, AccountData { account: Account { address: 0xf94a7f6ec1b384b32e2361353a2215eba3046885bd1674b06426c468860f4492, key: Ed25519KeyPair { public: +dD+Ri4/bg145lbuGDqMiRDudRhppr/ftFT5v7ebDto=, private: } }, coins: [Object { data: Move(MoveObject { type_: MoveObjectType(GasCoin), has_public_transfer: true, version: SequenceNumber(1), contents: [115, 84, 127, 169, 32, 70, 30, 240, 44, 37, 85, 135, 235, 142, 213, 29, 13, 119, 87, 205, 4, 218, 93, 75, 239, 78, 15, 24, 251, 96, 251, 117, 64, 66, 15, 0, 0, 0, 0, 0] }), owner: AddressOwner(0xf94a7f6ec1b384b32e2361353a2215eba3046885bd1674b06426c468860f4492), previous_transaction: TransactionDigest(11111111111111111111111111111111), storage_rebate: 0 }], initial_balances: [1000000], balance_creation_amt: 1000000 }], pick_style: Unlimited }, transfers = [P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(11781642489757076303)), Index(Index(13580085620373863335))], reverse: false }, amount: 13842030, gas: 0, gas_price: 99999 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(13874411716608956343)), Index(Index(486076164956030544))], reverse: false }, amount: 43362754, gas: 0, gas_price: 18446744071733550 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(11956662368574930625)), Index(Index(12813799971937742012))], reverse: false }, amount: 15081852, gas: 50000000001, gas_price: 2608 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(12592397322832489539)), Index(Index(18199329608344979589))], reverse: true }, amount: 8829040, gas: 0, gas_price: 99999 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(15807865316481808984)), Index(Index(3304449601051703537))], reverse: true }, amount: 24928423, gas: 1999, gas_price: 100001 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(11275160199802700524)), Index(Index(10722119126160981925))], reverse: true }, amount: 37210224, gas: 18446744073709551615, gas_price: 2167 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(14284248308001867610)), Index(Index(16818347462135808514))], reverse: true }, amount: 18870095, gas: 18446744073709551614, gas_price: 0 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(2808811661835874419)), Index(Index(2099300973952656686))], reverse: true }, amount: 57675797, gas: 0, gas_price: 100001 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(10822263208773546022)), Index(Index(5679410067374125193))], reverse: false }, amount: 16598091, gas: 2000, gas_price: 100001 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(3568035422108054561)), Index(Index(16714228036914814242))], reverse: false }, amount: 31739183, gas: 1697375, gas_price: 100000 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(8327325512773073780)), Index(Index(9823761949974619173))], reverse: false }, amount: 89758329, gas: 18446744073709551615, gas_price: 18446744071733551 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(12692561843181928160)), Index(Index(88772725453882005))], reverse: true }, amount: 36019614, gas: 1999, gas_price: 99999 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(2978988655000394855)), Index(Index(17451151025724596640))], reverse: false }, amount: 32800055, gas: 50000000000, gas_price: 18446744071733550 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(15097573372194065531)), Index(Index(16875143549523339976))], reverse: true }, amount: 50883503, gas: 18446744073709551614, gas_price: 588 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(16383786234718038672)), Index(Index(2683638568002300817))], reverse: true }, amount: 59031829, gas: 0, gas_price: 4691 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(12002830663853047437)), Index(Index(11643593263912374696))], reverse: false }, amount: 45872060, gas: 1999, gas_price: 3572 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(11063051103812160956)), Index(Index(2975621676637172629))], reverse: false }, amount: 6382882, gas: 49999999999, gas_price: 18446744071733551 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(10188218973691825014)), Index(Index(3586372881300142967))], reverse: true }, amount: 60915996, gas: 2001, gas_price: 100000 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(3404792176268814150)), Index(Index(5574009025926990150))], reverse: true }, amount: 66566081, gas: 50000000001, gas_price: 0 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(16793528402671529428)), Index(Index(11206880130786982694))], reverse: false }, amount: 60013796, gas: 2001, gas_price: 1496 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(11556772702320087302)), Index(Index(8741768899400628990))], reverse: false }, amount: 15081659, gas: 18446744073709551615, gas_price: 100000 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(13265850172203225897)), Index(Index(6503986099330455724))], reverse: true }, amount: 79762264, gas: 1999, gas_price: 18446744071733551 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(12318957970289835538)), Index(Index(432578061685274146))], reverse: true }, amount: 92756996, gas: 1050485, gas_price: 100001 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(4440034413518242351)), Index(Index(8721195220657765398))], reverse: true }, amount: 48715523, gas: 0, gas_price: 9676 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(5052583361844423489)), Index(Index(2592793421662325328))], reverse: false }, amount: 14764112, gas: 1999, gas_price: 18446744071733551 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(12801651744872746818)), Index(Index(16079878851640345577))], reverse: false }, amount: 64448742, gas: 2000, gas_price: 18446744071733550 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(1330288871122216839)), Index(Index(1693731629996493705))], reverse: true }, amount: 11663817, gas: 2090321, gas_price: 100000 }, P2PTransferGenRandomGasRandomPrice { sender_receiver: AccountPairGen { pair: [Index(Index(3265470854798872278)), Index(Index(10378431903077794562))], reverse: false }, amount: 41598738, gas: 18446744073709551614, gas_price: 100001 }] diff --git a/dapps/kiosk/src/components/Kiosk/KioskCreation.tsx b/dapps/kiosk/src/components/Kiosk/KioskCreation.tsx index 1248e4388fa..f90b06c5d02 100644 --- a/dapps/kiosk/src/components/Kiosk/KioskCreation.tsx +++ b/dapps/kiosk/src/components/Kiosk/KioskCreation.tsx @@ -29,7 +29,7 @@ export function KioskCreation({ onCreate }: { onCreate: () => void }) { wallet connects to Testnet and that you have at least 1 IOTA to cover gas fees. You can get test IOTA tokens using{' '} IOTA MultiSig Address - https://wiki.iota.org/testnet/learn/cryptography/iota-multisig + https://docs.iota.org/developer/cryptography/transaction-auth/multisig @@ -249,7 +249,7 @@ export default function MultiSigCombineSignatureGenerator() { IOTA MultiSig Combined Address - https://wiki.iota.org/testnet/learn/cryptography/iota-multisig + https://docs.iota.org/developer/cryptography/transaction-auth/multisig diff --git a/dapps/multisig-toolkit/src/routes/multisig-address.tsx b/dapps/multisig-toolkit/src/routes/multisig-address.tsx index 9dcea4b9863..9d7759cdd19 100644 --- a/dapps/multisig-toolkit/src/routes/multisig-address.tsx +++ b/dapps/multisig-toolkit/src/routes/multisig-address.tsx @@ -137,7 +137,7 @@ export default function MultiSigAddressGenerator() { IOTA MultiSig Address - https://wiki.iota.org/testnet/learn/cryptography/iota-multisig + https://docs.iota.org/references/ts-sdk/typescript/cryptography/multisig diff --git a/docs/README.md b/docs/README.md index 0296c0dffdb..63ade6b76f9 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ ## Overview -This directory contains the assets required to build and update the [IOTA documentation](https://wiki.iota.org). The directory is split between `content` and `site`. To run the site locally, open the root directory in a terminal or console. Use a package manager to install the required modules: +This directory contains the assets required to build and update the [IOTA documentation](https://docs.iota.org). The directory is split between `content` and `site`. To run the site locally, open the root directory in a terminal or console. Use a package manager to install the required modules: ```shell pnpm install @@ -38,11 +38,10 @@ If you'd like to view the Vercel preview before your changes are ready for revie IOTA is for the community. Contribute for the benefit of all. -- [Docs contributing guidelines](https://wiki.iota.cafe/references/contribute/contribution-process) -- [Repo contributing guidelines](https://wiki.iota.cafe/contribute-to-iota-repos) -- [Style guide](https://wiki.iota.cafe/style-guide) -- [Localization](https://wiki.iota.cafe/localize-iota-docs) -- [Code of conduct](https://wiki.iota.cafe/code-of-conduct) +- [Docs contributing guidelines](https://docs.iota.org/references/contribute/contribution-process) +- [Repo contributing guidelines](https://github.com/iotaledger/iota/blob/develop/CONTRIBUTING.md) +- [Style guide](https://docs.iota.org/style-guide) +- [Code of conduct](https://docs.iota.org/code-of-conduct) ## License diff --git a/docs/content/_snippets/alphanet.mdx b/docs/content/_snippets/alphanet.mdx deleted file mode 100644 index 7ec499e0560..00000000000 --- a/docs/content/_snippets/alphanet.mdx +++ /dev/null @@ -1,9 +0,0 @@ -:::tip Alphanet - -At the moment, you can only use the Alphanet API, faucet and [explorer](https://explorer.iota.cafe/): - -* **JSON RPC URL**: `https://api.iota-rebased-alphanet.iota.cafe:443` -* **Faucet URL**: `https://faucet.iota-rebased-alphanet.iota.cafe/gas` -* **Explorer**: https://explorer.iota.cafe/?network=alphanet - -::: \ No newline at end of file diff --git a/docs/content/_snippets/mainnet-runs-stardust.mdx b/docs/content/_snippets/mainnet-runs-stardust.mdx new file mode 100644 index 00000000000..39032335d81 --- /dev/null +++ b/docs/content/_snippets/mainnet-runs-stardust.mdx @@ -0,0 +1,5 @@ +:::warning Stardust Protocol + +The IOTA Mainnet runs the [Stardust Protocol](https://wiki.iota.org/learn/protocols/stardust/introduction/). + +::: diff --git a/docs/content/_snippets/warn-ml-rpcs.mdx b/docs/content/_snippets/warn-ml-rpcs.mdx index 312b7266c38..d54a7bd25aa 100644 --- a/docs/content/_snippets/warn-ml-rpcs.mdx +++ b/docs/content/_snippets/warn-ml-rpcs.mdx @@ -1,6 +1,8 @@ :::caution -Use dedicated nodes/shared services rather than public endpoints for production apps. The public endpoints maintained by the IOTA Foundation (`https://api.iota-rebased-alphanet.iota.cafe:443`) are rate-limited, and support only 100 requests per 30 seconds. Do not use public endpoints in production applications with high traffic volume. +Use dedicated nodes/shared services rather than public endpoints for production apps. The public endpoints maintained +by the IOTA Foundation are rate-limited, and support only 100 requests +per 30 seconds. Do not use public endpoints in production applications with high traffic volume. You can either run your own Full nodes, or outsource this to a professional infrastructure provider (preferred for apps that have high traffic). diff --git a/docs/content/about-iota/about-iota.mdx b/docs/content/about-iota/about-iota.mdx index 1ffb6acb93e..17524244fbc 100644 --- a/docs/content/about-iota/about-iota.mdx +++ b/docs/content/about-iota/about-iota.mdx @@ -1,5 +1,6 @@ -# About IOTA +import MainnetRunsStardust from '../_snippets/mainnet-runs-stardust.mdx'; +# About IOTA The IOTA ecosystem enables programmability in both [Layer 1](#layer-1) and [Layer 2](#layer-2) using [Move](#move) and [EVM/Solidity](#evm) smart contracts respectively. @@ -31,7 +32,9 @@ While the Move compiler catches many development mistakes, smart contracts can s #### IOTA Mainnet -The IOTA Mainnet processes production transaction blocks. The IOTA Mainnet's tokens have a real-world value, so we recommend that you use the IOTA Testnet or Devnet to develop your application. + + +The [IOTA Mainnet](https://wiki.iota.org/build/networks-endpoints/#iota) processes production transaction blocks. The IOTA Mainnet's tokens have a real-world value, so we recommend that you use the IOTA Testnet or Devnet to develop your application. #### IOTA Testnet diff --git a/docs/content/about-iota/iota-wallet/how-to/get-test-tokens.mdx b/docs/content/about-iota/iota-wallet/how-to/get-test-tokens.mdx index b429ef3d240..36690907c32 100644 --- a/docs/content/about-iota/iota-wallet/how-to/get-test-tokens.mdx +++ b/docs/content/about-iota/iota-wallet/how-to/get-test-tokens.mdx @@ -3,7 +3,7 @@ description: A guide on how to use IOTA Wallet for testing on different IOTA net --- # Get Test Tokens -You can test apps on the IOTA network using IOTA Wallet. Besides the IOTA Mainnet, the wallet supports connections to IOTA Testnet, IOTA Devnet, a [Local network](../../../developer/getting-started/local-network.mdx), or a Custom RPC URL for a network you create. +You can test apps on the IOTA network using IOTA Wallet. The wallet supports connections to IOTA Testnet, IOTA Devnet, a [Local network](../../../developer/getting-started/local-network.mdx), or a Custom RPC URL for a network you create. ## Change the Active Network Connection diff --git a/docs/content/developer/advanced/custom-indexer.mdx b/docs/content/developer/advanced/custom-indexer.mdx index f1fbf422cd9..3dcabc17a54 100644 --- a/docs/content/developer/advanced/custom-indexer.mdx +++ b/docs/content/developer/advanced/custom-indexer.mdx @@ -31,10 +31,10 @@ Data ingestion for your indexer supports several checkpoint stream sources. The most straightforward stream source is to subscribe to a remote store of checkpoint contents. IOTA provides the following buckets: -- Testnet: `https://checkpoints.testnet.iota.io` -- Mainnet: `https://checkpoints.mainnet.iota.io` +- Testnet: `https://indexer.testnet.iota.cafe` +- Devnet: `https://indexer.devnet.iota.cafe` -The checkpoint files are stored in the following format: `https://checkpoints.testnet.iota.io/.chk`. You can download the checkpoint file by sending an HTTP GET request to the relevant URL. Try it yourself for checkpoint 1 at [https://checkpoints.testnet.iota.io/1.chk](https://checkpoints.testnet.iota.io/1.chk). +The checkpoint files are stored in the following format: `https://indexer.testnet.iota.cafe/.chk`. You can download the checkpoint file by sending an HTTP GET request to the relevant URL. Try it yourself for checkpoint 1 at [https://indexer.testnet.iota.cafe/1.chk](https://indexer.testnet.iota.cafe/1.chk). ```mermaid flowchart LR @@ -110,7 +110,7 @@ Specify both a local and remote store as a fallback to ensure constant data flow ```rust executor.run( PathBuf::from("./chk".to_string()), // path to a local directory - Some("https://checkpoints.testnet.iota.io".to_string()), // Remote Checkpoint Store + Some("https://indexer.testnet.iota.cafe".to_string()), // Remote Checkpoint Store vec![], // optional remote store access options ReaderOptions::default(), exit_receiver, @@ -122,7 +122,7 @@ executor.run( Code for the cargo.toml manifest file for the custom indexer. -```.toml file=/examples/custom-indexer/rust/Cargo.toml +```toml file=/examples/custom-indexer/rust/Cargo.toml ``` ## Source Code diff --git a/docs/content/developer/advanced/_graphql-migration.mdx b/docs/content/developer/advanced/graphql-migration.mdx similarity index 100% rename from docs/content/developer/advanced/_graphql-migration.mdx rename to docs/content/developer/advanced/graphql-migration.mdx diff --git a/docs/content/developer/developer.mdx b/docs/content/developer/developer.mdx index d83197d7413..49e45c25e13 100644 --- a/docs/content/developer/developer.mdx +++ b/docs/content/developer/developer.mdx @@ -11,6 +11,10 @@ If you are completely new to Move, you should start with the aptly named Getting Go to [Getting Started](getting-started/getting-started.mdx). +## Network Overview + +The [Network Overview](network-overview.mdx) page gives an overview of the different networks available in the IOTA ecosystem. + ## IOTA 101 The IOTA 101 section introduces the basics of IOTA that help you create smart contracts. These topics assume you are familiar with Move and the IOTA blockchain. diff --git a/docs/content/developer/exchange-integration/exchange-integration.mdx b/docs/content/developer/exchange-integration/exchange-integration.mdx index 720136c343d..25c2a2363a2 100644 --- a/docs/content/developer/exchange-integration/exchange-integration.mdx +++ b/docs/content/developer/exchange-integration/exchange-integration.mdx @@ -3,7 +3,6 @@ title: IOTA Exchange Integration Guide description: Learn the primary tasks necessary to integrate IOTA, the token native to the IOTA network, into a cryptocurrency exchange. --- -import AlphaNet from "../../_snippets/alphanet.mdx"; import Quiz from '@site/src/components/Quiz'; import questions from '/json/developer/exchange-intergration/exchange-integration.json'; @@ -99,10 +98,9 @@ You can track balance changes by calling `iotax_getBalance` at predefined interv The following bash example demonstrates how to use `iotax_getBalance` for address `0x849d63687330447431a2e76fecca4f3c10f6884ebaa9909674123c6c662612a3`. If you use a network other than Devnet, replace the value for `rpc` with the URL to the appropriate Full node. - ```bash -rpc="https://fullnode.devnet.iota.org:443" +rpc="https://api.devnet.iota.cafe:443" address="0x849d63687330447431a2e76fecca4f3c10f6884ebaa9909674123c6c662612a3" data="{\"jsonrpc\": \"2.0\", \"method\": \"iotax_getBalance\", \"id\": 1, \"params\": [\"$address\"]}" curl -X POST -H 'Content-type: application/json' --data-raw "$data" $rpc @@ -123,8 +121,6 @@ The response is a JSON object that includes the `totalBalance` for the address: ### Using Rust - - The following example demonstrates using `iotax_getBalance` in Rust: ```rust use std::str::FromStr; @@ -134,7 +130,7 @@ use iota_sdk::IotaClientBuilder; #[tokio::main] async fn main() -> Result<(), anyhow::Error> { let iota = IotaClientBuilder::default().build( - "https://fullnode.devnet.iota.org:443", + "https://api.devnet.iota.cafe:443", ).await.unwrap(); let address = IotaAddress::from_str("0x849d63687330447431a2e76fecca4f3c10f6884ebaa9909674123c6c662612a3")?; let objects = iota.coin_read_api().get_balance(address, None).await?; diff --git a/docs/content/developer/getting-started/client-tssdk.mdx b/docs/content/developer/getting-started/client-tssdk.mdx index dd472b3e3b6..b9547823e86 100644 --- a/docs/content/developer/getting-started/client-tssdk.mdx +++ b/docs/content/developer/getting-started/client-tssdk.mdx @@ -4,7 +4,6 @@ tags: [ typescript, sdk, getting-started, install] --- import InfoPnpmRequired from "../../_snippets/info-pnpm-required.mdx"; -import AlphaNet from "../../_snippets/alphanet.mdx"; import Quiz from '@site/src/components/Quiz'; import questions from '/json/developer/getting-started/client-tssdk.json'; @@ -97,7 +96,6 @@ ReactDOM.createRoot(document.getElementById('root')!).render( , ); ``` - ### `IotaClientProvider` @@ -113,7 +111,7 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; const queryClient = new QueryClient(); const networks = { devnet: { url: getFullnodeUrl('devnet') }, - mainnet: { url: getFullnodeUrl('mainnet') }, + testnet: { url: getFullnodeUrl('testnet') }, }; ReactDOM.createRoot(document.getElementById('root')!).render( @@ -142,7 +140,7 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; const queryClient = new QueryClient(); const networks = { devnet: { url: getFullnodeUrl('devnet') }, - mainnet: { url: getFullnodeUrl('mainnet') }, + testnet: { url: getFullnodeUrl('testnet') }, }; ReactDOM.createRoot(document.getElementById('root')!).render( diff --git a/docs/content/developer/getting-started/connect.mdx b/docs/content/developer/getting-started/connect.mdx index 708559a12e9..1034f0bb658 100644 --- a/docs/content/developer/getting-started/connect.mdx +++ b/docs/content/developer/getting-started/connect.mdx @@ -4,12 +4,16 @@ tags: [ explanation, mainnet, testnet, devnet, cli, setup, install, getting-star --- import DataWipe from "../../_snippets/data-wipe.mdx"; -import AlphaNet from "../../_snippets/alphanet.mdx"; +import MainnetRunsStardust from '../../_snippets/mainnet-runs-stardust.mdx'; import Quiz from '@site/src/components/Quiz'; import questions from '/json/developer/getting-started/connect.json'; # Connect to an IOTA Network +:::info +The [Network Overview](/developer/network-overview) section lists all the networks available in the IOTA ecosystem. +::: + ## IOTA CLI IOTA provides the [IOTA command line interface (CLI)](/references/cli/client.mdx) to interact with [IOTA networks](#iota-networks), it does the following and more: @@ -22,9 +26,9 @@ IOTA provides the [IOTA command line interface (CLI)](/references/cli/client.mdx You can use the [CLI](iota-environment.mdx#iota-cli) or [SDKs](iota-environment.mdx#iota-sdks) to send transactions and read requests from using the [JSON-RPC](../../references/iota-api/json-rpc-format.mdx) and the following -endpoint: `https://fullnode..iota.io:443`. +endpoint: `https://api..iota.cafe:443`. - + ## Environment Set Up @@ -76,8 +80,6 @@ IOTA Full node server URL (Defaults to IOTA Testnet if not specified) : If you want to connect to the [Testnet](#testnet), you can simply press `Enter`. - - If not, specify your desired node URL. If you choose to add a custom URL, you should also add an alias for ease of access: @@ -121,11 +123,9 @@ iota client envs The command outputs the available environment aliases, with `(active)` denoting the currently active network. ```sh localnet => http://0.0.0.0:9000 (active) -alphanet => https://api.iota-rebased-alphanet.iota.cafe:443 +testnet => https://https://api.testnet.iota.cafe:443 ``` - - You can add a new environment using the `iota client new` command. You should specify and `alias` and `rpc` URL, for example: @@ -147,12 +147,6 @@ iota client switch --env ## IOTA Networks -### Alphanet - -A temporary network while still in early development, used before public launch of IOTA Rebased. Will be replaced by the Testnet afterwards. - - - ### Devnet The latest stable release. As such, it has the latest features that were tested in the `development` branch of the @@ -167,7 +161,7 @@ test your software in real-world conditions. :::info Testnet node validators -The IOTA Alphanet, Testnet and Devnet networks consist of four validator nodes operated by the IOTA Foundation. +The IOTA Testnet and Devnet networks consist of four validator nodes operated by the IOTA Foundation. ::: diff --git a/docs/content/developer/getting-started/create-a-package.mdx b/docs/content/developer/getting-started/create-a-package.mdx index b2953a600fb..06466cf453e 100644 --- a/docs/content/developer/getting-started/create-a-package.mdx +++ b/docs/content/developer/getting-started/create-a-package.mdx @@ -101,7 +101,7 @@ for the dependencies. -```move +```toml [dependencies] iota = { override = true, git = "", subdir = "crates/iota-framework/packages/iota-framework", rev = "testnet" } MyPackage = { local = "../my-package" } @@ -109,7 +109,7 @@ MyPackage = { local = "../my-package" } -```move +```toml [dependencies.iota] override = true git = "https://github.com/iotaledger/iota.git" diff --git a/docs/content/developer/getting-started/get-coins.mdx b/docs/content/developer/getting-started/get-coins.mdx index 2e1f82334e5..0cc7704f423 100644 --- a/docs/content/developer/getting-started/get-coins.mdx +++ b/docs/content/developer/getting-started/get-coins.mdx @@ -2,7 +2,6 @@ description: Get test IOTA tokens using the IOTA CLI, SDK, or cURL. tags: [how-to, cli, typescript, sdk, faucet] --- -import AlphaNet from "../../_snippets/alphanet.mdx"; import Quiz from '@site/src/components/Quiz'; import questions from '/json/developer/getting-started/get-coins.json'; @@ -26,7 +25,7 @@ You can request test tokens within IOTA Wallet. You can use the following cURL command to request tokens directly from the faucet server: ``` -curl --location --request POST 'https://faucet.iota-rebased-alphanet.iota.cafe/gas' \ +curl --location --request POST 'https://faucet.testnet.iota.cafe/gas' \ --header 'Content-Type: application/json' \ --data-raw '{ "FixedAmountRequest": { @@ -35,11 +34,9 @@ curl --location --request POST 'https://faucet.iota-rebased-alphanet.iota.cafe/g }' ``` - - :::tip Test tokens on a local network -If you're working with a local network, replace `'https://faucet.iota-rebased-alphanet.iota.cafe/gas'` with the appropriate value based on which package runs your network: +If you're working with a local network, replace `'https://faucet.devnet.iota.cafe/gas'` with the appropriate value based on which package runs your network: - `iota-faucet`: `http://127.0.0.1:5003/gas` - `iota start`: `http://127.0.0.1:9123/gas` diff --git a/docs/content/developer/getting-started/getting-started.mdx b/docs/content/developer/getting-started/getting-started.mdx index d1beaeceee3..1596b9d378e 100644 --- a/docs/content/developer/getting-started/getting-started.mdx +++ b/docs/content/developer/getting-started/getting-started.mdx @@ -16,16 +16,11 @@ The guides in this section will guide you as you start your IOTA Rebased journey by [setting up your development environment](iota-environment.mdx), and then move on to [install IOTA](install-iota.mdx). +## GraphQL queries -[//]: # (## GraphQL queries) +Use the GraphQL service for IOTA RPC to interact with on-chain data. -[//]: # () - -[//]: # (Use the GraphQL service for IOTA RPC to interact with on-chain data. ) - -[//]: # () - -[//]: # (Go to [Query IOTA RPC with GraphQL](getting-started/graphql-rpc.mdx).) +Go to [Query IOTA RPC with GraphQL](graphql-rpc.mdx). ## What's Next? diff --git a/docs/content/developer/getting-started/_graphql-rpc.mdx b/docs/content/developer/getting-started/graphql-rpc.mdx similarity index 96% rename from docs/content/developer/getting-started/_graphql-rpc.mdx rename to docs/content/developer/getting-started/graphql-rpc.mdx index ad537ef620e..08d3b45c726 100644 --- a/docs/content/developer/getting-started/_graphql-rpc.mdx +++ b/docs/content/developer/getting-started/graphql-rpc.mdx @@ -5,16 +5,15 @@ description: Intoductory guide to making queries of the IOTA RPC using the Graph The quickest way to access the GraphQL service for IOTA RPC is through the online IDE that provides a complete toolbox for fetching data and executing transactions on the network. The online IDE provides features such as auto-completion (use Ctrl+Space or just start typing), built-in documentation (Book icon, top-left), multi-tabs, and more. -The online IDE is available for [Mainnet](https://iota-mainnet.iota.org/graphql) and [Testnet](https://iota-testnet.iota.org/graphql). This guide contains various queries that you can try directly in the IDE. +The online IDE is available for [Devnet](https://graphql.devnet.iota.cafe/l) and [Testnet](https://graphql.testnet.iota.cafel). This guide contains various queries that you can try directly in the IDE. :::info -- Any existing addresses/object IDs in these examples refer to `mainnet` data only. -- Both [mainnet](https://iota-mainnet.iota.org/graphql) and [testnet](https://iota-testnet.iota.org/graphql) services are rate-limited to keep network throughput optimized. +- Any existing addresses/object IDs in these examples refer to `testnet` data only. +- Both [devnet](https://graphql.devnet.iota.cafe/l) and [testnet](https://graphql.testnet.iota.cafel) services are rate-limited to keep network throughput optimized. ::: For more details about some concepts used in the examples below, please see the [GraphQL concepts](../graphql-rpc.mdx) page, and consult the [reference](../../references/iota-graphql.mdx) for full documentation on the supported schema. - ## Discovering the schema GraphQL introspection exposes the schema supported by the RPC service. The IDE's "Docs" pane (Book icon, top-left) and Search dialog (Cmd+K on macOS or Ctrl+K on Windows and Linux) offer a way to browse introspection output interactively. @@ -224,7 +223,6 @@ fragment DynamicFieldValueSelection on DynamicFieldValue { ...MoveValueFields } ... on MoveObject { - hasPublicTransfer contents { ...MoveValueFields } diff --git a/docs/content/developer/getting-started/local-network.mdx b/docs/content/developer/getting-started/local-network.mdx index 95c9bb1fd84..05383670af8 100644 --- a/docs/content/developer/getting-started/local-network.mdx +++ b/docs/content/developer/getting-started/local-network.mdx @@ -166,6 +166,10 @@ The response resembles the following, but with different IDs: ╰────────────────────────────────────────────────────────────────────┴────────────╯ ``` +:::tip explorer +In order to use the explorer locally users can use the deployed explorer and set another endpoint like this: [https://explorer.iota.cafe/?network=http%3A%2F%2F127.0.0.1%3A9000](https://explorer.iota.cafe/?network=http%3A%2F%2F127.0.0.1%3A9000) or manually provide a Custom RPC URL on the [Explorer](https://explorer.iota.cafe/) page in the top right corner. +::: + ## Install IOTA Wallet Locally ### Prerequisites diff --git a/docs/content/developer/_graphql-rpc.mdx b/docs/content/developer/graphql-rpc.mdx similarity index 97% rename from docs/content/developer/_graphql-rpc.mdx rename to docs/content/developer/graphql-rpc.mdx index 09e016ef815..e3a30aba770 100644 --- a/docs/content/developer/_graphql-rpc.mdx +++ b/docs/content/developer/graphql-rpc.mdx @@ -24,7 +24,7 @@ The service accepts the following optional headers: By default, each request returns the service's version in the response header: `x-iota-rpc-version`. ```bash -curl -i -X POST https://explorer.iota.org/mainnet/graphql \ +curl -i -X POST https://explorer.iota.org/testnet/graphql \ --header 'x-iota-rpc-show-usage: true' \ --header 'Content-Type: application/json' \ --data '{ @@ -139,7 +139,6 @@ fragment DynamicFieldValueSelection on DynamicFieldValue { ...MoveValueFields } ... on MoveObject { - hasPublicTransfer contents { ...MoveValueFields } @@ -248,7 +247,7 @@ It is an error to apply both a `first` and a `last` limit. ### Examples -To see these principles put into practice, consult the examples for [paginating forwards](getting-started/graphql-rpc.mdx#paginating-checkpoints-forward-five-at-a-time-page-forward) and [paginating backwards](getting-started/graphql-rpc.mdx#paginating-checkpoints-backwards-five-at-a-time-page-back) in the getting started guide. +To see these principles put into practice, consult the examples for [paginating forwards](getting-started/graphql-rpc.mdx#paginating-checkpoints-forward-five-at-a-time) and [paginating backwards](getting-started/graphql-rpc.mdx#paginating-checkpoints-backwards-five-at-a-time) in the getting started guide. ## Limits diff --git a/docs/content/developer/iota-101/transactions/sign-and-send-txn.mdx b/docs/content/developer/iota-101/transactions/sign-and-send-txn.mdx index d71187d39a0..e0ccd46b29a 100644 --- a/docs/content/developer/iota-101/transactions/sign-and-send-txn.mdx +++ b/docs/content/developer/iota-101/transactions/sign-and-send-txn.mdx @@ -1,7 +1,6 @@ --- title: Signing and Sending Transactions --- -import AlphaNet from "../../../_snippets/alphanet.mdx"; import Quiz from '@site/src/components/Quiz'; import questions from '/json/developer/iota-101/transactions/sign-and-send-txn.json'; @@ -34,8 +33,6 @@ If you want to use a specific gas coin, first find the gas coin object ID to be ## Examples - - The following examples demonstrate how to sign and execute transactions using Rust, TypeScript, or the IOTA CLI. diff --git a/docs/content/developer/iota-101/using-events.mdx b/docs/content/developer/iota-101/using-events.mdx index 3b00a9ac9ae..f808f9e1e07 100644 --- a/docs/content/developer/iota-101/using-events.mdx +++ b/docs/content/developer/iota-101/using-events.mdx @@ -1,7 +1,6 @@ --- description: Learn how to monitor IOTA on-chain activity by subscribing to events emitted by Move packages. --- -import AlphaNet from "../../_snippets/alphanet.mdx"; import Quiz from '@site/src/components/Quiz'; import questions from '/json/developer/iota-101/using-events.json'; @@ -109,8 +108,6 @@ This example leverages the IOTA TypeScript SDK to subscribe to events the packag ### Rust - - See [Rust SDK](../../references/rust-sdk.mdx). ```rust @@ -122,8 +119,8 @@ use anyhow::Result; #[tokio::main] async fn main() -> Result<()> { let iota = IOTAClientBuilder::default() - .ws_url("wss://fullnode.mainnet.iota.io:443") - .build("https://fullnode.mainnet.iota.io:443") + .ws_url("wss://api.testnet.iota.cafe:443") + .build("https://api.testnet.iota.cafe:443") .await.unwrap(); let mut subscribe_all = iota.event_api().subscribe_event(EventFilter::All(vec![])).await?; loop { diff --git a/docs/content/developer/iota-move-ctf/challenge_1.mdx b/docs/content/developer/iota-move-ctf/challenge_1.mdx index ab3b6f588b4..a8493b5bc13 100644 --- a/docs/content/developer/iota-move-ctf/challenge_1.mdx +++ b/docs/content/developer/iota-move-ctf/challenge_1.mdx @@ -29,8 +29,8 @@ Package: 0xce9b1471301ffaf1453297cca008a68ce851b6a9ba9ab241c357c346177903f3 In this challenge, you must use the IOTA CLI to interact with the blockchain. This set of articles will help you set up your environment and call a deployed contract: - [Installing IOTA CLI](../getting-started/install-iota.mdx) -- [Connecting to Alphanet](../getting-started/connect.mdx) -- [Get Iota coins](../getting-started/get-coins.mdx) +- [Connecting an IOTA Network](../getting-started/connect.mdx) +- [Get IOTA coins](../getting-started/get-coins.mdx) - [Accessing Your Package](../getting-started/publish.mdx#accessing-your-package) diff --git a/docs/content/developer/iota-move-ctf/introduction.mdx b/docs/content/developer/iota-move-ctf/introduction.mdx index ab5d39c2c13..1b33e9f4639 100644 --- a/docs/content/developer/iota-move-ctf/introduction.mdx +++ b/docs/content/developer/iota-move-ctf/introduction.mdx @@ -1,6 +1,6 @@ # Move on IOTA Capture The Flag (CTF) -The **Move on IOTA Capture The Flag (CTF)** is a unique learning experience designed to help developers master the Move programming language by solving a series of challenges. These challenges simulate real-world scenarios that require participants to find and exploit vulnerabilities, optimize contract logic, and interact with IOTA’s alphanet. Whether you're new to Move or experienced with smart contract development, this CTF is an excellent way to sharpen your skills. +The **Move on IOTA Capture The Flag (CTF)** is a unique learning experience designed to help developers master the Move programming language by solving a series of challenges. These challenges simulate real-world scenarios that require participants to find and exploit vulnerabilities, optimize contract logic, and interact with IOTA’s Testnet. Whether you're new to Move or experienced with smart contract development, this CTF is an excellent way to sharpen your skills. This CTF features **eight challenges**, each built on Move, a language optimized for safety and scalability in decentralized applications. Throughout the event, participants are encouraged to explore Move’s features, including its resource-based design and transaction scripting model, in a competitive environment. However, bear in mind that the provided demonstration contracts may intentionally include distractions, poor design, and obscure naming conventions to increase difficulty. @@ -17,10 +17,10 @@ Upon successfully completing a challenge, you will receive a "flag," which is a ## Setup -The CTF contract are already deployed on the IOTA alphanet. To get started, you need to install the IOTA CLI tool and connect to the alphanet. If you haven't done so already, follow these steps: +The CTF contract are already deployed on the IOTA Testnet. To get started, you need to install the IOTA CLI tool and connect to the Testnet. If you haven't done so already, follow these steps: 1. [Install the IOTA CLI Tool](../getting-started/install-iota.mdx) -2. [Connect to alphanet](../getting-started/connect.mdx) +2. [Connect to an IOTA Network](../getting-started/connect.mdx) 3. [Create and Address](../getting-started/get-address.mdx) 4. [Fund Your Address](../getting-started/get-coins.mdx) 5. Get the flags! diff --git a/docs/content/developer/network-overview.mdx b/docs/content/developer/network-overview.mdx new file mode 100644 index 00000000000..aff8a1c6402 --- /dev/null +++ b/docs/content/developer/network-overview.mdx @@ -0,0 +1,35 @@ +--- +description: This page gives an overview around the different networks available in the IOTA ecosystem. + +tags: [getting-started, devnet, testnet] +--- +import MainnetRunsStardust from '../_snippets/mainnet-runs-stardust.mdx'; +import NetworkInfo from "@site/src/components/NetworkInfo/index.tsx"; +import { Networks } from '@site/src/components/constant.tsx'; + +# Network Overview + +This pages gives an overview around the different networks available in the IOTA ecosystem. + + +:::info +In general, all endpoints are load-balanced but also subject to rate limiting. If you are developing a production-level application for IOTA, consider [setting up your own infrastructure](/developer/getting-started/local-network) to have more control and avoid any limits. +::: + +## IOTA Mainnet + + + +## IOTA Testnet + + + +## IOTA Devnet + + + +## IOTA Localnet + +To create a local IOTA network, you can refer to [Local Development](/developer/getting-started/local-network) page. + + diff --git a/docs/content/developer/standards/display.mdx b/docs/content/developer/standards/display.mdx index 50d701df610..82db8ce3784 100644 --- a/docs/content/developer/standards/display.mdx +++ b/docs/content/developer/standards/display.mdx @@ -8,7 +8,7 @@ import questions from '/json/developer/standards/display.json'; The IOTA Object Display standard is a template engine that enables on-chain management of off-chain representation (display) for a type. With it, you can substitute data for an object into a template string. The standard doesn’t limit the fields you can set. You can use the `{property}` syntax to access all object properties, and then insert them as a part of the template string. -Use a `Publisher` object that you own to set `iota::display` for a type. For more information about `Publisher` objects, see [Publisher](https://examples.iota.io/basics/publisher.html) topic in *IOTA Move by Example*. +Use a `Publisher` object that you own to set `iota::display` for a type. In IOTA Move, `Display` represents an object that specifies a set of named templates for the type `T`. For example, for a type `0x2::hero::Hero` the display syntax is: `Display<0x2::hero::Hero>`. diff --git a/docs/content/developer/stardust/claiming/address-unlock-condition.mdx b/docs/content/developer/stardust/claiming/address-unlock-condition.mdx index 1512d073821..a4319e0a32d 100644 --- a/docs/content/developer/stardust/claiming/address-unlock-condition.mdx +++ b/docs/content/developer/stardust/claiming/address-unlock-condition.mdx @@ -22,55 +22,62 @@ For this example, we use an `AliasOutput` to extract an `Alias` object that owns 1. The first step is to fetch the `AliasOutput` object that is needed to claim the `NftOutput`. + + +```typescript file=/docs/examples/typescript/src/stardust/address-unlock-condition.ts#L38-L44 +``` + ```rust file=/docs/examples/rust/stardust/address-unlock-condition.rs#L74-L92 ``` - - - 2. Use the dynamic field function with the "alias" dynamic field key filter to gather the `Alias` object itself. + +```typescript file=/docs/examples/typescript/src/stardust/address-unlock-condition.ts#L46-L64 +``` + + + ```rust file=/docs/examples/rust/stardust/address-unlock-condition.rs#L94-L107 ``` - - - 3. Some objects are owned by the `Alias` object. In this case, filter them by type using the `NftOutput` type tag. Apply the filter to get `NftOutput`s owned by the `Alias`. + +```typescript file=/docs/examples/typescript/src/stardust/address-unlock-condition.ts#L66-L84 +``` + ```rust file=/docs/examples/rust/stardust/address-unlock-condition.rs#L109-L132 ``` - - - 4. Create a PTB that first extracts the assets from the `AliasOutput`, and then uses the extracted `Alias` to "address unlock" the `NftOutput` using the function `unlock_alias_address_owned_nft`. + +```typescript file=/docs/examples/typescript/src/stardust/address-unlock-condition.ts#L86-L166 +``` + ```rust file=/docs/examples/rust/stardust/address-unlock-condition.rs#L134-L243 ``` - - - diff --git a/docs/content/developer/stardust/claiming/alias.mdx b/docs/content/developer/stardust/claiming/alias.mdx index cb0fc0c4c42..6145a9e8968 100644 --- a/docs/content/developer/stardust/claiming/alias.mdx +++ b/docs/content/developer/stardust/claiming/alias.mdx @@ -23,15 +23,16 @@ A Governor address can claim the `AliasOutput` assets at any time: The first step is to fetch the `AliasOutput` object that needs to be claimed. - + -```rust file=/docs/examples/rust/stardust/alias-output-claim.rs#L56-L81 +```typescript file=/docs/examples/typescript/src/stardust/alias-output-claim.ts#L24-L38 ``` - + -Coming soon +```rust file=/docs/examples/rust/stardust/alias-output-claim.rs#L56-L81 +``` @@ -42,15 +43,16 @@ Next, check the native tokens that might be held by this output. A [`Bag`](../.. - + -```rust file=/docs/examples/rust/stardust/alias-output-claim.rs#L83-L110 +```typescript file=/docs/examples/typescript/src/stardust/alias-output-claim.ts#L43-L62 ``` - + -Coming soon +```rust file=/docs/examples/rust/stardust/alias-output-claim.rs#L83-L110 +``` @@ -63,14 +65,15 @@ An `AliasOutput` differs from an `NftOutput` or a `BasicOutput` because it conta The main purpose of claiming is to extract the `Alias` object from the `AliasOutput`. + +```typescript file=/docs/examples/typescript/src/stardust/alias-output-claim.ts#L64-L117 +``` + ```rust file=/docs/examples/rust/stardust/alias-output-claim.rs#L112-L180 ``` - - - @@ -104,13 +107,14 @@ Also, the `nft.move` module was extended with the following function: Once the package is prepared, you can extract and use a Stardust `Alias` in a single transaction to create a `CollectionControllerCap`. This capability is then used in later transactions to manage new collections. + +```typescript file=/docs/examples/typescript/src/stardust/alias-migration.ts#L72-L168 +``` + ```rust file=/docs/examples/rust/stardust/alias-migration.rs#L119-L244 ``` - - - diff --git a/docs/content/developer/stardust/claiming/basic.mdx b/docs/content/developer/stardust/claiming/basic.mdx index fe0fc30e00c..c4eeb572990 100644 --- a/docs/content/developer/stardust/claiming/basic.mdx +++ b/docs/content/developer/stardust/claiming/basic.mdx @@ -21,15 +21,16 @@ As a user, you may own `BasicOutput` objects that need to be unlocked before you To begin, you need to determine if your `BasicOutput` can be unlocked. You can achieve this by performing specific off-chain queries that will check the unlock conditions for the `BasicOutput`. - + -```rust file=/docs/examples/rust/stardust/check-basic-output-unlock-conditions.rs#L20-L56 +```typescript file=/docs/examples/typescript/src/stardust/check-basic-output-unlock-conditions.ts#L17-L49 ``` - + -Coming soon +```rust file=/docs/examples/rust/stardust/check-basic-output-unlock-conditions.rs#L20-L56 +``` @@ -43,15 +44,16 @@ Once you've confirmed that the `BasicOutput` can be unlocked, you can start the The first step is to fetch the `BasicOutput` object that you intend to claim. - + -```rust file=/docs/examples/rust/stardust/basic-output-claim.rs#L56-L81 +```typescript file=/docs/examples/typescript/src/stardust/basic-output-claim.ts#L25-L42 ``` - + -Coming soon +```rust file=/docs/examples/rust/stardust/basic-output-claim.rs#L56-L81 +``` @@ -66,15 +68,16 @@ these keys are strings representing the [`OTW`](../../iota-101/move-overview/one - + -```rust file=/docs/examples/rust/stardust/basic-output-claim.rs#L83-L110 +```typescript file=/docs/examples/typescript/src/stardust/basic-output-claim.ts#L47-L66 ``` - + -Coming soon +```rust file=/docs/examples/rust/stardust/basic-output-claim.rs#L83-L110 +``` @@ -85,15 +88,16 @@ Finally, you can create a Programmable Transaction Block (PTB) using the `basic_ along with the `Bag` keys to iterate over the extracted native tokens. - + -```rust file=/docs/examples/rust/stardust/basic-output-claim.rs#L113-L177 +```typescript file=/docs/examples/typescript/src/stardust/basic-output-claim.ts#L68-L118 ``` - + -Coming soon +```rust file=/docs/examples/rust/stardust/basic-output-claim.rs#L113-L177 +``` \ No newline at end of file diff --git a/docs/content/developer/stardust/claiming/foundry.mdx b/docs/content/developer/stardust/claiming/foundry.mdx index f6b167b6f2b..601caef7ca7 100644 --- a/docs/content/developer/stardust/claiming/foundry.mdx +++ b/docs/content/developer/stardust/claiming/foundry.mdx @@ -17,15 +17,16 @@ Instead, claiming a Foundry Output involves extracting a [`CoinManagerTreasuryCa The first step is to retrieve the `AliasOutput` object that you intend to claim. - + -```rust file=/docs/examples/rust/stardust/foundry-output-claim.rs#L60-L74 +```typescript file=/docs/examples/typescript/src/stardust/foundry-output-claim.ts#L33-L39 ``` - + -Coming soon +```rust file=/docs/examples/rust/stardust/foundry-output-claim.rs#L60-L74 +``` @@ -35,15 +36,16 @@ Coming soon Next, use the dynamic field function with the "alias" dynamic field key filter to obtain the `Alias` object itself. - + -```rust file=/docs/examples/rust/stardust/foundry-output-claim.rs#L76-L89 +```typescript file=/docs/examples/typescript/src/stardust/foundry-output-claim.ts#L41-L59 ``` - + -Coming soon +```rust file=/docs/examples/rust/stardust/foundry-output-claim.rs#L76-L89 +``` @@ -53,15 +55,16 @@ Coming soon The `Alias` object may own various other objects (for more details, refer to the [Output Unlockable by an Alias/Nft Address](address-unlock-condition.mdx) page). In this step, you filter these objects by type, specifically looking for the `CoinManagerTreasuryCap` type. - + -```rust file=/docs/examples/rust/stardust/foundry-output-claim.rs#L91-L131 +```typescript file=/docs/examples/typescript/src/stardust/foundry-output-claim.ts#L61-L86 ``` - + -Coming soon +```rust file=/docs/examples/rust/stardust/foundry-output-claim.rs#L91-L131 +``` @@ -71,15 +74,16 @@ Coming soon Since each native token is tied to its own package, a Foundry's native token has a specific [`OTW`](../../iota-101/move-overview/one-time-witness.mdx). Here, you will extract the `OTW` from the `CoinManagerTreasuryCap` object. - + -```rust file=/docs/examples/rust/stardust/foundry-output-claim.rs#L133-L142 +```typescript file=/docs/examples/typescript/src/stardust/foundry-output-claim.ts#L88-L91 ``` - + -Coming soon +```rust file=/docs/examples/rust/stardust/foundry-output-claim.rs#L133-L142 +``` @@ -89,15 +93,15 @@ Coming soon Finally, you should create a Programmable Transaction Block (PTB) that claims the `CoinManagerTreasuryCap` associated with the Foundry Output from the `AliasOutput` using the `unlock_alias_address_owned_coinmanager_treasury` function. - + -```rust file=/docs/examples/rust/stardust/foundry-output-claim.rs#L144-L215 +```typescript file=/docs/examples/typescript/src/stardust/foundry-output-claim.ts#L93-L143 ``` - - + -Coming soon +```rust file=/docs/examples/rust/stardust/foundry-output-claim.rs#L144-L215 +``` diff --git a/docs/content/developer/stardust/claiming/nft.mdx b/docs/content/developer/stardust/claiming/nft.mdx index 57d00f9f377..c71927bc4b9 100644 --- a/docs/content/developer/stardust/claiming/nft.mdx +++ b/docs/content/developer/stardust/claiming/nft.mdx @@ -24,15 +24,16 @@ similar to the process for [`Basic Outputs`](basic.mdx). The first step in claiming your NFT is to retrieve the `NftOutput` object that you intend to claim. - + -```rust file=/docs/examples/rust/stardust/nft-output-claim.rs#L56-L80 +```typescript file=/docs/examples/typescript/src/stardust/nft-output-claim.ts#L24-L44 ``` - + -Coming soon +```rust file=/docs/examples/rust/stardust/nft-output-claim.rs#L56-L80 +``` @@ -48,15 +49,16 @@ representing the [`OTW`](../../iota-101/move-overview/one-time-witness.mdx) used - + -```rust file=/docs/examples/rust/stardust/nft-output-claim.rs#L82-L107 +```typescript file=/docs/examples/typescript/src/stardust/nft-output-claim.ts#L46-L66 ``` - + -Coming soon +```rust file=/docs/examples/rust/stardust/nft-output-claim.rs#L82-L107 +``` @@ -69,15 +71,16 @@ along with the `Bag` keys to iterate over the extracted native tokens. The primary goal of this process is to extract the `Nft` object from the `NftOutput`. - + -```rust file=/docs/examples/rust/stardust/nft-output-claim.rs#L109-L175 +```typescript file=/docs/examples/typescript/src/stardust/nft-output-claim.ts#L68-L120 ``` - + -Coming soon +```rust file=/docs/examples/rust/stardust/nft-output-claim.rs#L109-L175 +``` @@ -109,15 +112,16 @@ You can then create a PTB that extracts the Stardust `Nft` from an `NftOutput` a This method uses the metadata from the Stardust `Nft` to mint a new NFT. - + -```rust file=/docs/examples/rust/stardust/nft-migration.rs#L77-L137 +```typescript file=/docs/examples/typescript/src/stardust/nft-migration.ts#L39-L85 ``` - + -Coming soon +```rust file=/docs/examples/rust/stardust/nft-migration.rs#L77-L137 +``` diff --git a/docs/content/developer/stardust/claiming/self-sponsor.mdx b/docs/content/developer/stardust/claiming/self-sponsor.mdx index 5ae531b8866..9b29c875c8b 100644 --- a/docs/content/developer/stardust/claiming/self-sponsor.mdx +++ b/docs/content/developer/stardust/claiming/self-sponsor.mdx @@ -20,15 +20,16 @@ When claiming assets, a sponsor can cover the gas fees required for the transact Use the IOTA `coin_type` to derive the sponsor and sender addresses. - + -```rust file=/docs/examples/rust/stardust/iota-self-sponsor.rs#L43-L49 +```typescript file=/docs/examples/typescript/src/stardust/iota-self-sponsor.ts#L19-L23 ``` - + -Coming soon +```rust file=/docs/examples/rust/stardust/iota-self-sponsor.rs#L43-L49 +``` @@ -40,15 +41,16 @@ to claim a `BasicOutput` owned by the derived Iota address. This process is similar to the one outlined in the [Basic Output](basic.mdx) guide. - + -```rust file=/docs/examples/rust/stardust/iota-self-sponsor.rs#L86-L135 +```typescript file=/docs/examples/typescript/src/stardust/iota-self-sponsor.ts#L45-L79 ``` - + -Coming soon +```rust file=/docs/examples/rust/stardust/iota-self-sponsor.rs#L86-L135 +``` @@ -58,15 +60,16 @@ Coming soon For this transaction, both the sender address (the object's owner) and the sponsor address must sign the transaction. - + -```rust file=/docs/examples/rust/stardust/iota-self-sponsor.rs#L151-L179 +```typescript file=/docs/examples/typescript/src/stardust/iota-self-sponsor.ts#L81-L112 ``` - + -Coming soon +```rust file=/docs/examples/rust/stardust/iota-self-sponsor.rs#L151-L179 +``` diff --git a/docs/content/developer/stardust/units.mdx b/docs/content/developer/stardust/units.mdx index d3338df9bdb..5cbd87679e2 100644 --- a/docs/content/developer/stardust/units.mdx +++ b/docs/content/developer/stardust/units.mdx @@ -31,7 +31,6 @@ The IOTA token, the native token on IOTA Stardust, is represented as a `Coin │ │ -│ │ │ hasPublicTransfer │ true │ │ │ │ │ fields │ ╭─────────┬───────────────────────────────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ balance │ 1234567000 │ │ │ │ │ │ │ │ id │ ╭────┬──────────────────────────────────────────────────────────────────────╮ │ │ │ diff --git a/docs/content/operator/iota-full-node.mdx b/docs/content/operator/iota-full-node.mdx index 2c721da81f9..1fad455a326 100644 --- a/docs/content/operator/iota-full-node.mdx +++ b/docs/content/operator/iota-full-node.mdx @@ -112,22 +112,22 @@ Open a terminal or console to the `iota` directory you downloaded in the previou 1. Make a copy of the [Full node YAML template](https://github.com/iotaledger/iota/blob/develop/crates/iota-config/data/fullnode-template.yaml): `cp crates/iota-config/data/fullnode-template.yaml fullnode.yaml` 1. Download the genesis blob for the network to use: - - [Alphanet genesis blob](https://dbfiles.iota-rebased-alphanet.iota.cafe/genesis.blob): - `curl -fLJO https://dbfiles.iota-rebased-alphanet.iota.cafe/genesis.blob` + - [Testnet genesis blob](https://dbfiles.iota-rebased-testnet.iota.cafe/genesis.blob): + `curl -fLJO https://dbfiles.iota-rebased-testnet.iota.cafe/genesis.blob` - [Testnet genesis blob](https://github.com/iotaledger/iota/TODO): `curl -fLJO TODO` - [Mainnet genesis blob](https://github.com/iotaledger/iota/TODO): `curl -fLJO TODO` -1. For Alphanet or Testnet: Edit the `fullnode.yaml` file to include peer nodes for state synchronization. Append the following to the end of the current configuration: +1. For Devnet or Testnet: Edit the `fullnode.yaml` file to include peer nodes for state synchronization. Append the following to the end of the current configuration: - + ```yaml p2p-config: seed-peers: - - address: /dns/access-0.r.iota-rebased-alphanet.iota.cafe/udp/8084 + - address: /dns/access-0.r.iota-rebased-devnet.iota.cafe/udp/8084 peer-id: 10cbea76ea5ec3f7ee827f0c11f612f0059949127876dd964b09304bf8808d18 ``` @@ -137,7 +137,7 @@ Open a terminal or console to the `iota` directory you downloaded in the previou ```yaml p2p-config: seed-peers: - - address: TODO # Example: /dns/yto-tnt-ssfn-01.testnet.iota.io/udp/8084 + - address: TODO # Example: /dns/yto-tnt-ssfn-01.testnet.iota.cafe/udp/8084 peer-id: TODO # Example: 2ed53564d5581ded9b6773970ac2f1c84d39f9edf01308ff5a1ffe09b1add7b3 ``` diff --git a/docs/content/references/cli/client.mdx b/docs/content/references/cli/client.mdx index bfc720fdb5c..26625324eac 100644 --- a/docs/content/references/cli/client.mdx +++ b/docs/content/references/cli/client.mdx @@ -3,7 +3,6 @@ title: IOTA Client CLI description: The IOTA Client CLI provides command-level access to interact with the IOTA network. --- -import AlphaNet from "../../_snippets/alphanet.mdx"; import CliCheckInstall from "../../_snippets/cli-check-install.mdx"; The IOTA CLI `client` command provides command-level access to interact with the IOTA network. Typical uses for `iota client` include publishing Move smart contracts, getting the information of an object, executing transactions, or managing addresses. @@ -80,20 +79,18 @@ Use the `iota client envs` command to find the network environments set up in th ╭────────┬─────────────────────────────────────┬────────╮ │ alias │ url │ active │ ├────────┼─────────────────────────────────────┼────────┤ -│ devnet │ https://fullnode.devnet.iota.io:443 │ * │ +│ devnet │ https://api.devnet.iota.cafe:443 │ * │ ╰────────┴─────────────────────────────────────┴────────╯ ``` - - ### Create network environment Use `client new-env` to add details for a new network environment. This example creates an environment pointer to IOTA Mainnet. Setting the `alias` value makes referencing the environment less prone to typographical errors. After running this command, IOTA updates your client.yaml file in `~/.iota/iota_config` with the new information. ``` -$ iota client new-env --alias=mainnet --rpc https://fullnode.mainnet.iota.io:443 +$ iota client new-env --alias=testnet --rpc https://api.testnet.iota.cafe:443 -Added new IOTA env [mainnet] to config. +Added new IOTA env [testnet] to config. ``` ### Set current environment @@ -101,9 +98,9 @@ Added new IOTA env [mainnet] to config. Use the `iota client switch` command to change the current network. This example switches the current network to `mainnet`. ```shell -$ iota client switch --env mainnet +$ iota client switch --env testnet -Active environment switched to [mainnet] +Active environment switched to [testnet] ``` If you run `iota client envs` after this command, you see the asterisk in the `active` column on the `mainnet` row of the table. @@ -113,16 +110,16 @@ If you run `iota client envs` after this command, you see the asterisk in the `a Use the `iota client active-address` command to reveal the current address. The CLI uses the current active address to execute address-specific CLI commands (like `iota client objects`) when you don't provide them with a IOTA address value. ```shell -$ iota client active-address +iota client active-address 0x514692f08249c3e9951234ce29074695840422564bff85e424b56de462913e0d ``` ### Request a IOTA coin from faucet -If you use one of the standard public RPCs (for example, `fullnode.testnet.iota.io:443`), you can use the `faucet` command to request gas coins. If you use a custom faucet service, then pass in the URL to the faucet using the `--url` option. +If you use one of the standard public RPCs (for example, `api.testnet.iota.cafe:443`), you can use the `faucet` command to request gas coins. If you use a custom faucet service, then pass in the URL to the faucet using the `--url` option. ```shell -$ iota client faucet +iota client faucet Request successful. It can take up to 1 minute to get the coin. Run iota client gas to check your gas coins. ``` @@ -166,7 +163,6 @@ $ iota client object 0xfffbb30ccb631f15f6cd36700589fc9c31cb04af28a95f3ed26d62daf │ content │ ╭───────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────╮ │ │ │ │ dataType │ moveObject │ │ │ │ │ type │ 0x2::coin::Coin<0x2::iota::IOTA> │ │ -│ │ │ hasPublicTransfer │ true │ │ │ │ │ fields │ ╭─────────┬───────────────────────────────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ balance │ 530076676 │ │ │ │ │ │ │ │ id │ ╭────┬──────────────────────────────────────────────────────────────────────╮ │ │ │ diff --git a/docs/content/references/cli/console.mdx b/docs/content/references/cli/console.mdx index 52b9ef9f7c6..af0f5272b7c 100644 --- a/docs/content/references/cli/console.mdx +++ b/docs/content/references/cli/console.mdx @@ -27,7 +27,7 @@ Active address: 0x3...235 Keystore Type: File Keystore Path: Some("/Users/user/.iota/iota_config/iota.keystore") Active environment: testnet -RPC URL: https://fullnode.testnet.iota.io:443 +RPC URL: https://api.testnet.iota.cafe:443 Connecting to IOTA full node. API version 1.13.0 Available RPC methods: ["iota_devInspectTransactionBlock", "iota_dryRunTransactionBlock", "iota_executeTransactionBlock", diff --git a/docs/content/references/cli/validator.mdx b/docs/content/references/cli/validator.mdx index 9c80b24227e..7668dd53c0c 100644 --- a/docs/content/references/cli/validator.mdx +++ b/docs/content/references/cli/validator.mdx @@ -169,13 +169,13 @@ $ iota validator display-metadata 0x8359fff1dc629bad933cf1781564a6d98a7277ac391e "networkPubkeyBytes": "1JiYHZHJFtuxim7woWhPGdBIe4QPoyvLVgpCRRZwUWg=", "protocolPubkeyBytes": "XhjH8q+isy4LP4GS1txLJYl+KQ9kV7b5dnu6C2x4XIk=", "proofOfPossessionBytes": "ovRMD5206HPBOoTfx+TgB5NXIKpbra4AuJRVGFSaaFbP2hAAZBDWpP1OD0Nyackf", - "name": "validator-2.r.iota-rebased-alphanet", - "description": "validator-2.r.iota-rebased-alphanet", + "name": "validator-2.r.iota-rebased-testnet", + "description": "validator-2.r.iota-rebased-testnet", "imageUrl": "", "projectUrl": "", - "netAddress": "/dns/validator-2.r.iota-rebased-alphanet.iota.cafe/tcp/8080/http", - "p2pAddress": "/dns/validator-2.r.iota-rebased-alphanet.iota.cafe/udp/8084", - "primaryAddress": "/dns/validator-2.r.iota-rebased-alphanet.iota.cafe/udp/8081", + "netAddress": "/dns/validator-2.r.iota-rebased-testnet.iota.cafe/tcp/8080/http", + "p2pAddress": "/dns/validator-2.r.iota-rebased-testnet.iota.cafe/udp/8084", + "primaryAddress": "/dns/validator-2.r.iota-rebased-testnet.iota.cafe/udp/8081", "nextEpochAuthorityPubkeyBytes": null, "nextEpochProofOfPossession": null, "nextEpochNetworkPubkeyBytes": null, diff --git a/docs/content/references/contribute/style-guide.mdx b/docs/content/references/contribute/style-guide.mdx index 29f27d49712..04b796051fe 100644 --- a/docs/content/references/contribute/style-guide.mdx +++ b/docs/content/references/contribute/style-guide.mdx @@ -556,7 +556,7 @@ Measurements should be written as numerals. ## Links -Always use relative links when linking to topics on docs.iota.io. +Always use relative links when linking to topics on docspnpm .iota.org. Include the `.mdx` extension when creating internal links so that they also work from the source file in GitHub. diff --git a/docs/content/references/event-query-and-subscription.mdx b/docs/content/references/event-query-and-subscription.mdx index 8bc190554b2..3390e6617d3 100644 --- a/docs/content/references/event-query-and-subscription.mdx +++ b/docs/content/references/event-query-and-subscription.mdx @@ -19,7 +19,7 @@ A IOTA node emits the following types of events: ## Move event -Move calls emit Move events. You can [define custom events](https://examples.iota.io/basics/events.html) in Move contracts. +Move calls emit Move events. You can define custom events in Move contracts. ### Attributes diff --git a/docs/content/references/exchange-integration-guide.mdx b/docs/content/references/exchange-integration-guide.mdx index 8e49be0a241..0cd4d7663f6 100644 --- a/docs/content/references/exchange-integration-guide.mdx +++ b/docs/content/references/exchange-integration-guide.mdx @@ -3,7 +3,6 @@ title: Exchange Integration Guide sidebar_label: Exchange Integration slug: /exchange-integration-guide --- -import AlphaNet from "../_snippets/alphanet.mdx"; This topic describes how to integrate IOTA, the token native to the IOTA network, into a cryptocurrency exchange. The specific requirements and processes to implement an integration vary between exchanges. Rather than provide a step-by-step guide, this topic provides information about the primary tasks necessary to complete an integration. After the guidance about how to configure an integration, you can also find information and code samples related to staking on the IOTA network. @@ -114,10 +113,8 @@ You can track balance changes by calling `iota_getBalance` at predefined interva The following bash example demonstrates how to use `iota_getBalance` for address 0x849d63687330447431a2e76fecca4f3c10f6884ebaa9909674123c6c662612a3. If you use a network other than Devnet, replace the value for `rpc` with the URL to the appropriate Full node. - - ```bash -rpc="https://fullnode.devnet.iota.io:443" +rpc="https://api.devnet.iota.cafe:443" address="0x849d63687330447431a2e76fecca4f3c10f6884ebaa9909674123c6c662612a3" data="{\"jsonrpc\": \"2.0\", \"method\": \"iota_getBalance\", \"id\": 1, \"params\": [\"$address\"]}" curl -X POST -H 'Content-type: application/json' --data-raw "$data" $rpc @@ -148,7 +145,7 @@ use iota_sdk::{IOTAClient, IOTAClientBuilder}; #[tokio::main] async fn main() -> Result<(), anyhow::Error> { let iota = IOTAClientBuilder::default().build( - "https://fullnode.devnet.iota.io:443", + "https://api.devnet.iota.cafe:443", ).await.unwrap(); let address = IOTAAddress::from_str("0x849d63687330447431a2e76fecca4f3c10f6884ebaa9909674123c6c662612a3")?; let objects = iota.read_api().get_balance(address).await?; @@ -163,7 +160,7 @@ You can also track the balance for an address by subscribing to all of the event The following example demonstrates how to filter events for an address using bash and cURL: ```bash -rpc="https://fullnode.devnet.iota.io:443" +rpc="https://api.devnet.iota.cafe:443" address="0x849d63687330447431a2e76fecca4f3c10f6884ebaa9909674123c6c662612a3" data="{\"jsonrpc\": \"2.0\", \"id\":1, \"method\": \"iota_getEvents\", \"params\": [{\"Recipient\": {\"AddressOwner\": \"0x849d63687330447431a2e76fecca4f3c10f6884ebaa9909674123c6c662612a3\"}}, null, null, true ]}" curl -X POST -H 'Content-type: application/json' --data-raw "$data" $rpc diff --git a/docs/content/references/iota-api.mdx b/docs/content/references/iota-api.mdx index 9fd2bb0fa22..ac1d15e9f42 100644 --- a/docs/content/references/iota-api.mdx +++ b/docs/content/references/iota-api.mdx @@ -2,13 +2,13 @@ title: IOTA RPC --- -[//]: # (:::info) +:::info -[//]: # () -[//]: # (The IOTA RPC is upgrading from JSON-RPC to GraphQL. See [GraphQL for IOTA RPC](../developer/_graphql-rpc.mdx) for more information.) -[//]: # () -[//]: # (:::) +The IOTA RPC is upgrading from JSON-RPC to GraphQL. See [GraphQL for IOTA RPC](../developer/graphql-rpc.mdx) for more information. + + +::: _IOTAJSON_ is a JSON-based format with restrictions that allow IOTA to align JSON inputs more closely with Move call arguments. diff --git a/docs/content/references/_iota-graphql.mdx b/docs/content/references/iota-graphql.mdx similarity index 75% rename from docs/content/references/_iota-graphql.mdx rename to docs/content/references/iota-graphql.mdx index 6c60bcff812..1e1ca11bf4c 100644 --- a/docs/content/references/_iota-graphql.mdx +++ b/docs/content/references/iota-graphql.mdx @@ -5,7 +5,7 @@ description: GraphQL is a public service for the IOTA RPC that enables you to ef GraphQL for the IOTA RPC is a public service that enables interacting with the IOTA [network](https://iota.io/networkinfo). -To get started with GraphQL for the IOTA RPC, check out the [Getting Started](../developer/getting-started/_graphql-rpc.mdx) guide. If you'd like to learn more about the concepts used in the GraphQL service, check out the [GraphQL](../developer/_graphql-rpc.mdx) for IOTA RPC concepts page. +To get started with GraphQL for the IOTA RPC, check out the [Getting Started](../developer/getting-started/graphql-rpc.mdx) guide. If you'd like to learn more about the concepts used in the GraphQL service, check out the [GraphQL](../developer/graphql-rpc.mdx) for IOTA RPC concepts page. ## Key Types @@ -19,6 +19,6 @@ All GraphQL API elements are accessible via the left sidebar, the following are ## Related links -- [GraphQL migration](../developer/advanced/_graphql-migration.mdx): Migrating to GraphQL guides you through migrating IOTA RPC projects from JSON-RPC to GraphQL. -- [GraphQL quick-start](../developer/getting-started/_graphql-rpc.mdx): Querying IOTA RPC with GraphQL gets you started using GraphQL to query the IOTA RPC for on-chain data. -- [GraphQL concepts](../developer/_graphql-rpc.mdx): GraphQL for IOTA RPC examines the elements of GraphQL that you should know to get the most from the service. +- [GraphQL migration](../developer/advanced/graphql-migration.mdx): Migrating to GraphQL guides you through migrating IOTA RPC projects from JSON-RPC to GraphQL. +- [GraphQL quick-start](../developer/getting-started/graphql-rpc.mdx): Querying IOTA RPC with GraphQL gets you started using GraphQL to query the IOTA RPC for on-chain data. +- [GraphQL concepts](../developer/graphql-rpc.mdx): GraphQL for IOTA RPC examines the elements of GraphQL that you should know to get the most from the service. diff --git a/docs/content/references/ts-sdk/dapp-kit/index.mdx b/docs/content/references/ts-sdk/dapp-kit/index.mdx index eea63254587..bb1deb750f2 100644 --- a/docs/content/references/ts-sdk/dapp-kit/index.mdx +++ b/docs/content/references/ts-sdk/dapp-kit/index.mdx @@ -1,5 +1,3 @@ -import AlphaNet from "../../../_snippets/alphanet.mdx"; - # Iota dApp Kit The Iota dApp Kit is a set of React components, hooks, and utilities to help you build a dApp for the @@ -30,7 +28,6 @@ To use the hooks and components in the dApp Kit, wrap your app with the provider following example. The props available on the providers are covered in more detail in their respective pages. - ```tsx import { createNetworkConfig, IotaClientProvider, WalletProvider } from '@iota/dapp-kit'; @@ -40,7 +37,7 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; // Config options for the networks you want to connect to const { networkConfig } = createNetworkConfig({ localnet: { url: getFullnodeUrl('localnet') }, - mainnet: { url: getFullnodeUrl('mainnet') }, + testnet: { url: getFullnodeUrl('testnet') }, }); const queryClient = new QueryClient(); diff --git a/docs/content/references/ts-sdk/dapp-kit/iota-client-provider.mdx b/docs/content/references/ts-sdk/dapp-kit/iota-client-provider.mdx index 397c7de7b2c..7bb5e400e03 100644 --- a/docs/content/references/ts-sdk/dapp-kit/iota-client-provider.mdx +++ b/docs/content/references/ts-sdk/dapp-kit/iota-client-provider.mdx @@ -18,7 +18,7 @@ import { getFullnodeUrl } from '@iota/iota-sdk/client'; // Config options for the networks you want to connect to const { networkConfig } = createNetworkConfig({ localnet: { url: getFullnodeUrl('localnet') }, - mainnet: { url: getFullnodeUrl('mainnet') }, + testnet: { url: getFullnodeUrl('testnet') }, }); function App() { @@ -55,7 +55,7 @@ import { useState } from 'react'; // Config options for the networks you want to connect to const { networkConfig } = createNetworkConfig({ localnet: { url: getFullnodeUrl('localnet') }, - mainnet: { url: getFullnodeUrl('mainnet') }, + testnet: { url: getFullnodeUrl('testnet') }, }); function App() { @@ -86,7 +86,7 @@ import { getFullnodeUrl, IotaClient, IotaHTTPTransport } from '@iota/iota-sdk/cl // Config options for the networks you want to connect to const networks = { localnet: { url: getFullnodeUrl('localnet') }, - mainnet: { url: getFullnodeUrl('mainnet') }, + testnet: { url: getFullnodeUrl('testnet') }, } satisfies Record; function App() { @@ -177,8 +177,8 @@ const { networkConfig, useNetworkVariable } = createNetworkConfig({ myMovePackageId: '0x123', }, }, - mainnet: { - url: getFullnodeUrl('mainnet'), + testnet: { + url: getFullnodeUrl('testnet'), variables: { myMovePackageId: '0x456', }, diff --git a/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useAccounts.mdx b/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useAccounts.mdx index 67d7627cb3b..b0a190c82e9 100644 --- a/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useAccounts.mdx +++ b/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useAccounts.mdx @@ -10,7 +10,7 @@ function withProviders( // Work around server-side pre-rendering const queryClient = new QueryClient(); const networks = { - mainnet: { url: getFullnodeUrl('mainnet') }, + testnet: { url: getFullnodeUrl('testnet') }, }; return () => { diff --git a/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useAutoConnectWallet.mdx b/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useAutoConnectWallet.mdx index 483a2f63747..6b5596dfffc 100644 --- a/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useAutoConnectWallet.mdx +++ b/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useAutoConnectWallet.mdx @@ -10,7 +10,7 @@ function withProviders( // Work around server-side pre-rendering const queryClient = new QueryClient(); const networks = { - mainnet: { url: getFullnodeUrl('mainnet') }, + testnet: { url: getFullnodeUrl('testnet') }, }; return () => { diff --git a/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useConnectWallet.mdx b/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useConnectWallet.mdx index 5cf295496e1..1bd679a75e7 100644 --- a/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useConnectWallet.mdx +++ b/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useConnectWallet.mdx @@ -10,7 +10,7 @@ function withProviders( // Work around server-side pre-rendering const queryClient = new QueryClient(); const networks = { - mainnet: { url: getFullnodeUrl('mainnet') }, + testnet: { url: getFullnodeUrl('testnet') }, }; return () => { diff --git a/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useCurrentAccount.mdx b/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useCurrentAccount.mdx index 3854a29d55a..db1cdf7a0de 100644 --- a/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useCurrentAccount.mdx +++ b/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useCurrentAccount.mdx @@ -10,7 +10,7 @@ function withProviders( // Work around server-side pre-rendering const queryClient = new QueryClient(); const networks = { - mainnet: { url: getFullnodeUrl('mainnet') }, + testnet: { url: getFullnodeUrl('testnet') }, }; return () => { diff --git a/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useCurrentWallet.mdx b/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useCurrentWallet.mdx index 9f0128f9f1b..0c2c7996434 100644 --- a/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useCurrentWallet.mdx +++ b/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useCurrentWallet.mdx @@ -11,7 +11,7 @@ function withProviders( // Work around server-side pre-rendering const queryClient = new QueryClient(); const networks = { - mainnet: { url: getFullnodeUrl('mainnet') }, + testnet: { url: getFullnodeUrl('testnet') }, }; return () => { diff --git a/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useDisconnectWallet.mdx b/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useDisconnectWallet.mdx index 8dc197a0787..dedf7ba93d9 100644 --- a/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useDisconnectWallet.mdx +++ b/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useDisconnectWallet.mdx @@ -11,7 +11,7 @@ function withProviders( // Work around server-side pre-rendering const queryClient = new QueryClient(); const networks = { - mainnet: { url: getFullnodeUrl('mainnet') }, + testnet: { url: getFullnodeUrl('testnet') }, }; return () => { diff --git a/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useSignAndExecuteTransactionBlock.mdx b/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useSignAndExecuteTransactionBlock.mdx index e470ad466ad..d57407b8607 100644 --- a/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useSignAndExecuteTransactionBlock.mdx +++ b/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useSignAndExecuteTransactionBlock.mdx @@ -11,7 +11,7 @@ function withProviders( // Work around server-side pre-rendering const queryClient = new QueryClient(); const networks = { - mainnet: { url: getFullnodeUrl('mainnet') }, + testnet: { url: getFullnodeUrl('testnet') }, }; return () => { diff --git a/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useSignPersonalMessage.mdx b/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useSignPersonalMessage.mdx index b0c8ed8a2ee..63fa0de140f 100644 --- a/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useSignPersonalMessage.mdx +++ b/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useSignPersonalMessage.mdx @@ -10,7 +10,7 @@ function withProviders( // Work around server-side pre-rendering const queryClient = new QueryClient(); const networks = { - mainnet: { url: getFullnodeUrl('mainnet') }, + testnet: { url: getFullnodeUrl('testnet') }, }; return () => { diff --git a/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useSignTransactionBlock.mdx b/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useSignTransactionBlock.mdx index 5dcbf45a903..f0f9f82b441 100644 --- a/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useSignTransactionBlock.mdx +++ b/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useSignTransactionBlock.mdx @@ -11,7 +11,7 @@ function withProviders( // Work around server-side pre-rendering const queryClient = new QueryClient(); const networks = { - mainnet: { url: getFullnodeUrl('mainnet') }, + testnet: { url: getFullnodeUrl('testnet') }, }; return () => { diff --git a/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useSwitchAccount.mdx b/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useSwitchAccount.mdx index dacd67ebddc..9abe519bad5 100644 --- a/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useSwitchAccount.mdx +++ b/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useSwitchAccount.mdx @@ -10,7 +10,7 @@ function withProviders( // Work around server-side pre-rendering const queryClient = new QueryClient(); const networks = { - mainnet: { url: getFullnodeUrl('mainnet') }, + testnet: { url: getFullnodeUrl('testnet') }, }; return () => { diff --git a/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useWallets.mdx b/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useWallets.mdx index 7a23f9fb686..67159b7c55a 100644 --- a/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useWallets.mdx +++ b/docs/content/references/ts-sdk/dapp-kit/wallet-hooks/useWallets.mdx @@ -11,7 +11,7 @@ function withProviders( // Work around server-side pre-rendering const queryClient = new QueryClient(); const networks = { - mainnet: { url: getFullnodeUrl('mainnet') }, + testnet: { url: getFullnodeUrl('testnet') }, }; return () => { diff --git a/docs/content/references/ts-sdk/kiosk/advanced-examples.mdx b/docs/content/references/ts-sdk/kiosk/advanced-examples.mdx index 4a5006f01fb..329e5816c13 100644 --- a/docs/content/references/ts-sdk/kiosk/advanced-examples.mdx +++ b/docs/content/references/ts-sdk/kiosk/advanced-examples.mdx @@ -1,10 +1,7 @@ -import AlphaNet from "../../../_snippets/alphanet.mdx"; - # Some extended examples For these examples, assume you have the following data and functions available: - ```typescript // a constant for my type. @@ -15,9 +12,9 @@ const otherType = `${packageId}::other_module::OtherStruct<${packageId}::other_c // initialize a kioskClient. const kioskClient = new KioskClient({ client: new IotaClient({ - url: getFullnodeUrl('mainnet'), + url: getFullnodeUrl('testnet'), }), - network: Network.MAINNET, + network: Network.TESTNET, }); ``` diff --git a/docs/content/references/ts-sdk/kiosk/from-v1.mdx b/docs/content/references/ts-sdk/kiosk/from-v1.mdx index 3e697ce97ee..1ca2a06d3cf 100644 --- a/docs/content/references/ts-sdk/kiosk/from-v1.mdx +++ b/docs/content/references/ts-sdk/kiosk/from-v1.mdx @@ -47,9 +47,9 @@ Using the new SDK, you can build the same transaction as follows: /// You need to do this only once and re-use it in the application. const kioskClient = new KioskClient({ client: new IotaClient({ - url: getFullnodeUrl('mainnet'), + url: getFullnodeUrl('testnet'), }), - network: Network.MAINNET, + network: Network.TESTNET, }); const placeAndListToKiosk = async () => { @@ -102,9 +102,9 @@ Using the new SDK, you can build the same transaction as follows: /// You need to do this only once and re-use it in the application. const kioskClient = new KioskClient({ client: new IotaClient({ - url: getFullnodeUrl('mainnet'), + url: getFullnodeUrl('testnet'), }), - network: Network.MAINNET, + network: Network.TESTNET, }); const placeAndListToKiosk = async () => { @@ -129,7 +129,7 @@ import { queryTransferPolicy, purchaseAndResolvePolicies, place, testnetEnvironm import { IotaClient } from '@iota/iota-sdk/client'; const client = new IotaClient( - url: 'https://fullnode.testnet.iota.io:443', + url: 'https://api.testnet.iota.cafe:443', ); // The kiosk we're purchasing from. @@ -192,9 +192,9 @@ Using the new SDK, you can build the same transaction as follows: /// You need to do this only once and re-use it in the application. const kioskClient = new KioskClient({ client: new IotaClient({ - url: getFullnodeUrl('mainnet'), + url: getFullnodeUrl('testnet'), }), - network: Network.MAINNET, + network: Network.TESTNET, }); // An Item as returned from `kioskClient.getKiosk()` call. @@ -288,9 +288,9 @@ On the new SDK, the same transaction can be built as follows: /// You need to do this only once and re-use it in the application. const kioskClient = new KioskClient({ client: new IotaClient({ - url: getFullnodeUrl('mainnet'), + url: getFullnodeUrl('testnet'), }), - network: Network.MAINNET, + network: Network.TESTNET, }); const adjustPolicy = async () => { diff --git a/docs/content/references/ts-sdk/kiosk/kiosk-client/introduction.mdx b/docs/content/references/ts-sdk/kiosk/kiosk-client/introduction.mdx index 4039ef2ceee..73bea1b8fce 100644 --- a/docs/content/references/ts-sdk/kiosk/kiosk-client/introduction.mdx +++ b/docs/content/references/ts-sdk/kiosk/kiosk-client/introduction.mdx @@ -1,5 +1,3 @@ -import AlphaNet from "../../../../_snippets/alphanet.mdx"; - # Kiosk Client Kiosk Client is the base for all Kiosk SDK functionality. @@ -15,7 +13,6 @@ You can follow the example to create a `KioskClient`. The client currently suppo _IOTA Kiosk rules and extensions are not supported in Devnet due to network wipes (that would require constantly changing the package IDs)._ - ```typescript import { KioskClient, Network } from '@iota/kiosk'; diff --git a/docs/content/references/ts-sdk/kiosk/kiosk-client/querying.mdx b/docs/content/references/ts-sdk/kiosk/kiosk-client/querying.mdx index 6273009b891..f50eaf4c2db 100644 --- a/docs/content/references/ts-sdk/kiosk/kiosk-client/querying.mdx +++ b/docs/content/references/ts-sdk/kiosk/kiosk-client/querying.mdx @@ -78,7 +78,6 @@ console.log(res); content: { dataType: 'moveObject', type: '0xd12f8e0fdae3f5d88d2fc4af2e869ea503491e2d8da5f3136320b65bdcf70ab3::hero::Hero', - hasPublicTransfer: true, fields: { id: { id: '0xf65e88a33466763cabd11b7c2a57938cf4fa707c6cf767cb428894e14caf1537' @@ -102,7 +101,6 @@ console.log(res); content: { dataType: 'moveObject', type: '0xd12f8e0fdae3f5d88d2fc4af2e869ea503491e2d8da5f3136320b65bdcf70ab3::hero::Hero', - hasPublicTransfer: true, fields: { id: { id: '0x34def97cb8c357fcfdf22f72421d4f6f01706662acf7be1afb6e7391d5491372' diff --git a/docs/content/references/ts-sdk/typescript/cryptography/keypairs.mdx b/docs/content/references/ts-sdk/typescript/cryptography/keypairs.mdx index f25254186ef..77b6cdcb42d 100644 --- a/docs/content/references/ts-sdk/typescript/cryptography/keypairs.mdx +++ b/docs/content/references/ts-sdk/typescript/cryptography/keypairs.mdx @@ -1,9 +1,5 @@ -import AlphaNet from "../../../../_snippets/alphanet.mdx"; - # Key pairs - - The IOTA TypeScript SDK provides `Keypair` classes that handle logic for signing and verification using the cryptographic key pairs associated with a IOTA address. @@ -136,7 +132,7 @@ import { verifyPersonalMessageSignature } from '@iota/iota-sdk/verify'; const publicKey = await verifyPersonalMessageSignature(message, zkSignature, { client: new IotaGraphQLClient({ - url: 'https://iota-testnet.iota.org/graphql', + url: 'https://graphql.testnet.iota.cafe', }), }); ``` diff --git a/docs/content/references/ts-sdk/typescript/hello-iota.mdx b/docs/content/references/ts-sdk/typescript/hello-iota.mdx index 87d90f88986..cb0e4b79acc 100644 --- a/docs/content/references/ts-sdk/typescript/hello-iota.mdx +++ b/docs/content/references/ts-sdk/typescript/hello-iota.mdx @@ -1,5 +1,4 @@ import Faucet from '@site/../content/_snippets/faucet.mdx'; -import AlphaNet from "../../../_snippets/alphanet.mdx"; # Hello IOTA @@ -52,8 +51,6 @@ address. You must be on Devnet, Testnet, or a local network to use a faucet for Create a new `index.js` file in the root of your project with the following code. - - ```js import { getFullnodeUrl, IotaClient } from '@iota/iota-sdk/client'; import { getFaucetHost, requestIotaFromFaucetv1 } from '@iota/iota-sdk/faucet'; diff --git a/docs/content/references/ts-sdk/typescript/index.mdx b/docs/content/references/ts-sdk/typescript/index.mdx index 888ce108894..5311b2a0349 100644 --- a/docs/content/references/ts-sdk/typescript/index.mdx +++ b/docs/content/references/ts-sdk/typescript/index.mdx @@ -1,4 +1,5 @@ -import AlphaNet from "../../../_snippets/alphanet.mdx"; +import NetworkInfo from "@site/src/components/NetworkInfo/index.tsx"; +import { Networks } from '@site/src/components/constant.tsx'; # IOTA TypeScript SDK Quick Start @@ -13,21 +14,26 @@ npm i @iota/iota-sdk ## Network locations - - The following table lists the locations for IOTA networks. -| Network | Full node | faucet | -| ------- | ------------------------------------- | ------------------------------------- | -| local | `http://127.0.0.1:9000` (default) | `http://127.0.0.1:9123/gas` (default) | -| Devnet | `https://fullnode.devnet.iota.io:443` | `https://faucet.iota-rebased-alphanet.iota.cafe/gas` | -| Testnet | - | - | -| Mainnet | - | - | +## IOTA Testnet + + + +## IOTA Devnet + + + +## IOTA Localnet + +To create a local IOTA network, you can refer to [Local Development](/developer/getting-started/local-network) page. + + :::warning Use dedicated nodes/shared services rather than public endpoints for production apps. The public -endpoints maintained by the IOTA Foundation (`fullnode..iota.io:443`) are rate-limited, and support +endpoints maintained by the IOTA Foundation (`api..iota.cafe:443`) are rate-limited, and support only 100 requests per 30 seconds or so. Do not use public endpoints in production applications with high traffic volume. diff --git a/docs/content/references/ts-sdk/typescript/iota-client.mdx b/docs/content/references/ts-sdk/typescript/iota-client.mdx index 3f5dc887c62..1a4210cdc33 100644 --- a/docs/content/references/ts-sdk/typescript/iota-client.mdx +++ b/docs/content/references/ts-sdk/typescript/iota-client.mdx @@ -95,7 +95,7 @@ import { WebSocket } from 'ws'; new IotaClient({ transport: new IotaHTTPTransport({ - url: getFullnodeUrl('mainnet'), + url: getFullnodeUrl('testnet'), // The typescript definitions may not match perfectly, casting to never avoids these minor incompatibilities WebSocketConstructor: WebSocket as never, }), diff --git a/docs/content/references/ts-sdk/typescript/owned-object-pool/examples.mdx b/docs/content/references/ts-sdk/typescript/owned-object-pool/examples.mdx index 3c574f20e89..1e96b495007 100644 --- a/docs/content/references/ts-sdk/typescript/owned-object-pool/examples.mdx +++ b/docs/content/references/ts-sdk/typescript/owned-object-pool/examples.mdx @@ -1,5 +1,4 @@ import Beta from '@site/../content/_snippets/iota-oop-beta.mdx' -import AlphaNet from "../../../../_snippets/alphanet.mdx"; # End-to-End Examples @@ -27,15 +26,13 @@ account's coins. Here is the code that creates the coins by splitting a single coin 20 times and transferring the new coins to your address: - - ```ts import { IotaClient } from '@iota/iota-sdk/client/'; import type { IotaObjectRef, IotaObjectResponse } from '@iota/iota-sdk/client/'; import { Transaction } from '@iota/iota-sdk/transactions'; const client = new IotaClient({ - url: 'https://fullnode.testnet.iota.io:443', + url: 'https://api.testnet.iota.cafe:443', }); const objectId: string = ''; // A diff --git a/docs/content/references/ts-sdk/typescript/owned-object-pool/local-development.mdx b/docs/content/references/ts-sdk/typescript/owned-object-pool/local-development.mdx index e6c9e9fd290..aec12c0308d 100644 --- a/docs/content/references/ts-sdk/typescript/owned-object-pool/local-development.mdx +++ b/docs/content/references/ts-sdk/typescript/owned-object-pool/local-development.mdx @@ -74,7 +74,7 @@ TEST_USER_SECRET= ... NFT_APP_PACKAGE_ID= ... NFT_APP_ADMIN_CAP= ... -# Example: "https://fullnode.testnet.iota.io:443" +# Example: "https://api.testnet.iota.cafe:443" IOTA_NODE= ... GET_WORKER_TIMEOUT_MS=1000 diff --git a/docs/content/sidebars/developer.js b/docs/content/sidebars/developer.js index 54656da5b35..9057eabce7c 100644 --- a/docs/content/sidebars/developer.js +++ b/docs/content/sidebars/developer.js @@ -29,6 +29,7 @@ const developer = [ 'developer/getting-started/coffee-example', ], }, + 'developer/network-overview', { type: 'category', label: 'IOTA 101', diff --git a/docs/content/sidebars/references.js b/docs/content/sidebars/references.js index 142c82dc1a0..72e04fe7835 100644 --- a/docs/content/sidebars/references.js +++ b/docs/content/sidebars/references.js @@ -18,7 +18,7 @@ const references = [ id: 'references/iota-api', }, items: [ - /*{ + { type: 'category', label: 'GraphQL', link: { @@ -31,7 +31,7 @@ const references = [ dirName: 'references/iota-api/iota-graphql/reference', }, ], - },*/ + }, { type: 'link', label: 'JSON-RPC', diff --git a/docs/examples/move/ctf/README.md b/docs/examples/move/ctf/README.md index 700e6412b6f..0912c0fe00b 100644 --- a/docs/examples/move/ctf/README.md +++ b/docs/examples/move/ctf/README.md @@ -2,7 +2,7 @@ ## Trying the Challenges -The challneges are already deployed on the IOTA alphanet. To get started, you need to start with reading the [CTF introduction](../../docs/content/developer/iota-move-ctf/introduction.mdx), follow its steps to interact with the challenges, and capture the flags. +The challenges are already deployed on the IOTA Testnet. To get started, you need to start with reading the [CTF introduction](../../docs/content/developer/iota-move-ctf/introduction.mdx), follow its steps to interact with the challenges, and capture the flags. ## Deploying the challneges yourself (Not Required) diff --git a/docs/examples/rust/stardust/address-unlock-condition.rs b/docs/examples/rust/stardust/address-unlock-condition.rs index 958be0446a1..d7a0e95a6c5 100644 --- a/docs/examples/rust/stardust/address-unlock-condition.rs +++ b/docs/examples/rust/stardust/address-unlock-condition.rs @@ -47,7 +47,7 @@ async fn main() -> Result<(), anyhow::Error> { // because we need an alias output that owns an Nft Output. In this case, we can // derive the address index "/2'" of the "/0'" account. let derivation_path = DerivationPath::from_str("m/44'/4218'/0'/0'/2'")?; - println!("{derivation_path:?}"); + println!("Derivation path: {derivation_path}"); // Derive the address of the first account and set it as default let sender = keystore.import_from_mnemonic( @@ -57,7 +57,7 @@ async fn main() -> Result<(), anyhow::Error> { None, )?; - println!("Sender address - {sender:?}"); + println!("Sender address: {sender}"); fund_address(&iota_client, &mut keystore, sender).await?; diff --git a/docs/examples/rust/stardust/alias-migration.rs b/docs/examples/rust/stardust/alias-migration.rs index faa2e27f480..3b54bbc2ab8 100644 --- a/docs/examples/rust/stardust/alias-migration.rs +++ b/docs/examples/rust/stardust/alias-migration.rs @@ -42,7 +42,7 @@ async fn main() -> Result<(), anyhow::Error> { // Derive the address of the first account and set it as default let sender = keystore.import_from_mnemonic(MAIN_ADDRESS_MNEMONIC, ED25519, None, None)?; - println!("{sender:?}"); + println!("Sender address: {sender}"); // Publish the package of a custom NFT collection and then get the package id. // The custom NFT module is obtained from a Move example in the docs. @@ -220,7 +220,6 @@ async fn main() -> Result<(), anyhow::Error> { for type_key in df_type_keys { let type_arguments = vec![TypeTag::from_str(&format!("0x{type_key}"))?]; let arguments = vec![extracted_native_tokens_bag, builder.pure(sender)?]; - // Extract a native token balance. extracted_native_tokens_bag = builder.programmable_move_call( STARDUST_PACKAGE_ID, diff --git a/docs/examples/rust/stardust/alias-output-claim.rs b/docs/examples/rust/stardust/alias-output-claim.rs index 5bc4f1dd8c7..51c4bb0ca6c 100644 --- a/docs/examples/rust/stardust/alias-output-claim.rs +++ b/docs/examples/rust/stardust/alias-output-claim.rs @@ -41,7 +41,7 @@ async fn main() -> Result<(), anyhow::Error> { // Derive the address of the first account and set it as default. let sender = keystore.import_from_mnemonic(MAIN_ADDRESS_MNEMONIC, ED25519, None, None)?; - println!("Sender address: {sender:?}"); + println!("Sender address: {sender}"); // Get a gas coin. let gas_coin = iota_client diff --git a/docs/examples/rust/stardust/basic-output-claim.rs b/docs/examples/rust/stardust/basic-output-claim.rs index dc766b1ef86..a60e0102f71 100644 --- a/docs/examples/rust/stardust/basic-output-claim.rs +++ b/docs/examples/rust/stardust/basic-output-claim.rs @@ -41,7 +41,7 @@ async fn main() -> Result<(), anyhow::Error> { // Derive the address of the first account and set it as default let sender = keystore.import_from_mnemonic(MAIN_ADDRESS_MNEMONIC, ED25519, None, None)?; - println!("Sender address: {sender:?}"); + println!("Sender address: {sender}"); // Get a gas coin let gas_coin = iota_client diff --git a/docs/examples/rust/stardust/foundry-output-claim.rs b/docs/examples/rust/stardust/foundry-output-claim.rs index 78e73f2f5e3..a25da807112 100644 --- a/docs/examples/rust/stardust/foundry-output-claim.rs +++ b/docs/examples/rust/stardust/foundry-output-claim.rs @@ -42,7 +42,7 @@ async fn main() -> Result<(), anyhow::Error> { // Derive the address of the first account and set it as default. let sender = keystore.import_from_mnemonic(MAIN_ADDRESS_MNEMONIC, ED25519, None, None)?; - println!("Sender address: {sender:?}"); + println!("Sender address: {sender}"); // Fund the sender address fund_address(&iota_client, &mut keystore, sender).await?; diff --git a/docs/examples/rust/stardust/iota-self-sponsor.rs b/docs/examples/rust/stardust/iota-self-sponsor.rs index 849f751a416..f2acf11c92e 100644 --- a/docs/examples/rust/stardust/iota-self-sponsor.rs +++ b/docs/examples/rust/stardust/iota-self-sponsor.rs @@ -40,7 +40,7 @@ async fn main() -> Result<(), anyhow::Error> { // Setup the temporary file based keystore let mut keystore = setup_keystore()?; - // For this example we need to derive addresses that are not at different + // For this example we need to derive addresses that are at different // indexes and coin_types, one for sponsoring with IOTA coin type and one for // claiming the Basic Output with Iota coin type. let sponsor_derivation_path = @@ -55,7 +55,7 @@ async fn main() -> Result<(), anyhow::Error> { Some(sponsor_derivation_path), None, )?; - println!("Sponsor address: {sponsor:?}"); + println!("Sponsor address: {sponsor}"); // Derive the address of the sender let sender = keystore.import_from_mnemonic( @@ -64,7 +64,7 @@ async fn main() -> Result<(), anyhow::Error> { Some(sender_derivation_path), None, )?; - println!("Sender address: {sender:?}"); + println!("Sender address: {sender}"); // This object id was fetched manually. It refers to a Basic Output object that // contains some Native Tokens. @@ -83,7 +83,7 @@ async fn main() -> Result<(), anyhow::Error> { .ok_or(anyhow!("Basic output not found"))?; let basic_output_object_ref = basic_output_object.object_ref(); - // Create a PTB to for claiming the assets of a basic output for the sender + // Create a PTB to claim the assets related to the basic output. let pt = { // Init the builder let mut builder = ProgrammableTransactionBuilder::new(); diff --git a/docs/examples/rust/stardust/nft-migration.rs b/docs/examples/rust/stardust/nft-migration.rs index 7d3faea7429..03257f3d67e 100644 --- a/docs/examples/rust/stardust/nft-migration.rs +++ b/docs/examples/rust/stardust/nft-migration.rs @@ -38,7 +38,7 @@ async fn main() -> Result<(), anyhow::Error> { // Derive the address of the first account and set it as default let sender = keystore.import_from_mnemonic(MAIN_ADDRESS_MNEMONIC, ED25519, None, None)?; - println!("{sender:?}"); + println!("Sender address: {sender}"); // Publish the package of a custom NFT collection and then get the package id. // The custom NFT module is obtained from a Move example in the docs. diff --git a/docs/examples/rust/stardust/nft-output-claim.rs b/docs/examples/rust/stardust/nft-output-claim.rs index 945702c13f8..d6a02c0348f 100644 --- a/docs/examples/rust/stardust/nft-output-claim.rs +++ b/docs/examples/rust/stardust/nft-output-claim.rs @@ -41,7 +41,7 @@ async fn main() -> Result<(), anyhow::Error> { // Derive the address of the first account and set it as default let sender = keystore.import_from_mnemonic(MAIN_ADDRESS_MNEMONIC, ED25519, None, None)?; - println!("{sender:?}"); + println!("Sender address: {sender}"); // Get a gas coin let gas_coin = iota_client diff --git a/docs/examples/typescript/package-lock.json b/docs/examples/typescript/package-lock.json new file mode 100644 index 00000000000..594095bbd8e --- /dev/null +++ b/docs/examples/typescript/package-lock.json @@ -0,0 +1,298 @@ +{ + "name": "typescript", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "typescript", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@iota/iota-sdk": "file:../../../sdk/typescript" + }, + "devDependencies": { + "@types/tmp": "^0.2.6", + "ts-node": "^10.9.2", + "typescript": "^5.6.3" + } + }, + "../../../sdk/typescript": { + "name": "@iota/iota-sdk", + "version": "0.2.0", + "license": "Apache-2.0", + "dependencies": { + "@graphql-typed-document-node/core": "^3.2.0", + "@iota/bcs": "workspace:*", + "@noble/curves": "^1.4.2", + "@noble/hashes": "^1.4.0", + "@scure/bip32": "^1.4.0", + "@scure/bip39": "^1.3.0", + "@suchipi/femver": "^1.0.0", + "bech32": "^2.0.0", + "gql.tada": "^1.8.2", + "graphql": "^16.9.0", + "tweetnacl": "^1.0.3", + "valibot": "^0.36.0" + }, + "devDependencies": { + "@0no-co/graphqlsp": "^1.12.11", + "@graphql-codegen/add": "^5.0.3", + "@graphql-codegen/cli": "^5.0.2", + "@graphql-codegen/typed-document-node": "^5.0.9", + "@graphql-codegen/typescript": "4.0.9", + "@graphql-codegen/typescript-operations": "^4.2.3", + "@iarna/toml": "^2.2.5", + "@iota/build-scripts": "workspace:^", + "@types/node": "^20.14.10", + "@types/tmp": "^0.2.6", + "@types/ws": "^8.5.10", + "cross-env": "^7.0.3", + "dotenv": "^16.4.5", + "graphql-config": "^5.0.3", + "msw": "^2.3.1", + "tmp": "^0.2.3", + "ts-retry-promise": "^0.8.1", + "typescript": "^5.5.3", + "vite": "^5.3.3", + "vitest": "^2.0.1", + "wait-on": "^7.2.0", + "ws": "^8.18.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@iota/iota-sdk": { + "resolved": "../../../sdk/typescript", + "link": true + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.7.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.7.tgz", + "integrity": "sha512-SRxCrrg9CL/y54aiMCG3edPKdprgMVGDXjA3gB8UmmBW5TcXzRUYAh8EWzTnSJFAd1rgImPELza+A3bJ+qxz8Q==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/@types/tmp": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/@types/tmp/-/tmp-0.2.6.tgz", + "integrity": "sha512-chhaNf2oKHlRkDGt+tiKE2Z5aJ6qalm7Z9rlLdBwmOiAAf09YQvvoLXjWK4HWPF1xU/fqvMgfNfpVoBscA/tKA==", + "dev": true, + "license": "MIT" + }, + "node_modules/acorn": { + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.13.0.tgz", + "integrity": "sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "license": "MIT" + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/typescript": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "license": "MIT" + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + } + } +} diff --git a/docs/examples/typescript/package.json b/docs/examples/typescript/package.json new file mode 100644 index 00000000000..5dc5db3f5b5 --- /dev/null +++ b/docs/examples/typescript/package.json @@ -0,0 +1,28 @@ +{ + "name": "typescript", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "address-unlock-condition": "ts-node src/stardust/address-unlock-condition.ts", + "alias-migration": "ts-node src/stardust/alias-migration.ts", + "alias-output-claim": "ts-node src/stardust/alias-output-claim.ts", + "basic-output-claim": "ts-node src/stardust/basic-output-claim.ts", + "check-basic-output-unlock-conditions": "ts-node src/stardust/check-basic-output-unlock-conditions.ts", + "foundry-output-claim": "ts-node src/stardust/foundry-output-claim.ts", + "iota-self-sponsor": "ts-node src/stardust/iota-self-sponsor.ts", + "nft-migration": "ts-node src/stardust/nft-migration.ts", + "nft-output-claim": "ts-node src/stardust/nft-output-claim.ts" + }, + "keywords": [], + "author": "", + "license": "ISC", + "description": "", + "devDependencies": { + "@types/tmp": "^0.2.6", + "ts-node": "^10.9.2", + "typescript": "^5.6.3" + }, + "dependencies": { + "@iota/iota-sdk": "file:../../../sdk/typescript" + } +} diff --git a/docs/examples/typescript/src/stardust/address-unlock-condition.ts b/docs/examples/typescript/src/stardust/address-unlock-condition.ts new file mode 100644 index 00000000000..1277fe874b7 --- /dev/null +++ b/docs/examples/typescript/src/stardust/address-unlock-condition.ts @@ -0,0 +1,181 @@ +/** Copyright (c) 2024 IOTA Stiftung + * SPDX-License-Identifier: Apache-2.0 + * + * Example demonstrating how to unlock an output owned by an alias output. + * In order to work, it requires a network with test objects + * generated from iota-genesis-builder/src/stardust/test_outputs. + */ + +import {getFullnodeUrl, IotaClient} from "@iota/iota-sdk/client"; +import {Ed25519Keypair} from "@iota/iota-sdk/keypairs/ed25519"; +import {fundAddress} from "../utils"; +import {bcs} from '@iota/iota-sdk/bcs' +import {Transaction} from "@iota/iota-sdk/transactions"; + +const MAIN_ADDRESS_MNEMONIC = "few hood high omit camp keep burger give happy iron evolve draft few dawn pulp jazz box dash load snake gown bag draft car"; +const STARDUST_PACKAGE_ID = "0x107a"; +const NFT_OUTPUT_MODULE_NAME = "nft_output"; +const NFT_OUTPUT_STRUCT_NAME = "NftOutput"; + +async function main() { + // Build a client to connect to the local IOTA network. + const iotaClient = new IotaClient({url: getFullnodeUrl('localnet')}); + + // For this example we need to derive an address that is not at index 0. This + // because we need an alias output that owns an Nft Output. In this case, we can + // derive the address index "/2'" of the "/0'" account. + const derivationPath = "m/44'/4218'/0'/0'/2'" + + // Derive the address of the first account. + const keypair = Ed25519Keypair.deriveKeypair(MAIN_ADDRESS_MNEMONIC, derivationPath); + + const sender = keypair.toIotaAddress(); + console.log(`Sender: ${sender}`); + + // Fund address from sponsor (in utils.ts). + await fundAddress(iotaClient, sender); + + // This object id was fetched manually. It refers to an Alias Output object that + // owns a NftOutput. + const aliasOutputObjectId = "0x3b35e67750b8e4ccb45b2fc4a6a26a6d97e74c37a532f17177e6324ab93eaca6"; + const aliasOutputObject = await iotaClient.getObject({id: aliasOutputObjectId}); + if (!aliasOutputObject) { + throw new Error("Alias output object not found"); + } + + // Get the dynamic field owned by the Alias Output, i.e., only the Alias + // object. + // The dynamic field name for the Alias object is "alias", of type vector. + const dfName = { + type: bcs.TypeTag.serialize({ + vector: { + u8: true, + }, + }).parse(), + value: "alias" + }; + + const aliasObject = await iotaClient.getDynamicFieldObject({ parentId: aliasOutputObjectId, name: dfName}); + if (!aliasObject) { + throw new Error("Alias object not found"); + } + + // Get the object id of the Alias object. + const aliasObjectId = aliasObject.data?.objectId; + + // Some objects are owned by the Alias object. In this case we filter them by + // type using the NftOutput type. + const gasTypeTag = "0x2::iota::IOTA"; + const nftOutputStructTag = `${STARDUST_PACKAGE_ID}::${NFT_OUTPUT_MODULE_NAME}::${NFT_OUTPUT_STRUCT_NAME}<${gasTypeTag}>`; + + const ownedObjects = await iotaClient.getOwnedObjects({ + owner: aliasObjectId ? aliasObjectId.toString() : "", + filter: { + StructType: nftOutputStructTag, + }, + }); + + // Get the first NftOutput found + const nftOutputObjectOwnedByAlias = ownedObjects.data?.[0]?.data; + if (!nftOutputObjectOwnedByAlias) { + throw new Error("Owned NftOutput not found"); + } + + const nftOutputObjectId = nftOutputObjectOwnedByAlias.objectId; + + // Create the ptb. + const tx = new Transaction(); + + // Extract alias output assets. + const typeArgs = [gasTypeTag]; + const args = [tx.object(aliasOutputObjectId)] + const extractedAliasOutputAssets = tx.moveCall({ + target: `${STARDUST_PACKAGE_ID}::alias_output::extract_assets`, + typeArguments: typeArgs, + arguments: args, + }); + + // Extract assets. + const extractedBaseToken = extractedAliasOutputAssets[0]; + const extractedNativeTokensBag = extractedAliasOutputAssets[1]; + const alias = extractedAliasOutputAssets[2]; + + // Extract the IOTA balance. + const iotaCoin = tx.moveCall({ + target: '0x2::coin::from_balance', + typeArguments: typeArgs, + arguments: [extractedBaseToken], + }); + + // Transfer the IOTA balance to the sender. + tx.transferObjects([iotaCoin], tx.pure.address(sender)); + + // Cleanup the bag by destroying it. + tx.moveCall({ + target: '0x2::bag::destroy_empty', + typeArguments: [], + arguments: [extractedNativeTokensBag], + }); + + // Unlock the nft output. + const aliasArg = alias; + const nftOutputArg = tx.object(nftOutputObjectId); + + const nftOutput = tx.moveCall({ + target: `${STARDUST_PACKAGE_ID}::address_unlock_condition::unlock_alias_address_owned_nft`, + typeArguments: typeArgs, + arguments: [aliasArg, nftOutputArg], + }); + + // Transferring alias asset. + tx.transferObjects([alias], tx.pure.address(sender)); + + // Extract the assets from the NftOutput (base token, native tokens bag, nft asset itself). + const extractedAssets = tx.moveCall({ + target: `${STARDUST_PACKAGE_ID}::nft_output::extract_assets`, + typeArguments: typeArgs, + arguments: [nftOutput], + }); + + // If the nft output can be unlocked, the command will be successful and will + // return a `base_token` (i.e., IOTA) balance and a `Bag` of native tokens and + // related nft object. + + const extractedBaseToken2 = extractedAssets[0]; + const extractedNativeTokensBag2 = extractedAssets[1]; + const nftAsset = extractedAssets[2]; + + // Extract the IOTA balance. + const iotaCoin2 = tx.moveCall({ + target: '0x2::coin::from_balance', + typeArguments: typeArgs, + arguments: [extractedBaseToken2], + }); + + // Transfer the IOTA balance to the sender. + tx.transferObjects([iotaCoin2], tx.pure.address(sender)); + + // Cleanup the bag because it is empty. + tx.moveCall({ + target: '0x2::bag::destroy_empty', + typeArguments: [], + arguments: [extractedNativeTokensBag2], + }); + + // Transferring nft asset. + tx.transferObjects([nftAsset], tx.pure.address(sender)); + + // Submit the ptb. + tx.setGasBudget(10_000_000); + + // Sign and execute the transaction. + const result = await iotaClient.signAndExecuteTransaction({ signer: keypair, transaction: tx }); + + // Get the response of the transaction. + const response = await iotaClient.waitForTransaction({ digest: result.digest }); + console.log(`Transaction digest: ${response.digest}`); +} + +main().catch(error => { + console.error(`Error: ${error.message}`); +}); \ No newline at end of file diff --git a/docs/examples/typescript/src/stardust/alias-migration.ts b/docs/examples/typescript/src/stardust/alias-migration.ts new file mode 100644 index 00000000000..4faee0a3fda --- /dev/null +++ b/docs/examples/typescript/src/stardust/alias-migration.ts @@ -0,0 +1,184 @@ +/** Copyright (c) 2024 IOTA Stiftung + * SPDX-License-Identifier: Apache-2.0 + * + * Example demonstrating the conversion of a stardust Alias into a custom + * user's NFT collections controller. In order to work, it requires a network + * with test objects generated from + * iota-genesis-builder/src/stardust/test_outputs. + */ + +import {getFullnodeUrl, IotaClient, IotaParsedData} from "@iota/iota-sdk/client"; +import {Ed25519Keypair} from "@iota/iota-sdk/keypairs/ed25519"; +import {publishCustomNftPackage} from "../utils"; +import {Transaction} from "@iota/iota-sdk/transactions"; + +const MAIN_ADDRESS_MNEMONIC = "okay pottery arch air egg very cave cash poem gown sorry mind poem crack dawn wet car pink extra crane hen bar boring salt"; +const STARDUST_PACKAGE_ID = "0x107a"; + +async function main() { + // Build a client to connect to the local IOTA network. + const iotaClient = new IotaClient({url: getFullnodeUrl('localnet')}); + + // Derive the address of the first account. + const keypair = Ed25519Keypair.deriveKeypair(MAIN_ADDRESS_MNEMONIC); + const sender = keypair.toIotaAddress(); + console.log(`Sender address: ${sender}`); + + // Publish the package of a custom NFT collection and then get the package id. + // The custom NFT module is obtained from a Move example in the docs. + // It is the same used in the Nft migration example. + const customNftPackageId = await publishCustomNftPackage(iotaClient, keypair); + + // Get the AliasOutput object. + const aliasOutputObjectId = "0x354a1864c8af23fde393f7603bc133f755a9405353b30878e41b929eb7e37554"; + const aliasOutputObject = await iotaClient.getObject({id: aliasOutputObjectId, options: { showContent: true }}); + if (!aliasOutputObject) { + throw new Error("Alias output object not found"); + } + + // Extract contents of the AliasOutput object. + const moveObject = aliasOutputObject.data?.content as IotaParsedData; + if (moveObject.dataType != "moveObject") { + throw new Error("AliasOutput is not a move object"); + } + + // Treat fields as key-value object. + const fields = moveObject.fields as Record; + + // Access fields by key + // const id = fields['id']; // UID field + // const balance = fields['balance']; // Balance field + const nativeTokensBag = fields['native_tokens']; // Bag field + + // Extract the keys of the native_tokens bag if it is not empty; the keys + // are the type_arg of each native token, so they can be used later in the PTB. + const dfTypeKeys: string[] = []; + if (nativeTokensBag.fields.size > 0) { + // Get the dynamic fields owned by the native tokens bag. + const dynamicFieldPage = await iotaClient.getDynamicFields({ + parentId: nativeTokensBag.fields.id.id + }); + + // Extract the dynamic fields keys, i.e., the native token type. + dynamicFieldPage.data.forEach(dynamicField => { + if (typeof dynamicField.name.value === 'string') { + dfTypeKeys.push(dynamicField.name.value); + } else { + throw new Error('Dynamic field key is not a string'); + } + }); + } + + // Create a PTB that extracts the related stardust Alias from the AliasOutput + // and then calls the + // `custom_nft::collection::convert_alias_to_collection_controller_cap` function + // to convert it into an NFT collection controller, create a collection and mint + // a few NFTs. + const tx = new Transaction(); + const gasTypeTag = "0x2::iota::IOTA"; + const args = [tx.object(aliasOutputObjectId)]; + + // Call the nft_output::extract_assets function. + const extractedAliasOutputAssets = tx.moveCall({ + target: `${STARDUST_PACKAGE_ID}::alias_output::extract_assets`, + typeArguments: [gasTypeTag], + arguments: args, + }); + + // The alias output can always be unlocked by the governor address. So the + // command will be successful and will return a `base_token` (i.e., IOTA) + // balance, a `Bag` of the related native tokens and the related Alias object. + // Extract contents. + const extractedBaseToken = extractedAliasOutputAssets[0]; + let extractedNativeTokensBag: any = extractedAliasOutputAssets[1]; + const alias = extractedAliasOutputAssets[2]; + + // Call the conversion function to create an NFT collection controller from the + // extracted alias. + let nftCollectionController = tx.moveCall({ + target: `${customNftPackageId}::collection::convert_alias_to_collection_controller_cap`, + typeArguments: [], + arguments: [alias], + }); + + // Create an NFT collection. + let nftCollection = tx.moveCall({ + target: `${customNftPackageId}::collection::create_collection`, + typeArguments: [], + arguments: [nftCollectionController, tx.pure.string("Collection name")], + }); + + // Mint a collection-related NFT. + const nftName = tx.pure.string("NFT name"); + const nftDescription = tx.pure.string("NFT description"); + const nftUrlVal = tx.pure.string("NFT URL"); + + const nftUrl = tx.moveCall({ + target: `0x2::url::new_unsafe`, + typeArguments: [], + arguments: [nftUrlVal], + }); + + const nft = tx.moveCall({ + target: `${customNftPackageId}::nft::mint_collection_related`, + typeArguments: [], + arguments: [nftCollection, nftName, nftDescription, nftUrl], + }); + + // Transfer the NFT. + tx.transferObjects([nft], tx.pure.address(sender)); + + // Drop the NFT collection to make impossible to mint new related NFTs. + tx.moveCall({ + target: `${customNftPackageId}::collection::drop_collection`, + typeArguments: [], + arguments: [nftCollectionController, nftCollection], + }); + + // Transfer the NFT collection controller. + tx.transferObjects([nftCollectionController], tx.pure.address(sender)); + + // Extract the IOTA balance. + const iotaCoin = tx.moveCall({ + target: '0x2::coin::from_balance', + typeArguments: [gasTypeTag], + arguments: [extractedBaseToken], + }); + + // Transfer the IOTA balance to the sender. + tx.transferObjects([iotaCoin], tx.pure.address(sender)); + + // Extract the native tokens from the bag. + for (const typeKey of dfTypeKeys) { + const typeArguments = [`0x${typeKey}`]; + const args = [extractedNativeTokensBag, tx.pure.address(sender)] + + extractedNativeTokensBag = tx.moveCall({ + target: `${STARDUST_PACKAGE_ID}::utilities::extract_and_send_to`, + typeArguments: typeArguments, + arguments: args, + }); + } + + // Cleanup the bag by destroying it. + tx.moveCall({ + target: `0x2::bag::destroy_empty`, + typeArguments: [], + arguments: [extractedNativeTokensBag], + }); + + // Set the gas budget for the transaction. + tx.setGasBudget(10_000_000); + + // Sign and execute the transaction. + const result = await iotaClient.signAndExecuteTransaction({ signer: keypair, transaction: tx }); + + // Get the response of the transaction. + const response = await iotaClient.waitForTransaction({ digest: result.digest }); + console.log(`Transaction digest: ${response.digest}`); + +} + +main().catch(error => { + console.error(`Error: ${error.message}`); +}); \ No newline at end of file diff --git a/docs/examples/typescript/src/stardust/alias-output-claim.ts b/docs/examples/typescript/src/stardust/alias-output-claim.ts new file mode 100644 index 00000000000..9886415e317 --- /dev/null +++ b/docs/examples/typescript/src/stardust/alias-output-claim.ts @@ -0,0 +1,134 @@ +/** Copyright (c) 2024 IOTA Stiftung + * SPDX-License-Identifier: Apache-2.0 + * + * Example demonstrating the claim of an alias output. + * In order to work, it requires a network with test objects + * generated from iota-genesis-builder/src/stardust/test_outputs. + */ +import {getFullnodeUrl, IotaClient, IotaParsedData} from "@iota/iota-sdk/client"; +import {Ed25519Keypair} from "@iota/iota-sdk/keypairs/ed25519"; +import {Transaction} from "@iota/iota-sdk/transactions"; + +const MAIN_ADDRESS_MNEMONIC = "okay pottery arch air egg very cave cash poem gown sorry mind poem crack dawn wet car pink extra crane hen bar boring salt"; +const STARDUST_PACKAGE_ID = "0x107a"; + +async function main() { + // Build a client to connect to the local IOTA network. + const iotaClient = new IotaClient({url: getFullnodeUrl('localnet')}); + + // Derive the address of the first account. + const keypair = Ed25519Keypair.deriveKeypair(MAIN_ADDRESS_MNEMONIC); + const sender = keypair.toIotaAddress(); + console.log(`Sender address: ${sender}`); + + // Get the AliasOutput object. + const aliasOutputObjectId = "0x354a1864c8af23fde393f7603bc133f755a9405353b30878e41b929eb7e37554"; + const aliasOutputObject = await iotaClient.getObject({id: aliasOutputObjectId, options: { showContent: true }}); + if (!aliasOutputObject) { + throw new Error("Alias output object not found"); + } + + // Extract contents of the AliasOutput object. + const moveObject = aliasOutputObject.data?.content as IotaParsedData; + if (moveObject.dataType != "moveObject") { + throw new Error("AliasOutput is not a move object"); + } + + // Treat fields as key-value object. + const fields = moveObject.fields as Record; + + // Access fields by key + // const id = fields['id']; // UID field + // const balance = fields['balance']; // Balance field + const nativeTokensBag = fields['native_tokens']; // Bag field + + // Extract the keys of the native_tokens bag if it is not empty; the keys + // are the type_arg of each native token, so they can be used later in the PTB. + const dfTypeKeys: string[] = []; + if (nativeTokensBag.fields.size > 0) { + // Get the dynamic fields owned by the native tokens bag. + const dynamicFieldPage = await iotaClient.getDynamicFields({ + parentId: nativeTokensBag.fields.id.id + }); + + // Extract the dynamic fields keys, i.e., the native token type. + dynamicFieldPage.data.forEach(dynamicField => { + if (typeof dynamicField.name.value === 'string') { + dfTypeKeys.push(dynamicField.name.value); + } else { + throw new Error('Dynamic field key is not a string'); + } + }); + } + + // Create a PTB to claim the assets related to the alias output. + const tx = new Transaction(); + // Type argument for an AliasOutput coming from the IOTA network, i.e., the + // IOTA token or the Gas type tag. + const gasTypeTag = "0x2::iota::IOTA"; + // Then pass the AliasOutput object as an input. + const args = [tx.object(aliasOutputObjectId)]; + // Finally call the alias_output::extract_assets function. + const extractedAliasOutputAssets = tx.moveCall({ + target: `${STARDUST_PACKAGE_ID}::alias_output::extract_assets`, + typeArguments: [gasTypeTag], + arguments: args, + }); + + // The alias output can always be unlocked by the governor address. So the + // command will be successful and will return a `base_token` (i.e., IOTA) + // balance, a `Bag` of the related native tokens and the related Alias object. + // Extract contents. + const extractedBaseToken = extractedAliasOutputAssets[0]; + let extractedNativeTokensBag: any = extractedAliasOutputAssets[1]; + const alias = extractedAliasOutputAssets[2]; + + // Extract the IOTA balance. + const iotaCoin = tx.moveCall({ + target: '0x2::coin::from_balance', + typeArguments: [gasTypeTag], + arguments: [extractedBaseToken], + }); + + // Transfer the IOTA balance to the sender. + tx.transferObjects([iotaCoin], tx.pure.address(sender)); + + // Extract the native tokens from the bag. + for (const typeKey of dfTypeKeys) { + const typeArguments = [`0x${typeKey}`]; + const args = [extractedNativeTokensBag, tx.pure.address(sender)] + + // Extract a native token balance. + extractedNativeTokensBag = tx.moveCall({ + target: `${STARDUST_PACKAGE_ID}::utilities::extract_and_send_to`, + typeArguments: typeArguments, + arguments: args, + }); + } + + // Cleanup the bag by destroying it. + tx.moveCall({ + target: `0x2::bag::destroy_empty`, + typeArguments: [], + arguments: [extractedNativeTokensBag], + }); + + // Transfer the alias asset. + tx.transferObjects([alias], tx.pure.address(sender)); + + // Set the gas budget for the transaction. + tx.setGasBudget(10_000_000); + + // Sign and execute the transaction. + const result = await iotaClient.signAndExecuteTransaction({ signer: keypair, transaction: tx }); + + // Get the response of the transaction. + const response = await iotaClient.waitForTransaction({ digest: result.digest }); + console.log(`Transaction digest: ${response.digest}`); + +} + + +main().catch(error => { + console.error(`Error: ${error.message}`); +}); \ No newline at end of file diff --git a/docs/examples/typescript/src/stardust/basic-output-claim.ts b/docs/examples/typescript/src/stardust/basic-output-claim.ts new file mode 100644 index 00000000000..72e07e4c257 --- /dev/null +++ b/docs/examples/typescript/src/stardust/basic-output-claim.ts @@ -0,0 +1,133 @@ +/** Copyright (c) 2024 IOTA Stiftung + * SPDX-License-Identifier: Apache-2.0 + * + * Example demonstrating the claim of a basic output. + * In order to work, it requires a network with test objects + * generated from iota-genesis-builder/src/stardust/test_outputs. + */ + +import {getFullnodeUrl, IotaClient, IotaParsedData} from "@iota/iota-sdk/client"; +import {Ed25519Keypair} from "@iota/iota-sdk/keypairs/ed25519"; +import {Transaction} from "@iota/iota-sdk/transactions"; + +const MAIN_ADDRESS_MNEMONIC = "rain flip mad lamp owner siren tower buddy wolf shy tray exit glad come dry tent they pond wrist web cliff mixed seek drum"; +const STARDUST_PACKAGE_ID = "0x107a"; + +async function main() { + // Build a client to connect to the local IOTA network. + const iotaClient = new IotaClient({url: getFullnodeUrl('localnet')}); + + // Derive the address of the first account. + const keypair = Ed25519Keypair.deriveKeypair(MAIN_ADDRESS_MNEMONIC); + const sender = keypair.toIotaAddress(); + console.log(`Sender address: ${sender}`); + + // This object id was fetched manually. It refers to a Basic Output object that + // contains some Native Tokens. + const basicOutputObjectId = "0xde09139ed46b9f5f876671e4403f312fad867c5ae5d300a252e4b6a6f1fa1fbd"; + + // Get Basic Output object. + const basicOutputObject = await iotaClient.getObject({id: basicOutputObjectId, options: { showContent: true }}); + if (!basicOutputObject) { + throw new Error("Basic output object not found"); + } + + // Extract contents of the BasicOutput object. + const moveObject = basicOutputObject.data?.content as IotaParsedData; + if (moveObject.dataType != "moveObject") { + throw new Error("BasicOutput is not a move object"); + } + + // Treat fields as key-value object. + const fields = moveObject.fields as Record; + + // Access fields by key + // const id = fields['id']; // UID field + // const balance = fields['balance']; // Balance field + const nativeTokensBag = fields['native_tokens']; // Bag field + + // Extract the keys of the native_tokens bag if it is not empty; the keys + // are the type_arg of each native token, so they can be used later in the PTB. + const dfTypeKeys: string[] = []; + if (nativeTokensBag.fields.size > 0) { + // Get the dynamic fields owned by the native tokens bag. + const dynamicFieldPage = await iotaClient.getDynamicFields({ + parentId: nativeTokensBag.fields.id.id + }); + + // Extract the dynamic fields keys, i.e., the native token type. + dynamicFieldPage.data.forEach(dynamicField => { + if (typeof dynamicField.name.value === 'string') { + dfTypeKeys.push(dynamicField.name.value); + } else { + throw new Error('Dynamic field key is not a string'); + } + }); + } + + // Create a PTB to claim the assets related to the basic output. + const tx = new Transaction(); + + ////// Command #1: extract the base token and native tokens bag. + // Type argument for a Basic Output coming from the IOTA network, i.e., the IOTA + // token or Gas type tag + const gasTypeTag = "0x2::iota::IOTA"; + // Then pass the basic output object as input. + const args = [tx.object(basicOutputObjectId)]; + // Finally call the basic_output::extract_assets function. + const extractedBasicOutputAssets = tx.moveCall({ + target: `${STARDUST_PACKAGE_ID}::basic_output::extract_assets`, + typeArguments: [gasTypeTag], + arguments: args, + }); + + // If the basic output can be unlocked, the command will be successful and will + // return a `base_token` (i.e., IOTA) balance and a `Bag` of native tokens. + const extractedBaseToken = extractedBasicOutputAssets[0]; + let extractedNativeTokensBag: any = extractedBasicOutputAssets[1]; + + // Extract the IOTA balance. + const iotaCoin = tx.moveCall({ + target: '0x2::coin::from_balance', + typeArguments: [gasTypeTag], + arguments: [extractedBaseToken], + }); + + // Send back the base token coin to the user. + tx.transferObjects([iotaCoin], tx.pure.address(sender)); + + ////// Extract the native tokens from the Bag and send them to sender. + for (const typeKey of dfTypeKeys) { + // Type argument for a Native Token contained in the basic output bag. + const typeArguments = [`0x${typeKey}`]; + // Then pass the the bag and the receiver address as input. + const args = [extractedNativeTokensBag, tx.pure.address(sender)] + + extractedNativeTokensBag = tx.moveCall({ + target: `${STARDUST_PACKAGE_ID}::utilities::extract_and_send_to`, + typeArguments: typeArguments, + arguments: args, + }); + } + + // Cleanup the bag by destroying it. + tx.moveCall({ + target: `0x2::bag::destroy_empty`, + typeArguments: [], + arguments: [extractedNativeTokensBag], + }); + + // Set the gas budget for the transaction. + tx.setGasBudget(10_000_000); + + // Sign and execute the transaction. + const result = await iotaClient.signAndExecuteTransaction({ signer: keypair, transaction: tx }); + + // Get the response of the transaction. + const response = await iotaClient.waitForTransaction({ digest: result.digest }); + console.log(`Transaction digest: ${response.digest}`); +} + +main().catch(error => { + console.error(`Error: ${error.message}`); +}); \ No newline at end of file diff --git a/docs/examples/typescript/src/stardust/check-basic-output-unlock-conditions.ts b/docs/examples/typescript/src/stardust/check-basic-output-unlock-conditions.ts new file mode 100644 index 00000000000..f852a104cac --- /dev/null +++ b/docs/examples/typescript/src/stardust/check-basic-output-unlock-conditions.ts @@ -0,0 +1,55 @@ +/** Copyright (c) 2024 IOTA Stiftung + * SPDX-License-Identifier: Apache-2.0 + * + * Example demonstrating queries for checking the unlock conditions of a basic + * output. In order to work, it requires a network with test objects + * generated from iota-genesis-builder/src/stardust/test_outputs. + */ + +import {getFullnodeUrl, IotaClient, IotaParsedData} from "@iota/iota-sdk/client"; +import {Ed25519Keypair} from "@iota/iota-sdk/keypairs/ed25519"; +import {Transaction} from "@iota/iota-sdk/transactions"; + +async function main() { + // Build a client to connect to the local IOTA network. + const iotaClient = new IotaClient({url: getFullnodeUrl('localnet')}); + + // This object id was fetched manually. It refers to a Basic Output object that + // contains some Native Tokens. + const basicOutputObjectId = "0xde09139ed46b9f5f876671e4403f312fad867c5ae5d300a252e4b6a6f1fa1fbd"; + // Get Basic Output object. + const basicOutputObject = await iotaClient.getObject({id: basicOutputObjectId, options: { showContent: true }}); + if (!basicOutputObject) { + throw new Error("Basic output object not found"); + } + + // Extract contents of the BasicOutput object. + const moveObject = basicOutputObject.data?.content as IotaParsedData; + if (moveObject.dataType != "moveObject") { + throw new Error("BasicOutput is not a move object"); + } + + // Treat fields as key-value object. + const fields = moveObject.fields as Record; + console.log(fields); + + const storageDepositReturnUc = fields['storage_deposit_return_uc']; + if (storageDepositReturnUc) { + console.log(`Storage Deposit Return Unlock Condition info: ${storageDepositReturnUc}`); + } + + const timeLockUc = fields['time_lock_uc']; + if (timeLockUc) { + console.log(`Timelocked until: ${timeLockUc}`); + } + + const expirationUc = fields['expiration_uc']; + if (expirationUc) { + console.log(`Expiration Unlock Condition info: ${expirationUc}`); + } + +} + +main().catch(error => { + console.error(`Error: ${error.message}`); +}); \ No newline at end of file diff --git a/docs/examples/typescript/src/stardust/foundry-output-claim.ts b/docs/examples/typescript/src/stardust/foundry-output-claim.ts new file mode 100644 index 00000000000..5bbcbcffe9c --- /dev/null +++ b/docs/examples/typescript/src/stardust/foundry-output-claim.ts @@ -0,0 +1,169 @@ +/** Copyright (c) 2024 IOTA Stiftung + * SPDX-License-Identifier: Apache-2.0 + * + * Example demonstrating the claim of a CoinManagerTreasuryCap related to a + * foundry output. In order to work, it requires a network with test objects + * generated from iota-genesis-builder/src/stardust/test_outputs. + */ +import {getFullnodeUrl, IotaClient, IotaObjectData} from "@iota/iota-sdk/client"; +import {Ed25519Keypair} from "@iota/iota-sdk/keypairs/ed25519"; +import {fundAddress} from "../utils"; +import {bcs} from "@iota/iota-sdk/bcs"; +import * as assert from "node:assert"; +import {Transaction} from "@iota/iota-sdk/transactions"; + +const MAIN_ADDRESS_MNEMONIC = "few hood high omit camp keep burger give happy iron evolve draft few dawn pulp jazz box dash load snake gown bag draft car"; +const STARDUST_PACKAGE_ID = "0x107a"; +const COIN_MANAGER_MODULE_NAME = "coin_manager"; +const COIN_MANAGER_TREASURY_CAP_STRUCT_NAME = "CoinManagerTreasuryCap"; +const IOTA_FRAMEWORK_ADDRESS = "0x2"; + +async function main() { + // Build a client to connect to the local IOTA network. + const iotaClient = new IotaClient({url: getFullnodeUrl('localnet')}); + + // Derive the address of the first account. + const keypair = Ed25519Keypair.deriveKeypair(MAIN_ADDRESS_MNEMONIC); + const sender = keypair.toIotaAddress(); + console.log(`Sender address: ${sender}`); + + // Fund the sender address. + await fundAddress(iotaClient, sender); + + // This object id was fetched manually. It refers to an Alias Output object that + // contains a CoinManagerTreasuryCap (i.e., a Foundry representation). + const aliasOutputObjectId = "0xa58e9b6b85863e2fa50710c4594f701b2f5e2c6ff5e3c2b10cf09e6b18d740da"; + const aliasOutputObject = await iotaClient.getObject({id: aliasOutputObjectId}); + if (!aliasOutputObject) { + throw new Error("Alias output object not found"); + } + + // Get the dynamic field owned by the Alias Output, i.e., only the Alias + // object. + // The dynamic field name for the Alias object is "alias", of type vector. + const dfName = { + type: bcs.TypeTag.serialize({ + vector: { + u8: true, + }, + }).parse(), + value: "alias" + }; + + const aliasObject = await iotaClient.getDynamicFieldObject({ parentId: aliasOutputObjectId, name: dfName}); + if (!aliasObject) { + throw new Error("Alias object not found"); + } + + // Get the object id of the Alias object. + const aliasObjectId = aliasObject.data?.objectId; + + // Get the objects owned by the alias object and filter in the ones with + // CoinManagerTreasuryCap as type. + const aliasOwnedObjects = await iotaClient.getOwnedObjects({ + owner: aliasObjectId ? aliasObjectId.toString() : "", + options: { + showBcs: true, + showType: true + }, + }); + + // Only one page should exist. + assert.ok(!aliasOwnedObjects.hasNextPage, "Only one page should exist"); + + // Get the CoinManagerTreasuryCaps from the query. + const ownedCoinManagerTreasuryCaps = aliasOwnedObjects.data + .filter(object => { + return isCoinManagerTreasuryCap(object.data as IotaObjectData); + }); + + // Get only the first coin manager treasury cap. + const coinManagerTreasuryCap = ownedCoinManagerTreasuryCaps[0]?.data; + if (!coinManagerTreasuryCap) { + throw new Error("CoinManagerTreasuryCap not found"); + } + + const coinManagerTreasuryCapId = coinManagerTreasuryCap.objectId; + + // Extract the foundry token type from the type parameters of the coin manager + // treasury cap object. + const foundryTokenTypeStructTag = coinManagerTreasuryCap.type + const foundryTokenType = foundryTokenTypeStructTag?.split("<")[1].split(">")[0] || ""; + + // Create a PTB to claim the CoinManagerTreasuryCap related to the foundry + // output from the alias output. + const tx = new Transaction(); + // Type argument for an AliasOutput coming from the IOTA network, i.e., the + // IOTA token or the Gas type tag. + const gasTypeTag = "0x2::iota::IOTA"; + // Then pass the AliasOutput object as an input. + const args = [tx.object(aliasOutputObjectId)]; + // Finally call the alias_output::extract_assets function. + const extractedAliasOutputAssets = tx.moveCall({ + target: `${STARDUST_PACKAGE_ID}::alias_output::extract_assets`, + typeArguments: [gasTypeTag], + arguments: args, + }); + + // The alias output can always be unlocked by the governor address. So the + // command will be successful and will return a `base_token` (i.e., IOTA) + // balance, a `Bag` of the related native tokens and the related Alias object. + const extractedBaseToken = extractedAliasOutputAssets[0]; + const extractedNativeTokensBag = extractedAliasOutputAssets[1]; + const alias = extractedAliasOutputAssets[2]; + + // Extract the IOTA balance. + const iotaCoin = tx.moveCall({ + target: '0x2::coin::from_balance', + typeArguments: [gasTypeTag], + arguments: [extractedBaseToken], + }); + + // Transfer the IOTA balance to the sender. + tx.transferObjects([iotaCoin], tx.pure.address(sender)); + + // In this example the native tokens bag is empty, so it can be destroyed. + tx.moveCall({ + target: '0x2::bag::destroy_empty', + typeArguments: [], + arguments: [extractedNativeTokensBag], + }); + + // Extract the CoinManagerTreasuryCap. + const coinManagerTreasuryCapObject = tx.moveCall({ + target: `${STARDUST_PACKAGE_ID}::address_unlock_condition::unlock_alias_address_owned_coinmanager_treasury`, + typeArguments: [foundryTokenType], + arguments: [alias, tx.object(coinManagerTreasuryCapId)], + }); + + // Transfer the coin manager treasury cap. + tx.transferObjects([coinManagerTreasuryCapObject], tx.pure.address(sender)); + + // Transfer the alias asset. + tx.transferObjects([alias], tx.pure.address(sender)); + + // Set the gas budget for the transaction. + tx.setGasBudget(10_000_000); + + // Sign and execute the transaction. + const result = await iotaClient.signAndExecuteTransaction({ signer: keypair, transaction: tx }); + + // Get the response of the transaction. + const response = await iotaClient.waitForTransaction({ digest: result.digest }); + console.log(`Transaction digest: ${response.digest}`); +} + +/** + * Check if the object is a CoinManagerTreasuryCap. + */ +function isCoinManagerTreasuryCap(object: IotaObjectData): boolean { + const splitType = object.type?.split("::"); + return splitType !== undefined && + splitType[0] === IOTA_FRAMEWORK_ADDRESS && + splitType[1] === COIN_MANAGER_MODULE_NAME && + splitType[2].split("<")[0] === COIN_MANAGER_TREASURY_CAP_STRUCT_NAME; +} + +main().catch(error => { + console.error(`Error: ${error.message}`); +}); \ No newline at end of file diff --git a/docs/examples/typescript/src/stardust/iota-self-sponsor.ts b/docs/examples/typescript/src/stardust/iota-self-sponsor.ts new file mode 100644 index 00000000000..df6e6c375d0 --- /dev/null +++ b/docs/examples/typescript/src/stardust/iota-self-sponsor.ts @@ -0,0 +1,118 @@ +/** Copyright (c) 2024 IOTA Stiftung + * SPDX-License-Identifier: Apache-2.0 + * + * Example demonstrating the self-sponsor scenario for claiming a Iota basic + * output. In order to work, it requires a network with test objects + * generated from iota-genesis-builder/src/stardust/test_outputs. + */ +import {getFullnodeUrl, IotaClient} from "@iota/iota-sdk/client"; +import {Ed25519Keypair} from "@iota/iota-sdk/keypairs/ed25519"; +import {Transaction} from "@iota/iota-sdk/transactions"; + +const MAIN_ADDRESS_MNEMONIC = "crazy drum raw dirt tooth where fee base warm beach trim rule sign silk fee fee dad large creek venue coin steel hub scale"; +const STARDUST_PACKAGE_ID = "0x107a"; + +async function main() { + // Build a client to connect to the local IOTA network. + const iotaClient = new IotaClient({url: getFullnodeUrl('localnet')}); + + // For this example we need to derive addresses that are at different + // indexes and coin_types, one for sponsoring with IOTA coin type and one for + // claiming the Basic Output with Iota coin type. + const sponsorDerivationPath = "m/44'/4218'/0'/0'/5'" + const senderDerivationPath = "m/44'/4218'/0'/0'/50'" + + // Derive the address of the sponsor. + const sponsorKeypair = Ed25519Keypair.deriveKeypair(MAIN_ADDRESS_MNEMONIC, sponsorDerivationPath); + // Derive the address of the sender. + const senderKeypair = Ed25519Keypair.deriveKeypair(MAIN_ADDRESS_MNEMONIC, senderDerivationPath); + + const sponsor = sponsorKeypair.toIotaAddress(); + const sender = senderKeypair.toIotaAddress(); + + console.log(`Sender: ${sender}`); + console.log(`Sponsor: ${sponsor}`); + + // This object id was fetched manually. It refers to a Basic Output object that + // contains some Native Tokens. + const basicOutputObjectId = "0xd0ed7f2c50366202585ebd52a38cde6a7a7282ef3f52db52c3ba87042bca6fba"; + // Get Basic Output object. + const basicOutputObject = await iotaClient.getObject({id: basicOutputObjectId, options: { showBcs: true }}); + if (!basicOutputObject) { + throw new Error("Basic output object not found"); + } + + // Create a PTB to claim the assets related to the basic output. + const tx = new Transaction(); + // Extract the base token and native tokens bag. + // Type argument for a Basic Output holding IOTA coin. + const gasTypeTag = "0x2::iota::IOTA"; + // Then pass the basic output object as input. + const args = [tx.object(basicOutputObjectId)]; + // Finally call the basic_output::extract_assets function. + const extractedBasicOutputAssets = tx.moveCall({ + target: `${STARDUST_PACKAGE_ID}::basic_output::extract_assets`, + typeArguments: [gasTypeTag], + arguments: args, + }); + + // If the basic output can be unlocked, the command will be successful and will + // return a `base_token` balance and a `Bag` of native tokens. + const extractedBaseToken = extractedBasicOutputAssets[0]; + const extractedNativeTokensBag = extractedBasicOutputAssets[1]; + + // Delete the empty native tokens bag. + tx.moveCall({ + target: `0x2::bag::destroy_empty`, + typeArguments: [], + arguments: [extractedNativeTokensBag], + }); + + // Create a coin from the extracted IOTA balance. + const iotaCoin = tx.moveCall({ + target: '0x2::coin::from_balance', + typeArguments: [gasTypeTag], + arguments: [extractedBaseToken], + }); + + // Send back the base token coin to the user. + tx.transferObjects([iotaCoin], tx.pure.address(sender)); + + // Get a gas coin belonging to the sponsor. + const sponsorGasObjects = await iotaClient.getCoins({ owner: sponsor }); + const sponsorGasCoin = sponsorGasObjects.data?.[0]; + + if (!sponsorGasCoin) { + throw new Error('No coins found for sponsor'); + } + + tx.setSender(sender); + tx.setGasOwner(sponsor); + // Set sponsor’s gas object to cover fees. + tx.setGasPayment([{ + objectId: sponsorGasCoin.coinObjectId, + version: sponsorGasCoin.version, + digest: sponsorGasCoin.digest + }]); + tx.setGasBudget(10_000_000); + + // Sign the transaction with the sponsor and sender keypairs. + const sponsorSignedTransaction = await tx.sign({ client: iotaClient, signer: sponsorKeypair }); + const senderSignedTransaction = await tx.sign({ client: iotaClient, signer: senderKeypair }); + + // Build the transaction and execute it. + const builtTransaction = await tx.build({ client: iotaClient }); + const result = await iotaClient.executeTransactionBlock({ + transactionBlock: builtTransaction, + signature: [sponsorSignedTransaction.signature, senderSignedTransaction.signature] + }); + + // Get the response of the transaction. + const response = await iotaClient.waitForTransaction({ digest: result.digest }); + console.log(`Transaction digest: ${response.digest}`); + +} + +main().catch(error => { + console.error(`Error: ${error.message}`); +}); \ No newline at end of file diff --git a/docs/examples/typescript/src/stardust/nft-migration.ts b/docs/examples/typescript/src/stardust/nft-migration.ts new file mode 100644 index 00000000000..33e2387a052 --- /dev/null +++ b/docs/examples/typescript/src/stardust/nft-migration.ts @@ -0,0 +1,101 @@ +/** Copyright (c) 2024 IOTA Stiftung + * SPDX-License-Identifier: Apache-2.0 + * + * Example demonstrating the conversion of a stardust NFT into a custom user's + * NFT. In order to work, it requires a network with test objects + * generated from iota-genesis-builder/src/stardust/test_outputs. + */ + +import {getFullnodeUrl, IotaClient} from "@iota/iota-sdk/client"; +import {Ed25519Keypair} from "@iota/iota-sdk/keypairs/ed25519"; +import {publishCustomNftPackage} from "../utils"; +import {Transaction} from "@iota/iota-sdk/transactions"; + +const MAIN_ADDRESS_MNEMONIC = "okay pottery arch air egg very cave cash poem gown sorry mind poem crack dawn wet car pink extra crane hen bar boring salt"; +const STARDUST_PACKAGE_ID = "0x107a"; + +async function main() { + // Build a client to connect to the local IOTA network. + const iotaClient = new IotaClient({url: getFullnodeUrl('localnet')}); + + // Derive the address of the first account. + const keypair = Ed25519Keypair.deriveKeypair(MAIN_ADDRESS_MNEMONIC); + const sender = keypair.toIotaAddress(); + console.log(`Sender address: ${sender}`); + + // Publish the package of a custom NFT collection and then get the package id. + // The custom NFT module is obtained from a Move example in the docs. + // It is the same used in the Alias migration example. + const customNftPackageId = await publishCustomNftPackage(iotaClient, keypair); + + // Get an NftOutput object id. + const nftOutputObjectId = "0x6445847625cec7d1265ebb9d0da8050a2e43d2856c2746d3579df499a1a64226"; + // Get an NftOutput object. + const nftOutputObject = await iotaClient.getObject({id: nftOutputObjectId, options: { showContent: true }}); + if (!nftOutputObject) { + throw new Error("NFT output object not found"); + } + + // Create a PTB that extracts the stardust NFT from an NFTOutput and then calls + // the `custom_nft::nft::convert` function for converting it into a custom NFT + // of the just published package. + const tx = new Transaction(); + const gasTypeTag = "0x2::iota::IOTA"; + const args = [tx.object(nftOutputObjectId)]; + // Call the nft_output::extract_assets function. + const extractedNftOutputAssets = tx.moveCall({ + target: `${STARDUST_PACKAGE_ID}::nft_output::extract_assets`, + typeArguments: [gasTypeTag], + arguments: args, + }); + + // If the nft output can be unlocked, the command will be successful + // and will return a `base_token` (i.e., IOTA) balance and a + // `Bag` of native tokens and related nft object. + const extractedBaseToken = extractedNftOutputAssets[0]; + const extractedNativeTokensBag = extractedNftOutputAssets[1]; + const nft = extractedNftOutputAssets[2]; + + // Call the conversion function to create a custom nft from the stardust nft + // asset. + let customNft = tx.moveCall({ + target: `${customNftPackageId}::nft::convert`, + typeArguments: [], + arguments: [nft], + }); + + // Transfer the converted NFT. + tx.transferObjects([customNft], tx.pure.address(sender)); + + // Extract the IOTA balance. + const iotaCoin = tx.moveCall({ + target: '0x2::coin::from_balance', + typeArguments: [gasTypeTag], + arguments: [extractedBaseToken], + }); + + // Transfer the IOTA balance. + tx.transferObjects([iotaCoin], tx.pure.address(sender)); + + // Cleanup the bag by destroying it. + tx.moveCall({ + target: `0x2::bag::destroy_empty`, + typeArguments: [], + arguments: [extractedNativeTokensBag], + }); + + // Set the gas budget for the transaction. + tx.setGasBudget(10_000_000); + + // Sign and execute the transaction. + const result = await iotaClient.signAndExecuteTransaction({ signer: keypair, transaction: tx }); + + // Get the response of the transaction. + const response = await iotaClient.waitForTransaction({ digest: result.digest }); + console.log(`Transaction digest: ${response.digest}`); + +} + +main().catch(error => { + console.error(`Error: ${error.message}`); +}); \ No newline at end of file diff --git a/docs/examples/typescript/src/stardust/nft-output-claim.ts b/docs/examples/typescript/src/stardust/nft-output-claim.ts new file mode 100644 index 00000000000..5ce02731c0c --- /dev/null +++ b/docs/examples/typescript/src/stardust/nft-output-claim.ts @@ -0,0 +1,136 @@ +/** Copyright (c) 2024 IOTA Stiftung + * SPDX-License-Identifier: Apache-2.0 + * + * Example demonstrating the claim of an NFT output. + * In order to work, it requires a network with test objects + * generated from iota-genesis-builder/src/stardust/test_outputs. + */ +import {getFullnodeUrl, IotaClient, IotaParsedData} from "@iota/iota-sdk/client"; +import {Ed25519Keypair} from "@iota/iota-sdk/keypairs/ed25519"; +import {Transaction} from "@iota/iota-sdk/transactions"; + +const MAIN_ADDRESS_MNEMONIC = "okay pottery arch air egg very cave cash poem gown sorry mind poem crack dawn wet car pink extra crane hen bar boring salt"; +const STARDUST_PACKAGE_ID = "0x107a"; + +async function main() { + // Build a client to connect to the local IOTA network. + const iotaClient = new IotaClient({url: getFullnodeUrl('localnet')}); + + // Derive the address of the first account. + const keypair = Ed25519Keypair.deriveKeypair(MAIN_ADDRESS_MNEMONIC); + const sender = keypair.toIotaAddress(); + console.log(`Sender address: ${sender}`); + + // Get the NFTOutput object. + const nftOutputObjectId = "0xad87a60921c62f84d57301ea127d1706b406cde5ec6fa4d3af2a80f424fab93a"; + const nftOutputObject = await iotaClient.getObject({ + id: nftOutputObjectId, + options: { + showContent: true, + showBcs: true + } + }); + if (!nftOutputObject) { + throw new Error("NFT output object not found"); + } + + // Extract contents of the NftOutput object. + const moveObject = nftOutputObject.data?.content as IotaParsedData; + if (moveObject.dataType != "moveObject") { + throw new Error("NftOutput is not a move object"); + } + + // Treat fields as key-value object. + const fields = moveObject.fields as Record; + + // Access fields by key + const nativeTokensBag = fields['native_tokens']; + + // Extract the keys of the native_tokens bag if it is not empty; the keys + // are the type_arg of each native token, so they can be used later in the PTB. + const dfTypeKeys: string[] = []; + if (nativeTokensBag.fields.size > 0) { + // Get the dynamic fieldss of the native tokens bag. + const dynamicFieldPage = await iotaClient.getDynamicFields({ + parentId: nativeTokensBag.fields.id.id + }); + + // Extract the dynamic fields keys, i.e., the native token type. + dynamicFieldPage.data.forEach(dynamicField => { + if (typeof dynamicField.name.value === 'string') { + dfTypeKeys.push(dynamicField.name.value); + } else { + throw new Error('Dynamic field key is not a string'); + } + }); + } + + const tx = new Transaction(); + // Extract nft assets(base token, native tokens bag, nft asset itself). + const gasTypeTag = "0x2::iota::IOTA"; + const args = [tx.object(nftOutputObjectId)]; + // Finally call the nft_output::extract_assets function. + const extractedNftOutputAssets = tx.moveCall({ + target: `${STARDUST_PACKAGE_ID}::nft_output::extract_assets`, + typeArguments: [gasTypeTag], + arguments: args, + }); + + // If the nft output can be unlocked, the command will be successful and will + // return a `base_token` (i.e., IOTA) balance and a `Bag` of native tokens and + // related nft object. + const extractedBaseToken = extractedNftOutputAssets[0]; + let extractedNativeTokensBag: any = extractedNftOutputAssets[1]; + const nft = extractedNftOutputAssets[2]; + + // Extract the IOTA balance. + const iotaCoin = tx.moveCall({ + target: '0x2::coin::from_balance', + typeArguments: [gasTypeTag], + arguments: [extractedBaseToken], + }); + + // Transfer the IOTA balance. + tx.transferObjects([iotaCoin], tx.pure.address(sender)); + + // Extract the native tokens from the bag. + for (const typeKey of dfTypeKeys) { + const typeArguments = [`0x${typeKey}`]; + // Then pass the the bag and the receiver address as input. + const args = [extractedNativeTokensBag, tx.pure.address(sender)] + + // Extract native tokens from the bag. + // Extract native token balance. + // Transfer native token balance. + extractedNativeTokensBag = tx.moveCall({ + target: `${STARDUST_PACKAGE_ID}::utilities::extract_and_send_to`, + typeArguments: typeArguments, + arguments: args, + }); + } + + // Cleanup the bag by destroying it. + tx.moveCall({ + target: `0x2::bag::destroy_empty`, + typeArguments: [], + arguments: [extractedNativeTokensBag], + }); + + // Transfer the nft asset. + tx.transferObjects([nft], tx.pure.address(sender)); + + // Set the gas budget for the transaction. + tx.setGasBudget(10_000_000); + + // Sign and execute the transaction. + const result = await iotaClient.signAndExecuteTransaction({ signer: keypair, transaction: tx }); + + // Get the response of the transaction. + const response = await iotaClient.waitForTransaction({ digest: result.digest }); + console.log(`Transaction digest: ${response.digest}`); + +} + +main().catch(error => { + console.error(`Error: ${error.message}`); +}); \ No newline at end of file diff --git a/docs/examples/typescript/src/utils.ts b/docs/examples/typescript/src/utils.ts new file mode 100644 index 00000000000..b86e0a1f50e --- /dev/null +++ b/docs/examples/typescript/src/utils.ts @@ -0,0 +1,131 @@ +/** Copyright (c) 2024 IOTA Stiftung + * SPDX-License-Identifier: Apache-2.0 + * + * A set of utility functions for the examples. + */ + +import * as path from 'path'; +import {Ed25519Keypair} from '@iota/iota-sdk/keypairs/ed25519'; +import {IotaClient, type IotaObjectChangePublished} from "@iota/iota-sdk/dist/cjs/client"; +import {Transaction} from '@iota/iota-sdk/transactions'; +import {execSync} from 'child_process'; +import fs from 'fs'; + +const SPONSOR_ADDRESS_MNEMONIC = "okay pottery arch air egg very cave cash poem gown sorry mind poem crack dawn wet car pink extra crane hen bar boring salt"; +const CUSTOM_NFT_PACKAGE_PATH = "../../move/custom_nft"; +const IOTA_BIN = path.resolve(__dirname, '../../../../target/release/iota'); + + +/** + * Utility function to fund an address with IOTA tokens. + */ +export async function fundAddress( + iotaClient: IotaClient, + recipient: string // IOTA address +): Promise { + try { + // Derive the keypair and address from mnemonic. + const keypair = Ed25519Keypair.deriveKeypair(SPONSOR_ADDRESS_MNEMONIC); + const sponsor = keypair.toIotaAddress(); + console.log(`Sponsor address: ${sponsor}`); + + // Get a gas coin belonging to the sponsor. + const gasObjects = await iotaClient.getCoins({ owner: sponsor }); + const gasCoin = gasObjects.data?.[0]; + + if (!gasCoin) { + throw new Error('No coins found for sponsor'); + } + + // Initialize a transaction. + const tx = new Transaction(); + + // Add a transfer to the transaction. + tx.transferObjects([gasCoin.coinObjectId], recipient); + + // Set a gas budget for the transaction. + tx.setGasBudget(10_000_000); + + // Sign and execute the transaction. + const result = await iotaClient.signAndExecuteTransaction({ signer: keypair, transaction: tx }); + + // Get the response of the transaction. + const response = await iotaClient.waitForTransaction({ digest: result.digest }); + console.log(`Funding transaction digest: ${response.digest}`); + + } catch (error: any) { + console.error(`Error funding address: ${error.message}`); + throw error; + } +} + +/** + * Utility function to publish a custom NFT package found in the Move examples. + */ +export async function publishCustomNftPackage( + iotaClient: IotaClient, + keypair: Ed25519Keypair +): Promise { + try { + // Compile the custom NFT package + const packagePath = path.join(__dirname, CUSTOM_NFT_PACKAGE_PATH); + return await publishPackage(iotaClient, keypair, packagePath); + } catch (error) { + console.error("Error publishing custom NFT package:", error); + throw error; + } +} + + +/** + * Utility function to publish a package. + */ +async function publishPackage(iotaClient: IotaClient, keypair: Ed25519Keypair, packagePath: string): Promise { + // First check if the iota binary is built. + if (!fs.existsSync(IOTA_BIN)) { + console.log("IOTA binary not found. Building the binary..."); + execSync('cargo build --release -p iota', { cwd: path.resolve(__dirname, '../../../../') }); + } + + const { modules, dependencies } = JSON.parse( + execSync( + `${IOTA_BIN} move build --dump-bytecode-as-base64 --path ${packagePath}`, + { encoding: 'utf-8' }, + ), + ); + + const tx = new Transaction(); + const cap = tx.publish({ + modules, + dependencies, + }); + + const sender = keypair.toIotaAddress(); + + // Transfer the upgrade capability to the sender so they can upgrade the package later if they want. + tx.transferObjects([cap], tx.pure.address(sender)); + + const { digest } = await iotaClient.signAndExecuteTransaction({ + transaction: tx, + signer: keypair, + }); + + const publishTxn = await iotaClient.waitForTransaction({ + digest: digest, + options: { showObjectChanges: true, showEffects: true }, + }); + console.log(`Publish transaction digest: ${publishTxn.digest}`); + + // expect(publishTxn.effects?.status.status).toEqual('success'); + + const packageId = ((publishTxn.objectChanges?.filter( + (a) => a.type === 'published', + ) as IotaObjectChangePublished[]) ?? [])[0]?.packageId.replace(/^(0x)(0+)/, '0x') as string; + + // expect(packageId).toBeTypeOf('string'); + + console.info(`Published package ${packageId} from address ${sender}}`); + + return packageId; +} + diff --git a/docs/examples/typescript/tsconfig.json b/docs/examples/typescript/tsconfig.json new file mode 100644 index 00000000000..56a8ab81090 --- /dev/null +++ b/docs/examples/typescript/tsconfig.json @@ -0,0 +1,110 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ + // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ + // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ + // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ + // "noUncheckedSideEffectImports": true, /* Check side effect imports. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +} diff --git a/docs/site/docusaurus.config.js b/docs/site/docusaurus.config.js index d80dce3890a..a789f2b0a80 100644 --- a/docs/site/docusaurus.config.js +++ b/docs/site/docusaurus.config.js @@ -18,7 +18,7 @@ const config = { favicon: "/icons/favicon.ico", // Set the production url of your site here - url: "https://docs.iota.io", + url: "https://docs.iota.org", // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' baseUrl: "/", @@ -192,7 +192,7 @@ const config = { typesense: { // Replace this with the name of your index/collection. // It should match the "index_name" entry in the scraper's "config.json" file. - typesenseCollectionName: 'IOTADocs_1724878003', + typesenseCollectionName: 'IOTADocs', typesenseServerConfig: { nodes: [ { @@ -270,7 +270,7 @@ const config = { prism: { theme: themes.vsLight, darkTheme: themes.vsDark, - additionalLanguages: ["rust", "typescript", "toml", "solidity"], + additionalLanguages: ["rust", "typescript", "solidity"], }, }), }; diff --git a/docs/site/src/components/API/api-ref/networkselect.js b/docs/site/src/components/API/api-ref/networkselect.js index f1918387e41..8132c3e125d 100644 --- a/docs/site/src/components/API/api-ref/networkselect.js +++ b/docs/site/src/components/API/api-ref/networkselect.js @@ -7,18 +7,18 @@ import ExecutionEnvironment from "@docusaurus/ExecutionEnvironment"; import { Select, MenuItem, FormControl, InputLabel } from "@mui/material"; import { StyledEngineProvider } from "@mui/material/styles"; -const NETWORKS = ["Devnet", "Testnet", "Mainnet"]; +const NETWORKS = ["Devnet", "Testnet"]; const NetworkSelect = () => { const [selection, setSelection] = useState(() => { if (ExecutionEnvironment.canUseDOM) { const network = localStorage.getItem("RPC"); if (network === null) { - return "mainnet"; + return "testnet"; } return localStorage.getItem("RPC"); } else { - return "mainnet"; + return "testnet"; } }); @@ -38,18 +38,18 @@ const NetworkSelect = () => { {`RPC: https://fullnode.${selection.toLowerCase()}.iota.io:443`} + >{`RPC: https://api.${selection.toLowerCase()}.iota.cafe:443`} diff --git a/docs/site/src/components/CTF/ctf-verifier.tsx b/docs/site/src/components/CTF/ctf-verifier.tsx index cc25c579746..530ddf2d44f 100644 --- a/docs/site/src/components/CTF/ctf-verifier.tsx +++ b/docs/site/src/components/CTF/ctf-verifier.tsx @@ -13,8 +13,7 @@ interface ChallengeVerifierProps { // Define network configurations const NETWORKS = { - devnet: { url: getFullnodeUrl('devnet') }, - alphanet: { url: 'https://api.iota-rebased-alphanet.iota.cafe:443' }, + testnet: { url: getFullnodeUrl('testnet') }, }; // Main ChallengeVerifier component @@ -30,7 +29,7 @@ const ChallengeVerifier: React.FC = ({ expectedObjectTyp setCoins(null); try { - const client = new IotaClient({ url: NETWORKS.alphanet.url }); + const client = new IotaClient({ url: NETWORKS.testnet.url }); const result = await client.getObject({ id: inputText, options: { showType: true } }); const message = result.data.type === expectedObjectType diff --git a/docs/site/src/components/NetworkInfo/index.tsx b/docs/site/src/components/NetworkInfo/index.tsx index 3cf243df9f0..748d8638105 100644 --- a/docs/site/src/components/NetworkInfo/index.tsx +++ b/docs/site/src/components/NetworkInfo/index.tsx @@ -1,9 +1,10 @@ -import React from 'react'; +import React, { useState } from 'react'; import { ChainId } from '../ChainId'; -import { NetworkProps } from '../constant'; +import { NetworkProps, MoveProps } from '../constant'; import CodeBlock from '@theme/CodeBlock'; import Admonition from '@theme/Admonition'; +// L1 component function L1(props: NetworkProps) { return ( @@ -49,6 +50,98 @@ function L1(props: NetworkProps) { ); } +// Testnet Component +function Testnet(props: NetworkProps) { + return ( +
+ + + + + + {props.protocol && + + + } + + + + + + + + + + + + + {props.faucet && ( + + + + + )} + +
Base Token{props.baseToken}
Protocol{props.protocol}
HTTP REST API + {props.httpRestApi} +
Event API + {props.eventApi} +
Permanode API + {props.permaNodeApi} +
Faucet + + {props.faucet} + +
+ ); +} + +// Devtnet Component +function Devnet(props: NetworkProps) { + return ( + + + + + + + + + + + + + + + + + + + + + + + {props.faucet && ( + + + + + )} + +
Base Token{props.baseToken}
Protocol{props.protocol}
HTTP REST API + {props.httpRestApi} +
Event API + {props.eventApi} +
Permanode API + {props.permaNodeApi} +
Faucet + + {props.faucet} + +
+ ); +} +// EVM component function Evm(props: NetworkProps) { return ( @@ -134,6 +227,7 @@ function Evm(props: NetworkProps) { ); } +// EvmCustom component function EvmCustom(props: NetworkProps) { return (
@@ -159,8 +253,67 @@ function EvmCustom(props: NetworkProps) { ); } +// Move component +function Move(props: MoveProps) { + return ( +
+ + + + + + {props.explorerUrl && ( + + + + + )} + + + + + + + + + + + + + + + + + {props.faucet && ( + + + + + )} + +
Base Token{props.baseToken}
Explorer URL + {props.explorerUrl} +
JSON RPC URL + {props.jsonRpcUrl} +
Indexer RPC + {props.indexerRpc} +
GraphQL RPC + {props.graphqlRpc} +
RPC Websocket URL + {props.jsonRpcWebsocketUrl} +
Faucet URL + + {props.faucetUrl} + +
+ ); +} + export default { L1, Evm, EvmCustom, + Move, + Testnet, + Devnet }; diff --git a/docs/site/src/components/constant.tsx b/docs/site/src/components/constant.tsx index 78099fb9e73..7639845f062 100644 --- a/docs/site/src/components/constant.tsx +++ b/docs/site/src/components/constant.tsx @@ -40,15 +40,6 @@ export const Networks = { api: 'https://api.evm.iotaledger.net', }, }, - iota_2_testnet: { - baseToken: 'Testnet Token (no value)', - protocol: 'IOTA 2.0', - httpRestApi: 'https://api.nova-testnet.iotaledger.net/', - eventApi: 'wss://api.nova-testnet.iotaledger.net:443 (MQTT 3.1, /mqtt)', - permaNodeApi: 'https://chronicle.nova-testnet.iotaledger.net', - explorer: 'https://explorer.iota.org/iota2-testnet', - faucet: 'https://faucet.nova-testnet.iotaledger.net', - }, iota_testnet: { baseToken: 'Testnet Token (no value)', protocol: 'Stardust', @@ -91,6 +82,15 @@ export const Networks = { api: 'https://api.evm.testnet.iotaledger.net', }, }, + iota_2_testnet: { + baseToken: 'Testnet Token (no value)', + protocol: 'IOTA 2.0', + httpRestApi: 'https://api.nova-testnet.iotaledger.net/', + eventApi: 'wss://api.nova-testnet.iotaledger.net:443 (MQTT 3.1, /mqtt)', + permaNodeApi: 'https://chronicle.nova-testnet.iotaledger.net', + explorer: 'https://explorer.iota.org/iota2-testnet', + faucet: 'https://faucet.nova-testnet.iotaledger.net', + }, shimmer: { baseToken: 'Shimmer Token', protocol: 'Stardust', @@ -155,6 +155,41 @@ export const Networks = { api: 'https://api.evm.testnet.shimmer.network', }, }, + iota_move: { + baseToken: 'IOTA Token', + jsonRpcUrl: 'jsonRpcUrl placeholder', + jsonRpcWebsocketUrl:'jsonRpcWebsocketUrl placeholder', + indexerRpc: 'indexerRpc placeholder', + graphqlRpc: 'graphqlRpc placeholder', + faucetUrl: 'faucetUrl placeholder', + explorerUrl: 'explorerUrl placeholder' + }, + iota_move_testnet: { + baseToken: 'IOTA Token (no value)', + jsonRpcUrl: 'https://api.testnet.iota.cafe', + jsonRpcWebsocketUrl:'wss://api.testnet.iota.cafe', + indexerRpc: 'https://indexer.testnet.iota.cafe', + graphqlRpc: 'https://graphql.testnet.iota.cafe', + faucetUrl: 'https://faucet.testnet.iota.cafe', + explorerUrl: 'https://explorer.iota.cafe/?network=testnet' + }, + iota_move_devnet: { + baseToken: 'IOTA Token (no value)', + jsonRpcUrl: 'https://api.devnet.iota.cafe', + jsonRpcWebsocketUrl:'wss://api.devnet.iota.cafe', + indexerRpc: 'https://indexer.devnet.iota.cafe', + graphqlRpc: 'https://graphql.devnet.iota.cafe', + faucetUrl: 'https://faucet.devnet.iota.cafe', + explorerUrl: 'https://explorer.iota.cafe/?network=devnet' + }, + iota_localnet: { + baseToken:"IOTA Token", + jsonRpcUrl: 'http://127.0.0.1:9000', + jsonRpcWebsocketUrl:'ws://127.0.0.1:9000', + indexerRpc: 'http://127.0.0.1:9124', + graphqlRpc: 'http://127.0.0.1:8000', + faucetUrl: 'http://127.0.0.1:9123/gas' + }, }; export interface Toolkit { @@ -192,3 +227,12 @@ export interface NetworkProps { api?: string; }; } + +export interface MoveProps { + jsonRpcUrl: string; + jsonRpcWebsocketUrl: string; + indexerRpc: string; + graphqlRpc: string; + faucetUrl: string; + explorerUrl?: string; +}; \ No newline at end of file diff --git a/docs/site/src/pages/index.js b/docs/site/src/pages/index.js index 8a5c6126658..ba011c0c546 100644 --- a/docs/site/src/pages/index.js +++ b/docs/site/src/pages/index.js @@ -152,7 +152,7 @@ export default function Home() { > IOTA ecosystem directory - + IOTA blog { + if (lang === 'php') { + // eslint-disable-next-line global-require + require('prismjs/components/prism-markup-templating.js'); + } + // custom style for toml files + require('./prism-toml'); // eslint-disable-next-line global-require, import/no-dynamic-require require(`prismjs/components/prism-${lang}`); }); - require("./prism-move"); delete globalThis.Prism; } diff --git a/docs/site/src/theme/prism-toml.js b/docs/site/src/theme/prism-toml.js new file mode 100644 index 00000000000..bec461eac51 --- /dev/null +++ b/docs/site/src/theme/prism-toml.js @@ -0,0 +1,56 @@ +(function (Prism) { + + // Matches keys in TOML (e.g., `key`, `"quoted key"`, `key.subkey`) + var key = /(?:[A-Za-z0-9_-]+|"[^"\r\n]*")(?=\s*=)/; + + // Matches section headers like [package] + var sectionHeader = /\[[^\]\r\n]+\]/; + + // Matches dates in TOML (e.g., `1979-05-27T07:32:00Z`, `1979-05-27 07:32:00`, `1979-05-27`) + var date = /\d{4}-\d{2}-\d{2}(?:[Tt ]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:[Zz]|[-+]\d{2}:\d{2})?)?/; + + // Matches strings (basic and literal) + var string = /"(?:[^"\\\r\n]|\\.)*"|'[^'\r\n]*'/; + + // Matches booleans + var boolean = /\b(?:true|false)\b/; + + // Matches numbers, including hex, binary, octal, and floats + var number = /[+-]?(?:0x[\da-fA-F]+|0b[01]+|0o[0-7]+|\d+(\.\d+)?([eE][+-]?\d+)?)/; + + // Matches inline comments starting with `#` + var comment = /#.*/; + + Prism.languages.toml = { + 'section-header': { + pattern: sectionHeader, + alias: 'keyword' // Apply a distinct color for section headers by using the "keyword" alias + }, + 'comment': { + pattern: comment, + greedy: true + }, + 'key': { + pattern: key, + alias: 'attr-name' + }, + 'date': { + pattern: date, + alias: 'number' + }, + 'string': { + pattern: string, + greedy: true + }, + 'boolean': { + pattern: boolean, + alias: 'important' + }, + 'number': { + pattern: number, + alias: 'number' + }, + 'punctuation': /[=[\]{}.,]/ // Matches punctuation characters + }; + +}(Prism)); diff --git a/docs/site/src/utils/getopenrpcspecs.js b/docs/site/src/utils/getopenrpcspecs.js index cdc86d42415..a0f8db328f4 100644 --- a/docs/site/src/utils/getopenrpcspecs.js +++ b/docs/site/src/utils/getopenrpcspecs.js @@ -45,7 +45,7 @@ const downloadFile = (branch) => { } // Download Mainnet OpenRPC spec -downloadFile("mainnet"); +// downloadFile("mainnet"); // Download Testnet OpenRPC spec downloadFile("testnet"); diff --git a/dprint.json b/dprint.json index 17a5a9f5404..efec70de71e 100644 --- a/dprint.json +++ b/dprint.json @@ -20,7 +20,6 @@ "crates/iota-light-client/example_config/20873329.yaml", "**/pnpm-lock.yaml", "external-crates/move/crates/move-stdlib/**/docs/**/*.md", - "external-crates/move/move-execution/v0/crates/move-stdlib/**/docs/**/*.md", "nre/helm/graphql/templates/**/*.yaml", "nre/helm/indexer/templates/**/*.yaml" ], diff --git a/examples/custom-indexer/rust/README.md b/examples/custom-indexer/rust/README.md index 52804260008..ff88fc603b5 100644 --- a/examples/custom-indexer/rust/README.md +++ b/examples/custom-indexer/rust/README.md @@ -2,7 +2,7 @@ This is a complimentary example to the Iota Custom Indexer documentation. It demonstrates how to create a custom indexer for the Iota search engine. -See the [Iota Custom Indexer documentation](https://wiki.iota.org/guides/developer/advanced/custom-indexer) for more information. +See the [Iota Custom Indexer documentation](https://docs.iota.org/developer/advanced/custom-indexer) for more information. ## Prerequisites diff --git a/examples/tic-tac-toe/ui/README.md b/examples/tic-tac-toe/ui/README.md index 2a3dc86c2a4..cad40e908a2 100644 --- a/examples/tic-tac-toe/ui/README.md +++ b/examples/tic-tac-toe/ui/README.md @@ -22,7 +22,7 @@ Client dApp using the following tools: - [Vite](https://vitejs.dev/) for build tooling - [Radix UI](https://www.radix-ui.com/) for pre-built UI components - [ESLint](https://eslint.org/) -- [`@iota/dapp-kit`](https://wiki.iota.org/references/ts-sdk/dapp-kit) for connecting to +- [`@iota/dapp-kit`](https://docs.iota.org/references/ts-sdk/dapp-kit) for connecting to wallets and loading data - [pnpm](https://pnpm.io/) for package management diff --git a/external-crates/move/Cargo.lock b/external-crates/move/Cargo.lock index 5446c9a86a3..812fbf776bc 100644 --- a/external-crates/move/Cargo.lock +++ b/external-crates/move/Cargo.lock @@ -361,20 +361,6 @@ dependencies = [ "petgraph", ] -[[package]] -name = "bytecode-verifier-tests-v0" -version = "0.1.0" -dependencies = [ - "hex", - "move-abstract-interpreter", - "move-binary-format", - "move-bytecode-verifier-meter", - "move-bytecode-verifier-v0", - "move-core-types", - "move-vm-config", - "petgraph", -] - [[package]] name = "bytecode-verifier-transactional-tests" version = "0.1.0" @@ -1468,15 +1454,6 @@ dependencies = [ "move-bytecode-verifier-meter", ] -[[package]] -name = "move-abstract-interpreter-v0" -version = "0.1.0" -dependencies = [ - "itertools", - "move-binary-format", - "move-bytecode-verifier-meter", -] - [[package]] name = "move-abstract-stack" version = "0.0.1" @@ -1581,20 +1558,6 @@ dependencies = [ "move-vm-config", ] -[[package]] -name = "move-bytecode-verifier-v0" -version = "0.1.0" -dependencies = [ - "move-abstract-interpreter", - "move-abstract-stack", - "move-binary-format", - "move-borrow-graph", - "move-bytecode-verifier-meter", - "move-core-types", - "move-vm-config", - "petgraph", -] - [[package]] name = "move-bytecode-viewer" version = "0.1.0" @@ -2011,20 +1974,6 @@ dependencies = [ "smallvec", ] -[[package]] -name = "move-stdlib-natives-v0" -version = "0.1.1" -dependencies = [ - "hex", - "move-binary-format", - "move-core-types", - "move-vm-runtime-v0", - "move-vm-types", - "sha2", - "sha3", - "smallvec", -] - [[package]] name = "move-symbol-pool" version = "0.1.0" @@ -2158,27 +2107,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "move-vm-runtime-v0" -version = "0.1.0" -dependencies = [ - "anyhow", - "better_any", - "fail", - "hex", - "move-binary-format", - "move-bytecode-verifier-v0", - "move-core-types", - "move-vm-config", - "move-vm-profiler", - "move-vm-types", - "once_cell", - "parking_lot 0.11.2", - "proptest", - "smallvec", - "tracing", -] - [[package]] name = "move-vm-test-utils" version = "0.1.0" diff --git a/external-crates/move/Cargo.toml b/external-crates/move/Cargo.toml index 2e927598fc5..553f221bceb 100644 --- a/external-crates/move/Cargo.toml +++ b/external-crates/move/Cargo.toml @@ -3,11 +3,6 @@ resolver = "2" members = [ "crates/*", - "move-execution/v0/crates/bytecode-verifier-tests", - "move-execution/v0/crates/move-abstract-interpreter", - "move-execution/v0/crates/move-bytecode-verifier", - "move-execution/v0/crates/move-stdlib-natives", - "move-execution/v0/crates/move-vm-runtime", # "move-execution/$CUT/crates/bytecode-verifier-tests", # "move-execution/$CUT/crates/move-abstract-interpreter", # "move-execution/$CUT/crates/move-bytecode-verifier", diff --git a/external-crates/move/crates/move-analyzer/editors/code/README.md b/external-crates/move/crates/move-analyzer/editors/code/README.md index ca25dc39830..0c4b6749a7d 100644 --- a/external-crates/move/crates/move-analyzer/editors/code/README.md +++ b/external-crates/move/crates/move-analyzer/editors/code/README.md @@ -22,7 +22,7 @@ the pre-built move-analyzer binary is not available for your platform or if you binary stored in a different location. If you want to build and test Move code using the extension, you must install the `iota` binary on -your machine - see [here](https://wiki.iota.org/guides/developer/getting-started/iota-install) for +your machine - see [here](https://docs.iota.org/developer/getting-started/install-iota) for instructions. The extension assumes that the `iota` binary is in your system path, but you can set its custom location location using VSCode's settings (`⌘` + `,` on macOS, or use the menu item _Code > Preferences > Settings_). Search for the `move.iota.path` user setting, set it to the new location of @@ -41,7 +41,7 @@ This can be done in two steps: 1. Install the move-analyzer installation prerequisites for your platform. They are the same as prerequisites for Iota installation - for Linux, macOS and Windows these prerequisites and their installation instructions can be found - [here](https://wiki.iota.org/guides/developer/getting-started/iota-install#additional-prerequisites-by-operating-system) + [here](https://docs.iota.org/developer/getting-started/install-iota#additional-prerequisites-by-operating-system) 2. Invoke `cargo install --git https://github.com/iotaledger/iota iota-move-lsp` to install the `move-analyzer` language server in your Cargo binary directory, which is typically located in the `~/.cargo/bin` (macOS/Linux) or `C:\Users\USER\.cargo\bin` (Windows) directory. diff --git a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/Cargo.toml b/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/Cargo.toml deleted file mode 100644 index e6484d36ef7..00000000000 --- a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/Cargo.toml +++ /dev/null @@ -1,23 +0,0 @@ -[package] -name = "bytecode-verifier-tests-v0" -version = "0.1.0" -authors = ["IOTA Foundation "] -edition = "2021" -license = "Apache-2.0" -publish = false -description = "Move bytecode verifier tests" - -[dev-dependencies] -hex.workspace = true -petgraph.workspace = true - -move-abstract-interpreter.workspace = true -move-binary-format = { workspace = true, features = ["fuzzing"] } -# referred to via path for execution versioning -move-bytecode-verifier = { path = "../move-bytecode-verifier", package = "move-bytecode-verifier-v0" } -move-bytecode-verifier-meter.workspace = true -move-core-types.workspace = true -move-vm-config.workspace = true - -[features] -fuzzing = ["move-binary-format/fuzzing"] diff --git a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/METER_TESTING.md b/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/METER_TESTING.md deleted file mode 100644 index 2f1865f6ed6..00000000000 --- a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/METER_TESTING.md +++ /dev/null @@ -1,5 +0,0 @@ -This testsuite can be run in a specific way to print the time until a 'complex' program is detected or accepted. Call as in: - -``` -cargo test --release -- --nocapture 1>/dev/null -``` diff --git a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/lib.rs b/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/lib.rs deleted file mode 100644 index 0dc645aec48..00000000000 --- a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/lib.rs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) The Diem Core Contributors -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -#![forbid(unsafe_code)] - -#[cfg(test)] -pub mod support; - -#[cfg(test)] -pub mod unit_tests; diff --git a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/support/mod.rs b/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/support/mod.rs deleted file mode 100644 index 266dddf48a2..00000000000 --- a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/support/mod.rs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) The Diem Core Contributors -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use move_binary_format::{ - file_format::{ - empty_module, Bytecode, CodeUnit, FunctionDefinition, FunctionHandle, IdentifierIndex, - ModuleHandleIndex, SignatureIndex, - }, - CompiledModule, -}; - -/// Create a dummy module to wrap the bytecode program in local@code -pub fn dummy_procedure_module(code: Vec) -> CompiledModule { - let mut module = empty_module(); - let code_unit = CodeUnit { - code, - ..Default::default() - }; - let fun_def = FunctionDefinition { - code: Some(code_unit), - ..Default::default() - }; - - let fun_handle = FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(0), - parameters: SignatureIndex(0), - return_: SignatureIndex(0), - type_parameters: vec![], - }; - - module.function_handles.push(fun_handle); - module.function_defs.push(fun_def); - module -} diff --git a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/binary_samples.rs b/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/binary_samples.rs deleted file mode 100644 index 624004452a2..00000000000 --- a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/binary_samples.rs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -//! Tests in here are based on binary representation of modules taken from -//! production. Those tests may fail over time if the representation becomes out -//! of date, then they can be removed. Right now the serve to calibrate the -//! metering working as expected. Those tests represent cases which we want to -//! continue to succeed. - -use move_binary_format::{errors::VMResult, CompiledModule}; -use move_bytecode_verifier::verifier; -use move_bytecode_verifier_meter::bound::BoundMeter; - -use crate::unit_tests::production_config; - -#[allow(unused)] -fn run_binary_test(name: &str, bytes: &str) -> VMResult<()> { - let bytes = hex::decode(bytes).expect("invalid hex string"); - let m = CompiledModule::deserialize_with_defaults(&bytes).expect("invalid module"); - let (verifier_config, meter_config) = production_config(); - let mut meter = BoundMeter::new(meter_config); - verifier::verify_module_with_config_for_test(name, &verifier_config, &m, &mut meter) -} - -#[test] -fn sample_price_oracle() { - let code = "a11ceb0b050000000c01001602162003368a0104c0011405d401a80607fc07f90308f50b6006d50c9b3210f03e770ae73f170cfe3f951e0d935e060000010101020103010401050006020702080209020a000b0800000c0800080d070004170402030100010318070009190700071c0700000e000100000f0201010000100201010000110302000012030200001304020000140506000015050600080f080900071d0a0100081e080900071f0a0b0007200a010006210c01000122020f01000123020c01000424110b020300042511120203000a261314000527020f0100022803180004290219020304092a1a1b00032b1a0f00042c1c02020302020e0e0e0f0e10101110130e1016111615101810020608020201030001060c02060c0304030103010203010908060303080603010301030106080201080601060806010101020502060800080508040802010900010804020804080502060b0302090009010900010609010208050301080202080406080102080403ae010a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a02080508000708000a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050a0208050105010b030209000901010a0201080503070b0302090009010900090193010508000708000a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a020a02080508050805080508050805080508050805080508050805080508050805080508050805080508050805080508050805080508050805080508050805080508050805080508050805080508050805080508050805080508050805080508050805080508050805080508050805080508050805080508050805080508050805080508050805080508050805080508050805010708000b03030101010301030103010b01030101010301030103010c70726963655f6f7261636c6504636f696e067369676e657206737472696e67057461626c6509747970655f696e666f046d617468036936340570726963651070726963655f6964656e74696669657204707974681250726963654964656e7469666965724d61700e54657374507269636553746f72650550726963650c666f726d61745f7072696365096765745f7072696365126765745f70726963655f666f725f746573740a696e697469616c697a6512696e697469616c697a655f746573746e6574127365745f7468726573686f6c645f73656373107369676e65645f7536345f6d696e75730f7369676e65645f7536345f706c757304696e666f055461626c6506537472696e670f50726963654964656e7469666965720e7468726573686f6c645f736563730b70726963655f7461626c6503493634196765745f6d61676e69747564655f69665f706f736974697665086765745f6578706f0f6765745f69735f6e65676174697665196765745f6d61676e69747564655f69665f6e6567617469766506706f775f31300673796d626f6c08646563696d616c7308636f6e7461696e7306626f72726f77176765745f70726963655f6e6f5f6f6c6465725f7468616e09747970655f6e616d650a616464726573735f6f66036e65770d66726f6d5f627974655f76656304757466380675707365727414812adfd8ba2f589c0fe48c5170fa287cd36050dd487d17e2f4a765101f70ed00000000000000000000000000000000000000000000000000000000000000017e783b349d3e89cf5931af376ebeadbfab855b3fa239b7ada8f5a92fbea6b3870308700000000000000003086d0000000000000003086e0000000000000003081000000000000000052014812adfd8ba2f589c0fe48c5170fa287cd36050dd487d17e2f4a765101f70ed0a0221202b9ab1e972a281585084148ba1389800799bd4be63b957507db1349314e474450a020504414156450a022120bd640cddb72063e2ede34c6a0baf6699759b9837fcb06aa0e2fbcecb9b65fde70a02040341434d0a0221202a01deaec9e51a579277b34b122399984d0bbf57e2458a7e42fecd2829867a0d0a0204034144410a022120fa17ceaf30d19ba51112fdcc750cc83454776f47fb0112e4af07f15f4bb1ebc00a020504414c474f0a0221206d0af467543fc7daedf7abed96423877560c8d03725f3e5c87516774982a679c0a020403414e430a02212015add95022ae13563a11992e727c91bdb6b55bc183d9d747436c80a483d8c8640a0204034150450a02212003ae4db29ed4ae33d323568895aa00337e658e348b37509f5372ae51f0af00d50a0204034150540a022120b881c6dad5dd3dc9a83222f8032fb439859288119afc742d43adc305cef151cc0a0204034153520a022120681e0eb7acf9a2a3384927684d932560fb6f67c6beb21baa0f110e993b2653860a02060541544c41530a0221208ff1200345393bb25be4f4eeb2d97234e91f7e6213f3745a694b1436e700f2710a02040341544d0a022120b00b60f88b03a6a625a8d1c048c3f66653edf217439983d037e7222c4e6128190a02050441544f4d0a0221204cbd623d7aa47003fff1cd75c3f96cb24a660014b697d91cfb7adcd204b952020a020504415553540a02212093da3352f9f1d105fdfe4971cfa80e9dd777bfc5d0f683ebb6e1294b92137bb70a020504415641580a022120b7e3904c08ddd9c0c10c6d207d390fd19e87eb6aab96304f571ed94caebdefa00a0204034158530a0221209d23a47f843f5c9284832ae6e76e4aa067dc6072a58f151d39a65a4cc792ef9f0a0204034241520a0221203dd2b63686a450ec7290df3a1e0b583c0481f651351edfa7636f39aed55cf8a30a0204034243480a0221207f981f906d7cfe93f618804f1de89e0199ead306edc022d3230b3e8305f391b00a020504424554480a0221202f95862b045670cd22bee3114c39763a4a08beeb663b145d283c31d7d1101c4f0a020403424e420a0221201ce9069708fb49e2f1b062fa4f1be0bb151475ca506939d6d8c14386d49f43dc0a02040342525a0a022120e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b430a0204034254430a022120097d687437374051c75160d648800f021086bc8edf469f11284491fda81923150a0204034254540a0221205bc91f13e412c07599167bae86f07543f076a638962b8d6017ec19dab4a828140a020504425553440a0221202dd14c7c38aa7066c7a508aac299ebcde5165b07d5d9f2d94dfbfe41f0bc5f2e0a0204034339380a0221202356af9529a1064d41e32d617e2ce1dca5733afa901daba9e2b68dee5d53ecf90a02050443414b450a02212015ecddd26d49e1a8f1de9376ebebc03916ede873447c1255d2d5891b92ce57170a02060543424554480a022120bd4dbcbfd90e6bc6c583e07ffcb5cb6d09a0c7b1221805211ace08c8378596270a0204034348520a022120e799f456b358a2534aa1b45141d454ac04b444ed23b1440b778549bb758f2b5c0a02040343485a0a0221209c479b12a2b2c1051715d4d462dd7a6abbb6dccabf3af31a53f6130a1cd88efc0a020504434954590a0221208517b35589b5f1f6ad626da2379ff592d5101b63aa661d75b7a883fdbda023f00a020504434f50450a0221204e53c6ef1f2f9952facdcf64551edb6d2a550985484ccce6a0477cae4c1bca3e0a020403434f570a0221208f218655050a1476b780185e89f19d2b1e1f49e9bd629efad6ac547a946bf6ab0a020504435553440a022120b0948a5e5313200c632b51bb5ca32f6de0d36e9950a942d19751e833f70dabfd0a0204034441490a022120dcef50dd0a4cd2dcc17e45df1676dcb336a11a61c69df7a0299b0150c672d25c0a020504444f47450a022120ca3eed9b267293f6595901c734c7525ce8ef49adafe8284606ceb307afa2ca5b0a020403444f540a022120ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace0a0204034554480a022120c80657b7f6f3eac27218d09d5a4e54e47b25768d9f5e10ac15fe2cf9008814000a020504464944410a0221202fb245b9a84554a0f15aa123cbb5f64cd263b59e9a87d80148cbffab50c69f300a020504464c4f570a0221205c6c0d2386e3352356c3ab84434fafb5ea067ac2678a38a338c4a69ddc4bdb0c0a02040346544d0a0221206c75e52531ec5fd3ef253f6062956a8508a2f03fa0a209fb7fbc51efd9d35f880a0204034654540a022120301377b122716cee1a498e7930a1836c0b1db84667cc78bbbcbad6c330ea6afb0a02040347414c0a0221200781209c28fda797616212b7f94d77af3a01f3e94a5d421760aef020cf2bcb510a02050447414c410a022120baa284eaf23edf975b371ba2818772f93dbae72836bbdea28b07d40f3cf8b4850a020403474d540a0221206034b1f68b9363dff2cf9d53b1a88fb4d0929c65f34d532db53738853efc00ad0a020504474f46580a02212095609d32c98a467a72ac419f2e64bb2b8dbd5b00b74f3a0fd72f42343af1743d0a0205044858524f0a0221207a5bc1d2b56ad029048cd63964b3ad2776eadf812edc1a43a31406cb54bff5920a020403494e4a0a022120a4702f0f5818258783a1e47f453cb20b0fbec32ca67260e1d19dfcdd6a4d0ebb0a020605494e5445520a02212081a21b01c15b8d01f6cdfed65e00987cc4c901858c821b2089344987de3102e90a0204034a45540a022120ee42016c303126bd9263724e00f83a8114e84518c6e8ffc9738c001cc301daff0a0204034a53540a022120abe4f2b264560a397f38eec024369356e5c1ea4f7aab94729369f144b3d977790a0204034a55560a022120d1d95644ffc11ca502f21e067a7814144c56b37018515ced4335a886a827a3050a0206054c415a494f0a0221206e3f3fa8253588df9326580180233eb791e03b443a3ba7a1d892e73874e19a540a0204034c54430a022120e6ccd3f878cf338e6732bf59f60943e8ca2c28402fc4d9c258503b2edbe74a310a0205044c554e410a0221204456d442a152fd1f972b18459263ef467d3c29fb9d667e30c463b086691fbc790a0205044c554e430a0221205de33a9112c2b700b8d30b8a3402c103578ccfa2765696471cc672bd5cf6ac520a0206054d415449430a0221201888f463c27997174f97d2a36af29bf4648b61a5f69e67c45505a80f826bb7850a0205044d424f580a02212027d108eb764c912f49d3453a21dd95516619b1c45d0b607ee58a137ac8a6f32d0a0205044d45414e0a022120dfaeafde7f8ad3cb9ddbcc85ed7ae7e53910e7ab377fd75921920f97c80a8edc0a0204034d45520a0221200b46c1c04e9c914037cc4e0561a7e6787f6db0b89b7b65281f0f6fea1ce45a740a0204034d49520a0221205b70af49d639eefe11f20df47a0c0760123291bb5bc55053faf797d1ff9059830a0205044d4e474f0a022120c2289a6a43d2ce91c6f55caec370f4acc38a2ed477f58813334c6d03749ff2a40a0205044d534f4c0a022120c415de8d2eba7db216527dff4b60e8f3a5311c740dadb233e13e12547e2267500a0205044e4541520a02212005934526b94a9fbe4c4ce0c3792213032f086ee4bf58f2168a7085361af9bdc10a0203024f470a022120c572690504b42b57a3f7aed6bd4aae08cbeeebdadcf130646a692fe73ec1e0090a0204034f4e450a02212037505261e557e251290b8c8899453064e8d760ed5c65a779726f2490980da74c0a0205044f5243410a0221200afa3199e0899270a74ddcf5cc960d3c6c4414b4ca71024af1a62786dd24f52a0a020504504f52540a02212088e2d5cbd2474766abffb2a67a58755a2cc19beb3b309e1ded1e357253aa36230a020605504f52544f0a0221203d253019d38099c0fe918291bd08c9b887f4306a44d7d472c8031529141f275a0a0204035053470a022120fd0690232b0fae5efdc402c1b9aac74176383ff7daf87d021554bda24a38e0ec0a020504524143410a02212091568baa8beb53db23eb3fb7f22c6e8bd303d103919e19733f2bb642d3e7987a0a0204035241590a0221206ed3c7c4427ae2f91707495fc5a891b30795d93dbb3931782ddd77a5d8cb6db70a0204035342520a0221201021a42d623ab4fe0bf8c47fd21cc10636e39e07f91e9b2478551e137d512aaa0a02070653434e534f4c0a022120f8d030e4ef460b91ad23eabbbb27aec463e3c30ecc8d5c4b71e92f54a36ccdbd0a020504534c4e440a0221209fb0bd29fe51481b61df41e650346cc374b13c2bab2e3610364cd834a592025a0a020403534e590a022120ef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d0a020403534f4c0a02212023245bb74254e65a98cc3ff4a37443d79f527e44e449750ad304538b006f21bc0a02040353524d0a022120a1a6465f4c2ebf244c31d80bc95c27345a3424e428c2def33eced9e90d3f701b0a0206055354534f4c0a0221204457960559b812558bb0f8cb7912f8bcb843eb801a3133ef45be998630ff8c050a020403544c4d0a022120433faaa801ecdb6618e3897177a118b273a8e18cc3ff545aadfc207d58d028f70a020504545553440a022120eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a0a020504555344430a0221202b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b0a020504555344540a022120ef94acc2fb09eb976c6eb3000bab898cab891d5b800702cd1dc88e61d7c3c5e60a020504555354430a0221207507a4629ad0143550666bce2e7cae0b961a0f624f821feaab642fe1be632f5c0a0204035641490a022120b216f7ca372b318985903866e0b6dc44a14564828c49f36d0d363805aa76335c0a02040357494e0a022120b82449fd728133488d2d41131cffe763f9c1693b73c544d9ef6aaa371060dd250a020403574f4f0a022120831624f51c7bd4499fe5e0f16dfa2fd22584ae4bdc496bbbbe9ba831b2d9bce90a0204035856530a02212026852e2d0696e25e6adaad2d7ca3a1f2f15aab68d317ace14d41b4128a7e780f0a0204035a42430a022120d6b3bc030a8bbb7dd9de46fb564c34bb7f860dead8985eb16a49cdc62f8ab3a50a02212073dc009953c83c944690037ea477df627657f45c14f16ad3a61089c5a3f9f4f20a02212008f781a893bc9340140c5f89c8a96f438bcfae4d1474cc0f688e3a52892c73180a0221204204a764d9e0ca8db0fd43b62728265bf82671ce8a8b4bfedba13672be12de620a022120cb1743d0e3e3eace7e84b8230dc082829813e3ab04e91b503c08e9a441c0ea8b0a02212044a93dddd8effa54ea51076c4e851b6cbbfd938e82eb90197de38fe8876bb66e0a022120c11efd88a9b2c96bc84bccd6ce4aa05bebad7aa760dbe5f2f00ef90c4abd50cc0a02212061226d39beea19d334f17c2febce27e12646d84675924ebb02b9cdaea68727e30a022120d7566a3ba7f7286ed54f4ae7e983f4420ae0b1e0f3892e11f9c4ab107bbad7b90a02212030029479598797290e3638a1712c29bde2367d0eca794f778b25b5a472f192de0a022120fc309467defa4b198c6b5bd59c08db4b9dfb27ddbcc32f31560f217b4ff8fc2b0a022120ecf553770d9b10965f8fb64771e93f5690a182edc32be4a3236e0caaa6e0581a0a022120457064c555edae5b6b89267e992be4c58be5375f0e9ca9749391c7094f7d90330a022120f9c0172ba10dfa4d19088d94f5bf61d3b54d5bd7483a322a982e1373ee8ea31b0a022120eb3b5720301b36fa074260e6e27e2cfff3a7c6bbb47564eb218a9a7f2a8c01930a02212006c532524fabd49cc142815502d785e4f34ec3bd035480efb770568d423f46c60a022120c098773aa18ebb7e84d5ee7ea7d97105ab2015a329f670012398cd2c8f5cc6ca0a0221200d10b9ccdc9af1d65cd4bafabf4e34db01c0ce83abba190230eaf26d7592cd210a022120970541e943e11d1bf1d4d763bc8e70995f613dc682f727045a866312312a63760a02212013ac8c71e4e1c61dece57bea76163d393bf75cd0db8e52981e1564fa592698cb0a022120b59d65c2e10af17c0d6f7d10be8d64c0c13dd15d957c4c39763b4cc55e5919370a02212087a67534df591d2dd5ec577ab3c75668a8e3d35e92e27bf29d9e2e52df8de4120a02212031775e1d6897129e8a84eeba975778fb50015b88039e9bc140bbd839694ac0ae0a02212036032e522b810babd8e3148e9f0d588af9e95e93b97ffb58566b837fdbd31f7f0a022120ca80ba6dc32e08d06f1aa886011eed1d77c77be9eb761cc10d72b7d0a2fd57a60a0221206660d7629213995af8aa169ad6a1cf1a725765d3741b7e7a27825f884a701b960a022120aa67a6594d0e1578faa3bba80bec5b31e461b945e4fbab59eeab38ece09335fb0a0221209b7bfd7654cbb80099d5edc0a29159afc9e9b4636c811cf8c3b95bd11dd8e3dd0a0221200184a60a47ab7c23fcb828d727b05748ef52433fb5ae96f775cc98c9049d8c2c0a0221206354d685c247f1efc36f967617beffa2ebd5a95d8ffe17de4498505c923067b80a02212021adabf73ad61903c1872fa220f84d3b1b9990cec2047f8317e2a67efcd1764e0a022120c999fe8a75bf9528931deb832e2934dd1ac138757d7f2c1398675b6f521d556f0a02212087fd5a8d0bf026239f98b53311d2cec2ee171e853f545e1ad742e092a97ef8600a02212051ae9b785e6aeb288955720faef15f63ee3ae21af38114ade8b3fc3d3831b5ad0a0221202d9315a88f3019f8efa88dfe9c0f0843712da0bac814461e27733f6b83eb51b30a0221202245aec1db780b8dc9f710173256996164f0a65f25a975453e4202a54371d2ea0a022120077e345652cb98edba89815a63a0ede724eba12d7a10c8498e0e762d581aca6b0a022120997e0bf451cb36b4aea096e6b5c254d700922211dd933d9d17c467f0d6f343210a022120677dbbf4f68b5cb996a40dfae338b87d5efb2e12a9b2686d1ca16d69b3d7f2040a0221206de025a4cf28124f8ea6cb8085f860096dbc36d9c40002e221fc449337e065b20a022120d2c2c1f2bba8e0964f9589e060c2ee97f5e19057267ac3284caef3bd50bd2cb50a02212070bf2974182b6ebf4eac64977170074315e7a07d7b58a963758060924ee9a1920a0221209f2acb902ee5c3a8e41c643164a498ed3089c99df3477189babd3682801340750a02212052800482aa2666c0d2621f8f0a8c19ee6e5e5039a65524e268315501b3355fbb0a0221202f317bea04ce89adb8acc85a1a68d20d6e89976d5e86306570a0bb3107e4916a0a022120b5366e5ded52c3db5d81635a624a39d81eb8c639427fc79c539e5c91e17c84940a0221207f57ca775216655022daa88e41c380529211cde01a1517735dbcf30e4a02bdaa0a02212027e867f0f4f61076456d1a73b14c7edc1cf5cef4f4d6193a33424288f11bd0f40a0221209b245faf19d2f3306b58821ef60b194d7b67eb5250635059d8eaae4a36337b280a02212085dafbfa99c733fdd33649551666958ca8f82fd0d849746e093b770caab249d20a0221206b86b78584e182c61729267d73593f48b6a929f3218234769281513cbe5e87ee0a0204035041490a0221201e761bb4e6b1e4d7899b618d389516ddbdfbdb858018b71c45cb6ade57c96f620a0221207730809b4a4656325b7fbc8157fd803c3da170727c541afc4db37773246258b10a022120cb9372930932694b8a74dd5599c0f9e236575f434faf05141d95803a91f044ed0a022120341d9502b1e6bc445036fd76f57bc824c09254a754289878b52a40eb067d2a0b0a022120f9917668f24038a383e51c0b019f5d9645d6785c6bf9a0d48483edf82ba5caec0a022120dd51a67a1b4d0702abf5b5385631b7d3e586993eadacf2e0d900c0a81edcffdd0a022120b5d2cee0b86bb0571db898ae7b9f288c5e272fa486d41a5bf375b52a0249d94c0a022120fe650f0367d4a7ef9815a593ea15d36593f0643aaaf0149bb04be67ab851decd0a02212078ec25615d53d2486db101e829f77615c4408cbbd543088714b9f267da44591a0a022120b718e659619a031b41c6ea9122f146859a82d4a7edc17c55b1e5188e8b4c1d1c0a020504535445500a02212013f7925c9186b8cca50dde4bbf2d4fa9705052cceb6f2fc79df827e2b37d6f3b0a0221200adbf6463e27f60f171bcc498703a4282d1954ec3a85e1f6698b48ecde18c00e0a0221201bd1c59cd425aebf8a931c1b2a902b9a11e7d18dc68021e4a35a5cf24220a6c70a02212041f3625971ca2ed2263e78573fe5ce23e13d2558ed3f2e47ab0f84fb9e7ae7220a0221201fc18861232290221461220bd4e2acd1dcdfbc89c84092c93c18bdc7756c15880a022120026d1f1cf9f1c0ee92eb55696d3bd2393075b611c4f468ae5b967175edc4c25c0a022120eca4f9c5ce7cbef8a349fa9f6c12b23ac45b9ad91c4d1808c6a2dda841f95a020a022120834d3f05278b6f5c963670f437a2267c160914707328f888418902106bcd13d70a022120bf517e0f7ccfc307f0b2fa93b99a737641933989af6af769c928725989c21e660a0221206ff709bf1f0fdb46d991ae6839163df1e050d143429d737fc650b6b2143478080a02212064abe8a459058c60d55427f62be3dc4942c0ba93d1eb5cb85117b70b8e4651ad126170746f733a3a6d657461646174615f763063036d000000000000001a4552525f4e4f545f454e4f5547485f5045524d495353494f4e53006e00000000000000134552525f544f4b454e5f4e4f545f464f554e44007000000000000000174552525f414c52454144595f494e495449414c495a454400000202160b0302080408051a030102011b0b03020804030000000007440a0011080c020e0211090c080b00110a0c050600000000000000000c0a090c090b0a0b0907030911070c090c0a0e05110b0c070a07031a051e0e05110c0c0305210e0511090c030b030c060b0a0b090b060b0711070c090c0a0b0a0b090b01340911060c090c0a0b090335053c0b080b0a33110d1a0c0405420b080b0a33110d180c040b04020101000200010d26070429010304050638000238010c0338020c0007042b000c010a0110000a03380303160b01010702270a0110000b033804140c020b020b0110011411120c040e040b001100020200000101151438050c0007042b010c010a0110020a003806030e0b01010702270b0110020b0038071402030104010017a4060a00111407042103090b00010701270a00111429002003120b00010700273808063c0000000000000012000c6b0a000b6b2d000b0011142a000c6c070511160c020a6c0f00070611170b023809070711160c040a6c0f00070811170b043809070911160c060a6c0f00070a11170b063809070b11160c080a6c0f00070c11170b083809070d11160c0a0a6c0f00070e11170b0a3809070f11160c0c0a6c0f00071011170b0c3809071111160c0e0a6c0f00071211170b0e3809071311160c100a6c0f00071411170b103809071511160c120a6c0f00071611170b123809071711160c140a6c0f00071811170b143809071911160c160a6c0f00071a11170b163809071b11160c180a6c0f00071c11170b183809071d11160c1a0a6c0f00071e11170b1a3809071f11160c1c0a6c0f00072011170b1c3809072111160c1e0a6c0f00072211170b1e3809072311160c200a6c0f00072411170b203809072511160c220a6c0f00072611170b223809072711160c240a6c0f00072811170b243809072911160c260a6c0f00072a11170b263809072b11160c280a6c0f00072c11170b283809072d11160c2a0a6c0f00072e11170b2a3809072f11160c2c0a6c0f00073011170b2c3809073111160c2e0a6c0f00073211170b2e3809073311160c300a6c0f00073411170b303809073511160c320a6c0f00073611170b323809073711160c340a6c0f00073811170b343809073911160c360a6c0f00073a11170b363809073b11160c380a6c0f00073c11170b383809073d11160c3a0a6c0f00073e11170b3a3809073f11160c3c0a6c0f00074011170b3c3809074111160c3e0a6c0f00074211170b3e3809074311160c400a6c0f00074411170b403809074511160c420a6c0f00074611170b423809074711160c440a6c0f00074811170b443809074911160c460a6c0f00074a11170b463809074b11160c480a6c0f00074c11170b483809074d11160c4a0a6c0f00074e11170b4a3809074f11160c4c0a6c0f00075011170b4c3809075111160c4e0a6c0f00075211170b4e3809075311160c500a6c0f00075411170b503809075511160c520a6c0f00075611170b523809075711160c540a6c0f00075811170b543809075911160c560a6c0f00075a11170b563809075b11160c580a6c0f00075c11170b583809075d11160c5a0a6c0f00075e11170b5a3809075f11160c5c0a6c0f00076011170b5c3809076111160c5e0a6c0f00076211170b5e3809076311160c600a6c0f00076411170b603809076511160c620a6c0f00076611170b623809076711160c640a6c0f00076811170b643809076911160c660a6c0f00076a11170b663809076b11160c680a6c0f00076c11170b683809076d11160c6a0a6c0f00076e11170b6a3809076f11160c6e0a6c0f00077011170b6e3809077111160c700a6c0f00077211170b703809077311160c720a6c0f00077411170b723809077511160c740a6c0f00077611170b743809077711160c760a6c0f00077811170b763809077911160c780a6c0f00077a11170b783809077b11160c7a0a6c0f00077c11170b7a3809077d11160c7c0a6c0f00077e11170b7c3809077f11160c7e0a6c0f0007800111170b7e380907810111160c80010a6c0f0007820111170b8001380907830111160c82010a6c0f0007840111170b8201380907850111160c84010a6c0f0007860111170b8401380907870111160c86010a6c0f0007880111170b8601380907890111160c88010a6c0f00078a0111170b88013809078b0111160c8a010a6c0f00078c0111170b8a013809078d0111160c8c010a6c0f00078e0111170b8c013809078f0111160c8e010a6c0f0007900111170b8e01380907910111160c90010a6c0f0007920111170b9001380907930111160c92010a6c0f0007940111170b9201380907950111160c94010a6c0f0007960111170b9401380907970111160c96010a6c0f0007980111170b9601380907990111160c98010a6c0f00079a0111170b98013809079b0111160c9a010a6c0f00079c0111170b9a013809079d0111160c9c010a6c0f00079e0111170b9c013809079f0111160c9e010a6c0f0007a00111170b9e01380907a10111160ca0010a6c0f0007a20111170ba001380907a30111160ca2010a6c0f0007a40111170ba201380907a50111160ca4010a6c0f0007a60111170ba401380907a70111160ca6010a6c0f0007a80111170ba601380907a90111160ca8010a6c0f0007aa0111170ba801380907ab0111160caa010a6c0f0007ac0111170baa01380907ad0111160cac010a6c0f0007ae0111170bac01380907af0111160cae010b6c0f0007b00111170bae0138090204010401001da7050a0011140c010a01070421030b0b00010701270a00111429002003140b0001070027380806504600000000000012000c020b000b022d000b012a000c0307b10111160c4c0a030f00070611170b4c380907b20111160c6d0a030f00070a11170b6d380907b30111160c780a030f00070c11170b78380907b40111160c83010a030f00070e11170b8301380907b50111160c8e010a030f00071011170b8e01380907b60111160c520a030f00071211170b52380907b70111160c5d0a030f00071611170b5d380907b80111160c650a030f00071a11170b65380907b90111160c660a030f00071e11170b66380907ba0111160c670a030f00072411170b67380907bb0111160c680a030f00072611170b68380907bc0111160c690a030f00072811170b69380907bd0111160c6a0a030f00072a11170b6a380907be0111160c6b0a030f00072c11170b6b380907bf0111160c6c0a030f00072e11170b6c380907c00111160c6e0a030f00073011170b6e380907c10111160c6f0a030f00073211170b6f380907c20111160c700a030f00073811170b70380907c30111160c710a030f00073e11170b71380907c40111160c720a030f00074011170b72380907c50111160c730a030f00074211170b73380907c60111160c740a030f00074411170b74380907c70111160c750a030f00074611170b75380907c80111160c760a030f00074811170b76380907c90111160c770a030f00074a11170b77380907ca0111160c790a030f00074c11170b79380907cb0111160c7a0a030f00074e11170b7a380907cc0111160c7b0a030f00075011170b7b380907cd0111160c7c0a030f00075211170b7c380907ce0111160c7d0a030f00075411170b7d380907cf0111160c7e0a030f00075611170b7e380907d00111160c7f0a030f00075811170b7f380907d10111160c80010a030f00075a11170b8001380907d20111160c81010a030f00075c11170b8101380907d30111160c82010a030f00075e11170b8201380907d40111160c84010a030f00076211170b8401380907d50111160c85010a030f00076411170b8501380907d60111160c86010a030f00076a11170b8601380907d70111160c87010a030f00076c11170b8701380907d80111160c88010a030f00076e11170b8801380907d90111160c89010a030f00077011170b8901380907da0111160c8a010a030f00077211170b8a01380907db0111160c8b010a030f00077411170b8b01380907dc0111160c8c010a030f00077611170b8c01380907dd0111160c8d010a030f00077811170b8d01380907de0111160c8f010a030f00077a11170b8f01380907df0111160c90010a030f00077c11170b9001380907e00111160c91010a030f00077e11170b9101380907e10111160c92010a030f0007820111170b9201380907e20111160c93010a030f0007840111170b9301380907e30111160c4d0a030f0007e40111170b4d380907e50111160c4e0a030f0007860111170b4e380907e60111160c4f0a030f00078c0111170b4f380907e70111160c500a030f00078e0111170b50380907e80111160c510a030f0007900111170b51380907e90111160c530a030f0007920111170b53380907ea0111160c540a030f0007940111170b54380907eb0111160c550a030f0007960111170b55380907ec0111160c560a030f0007980111170b56380907ed0111160c570a030f00079a0111170b57380907ee0111160c580a030f0007ef0111170b58380907f00111160c590a030f00079c0111170b59380907f10111160c5a0a030f00079e0111170b5a380907f20111160c5b0a030f0007a00111170b5b380907f30111160c5c0a030f0007a20111170b5c380907f40111160c5e0a030f0007a40111170b5e380907f50111160c5f0a030f0007a60111170b5f380907f60111160c600a030f0007a80111170b60380907f70111160c610a030f0007aa0111170b61380907f80111160c620a030f0007ac0111170b62380907f90111160c630a030f0007ae0111170b63380907fa0111160c640b030f0007b00111170b6438090205010401001e120a00111407042103090b00010701270b0011142a000c020b010b020f011502060000001f5d0a010a031f0305051c0a020a0026030a05110b020b0017090c070c0405170b000b0217080c070c040b040b070c060c05055a0a01031f05230a03200c080525090c080b080328052f0b000b0216080c0e0c0d05560b01200b031f0335053c0b000b0216090c0c0c0b05520a000a0226034105480b000b0217090c0a0c09054e0b020b0017080c0a0c090b090b0a0c0c0c0b0b0b0b0c0c0e0c0d0b0d0b0e0c060c050b050b060207000000205e0a010a031f03050508080c0705140a0120030c05100a03200c040512090c040b040c070b070317051e0b000b02160b010c060c05055b0b01032105250b03200c080527090c080b08032a05410a000a0224032f05360b000b0217080c0a0c09053c0b020b0017090c0a0c090b090b0a0c0e0c0d05570a020a00240346054d0b020b0017080c0c0c0b05530b000b0217090c0c0c0b0b0b0b0c0c0e0c0d0b0d0b0e0c060c050b050b060200000001010000"; - let res = run_binary_test("sample_price_oracle", code); - assert!(res.is_ok(), "{:?}", res) -} - -#[test] -fn sample_aptosd_swap() { - let code = "a11ceb0b050000000c0100160216300346ee0104b4022205d602960407ec06de0708ca0e40068a0f8b01109510f9010a8e12520ce012e80e0dc821160000010101020103010401050106010700080009000a000b0700000c0700000d0800000e0700000f07000a28040207000400042b0401060102380800083a0000063c070100000010000100001102010000120101000013030100001401010000150101000016020100001701040000180506000019010700001a020100001b020100001c010100001d000100001e020100001f02010000200001000021000100092f01090009300105000a310b0c02070604320e01010607330205000934010f0009350104000936010f000a37110f020704033900010100033b02010100093d0104000a3e1617020704063f180f01000640191a01000a411b1c02070409421d010005431f040005441f0400094501200009460104000947010f0009480901000a490125020704014a022601060a4b1128020704140a150d1a0a1b121c1315141e0a1f052005210a151e290a2a0d2a142a1e2b0a1b1303060c05030001060c02060c0301030105050303030303010a050c03030303030505070b0502050803070b0502050803070802070803070b0601080401020205080303070b050209000901090009010107090101080402070b060109000900010108070b05020508030501070b06010800030107080207080302060b05020900090109000108070108080108002d0b0901050b0901050b0901050c0b0901050b0901050b0901050b0901050b090105030303030303070b06010801070b06010801070b06010801070b0601080103070803070803070803070803070b0502050803070b0502050803070b0502050803070b0502050803070b090105070b090105070b090105070b09010503030b0901050b0901050b0901050b090105070802070802070802070802070802030301060b050209000901010b0901090001060b0901090001070b0901090001090002070b0502090009010900030709010b090109000b09010900020503010801020303010c04010103030a03030303030505070b0502050803070b0502050803070803070b0901050b090105070803070b0502050803070b0901050b0901050a050a0b0502050803060c030c0b060108040c0b060108000c0b060108010c010b050209000901010b060109000c0b0901050c070b0502050803050b090105070b06010801060803070b0502050803070b0901050b090105070802060c030609010b090109000b090109000d6170746f737061645f73776170076163636f756e740a6170746f735f636f696e04636f696e056576656e74066d6174683634066f7074696f6e067369676e65720d6170746f737061645f636f696e06636f6e6669670e6974657261626c655f7461626c65104269644170746f735061644576656e7417446973747269627574654170746f737061644576656e74114c61756e636850616452656769737472790f546f6b656e446973747269627574650e57686974654c6973744576656e740c61646457686974654c6973740c6173736572745f61646d696e136173736572745f6e6f5f656d657267656e63790b6269644170746f735061640d64697374726962757465416c6c0e64697374726962757465417470701064697374726962757465536561736f6e0f67657453776170546f74616c4269640c67657457686974654c6973740d67657457686974654c697374730a696e697469616c697a650f6c61756e6368506164536561736f6e09726566756e64416c6c0b726566756e644170746f730b7265736574536561736f6e0f77686974654c697374536561736f6e0d77697468647261774170746f731077697468647261774170746f73506164036361700362696408696e766573746f72106469737472696275746564546f6b656e06726566756e6409696e766573746f72730d4974657261626c655461626c6508746f74616c426964126269646170746f737061645f6576656e74730b4576656e7448616e646c6519646973747269627574656170746f737061645f6576656e74731077686974656c6973745f6576656e74730b64697374726962757465640c676574537761705374617465126765745265736f757263654164647265737317626f72726f775f6d75745f776974685f64656661756c740a656d69745f6576656e740a616464726573735f6f660b6973456d657267656e63791467657453776170436f6e6669674861726443617011697342797061737357686974654c69737408636f6e7461696e73094170746f73436f696e087472616e736665720c4170746f73506164436f696e087265676973746572064f7074696f6e1a67657453776170436f6e666967417074546f417074745261746508686561645f6b65790769735f736f6d6507657874726163740f626f72726f775f697465725f6d75740a6d696e7441747070546f036d696e036d6178116765745265736f757263655369676e65721467657453776170436f6e666967536f66744361701967657453776170436f6e666967456e61626c65526566756e640c736574537761705374617465036e6577106e65775f6576656e745f68616e646c650b626f72726f775f6974657241376d8231e6aedc29a19459e804b3770a250c3f367ac8d0f91e10842e8c906d0000000000000000000000000000000000000000000000000000000000000001030800e87648170000000308950100000000000003089a0100000000000003089b010000000000000308930100000000000003089801000000000000030896010000000000000308970100000000000003089901000000000000020104020105020101020103020102052041376d8231e6aedc29a19459e804b3770a250c3f367ac8d0f91e10842e8c906d126170746f733a3a6d657461646174615f7630e4010893010000000000000f4552525f5045524d495353494f4e530095010000000000000d4552525f454d455247454e4359009601000000000000104552525f534541534f4e5f454e444544009701000000000000144552525f534541534f4e5f4e4f545f5245534554009801000000000000114552525f534541534f4e5f414354495645009901000000000000104552525f534541534f4e5f5354415445009a01000000000000134552525f484152444341505f52454143484544009b01000000000000144552525f4e4f545f494e5f57484954454c4953540b6572726f7220636f64657300020322032303240501020522032303250326032405020205270b050205080329032a0b060108002c0b060108012d0b06010804030206220323032e03250326032405040206220323032e032503260324050001000102083c0b0011011112070d21030807082711132a020c0c0a0c0f000c0b0b0c0f010c0e0b0b0c0a0a010c090b010c080b0a0b090600000000000000000600000000000000000600000000000000000600000000000000000600000000000000000b08120338000c0d0b020a0d0f02150b0e0a0d1002140a0d1003140a0d1004140a0d1005140a0d1005140b0d10061412043801020100000001080b001116070e210307070427020200000001061117200305070127020301000102106111021112070c2103090b000107082711180c0611132a020c0811190c040a080f000a0011160c030c020b022e0b0338020c070b040b071e03250b00010b08010703270a081007140b062503310b00010b08010702270a081007140a01160a080f07150a080f080c050a0011130a0138030a0038040b080f000a00111607000600000000000000000600000000000000000600000000000000000600000000000000000b001116120338000c090b010a090f03150b050a091002140a091003140b091006141200380502040000010215a00311180c13111d0c2b11132a020c260b261007140c2c0b2c0a13250310055c11132a020c270a270f000c180b270f090c0f0a182e38060c010d010c1c0a1c2e3807032405550a180b1c380838090c22010c140a141003140a140f0a150a14100a140a2b180a140f04150a141006140a1410041411220a0f0a141002140a141003140a141004140a141005140b141006141201380a0d220c1c051f0b1c010b18010b0f01059f030b130c0a11132a020c2a0a2a0f000c1b0b2a0f090c120a1b2e38060c040d040c1f0a1f2e3807037205c3010a1b0b1f380838090c23010c170a171002140c0d0a171003140c0b0b0d0b0b11230a0a11230c090a0906000000000000000024038c0105b4010a090a170f0a150a090a2b180a170f04150b0a0b09170c0a0a171006140a1710041411220a120a171002140a171003140a171004140a171005140b171006141201380a05b6010b17010a0a0600000000000000002503bb0105c0010b1b010b120105c3010d230c1f056d0a0a0600000000000000002403c80105b30211132a020c280a280f000c190b280f090c100a192e38060c000d000c1d0a1d2e380703dc0105b3020a190b1d380838090c24010c150a151003140a15100a141706000000000000000011240a0a11230c200a200600000000000000002403f40105a4020a15100a140a20160a150f0a150a200a2b180c210a151004140a21160a150f04150b0a0b20170c0a0a151006140b2111220a100a151002140a151003140a151004140a151005140b151006141201380a05a6020b15010a0a0600000000000000002503ab0205b0020b19010b100105b3020d240c1d05d7010b0a0600000000000000002503b90206a1860100000000002711132a020c290a290f000c1a0b290f090c110a1a2e38060c020d020c1e0a1e2e380703cd020599030a1a0b1e380838090c25010c160a161003140c0c0a16100a140c0e0a0c0a0e2603e8020b1a010b16010b1101061127000000000000270b0c0b0e1706000000000000000011240a160f05150a161005140600000000000000002403f70205940311250c030e030a161006140a16100514110d0a110a161002140a161003140a161004140a161005140b161006141201380a0596030b16010d250c1e05c8020b1e010b1a010b1101020500000102211a11260c0211132a021007140c0311270c010b01030c05110b030b02230c000513090c000b0003160518110c05191104020601000102010f0b00110111021112070c210309070827070911281105070a1128020701000102010511132b02100714020801000102222511132a020f000c090b090c080a000c070b000c060b080b070600000000000000000600000000000000000600000000000000000600000000000000000600000000000000000b06120338000c0a0a0a1002140a0a1003140a0a100a140a0a1004140b0a100514020901000102232611132a020f000c03400500000000000000000c060a032e38060c000d000c040a042e3807031105200a030b04380838090c05010c020d060b0210061444050d050c04050c0b04010b03010b06020a01000024220b00110111250c0a0e0a0c02380b0c0111250c040e04380c0c0511250c060e06380d0c0711250c080e08380e0c090b020b010600000000000000000b070b090b0512022d02070b1128020b010000010b0b0011011112070d210308070827070c1128020c00000102274a11132a020c0a0a0a0f000c070b0a0f090c050a072e38060c000d000c0811250c010e010c0b0a082e3807031805410a070b0838080c030c020b022e0b03380f0c09010c060a0b0a061006140a06100314110d0a050a061002140a061003140a061004140a061005140b061006141201380a0d090c0805130b0b010b08010b07010b0501020d00000001050b000b010b023803020e010000010b0b0011011112070a210308070627070b1128020f010000010b0b0011011112070b210308070727070d1128021001000020090b00110111250c030e030b010b023803021101000020090b00110111250c030e030b010b02381002020002040300030103030304030502010202020303020000"; - let res = run_binary_test("sample_aptosd_swap", code); - assert!(res.is_ok(), "{:?}", res) -} - -#[test] -fn sample_router() { - let code = "a11ceb0b050000000a01000e020e0603148f0104a3012805cb018f0207da03f90208d30640069307a00110b3082b0cde08db110000010101020003000400050006010a0401000100070000000008010202000000090102020000020b050600050c060700050d050200030e0207020000040f02070200000410020a0200000111020c01000612000d000113020f01000414020a0200000115100f0100031611120200000117130201000418020d0200000519140d00041a1500020000041b020a020000041c020d020000051d140d00031e111202000006080609070907080808090b0b0e0c080d0b0e080f0b100812080f0e0809090e130914091209160802040403060c030300030404043501010101010103030404040404040404040b000109000b000109000b000109000b000109000b000109000b000109000b000109010b000109010b0001090103030303030303030404030301010404010404040503030303030301060c0105010102090009010209010900010301090001020104010901010b0001090002060c0308060c070b00010900070b00010901030301030302030302050b000109000305040106060c010303030432010103030404040404040404040b000109000b000109000b000109000b000109000b000109000b000109000b000109010b000109010b000109010303030303030404030301010404010404040505030303030303030306726f7574657204636f696e067369676e657203616d6d0b636c6f625f6d61726b657403666565047574696c0873696d706c69667918737761705f636f696e5f666f725f65786163745f636f696e18737761705f65786163745f636f696e5f666f725f636f696e04436f696e0a616464726573735f6f660a6665655f65786973747316696e697469616c697a655f6665655f64656661756c740b706f6f6c5f6578697374730d6d61726b65745f657869737473086c6f745f73697a6508646563696d616c7303657870047a65726f0c6e5f6269645f6c6576656c730877697468647261771d636f696e5f737761705f636f696e5f666f725f65786163745f636f696e076465706f7369740b626573745f6269645f61750c73756274726163745f66656516706c6163655f6f726465725f666f725f726f757465720c6e5f61736b5f6c6576656c730b626573745f61736b5f6175076164645f6665651d636f696e5f737761705f65786163745f636f696e5f666f725f636f696e49661cd59c0b89440313af587bc99c3d38614d9a52479eb3f7c7c766d580c30b00000000000000000000000000000000000000000000000000000000000000010308c9000000000000000308ca000000000000000308c800000000000000030804000000000000000308070000000000000003086500000000000000030866000000000000000308030000000000000003080200000000000000030864000000000000000308ffffffffffffffff0308050000000000000003080100000000000000030868000000000000000308670000000000000003080600000000000000126170746f733a3a6d657461646174615f7630170104000000000000000c45544553545f4641494c4544000001000003190a000c030a010c040a01320000000000000000000000000000000022030905120b000a01190c020b010c000b020c0105040b030a001a0b040b001a020101040004ec030a0011030c310a311104200308050a0a0011053800030d0510080c03051238010c030b030c2d38020c2a38030c290a2d0b291f031d05fb0138040c27320a000000000000000000000000000000380535110a0c0e0600000000000000000c320600000000000000000c3438060c1a0a340a0223032f05340a320a01230c060536090c060b06033905eb01380706000000000000000021033e055f0a000a010a321738080c140b000d140d1a0a010a32170a020a34170906000000000000000006000000000000000038090c210c1d0a310b14380a0b320b21160c320b340b1d160c3405eb01380b0c130a310a130811110c120a020a3417350a0e180a121a340c090b090a272303750596010a000a010a321738080c180b000d180d1a0a010a32170a020a34170906000000000000000006000000000000000038090c230c1f0a310b18380a0b320b23160c320b340b1f160c3405eb010a0e0a1211000c250c2b0a000a010a321738080c190a000d190d1a0a010a32170a020a3417080b2b340b253438090c240c200a310b19380a0b320b24160c320b340b20160c340a340a022303c20105c7010a320a01230c0805c901090c080b0803cc0105ea010a020a3417350a0e180b121a340c0a0a000907060b13340b0a3200000000000000000000000000000000380c0c2e0c0d0b320b0d34160c320b340b2e34160c34052a0b320b012503f1010707270b340b022103f7010708270b310b1a380d05eb030a2d0a2a1f03800205b203380e0c28320a000000000000000000000000000000380f35110a0c0f0600000000000000000c330600000000000000000c3538060c1b0a350a02230392020597020a330a01230c04059902090c040b04039c0205a20338100600000000000000002103a10205a402080c0505aa020a020a35170a28230c050b0503ad0205ce020a000a010a331738080c150b000d150d1b0a010a33170a020a35170906000000000000000006000000000000000038090c220c1e0a310b15380a0b330b22160c330b350b1e160c3505a20338110c110a310a110811150c100b100a0f11000c260c2c0a000a010a331738080c160a000d160d1b0a010a33170a020a3517080b2c340b263438090c360c370a310b16380a0b330b36160c330b350b37160c350a350a02230381030586030a330a01230c07058803090c070b07038b0305a1030a000807060b11340a020a3517320000000000000000000000000000000038120c2f0c0b0b330b2f34160c330b350b0b34160c35058d020b330b012503a8030707270b350b022103ae030708270b310b1b380d05eb030b2d03b50305cd030a000a0138080c1738060c1c0b000d170d1c0b010b0209060000000000000000060000000000000000380901010a310b17380a0b310b1c380d05eb030b2a03d00305e7030b00080705070a0a02320000000000000000000000000000000038120c300c0c0b0c340b022103e0030707270b30340b012503eb030708270b0001070c27020201040016d1030a0011030c2b0a2b1104200308050a0a0011053800030d0510080c03051238010c030b030c2738020c2438030c230a270a231f031d05b70138040c21320a000000000000000000000000000000380535110a0c0a0600000000000000000c2d0600000000000000000c2f38060c160a2d0a0123032f05a70138070600000000000000002103340537080c04053d0a010a2d170a21230c040b040340055f0a000a010a2d1738080c100b000d100d160a010a2d170600000000000000000906000000000000000006000000000000000038130c1c0c190a2b0b10380a0b2d0b1c160c2d0b2f0b19160c2f05a701380b0c0f0a2b0a0f0811110c0e0b0e0a0a11000c1f0c250a000a010a2d1738080c140a000d140d160a010a2d17060000000000000000080b25340b1f3438130c310c330a2b0b14380a0b2d0b31160c2d0b2f0b33160c2f0a2d0a012303900105a6010a000907060b0f340a010a2d173200000000000000000000000000000000380c0c280c080b2d0b0834160c2d0b2f0b2834160c2f052a0b2d0b012103ad010707270b2f0b022603b3010708270b2b0b16380d05d0030a270b241f03bc01059403380e0c22320a000000000000000000000000000000380f35110a0c0b0600000000000000000c2e0600000000000000000c3038060c180a2e0a012303ce0105840338100600000000000000002103d30105f2010a000a010a2e1738080c150b000d150d180a010a2e170600000000000000000906000000000000000006000000000000000038130c1d0c1a0a2b0b15380a0b2e0b1d160c2e0b300b1a160c3005840338110c0d0a2b0a0d0811150c0c0a010a2e17350a0b180a0c1a340c050b050a222303880205a7020a000a010a2e1738080c110b000d110d180a010a2e170600000000000000000906000000000000000006000000000000000038130c1e0c1b0a2b0b11380a0b2e0b1e160c2e0b300b1b160c300584030a0b0a0c11000c200c260a000a010a2e1738080c120a000d120d180a010a2e17060000000000000000080b26340b203438130c320c340a2b0b12380a0b2e0b32160c2e0b300b34160c300a2e0a012303d1020583030a010a2e17350a0b180b0c1a340c060a000807060b0d340a06320000000000000000000000000000000038120c2a0c070a07340b062503ee020b0001061111000000000000270a2a340a010a2e172503f9020b0001062222000000000000270b2e0b2a34160c2e0b300b0734160c3005c9010b2e0b0121038a030707270b300b02260390030708270b2b0b18380d05d0030b2703970305b2030a000a0138080c1338060c170a000d130d170b010b0209060000000000000000060000000000000000381301010b0011030c2c0a2c0b17380d0b2c0b13380a05d0030b2303b50305cc030b000907050600000000000000000a013200000000000000000000000000000000380c0c290c090b09340b012103c5030707270b29340b022603d0030708270b0001070c270200"; - let res = run_binary_test("sample_router", code); - assert!(res.is_ok(), "{:?}", res) -} - -#[test] -fn sample_pool() { - let code = "a11ceb0b050000000c010020022079039901c90204e2036605c804fd0507c50aa80c08ed166006cd17c101108e19bb020ac91bd4020c9d1eb3250dd043340000010101020103010401050106010701080109010a020b000c000d000e000f0010070000110600001206000013060000140600001508000000040000160800001708000018060000190600001a0600001b0600071d07000b2707000b3a0700053c040106010344040100010245080009470402030100010b480400084e0402030100010b6c07000e7807000e7b07000e7e07000e80010700001c000100001e020100001f030100002002010000210201000022020100002300010000240201000025040100002605010000280607000029080100002a090100002b0a0100002c0b01000658050d0008590f07020300045a101000085b1213020300045c101000035d15160100035e17010100035f1810010005601a0101060b611e1c000b621f06000b632010000b64212200096524010203000a66250101000867122a0203000a682c2d01000a672e2f01000967312a0203000b69320100096a3301020300036b340101000d6d393a000c6d393a0009593b070203000b6e1c3c000b6f3d10000b703d10000b713d0d0003723e16010007733f1d000d74393a000c74393a000975013302030408654401020300087501460203040176054701060b7706100008790f490203000e7a4b4a000e7c4c4d000f7d4e0101040e7f3951000e81010e5300100e1011121114141514161417191c231d1c17261728120e1e111f2b202b12302123232324141735173617371f1c201c27232c1417403023103031303111310e17453211320e32303345333733263319333533363328334035303511384d384a3851350e385303060c04030006060c040a050a080d0a080d0a0306060c04020303030b060c020a050a080d0a080d0a03030303030201060c01080e010103060c05080d02060c0407060c03030303030302060c05040b11010812070805070806070808010502050a0402060b150209000901090001030204080602070b15020900090109000107090101081202060c03010b1101090002070b110109000b1101090001060b1101090001080202070b100109000900070708050303070806070808080f0a080f01080f01080d0405080d080d030305080d080d0205080f03060c080f0301081402080f081403070b1302090009010900090102070a09000a0900010803030708050708060708080108041a06040604030b1101081205080d070a0405020307080503030303030307080803080f0a080f0b1302080f0814040302070a04010901010402060a090006090002010302070a0900030109000208000a0402070b130209000901090002060c0814010b13020900090102050b1101090001080c01080b0108092c03030303030816050405080d040302030a080f0303030503080d03070b1001080a020b11010812030307080503030303030303070806070b150204080603060816030503080f0a080f0503030303030602030303030302060b13020900090109000108160106081602070b1101090003010a0201080a2b03030303030816050405080d040302030a080f0303030503080d03070b1001080a020b110108120307080503030303030303070806070b150204080603060816030503080f0a080f08070805030303070806070808080f0a080f0d01050b1101081206080d060507080507040303070808080f0a080f0b1302080f081403070b15020900090109000901010801010b150209000901010b10010900080800030403060a040608060708080a0817010609010108170d05030305080d020303020a080f0304030405080d0a040a081701081802060c09000206080607080817030303020303030303020303030303020303030303030301081902060a0407080801081a04506f6f6c076163636f756e740a6170746f735f636f696e04636f696e056572726f72056576656e74067369676e657206737472696e67057461626c65117461626c655f776974685f6c656e67746806766563746f7205746f6b656e104578706f6e656e7469616c43757276650b4c696e6561724375727665054d6f64656c04566965770c436f6c6c656374696f6e49640f437265617465506f6f6c4576656e74144465706f736974436f696e506f6f6c4576656e74154465706f736974546f6b656e506f6f6c4576656e740d45646974506f6f6c4576656e740a4576656e7453746f726508506f6f6c4775696405506f6f6c730f52656d6f7665506f6f6c4576656e7409537761704576656e74155769746864726177436f696e506f6f6c4576656e74165769746864726177546f6b656e506f6f6c4576656e740b4465706f736974436f696e06537472696e670c4465706f736974546f6b656e0845646974506f6f6c0a52656d6f7665506f6f6c1753776170436f696e466f7253706563696669634e4654730f537761704e465473466f72436f696e0c5769746864726177436f696e0d5769746864726177546f6b656e066372656174650b696e69745f6d6f64756c650b546f6b656e4461746149640a69735f6572633131353515766965775f636f6c6c656374696f6e5f706f6f6c7309766965775f706f6f6c0f766965775f70726963655f63616c630f766965775f757365725f706f6f6c7312636f6c6c656374696f6e5f63726561746f720f636f6c6c656374696f6e5f6e616d650763726561746f7207706f6f6c5f69640a73706f745f70726963650563757276650564656c7461116c705f6665655f6d756c7469706c69657204747970650673656e646572136465706f7369745f636f696e5f616d6f756e7405636f696e7309746f6b656e5f69647307546f6b656e49640b6372656174655f706f6f6c0b4576656e7448616e646c650b72656d6f76655f706f6f6c126465706f7369745f746f6b656e5f706f6f6c116465706f7369745f636f696e5f706f6f6c1377697468647261775f746f6b656e5f706f6f6c1277697468647261775f636f696e5f706f6f6c09656469745f706f6f6c047377617004436f696e094170746f73436f696e06746f6b656e730f5461626c65576974684c656e67746805546f6b656e0c7472616e73616374696f6e7317746f74616c5f7472616e73616374696f6e5f76616c75650f6c705f6665655f6561726e696e677305636f756e7405706f6f6c73055461626c650a757365725f706f6f6c7310636f6c6c656374696f6e5f706f6f6c730b636f696e5f616d6f756e740c70726f746f636f6c5f6665650e70726f746f636f6c5f70617965650b726f79616c74795f6665650d726f79616c74795f7061796565066c705f6665651477697468647261775f636f696e5f616d6f756e740a616464726573735f6f6608636f6e7461696e7310696e76616c69645f617267756d656e740a626f72726f775f6d7574117065726d697373696f6e5f64656e696564087769746864726177056d657267650576616c75650a656d69745f6576656e74136372656174655f746f6b656e5f69645f726177146372656174655f746f6b656e5f646174615f69640a62616c616e63655f6f660e77697468647261775f746f6b656e0361646406617070656e640672656d6f766508696e6465785f6f660d6465706f7369745f746f6b656e0d64657374726f795f656d707479076465706f73697407526f79616c74790a676574427579496e666f0b6765745f726f79616c7479176765745f726f79616c74795f64656e6f6d696e61746f72156765745f726f79616c74795f6e756d657261746f72116765745f726f79616c74795f7061796565076578747261637404757466380b67657453656c6c496e666f036e6577106e65775f6576656e745f68616e646c65156765745f746f6b656e646174615f6d6178696d756d08506f6f6c5669657706626f72726f7709706f6f6c5f7669657713436f6c6c656374696f6e506f6f6c735669657715636f6c6c656374696f6e5f706f6f6c735f7669657704766965770d507269636543616c63566965770f70726963655f63616c635f766965770d55736572506f6f6c73566965770f757365725f706f6f6c735f76696577ecb44cec6276ddc5860a13b976262c786e06af8f7306923cabec17808dabf0940000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000303086600000000000000030869000000000000000308680000000000000003086e000000000000000308670000000000000003086a0000000000000003086b0000000000000003086c000000000000000308650000000000000003086d000000000000000520ecb44cec6276ddc5860a13b976262c786e06af8f7306923cabec17808dabf09403086400000000000000052000000000000000000000000000000000000000000000000000000000000000000a0204036275790a02050473656c6c126170746f733a3a6d657461646174615f7630a6020a6500000000000000074552525f4e554d006600000000000000134552525f444946465f434f4c4c454354494f4e006700000000000000124552525f4e4f545f45584953545f504f4f4c006800000000000000154552525f494e56414c49445f504f4f4c5f54595045006900000000000000154552525f494e56414c49445f504f4f4c5f41524753006a000000000000001c4552525f4e4f545f4558495453545f544f4b454e5f494e5f504f4f4c006b00000000000000124552525f4e4f545f484156455f544f4b454e006c00000000000000144552525f4e4f545f504f4f4c5f43524541544f52006d00000000000000184552525f504f4f4c5f4e4f545f454e4f5547485f434f494e006e00000000000000114552525f49535f313135355f544f4b454e000002022d052e080d0102092f0530042d052e080d3103320233033403350202020a360530042d052e080d37033803310332023303340303020a360530042d052e080d390a080f3803310332023303340304020730042d052e080d31033202330334030502083b0b100108013d0b100108093e0b100108033f0b10010802400b1001080c410b1001080b420b10010804430b1001080a06020e2f053103380b11010812460b1302080f08142d052e080d3202330334033502390a080f49034a044b030702014c040802034d0b15020408064f0b1502050a04500b150208000a0409020c2f0530042d052e080d3103320233033403350249034a044b030a0210360530042d052e080d310332023303390a080f510352035305540355055603380335080d0b020a360530042d052e080d5703380331033202330334030c020a360530042d052e080d390a080f380331033202330334030001000205080c61070a2a080c06070a2a050c040a0610000a00110f3800040d05160b00010b06010b040107041111270a0610010a013801041c05250b00010b06010b040107041111270b060f010a0138020c050a051002140a00110f210432053b0b00010b05010b040107071113270a000a0238030c030a050f030b0338040b040f040b00110f0b010a051005140a051006140b020a05100338050a051007140a051008140a051009140b05100a1412023806020101000205081bd801070a2a080c0a070a2a050c060a0a10000a00110f3800040d05160b00010b0a010b060107041111270a0a10010a013801041c05250b00010b0a010b060107041111270b0a0f010a0138020c09401c00000000000000000c0c0a091002140a00110f210434053d0b00010b09010b060107071113270e02410d0c080600000000000000000c070a070a082304b60105470e020a07420d0a09100521044f05580b00010b09010b060107001111270e030a07421d0a09100621046005690b00010b09010b060107001111270e020a07420d140e030a07421d140e040a07421d140e050a0742101411180c0b0e020a07420d140e030a07421d140e040a07421d141119110a20048c010595010b00010b09010b060107031111270d0c0a0b441c0a00110f0a0b111a0601000000000000002604a00105a9010b00010b09010b060107061111270a090f0b0a0b0a000b0b060100000000000000111b38070b07060100000000000000160c0705420a090f0c0a0c38080b060f0d0b00110f0b010a091005140a091006140b0c0a09100338050a091007140a091008140a091009140b09100a1412033809020201000205082759070a2a080c08070a2a050c060a0810000a00110f3800040d05160b00010b08010b060107041111270a0810010a013801041c05250b00010b08010b060107041111270b080f010a0138020c070a071002140b00110f21043205390b07010b060107071113270a020a070f08150a040a070f09150a030a070f07150a050a070f0a150b060f0e0b010a071005140b071006140b030b020b040b051204380a0203010002050829dc01070a2a080c17070a2a050c100a1710000a00110f3800040d05160b00010b17010b100107041111270a170f000a00110f380b0c1f0a1710010a0138010422052d0b1f010b00010b17010b100107041111270a170f010a01380c13060c150c1c0c1d010c1e0c160c0f0c0e0c0b0c0a0c1b0c090c180c0d0a0d0a00110f21044605510b1f010b00010b17010b100107071113270a1f0e010c062e0b06380d0c12010b1f0b12380e010b170f0f0a0a0a0b1200380f0c0c0a0c0e010c072e0b07380d0c13046d05760b00010b10010b0c0107051111270b0c0b13380e010600000000000000000c110e02410d0c14401c00000000000000000c1a0a110a142304a5010586010e020a11420d140e030a11421d140e040a11421d140e050a1142101411180c190d1a0a19441c0a000d1b0b19381011220b11060100000000000000160c110581010b1b38110e0938050c080a00110f0b0938120a100f100a0d0a010a0a0a0b0b1a0600000000000000000600000000000000003100060000000000000000060000000000000000120c38130a100f110b0d0a010a0a0a0b0b080600000000000000000600000000000000003100060000000000000000060000000000000000120b38140b100f120b00110f0b010b0a0b0b0b180b0e0b0f0b160b1e0b1d0b1c0b15120938150204010002050838d502070a2a080f010c2a070a2a050c210a2a0a010c102e0b103801040f05180b00010b2a010b210107041111270e02410d0c270b2a0a0138020c290a2910081431012104380a291007140a291009140a270a29100a14070b11250c0a0c090c080c070c060c1d055a0a29100814310221043f05480b00010b29010b210107021111270a291007140a291009140a270a29100a14070b11260c0a0c090c080c070c060c1d0b1d0b060b070b080b090b0a0c240c2b0c1f0c250c26310021046905720b00010b29010b21010701111127070c0600000000000000000600000000000000000c2f0c2d0c2e0b260a290f07150b250a290f0915401c00000000000000000c310a000a1f38030c1e0600000000000000000c220a220a272304f401058d010e020a22420d140e030a22421d140e040a22421d140e050a2242101411180c300a29100c0e3038160c2304a60105af010b00010b29010b210107051111270a290f0c0b233817010d310a30441c0a29100b0a30381804bd0105c6010b00010b29010b210107051111270a000a290f0b0a30381011220b3011280c0b0e0b0c2c0a2c11290c200a2c112a0c280b2c112b0c2e0a200600000000000000002204ef010a1f0a271a0b28180b201a0c2d0b2f0a2d160c2f0a2e0d1e0a2d381938120b22060100000000000000160c220588010a291013140a1f35160a290f13150a29101414060100000000000000160a290f1415070a0d1e0a2b381938120a290f030b1e38040b210f150c1c0b00110f0c0c0b010c0d0a291005140c0e0a291006140c0f0a291007140c110a291008140c120a291009140c130b310c140b1f0a2b160b2d160c150b2b0c160b2f0c170b2e0c180b240c19070d112d0c1a0b29100338050c1b0b1c0b0c0b0d0b0e0b0f0b110b120b130b140b150b16070a0b170b180b190b1b0b1a120a381a02050100020508418c03070a2a080f010c29070a2a050c200a290a010c102e0b103801040f05180b00010b29010b200107041111270e02410d0c250b290a0138020c280a2810081431012104380a281007140a281009140a250a28100a14070b112e0c0a0c090c080c070c060c1d055a0a28100814310221043f05480b00010b28010b200107021111270a281007140a281009140a250a28100a14070b112f0c0a0c090c080c070c060c1d0b1d0b060b070b080b090b0a0c220c2a0c270c230c24310021046905720b00010b28010b20010701111127070c0600000000000000000600000000000000000c2e0c2c0c2d401c00000000000000000c300a280f030a270a2a1738190c1e0600000000000000000c210a210a2523049a020588010e020a21420d0a281005210490010599010b00010b28010b200107001111270e030a21421d0a2810062104a10105aa010b00010b28010b200107001111270e020a21420d140e030a21421d140e040a21421d140e050a2142101411180c2f0e020a21420d140e030a21421d140e040a21421d141119110a2004cd0105d6010b00010b28010b200107031111270d300a2f441c0a00110f0a2f111a0601000000000000002604e10105ea010b00010b28010b200107061111270a280f0b0a2f0a000a2f060100000000000000111b38070b2f11280c0b0e0b0c2b0a2b11290c1f0a2b112a0c260b2b112b0c2d0a1f060000000000000000220495020a270a251a0b26180b1f1a0c2c0b2e0a2c160c2e0a2d0d1e0a2c381938120b21060100000000000000160c210583010a280f0c0a303808070a0a280f030a2a381938120b240a280f07150b230a280f09150a00110f0b1e38120a281013140a270a2a170b2e1735160a280f13150a28101414060100000000000000160a280f14150b200f150c1c0b00110f0c0c0b010c0d0a281005140c0e0a281006140c0f0a281007140c110a281008140c120a281009140c130b300c140b270a2a170a2c170c150b2a0c160b2c0c170b2d0c180b220c19070e112d0c1a0b28100338050c1b0b1c0b0c0b0d0b0e0b0f0b110b120b130b140b150b16070a0b170b180b190b1b0b1a120a381a020601000205082770070a2a080c05070a2a050c030a0510000a00110f3800040d05160b00010b05010b030107041111270a0510010a013801041c05250b00010b05010b030107041111270b050f010a0138020c040a041002140a00110f210432053b0b00010b04010b030107071113270a04100338050a02260442054b0b00010b04010b030107091111270a00110f0a040f030a02381938120b030f110b00110f0b010a041005140a041006140b020a04100338050a041007140a041008140a041009140b04100a14120b38140207010002050842a901070a2a080c0b070a2a050c060a0b10000a00110f3800040d05160b00010b0b010b060107041111270a0b10010a013801041c05250b00010b0b010b060107041111270b0b0f010a0138020c0a401c00000000000000000c0d0a0a1002140a00110f210434053d0b00010b0a010b060107071113270e02410d0c090600000000000000000c070a070a0923048b0105470e020a07420d140e030a07421d140e040a07421d140e050a0742101411180c0c0a0a100c0e0c38160c08046005690b00010b0a010b060107051111270a0a0f0c0b083817010d0d0a0c441c0a0a100b0a0c381804770580010b00010b0a010b060107051111270a000a0a0f0b0b0c381011220b07060100000000000000160c0705420b060f100b00110f0b010a0a1005140a0a1006140b0d0a0a100338050a0a1007140a0a1008140a0a1009140b0a100a14120c38130208010003050708439f02070a2a080c14070a2a070f160c11070a2a050c10381b0c170e02410d0c130a13060000000000000000240414051f0b00010b14010b11010b100107081111270e02060000000000000000420d0c0f0e03060000000000000000421d0c0e0a14100f0a0f140a0e141200381c20043a0a140f0f0a0f140a0e141200402b0000000000000000381d0a140f0f0a0f140a0e141200380f0a1114442b401c00000000000000000c160600000000000000000c120a120a132304b001054e0a0f0e020a12420d21045b0a0e0e030a12421d210c0b055d090c0b0b0b0460056f0b00010b14010b11010b10010b0f010b0e0107001111270e020a12420d140e030a12421d140e040a12421d141119110a20048001058f010b00010b14010b11010b10010b0f010b0e0107031111270e020a12420d140e030a12421d140e040a12421d140e050a1242101411180c150d160a15441c0d170a150a000b15060100000000000000111b38070b12060100000000000000160c1205490a100f0d0a00110f0a11140a0f140a0e140a160a060a070a010a080a09120338090a000a0638030c0d0a100f040a00110f0a11140a0f140a0e140a060b060a070a010a080a09120238060a140f010a11140a00110f0a070b0d0b170a0f140a0e140a010a080a090a0a0b1606000000000000000032000000000000000000000000000000000600000000000000001206381e0a140f000a00110f0c0c2e0b0c38002004ff010a140f000a00110f402b0000000000000000381f0b140f000a00110f380b0a1114442b0b100f170b00110f0a11140b0f140b0e140b070b010b080b090b0a120138200a11143201000000000000000000000000000000160b11150209000000011e0a0038213822382312082d080a00320000000000000000000000000000000012072d070a000a0038240a0038250a0038260a0038270a0038280a0038290a00382a0b00382b12052d05020a00000001060601000000000000000b0011342120020b010401084876070a2a080c090a010a0212000c030a09100f0a03381c040d05130b00010b0901063f05000000000000270a09100f0b03382c0c07404a00000000000000000c0a0a07412b0c060600000000000000000c040a040a0623046b05240a070a04422b140c050a0910010a053801042f05370b00010b09010b0701063f05000000000000270a0910010b05382d0c080d0a0a081002140a081007140a08100338050a081005140a081006140a081008140a081009140a08100a140a081018140a08100c140a081014140a081013140b081019141136444a0b04060100000000000000160c04051f0b09010b000b010b020b07140b0a1137382e020c010401084f40070a2a080c030a0310010a013801040905100b00010b030107041111270b0310010b01382d0c020b000a021002140a021007140a02100338050a021005140a021006140a021008140a021009140a02100a140a021018140a02100c140a021014140a021013140b021019141136382f020d0104005087010b010600000000000000002104380a020601000000000000002104150b030b040b050b06070b11250c090c080c070c180c170c16052b0b0206020000000000000021041a051f0b000107021111270b030b040b050b06070b11260c090c080c070c180c170c160b160b170b180b070b080b090c150c140c130c120c110c10056b0a020601000000000000002104490b030b040b050b06070b112e0c0f0c0e0c0d0c0c0c0b0c0a055f0b0206020000000000000021044e05530b000107021111270b030b040b050b06070b112f0c0f0c0e0c0d0c0c0c0b0c0a0b0a0b0b0b0c0b0d0b0e0b0f0c150c140c130c120c110c100b100b110b120b130b140b150c1a0c1d0c190c1b0c1c310021047a057e0b0001064705000000000000270b000b1c0b1b0b190b1d0b1a11393830020e01040108521b070a2a080c030a0310000a0138000409050f0b00010b0301063f05000000000000270b0310000a0138310c020b000b010b0214113a383202080108000600060205030604060506010606060706080603060a050205060802050405050501060c060b0507070005000609060d00"; - let res = run_binary_test("sample_pool", code); - assert!(res.is_ok(), "{:?}", res) -} - -#[test] -fn sample_farming() { - let code = "a11ceb0b050000000e01001e021e2603447c04c00158059802c80107e003bb04089b08a00106bb09e101109c0b780a940c3e0bd20c040cd60cd10d0da71a080eaf1a060000010101020103010401050106000700080209020a0309030a0409040a000b0800000c0e0200010001000d0c0200010001011106000513070002230401000107240000000e000100000f0201020000032104050001220607000525090a000e26010c0200000c26010c0200000a26010c0200000427001200022812140100022915160100022a17010100082b150101000d2c1a010200000b2c1a01020000092c1a010200000d2d1b010200000b2d1b01020000092d1b01020000062e011400050b050d050e050f05100511060b060d060e060f06100611070b070d070e070f0710071109130a130b1309180a180b1809190a190b190c130c180d0b0e0b0f0b0d0d0e0d0f0d0d0e0d100e0e0e100f0e0f10100b110b120b01060c0009060c0303030303030303020c080302060c0501080301060803010c2001010101010101010101030303030308040b050108060b050109000b050109010708000b0102090009010b0102090009010b020209000901070b020209000901050c0a0b0102090009010503030303010a0201080402090009010101020901090002080609000209000806020806090102090108060105010900010302060c03010b0501090002050b0501090001090101080603060c030305060c03030303010b010209000901076661726d696e67076163636f756e7404636f696e107265736f757263655f6163636f756e74067369676e657206737472696e670974696d657374616d700d6661756365745f746f6b656e73076c656e64696e6706726f7574657204737761700a4d6f64756c65446174610c506f736974696f6e496e666f0f506f736974696f6e496e666f4465780b696e69745f6d6f64756c65166c657665726167655f7969656c645f6661726d696e670a7369676e65725f636170105369676e65724361706162696c697479086465785f6e616d6506537472696e670b7369676e65725f616464720a637265617465645f617406737461747573086c657665726167650e737570706c79416d6f756e745f780e737570706c79416d6f756e745f790e737570706c79416d6f756e745f7a0e626f72726f77416d6f756e745f780e626f72726f77416d6f756e745f790e626f72726f77416d6f756e745f7a10706f736974696f6e496e666f5f70616e10706f736974696f6e496e666f5f6c697110706f736974696f6e496e666f5f6175781d72657472696576655f7265736f757263655f6163636f756e745f6361701d6372656174655f7369676e65725f776974685f6361706162696c69747904436f696e03455a4d04757466380f69735f706169725f637265617465640a616464726573735f6f660762616c616e6365087769746864726177076465706f73697406626f72726f7710737761705f65786163745f696e7075740d6164645f6c69717569646974790b6e6f775f7365636f6e64734d63574ba8d90a5926e2866d8291e57683108a47b96d884232a871fe4feddf4100000000000000000000000000000000000000000000000000000000000000015e40a5bf7ab741784d3a99d96d8e2ddc6706ee06e5f509a3314a74c9e53746f5b30dd6a14dd7626ac8a37bc964914f07e3dc38d629637f1087f9f7186f1e0909c4911c40cf758ec21c0ebf0e547933ef6bb0f53ad581c08d2ecc7ad11364be1b030804000000000000000520f67b2452fd82768002ec6c28568713b9359a596585dc1a4bf85fce6b0e3754020308020000000000000003080300000000000000030801000000000000000308ffffffffffffffff0410e80300000000000000000000000000000308000000000000000005204d63574ba8d90a5926e2866d8291e57683108a47b96d884232a871fe4feddf41052000000000000000000000000000000000000000000000000000000000000000000a020c0b50616e63616b65537761700a020b0a4c6971756964537761700a020d0c4155582045786368616e6765126170746f733a3a6d657461646174615f763064030100000000000000164552524f525f4e4f545f435245415445445f50414952000200000000000000184552524f525f494e53554646494349454e545f4153534554000300000000000000174552524f525f494e56414c49445f504152414d5f4445580000020110080301020b1208041405150316011703180319031a031b031c031d030202031e0a0b0102090009011f0a0b010209000901200a0b010209000901020b010b00000000030c0b00070111020c020e0211030c010e010b0212002d000201010402000208ee04070a1104010a010600000000000000002103080536070a11040c183800030e0511080c09051338010c090b0903190b00010704273802031c051f080c0b052138030c0b0b0b03270b00010704273804032a052d080c0c052f38050c0c0b0c03350b0001070427059f010a0106010000000000000021033b0569070b11040c18380603410544080c0d054638070c0d0b0d034c0b00010704273808034f0552080c0e055438090c0e0b0e035a0b0001070427380a035d0560080c0f0562380b0c0f0b0f03680b0001070427059f010a0106020000000000000021036e059b01070c11040c18380c03740577080c100579380d0c100b10037f0b0001070427380e038201058501080c11058701380f0c110b11038d010b00010704273810039001059301080c1205950138110c120b12039f010b00010704270b000107032707082a000c1c0b1c100011030c220e2211080c210a030600000000000000002403ae0105c1010a00110838120c160b160a032403ba010b00010702270a000a0338130c1a07080b1a38140a040600000000000000002403c60105d9010a00110838150c170b170a042403d2010b00010702270a000a0438160c1b07080b1b38170a050600000000000000002403de0105f1010a00110838180c150b150a052403ea010b00010702270a000a0538190c1907080b19381a0a060600000000000000002403f60105f9010e220a06381b0a070600000000000000002403fe010581020e220a07381c0a0806000000000000000024038502070838120c26070838150c280a030a06160602000000000000001a0600000000000000002403940205bd020a010600000000000000002103990205a2020e220a030a06160602000000000000001a060000000000000000381d05bd020a010601000000000000002103a70205b0020e220a030a06160602000000000000001a060000000000000000381e05bd020a010602000000000000002103b50205bd020e220a030a06160602000000000000001a060000000000000000381f0a040a07160602000000000000001a0600000000000000002403c60205ef020a010600000000000000002103cb0205d4020e220a040a07160602000000000000001a060000000000000000382005ef020a010601000000000000002103d90205e2020e220a040a07160602000000000000001a060000000000000000382105ef020a010602000000000000002103e70205ef020e220a040a07160602000000000000001a06000000000000000038220a050a08160602000000000000001a0600000000000000002403f80205b9030a010600000000000000002103fd02058e030e220a050a08160602000000000000001a06000000000000000038230e220a050a08160602000000000000001a060000000000000000382405b9030a010601000000000000002103930305a4030e220a050a08160602000000000000001a06000000000000000038250e220a050a08160602000000000000001a060000000000000000382605b9030a010602000000000000002103a90305b9030e220a050a08160602000000000000001a06000000000000000038270e220a050a08160602000000000000001a0600000000000000003828070838120c25070838150c270a030b25160b26170c130a040b27160b28170c140a130600000000000000002403d00305d5030a14060000000000000000240c0a05d703090c0a0b0a03da0305eb040a010600000000000000002103df0305e6030e220b130b14060000000000000000060000000000000000382905fd030a010601000000000000002103eb0305f2030e220b130b14060000000000000000060000000000000000382a05fd030a010602000000000000002103f70305fd030e220b130b14060000000000000000060000000000000000382b0b0011080c240a213b002003850405ba040b180b241113080b020b030b040b050b060b070b0839010c1d401c000000000000000001401c0000000000000000401c0000000000000000401c000000000000000039000c1f0a0106000000000000000021039e0405a3040d1f36000b1d441c05b6040a010601000000000000002103a80405ad040d1f36010b1d441c05b6040b010602000000000000002103b20405b6040d1f36020b1d441c0e220b1f3f0005ea040b213c000c200b180b241113080b020b030b040b050b060b070b0839010c1e0a010600000000000000002103cf0405d4040b2036000b1e441c05ea040a010601000000000000002103d90405de040b2036010b1e441c05ea040b010602000000000000002103e30405e8040b2036020b1e441c05ea040b200105ed040b0001020000020002010202010b020b030b00"; - let res = run_binary_test("sample_farming", code); - assert!(res.is_ok(), "{:?}", res) -} - -#[test] -fn sample_whitelist() { - let code = "a11ceb0b050000000c01000602060c03123a044c0805545707ab01660891024006d102988b0210e98d02d7010ac08f02090cc98f02a2470debd6020200000101010200030800020a04020301000100040001000005020100000603040000070201000008000100010b0203000204070102030002060a04020300020c010c02030402080d0e020300060607060806090602060c050001060c01050101020507080002050203070b010209000901090009010305070b010205020708000106080002060b0102090009010900010b01020502010b01020900090102070b01020900090109000109010977686974656c697374067369676e6572057461626c650957686974656c69737403616464086164645f6d616e7908636f6e7461696e730a696e697469616c697a650672656d6f766507656e7472696573055461626c650a616464726573735f6f66036e65774419523fdfa01e96fc7c18b67d900be8c863459e25383a5c661b9523631811c1000000000000000000000000000000000000000000000000000000000000000103082003000000000000030822030000000000000308210300000000000005204419523fdfa01e96fc7c18b67d900be8c863459e25383a5c661b9523631811c1052000000000000000000000000000000000000000000000000000000000000000000520000000000000000000000000000000000000000000000000000000000000000105200000000000000000000000000000000000000000000000000000000000000002052000000000000000000000000000000000000000000000000000000000000000030520000000000000000000000000000000000000000000000000000000000000000405200000000000000000000000000000000000000000000000000000000000000005052000000000000000000000000000000000000000000000000000000000000000060520000000000000000000000000000000000000000000000000000000000000000705200000000000000000000000000000000000000000000000000000000000000008052000000000000000000000000000000000000000000000000000000000000000090520000000000000000000000000000000000000000000000000000000000000001005200000000000000000000000000000000000000000000000000000000000000011052000000000000000000000000000000000000000000000000000000000000000120520000000000000000000000000000000000000000000000000000000000000001305200000000000000000000000000000000000000000000000000000000000000014052000000000000000000000000000000000000000000000000000000000000000150520000000000000000000000000000000000000000000000000000000000000001605200000000000000000000000000000000000000000000000000000000000000017052000000000000000000000000000000000000000000000000000000000000000180520000000000000000000000000000000000000000000000000000000000000001905200000000000000000000000000000000000000000000000000000000000000020052000000000000000000000000000000000000000000000000000000000000000210520000000000000000000000000000000000000000000000000000000000000002205200000000000000000000000000000000000000000000000000000000000000023052000000000000000000000000000000000000000000000000000000000000000240520000000000000000000000000000000000000000000000000000000000000002505200000000000000000000000000000000000000000000000000000000000000026052000000000000000000000000000000000000000000000000000000000000000270520000000000000000000000000000000000000000000000000000000000000002805200000000000000000000000000000000000000000000000000000000000000029052000000000000000000000000000000000000000000000000000000000000000300520000000000000000000000000000000000000000000000000000000000000003105200000000000000000000000000000000000000000000000000000000000000032052000000000000000000000000000000000000000000000000000000000000000330520000000000000000000000000000000000000000000000000000000000000003405200000000000000000000000000000000000000000000000000000000000000035052000000000000000000000000000000000000000000000000000000000000000360520000000000000000000000000000000000000000000000000000000000000003705200000000000000000000000000000000000000000000000000000000000000038052000000000000000000000000000000000000000000000000000000000000000390520000000000000000000000000000000000000000000000000000000000000004005200000000000000000000000000000000000000000000000000000000000000041052000000000000000000000000000000000000000000000000000000000000000420520000000000000000000000000000000000000000000000000000000000000004305200000000000000000000000000000000000000000000000000000000000000044052000000000000000000000000000000000000000000000000000000000000000450520000000000000000000000000000000000000000000000000000000000000004605200000000000000000000000000000000000000000000000000000000000000047052000000000000000000000000000000000000000000000000000000000000000480520000000000000000000000000000000000000000000000000000000000000004905200000000000000000000000000000000000000000000000000000000000000050052000000000000000000000000000000000000000000000000000000000000000510520000000000000000000000000000000000000000000000000000000000000005205200000000000000000000000000000000000000000000000000000000000000053052000000000000000000000000000000000000000000000000000000000000000540520000000000000000000000000000000000000000000000000000000000000005505200000000000000000000000000000000000000000000000000000000000000056052000000000000000000000000000000000000000000000000000000000000000570520000000000000000000000000000000000000000000000000000000000000005805200000000000000000000000000000000000000000000000000000000000000059052000000000000000000000000000000000000000000000000000000000000000600520000000000000000000000000000000000000000000000000000000000000006105200000000000000000000000000000000000000000000000000000000000000062052000000000000000000000000000000000000000000000000000000000000000630520000000000000000000000000000000000000000000000000000000000000006405200000000000000000000000000000000000000000000000000000000000000065052000000000000000000000000000000000000000000000000000000000000000660520000000000000000000000000000000000000000000000000000000000000006705200000000000000000000000000000000000000000000000000000000000000068052000000000000000000000000000000000000000000000000000000000000000690520000000000000000000000000000000000000000000000000000000000000007005200000000000000000000000000000000000000000000000000000000000000071052000000000000000000000000000000000000000000000000000000000000000720520000000000000000000000000000000000000000000000000000000000000007305200000000000000000000000000000000000000000000000000000000000000074052000000000000000000000000000000000000000000000000000000000000000750520000000000000000000000000000000000000000000000000000000000000007605200000000000000000000000000000000000000000000000000000000000000077052000000000000000000000000000000000000000000000000000000000000000780520000000000000000000000000000000000000000000000000000000000000007905200000000000000000000000000000000000000000000000000000000000000080052000000000000000000000000000000000000000000000000000000000000000810520000000000000000000000000000000000000000000000000000000000000008205200000000000000000000000000000000000000000000000000000000000000083052000000000000000000000000000000000000000000000000000000000000000840520000000000000000000000000000000000000000000000000000000000000008505200000000000000000000000000000000000000000000000000000000000000086052000000000000000000000000000000000000000000000000000000000000000870520000000000000000000000000000000000000000000000000000000000000008805200000000000000000000000000000000000000000000000000000000000000089052000000000000000000000000000000000000000000000000000000000000000900520000000000000000000000000000000000000000000000000000000000000009105200000000000000000000000000000000000000000000000000000000000000092052000000000000000000000000000000000000000000000000000000000000000930520000000000000000000000000000000000000000000000000000000000000009405200000000000000000000000000000000000000000000000000000000000000095052000000000000000000000000000000000000000000000000000000000000000960520000000000000000000000000000000000000000000000000000000000000009705200000000000000000000000000000000000000000000000000000000000000098052000000000000000000000000000000000000000000000000000000000000000990520000000000000000000000000000000000000000000000000000000000000010005200000000000000000000000000000000000000000000000000000000000000101052000000000000000000000000000000000000000000000000000000000000001020520000000000000000000000000000000000000000000000000000000000000010305200000000000000000000000000000000000000000000000000000000000000104052000000000000000000000000000000000000000000000000000000000000001050520000000000000000000000000000000000000000000000000000000000000010605200000000000000000000000000000000000000000000000000000000000000107052000000000000000000000000000000000000000000000000000000000000001080520000000000000000000000000000000000000000000000000000000000000010905200000000000000000000000000000000000000000000000000000000000000110052000000000000000000000000000000000000000000000000000000000000001110520000000000000000000000000000000000000000000000000000000000000011205200000000000000000000000000000000000000000000000000000000000000113052000000000000000000000000000000000000000000000000000000000000001140520000000000000000000000000000000000000000000000000000000000000011505200000000000000000000000000000000000000000000000000000000000000116052000000000000000000000000000000000000000000000000000000000000001170520000000000000000000000000000000000000000000000000000000000000011805200000000000000000000000000000000000000000000000000000000000000119052000000000000000000000000000000000000000000000000000000000000001200520000000000000000000000000000000000000000000000000000000000000012105200000000000000000000000000000000000000000000000000000000000000122052000000000000000000000000000000000000000000000000000000000000001230520000000000000000000000000000000000000000000000000000000000000012405200000000000000000000000000000000000000000000000000000000000000125052000000000000000000000000000000000000000000000000000000000000001260520000000000000000000000000000000000000000000000000000000000000012705200000000000000000000000000000000000000000000000000000000000000128052000000000000000000000000000000000000000000000000000000000000001290520000000000000000000000000000000000000000000000000000000000000013005200000000000000000000000000000000000000000000000000000000000000131052000000000000000000000000000000000000000000000000000000000000001320520000000000000000000000000000000000000000000000000000000000000013305200000000000000000000000000000000000000000000000000000000000000134052000000000000000000000000000000000000000000000000000000000000001350520000000000000000000000000000000000000000000000000000000000000013605200000000000000000000000000000000000000000000000000000000000000137052000000000000000000000000000000000000000000000000000000000000001380520000000000000000000000000000000000000000000000000000000000000013905200000000000000000000000000000000000000000000000000000000000000140052000000000000000000000000000000000000000000000000000000000000001410520000000000000000000000000000000000000000000000000000000000000014205200000000000000000000000000000000000000000000000000000000000000143052000000000000000000000000000000000000000000000000000000000000001440520000000000000000000000000000000000000000000000000000000000000014505200000000000000000000000000000000000000000000000000000000000000146052000000000000000000000000000000000000000000000000000000000000001470520000000000000000000000000000000000000000000000000000000000000014805200000000000000000000000000000000000000000000000000000000000000149052000000000000000000000000000000000000000000000000000000000000001500520000000000000000000000000000000000000000000000000000000000000015105200000000000000000000000000000000000000000000000000000000000000152052000000000000000000000000000000000000000000000000000000000000001530520000000000000000000000000000000000000000000000000000000000000015405200000000000000000000000000000000000000000000000000000000000000155052000000000000000000000000000000000000000000000000000000000000001560520000000000000000000000000000000000000000000000000000000000000015705200000000000000000000000000000000000000000000000000000000000000158052000000000000000000000000000000000000000000000000000000000000001590520000000000000000000000000000000000000000000000000000000000000016005200000000000000000000000000000000000000000000000000000000000000161052000000000000000000000000000000000000000000000000000000000000001620520000000000000000000000000000000000000000000000000000000000000016305200000000000000000000000000000000000000000000000000000000000000164052000000000000000000000000000000000000000000000000000000000000001650520000000000000000000000000000000000000000000000000000000000000016605200000000000000000000000000000000000000000000000000000000000000167052000000000000000000000000000000000000000000000000000000000000001680520000000000000000000000000000000000000000000000000000000000000016905200000000000000000000000000000000000000000000000000000000000000170052000000000000000000000000000000000000000000000000000000000000001710520000000000000000000000000000000000000000000000000000000000000017205200000000000000000000000000000000000000000000000000000000000000173052000000000000000000000000000000000000000000000000000000000000001740520000000000000000000000000000000000000000000000000000000000000017505200000000000000000000000000000000000000000000000000000000000000176052000000000000000000000000000000000000000000000000000000000000001770520000000000000000000000000000000000000000000000000000000000000017805200000000000000000000000000000000000000000000000000000000000000179052000000000000000000000000000000000000000000000000000000000000001800520000000000000000000000000000000000000000000000000000000000000018105200000000000000000000000000000000000000000000000000000000000000182052000000000000000000000000000000000000000000000000000000000000001830520000000000000000000000000000000000000000000000000000000000000018405200000000000000000000000000000000000000000000000000000000000000185052000000000000000000000000000000000000000000000000000000000000001860520000000000000000000000000000000000000000000000000000000000000018705200000000000000000000000000000000000000000000000000000000000000188052000000000000000000000000000000000000000000000000000000000000001890520000000000000000000000000000000000000000000000000000000000000019005200000000000000000000000000000000000000000000000000000000000000191052000000000000000000000000000000000000000000000000000000000000001920520000000000000000000000000000000000000000000000000000000000000019305200000000000000000000000000000000000000000000000000000000000000194052000000000000000000000000000000000000000000000000000000000000001950520000000000000000000000000000000000000000000000000000000000000019605200000000000000000000000000000000000000000000000000000000000000197052000000000000000000000000000000000000000000000000000000000000001980520000000000000000000000000000000000000000000000000000000000000019905200000000000000000000000000000000000000000000000000000000000000200052000000000000000000000000000000000000000000000000000000000000002010520000000000000000000000000000000000000000000000000000000000000020205200000000000000000000000000000000000000000000000000000000000000203052000000000000000000000000000000000000000000000000000000000000002040520000000000000000000000000000000000000000000000000000000000000020505200000000000000000000000000000000000000000000000000000000000000206052000000000000000000000000000000000000000000000000000000000000002070520000000000000000000000000000000000000000000000000000000000000020805200000000000000000000000000000000000000000000000000000000000000209052000000000000000000000000000000000000000000000000000000000000002100520000000000000000000000000000000000000000000000000000000000000021105200000000000000000000000000000000000000000000000000000000000000212052000000000000000000000000000000000000000000000000000000000000002130520000000000000000000000000000000000000000000000000000000000000021405200000000000000000000000000000000000000000000000000000000000000215052000000000000000000000000000000000000000000000000000000000000002160520000000000000000000000000000000000000000000000000000000000000021705200000000000000000000000000000000000000000000000000000000000000218052000000000000000000000000000000000000000000000000000000000000002190520000000000000000000000000000000000000000000000000000000000000022005200000000000000000000000000000000000000000000000000000000000000221052000000000000000000000000000000000000000000000000000000000000002220520000000000000000000000000000000000000000000000000000000000000022305200000000000000000000000000000000000000000000000000000000000000224052000000000000000000000000000000000000000000000000000000000000002250520000000000000000000000000000000000000000000000000000000000000022605200000000000000000000000000000000000000000000000000000000000000227052000000000000000000000000000000000000000000000000000000000000002280520000000000000000000000000000000000000000000000000000000000000022905200000000000000000000000000000000000000000000000000000000000000230052000000000000000000000000000000000000000000000000000000000000002310520000000000000000000000000000000000000000000000000000000000000023205200000000000000000000000000000000000000000000000000000000000000233052000000000000000000000000000000000000000000000000000000000000002340520000000000000000000000000000000000000000000000000000000000000023505200000000000000000000000000000000000000000000000000000000000000236052000000000000000000000000000000000000000000000000000000000000002370520000000000000000000000000000000000000000000000000000000000000023805200000000000000000000000000000000000000000000000000000000000000239052000000000000000000000000000000000000000000000000000000000000002400520000000000000000000000000000000000000000000000000000000000000024105200000000000000000000000000000000000000000000000000000000000000242052000000000000000000000000000000000000000000000000000000000000002430520000000000000000000000000000000000000000000000000000000000000024405200000000000000000000000000000000000000000000000000000000000000245052000000000000000000000000000000000000000000000000000000000000002460520000000000000000000000000000000000000000000000000000000000000024705200000000000000000000000000000000000000000000000000000000000000248052000000000000000000000000000000000000000000000000000000000000002490520000000000000000000000000000000000000000000000000000000000000025005200000000000000000000000000000000000000000000000000000000000000251052000000000000000000000000000000000000000000000000000000000000002520520000000000000000000000000000000000000000000000000000000000000025305200000000000000000000000000000000000000000000000000000000000000254052000000000000000000000000000000000000000000000000000000000000002550520000000000000000000000000000000000000000000000000000000000000025605200000000000000000000000000000000000000000000000000000000000000257052000000000000000000000000000000000000000000000000000000000000002580520000000000000000000000000000000000000000000000000000000000000025905200000000000000000000000000000000000000000000000000000000000000260052000000000000000000000000000000000000000000000000000000000000002610520000000000000000000000000000000000000000000000000000000000000026205200000000000000000000000000000000000000000000000000000000000000263052000000000000000000000000000000000000000000000000000000000000002640520000000000000000000000000000000000000000000000000000000000000026505200000000000000000000000000000000000000000000000000000000000000266052000000000000000000000000000000000000000000000000000000000000002670520000000000000000000000000000000000000000000000000000000000000026805200000000000000000000000000000000000000000000000000000000000000269052000000000000000000000000000000000000000000000000000000000000002700520000000000000000000000000000000000000000000000000000000000000027105200000000000000000000000000000000000000000000000000000000000000272052000000000000000000000000000000000000000000000000000000000000002730520000000000000000000000000000000000000000000000000000000000000027405200000000000000000000000000000000000000000000000000000000000000275052000000000000000000000000000000000000000000000000000000000000002760520000000000000000000000000000000000000000000000000000000000000027705200000000000000000000000000000000000000000000000000000000000000278052000000000000000000000000000000000000000000000000000000000000002790520000000000000000000000000000000000000000000000000000000000000028005200000000000000000000000000000000000000000000000000000000000000281052000000000000000000000000000000000000000000000000000000000000002820520000000000000000000000000000000000000000000000000000000000000028305200000000000000000000000000000000000000000000000000000000000000284052000000000000000000000000000000000000000000000000000000000000002850520000000000000000000000000000000000000000000000000000000000000028605200000000000000000000000000000000000000000000000000000000000000287052000000000000000000000000000000000000000000000000000000000000002880520000000000000000000000000000000000000000000000000000000000000028905200000000000000000000000000000000000000000000000000000000000000290052000000000000000000000000000000000000000000000000000000000000002910520000000000000000000000000000000000000000000000000000000000000029205200000000000000000000000000000000000000000000000000000000000000293052000000000000000000000000000000000000000000000000000000000000002940520000000000000000000000000000000000000000000000000000000000000029505200000000000000000000000000000000000000000000000000000000000000296052000000000000000000000000000000000000000000000000000000000000002970520000000000000000000000000000000000000000000000000000000000000029805200000000000000000000000000000000000000000000000000000000000000299052000000000000000000000000000000000000000000000000000000000000003000520000000000000000000000000000000000000000000000000000000000000030105200000000000000000000000000000000000000000000000000000000000000302052000000000000000000000000000000000000000000000000000000000000003030520000000000000000000000000000000000000000000000000000000000000030405200000000000000000000000000000000000000000000000000000000000000305052000000000000000000000000000000000000000000000000000000000000003060520000000000000000000000000000000000000000000000000000000000000030705200000000000000000000000000000000000000000000000000000000000000308052000000000000000000000000000000000000000000000000000000000000003090520000000000000000000000000000000000000000000000000000000000000031005200000000000000000000000000000000000000000000000000000000000000311052000000000000000000000000000000000000000000000000000000000000003120520000000000000000000000000000000000000000000000000000000000000031305200000000000000000000000000000000000000000000000000000000000000314052000000000000000000000000000000000000000000000000000000000000003150520000000000000000000000000000000000000000000000000000000000000031605200000000000000000000000000000000000000000000000000000000000000317052000000000000000000000000000000000000000000000000000000000000003180520000000000000000000000000000000000000000000000000000000000000031905200000000000000000000000000000000000000000000000000000000000000320052000000000000000000000000000000000000000000000000000000000000003210520000000000000000000000000000000000000000000000000000000000000032205200000000000000000000000000000000000000000000000000000000000000323052000000000000000000000000000000000000000000000000000000000000003240520000000000000000000000000000000000000000000000000000000000000032505200000000000000000000000000000000000000000000000000000000000000326052000000000000000000000000000000000000000000000000000000000000003270520000000000000000000000000000000000000000000000000000000000000032805200000000000000000000000000000000000000000000000000000000000000329052000000000000000000000000000000000000000000000000000000000000003300520000000000000000000000000000000000000000000000000000000000000033105200000000000000000000000000000000000000000000000000000000000000332052000000000000000000000000000000000000000000000000000000000000003330520000000000000000000000000000000000000000000000000000000000000033405200000000000000000000000000000000000000000000000000000000000000335052000000000000000000000000000000000000000000000000000000000000003360520000000000000000000000000000000000000000000000000000000000000033705200000000000000000000000000000000000000000000000000000000000000338052000000000000000000000000000000000000000000000000000000000000003390520000000000000000000000000000000000000000000000000000000000000034005200000000000000000000000000000000000000000000000000000000000000341052000000000000000000000000000000000000000000000000000000000000003420520000000000000000000000000000000000000000000000000000000000000034305200000000000000000000000000000000000000000000000000000000000000344052000000000000000000000000000000000000000000000000000000000000003450520000000000000000000000000000000000000000000000000000000000000034605200000000000000000000000000000000000000000000000000000000000000347052000000000000000000000000000000000000000000000000000000000000003480520000000000000000000000000000000000000000000000000000000000000034905200000000000000000000000000000000000000000000000000000000000000350052000000000000000000000000000000000000000000000000000000000000003510520000000000000000000000000000000000000000000000000000000000000035205200000000000000000000000000000000000000000000000000000000000000353052000000000000000000000000000000000000000000000000000000000000003540520000000000000000000000000000000000000000000000000000000000000035505200000000000000000000000000000000000000000000000000000000000000356052000000000000000000000000000000000000000000000000000000000000003570520000000000000000000000000000000000000000000000000000000000000035805200000000000000000000000000000000000000000000000000000000000000359052000000000000000000000000000000000000000000000000000000000000003600520000000000000000000000000000000000000000000000000000000000000036105200000000000000000000000000000000000000000000000000000000000000362052000000000000000000000000000000000000000000000000000000000000003630520000000000000000000000000000000000000000000000000000000000000036405200000000000000000000000000000000000000000000000000000000000000365052000000000000000000000000000000000000000000000000000000000000003660520000000000000000000000000000000000000000000000000000000000000036705200000000000000000000000000000000000000000000000000000000000000368052000000000000000000000000000000000000000000000000000000000000003690520000000000000000000000000000000000000000000000000000000000000037005200000000000000000000000000000000000000000000000000000000000000371052000000000000000000000000000000000000000000000000000000000000003720520000000000000000000000000000000000000000000000000000000000000037305200000000000000000000000000000000000000000000000000000000000000374052000000000000000000000000000000000000000000000000000000000000003750520000000000000000000000000000000000000000000000000000000000000037605200000000000000000000000000000000000000000000000000000000000000377052000000000000000000000000000000000000000000000000000000000000003780520000000000000000000000000000000000000000000000000000000000000037905200000000000000000000000000000000000000000000000000000000000000380052000000000000000000000000000000000000000000000000000000000000003810520000000000000000000000000000000000000000000000000000000000000038205200000000000000000000000000000000000000000000000000000000000000383052000000000000000000000000000000000000000000000000000000000000003840520000000000000000000000000000000000000000000000000000000000000038505200000000000000000000000000000000000000000000000000000000000000386052000000000000000000000000000000000000000000000000000000000000003870520000000000000000000000000000000000000000000000000000000000000038805200000000000000000000000000000000000000000000000000000000000000389052000000000000000000000000000000000000000000000000000000000000003900520000000000000000000000000000000000000000000000000000000000000039105200000000000000000000000000000000000000000000000000000000000000392052000000000000000000000000000000000000000000000000000000000000003930520000000000000000000000000000000000000000000000000000000000000039405200000000000000000000000000000000000000000000000000000000000000395052000000000000000000000000000000000000000000000000000000000000003960520000000000000000000000000000000000000000000000000000000000000039705200000000000000000000000000000000000000000000000000000000000000398052000000000000000000000000000000000000000000000000000000000000003990520000000000000000000000000000000000000000000000000000000000000040005200000000000000000000000000000000000000000000000000000000000000401052000000000000000000000000000000000000000000000000000000000000004020520000000000000000000000000000000000000000000000000000000000000040305200000000000000000000000000000000000000000000000000000000000000404052000000000000000000000000000000000000000000000000000000000000004050520000000000000000000000000000000000000000000000000000000000000040605200000000000000000000000000000000000000000000000000000000000000407052000000000000000000000000000000000000000000000000000000000000004080520000000000000000000000000000000000000000000000000000000000000040905200000000000000000000000000000000000000000000000000000000000000410052000000000000000000000000000000000000000000000000000000000000004110520000000000000000000000000000000000000000000000000000000000000041205200000000000000000000000000000000000000000000000000000000000000413052000000000000000000000000000000000000000000000000000000000000004140520000000000000000000000000000000000000000000000000000000000000041505200000000000000000000000000000000000000000000000000000000000000416052000000000000000000000000000000000000000000000000000000000000004170520000000000000000000000000000000000000000000000000000000000000041805200000000000000000000000000000000000000000000000000000000000000419052000000000000000000000000000000000000000000000000000000000000004200520000000000000000000000000000000000000000000000000000000000000042105200000000000000000000000000000000000000000000000000000000000000422052000000000000000000000000000000000000000000000000000000000000004230520000000000000000000000000000000000000000000000000000000000000042405200000000000000000000000000000000000000000000000000000000000000425052000000000000000000000000000000000000000000000000000000000000004260520000000000000000000000000000000000000000000000000000000000000042705200000000000000000000000000000000000000000000000000000000000000428052000000000000000000000000000000000000000000000000000000000000004290520000000000000000000000000000000000000000000000000000000000000043005200000000000000000000000000000000000000000000000000000000000000431052000000000000000000000000000000000000000000000000000000000000004320520000000000000000000000000000000000000000000000000000000000000043305200000000000000000000000000000000000000000000000000000000000000434052000000000000000000000000000000000000000000000000000000000000004350520000000000000000000000000000000000000000000000000000000000000043605200000000000000000000000000000000000000000000000000000000000000437052000000000000000000000000000000000000000000000000000000000000004380520000000000000000000000000000000000000000000000000000000000000043905200000000000000000000000000000000000000000000000000000000000000440052000000000000000000000000000000000000000000000000000000000000004410520000000000000000000000000000000000000000000000000000000000000044205200000000000000000000000000000000000000000000000000000000000000443052000000000000000000000000000000000000000000000000000000000000004440520000000000000000000000000000000000000000000000000000000000000044505200000000000000000000000000000000000000000000000000000000000000446052000000000000000000000000000000000000000000000000000000000000004470520000000000000000000000000000000000000000000000000000000000000044805200000000000000000000000000000000000000000000000000000000000000449052000000000000000000000000000000000000000000000000000000000000004500520000000000000000000000000000000000000000000000000000000000000045105200000000000000000000000000000000000000000000000000000000000000452052000000000000000000000000000000000000000000000000000000000000004530520000000000000000000000000000000000000000000000000000000000000045405200000000000000000000000000000000000000000000000000000000000000455052000000000000000000000000000000000000000000000000000000000000004560520000000000000000000000000000000000000000000000000000000000000045705200000000000000000000000000000000000000000000000000000000000000458052000000000000000000000000000000000000000000000000000000000000004590520000000000000000000000000000000000000000000000000000000000000046005200000000000000000000000000000000000000000000000000000000000000461052000000000000000000000000000000000000000000000000000000000000004620520000000000000000000000000000000000000000000000000000000000000046305200000000000000000000000000000000000000000000000000000000000000464052000000000000000000000000000000000000000000000000000000000000004650520000000000000000000000000000000000000000000000000000000000000046605200000000000000000000000000000000000000000000000000000000000000467052000000000000000000000000000000000000000000000000000000000000004680520000000000000000000000000000000000000000000000000000000000000046905200000000000000000000000000000000000000000000000000000000000000470052000000000000000000000000000000000000000000000000000000000000004710520000000000000000000000000000000000000000000000000000000000000047205200000000000000000000000000000000000000000000000000000000000000473052000000000000000000000000000000000000000000000000000000000000004740520000000000000000000000000000000000000000000000000000000000000047505200000000000000000000000000000000000000000000000000000000000000476052000000000000000000000000000000000000000000000000000000000000004770520000000000000000000000000000000000000000000000000000000000000047805200000000000000000000000000000000000000000000000000000000000000479052000000000000000000000000000000000000000000000000000000000000004800520000000000000000000000000000000000000000000000000000000000000048105200000000000000000000000000000000000000000000000000000000000000482052000000000000000000000000000000000000000000000000000000000000004830520000000000000000000000000000000000000000000000000000000000000048405200000000000000000000000000000000000000000000000000000000000000485052000000000000000000000000000000000000000000000000000000000000004860520000000000000000000000000000000000000000000000000000000000000048705200000000000000000000000000000000000000000000000000000000000000488052000000000000000000000000000000000000000000000000000000000000004890520000000000000000000000000000000000000000000000000000000000000049005200000000000000000000000000000000000000000000000000000000000000491052000000000000000000000000000000000000000000000000000000000000004920520000000000000000000000000000000000000000000000000000000000000049305200000000000000000000000000000000000000000000000000000000000000494052000000000000000000000000000000000000000000000000000000000000004950520000000000000000000000000000000000000000000000000000000000000049605200000000000000000000000000000000000000000000000000000000000000497052000000000000000000000000000000000000000000000000000000000000004980520000000000000000000000000000000000000000000000000000000000000049905200000000000000000000000000000000000000000000000000000000000000500052000000000000000000000000000000000000000000000000000000000000005010520000000000000000000000000000000000000000000000000000000000000050205200000000000000000000000000000000000000000000000000000000000000503052000000000000000000000000000000000000000000000000000000000000005040520000000000000000000000000000000000000000000000000000000000000050505200000000000000000000000000000000000000000000000000000000000000506052000000000000000000000000000000000000000000000000000000000000005070520000000000000000000000000000000000000000000000000000000000000050805200000000000000000000000000000000000000000000000000000000000000509052000000000000000000000000000000000000000000000000000000000000005100520000000000000000000000000000000000000000000000000000000000000051105200000000000000000000000000000000000000000000000000000000000000512052000000000000000000000000000000000000000000000000000000000000005130520000000000000000000000000000000000000000000000000000000000000051405200000000000000000000000000000000000000000000000000000000000000515052000000000000000000000000000000000000000000000000000000000000005160520000000000000000000000000000000000000000000000000000000000000051705200000000000000000000000000000000000000000000000000000000000000518052000000000000000000000000000000000000000000000000000000000000005190520000000000000000000000000000000000000000000000000000000000000052005200000000000000000000000000000000000000000000000000000000000000521052000000000000000000000000000000000000000000000000000000000000005220520000000000000000000000000000000000000000000000000000000000000052305200000000000000000000000000000000000000000000000000000000000000524052000000000000000000000000000000000000000000000000000000000000005250520000000000000000000000000000000000000000000000000000000000000052605200000000000000000000000000000000000000000000000000000000000000527052000000000000000000000000000000000000000000000000000000000000005280520000000000000000000000000000000000000000000000000000000000000052905200000000000000000000000000000000000000000000000000000000000000530052000000000000000000000000000000000000000000000000000000000000005310520000000000000000000000000000000000000000000000000000000000000053205200000000000000000000000000000000000000000000000000000000000000533052000000000000000000000000000000000000000000000000000000000000005340520000000000000000000000000000000000000000000000000000000000000053505200000000000000000000000000000000000000000000000000000000000000536052000000000000000000000000000000000000000000000000000000000000005370520000000000000000000000000000000000000000000000000000000000000053805200000000000000000000000000000000000000000000000000000000000000539052000000000000000000000000000000000000000000000000000000000000005400520000000000000000000000000000000000000000000000000000000000000054105200000000000000000000000000000000000000000000000000000000000000542052000000000000000000000000000000000000000000000000000000000000005430520000000000000000000000000000000000000000000000000000000000000054405200000000000000000000000000000000000000000000000000000000000000545052000000000000000000000000000000000000000000000000000000000000005460520000000000000000000000000000000000000000000000000000000000000054705200000000000000000000000000000000000000000000000000000000000000548052000000000000000000000000000000000000000000000000000000000000005490520000000000000000000000000000000000000000000000000000000000000055005200000000000000000000000000000000000000000000000000000000000000551052000000000000000000000000000000000000000000000000000000000000005520520000000000000000000000000000000000000000000000000000000000000055305200000000000000000000000000000000000000000000000000000000000000554052000000000000000000000000000000000000000000000000000000000000005550520000000000000000000000000000000000000000000000000000000000000055605200000000000000000000000000000000000000000000000000000000000000557052000000000000000000000000000000000000000000000000000000000000005580520000000000000000000000000000000000000000000000000000000000000055905200000000000000000000000000000000000000000000000000000000000000560052000000000000000000000000000000000000000000000000000000000000005610520000000000000000000000000000000000000000000000000000000000000056205200000000000000000000000000000000000000000000000000000000000000563052000000000000000000000000000000000000000000000000000000000000005640520000000000000000000000000000000000000000000000000000000000000056505200000000000000000000000000000000000000000000000000000000000000566052000000000000000000000000000000000000000000000000000000000000005670520000000000000000000000000000000000000000000000000000000000000056805200000000000000000000000000000000000000000000000000000000000000569052000000000000000000000000000000000000000000000000000000000000005700520000000000000000000000000000000000000000000000000000000000000057105200000000000000000000000000000000000000000000000000000000000000572052000000000000000000000000000000000000000000000000000000000000005730520000000000000000000000000000000000000000000000000000000000000057405200000000000000000000000000000000000000000000000000000000000000575052000000000000000000000000000000000000000000000000000000000000005760520000000000000000000000000000000000000000000000000000000000000057705200000000000000000000000000000000000000000000000000000000000000578052000000000000000000000000000000000000000000000000000000000000005790520000000000000000000000000000000000000000000000000000000000000058005200000000000000000000000000000000000000000000000000000000000000581052000000000000000000000000000000000000000000000000000000000000005820520000000000000000000000000000000000000000000000000000000000000058305200000000000000000000000000000000000000000000000000000000000000584052000000000000000000000000000000000000000000000000000000000000005850520000000000000000000000000000000000000000000000000000000000000058605200000000000000000000000000000000000000000000000000000000000000587052000000000000000000000000000000000000000000000000000000000000005880520000000000000000000000000000000000000000000000000000000000000058905200000000000000000000000000000000000000000000000000000000000000590052000000000000000000000000000000000000000000000000000000000000005910520000000000000000000000000000000000000000000000000000000000000059205200000000000000000000000000000000000000000000000000000000000000593052000000000000000000000000000000000000000000000000000000000000005940520000000000000000000000000000000000000000000000000000000000000059505200000000000000000000000000000000000000000000000000000000000000596052000000000000000000000000000000000000000000000000000000000000005970520000000000000000000000000000000000000000000000000000000000000059805200000000000000000000000000000000000000000000000000000000000000599052000000000000000000000000000000000000000000000000000000000000006000520000000000000000000000000000000000000000000000000000000000000060105200000000000000000000000000000000000000000000000000000000000000602052000000000000000000000000000000000000000000000000000000000000006030520000000000000000000000000000000000000000000000000000000000000060405200000000000000000000000000000000000000000000000000000000000000605052000000000000000000000000000000000000000000000000000000000000006060520000000000000000000000000000000000000000000000000000000000000060705200000000000000000000000000000000000000000000000000000000000000608052000000000000000000000000000000000000000000000000000000000000006090520000000000000000000000000000000000000000000000000000000000000061005200000000000000000000000000000000000000000000000000000000000000611052000000000000000000000000000000000000000000000000000000000000006120520000000000000000000000000000000000000000000000000000000000000061305200000000000000000000000000000000000000000000000000000000000000614052000000000000000000000000000000000000000000000000000000000000006150520000000000000000000000000000000000000000000000000000000000000061605200000000000000000000000000000000000000000000000000000000000000617052000000000000000000000000000000000000000000000000000000000000006180520000000000000000000000000000000000000000000000000000000000000061905200000000000000000000000000000000000000000000000000000000000000620052000000000000000000000000000000000000000000000000000000000000006210520000000000000000000000000000000000000000000000000000000000000062205200000000000000000000000000000000000000000000000000000000000000623052000000000000000000000000000000000000000000000000000000000000006240520000000000000000000000000000000000000000000000000000000000000062505200000000000000000000000000000000000000000000000000000000000000626052000000000000000000000000000000000000000000000000000000000000006270520000000000000000000000000000000000000000000000000000000000000062805200000000000000000000000000000000000000000000000000000000000000629052000000000000000000000000000000000000000000000000000000000000006300520000000000000000000000000000000000000000000000000000000000000063105200000000000000000000000000000000000000000000000000000000000000632052000000000000000000000000000000000000000000000000000000000000006330520000000000000000000000000000000000000000000000000000000000000063405200000000000000000000000000000000000000000000000000000000000000635052000000000000000000000000000000000000000000000000000000000000006360520000000000000000000000000000000000000000000000000000000000000063705200000000000000000000000000000000000000000000000000000000000000638052000000000000000000000000000000000000000000000000000000000000006390520000000000000000000000000000000000000000000000000000000000000064005200000000000000000000000000000000000000000000000000000000000000641052000000000000000000000000000000000000000000000000000000000000006420520000000000000000000000000000000000000000000000000000000000000064305200000000000000000000000000000000000000000000000000000000000000644052000000000000000000000000000000000000000000000000000000000000006450520000000000000000000000000000000000000000000000000000000000000064605200000000000000000000000000000000000000000000000000000000000000647052000000000000000000000000000000000000000000000000000000000000006480520000000000000000000000000000000000000000000000000000000000000064905200000000000000000000000000000000000000000000000000000000000000650052000000000000000000000000000000000000000000000000000000000000006510520000000000000000000000000000000000000000000000000000000000000065205200000000000000000000000000000000000000000000000000000000000000653052000000000000000000000000000000000000000000000000000000000000006540520000000000000000000000000000000000000000000000000000000000000065505200000000000000000000000000000000000000000000000000000000000000656052000000000000000000000000000000000000000000000000000000000000006570520000000000000000000000000000000000000000000000000000000000000065805200000000000000000000000000000000000000000000000000000000000000659052000000000000000000000000000000000000000000000000000000000000006600520000000000000000000000000000000000000000000000000000000000000066105200000000000000000000000000000000000000000000000000000000000000662052000000000000000000000000000000000000000000000000000000000000006630520000000000000000000000000000000000000000000000000000000000000066405200000000000000000000000000000000000000000000000000000000000000665052000000000000000000000000000000000000000000000000000000000000006660520000000000000000000000000000000000000000000000000000000000000066705200000000000000000000000000000000000000000000000000000000000000668052000000000000000000000000000000000000000000000000000000000000006690520000000000000000000000000000000000000000000000000000000000000067005200000000000000000000000000000000000000000000000000000000000000671052000000000000000000000000000000000000000000000000000000000000006720520000000000000000000000000000000000000000000000000000000000000067305200000000000000000000000000000000000000000000000000000000000000674052000000000000000000000000000000000000000000000000000000000000006750520000000000000000000000000000000000000000000000000000000000000067605200000000000000000000000000000000000000000000000000000000000000677052000000000000000000000000000000000000000000000000000000000000006780520000000000000000000000000000000000000000000000000000000000000067905200000000000000000000000000000000000000000000000000000000000000680052000000000000000000000000000000000000000000000000000000000000006810520000000000000000000000000000000000000000000000000000000000000068205200000000000000000000000000000000000000000000000000000000000000683052000000000000000000000000000000000000000000000000000000000000006840520000000000000000000000000000000000000000000000000000000000000068505200000000000000000000000000000000000000000000000000000000000000686052000000000000000000000000000000000000000000000000000000000000006870520000000000000000000000000000000000000000000000000000000000000068805200000000000000000000000000000000000000000000000000000000000000689052000000000000000000000000000000000000000000000000000000000000006900520000000000000000000000000000000000000000000000000000000000000069105200000000000000000000000000000000000000000000000000000000000000692052000000000000000000000000000000000000000000000000000000000000006930520000000000000000000000000000000000000000000000000000000000000069405200000000000000000000000000000000000000000000000000000000000000695052000000000000000000000000000000000000000000000000000000000000006960520000000000000000000000000000000000000000000000000000000000000069705200000000000000000000000000000000000000000000000000000000000000698052000000000000000000000000000000000000000000000000000000000000006990520000000000000000000000000000000000000000000000000000000000000070005200000000000000000000000000000000000000000000000000000000000000701052000000000000000000000000000000000000000000000000000000000000007020520000000000000000000000000000000000000000000000000000000000000070305200000000000000000000000000000000000000000000000000000000000000704052000000000000000000000000000000000000000000000000000000000000007050520000000000000000000000000000000000000000000000000000000000000070605200000000000000000000000000000000000000000000000000000000000000707052000000000000000000000000000000000000000000000000000000000000007080520000000000000000000000000000000000000000000000000000000000000070905200000000000000000000000000000000000000000000000000000000000000710052000000000000000000000000000000000000000000000000000000000000007110520000000000000000000000000000000000000000000000000000000000000071205200000000000000000000000000000000000000000000000000000000000000713052000000000000000000000000000000000000000000000000000000000000007140520000000000000000000000000000000000000000000000000000000000000071505200000000000000000000000000000000000000000000000000000000000000716052000000000000000000000000000000000000000000000000000000000000007170520000000000000000000000000000000000000000000000000000000000000071805200000000000000000000000000000000000000000000000000000000000000719052000000000000000000000000000000000000000000000000000000000000007200520000000000000000000000000000000000000000000000000000000000000072105200000000000000000000000000000000000000000000000000000000000000722052000000000000000000000000000000000000000000000000000000000000007230520000000000000000000000000000000000000000000000000000000000000072405200000000000000000000000000000000000000000000000000000000000000725052000000000000000000000000000000000000000000000000000000000000007260520000000000000000000000000000000000000000000000000000000000000072705200000000000000000000000000000000000000000000000000000000000000728052000000000000000000000000000000000000000000000000000000000000007290520000000000000000000000000000000000000000000000000000000000000073005200000000000000000000000000000000000000000000000000000000000000731052000000000000000000000000000000000000000000000000000000000000007320520000000000000000000000000000000000000000000000000000000000000073305200000000000000000000000000000000000000000000000000000000000000734052000000000000000000000000000000000000000000000000000000000000007350520000000000000000000000000000000000000000000000000000000000000073605200000000000000000000000000000000000000000000000000000000000000737052000000000000000000000000000000000000000000000000000000000000007380520000000000000000000000000000000000000000000000000000000000000073905200000000000000000000000000000000000000000000000000000000000000740052000000000000000000000000000000000000000000000000000000000000007410520000000000000000000000000000000000000000000000000000000000000074205200000000000000000000000000000000000000000000000000000000000000743052000000000000000000000000000000000000000000000000000000000000007440520000000000000000000000000000000000000000000000000000000000000074505200000000000000000000000000000000000000000000000000000000000000746052000000000000000000000000000000000000000000000000000000000000007470520000000000000000000000000000000000000000000000000000000000000074805200000000000000000000000000000000000000000000000000000000000000749052000000000000000000000000000000000000000000000000000000000000007500520000000000000000000000000000000000000000000000000000000000000075105200000000000000000000000000000000000000000000000000000000000000752052000000000000000000000000000000000000000000000000000000000000007530520000000000000000000000000000000000000000000000000000000000000075405200000000000000000000000000000000000000000000000000000000000000755052000000000000000000000000000000000000000000000000000000000000007560520000000000000000000000000000000000000000000000000000000000000075705200000000000000000000000000000000000000000000000000000000000000758052000000000000000000000000000000000000000000000000000000000000007590520000000000000000000000000000000000000000000000000000000000000076005200000000000000000000000000000000000000000000000000000000000000761052000000000000000000000000000000000000000000000000000000000000007620520000000000000000000000000000000000000000000000000000000000000076305200000000000000000000000000000000000000000000000000000000000000764052000000000000000000000000000000000000000000000000000000000000007650520000000000000000000000000000000000000000000000000000000000000076605200000000000000000000000000000000000000000000000000000000000000767052000000000000000000000000000000000000000000000000000000000000007680520000000000000000000000000000000000000000000000000000000000000076905200000000000000000000000000000000000000000000000000000000000000770052000000000000000000000000000000000000000000000000000000000000007710520000000000000000000000000000000000000000000000000000000000000077205200000000000000000000000000000000000000000000000000000000000000773052000000000000000000000000000000000000000000000000000000000000007740520000000000000000000000000000000000000000000000000000000000000077505200000000000000000000000000000000000000000000000000000000000000776052000000000000000000000000000000000000000000000000000000000000007770520000000000000000000000000000000000000000000000000000000000000077805200000000000000000000000000000000000000000000000000000000000000779052000000000000000000000000000000000000000000000000000000000000007800520000000000000000000000000000000000000000000000000000000000000078105200000000000000000000000000000000000000000000000000000000000000782052000000000000000000000000000000000000000000000000000000000000007830520000000000000000000000000000000000000000000000000000000000000078405200000000000000000000000000000000000000000000000000000000000000785052000000000000000000000000000000000000000000000000000000000000007860520000000000000000000000000000000000000000000000000000000000000078705200000000000000000000000000000000000000000000000000000000000000788052000000000000000000000000000000000000000000000000000000000000007890520000000000000000000000000000000000000000000000000000000000000079005200000000000000000000000000000000000000000000000000000000000000791052000000000000000000000000000000000000000000000000000000000000007920520000000000000000000000000000000000000000000000000000000000000079305200000000000000000000000000000000000000000000000000000000000000794052000000000000000000000000000000000000000000000000000000000000007950520000000000000000000000000000000000000000000000000000000000000079605200000000000000000000000000000000000000000000000000000000000000797052000000000000000000000000000000000000000000000000000000000000007980520000000000000000000000000000000000000000000000000000000000000079905200000000000000000000000000000000000000000000000000000000000000800052000000000000000000000000000000000000000000000000000000000000008010520000000000000000000000000000000000000000000000000000000000000080205200000000000000000000000000000000000000000000000000000000000000803052000000000000000000000000000000000000000000000000000000000000008040520000000000000000000000000000000000000000000000000000000000000080505200000000000000000000000000000000000000000000000000000000000000806052000000000000000000000000000000000000000000000000000000000000008070520000000000000000000000000000000000000000000000000000000000000080805200000000000000000000000000000000000000000000000000000000000000809052000000000000000000000000000000000000000000000000000000000000008100520000000000000000000000000000000000000000000000000000000000000081105200000000000000000000000000000000000000000000000000000000000000812052000000000000000000000000000000000000000000000000000000000000008130520000000000000000000000000000000000000000000000000000000000000081405200000000000000000000000000000000000000000000000000000000000000815052000000000000000000000000000000000000000000000000000000000000008160520000000000000000000000000000000000000000000000000000000000000081705200000000000000000000000000000000000000000000000000000000000000818052000000000000000000000000000000000000000000000000000000000000008190520000000000000000000000000000000000000000000000000000000000000082005200000000000000000000000000000000000000000000000000000000000000821052000000000000000000000000000000000000000000000000000000000000008220520000000000000000000000000000000000000000000000000000000000000082305200000000000000000000000000000000000000000000000000000000000000824052000000000000000000000000000000000000000000000000000000000000008250520000000000000000000000000000000000000000000000000000000000000082605200000000000000000000000000000000000000000000000000000000000000827052000000000000000000000000000000000000000000000000000000000000008280520000000000000000000000000000000000000000000000000000000000000082905200000000000000000000000000000000000000000000000000000000000000830052000000000000000000000000000000000000000000000000000000000000008310520000000000000000000000000000000000000000000000000000000000000083205200000000000000000000000000000000000000000000000000000000000000833052000000000000000000000000000000000000000000000000000000000000008340520000000000000000000000000000000000000000000000000000000000000083505200000000000000000000000000000000000000000000000000000000000000836052000000000000000000000000000000000000000000000000000000000000008370520000000000000000000000000000000000000000000000000000000000000083805200000000000000000000000000000000000000000000000000000000000000839052000000000000000000000000000000000000000000000000000000000000008400520000000000000000000000000000000000000000000000000000000000000084105200000000000000000000000000000000000000000000000000000000000000842052000000000000000000000000000000000000000000000000000000000000008430520000000000000000000000000000000000000000000000000000000000000084405200000000000000000000000000000000000000000000000000000000000000845052000000000000000000000000000000000000000000000000000000000000008460520000000000000000000000000000000000000000000000000000000000000084705200000000000000000000000000000000000000000000000000000000000000848052000000000000000000000000000000000000000000000000000000000000008490520000000000000000000000000000000000000000000000000000000000000085005200000000000000000000000000000000000000000000000000000000000000851052000000000000000000000000000000000000000000000000000000000000008520520000000000000000000000000000000000000000000000000000000000000085305200000000000000000000000000000000000000000000000000000000000000854052000000000000000000000000000000000000000000000000000000000000008550520000000000000000000000000000000000000000000000000000000000000085605200000000000000000000000000000000000000000000000000000000000000857052000000000000000000000000000000000000000000000000000000000000008580520000000000000000000000000000000000000000000000000000000000000085905200000000000000000000000000000000000000000000000000000000000000860052000000000000000000000000000000000000000000000000000000000000008610520000000000000000000000000000000000000000000000000000000000000086205200000000000000000000000000000000000000000000000000000000000000863052000000000000000000000000000000000000000000000000000000000000008640520000000000000000000000000000000000000000000000000000000000000086505200000000000000000000000000000000000000000000000000000000000000866052000000000000000000000000000000000000000000000000000000000000008670520000000000000000000000000000000000000000000000000000000000000086805200000000000000000000000000000000000000000000000000000000000000869052000000000000000000000000000000000000000000000000000000000000008700520000000000000000000000000000000000000000000000000000000000000087105200000000000000000000000000000000000000000000000000000000000000872052000000000000000000000000000000000000000000000000000000000000008730520000000000000000000000000000000000000000000000000000000000000087405200000000000000000000000000000000000000000000000000000000000000875052000000000000000000000000000000000000000000000000000000000000008760520000000000000000000000000000000000000000000000000000000000000087705200000000000000000000000000000000000000000000000000000000000000878052000000000000000000000000000000000000000000000000000000000000008790520000000000000000000000000000000000000000000000000000000000000088005200000000000000000000000000000000000000000000000000000000000000881052000000000000000000000000000000000000000000000000000000000000008820520000000000000000000000000000000000000000000000000000000000000088305200000000000000000000000000000000000000000000000000000000000000884052000000000000000000000000000000000000000000000000000000000000008850520000000000000000000000000000000000000000000000000000000000000088605200000000000000000000000000000000000000000000000000000000000000887052000000000000000000000000000000000000000000000000000000000000008880520000000000000000000000000000000000000000000000000000000000000088905200000000000000000000000000000000000000000000000000000000000000890052000000000000000000000000000000000000000000000000000000000000008910520000000000000000000000000000000000000000000000000000000000000089205200000000000000000000000000000000000000000000000000000000000000893052000000000000000000000000000000000000000000000000000000000000008940520000000000000000000000000000000000000000000000000000000000000089505200000000000000000000000000000000000000000000000000000000000000896052000000000000000000000000000000000000000000000000000000000000008970520000000000000000000000000000000000000000000000000000000000000089805200000000000000000000000000000000000000000000000000000000000000899052000000000000000000000000000000000000000000000000000000000000009000520000000000000000000000000000000000000000000000000000000000000090105200000000000000000000000000000000000000000000000000000000000000902052000000000000000000000000000000000000000000000000000000000000009030520000000000000000000000000000000000000000000000000000000000000090405200000000000000000000000000000000000000000000000000000000000000905052000000000000000000000000000000000000000000000000000000000000009060520000000000000000000000000000000000000000000000000000000000000090705200000000000000000000000000000000000000000000000000000000000000908052000000000000000000000000000000000000000000000000000000000000009090520000000000000000000000000000000000000000000000000000000000000091005200000000000000000000000000000000000000000000000000000000000000911052000000000000000000000000000000000000000000000000000000000000009120520000000000000000000000000000000000000000000000000000000000000091305200000000000000000000000000000000000000000000000000000000000000914052000000000000000000000000000000000000000000000000000000000000009150520000000000000000000000000000000000000000000000000000000000000091605200000000000000000000000000000000000000000000000000000000000000917052000000000000000000000000000000000000000000000000000000000000009180520000000000000000000000000000000000000000000000000000000000000091905200000000000000000000000000000000000000000000000000000000000000920052000000000000000000000000000000000000000000000000000000000000009210520000000000000000000000000000000000000000000000000000000000000092205200000000000000000000000000000000000000000000000000000000000000923052000000000000000000000000000000000000000000000000000000000000009240520000000000000000000000000000000000000000000000000000000000000092505200000000000000000000000000000000000000000000000000000000000000926052000000000000000000000000000000000000000000000000000000000000009270520000000000000000000000000000000000000000000000000000000000000092805200000000000000000000000000000000000000000000000000000000000000929052000000000000000000000000000000000000000000000000000000000000009300520000000000000000000000000000000000000000000000000000000000000093105200000000000000000000000000000000000000000000000000000000000000932052000000000000000000000000000000000000000000000000000000000000009330520000000000000000000000000000000000000000000000000000000000000093405200000000000000000000000000000000000000000000000000000000000000935052000000000000000000000000000000000000000000000000000000000000009360520000000000000000000000000000000000000000000000000000000000000093705200000000000000000000000000000000000000000000000000000000000000938052000000000000000000000000000000000000000000000000000000000000009390520000000000000000000000000000000000000000000000000000000000000094005200000000000000000000000000000000000000000000000000000000000000941052000000000000000000000000000000000000000000000000000000000000009420520000000000000000000000000000000000000000000000000000000000000094305200000000000000000000000000000000000000000000000000000000000000944052000000000000000000000000000000000000000000000000000000000000009450520000000000000000000000000000000000000000000000000000000000000094605200000000000000000000000000000000000000000000000000000000000000947052000000000000000000000000000000000000000000000000000000000000009480520000000000000000000000000000000000000000000000000000000000000094905200000000000000000000000000000000000000000000000000000000000000950052000000000000000000000000000000000000000000000000000000000000009510520000000000000000000000000000000000000000000000000000000000000095205200000000000000000000000000000000000000000000000000000000000000953052000000000000000000000000000000000000000000000000000000000000009540520000000000000000000000000000000000000000000000000000000000000095505200000000000000000000000000000000000000000000000000000000000000956052000000000000000000000000000000000000000000000000000000000000009570520000000000000000000000000000000000000000000000000000000000000095805200000000000000000000000000000000000000000000000000000000000000959052000000000000000000000000000000000000000000000000000000000000009600520000000000000000000000000000000000000000000000000000000000000096105200000000000000000000000000000000000000000000000000000000000000962052000000000000000000000000000000000000000000000000000000000000009630520000000000000000000000000000000000000000000000000000000000000096405200000000000000000000000000000000000000000000000000000000000000965052000000000000000000000000000000000000000000000000000000000000009660520000000000000000000000000000000000000000000000000000000000000096705200000000000000000000000000000000000000000000000000000000000000968052000000000000000000000000000000000000000000000000000000000000009690520000000000000000000000000000000000000000000000000000000000000097005200000000000000000000000000000000000000000000000000000000000000971052000000000000000000000000000000000000000000000000000000000000009720520000000000000000000000000000000000000000000000000000000000000097305200000000000000000000000000000000000000000000000000000000000000974052000000000000000000000000000000000000000000000000000000000000009750520000000000000000000000000000000000000000000000000000000000000097605200000000000000000000000000000000000000000000000000000000000000977052000000000000000000000000000000000000000000000000000000000000009780520000000000000000000000000000000000000000000000000000000000000097905200000000000000000000000000000000000000000000000000000000000000980052000000000000000000000000000000000000000000000000000000000000009810520000000000000000000000000000000000000000000000000000000000000098205200000000000000000000000000000000000000000000000000000000000000983052000000000000000000000000000000000000000000000000000000000000009840520000000000000000000000000000000000000000000000000000000000000098505200000000000000000000000000000000000000000000000000000000000000986052000000000000000000000000000000000000000000000000000000000000009870520000000000000000000000000000000000000000000000000000000000000098805200000000000000000000000000000000000000000000000000000000000000989052000000000000000000000000000000000000000000000000000000000000009900520000000000000000000000000000000000000000000000000000000000000099105200000000000000000000000000000000000000000000000000000000000000992052000000000000000000000000000000000000000000000000000000000000009930520000000000000000000000000000000000000000000000000000000000000099405200000000000000000000000000000000000000000000000000000000000000995052000000000000000000000000000000000000000000000000000000000000009960520000000000000000000000000000000000000000000000000000000000000099705200000000000000000000000000000000000000000000000000000000000000998052000000000000000000000000000000000000000000000000000000000000009990520e57eb8d10b6eed36a88a464538f8fcedbba7b1a71d6ed52124f77b835807d0fd05201c53ca351e7f26f963ced56cf18f9ebee56535170171b72a0addb4e1613776850520636b8e5a599cfe0833dbe141dbc093d65e0a497451ac21415fbf03698587c7b905204ea21cad94a85adb252b0a76b9826c67d7c697ca386d201752e38f19ed92a223126170746f733a3a6d657461646174615f7630c201032003000000000000134552525f414c52454144595f50524553454e542c4164647265737320697320616c72656164792070726573656e7420696e207468652077686974656c6973742e2103000000000000134552525f4e4f5f535543485f41444452455353214e6f2073756368206164647265737320696e207468652077686974656c6973742e2203000000000000134552525f4e4f545f494e495449414c495a45441d57686974656c697374206973206e6f7420696e697469616c697a65642e000201090b010205020001040100051d0b0011050c020b02070321030907012707032900030e0701270a01110220031407002707032a000c030b030f000b013101380002010104010008b01f0b0011050c010b01070321030907012707032a000c030b030f000c020a020704310138000a020705310138000a020706310138000a020707310138000a020708310138000a020709310138000a02070a310138000a02070b310138000a02070c310138000a02070d310138000a02070e310138000a02070f310138000a020710310138000a020711310138000a020712310138000a020713310138000a020714310138000a020715310138000a020716310138000a020717310138000a020718310138000a020719310138000a02071a310138000a02071b310138000a02071c310138000a02071d310138000a02071e310138000a02071f310138000a020720310138000a020721310138000a020722310138000a020723310138000a020724310138000a020725310138000a020726310138000a020727310138000a020728310138000a020729310138000a02072a310138000a02072b310138000a02072c310138000a02072d310138000a02072e310138000a02072f310138000a020730310138000a020731310138000a020732310138000a020733310138000a020734310138000a020735310138000a020736310138000a020737310138000a020738310138000a020739310138000a02073a310138000a02073b310138000a02073c310138000a02073d310138000a02073e310138000a02073f310138000a020740310138000a020741310138000a020742310138000a020743310138000a020744310138000a020745310138000a020746310138000a020747310138000a020748310138000a020749310138000a02074a310138000a02074b310138000a02074c310138000a02074d310138000a02074e310138000a02074f310138000a020750310138000a020751310138000a020752310138000a020753310138000a020754310138000a020755310138000a020756310138000a020757310138000a020758310138000a020759310138000a02075a310138000a02075b310138000a02075c310138000a02075d310138000a02075e310138000a02075f310138000a020760310138000a020761310138000a020762310138000a020763310138000a020764310138000a020765310138000a020766310138000a020767310138000a020768310138000a020769310138000a02076a310138000a02076b310138000a02076c310138000a02076d310138000a02076e310138000a02076f310138000a020770310138000a020771310138000a020772310138000a020773310138000a020774310138000a020775310138000a020776310138000a020777310138000a020778310138000a020779310138000a02077a310138000a02077b310138000a02077c310138000a02077d310138000a02077e310138000a02077f310138000a02078001310138000a02078101310138000a02078201310138000a02078301310138000a02078401310138000a02078501310138000a02078601310138000a02078701310138000a02078801310138000a02078901310138000a02078a01310138000a02078b01310138000a02078c01310138000a02078d01310138000a02078e01310138000a02078f01310138000a02079001310138000a02079101310138000a02079201310138000a02079301310138000a02079401310138000a02079501310138000a02079601310138000a02079701310138000a02079801310138000a02079901310138000a02079a01310138000a02079b01310138000a02079c01310138000a02079d01310138000a02079e01310138000a02079f01310138000a0207a001310138000a0207a101310138000a0207a201310138000a0207a301310138000a0207a401310138000a0207a501310138000a0207a601310138000a0207a701310138000a0207a801310138000a0207a901310138000a0207aa01310138000a0207ab01310138000a0207ac01310138000a0207ad01310138000a0207ae01310138000a0207af01310138000a0207b001310138000a0207b101310138000a0207b201310138000a0207b301310138000a0207b401310138000a0207b501310138000a0207b601310138000a0207b701310138000a0207b801310138000a0207b901310138000a0207ba01310138000a0207bb01310138000a0207bc01310138000a0207bd01310138000a0207be01310138000a0207bf01310138000a0207c001310138000a0207c101310138000a0207c201310138000a0207c301310138000a0207c401310138000a0207c501310138000a0207c601310138000a0207c701310138000a0207c801310138000a0207c901310138000a0207ca01310138000a0207cb01310138000a0207cc01310138000a0207cd01310138000a0207ce01310138000a0207cf01310138000a0207d001310138000a0207d101310138000a0207d201310138000a0207d301310138000a0207d401310138000a0207d501310138000a0207d601310138000a0207d701310138000a0207d801310138000a0207d901310138000a0207da01310138000a0207db01310138000a0207dc01310138000a0207dd01310138000a0207de01310138000a0207df01310138000a0207e001310138000a0207e101310138000a0207e201310138000a0207e301310138000a0207e401310138000a0207e501310138000a0207e601310138000a0207e701310138000a0207e801310138000a0207e901310138000a0207ea01310138000a0207eb01310138000a0207ec01310138000a0207ed01310138000a0207ee01310138000a0207ef01310138000a0207f001310138000a0207f101310138000a0207f201310138000a0207f301310138000a0207f401310138000a0207f501310138000a0207f601310138000a0207f701310138000a0207f801310138000a0207f901310138000a0207fa01310138000a0207fb01310138000a0207fc01310138000a0207fd01310138000a0207fe01310138000a0207ff01310138000a02078002310138000a02078102310138000a02078202310138000a02078302310138000a02078402310138000a02078502310138000a02078602310138000a02078702310138000a02078802310138000a02078902310138000a02078a02310138000a02078b02310138000a02078c02310138000a02078d02310138000a02078e02310138000a02078f02310138000a02079002310138000a02079102310138000a02079202310138000a02079302310138000a02079402310138000a02079502310138000a02079602310138000a02079702310138000a02079802310138000a02079902310138000a02079a02310138000a02079b02310138000a02079c02310138000a02079d02310138000a02079e02310138000a02079f02310138000a0207a002310138000a0207a102310138000a0207a202310138000a0207a302310138000a0207a402310138000a0207a502310138000a0207a602310138000a0207a702310138000a0207a802310138000a0207a902310138000a0207aa02310138000a0207ab02310138000a0207ac02310138000a0207ad02310138000a0207ae02310138000a0207af02310138000a0207b002310138000a0207b102310138000a0207b202310138000a0207b302310138000a0207b402310138000a0207b502310138000a0207b602310138000a0207b702310138000a0207b802310138000a0207b902310138000a0207ba02310138000a0207bb02310138000a0207bc02310138000a0207bd02310138000a0207be02310138000a0207bf02310138000a0207c002310138000a0207c102310138000a0207c202310138000a0207c302310138000a0207c402310138000a0207c502310138000a0207c602310138000a0207c702310138000a0207c802310138000a0207c902310138000a0207ca02310138000a0207cb02310138000a0207cc02310138000a0207cd02310138000a0207ce02310138000a0207cf02310138000a0207d002310138000a0207d102310138000a0207d202310138000a0207d302310138000a0207d402310138000a0207d502310138000a0207d602310138000a0207d702310138000a0207d802310138000a0207d902310138000a0207da02310138000a0207db02310138000a0207dc02310138000a0207dd02310138000a0207de02310138000a0207df02310138000a0207e002310138000a0207e102310138000a0207e202310138000a0207e302310138000a0207e402310138000a0207e502310138000a0207e602310138000a0207e702310138000a0207e802310138000a0207e902310138000a0207ea02310138000a0207eb02310138000a0207ec02310138000a0207ed02310138000a0207ee02310138000a0207ef02310138000a0207f002310138000a0207f102310138000a0207f202310138000a0207f302310138000a0207f402310138000a0207f502310138000a0207f602310138000a0207f702310138000a0207f802310138000a0207f902310138000a0207fa02310138000a0207fb02310138000a0207fc02310138000a0207fd02310138000a0207fe02310138000a0207ff02310138000a02078003310138000a02078103310138000a02078203310138000a02078303310138000a02078403310138000a02078503310138000a02078603310138000a02078703310138000a02078803310138000a02078903310138000a02078a03310138000a02078b03310138000a02078c03310138000a02078d03310138000a02078e03310138000a02078f03310138000a02079003310138000a02079103310138000a02079203310138000a02079303310138000a02079403310138000a02079503310138000a02079603310138000a02079703310138000a02079803310138000a02079903310138000a02079a03310138000a02079b03310138000a02079c03310138000a02079d03310138000a02079e03310138000a02079f03310138000a0207a003310138000a0207a103310138000a0207a203310138000a0207a303310138000a0207a403310138000a0207a503310138000a0207a603310138000a0207a703310138000a0207a803310138000a0207a903310138000a0207aa03310138000a0207ab03310138000a0207ac03310138000a0207ad03310138000a0207ae03310138000a0207af03310138000a0207b003310138000a0207b103310138000a0207b203310138000a0207b303310138000a0207b403310138000a0207b503310138000a0207b603310138000a0207b703310138000a0207b803310138000a0207b903310138000a0207ba03310138000a0207bb03310138000a0207bc03310138000a0207bd03310138000a0207be03310138000a0207bf03310138000a0207c003310138000a0207c103310138000a0207c203310138000a0207c303310138000a0207c403310138000a0207c503310138000a0207c603310138000a0207c703310138000a0207c803310138000a0207c903310138000a0207ca03310138000a0207cb03310138000a0207cc03310138000a0207cd03310138000a0207ce03310138000a0207cf03310138000a0207d003310138000a0207d103310138000a0207d203310138000a0207d303310138000a0207d403310138000a0207d503310138000a0207d603310138000a0207d703310138000a0207d803310138000a0207d903310138000a0207da03310138000a0207db03310138000a0207dc03310138000a0207dd03310138000a0207de03310138000a0207df03310138000a0207e003310138000a0207e103310138000a0207e203310138000a0207e303310138000a0207e403310138000a0207e503310138000a0207e603310138000a0207e703310138000a0207e803310138000a0207e903310138000a0207ea03310138000a0207eb03310138000a0207ec03310138000a0207ed03310138000a0207ee03310138000a0207ef03310138000a0207f003310138000a0207f103310138000a0207f203310138000a0207f303310138000a0207f403310138000a0207f503310138000a0207f603310138000a0207f703310138000a0207f803310138000a0207f903310138000a0207fa03310138000a0207fb03310138000a0207fc03310138000a0207fd03310138000a0207fe03310138000a0207ff03310138000a02078004310138000a02078104310138000a02078204310138000a02078304310138000a02078404310138000a02078504310138000a02078604310138000a02078704310138000a02078804310138000a02078904310138000a02078a04310138000a02078b04310138000a02078c04310138000a02078d04310138000a02078e04310138000a02078f04310138000a02079004310138000a02079104310138000a02079204310138000a02079304310138000a02079404310138000a02079504310138000a02079604310138000a02079704310138000a02079804310138000a02079904310138000a02079a04310138000a02079b04310138000a02079c04310138000a02079d04310138000a02079e04310138000a02079f04310138000a0207a004310138000a0207a104310138000a0207a204310138000a0207a304310138000a0207a404310138000a0207a504310138000a0207a604310138000a0207a704310138000a0207a804310138000a0207a904310138000a0207aa04310138000a0207ab04310138000a0207ac04310138000a0207ad04310138000a0207ae04310138000a0207af04310138000a0207b004310138000a0207b104310138000a0207b204310138000a0207b304310138000a0207b404310138000a0207b504310138000a0207b604310138000a0207b704310138000a0207b804310138000a0207b904310138000a0207ba04310138000a0207bb04310138000a0207bc04310138000a0207bd04310138000a0207be04310138000a0207bf04310138000a0207c004310138000a0207c104310138000a0207c204310138000a0207c304310138000a0207c404310138000a0207c504310138000a0207c604310138000a0207c704310138000a0207c804310138000a0207c904310138000a0207ca04310138000a0207cb04310138000a0207cc04310138000a0207cd04310138000a0207ce04310138000a0207cf04310138000a0207d004310138000a0207d104310138000a0207d204310138000a0207d304310138000a0207d404310138000a0207d504310138000a0207d604310138000a0207d704310138000a0207d804310138000a0207d904310138000a0207da04310138000a0207db04310138000a0207dc04310138000a0207dd04310138000a0207de04310138000a0207df04310138000a0207e004310138000a0207e104310138000a0207e204310138000a0207e304310138000a0207e404310138000a0207e504310138000a0207e604310138000a0207e704310138000a0207e804310138000a0207e904310138000a0207ea04310138000a0207eb04310138000a0207ec04310138000a0207ed04310138000a0207ee04310138000a0207ef04310138000a0207f004310138000a0207f104310138000a0207f204310138000a0207f304310138000a0207f404310138000a0207f504310138000a0207f604310138000a0207f704310138000a0207f804310138000a0207f904310138000a0207fa04310138000a0207fb04310138000a0207fc04310138000a0207fd04310138000a0207fe04310138000a0207ff04310138000a02078005310138000a02078105310138000a02078205310138000a02078305310138000a02078405310138000a02078505310138000a02078605310138000a02078705310138000a02078805310138000a02078905310138000a02078a05310138000a02078b05310138000a02078c05310138000a02078d05310138000a02078e05310138000a02078f05310138000a02079005310138000a02079105310138000a02079205310138000a02079305310138000a02079405310138000a02079505310138000a02079605310138000a02079705310138000a02079805310138000a02079905310138000a02079a05310138000a02079b05310138000a02079c05310138000a02079d05310138000a02079e05310138000a02079f05310138000a0207a005310138000a0207a105310138000a0207a205310138000a0207a305310138000a0207a405310138000a0207a505310138000a0207a605310138000a0207a705310138000a0207a805310138000a0207a905310138000a0207aa05310138000a0207ab05310138000a0207ac05310138000a0207ad05310138000a0207ae05310138000a0207af05310138000a0207b005310138000a0207b105310138000a0207b205310138000a0207b305310138000a0207b405310138000a0207b505310138000a0207b605310138000a0207b705310138000a0207b805310138000a0207b905310138000a0207ba05310138000a0207bb05310138000a0207bc05310138000a0207bd05310138000a0207be05310138000a0207bf05310138000a0207c005310138000a0207c105310138000a0207c205310138000a0207c305310138000a0207c405310138000a0207c505310138000a0207c605310138000a0207c705310138000a0207c805310138000a0207c905310138000a0207ca05310138000a0207cb05310138000a0207cc05310138000a0207cd05310138000a0207ce05310138000a0207cf05310138000a0207d005310138000a0207d105310138000a0207d205310138000a0207d305310138000a0207d405310138000a0207d505310138000a0207d605310138000a0207d705310138000a0207d805310138000a0207d905310138000a0207da05310138000a0207db05310138000a0207dc05310138000a0207dd05310138000a0207de05310138000a0207df05310138000a0207e005310138000a0207e105310138000a0207e205310138000a0207e305310138000a0207e405310138000a0207e505310138000a0207e605310138000a0207e705310138000a0207e805310138000a0207e905310138000a0207ea05310138000a0207eb05310138000a0207ec05310138000a0207ed05310138000a0207ee05310138000a0207ef05310138000a0207f005310138000a0207f105310138000a0207f205310138000a0207f305310138000a0207f405310138000a0207f505310138000a0207f605310138000a0207f705310138000a0207f805310138000a0207f905310138000a0207fa05310138000a0207fb05310138000a0207fc05310138000a0207fd05310138000a0207fe05310138000a0207ff05310138000a02078006310138000a02078106310138000a02078206310138000a02078306310138000a02078406310138000a02078506310138000a02078606310138000a02078706310138000a02078806310138000a02078906310138000a02078a06310138000a02078b06310138000a02078c06310138000a02078d06310138000a02078e06310138000a02078f06310138000a02079006310138000a02079106310138000a02079206310138000a02079306310138000a02079406310138000a02079506310138000a02079606310138000a02079706310138000a02079806310138000a02079906310138000a02079a06310138000a02079b06310138000a02079c06310138000a02079d06310138000a02079e06310138000a02079f06310138000a0207a006310138000a0207a106310138000a0207a206310138000a0207a306310138000a0207a406310138000a0207a506310138000a0207a606310138000a0207a706310138000a0207a806310138000a0207a906310138000a0207aa06310138000a0207ab06310138000a0207ac06310138000a0207ad06310138000a0207ae06310138000a0207af06310138000a0207b006310138000a0207b106310138000a0207b206310138000a0207b306310138000a0207b406310138000a0207b506310138000a0207b606310138000a0207b706310138000a0207b806310138000a0207b906310138000a0207ba06310138000a0207bb06310138000a0207bc06310138000a0207bd06310138000a0207be06310138000a0207bf06310138000a0207c006310138000a0207c106310138000a0207c206310138000a0207c306310138000a0207c406310138000a0207c506310138000a0207c606310138000a0207c706310138000a0207c806310138000a0207c906310138000a0207ca06310138000a0207cb06310138000a0207cc06310138000a0207cd06310138000a0207ce06310138000a0207cf06310138000a0207d006310138000a0207d106310138000a0207d206310138000a0207d306310138000a0207d406310138000a0207d506310138000a0207d606310138000a0207d706310138000a0207d806310138000a0207d906310138000a0207da06310138000a0207db06310138000a0207dc06310138000a0207dd06310138000a0207de06310138000a0207df06310138000a0207e006310138000a0207e106310138000a0207e206310138000a0207e306310138000a0207e406310138000a0207e506310138000a0207e606310138000a0207e706310138000a0207e806310138000a0207e906310138000a0207ea06310138000a0207eb06310138000a0207ec06310138000a0207ed06310138000a0207ee06310138000a0207ef06310138000a0207f006310138000a0207f106310138000a0207f206310138000a0207f306310138000a0207f406310138000a0207f506310138000a0207f606310138000a0207f706310138000a0207f806310138000a0207f906310138000a0207fa06310138000a0207fb06310138000a0207fc06310138000a0207fd06310138000a0207fe06310138000a0207ff06310138000a02078007310138000a02078107310138000a02078207310138000a02078307310138000a02078407310138000a02078507310138000a02078607310138000a02078707310138000a02078807310138000a02078907310138000a02078a07310138000a02078b07310138000a02078c07310138000a02078d07310138000a02078e07310138000a02078f07310138000a02079007310138000a02079107310138000a02079207310138000a02079307310138000a02079407310138000a02079507310138000a02079607310138000a02079707310138000a02079807310138000a02079907310138000a02079a07310138000a02079b07310138000a02079c07310138000a02079d07310138000a02079e07310138000a02079f07310138000a0207a007310138000a0207a107310138000a0207a207310138000a0207a307310138000a0207a407310138000a0207a507310138000a0207a607310138000a0207a707310138000a0207a807310138000a0207a907310138000a0207aa07310138000a0207ab07310138000a0207ac07310138000a0207ad07310138000a0207ae07310138000a0207af07310138000a0207b007310138000a0207b107310138000a0207b207310138000a0207b307310138000a0207b407310138000a0207b507310138000a0207b607310138000a0207b707310138000a0207b807310138000a0207b907310138000a0207ba07310138000a0207bb07310138000a0207bc07310138000a0207bd07310138000a0207be07310138000a0207bf07310138000a0207c007310138000a0207c107310138000a0207c207310138000a0207c307310138000a0207c407310138000a0207c507310138000a0207c607310138000a0207c707310138000a0207c807310138000a0207c907310138000a0207ca07310138000a0207cb07310138000a0207cc07310138000a0207cd07310138000a0207ce07310138000a0207cf07310138000a0207d007310138000a0207d107310138000a0207d207310138000a0207d307310138000a0207d407310138000a0207d507310138000a0207d607310138000a0207d707310138000a0207d807310138000a0207d907310138000a0207da07310138000a0207db07310138000a0207dc07310138000a0207dd07310138000a0207de07310138000a0207df07310138000a0207e007310138000a0207e107310138000a0207e207310138000a0207e307310138000a0207e407310138000a0207e507310138000a0207e607310138000a0207e707310138000a0207e807310138000a0207e907310138000a0207ea07310138000b0207eb0731013800020201000100090807032b000c010b0110000b00380102030100000b1f38020c010d0107ec07310138000d0107ed07310138000d0107ee07310138000d0107ef07310138000d01071a310138000d01071b310138000b000b0112002d00020401040100051c0b0011050c020b02070321030907012707032900030e0701270a011102031307022707032a000c030b030f000b0138030102000000"; - let res = run_binary_test("sample_whitelist", code); - assert!(res.is_ok(), "{:?}", res) -} - -#[test] -fn sample_coin_store() { - let code = "a11ceb0b050000000e01001e021e0c032acb0604f5065405c907a41207ed19e80908d523800206d5252c108126420ac326090bcc26040cd026fd86010dcdad01020ecfad01040000010101020103020402050306030704080509050a0607060b070c070d000e08010001011104010001000f00010200000010010201000012030101000013040103000000001404010300000000150401030000000016040103000000001704010300000000180401030000000019040103000000001a040103000000001b040103000000001c040103000000001d040103000000001e040103000000001f0401030000000020040103000000002104010300000000220401030000000023040103000000002404010300000000250401030000000026040103000000002704010300000000280401030000000029040103000000002a040103000000002b040103000000002c040103000000002d040103000000002e040103000000002f0401030000000030040103000000003104010300000000320401030000000033050103000000003405010300000000350501030000000036050103000000003705010300000000380501030000000039050103000000003a050103000000003b050103000000003c050103000000003d050103000000003e050103000000003f0501030000000040050103000000004105010300000000420501030000000043050103000000004405010300000000450501030000000046050103000000004705010300000000480501030000000049050103000000004a050103000000004b050103000000004c050103000000004d050103000000004e050103000000004f050103000000005005010300000000510601010000520701010000530801010000540901020000005509010200000056000102000000570a010200000058070102000000590a01020000005a0b01020000005b0001020000005c0c0103000000005d0c01020000005e0c01020000005f0701010000600701010000610201010000620701010000630d01010000640e010100006502030100006601030100006702030100016810020100016911010100096a0114020000046b0100020000016c16030100016d01030100090b1819020000040b1a1b020000016e030101000c6f011d0200000b70031e020000066b0100030000000771221e030000000872010202000008730102020000087424000200000e6a01140200000d0b261e020000037508400002760202000165070301000477014200057801430200000a790100020000060b1a1b03000000011226010100017a48030100580f590f5a135a155b135c0f5d175e135e1559175d0f5f155f136017611361156215600f6320632164216513661366156515671568136815691562136420671369136c0f6e136f135c17702070215817710f720f020303000103010b010109000d030403040404010101010404040d0304030404010101010404040402060c0b0101090002060c0301060c0b030403040404010104040403060c030304060c0303010a060c03040403030404010102050303060c050301090001060b0101090002070b010109000b01010900230b010109000b010109010403040b010109000403040404040b010109010403030304040b010109000b010109000b01010901070b00010900040404040b010109000b010109000b0101090104040b0101090104040209000901020404020901090002070b0101090003010901040b01010900040b0101090104040b010109000b010109010b010109000b01010901040b01010900030b0101090103020b010109000b01010901250303030403040b010109000403040404040b0101090103030304040b010109000b010109010b01010900070b000109000404040b010109000b0101090003040404030b0101090104030403030303010b0101090122040303040b010109000403040404040b0101090103030304040b010109000b010109000b01010901070b000109000404040b0101090003040b010109000404030b0101090104040309000901090203090109000902020b010109000323040404040b010109000403040404040b0101090103030304040b010109000b010109000b01010901070b000109000404050b01010900040b010109000b01010901040b0101090004040b0101090104040805070b01010900070b01010901030301040423040404040b010109000403040404040b0101090103030304040b010109000b010109010b01010900070b00010900040405040b0101090004040b010109000404040b01010901040402050b01010900240403040403040404040403030304040b010109000b010109010b01010900070b000109000b0101090104040504040b010109010b010109000b01010900040b01010900040b010109010b0101090104040b01010900200303030403030404030404040403030304040b010109000b010109010b01010900070b000109000b010109010404030b01010900040303040b010109001d040303030404030404040403030304040b010109000b010109010b01010900070b000109000b01010901040403040b0101090003040b010109001e040404030404030404040403030304040b010109000b010109010b01010900070b000109000b010109010404050b01010900040b010109000b01010901040b010109001e040404030404030404040403030304040b010109000b010109010b01010900070b000109000b0101090104040504040b0101090004040b010109002603030304030403040404040403030304040b010109010b01010900070b00010900040405030b010109000b0101090104040b01010900040b01010900030b01010901040b01010901040304200303030b010109000b010109010403030403040404040403030304040b010109010b01010900070b000109000404030b010109000b01010901040303041d0303030403030304030404040403030304040b01010900070b0001090004040303040303030421030303040404030404030404040403030304040b010109010b01010900070b000109000404050b01010900030b010109000b01010901040303041f0303030404040304030404040403030304040b010109010b01010900070b0001090004040503040403040304230403030403040404040403030304040b010109000b01010901070b0001090004040503040b01010901040b010109000b01010900040b01010900030b01010901040b0101090104041d0b010109000b01010901040303030403040404040403030304040b010109000b01010901070b00010900040403040b010109000b0101090103041e04040403030404030404040403030304040b010109000b01010901070b000109000404050b0101090003040b010109000b0101090103041c040404030304030404040403030304040b010109000b01010901070b00010900040405030404030404240404040403040404040403030304040b010109000b010109000b01010901070b000109000404050b01010901040b01010901040b010109010b010109000b01010900040b01010900040b010109010b0101090104041f04040b010109000b0101090104030403040404040403030304040b010109000b010109000b01010901070b000109000404050b01010901040b010109010b010109000b0101090104200404030303040304030404040403030304040b010109000b01010900070b000109000404050b01010901030b010109010b01010900040303041d040404030304030404040403030304040b010109000b01010900070b000109000404050b0101090103040b010109010b0101090003041e040404040404030404040403030304040b010109000b010109010b01010900070b000109000404050b01010901040b01010900040b010109010404240404040403040404040403030304040b010109000b010109000b01010901070b00010900040405040b010109000b0101090104040b01010900040b01010900040b01010901040b0101090104041f04040b010109000b0101090104030403040404040403030304040b010109000b010109000b01010901070b0001090004040504040b010109000b0101090104041f0404030303040304030404040403030304040b010109000b01010900070b00010900040405040304040303041c040404030304030404040403030304040b010109000b01010900070b000109000404050403040403041f04040404040404030404040403030304040b010109000b010109000b01010901070b000109000404050b01010900040b010109000b01010901040404010b0001090001050d05030403070b000109000b01010901040b01010900040303030b01010900040302010101011a0504040404070b00010900070b000109010404030303030b01010901040404040b010109000b010109000b010109000b010109000b010109010b010109010b010109010b010109010f03030305040404030b010109010b01010901040b0101090003030b010109000e04040305040404030b010109000b01010901040b010109010b010109010b010109000f030303030305040404030b010109010403030301070b01010900030b0101090003070b000109000a636f696e5f73746f726504636f696e056572726f72067369676e65720f416e696d6553776170506f6f6c563116416e696d6553776170506f6f6c56314c6962726172790e6c69717569646974795f706f6f6c06726f7574657203616d6d09546f6b656e537761700f546f6b656e53776170436f6e66696704737761700a616d6d5f726f7574657208616d6d5f737761700b4d79436f696e53746f726512616e696d65737761705f73746172737761700762616c616e636504436f696e076465706f736974066c3073307431066c3073317430066c3173307431066c3173307432066c3173307433066c3173307434066c3173307435066c3173317430066c3173317432066c3173317433066c3173317434066c3173317435066c3173327430066c3173327431066c3173327433066c3173327434066c3173327435066c3173337430066c3173337431066c3173337432066c3173337434066c3173337435066c3173347430066c3173347431066c3173347432066c3173347433066c3173347435066c3173357430066c3173357431066c3173357432066c3173357433066c3173357434066c3273307431066c3273307432066c3273307433066c3273307434066c3273307435066c3273317430066c3273317432066c3273317433066c3273317434066c3273317435066c3273327430066c3273327431066c3273327433066c3273327434066c3273327435066c3273337430066c3273337431066c3273337432066c3273337434066c3273337435066c3273347430066c3273347431066c3273347432066c3273347433066c3273347435066c3273357430066c3273357431066c3273357432066c3273357433066c3273357434036e65770d6e65775f66726f6d5f6d61696e0d6e65775f66726f6d5f7a65726f047330743104733174301073696d706c655f616e696d65737761701373696d706c655f616e696d65737761705f76320f73696d706c655f73746172737761701273696d706c655f73746172737761705f76321273696d706c655f73746172737761705f76331273746172737761705f616e696d657377617012737761705f61625f6c69717569647377617008737761705f61757810737761705f70616e63616b6573776170127472616e736665725f66726f6d5f6d61696e197472616e736665725f66726f6d5f6d61696e5f736372697074107472616e736665725f746f5f6d61696e177472616e736665725f746f5f6d61696e5f736372697074117472616e736665725f746f5f6f74686572187472616e736665725f746f5f6f746865725f7363726970740877697468647261770c77697468647261775f616c6c0c77697468647261775f616e790576616c7565056d657267650c6765745f7265736572766573116765745f72657365727665735f73697a650765787472616374047a65726f0c64657374726f795f7a65726f0e746f6b656e5f726573657276657321737761705f65786163745f785f746f5f795f6469726563745f65787465726e616c18737761705f65786163745f636f696e5f666f725f636f696e04785f617504795f61751c737761705f65786163745f636f696e5f666f725f636f696e5f6d75740a616464726573735f6f66117065726d697373696f6e5f64656e6965640e6765745f61646d696e5f6461746107636f6d70617265116765745f706f756e646167655f726174650b657874726163745f616c6cd1b58e44ea11ffd326a280c453b080fd8af294298815a00e65b6e2bffc48d6ac000000000000000000000000000000000000000000000000000000000000000116fe2df00ea7dde4a63409201f7f4e536bde7bb7335526a35d05111e68aa322c190d44266241744264b964a37b8f09863167a12d3e70cda39376cfb4e3561e12bd35135844473187163ca197ca93b2ab014370587bb0ed3befff9e902d6bb541c755e4c8d7a6ab6d56f9289d97c43c1c94bde75ec09147c90d35cd1be61c8fb9c7efb4076dbe143cbcd98cfaaa929ecfc8f299203dfff63b95ccb6bfe19850faec42a352cc65eca17a9fa85d0fc602295897ed6b8b8af6a6c79ef490eb8f9eba0308915f0100000000000520d1b58e44ea11ffd326a280c453b080fd8af294298815a00e65b6e2bffc48d6ac126170746f733a3a6d657461646174615f76302e01915f010000000000234552524f525f5448455f4f55545055545f4c4553535f5448414e5f4d494e5f5245435600000201010b01010900000f001700010400010206ffffffffffffffff270101000100010507013c0037003800020201000100010607013c0036000b0038010203010400010206ffffffffffffffff2704010400010206ffffffffffffffff2705010400010206ffffffffffffffff2706010400010206ffffffffffffffff2707010400010206ffffffffffffffff2708010400010206ffffffffffffffff2709010400010206ffffffffffffffff270a010400010206ffffffffffffffff270b010400010206ffffffffffffffff270c010400010206ffffffffffffffff270d010400010206ffffffffffffffff270e010400010206ffffffffffffffff270f010400010206ffffffffffffffff2710010400010206ffffffffffffffff2711010400010206ffffffffffffffff2712010400010206ffffffffffffffff2713010400010206ffffffffffffffff2714010400010206ffffffffffffffff2715010400010206ffffffffffffffff2716010400010206ffffffffffffffff2717010400010206ffffffffffffffff2718010400010206ffffffffffffffff2719010400010206ffffffffffffffff271a010400010206ffffffffffffffff271b010400010206ffffffffffffffff271c010400010206ffffffffffffffff271d010400010206ffffffffffffffff271e010400010206ffffffffffffffff271f010400010206ffffffffffffffff2720010400010206ffffffffffffffff2721010400010206ffffffffffffffff2722010400010206ffffffffffffffff27230104010012f1010b05040638020c2c0c26050d38030c2b0c2e0b2b0c260b2e0c2c0b260b2c0c180c1738040c10350b10350c1f0c1e0a0432000000000000000000000000000000002104660a180a0c180a0a1a0a1f160c110a170a1f180a111a0c0f0a1e0a18180a0c180a0a1a0b111a0c110a0f0a11180a0b180a091a0c2f0a0f0a11180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c270a270a2f23045e054d0a270c2f0a0f0a11180a0b180a091a0a271a0b271632020000000000000000000000000000001a0c2705480b2f0b0f170a0b180a091a0c040a040b0b180c150b170b09180a15160c240b150b18180b241a320b000000000000000000000000000000170c130a130b0c180c160b1f0b0a180a16160c250b160b1e180b251a320b000000000000000000000000000000170c1a0a1a0a04170b0317010b04340c1407013c000c230a23370038000c1b0a2336000b1438050c200b0804ab010b200b133806320000000000000000000000000000000038070c190c120c2d0c2805b401380632000000000000000000000000000000000b200b1338080c120c190c280c2d0d280b1238010d2d0b1938090b2d0c220a2336000b283801380a0c290b0704cd010b220600000000000000000b290b1a34380b0c0d0c0e05d5010b290b1a340b22060000000000000000380c0c0e0c0d0b0e0b0d0c210c2a0a2336000b2138010b1b0b02160c1c0b23370038000c1d0a1d0a1c2404ea0105ee010b1c0b1d17270b2a380d0224010401001cef010b05040638020c2c0c26050d38030c2b0c2f0b2b0c260b2f0c2c0b260b2c0c190c180b060418380e0c0f0c0e0c0d0522380f0c300c290c2d0b290b2d0b300c0f0c0e0c0d0b0d0b0e0b0f010c11350b11350c1f0c1e0a04320000000000000000000000000000000021047a0a190a0c180a0a1a0a1f160c120a180a1f180a121a0c100a1e0a19180a0c180a0a1a0b121a0c120a100a12180a0b180a091a0c310a100a12180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c2a0a2a0a3123047205610a2a0c310a100a12180a0b180a091a0a2a1a0b2a1632020000000000000000000000000000001a0c2a055c0b310b10170a0b180a091a0c040a040b0b180c160b180b09180a16160c240b160b19180b241a320b000000000000000000000000000000170c140a140b0c180c170b1f0b0a180a17160c250b170b1e180b251a320b000000000000000000000000000000170a04170b0317010b04340c1507013c000c230a23370038000c1b0a2336000b1538050c200b0804bd010b200b143806320000000000000000000000000000000038070c1a0c130c2e0c2705c601380632000000000000000000000000000000000b200b1438080c130c1a0c270c2e0d270b1338010d2e0b1a38090b2e0c210a2336000b273801380a0c280b2138100c220a2336000b2238010b1b0b02160c1c0b23370038000c1d0a1d0a1c2404e80105ec010b1c0b1d17270b2838110225010401001fe8010b05040638020c2a0c24050d38030c290c2d0b290c240b2d0c2a0b240b2a0c170c160b06041738120c0f0c0e051e38130c260c2b0b260c0e0b2b0c0f0b0e350b0f350c1d0c1c0a0432000000000000000000000000000000002104720a170a0c180a0a1a0a1d160c100a160a1d180a101a0c0d0a1c0a17180a0c180a0a1a0b101a0c100a0d0a10180a0b180a091a0c2e0a0d0a10180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c270a270a2e23046a05590a270c2e0a0d0a10180a0b180a091a0a271a0b271632020000000000000000000000000000001a0c2705540b2e0b0d170a0b180a091a0c040a040b0b180c140b160b09180a14160c220b140b17180b221a320b000000000000000000000000000000170c120a120b0c180c150b1d0b0a180a15160c230b150b1c180b231a320b000000000000000000000000000000170a04170b0317010b04340c1307013c000c210a21370038000c190a2136000b1338050c1e0b0804b5010b1e0b123806320000000000000000000000000000000038070c180c110c2c0c2805be01380632000000000000000000000000000000000b1e0b1238080c110c180c280c2c0d280b1138010d2c0b1838090b2c0c200a2136000b283801380a0c250b2006000000000000000038140c1f0a2136000b1f38010b190b02160c1a0b21370038000c1b0a1b0a1a2404e10105e5010b1a0b1b17270b25381102260104010023f8010b05040638020c2c0c26050d38030c2b0c2e0b2b0c260b2e0c2c0b260b2c0c170c160b06041a3815353816350c0e0c0d05203817353818350c0e0c0d0b0d0b0e0c1d0c1c0a0432000000000000000000000000000000002104720a170a0c180a0a1a0a1d160c100a160a1d180a101a0c0f0a1c0a17180a0c180a0a1a0b101a0c100a0f0a10180a0b180a091a0c2f0a0f0a10180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c290a290a2f23046a05590a290c2f0a0f0a10180a0b180a091a0a291a0b291632020000000000000000000000000000001a0c2905540b2f0b0f170a0b180a091a0c040a040b0b180c140b160b09180a14160c220b140b17180b221a320b000000000000000000000000000000170c120a120b0c180c150b1d0b0a180a15160c230b150b1c180b231a320b000000000000000000000000000000170a04170b0317010b04340c1307010c240a243c000c210a21370038000c190a2136000b1338050c1e0b0804b7010b1e0a123806320000000000000000000000000000000038070c180c110c2d0c2a05c001380632000000000000000000000000000000000b1e0a1238080c110c180c2a0c2d0d2a0b1138010d2d0b1838090b2d0c200a2136000b2a3801380a0c270b240d200d270b12340600000000000000000932000000000000000000000000000000003200000000000000000000000000000000381901010b270c250b200c280b250c1f0a2136000b1f38010b190b02160c1a0b21370038000c1b0a1b0a1a2404f10105f5010b1a0b1b17270b28380d02270104010025e8010b05040638020c2b0c25050d38030c2a0c2e0b2a0c250b2e0c2b0b250b2b0c170c160b060417381a0c0e0c0d051e381b0c270c2c0b270b2c0c0e0c0d0b0d0b0e0c1d0c1c0a0432000000000000000000000000000000002104700a170a0c180a0a1a0a1d160c100a160a1d180a101a0c0f0a1c0a17180a0c180a0a1a0b101a0c100a0f0a10180a0b180a091a0c2f0a0f0a10180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c280a280a2f23046805570a280c2f0a0f0a10180a0b180a091a0a281a0b281632020000000000000000000000000000001a0c2805520b2f0b0f170a0b180a091a0c040a040b0b180c140b160b09180a14160c220b140b17180b221a320b000000000000000000000000000000170c120a120b0c180c150b1d0b0a180a15160c230b150b1c180b231a320b000000000000000000000000000000170a04170b0317010b04340c1307010c240a243c000c210a21370038000c190a2136000b1338050c1e0b0804b5010b1e0b123806320000000000000000000000000000000038070c180c110c2d0c2905be01380632000000000000000000000000000000000b1e0b1238080c110c180c290c2d0d290b1138010d2d0b1838090b2d0c1f0a2136000b293801380a0c260b240b1f381c0c200a2136000b2038010b190b02160c1a0b21370038000c1b0a1b0a1a2404e10105e5010b1a0b1b17270b26381102280104010027f20138040c0e350b0e350c150c140b06040d38020c2b0c24051438030c290c2e0b290c240b2e0c2b0b240b2b0c1b0c1a0a0432000000000000000000000000000000002104660a150a0c180a0a1a0a1b160c0f0a140a1b180a0f1a0c0d0a1a0a15180a0c180a0a1a0b0f1a0c0f0a0d0a0f180a0b180a091a0c2f0a0d0a0f180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c250a250a2f23045e054d0a250c2f0a0d0a0f180a0b180a091a0a251a0b251632020000000000000000000000000000001a0c2505480b2f0b0d170a0b180a091a0c040a040b0b180c120b140b09180a12160c210b120b15180b211a320b000000000000000000000000000000170c100a100b0c180c130b1b0b0a180a13160c220b130b1a180b221a320b000000000000000000000000000000170c160a160a04170b0317010b04340c1107010c230a233c000c1f0a1f370038000c170a1f36000b1138050c1c0b0804ac010b1c06000000000000000038060b1034380c0c200c3005b40138060b10340b1c060000000000000000380b0c300c200b300b200c1d0c270b0704c4010b1d0b160b27320000000000000000000000000000000038080c280c2d0c2a0c2c05cd010b2732000000000000000000000000000000000b1d0b1638070c2d0c280c2c0c2a0d2a0b2838010d2c0b2d38090b2a0c1e0b2c0c260a1f36000b1e38010b170b02160c180b1f370038000c190a190a182404e80105ec010b180b1917270b233c0136010b26380902290104010028d90138040c11350b11350c190c180b06040e380e0c0f0c0e0c0d0518380f0c2a0c260c290b260b290b2a0c0f0c0e0c0d0b0d0b0e0b0f010c12350b12350c1e0c1d0a0432000000000000000000000000000000002104700a190a0c180a0a1a0a1e160c130a180a1e180a131a0c100a1d0a19180a0c180a0a1a0b131a0c130a100a13180a0b180a091a0c2b0a100a13180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c280a280a2b23046805570a280c2b0a100a13180a0b180a091a0a281a0b281632020000000000000000000000000000001a0c2805520b2b0b10170a0b180a091a0c040a040b0b180c160b180b09180a16160c240b160b19180b241a320b000000000000000000000000000000170c140a140b0c180c170b1e0b0a180a17160c250b170b1d180b251a320b000000000000000000000000000000170a04170b0317010b04340c1507013c000c220a22370038000c1a0a2236000b1538050c1f0b0804b2010b1f06000000000000000038060b1434380c0c230c2c05ba0138060b14340b1f060000000000000000380b0c2c0c230b2c0b230c200c270b2038100c210a2236000b2138010b1a0b02160c1b0b22370038000c1c0a1c0a1b2404d20105d6010b1b0b1c17270b273811022a0104010029d20138040c0f350b0f350c170c160b06040d38120c100c0e051438130c240c270b240c0e0b270c100b0e350b10350c1c0c1b0a0432000000000000000000000000000000002104680a170a0c180a0a1a0a1c160c110a160a1c180a111a0c0d0a1b0a17180a0c180a0a1a0b111a0c110a0d0a11180a0b180a091a0c280a0d0a11180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c250a250a28230460054f0a250c280a0d0a11180a0b180a091a0a251a0b251632020000000000000000000000000000001a0c25054a0b280b0d170a0b180a091a0c040a040b0b180c140b160b09180a14160c220b140b17180b221a320b000000000000000000000000000000170c120a120b0c180c150b1c0b0a180a15160c230b150b1b180b231a320b000000000000000000000000000000170a04170b0317010b04340c1307013c000c200a20370038000c180a2036000b1338050c1d0b0804aa010b1d06000000000000000038060b1234380c0c210c2905b20138060b12340b1d060000000000000000380b0c290c210b290b210c1e0c260b1e06000000000000000038140c1f0a2036000b1f38010b180b02160c190b20370038000c1a0a1a0a192404cb0105cf010b190b1a17270b263811022b010401002ae20138040c10350b10350c170c160b0604103815353816350c0e0c0d05163817353818350c0e0c0d0b0d0b0e0c1c0c1b0a0432000000000000000000000000000000002104680a170a0c180a0a1a0a1c160c110a160a1c180a111a0c0f0a1b0a17180a0c180a0a1a0b111a0c110a0f0a11180a0b180a091a0c290a0f0a11180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c260a260a29230460054f0a260c290a0f0a11180a0b180a091a0a261a0b261632020000000000000000000000000000001a0c26054a0b290b0f170a0b180a091a0c040a040b0b180c140b160b09180a14160c220b140b17180b221a320b000000000000000000000000000000170c120a120b0c180c150b1c0b0a180a15160c230b150b1b180b231a320b000000000000000000000000000000170a04170b0317010b04340c1307010c240a243c000c200a20370038000c180a2036000b1338050c1d0b0804ac010b1d06000000000000000038060a1234380c0c210c2a05b40138060a12340b1d060000000000000000380b0c2a0c210b2a0b210c1e0c270b240d1e0d270b12340600000000000000000932000000000000000000000000000000003200000000000000000000000000000000381901010b270c250b1e0c280b250c1f0a2036000b1f38010b180b02160c190b20370038000c1a0a1a0a192404db0105df010b190b1a17270b28380d022c010401002bd20138040c10350b10350c170c160b06040d381a0c0e0c0d0514381b0c250c280b250b280c0e0c0d0b0d0b0e0c1c0c1b0a0432000000000000000000000000000000002104660a170a0c180a0a1a0a1c160c110a160a1c180a111a0c0f0a1b0a17180a0c180a0a1a0b111a0c110a0f0a11180a0b180a091a0c290a0f0a11180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c260a260a2923045e054d0a260c290a0f0a11180a0b180a091a0a261a0b261632020000000000000000000000000000001a0c2605480b290b0f170a0b180a091a0c040a040b0b180c140b160b09180a14160c220b140b17180b221a320b000000000000000000000000000000170c120a120b0c180c150b1c0b0a180a15160c230b150b1b180b231a320b000000000000000000000000000000170a04170b0317010b04340c1307010c240a243c000c200a20370038000c180a2036000b1338050c1d0b0804aa010b1d06000000000000000038060b1234380c0c210c2a05b20138060b12340b1d060000000000000000380b0c2a0c210b2a0b210c1e0c270b240b1e381c0c1f0a2036000b1f38010b180b02160c190b20370038000c1a0a1a0a192404cb0105cf010b190b1a17270b273811022d010401002cec010b050407380e0c0f0c0e0c0d0511380f0c310c240c2c0b240b2c0b310c0f0c0e0c0d0b0d0b0e0b0f010c11350b11350c170c160b06042138020c2e0c27052838030c2a0c300b2a0c270b300c2e0b270b2e0c1d0c1c0a04320000000000000000000000000000000021047a0a170a0c180a0a1a0a1d160c120a160a1d180a121a0c100a1c0a17180a0c180a0a1a0b121a0c120a100a12180a0b180a091a0c320a100a12180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c280a280a3223047205610a280c320a100a12180a0b180a091a0a281a0b281632020000000000000000000000000000001a0c28055c0b320b10170a0b180a091a0c040a040b0b180c140b160b09180a14160c210b140b17180b211a0b0c180c150b1d0b0a180a15160c220b150b1c180b221a0c180a180a04170b0317010b04340c1307010c230a233c000c200a20370038000c190a2036000b133805381d0c1e380a0c250b0704be010b1e0b180b25320000000000000000000000000000000038080c290c2f0c2b0c2d05c7010b2532000000000000000000000000000000000b1e0b1838070c2f0c290c2d0c2b0d2b0b2938010d2d0b2f38090b2b0c1f0b2d0c260a2036000b1f38010b190b02160c1a0b20370038000c1b0a1b0a1a2404e20105e6010b1a0b1b17270b233c0136010b263809022e010401002dd5010b050407380e0c0f0c0e0c0d0511380f0c2b0c260c2a0b260b2a0b2b0c0f0c0e0c0d0b0d0b0e0b0f010c13350b13350c1a0c1938040c14350b14350c200c1f0a0432000000000000000000000000000000002104700a1a0a0c180a0a1a0a20160c150a190a20180a151a0c120a1f0a1a180a0c180a0a1a0b151a0c150a120a15180a0b180a091a0c2c0a120a15180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c290a290a2c23046805570a290c2c0a120a15180a0b180a091a0a291a0b291632020000000000000000000000000000001a0c2905520b2c0b12170a0b180a091a0c040a040b0b180c170b190b09180a17160c240b170b1a180b241a0b0c180c180b200b0a180a18160c250b180b1f180b251a0c1b0a1b0a04170b0317010b04340c1607013c000c230a23370038000c1c0a2336000b163805381d0c21380a0c270b0704b1010b210600000000000000000b270b1b34380b0c100c1105b9010b270b1b340b21060000000000000000380c0c110c100b110b100c220c280a2336000b2238010b1c0b02160c1d0b23370038000c1e0a1e0a1d2404ce0105d2010b1d0b1e17270b28380d022f010401002ec6010b050407380e0c0f0c0e0c0d0511380f0c280c230c260b230b260b280c0f0c0e0c0d0b0d0b0e0b0f010c12350b12350c190c180b06042138120c130c11052838130c240c270b240c110b270c130b11350b13350c1e0c1d0a04320000000000000000000000000000000021047c0a190a0c180a0a1a0a1e160c140a180a1e180a141a0c100a1d0a19180a0c180a0a1a0b141a0c140a100a14180a0b180a091a0c290a100a14180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c250a250a2923047405630a250c290a100a14180a0b180a091a0a251a0b251632020000000000000000000000000000001a0c25055e0b290b10170a0b180a091a0c040a040b0b180c160b180b09180a16160c210b160b19180b211a0b0c180c170b1e0b0a180a17160c220b170b1d180b221a0a04170b0317010b04340c1507013c000c200a20370038000c1a0a2036000b153805381d06000000000000000038140c1f0a2036000b1f38010b1a0b02160c1b0b20370038000c1c0a1c0a1b2404c10105c5010b1b0b1c17270230010401002fde010b050407380e0c0f0c0e0c0d0511380f0c2c0c270c2b0b270b2b0b2c0c0f0c0e0c0d0b0d0b0e0b0f010c13350b13350c1a0c190b0604243815353816350c110c10052a3817353818350c110c100b100b110c1f0c1e0a04320000000000000000000000000000000021047c0a1a0a0c180a0a1a0a1f160c140a190a1f180a141a0c120a1e0a1a180a0c180a0a1a0b141a0c140a120a14180a0b180a091a0c2d0a120a14180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c2a0a2a0a2d23047405630a2a0c2d0a120a14180a0b180a091a0a2a1a0b2a1632020000000000000000000000000000001a0c2a055e0b2d0b12170a0b180a091a0c040a040b0b180c170b190b09180a17160c230b170b1a180b231a0c150a150b0c180c180b1f0b0a180a18160c240b180b1e180b241a0a04170b0317010b04340c1607010c250a253c000c220a22370038000c1b0a2236000b163805381d0c20380a0c280b250d200d280b15340600000000000000000932000000000000000000000000000000003200000000000000000000000000000000381901010b280c260b200c290b260c210a2236000b2138010b1b0b02160c1c0b22370038000c1d0a1d0a1c2404d70105db010b1c0b1d17270b29380d02310104010030c8010b050407380e0c0f0c0e0c0d0511380f0c2a0c250c280b250b280b2a0c0f0c0e0c0d0b0d0b0e0b0f010c13350b13350c190c180b060421381a0c110c100528381b0c260c290b260b290c110c100b100b110c1e0c1d0a04320000000000000000000000000000000021047a0a190a0c180a0a1a0a1e160c140a180a1e180a141a0c120a1d0a19180a0c180a0a1a0b141a0c140a120a14180a0b180a091a0c2b0a120a14180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c270a270a2b23047205610a270c2b0a120a14180a0b180a091a0a271a0b271632020000000000000000000000000000001a0c27055c0b2b0b12170a0b180a091a0c040a040b0b180c160b180b09180a16160c220b160b19180b221a0b0c180c170b1e0b0a180a17160c230b170b1d180b231a0a04170b0317010b04340c1507010c240a243c000c210a21370038000c1a0a2136000b153805381d0c1f0b240b1f381c0c200a2136000b2038010b1a0b02160c1b0b21370038000c1c0a1c0a1b2404c30105c7010b1b0b1c172702320104010031e5010b05040638120c0f0c0e050d38130c220c2a0b220c0e0b2a0c0f0b0e350b0f350c150c140b06041938020c2c0c23052038030c280c2e0b280c230b2e0c2c0b230b2c0c1b0c1a0a0432000000000000000000000000000000002104720a150a0c180a0a1a0a1b160c100a140a1b180a101a0c0d0a1a0a15180a0c180a0a1a0b101a0c100a0d0a10180a0b180a091a0c2f0a0d0a10180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c250a250a2f23046a05590a250c2f0a0d0a10180a0b180a091a0a251a0b251632020000000000000000000000000000001a0c2505540b2f0b0d170a0b180a091a0c040a040b0b180c120b140b09180a12160c1f0b120b15180b1f1a0b0c180c130b1b0b0a180a13160c200b130b1a180b201a0c160a160a04170b0317010b04340c1107010c210a213c000c1e0a1e370038000c170a1e36000b113805060000000000000000381e0c1d380a0c260b0704b7010b1d0b160b26320000000000000000000000000000000038080c270c2d0c290c2b05c0010b2632000000000000000000000000000000000b1d0b1638070c2d0c270c2b0c290d290b2738010d2b0b2d38090b290c1c0b2b0c240a1e36000b1c38010b170b02160c180b1e370038000c190a190a182404db0105df010b180b1917270b213c0136010b24380902330104010032ce010b05040638120c110c10050d38130c240c280b240c100b280c110b10350b11350c180c1738040c12350b12350c1e0c1d0a0432000000000000000000000000000000002104680a180a0c180a0a1a0a1e160c130a170a1e180a131a0c0f0a1d0a18180a0c180a0a1a0b131a0c130a0f0a13180a0b180a091a0c290a0f0a13180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c250a250a29230460054f0a250c290a0f0a13180a0b180a091a0a251a0b251632020000000000000000000000000000001a0c25054a0b290b0f170a0b180a091a0c040a040b0b180c150b170b09180a15160c220b150b18180b221a0b0c180c160b1e0b0a180a16160c230b160b1d180b231a0c190a190a04170b0317010b04340c1407013c000c210a21370038000c1a0a2136000b143805060000000000000000381e0c20380a0c260b0704aa010b200600000000000000000b260b1934380b0c0d0c0e05b2010b260b19340b20060000000000000000380c0c0e0c0d0b0e0b0d0c1f0c270a2136000b1f38010b1a0b02160c1b0b21370038000c1c0a1c0a1b2404c70105cb010b1b0b1c17270b27380d0234010401002ec6010b05040638120c120c11050d38130c230c260b230c110b260c120b11350b12350c190c180b06041a380e0c0f0c0e0c0d0524380f0c280c240c270b240b270b280c0f0c0e0c0d0b0d0b0e0b0f010c13350b13350c1e0c1d0a04320000000000000000000000000000000021047c0a190a0c180a0a1a0a1e160c140a180a1e180a141a0c100a1d0a19180a0c180a0a1a0b141a0c140a100a14180a0b180a091a0c290a100a14180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c250a250a2923047405630a250c290a100a14180a0b180a091a0a251a0b251632020000000000000000000000000000001a0c25055e0b290b10170a0b180a091a0c040a040b0b180c160b180b09180a16160c210b160b19180b211a0b0c180c170b1e0b0a180a17160c220b170b1d180b221a0a04170b0317010b04340c1507013c000c200a20370038000c1a0a2036000b153805060000000000000000381e38100c1f0a2036000b1f38010b1a0b02160c1b0b20370038000c1c0a1c0a1b2404c10105c5010b1b0b1c172702350104010033d7010b05040638120c110c10050d38130c250c290b250c100b290c110b10350b11350c180c170b06041c3815353816350c0e0c0d05223817353818350c0e0c0d0b0d0b0e0c1d0c1c0a0432000000000000000000000000000000002104740a180a0c180a0a1a0a1d160c120a170a1d180a121a0c0f0a1c0a18180a0c180a0a1a0b121a0c120a0f0a12180a0b180a091a0c2a0a0f0a12180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c260a260a2a23046c055b0a260c2a0a0f0a12180a0b180a091a0a261a0b261632020000000000000000000000000000001a0c2605560b2a0b0f170a0b180a091a0c040a040b0b180c150b170b09180a15160c210b150b18180b211a0c130a130b0c180c160b1d0b0a180a16160c220b160b1c180b221a0a04170b0317010b04340c1407010c230a233c000c200a20370038000c190a2036000b143805060000000000000000381e0c1f380a0c270b230d1f0d270b13340600000000000000000932000000000000000000000000000000003200000000000000000000000000000000381901010b270c240b1f0c280b240c1e0a2036000b1e38010b190b02160c1a0b20370038000c1b0a1b0a1a2404d00105d4010b1a0b1b17270b28380d02360104010034c1010b05040638120c110c10050d38130c230c260b230c100b260c110b10350b11350c170c160b060419381a0c0e0c0d0520381b0c240c270b240b270c0e0c0d0b0d0b0e0c1c0c1b0a0432000000000000000000000000000000002104720a170a0c180a0a1a0a1c160c120a160a1c180a121a0c0f0a1b0a17180a0c180a0a1a0b121a0c120a0f0a12180a0b180a091a0c280a0f0a12180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c250a250a2823046a05590a250c280a0f0a12180a0b180a091a0a251a0b251632020000000000000000000000000000001a0c2505540b280b0f170a0b180a091a0c040a040b0b180c140b160b09180a14160c200b140b17180b201a0b0c180c150b1c0b0a180a15160c210b150b1b180b211a0a04170b0317010b04340c1307010c220a223c000c1f0a1f370038000c180a1f36000b133805060000000000000000381e0c1e0b220b1e381c0c1d0a1f36000b1d38010b180b02160c190b1f370038000c1a0a1a0a192404bc0105c0010b190b1a172702370104010035f9010b0504093815353816350c0e0c0d050f3817353818350c0e0c0d0b0d0b0e0c150c140b06041938020c2c0c24052038030c2a0c2f0b2a0c240b2f0c2c0b240b2c0c1b0c1a0a0432000000000000000000000000000000002104720a150a0c180a0a1a0a1b160c100a140a1b180a101a0c0f0a1a0a15180a0c180a0a1a0b101a0c100a0f0a10180a0b180a091a0c300a0f0a10180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c260a260a3023046a05590a260c300a0f0a10180a0b180a091a0a261a0b261632020000000000000000000000000000001a0c2605540b300b0f170a0b180a091a0c040a040b0b180c120b140b09180a12160c200b120b15180b201a320b000000000000000000000000000000170b0c180c130b1b0b0a180a13160c210b130b1a180b211a320b000000000000000000000000000000170c160a160a04170b0317010b04340c1107010c220a223c000c1f0a1f370038000c170a1f36000a1138050c1c38060c270a220d1c0d270b11340600000000000000000932000000000000000000000000000000003200000000000000000000000000000000381f01010b270c230b1c0c280b230c1e0b0704cb010b1e0b160b28320000000000000000000000000000000038080c290c2e0c2b0c2d05d4010b2832000000000000000000000000000000000b1e0b1638070c2e0c290c2d0c2b0d2b0b2938010d2d0b2e38090b2b0c1d0b2d0c250a1f36000b1d38010b170b02160c180b1f370038000c190a190a182404ef0105f3010b180b1917270b223c0136010b25380902380104010036e4010b0504093815353816350c0e0c0d050f3817353818350c0e0c0d0b0d0b0e0c180c1738040c12350b12350c1e0c1d0a0432000000000000000000000000000000002104680a180a0c180a0a1a0a1e160c130a170a1e180a131a0c110a1d0a18180a0c180a0a1a0b131a0c130a110a13180a0b180a091a0c2b0a110a13180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c270a270a2b230460054f0a270c2b0a110a13180a0b180a091a0a271a0b271632020000000000000000000000000000001a0c27054a0b2b0b11170a0b180a091a0c040a040b0b180c150b170b09180a15160c230b150b18180b231a320b000000000000000000000000000000170b0c180c160b1e0b0a180a16160c240b160b1d180b241a320b000000000000000000000000000000170c190a190a04170b0317010b04340c1407010c250a253c000c220a22370038000c1a0a2236000a1438050c1f38060c280b250d1f0d280b14340600000000000000000932000000000000000000000000000000003200000000000000000000000000000000381f01010b280c260b1f0c290b260c210b0704c0010b210600000000000000000b290b1934380b0c0f0c1005c8010b290b19340b21060000000000000000380c0c100c0f0b100b0f0c200c2a0a2236000b2038010b1a0b02160c1b0b22370038000c1c0a1c0a1b2404dd0105e1010b1b0b1c17270b2a380d02390104010037e0010b0504093815353816350c0e0c0d050f3817353818350c0e0c0d0b0d0b0e0c190c180b06041a380e0c110c100c0f0524380f0c2b0c260c2a0b260b2a0b2b0c110c100c0f0b0f0b100b11010c13350b13350c1e0c1d0a04320000000000000000000000000000000021047c0a190a0c180a0a1a0a1e160c140a180a1e180a141a0c120a1d0a19180a0c180a0a1a0b141a0c140a120a14180a0b180a091a0c2c0a120a14180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c290a290a2c23047405630a290c2c0a120a14180a0b180a091a0a291a0b291632020000000000000000000000000000001a0c29055e0b2c0b12170a0b180a091a0c040a040b0b180c160b180b09180a16160c220b160b19180b221a320b000000000000000000000000000000170b0c180c170b1e0b0a180a17160c230b170b1d180b231a320b000000000000000000000000000000170a04170b0317010b04340c1507010c240a243c000c210a21370038000c1a0a2136000a1538050c1f38060c270b240d1f0d270b15340600000000000000000932000000000000000000000000000000003200000000000000000000000000000000381f01010b270c250b1f0c280b2538100c200a2136000b2038010b1a0b02160c1b0b21370038000c1c0a1c0a1b2404d90105dd010b1b0b1c17270b283811023a0104010038d9010b0504093815353816350c0e0c0d050f3817353818350c0e0c0d0b0d0b0e0c170c160b06041938120c110c10052038130c240c280b240c100b280c110b10350b11350c1c0c1b0a0432000000000000000000000000000000002104740a170a0c180a0a1a0a1c160c120a160a1c180a121a0c0f0a1b0a17180a0c180a0a1a0b121a0c120a0f0a12180a0b180a091a0c290a0f0a12180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c250a250a2923046c055b0a250c290a0f0a12180a0b180a091a0a251a0b251632020000000000000000000000000000001a0c2505560b290b0f170a0b180a091a0c040a040b0b180c140b160b09180a14160c200b140b17180b201a320b000000000000000000000000000000170b0c180c150b1c0b0a180a15160c210b150b1b180b211a320b000000000000000000000000000000170a04170b0317010b04340c1307010c220a223c000c1f0a1f370038000c180a1f36000a1338050c1d38060c260b220d1d0d260b13340600000000000000000932000000000000000000000000000000003200000000000000000000000000000000381f01010b260c230b1d0c270b2306000000000000000038140c1e0a1f36000b1e38010b180b02160c190b1f370038000c1a0a1a0a192404d20105d6010b190b1a17270b273811023b0104010039d9010b0504093815353816350c0e0c0d050f3817353818350c0e0c0d0b0d0b0e0c170c160b060419381a0c100c0f0520381b0c250c290b250b290c100c0f0b0f0b100c1c0c1b0a0432000000000000000000000000000000002104720a170a0c180a0a1a0a1c160c120a160a1c180a121a0c110a1b0a17180a0c180a0a1a0b121a0c120a110a12180a0b180a091a0c2a0a110a12180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c270a270a2a23046a05590a270c2a0a110a12180a0b180a091a0a271a0b271632020000000000000000000000000000001a0c2705540b2a0b11170a0b180a091a0c040a040b0b180c140b160b09180a14160c210b140b17180b211a320b000000000000000000000000000000170b0c180c150b1c0b0a180a15160c220b150b1b180b221a320b000000000000000000000000000000170a04170b0317010b04340c1307010c230a233c000c200a20370038000c180a2036000a1338050c1d38060c280a230d1d0d280b13340600000000000000000932000000000000000000000000000000003200000000000000000000000000000000381f01010b280c240b1d0c260b240c1e0b230b1e381c0c1f0a2036000b1f38010b180b02160c190b20370038000c1a0a1a0a192404d20105d6010b190b1a17270b263811023c010401003ae5010b050406381a0c0e0c0d050d381b0c230c2b0b230b2b0c0e0c0d0b0d0b0e0c150c140b06041738020c2d0c26051e38030c290c2f0b290c260b2f0c2d0b260b2d0c1b0c1a0a0432000000000000000000000000000000002104700a150a0c180a0a1a0a1b160c100a140a1b180a101a0c0f0a1a0a15180a0c180a0a1a0b101a0c100a0f0a10180a0b180a091a0c300a0f0a10180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c270a270a3023046805570a270c300a0f0a10180a0b180a091a0a271a0b271632020000000000000000000000000000001a0c2705520b300b0f170a0b180a091a0c040a040b0b180c120b140b09180a12160c200b120b15180b201a0b0c180c130b1b0b0a180a13160c210b130b1a180b211a0c160a160a04170b0317010b04340c1107010c220a223c000c1f0a1f370038000c170a1f36000b1138050c1c0a220b1c38200c1e380a0c240b0704b7010b1e0b160b24320000000000000000000000000000000038080c280c2e0c2a0c2c05c0010b2432000000000000000000000000000000000b1e0b1638070c2e0c280c2c0c2a0d2a0b2838010d2c0b2e38090b2a0c1d0b2c0c250a1f36000b1d38010b170b02160c180b1f370038000c190a190a182404db0105df010b180b1917270b223c0136010b253809023d010401003bd0010b050406381a0c0e0c0d050d381b0c260c2a0b260b2a0c0e0c0d0b0d0b0e0c180c1738040c12350b12350c1e0c1d0a0432000000000000000000000000000000002104660a180a0c180a0a1a0a1e160c130a170a1e180a131a0c110a1d0a18180a0c180a0a1a0b131a0c130a110a13180a0b180a091a0c2b0a110a13180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c270a270a2b23045e054d0a270c2b0a110a13180a0b180a091a0a271a0b271632020000000000000000000000000000001a0c2705480b2b0b11170a0b180a091a0c040a040b0b180c150b170b09180a15160c230b150b18180b231a0b0c180c160b1e0b0a180a16160c240b160b1d180b241a0c190a190a04170b0317010b04340c1407010c250a253c000c220a22370038000c1a0a2236000b1438050c1f0b250b1f38200c21380a0c280b0704ac010b210600000000000000000b280b1934380b0c0f0c1005b4010b280b19340b21060000000000000000380c0c100c0f0b100b0f0c200c290a2236000b2038010b1a0b02160c1b0b22370038000c1c0a1c0a1b2404c90105cd010b1b0b1c17270b29380d023e010401003cc8010b050406381a0c0e0c0d050d381b0c250c280b250b280c0e0c0d0b0d0b0e0c190c180b060418380e0c110c100c0f0522380f0c2a0c260c290b260b290b2a0c110c100c0f0b0f0b100b11010c13350b13350c1e0c1d0a04320000000000000000000000000000000021047a0a190a0c180a0a1a0a1e160c140a180a1e180a141a0c120a1d0a19180a0c180a0a1a0b141a0c140a120a14180a0b180a091a0c2b0a120a14180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c270a270a2b23047205610a270c2b0a120a14180a0b180a091a0a271a0b271632020000000000000000000000000000001a0c27055c0b2b0b12170a0b180a091a0c040a040b0b180c160b180b09180a16160c220b160b19180b221a0b0c180c170b1e0b0a180a17160c230b170b1d180b231a0a04170b0317010b04340c1507010c240a243c000c210a21370038000c1a0a2136000b1538050c1f0b240b1f382038100c200a2136000b2038010b1a0b02160c1b0b21370038000c1c0a1c0a1b2404c30105c7010b1b0b1c1727023f010401003dc1010b050406381a0c0e0c0d050d381b0c230c260b230b260c0e0c0d0b0d0b0e0c170c160b06041738120c110c10051e38130c240c270b240c100b270c110b10350b11350c1c0c1b0a0432000000000000000000000000000000002104720a170a0c180a0a1a0a1c160c120a160a1c180a121a0c0f0a1b0a17180a0c180a0a1a0b121a0c120a0f0a12180a0b180a091a0c280a0f0a12180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c250a250a2823046a05590a250c280a0f0a12180a0b180a091a0a251a0b251632020000000000000000000000000000001a0c2505540b280b0f170a0b180a091a0c040a040b0b180c140b160b09180a14160c200b140b17180b201a0b0c180c150b1c0b0a180a15160c210b150b1b180b211a0a04170b0317010b04340c1307010c220a223c000c1f0a1f370038000c180a1f36000b1338050c1d0b220b1d382006000000000000000038140c1e0a1f36000b1e38010b180b02160c190b1f370038000c1a0a1a0a192404bc0105c0010b190b1a17270240010401003ed7010b050406381a0c0e0c0d050d381b0c260c2a0b260b2a0c0e0c0d0b0d0b0e0c180c170b06041a3815353816350c100c0f05203817353818350c100c0f0b0f0b100c1d0c1c0a0432000000000000000000000000000000002104720a180a0c180a0a1a0a1d160c120a170a1d180a121a0c110a1c0a18180a0c180a0a1a0b121a0c120a110a12180a0b180a091a0c2b0a110a12180a0b180a091a32020000000000000000000000000000001a3201000000000000000000000000000000160c290a290a2b23046a05590a290c2b0a110a12180a0b180a091a0a291a0b291632020000000000000000000000000000001a0c2905540b2b0b11170a0b180a091a0c040a040b0b180c150b170b09180a15160c220b150b18180b221a0c130a130b0c180c160b1d0b0a180a16160c230b160b1c180b231a0a04170b0317010b04340c1407010c240a243c000c210a21370038000c190a2136000b1438050c1e0a240b1e38200c20380a0c270b240d200d270b13340600000000000000000932000000000000000000000000000000003200000000000000000000000000000000381901010b270c250b200c280b250c1f0a2136000b1f38010b190b02160c1a0b21370038000c1b0a1b0a1a2404d00105d4010b1a0b1b17270b28380d02410300003f070b0139000c020b000b023f0002420104003f140a00116a0701210406050b0b0001060000000000000000116b270a000b01382139000c020b000b023f0002430104003f120a00116a0701210406050b0b0001060000000000000000116b27380a39000c010b000b013f000244010400010206ffffffffffffffff2745010400010206ffffffffffffffff27460104000102060000000000000000274701040100415b0b00116a0c030a030701210408050b060000000000000000116b270a033c000c070a0736000b0138050c0a0e0a38000c04116d0101010c0e38040c0d0c0c0b04350610270000000000000b0e1735180c050a050b0d35180c0b0b0c353210270000000000000000000000000000180b05160c090b0b0b091a340c060a060b0226043c05400b07010700273822044a0b0a06000000000000000038060b06380c0c080c0f055138060b060b0a060000000000000000380b0c0f0c080b0736000b0f38010b033c0136010b0838090248010400010206000000000000000027490104000102060000000000000000274a010401004493010b00116a0c040a040701210408050b060000000000000000116b270b03044f38020c140c1238230c0d0c0f0a01350a0d0b0f1735180c050b120b0d35180a05160c0b0b050b14180b0b1a0c070a070b023524042e05300700270a043c000c090a0936000b0138050b073806320000000000000000000000000000000038070c1c0c180c1a0c160d160b1838010d1a0b1c38090b0936000b1638010b043c0136010b1a380905920138020c130c1538230c0e0c100a01350a0e0b101735180c060b130b0e35180a06160c0c0b060b15180b0c1a0c080a080b023524047005720700270a043c010c0a0a0a36010b0138240c11380a32000000000000000000000000000000000b110b0838070c1d0c190c1b0c170d170b1938010d1b0b1d38090b0a36010b1b38090b043c0036000b173801024b010400010206ffffffffffffffff274c0104010045650b00116a0c0d0a0d0701210408050b060000000000000000116b270b08041138120c0b0c0a051838130c160c170b160c0a0b170c0b0b0a350b0b350c100c0f0b030b07180c0e0b0f0b06180a0e160c140b0e0b10180b141a340c0c0a0c0a0526043405380b050b0c17270a0d3c0036000b0438050c150b0904480b1506000000000000000038060b0c38250c130c18054f38060b0c0b1506000000000000000038260c180c130b180b130c1238110e1238270c110a110a0524045b055f0b050b1117270b0d3c0136010b123809024d0104010046650b00116a0c0d0a0d0701210408050b060000000000000000116b270b0804143815353816350c0b0c0a051a3817353818350c0b0c0a0b0a0b0b0c100c0f0b030b07180c0e0b0f0b06180a0e160c140b0e0b10180b141a340c0c0a0c0a0526043405380b050b0c17270a0d3c0036000a0438050c1238060c160a0d0d120d160b040600000000000000000932000000000000000000000000000000003200000000000000000000000000000000381f01010b160c150b120c170b150c130e1338270c110a110a05240459055d0b050b1117270b0d3c0136010b1338090b173811024e0104010047590b00116a0c0f0a0f0701210408050b060000000000000000116b270b080412380e0c0c0c0b0c0a051c380f0c180c160c170b160b170b180c0c0c0b0c0a0b0a0b0b0b0c010c0d350b0d350c120c110b030b07180c100b110b06180a10160c150b100b12180b151a340c0e0a0e0a0526043c05400b050b0e17270a0f3c0036000b043805381d0c140e1438270c130a130a0524044f05530b050b1317270b0f3c0136010b143809024f03000100030a0b000b0138210c0207013c0036000b02380102500004010026170a00116a0c020a020701210408050d0b0001060000000000000000116b270b000b0138210c030b023c0036000b033801025103000100260c07010c010a013c0036000b0038050c020b010b02382802520004010026150b00116a0c020a020701210408050b060000000000000000116b270a023c0036000b0138050c030b020b033828025303000100030a07013c0036000b0138050c020b000b02382802540004010026150b00116a0c030a030701210408050b060000000000000000116b270b033c0036000b0238050c040b010b043828025503000100010607013c0036000b003805025603000100010507013c0036003829025703000100491707013c000c030a03370038000c020a000b022404110b0336000b0038050c0105150b03360038290c010b01020000000f001700"; - let res = run_binary_test("sample_coin_store", code); - assert!(res.is_ok(), "{:?}", res) -} - -#[test] -fn sample_liquidity_pool() { - let code = "a11ceb0b050000000e0100240224ab0103cf01b6030485056405e905eb0507d40bde0d08b2196006921ab80110ca1bd8070aa223ef010b9125160ca725c9120df0372a0e9a38280000010101020103010401050106000700080009000a000b000c000d000e000f021002110012080300010001000100130003000100010001001406030001000100010015060300010001000100160803000100010001001706030001000100010018060300010001000100190800001a0603000100010001001b0603000100010001001c0603000100010001001d06030001000100010220040100010d210003000100010001033804010601024f05010001025105010001015b0600105e0700027305010001057407001185010700001e00010100001f01010300000000220203030000000023040503000000002401060300000000250107030000000026010403000000002701040300000000280107030000000029010403000000002a010403000000002b080100002c010903000000002d010903000000002e030203000000002f0a0b01000030050103000000003108010300000000320c010300000000330c010300000000340d010300000000350e030300000000360d0103000000085f010901000f6011120010611314000862010901001063151200106407120010651612000766010902000002671c0701000768011501000e691e0700026a1f200100022221010100036b230101060a6c010100046d0828000c6e0827000b2b0801000a2b0801000e6f0415000e7015070002712a010100022e2b2001000e722e070007750101010008760101010001773334000778013503000000022b36370100027938010100027a011401000e7b140700027c012001000b7d010701000b7e0107000931080103000000017f083a01060b80010128000b81010701000b82010701000983014101030000000684010107001186010444001187014415000e88010b150017101a101e1a01181f1b201b1f101f1d2210221d1618231b2422051808182c102c1d2d1b242c0f300030141824312f102f1d30303218331b341b17303510351d3710371d38303a183b393b2c3b223b3b3b313b3c3b3d3b3e2439243e243d3f18243b243c0603030404040400010b0c010b0d03090009010902020b0c0109000b0c010901020303030b0c0109000b0c0109010b010309000901090203040403010301060c010105030303030302040402060c0303070b04030900090109020303040b0c010900030b0c0109010307020208120812081204081201090004040304030108120206081206081201020104020812081201060b0403090009010902030900090109020b0103070b000309000901090204070b04030900090109020b0c01090003030b0c01090103030209000901010b0d0309000901090201060b0c0109000109010304040402070b0c01090003010b0c010900020b0c010900060b10010900010b050309000901090202070b0e01090009000601070b040309000901090203030b0c0109000b0c01090104030404060b040309000901090203060b0403090009010902030301081101050e0303070b0003090009010902030b0c010b0d0309000901090204070b04030900090109020303030303030302070b0c0109000b0c0109000203060b0f010900010b030309000901090206040404040404030303030b01070b0003090009010902070b04030900090109020303040303030403010902010b02030900090109020b0b00030900090109020b10010b0d030900090109020b13010b0d030900090109020b0f010b0d03090009010902081408140b04030900090109020c060807030301060811010c020814081405060c081408140201030b100109000b130109000b0f010900010b13010900010b0803090009010902010b0e010900010b0903090009010902010b0603090009010902010b0b03090009010902010b0a0309000901090202070b0003090009010902070b040309000901090208030303030b0c010900030b0c0109010303050b0c0109000b0c010901100103030303070b0e010b0903090009010902070b0003090009010902070b04030900090109020304030b0c0109000304030b0c01090108010103070b0003090009010902030404040108150e6c69717569646974795f706f6f6c076163636f756e7404636f696e056576656e74067369676e657206737472696e670974696d657374616d700b636f696e5f68656c706572066375727665730b64616f5f73746f7261676509656d657267656e63790d676c6f62616c5f636f6e6669670a6c705f6163636f756e74076c705f636f696e046d6174680c737461626c655f6375727665047532353607757136347836340b4576656e747353746f726509466c6173686c6f616e0e466c6173686c6f616e4576656e74134c697175696469747941646465644576656e740d4c6971756964697479506f6f6c154c697175696469747952656d6f7665644576656e74124f7261636c65557064617465644576656e7415506f6f6c4163636f756e744361706162696c69747910506f6f6c437265617465644576656e7409537761704576656e741155706461746544414f4665654576656e740e5570646174654665654576656e741c6173736572745f6c705f76616c75655f69735f696e63726561736564146173736572745f706f6f6c5f756e6c6f636b656404436f696e024c50046275726e09666c6173686c6f616e156765745f63756d756c61746976655f7072696365730b6765745f64616f5f666565136765745f64616f5f666565735f636f6e666967136765745f646563696d616c735f7363616c6573076765745f6665650f6765745f666565735f636f6e666967116765745f72657365727665735f73697a650a696e697469616c697a650e69735f706f6f6c5f6578697374730e69735f706f6f6c5f6c6f636b6564046d696e741e6e65775f72657365727665735f61667465725f666565735f7363616c65640d7061795f666c6173686c6f616e0872656769737465720b7365745f64616f5f666565077365745f6665651073706c69745f6665655f746f5f64616f04737761700d7570646174655f6f7261636c6513706f6f6c5f637265617465645f68616e646c650b4576656e7448616e646c65166c69717569646974795f61646465645f68616e646c65186c69717569646974795f72656d6f7665645f68616e646c650b737761705f68616e646c6510666c6173686c6f616e5f68616e646c65156f7261636c655f757064617465645f68616e646c65117570646174655f6665655f68616e646c65157570646174655f64616f5f6665655f68616e646c6506785f6c6f616e06795f6c6f616e04785f696e05785f6f757404795f696e05795f6f75740b61646465645f785f76616c0b61646465645f795f76616c126c705f746f6b656e735f72656365697665640e636f696e5f785f726573657276650e636f696e5f795f72657365727665146c6173745f626c6f636b5f74696d657374616d70176c6173745f70726963655f785f63756d756c6174697665176c6173745f70726963655f795f63756d756c61746976650b6c705f6d696e745f6361700e4d696e744361706162696c6974790b6c705f6275726e5f6361700e4275726e4361706162696c69747907785f7363616c6507795f7363616c65066c6f636b6564036665650764616f5f6665650e72657475726e65645f785f76616c0e72657475726e65645f795f76616c106c705f746f6b656e735f6275726e65640a7369676e65725f636170105369676e65724361706162696c6974790763726561746f72076e65775f66656504553235360969735f737461626c65086c705f76616c756507636f6d706172650f69735f756e636f7272656c617465640966726f6d5f753132380866726f6d5f753634036d756c0969735f736f727465640576616c756506737570706c790c6d756c5f6469765f7531323807657874726163740a656d69745f6576656e74136173736572745f6e6f5f656d657267656e63790a616464726573735f6f661372657472696576655f7369676e65725f6361700b6d756c5f746f5f753132380473717274056d65726765076d756c5f64697610467265657a654361706162696c69747906537472696e670e6173736572745f69735f636f696e126173736572745f76616c69645f63757276651d6372656174655f7369676e65725f776974685f6361706162696c6974791b67656e65726174655f6c705f6e616d655f616e645f73796d626f6c1264657374726f795f667265657a655f63617008646563696d616c7306706f775f3130047a65726f0f6765745f64656661756c745f666565136765745f64656661756c745f64616f5f666565106e65775f6576656e745f68616e646c650d6765745f6665655f61646d696e146173736572745f76616c69645f64616f5f666565106173736572745f76616c69645f666565076465706f7369740b6e6f775f7365636f6e64730755513634783634086672616374696f6e07746f5f753132380c6f766572666c6f775f61646449bcc662ad23bb4f134aad8c8117c03f238bf3f03f324afe91ce231a559e8a6b00000000000000000000000000000000000000000000000000000000000000014e9fce03284c0ce0b86c88dd5a46f050cad2f4f33c4cdd29d98f501868558c81030864000000000000000308680000000000000003086e0000000000000003086a000000000000000308690000000000000003087000000000000000030866000000000000000308670000000000000003086d0000000000000003086b000000000000000308650000000000000003086f0000000000000003086c00000000000000030810270000000000000308e803000000000000052049bcc662ad23bb4f134aad8c8117c03f238bf3f03f324afe91ce231a559e8a6b126170746f733a3a6d657461646174615f7630c3070d6400000000000000174552525f57524f4e475f504149525f4f52444552494e47335768656e20636f696e73207573656420746f20637265617465207061697220686176652077726f6e67206f72646572696e672e6500000000000000184552525f504f4f4c5f4558495354535f464f525f50414952245768656e207061697220616c726561647920657869737473206f6e206163636f756e742e6600000000000000204552525f4e4f545f454e4f5547485f494e495449414c5f4c4951554944495459215768656e206e6f7420656e6f756768206c6971756964697479206d696e7465642e6700000000000000184552525f4e4f545f454e4f5547485f4c4951554944495459215768656e206e6f7420656e6f756768206c6971756964697479206d696e7465642e6800000000000000114552525f454d5054595f434f494e5f494e335768656e20626f7468205820616e6420592070726f766964656420666f7220737761702061726520657175616c207a65726f2e6900000000000000124552525f494e434f52524543545f535741504b5768656e20696e636f727265637420494e732f4f55547320617267756d656e74732070617373656420647572696e67207377617020616e64206d61746820646f65736e277420776f726b2e6a00000000000000194552525f494e434f52524543545f4255524e5f56414c5545531d496e636f7272656374206c7020636f696e206275726e2076616c7565736b00000000000000174552525f504f4f4c5f444f45535f4e4f545f4558495354225768656e20706f6f6c20646f65736e27742065786973747320666f7220706169722e6c000000000000000f4552525f554e524541434841424c451353686f756c64206e65766572206f636375722e6d00000000000000284552525f4e4f545f454e4f5547485f5045524d495353494f4e535f544f5f494e495449414c495a45525768656e2060696e697469616c697a65282960207472616e73616374696f6e206973207369676e6564207769746820616e79206163636f756e74206f74686572207468616e20406c6971756964737761702e6e00000000000000134552525f454d5054595f434f494e5f4c4f414e385768656e20626f7468205820616e6420592070726f766964656420666f7220666c6173686c6f616e2061726520657175616c207a65726f2e6f00000000000000124552525f504f4f4c5f49535f4c4f434b4544145768656e20706f6f6c206973206c6f636b65642e70000000000000000d4552525f4e4f545f41444d494e165768656e2075736572206973206e6f742061646d696e000208370b0e010b0803090009010902390b0e010b03030900090109023a0b0e010b05030900090109023b0b0e010b09030900090109023c0b0e010b02030900090109023d0b0e010b06030900090109023e0b0e010b0b030900090109023f0b0e010b0a0309000901090201020240034103020204420343034403450303020346034703480304020c490b0c0109004a0b0c0109014b034c044d044e0b0f010b0d03090009010902500b10010b0d03090009010902520353035401550356030502035703580359030602024c044d040702015a08110802015c0509020442034303440345030a02015d030b02015d0304180018051801180318021808180a180b1809180618000000000f3c38000303051a0b020a000b030a0111180c0a0b040b000b050b0111180c080e080e0a11190c060b063102210319070427053b3801031d05390b020b03180c0b0b0b111b070d070d18111c111d0c0c0b04111b0b05111b111d0c090e090e0c11190c070b07310221033b070427070c27020100000104170c070f3d000c000b003700140921030b070b2702020100020004195938020304070027070f3b00030907092738030e0038040c02070f3c000c0538050c040a05370138060c070a05370238070c0a0a02350a07350a0411210c080a02350a0a350b0411210c0b0a0806000000000000000024032d05320a0b060000000000000000240c010534090c010b01033a0b05010703270a0536010a0838080c060a0536020a0b38090c090a050b070b0a380a0b000b053703380b070f3c010c030b0336040b080b0b0b023902380c0b060b0902030100020004243e112538020305070027070f3b00030a07092738030a000600000000000000002403100513080c0205170a01060000000000000000240c020b02031b070227070f3c000c030a03370138060c040a03370238070c050a0336010a0038080c060a0336020a0138090c07080a033600150b030b040b05380a0b060b070b000b013903020401000104251e112538020305070027070f3b00030a0709273803070f3d000c030a033705140c010a033706140c020b033707140c000b010b020b00020501000104171038020304070027070f3b000309070927070f3d000c000b003708140206010001040103380d0700020701000104171338020304070027070f3b000309070927070f3d000c000a003709140b00370a14020801000104171038020304070027070f3b000309070927070f3d000c000b00370b140209010001040103380e070d020a010001042619112538020305070027070f3b00030a0709273803070f3d000c000a00370138060c010b00370238070c020b010b02020b01040027150a001126070f2103090b00010708270a0011270c010a000b0112072d070a0011280b001129020c010000010738020304070027070f3b00020d01000104171038020304070027070f3b000309070927070f3d000c000b00370014020e01000200042976112538020305070027070f3b00030a070927380338050c07070f3c000c080a08370138060c0c0a08370238070c0f0e0038060c0b0e0138070c0e0a07320000000000000000000000000000000021032305350a0b0a0e112a112b0c050a05070e2403300b08010706270b05070e170c03054f0a0b350a070a0c3511210c0a0a0e350b070a0f3511210c0d0a0a0a0d230348054b0b0a0c02054d0b0d0c020b020c030b030c090a090600000000000000002403590b08010707270a0836010b00380f0a0836020b0138100a090a08370c38110c060b080b0c0b0f380a070f3c010c040b04360d0b0b0b0e0b09390438120b06020f0000002d3b38010303050c0b00070d112a0b020a04112a170c06051a38000310070c270b000b020a04070d112e17350c050b050c060b060c093801031f05280b01070d112a0b030b04112a170c0805363800032c070c270b010b030b04070d112e17350c070b070c080b080c0a0b090b0a021001000200042f6e112538020305070027070f3b00030a0709270b023a030c0b0c070e0038060c060e0138070c0a0a06060000000000000000240319051c080c0305200a0a060000000000000000240c030b030324070127070f3c000c050a05370138060c090a05370238070c0d0b090a07160c090b0d0a0b160c0d0a0536010b00380f0a0536020b0138100a05370138060a05370238070a060a0a0a05370b1438130c0c0c080a053709140a05370a140b09350b0d350b080b0c38140a050a060a0a3815090b05360015070f3c010c040b04360e0b060b070b0a0b0b390538160211010001073263112538173818380203090b00010700273819070f3b002003120b0001070a27070f2b070c090b09100f11310c08381a0c060c050e080b050b06310608381b0c040c030c020b03381c0600000000000000000c0a0600000000000000000c0b381d032e0534381e11360c0a381f11360c0b38203821060000000000000000320000000000000000000000000000000032000000000000000000000000000000000b040b020b0a0b0b093822113939000c070e080b073f000e0838230e0838240e0838250e0838260e0838270e0838280e0838290e08382a0e08382b39010c010d01360f0b0011263906382c0e080b013f01021201040200043f27380203060b0001070027070f3b00030d0b000107092738030b001126113c2103150705270a01113d070f3c000c030a010b03360815070f3c010c020b0236100b013907382d021301040200043f27380203060b0001070027070f3b00030d0b000107092738030b001126113c2103150705270a01113e070f3c000c030a010b03360b15070f3c010c020b0236110b013908382e0214000000403b0a00370b140c0a0a003708140c040a0a0a0418070019060000000000000000220311051a0b0a0b041807001a060100000000000000160c0305200b0a0b041807001a0c030b030c050b010a05070d112e0c060b020b05070d112e0c080a0036010b0638080c070b0036020b0838090c09070f0b070b09382f02150100020004427b112538020305070027070f3b00030a07092738030e0038060c0c0e0238070c100a0c0600000000000000002403160519080c04051d0a10060000000000000000240c040b040321070127070f3c000c0b0a0b370138060c0e0a0b370238070c120a0b36010b00380f0a0b36020b0238100a0b36010a0138080c0f0a0b36020a0338090c130a0b370138060a0b370238070a0c0a100a0b370b1438130c110c0d0a0b3709140a0b370a140a0e350a12350b0d350b113538140a0b0a0c0a1038150b0b0b0e0b12380a070f3c010c0a0b0a36120c090b0c0c050b100c060b010c070b030c080b090b050b070b060b08390938300b0f0b1302160000010043540a003707140c0711400c050a050b0717350c0a0a0a320000000000000000000000000000000024031005150a01060000000000000000220c030517090c030b03031a051f0a02060000000000000000220c040521090c040b040324054f0a020a01114111420a0a180c080b010b02114111420b0a180c090a003705140b0811430a003605150a003706140b0911430a00360615070f3c010c060b0636130a003705140a00370614390a38310b050b003607150204090400040104060002040304040402040b04070408040a04050001000407000000000700060003000500180118021803180418051806180718081809180a180b180c180d180e181018111812181318141800"; - let res = run_binary_test("sample_liquidity_pool", code); - assert!(res.is_ok(), "{:?}", res) -} diff --git a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/bounds_tests.proptest-regressions b/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/bounds_tests.proptest-regressions deleted file mode 100644 index 3945bd370c9..00000000000 --- a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/bounds_tests.proptest-regressions +++ /dev/null @@ -1,10 +0,0 @@ -# Seeds for failure cases proptest has generated in the past. It is -# automatically read and these particular cases re-run before any -# novel cases are generated. -# -# It is recommended to check this file in to source control so that -# everyone who runs the test benefits from these saved cases. -cc 2beb0a0e65962432af560e626fa109d269b07db8807968413425f0bb14bb3667 # shrinks to module = CompiledModule: { datatype_handles: [ DatatypeHandle { module: ModuleHandleIndex(0), name: IdentifierIndex(0), is_resource: false }, DatatypeHandle { module: ModuleHandleIndex(0), name: IdentifierIndex(0), is_resource: false },] function_handles: [ FunctionHandle { module: ModuleHandleIndex(0), name: IdentifierIndex(0), signature: FunctionSignatureIndex(0) }, FunctionHandle { module: ModuleHandleIndex(0), name: IdentifierIndex(0), signature: FunctionSignatureIndex(1) },] struct_defs: [ StructDefinition { struct_handle: 1, access: 0x4, field_count: 0, fields: 0 },] field_defs: [] function_defs: [ FunctionDefinition { function: 1, access: 0x2, code: CodeUnit { max_stack_size: 0, locals: 0 code: [] } },] type_signatures: [ TypeSignature(Unit),] function_signatures: [ FunctionSignature { return_type: Unit, arg_types: [] }, FunctionSignature { return_type: Unit, arg_types: [] },] locals_signatures: [ LocalsSignature([]),] string_pool: [ "",] address_pool: [ Address([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, 0]),] } -cc c14ae393a6eefae82c0f4ede2acaa0aa0e993c1bba3fe3e5958e6e31cb5d2957 # shrinks to module = CompiledModule: { module_handles: [ ModuleHandle { address: AddressPoolIndex(0), name: IdentifierIndex(0) },] datatype_handles: [ DatatypeHandle { module: ModuleHandleIndex(0), name: IdentifierIndex(0), is_resource: false }, DatatypeHandle { module: ModuleHandleIndex(0), name: IdentifierIndex(0), is_resource: false },] function_handles: [ FunctionHandle { module: ModuleHandleIndex(0), name: IdentifierIndex(0), signature: FunctionSignatureIndex(0) }, FunctionHandle { module: ModuleHandleIndex(0), name: IdentifierIndex(0), signature: FunctionSignatureIndex(1) },] struct_defs: [ StructDefinition { struct_handle: 1, access: 0x4, field_count: 0, fields: 0 },] field_defs: [] function_defs: [ FunctionDefinition { function: 1, access: 0x2, code: CodeUnit { max_stack_size: 0, locals: 0 code: [] } },] type_signatures: [ TypeSignature(Unit),] function_signatures: [ FunctionSignature { return_type: Unit, arg_types: [] }, FunctionSignature { return_type: Unit, arg_types: [] },] locals_signatures: [ LocalsSignature([]),] string_pool: [ "",] address_pool: [ Address([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, 0]),] } , oob_mutations = [] -cc 88615e15ef42d29405cd91d6d0a573ccbeb833d0c7471f718ee794bc5ba399ca # shrinks to module = CompiledModule: { module_handles: [ ModuleHandle { address: AddressPoolIndex(0), name: IdentifierIndex(0) },] datatype_handles: [ DatatypeHandle { module: ModuleHandleIndex(0), name: IdentifierIndex(0), is_resource: false }, DatatypeHandle { module: ModuleHandleIndex(0), name: IdentifierIndex(0), is_resource: false }, DatatypeHandle { module: ModuleHandleIndex(0), name: IdentifierIndex(0), is_resource: false },] function_handles: [ FunctionHandle { module: ModuleHandleIndex(0), name: IdentifierIndex(0), signature: FunctionSignatureIndex(0) }, FunctionHandle { module: ModuleHandleIndex(0), name: IdentifierIndex(0), signature: FunctionSignatureIndex(1) },] struct_defs: [ StructDefinition { struct_handle: 1, access: 0x4, field_count: 0, fields: 0 }, StructDefinition { struct_handle: 2, access: 0x4, field_count: 0, fields: 0 },] field_defs: [] function_defs: [ FunctionDefinition { function: 1, access: 0x2, code: CodeUnit { max_stack_size: 0, locals: 0 code: [] } },] type_signatures: [ TypeSignature(Unit),] function_signatures: [ FunctionSignature { return_type: Unit, arg_types: [] }, FunctionSignature { return_type: Unit, arg_types: [] },] locals_signatures: [ LocalsSignature([]),] string_pool: [ "",] address_pool: [ Address([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, 0]),] } , oob_mutations = [OutOfBoundsMutation { src_kind: StructDefinition, src_idx: Index(0), dst_kind: FieldDefinition, offset: 0 }] -cc a34039f5d57751762a6eacf3ca3a2857781fb0bd0af0b7a06a9427f896f29aa9 # shrinks to module = CompiledModule: { module_handles: [ ModuleHandle { address: AddressPoolIndex(0), name: IdentifierIndex(0) },] datatype_handles: [ DatatypeHandle { module: ModuleHandleIndex(0), name: IdentifierIndex(0), is_resource: false }, DatatypeHandle { module: ModuleHandleIndex(0), name: IdentifierIndex(0), is_resource: false },] function_handles: [ FunctionHandle { module: ModuleHandleIndex(0), name: IdentifierIndex(0), signature: FunctionSignatureIndex(0) }, FunctionHandle { module: ModuleHandleIndex(0), name: IdentifierIndex(0), signature: FunctionSignatureIndex(1) },] struct_defs: [ StructDefinition { struct_handle: 1, access: 0x2, field_count: 0, fields: 0 },] field_defs: [] function_defs: [ FunctionDefinition { function: 1, access: 0x0, code: CodeUnit { max_stack_size: 0, locals: 0 code: [ BrTrue(1),] } },] type_signatures: [ TypeSignature(Unit), TypeSignature(Unit),] function_signatures: [ FunctionSignature { return_type: Unit, arg_types: [] }, FunctionSignature { return_type: Unit, arg_types: [] },] locals_signatures: [ LocalsSignature([]),] string_pool: [ "",] address_pool: [ Address([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, 0]),] } , oob_mutations = [] diff --git a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/bounds_tests.rs b/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/bounds_tests.rs deleted file mode 100644 index bdd3dd765f3..00000000000 --- a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/bounds_tests.rs +++ /dev/null @@ -1,363 +0,0 @@ -// Copyright (c) The Diem Core Contributors -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use move_binary_format::{check_bounds::BoundsChecker, file_format::*, file_format_common}; -use move_core_types::vm_status::StatusCode; - -#[test] -fn empty_module_no_errors() { - BoundsChecker::verify_module(&basic_test_module()).unwrap(); -} - -#[test] -fn invalid_default_module() { - BoundsChecker::verify_module(&CompiledModule { - version: file_format_common::VERSION_MAX, - ..Default::default() - }) - .unwrap_err(); -} - -#[test] -fn invalid_self_module_handle_index() { - let mut m = basic_test_module(); - m.self_module_handle_idx = ModuleHandleIndex(12); - assert_eq!( - BoundsChecker::verify_module(&m).unwrap_err().major_status(), - StatusCode::INDEX_OUT_OF_BOUNDS - ); -} - -#[test] -fn invalid_type_param_in_fn_return_() { - use SignatureToken::*; - - let mut m = basic_test_module(); - m.function_handles[0].return_ = SignatureIndex(1); - m.signatures.push(Signature(vec![TypeParameter(0)])); - assert_eq!(m.signatures.len(), 2); - assert_eq!( - BoundsChecker::verify_module(&m).unwrap_err().major_status(), - StatusCode::INDEX_OUT_OF_BOUNDS - ); -} - -#[test] -fn invalid_type_param_in_fn_parameters() { - use SignatureToken::*; - - let mut m = basic_test_module(); - m.function_handles[0].parameters = SignatureIndex(1); - m.signatures.push(Signature(vec![TypeParameter(0)])); - assert_eq!( - BoundsChecker::verify_module(&m).unwrap_err().major_status(), - StatusCode::INDEX_OUT_OF_BOUNDS - ); -} - -#[test] -fn invalid_struct_in_fn_return_() { - use SignatureToken::*; - - let mut m = basic_test_module(); - m.function_handles[0].return_ = SignatureIndex(1); - m.signatures - .push(Signature(vec![Datatype(DatatypeHandleIndex::new(1))])); - assert_eq!( - BoundsChecker::verify_module(&m).unwrap_err().major_status(), - StatusCode::INDEX_OUT_OF_BOUNDS - ); -} - -#[test] -fn invalid_type_param_in_field() { - use SignatureToken::*; - - let mut m = basic_test_module(); - match &mut m.struct_defs[0].field_information { - StructFieldInformation::Declared(ref mut fields) => { - fields[0].signature.0 = TypeParameter(0); - assert_eq!( - BoundsChecker::verify_module(&m).unwrap_err().major_status(), - StatusCode::INDEX_OUT_OF_BOUNDS - ); - } - _ => panic!("attempt to change a field that does not exist"), - } -} - -#[test] -fn invalid_struct_in_field() { - use SignatureToken::*; - - let mut m = basic_test_module(); - match &mut m.struct_defs[0].field_information { - StructFieldInformation::Declared(ref mut fields) => { - fields[0].signature.0 = Datatype(DatatypeHandleIndex::new(3)); - assert_eq!( - BoundsChecker::verify_module(&m).unwrap_err().major_status(), - StatusCode::INDEX_OUT_OF_BOUNDS - ); - } - _ => panic!("attempt to change a field that does not exist"), - } -} - -#[test] -fn invalid_struct_with_actuals_in_field() { - use SignatureToken::*; - - let mut m = basic_test_module(); - match &mut m.struct_defs[0].field_information { - StructFieldInformation::Declared(ref mut fields) => { - fields[0].signature.0 = DatatypeInstantiation(Box::new(( - DatatypeHandleIndex::new(0), - vec![TypeParameter(0)], - ))); - assert_eq!( - BoundsChecker::verify_module(&m).unwrap_err().major_status(), - StatusCode::NUMBER_OF_TYPE_ARGUMENTS_MISMATCH - ); - } - _ => panic!("attempt to change a field that does not exist"), - } -} - -#[test] -fn invalid_locals_id_in_call() { - use Bytecode::*; - - let mut m = basic_test_module(); - m.function_instantiations.push(FunctionInstantiation { - handle: FunctionHandleIndex::new(0), - type_parameters: SignatureIndex::new(1), - }); - let func_inst_idx = FunctionInstantiationIndex(m.function_instantiations.len() as u16 - 1); - m.function_defs[0].code.as_mut().unwrap().code = vec![CallGeneric(func_inst_idx)]; - assert_eq!( - BoundsChecker::verify_module(&m).unwrap_err().major_status(), - StatusCode::INDEX_OUT_OF_BOUNDS - ); -} - -#[test] -fn invalid_type_param_in_call() { - use Bytecode::*; - use SignatureToken::*; - - let mut m = basic_test_module(); - m.signatures.push(Signature(vec![TypeParameter(0)])); - m.function_instantiations.push(FunctionInstantiation { - handle: FunctionHandleIndex::new(0), - type_parameters: SignatureIndex::new(1), - }); - let func_inst_idx = FunctionInstantiationIndex(m.function_instantiations.len() as u16 - 1); - m.function_defs[0].code.as_mut().unwrap().code = vec![CallGeneric(func_inst_idx)]; - assert_eq!( - BoundsChecker::verify_module(&m).unwrap_err().major_status(), - StatusCode::INDEX_OUT_OF_BOUNDS - ); -} - -#[test] -fn invalid_struct_as_type_actual_in_exists() { - use Bytecode::*; - use SignatureToken::*; - - let mut m = basic_test_module(); - m.signatures - .push(Signature(vec![Datatype(DatatypeHandleIndex::new(3))])); - m.function_instantiations.push(FunctionInstantiation { - handle: FunctionHandleIndex::new(0), - type_parameters: SignatureIndex::new(1), - }); - let func_inst_idx = FunctionInstantiationIndex(m.function_instantiations.len() as u16 - 1); - m.function_defs[0].code.as_mut().unwrap().code = vec![CallGeneric(func_inst_idx)]; - assert_eq!( - BoundsChecker::verify_module(&m).unwrap_err().major_status(), - StatusCode::INDEX_OUT_OF_BOUNDS - ); -} - -#[test] -fn invalid_friend_module_address() { - let mut m = basic_test_module(); - m.friend_decls.push(ModuleHandle { - address: AddressIdentifierIndex::new(m.address_identifiers.len() as TableIndex), - name: IdentifierIndex::new(0), - }); - assert_eq!( - BoundsChecker::verify_module(&m).unwrap_err().major_status(), - StatusCode::INDEX_OUT_OF_BOUNDS - ); -} - -#[test] -fn invalid_friend_module_name() { - let mut m = basic_test_module(); - m.friend_decls.push(ModuleHandle { - address: AddressIdentifierIndex::new(0), - name: IdentifierIndex::new(m.identifiers.len() as TableIndex), - }); - assert_eq!( - BoundsChecker::verify_module(&m).unwrap_err().major_status(), - StatusCode::INDEX_OUT_OF_BOUNDS - ); -} - -#[test] -fn invalid_signature_for_vector_operation() { - use Bytecode::*; - - let skeleton = basic_test_module(); - let sig_index = SignatureIndex(skeleton.signatures.len() as u16); - for bytecode in [ - VecPack(sig_index, 0), - VecLen(sig_index), - VecImmBorrow(sig_index), - VecMutBorrow(sig_index), - VecPushBack(sig_index), - VecPopBack(sig_index), - VecUnpack(sig_index, 0), - VecSwap(sig_index), - ] { - let mut m = skeleton.clone(); - m.function_defs[0].code.as_mut().unwrap().code = vec![bytecode]; - assert_eq!( - BoundsChecker::verify_module(&m).unwrap_err().major_status(), - StatusCode::INDEX_OUT_OF_BOUNDS - ); - } -} - -#[test] -fn invalid_struct_for_vector_operation() { - use Bytecode::*; - use SignatureToken::*; - - let mut skeleton = basic_test_module(); - skeleton - .signatures - .push(Signature(vec![Datatype(DatatypeHandleIndex::new(3))])); - let sig_index = SignatureIndex((skeleton.signatures.len() - 1) as u16); - for bytecode in [ - VecPack(sig_index, 0), - VecLen(sig_index), - VecImmBorrow(sig_index), - VecMutBorrow(sig_index), - VecPushBack(sig_index), - VecPopBack(sig_index), - VecUnpack(sig_index, 0), - VecSwap(sig_index), - ] { - let mut m = skeleton.clone(); - m.function_defs[0].code.as_mut().unwrap().code = vec![bytecode]; - assert_eq!( - BoundsChecker::verify_module(&m).unwrap_err().major_status(), - StatusCode::INDEX_OUT_OF_BOUNDS - ); - } -} - -#[test] -fn invalid_type_param_for_vector_operation() { - use Bytecode::*; - use SignatureToken::*; - - let mut skeleton = basic_test_module(); - skeleton.signatures.push(Signature(vec![TypeParameter(0)])); - let sig_index = SignatureIndex((skeleton.signatures.len() - 1) as u16); - for bytecode in [ - VecPack(sig_index, 0), - VecLen(sig_index), - VecImmBorrow(sig_index), - VecMutBorrow(sig_index), - VecPushBack(sig_index), - VecPopBack(sig_index), - VecUnpack(sig_index, 0), - VecSwap(sig_index), - ] { - let mut m = skeleton.clone(); - m.function_defs[0].code.as_mut().unwrap().code = vec![bytecode]; - assert_eq!( - BoundsChecker::verify_module(&m).unwrap_err().major_status(), - StatusCode::INDEX_OUT_OF_BOUNDS - ); - } -} - -#[test] -fn invalid_variant_handle_index_for_enum_operation() { - use Bytecode::*; - - let skeleton = basic_test_module(); - let variant_handle_index = VariantHandleIndex(skeleton.variant_handles.len() as u16); - let variant_handle_inst_index = - VariantInstantiationHandleIndex(skeleton.variant_instantiation_handles.len() as u16); - for bytecode in [ - PackVariant(variant_handle_index), - UnpackVariant(variant_handle_index), - UnpackVariantImmRef(variant_handle_index), - UnpackVariantMutRef(variant_handle_index), - PackVariantGeneric(variant_handle_inst_index), - UnpackVariantGeneric(variant_handle_inst_index), - UnpackVariantGenericImmRef(variant_handle_inst_index), - UnpackVariantGenericMutRef(variant_handle_inst_index), - ] { - let mut m = skeleton.clone(); - m.function_defs[0].code.as_mut().unwrap().code = vec![bytecode]; - assert_eq!( - BoundsChecker::verify_module(&m).unwrap_err().major_status(), - StatusCode::INDEX_OUT_OF_BOUNDS - ); - } -} - -#[test] -fn invalid_variant_jump_table_index() { - use Bytecode::*; - - let skeleton = basic_test_module(); - let jt_index = VariantJumpTableIndex( - skeleton.function_defs[0] - .code - .as_ref() - .map(|c| c.jump_tables.len() as u16) - .unwrap_or(0u16), - ); - let mut m = skeleton.clone(); - m.function_defs[0].code.as_mut().unwrap().code = vec![VariantSwitch(jt_index)]; - assert_eq!( - BoundsChecker::verify_module(&m).unwrap_err().major_status(), - StatusCode::INDEX_OUT_OF_BOUNDS - ); -} - -#[test] -fn invalid_variant_jump_table_code_offset() { - use Bytecode::*; - - let mut skeleton = basic_test_module_with_enum(); - let enum_index = EnumDefinitionIndex(0); - skeleton.function_defs[0].code.as_mut().unwrap().code = vec![LdU64(0), Pop, Ret]; - skeleton.function_defs[0].code.as_mut().unwrap().jump_tables = vec![VariantJumpTable { - head_enum: enum_index, - jump_table: JumpTableInner::Full(vec![100]), - }]; - - let jt_index = VariantJumpTableIndex( - skeleton.function_defs[0] - .code - .as_ref() - .map(|c| c.jump_tables.len() as u16) - .unwrap_or(0u16), - ); - let mut m = skeleton.clone(); - m.function_defs[0].code.as_mut().unwrap().code = vec![VariantSwitch(jt_index)]; - assert_eq!( - BoundsChecker::verify_module(&m).unwrap_err().major_status(), - StatusCode::INDEX_OUT_OF_BOUNDS - ); -} diff --git a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/catch_unwind.rs b/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/catch_unwind.rs deleted file mode 100644 index 6b9fc629db0..00000000000 --- a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/catch_unwind.rs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::panic::{self, PanicInfo}; - -use fail::FailScenario; -use move_binary_format::file_format::empty_module; -use move_core_types::{ - state::{self, VMState}, - vm_status::StatusCode, -}; -use move_vm_config::verifier::VerifierConfig; - -#[ignore] -#[test] -fn test_unwind() { - let scenario = FailScenario::setup(); - fail::cfg("verifier-failpoint-panic", "panic").unwrap(); - - panic::set_hook(Box::new(move |_: &PanicInfo<'_>| { - assert_eq!(state::get_state(), VMState::VERIFIER); - })); - - let m = empty_module(); - let res = move_bytecode_verifier::verify_module_with_config(&VerifierConfig::unbounded(), &m) - .unwrap_err(); - assert_eq!(res.major_status(), StatusCode::VERIFIER_INVARIANT_VIOLATION); - scenario.teardown(); -} diff --git a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/code_unit_tests.rs b/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/code_unit_tests.rs deleted file mode 100644 index b380560a91a..00000000000 --- a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/code_unit_tests.rs +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) The Diem Core Contributors -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use move_binary_format::file_format::Bytecode; -use move_bytecode_verifier::{ability_cache::AbilityCache, code_unit_verifier}; -use move_bytecode_verifier_meter::dummy::DummyMeter; -use move_core_types::vm_status::StatusCode; -use move_vm_config::verifier::VerifierConfig; - -use crate::support::dummy_procedure_module; - -#[test] -fn invalid_fallthrough_br_true() { - let module = &dummy_procedure_module(vec![Bytecode::LdFalse, Bytecode::BrTrue(1)]); - let ability_cache = &mut AbilityCache::new(module); - let result = code_unit_verifier::verify_module( - &Default::default(), - module, - ability_cache, - &mut DummyMeter, - ); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::INVALID_FALL_THROUGH - ); -} - -#[test] -fn invalid_fallthrough_br_false() { - let module = &dummy_procedure_module(vec![Bytecode::LdTrue, Bytecode::BrFalse(1)]); - let ability_cache = &mut AbilityCache::new(module); - let result = code_unit_verifier::verify_module( - &Default::default(), - module, - ability_cache, - &mut DummyMeter, - ); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::INVALID_FALL_THROUGH - ); -} - -// all non-branch instructions should trigger invalid fallthrough; just check -// one of them -#[test] -fn invalid_fallthrough_non_branch() { - let module = &dummy_procedure_module(vec![Bytecode::LdTrue, Bytecode::Pop]); - let ability_cache = &mut AbilityCache::new(module); - let result = code_unit_verifier::verify_module( - &Default::default(), - module, - ability_cache, - &mut DummyMeter, - ); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::INVALID_FALL_THROUGH - ); -} - -#[test] -fn valid_fallthrough_branch() { - let module = &dummy_procedure_module(vec![Bytecode::Branch(0)]); - let ability_cache = &mut AbilityCache::new(module); - let result = code_unit_verifier::verify_module( - &Default::default(), - module, - ability_cache, - &mut DummyMeter, - ); - assert!(result.is_ok()); -} - -#[test] -fn valid_fallthrough_ret() { - let module = &dummy_procedure_module(vec![Bytecode::Ret]); - let ability_cache = &mut AbilityCache::new(module); - let result = code_unit_verifier::verify_module( - &Default::default(), - module, - ability_cache, - &mut DummyMeter, - ); - assert!(result.is_ok()); -} - -#[test] -fn valid_fallthrough_abort() { - let module = &dummy_procedure_module(vec![Bytecode::LdU64(7), Bytecode::Abort]); - let ability_cache = &mut AbilityCache::new(module); - let result = code_unit_verifier::verify_module( - &Default::default(), - module, - ability_cache, - &mut DummyMeter, - ); - assert!(result.is_ok()); -} - -#[test] -fn test_max_number_of_bytecode() { - let mut nops = vec![]; - for _ in 0..u16::MAX - 1 { - nops.push(Bytecode::Nop); - } - nops.push(Bytecode::Ret); - let module = &dummy_procedure_module(nops); - let ability_cache = &mut AbilityCache::new(module); - - let result = code_unit_verifier::verify_module( - &VerifierConfig::default(), - module, - ability_cache, - &mut DummyMeter, - ); - assert!(result.is_ok()); -} - -#[test] -fn test_max_basic_blocks() { - let mut code = (0..17) - .map(|idx| Bytecode::Branch(idx + 1)) - .collect::>(); - code.push(Bytecode::Ret); - let module = &dummy_procedure_module(code); - let ability_cache = &mut AbilityCache::new(module); - - let result = code_unit_verifier::verify_module( - &VerifierConfig { - max_basic_blocks: Some(16), - ..Default::default() - }, - module, - ability_cache, - &mut DummyMeter, - ); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::TOO_MANY_BASIC_BLOCKS - ); -} diff --git a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/constants_tests.rs b/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/constants_tests.rs deleted file mode 100644 index 1dc747b5af0..00000000000 --- a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/constants_tests.rs +++ /dev/null @@ -1,264 +0,0 @@ -// Copyright (c) The Diem Core Contributors -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use move_binary_format::file_format::{Constant, SignatureToken, empty_module}; -use move_bytecode_verifier::constants; -use move_core_types::vm_status::StatusCode; - -#[test] -fn valid_primitives() { - let mut module = empty_module(); - module.constant_pool = vec![ - Constant { - type_: SignatureToken::Bool, - data: vec![0], - }, - Constant { - type_: SignatureToken::U8, - data: vec![0], - }, - Constant { - type_: SignatureToken::U16, - data: vec![0, 0], - }, - Constant { - type_: SignatureToken::U32, - data: vec![0, 0, 0, 0], - }, - Constant { - type_: SignatureToken::U64, - data: vec![0, 0, 0, 0, 0, 0, 0, 0], - }, - Constant { - type_: SignatureToken::U128, - data: vec![0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - }, - Constant { - type_: SignatureToken::U256, - data: vec![ - 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, 0, - ], - }, - Constant { - type_: SignatureToken::Address, - data: vec![ - 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, 0, - ], - }, - ]; - assert!(constants::verify_module(&module).is_ok()); -} - -#[test] -fn invalid_primitives() { - malformed(SignatureToken::U8, vec![0, 0]); - malformed(SignatureToken::U16, vec![0, 0, 0, 0]); - malformed(SignatureToken::U32, vec![0, 0, 0]); - malformed(SignatureToken::U64, vec![0]); - malformed(SignatureToken::U128, vec![0]); - malformed(SignatureToken::U256, vec![0, 0]); - let data = vec![ - 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, 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, 0, 0, - ]; - malformed(SignatureToken::Address, data); -} - -#[test] -fn valid_vectors() { - let double_vec = |item: Vec| -> Vec { - let mut items = vec![2]; - items.extend(item.clone()); - items.extend(item); - items - }; - let large_vec = |item: Vec| -> Vec { - let mut items = vec![0xFF, 0xFF, 3]; - (0..0xFFFF).for_each(|_| items.extend(item.clone())); - items - }; - let mut module = empty_module(); - module.constant_pool = vec![ - // empty - Constant { - type_: tvec(SignatureToken::Bool), - data: vec![0], - }, - Constant { - type_: tvec(tvec(SignatureToken::Bool)), - data: vec![0], - }, - Constant { - type_: tvec(tvec(tvec(tvec(SignatureToken::Bool)))), - data: vec![0], - }, - Constant { - type_: tvec(tvec(tvec(tvec(SignatureToken::Bool)))), - data: double_vec(vec![0]), - }, - // small - Constant { - type_: tvec(SignatureToken::Bool), - data: vec![9, 1, 1, 1, 1, 1, 1, 1, 1, 1], - }, - Constant { - type_: tvec(SignatureToken::U8), - data: vec![9, 1, 1, 1, 1, 1, 1, 1, 1, 1], - }, - // large - Constant { - type_: tvec(SignatureToken::Bool), - data: large_vec(vec![0]), - }, - Constant { - type_: tvec(SignatureToken::U8), - data: large_vec(vec![0]), - }, - Constant { - type_: tvec(SignatureToken::U16), - data: large_vec(vec![0, 0]), - }, - Constant { - type_: tvec(SignatureToken::U32), - data: large_vec(vec![0, 0, 0, 0]), - }, - Constant { - type_: tvec(SignatureToken::U64), - data: large_vec(vec![0, 0, 0, 0, 0, 0, 0, 0]), - }, - Constant { - type_: tvec(SignatureToken::U128), - data: large_vec(vec![0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), - }, - Constant { - type_: tvec(SignatureToken::U256), - data: large_vec(vec![ - 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, 0, - ]), - }, - Constant { - type_: tvec(SignatureToken::Address), - data: large_vec(vec![ - 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, 0, - ]), - }, - // double large - Constant { - type_: tvec(tvec(SignatureToken::Bool)), - data: double_vec(large_vec(vec![0])), - }, - Constant { - type_: tvec(tvec(SignatureToken::U8)), - data: double_vec(large_vec(vec![0])), - }, - Constant { - type_: tvec(tvec(SignatureToken::U16)), - data: double_vec(large_vec(vec![0, 0])), - }, - Constant { - type_: tvec(tvec(SignatureToken::U32)), - data: double_vec(large_vec(vec![0, 0, 0, 0])), - }, - Constant { - type_: tvec(tvec(SignatureToken::U64)), - data: double_vec(large_vec(vec![0, 0, 0, 0, 0, 0, 0, 0])), - }, - Constant { - type_: tvec(tvec(SignatureToken::U128)), - data: double_vec(large_vec(vec![ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ])), - }, - Constant { - type_: tvec(tvec(SignatureToken::U256)), - data: double_vec(large_vec(vec![ - 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, 0, - ])), - }, - Constant { - type_: tvec(tvec(SignatureToken::Address)), - data: double_vec(large_vec(vec![ - 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, 0, - ])), - }, - ]; - assert!(constants::verify_module(&module).is_ok()); -} - -#[test] -fn invalid_vectors() { - let double_vec = |item: Vec| -> Vec { - let mut items = vec![2]; - items.extend(item.clone()); - items.extend(item); - items - }; - let too_large_vec = |item: Vec| -> Vec { - let mut items = vec![0xFF, 0xFF, 3]; - (0..(0xFFFF + 1)).for_each(|_| items.extend(item.clone())); - items - }; - // wrong inner - malformed(tvec(SignatureToken::U16), vec![1, 0]); - malformed(tvec(SignatureToken::U32), vec![1, 0]); - malformed(tvec(SignatureToken::U64), vec![1, 0]); - malformed(tvec(SignatureToken::Address), vec![ - 1, 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, 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, 0, 0, - ]); - // wrong lens - malformed(tvec(SignatureToken::U8), vec![0, 0]); - malformed(tvec(SignatureToken::U8), vec![0, 1]); - malformed(tvec(SignatureToken::U8), vec![2, 1, 1, 1]); - malformed(tvec(tvec(SignatureToken::U8)), double_vec(vec![0, 0])); - // too large - malformed(tvec(SignatureToken::U8), too_large_vec(vec![0])); -} - -#[test] -fn invalid_types() { - invalid_type(SignatureToken::TypeParameter(0), vec![0]); - invalid_type(SignatureToken::TypeParameter(0xFA), vec![0]); - invalid_type(tvec(SignatureToken::TypeParameter(0)), vec![0]); - invalid_type(tvec(SignatureToken::TypeParameter(0xAF)), vec![0]); - - invalid_type(SignatureToken::Signer, vec![0]); - invalid_type(tvec(SignatureToken::Signer), vec![0]); - - // TODO cannot check structs are banned currently. This can be handled by IR - // and source lang tests - // invalid_type(SignatureToken::Datatype(DatatypeHandleIndex(0)), vec![0]); -} - -fn tvec(s: SignatureToken) -> SignatureToken { - SignatureToken::Vector(Box::new(s)) -} - -fn malformed(type_: SignatureToken, data: Vec) { - error(type_, data, StatusCode::MALFORMED_CONSTANT_DATA) -} - -fn invalid_type(type_: SignatureToken, data: Vec) { - error(type_, data, StatusCode::INVALID_CONSTANT_TYPE) -} - -fn error(type_: SignatureToken, data: Vec, code: StatusCode) { - let mut module = empty_module(); - module.constant_pool = vec![Constant { type_, data }]; - assert!( - constants::verify_module(&module) - .unwrap_err() - .major_status() - == code - ) -} diff --git a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/control_flow_tests.rs b/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/control_flow_tests.rs deleted file mode 100644 index 2f5d9070bf1..00000000000 --- a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/control_flow_tests.rs +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (c) The Diem Core Contributors -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use move_binary_format::{ - errors::PartialVMResult, - file_format::{Bytecode, CompiledModule, FunctionDefinitionIndex, TableIndex}, -}; -use move_bytecode_verifier::control_flow; -use move_bytecode_verifier_meter::dummy::DummyMeter; -use move_core_types::vm_status::StatusCode; -use move_vm_config::verifier::VerifierConfig; - -use crate::support::dummy_procedure_module; - -fn verify_module(verifier_config: &VerifierConfig, module: &CompiledModule) -> PartialVMResult<()> { - for (idx, function_definition) in module - .function_defs() - .iter() - .enumerate() - .filter(|(_, def)| !def.is_native()) - { - let current_function = FunctionDefinitionIndex(idx as TableIndex); - let code = function_definition - .code - .as_ref() - .expect("unexpected native function"); - - control_flow::verify_function( - verifier_config, - module, - current_function, - function_definition, - code, - &mut DummyMeter, - )?; - } - Ok(()) -} - -//************************************************************************************************** -// Simple cases - Copied from code unit verifier -//************************************************************************************************** - -#[test] -fn empty_bytecode() { - let module = dummy_procedure_module(vec![]); - let result = verify_module(&Default::default(), &module); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::EMPTY_CODE_UNIT, - ); -} - -#[test] -fn empty_bytecode_v5() { - let mut module = dummy_procedure_module(vec![]); - module.version = 5; - - let result = verify_module(&Default::default(), &module); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::EMPTY_CODE_UNIT, - ); -} - -#[test] -fn invalid_fallthrough_br_true() { - let module = dummy_procedure_module(vec![Bytecode::LdFalse, Bytecode::BrTrue(1)]); - let result = verify_module(&Default::default(), &module); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::INVALID_FALL_THROUGH - ); -} - -#[test] -fn invalid_fallthrough_br_false() { - let module = dummy_procedure_module(vec![Bytecode::LdTrue, Bytecode::BrFalse(1)]); - let result = verify_module(&Default::default(), &module); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::INVALID_FALL_THROUGH - ); -} - -// all non-branch instructions should trigger invalid fallthrough; just check -// one of them -#[test] -fn invalid_fallthrough_non_branch() { - let module = dummy_procedure_module(vec![Bytecode::LdTrue, Bytecode::Pop]); - let result = verify_module(&Default::default(), &module); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::INVALID_FALL_THROUGH - ); -} - -#[test] -fn valid_fallthrough_branch() { - let module = dummy_procedure_module(vec![Bytecode::Branch(0)]); - let result = verify_module(&Default::default(), &module); - assert!(result.is_ok()); -} - -#[test] -fn valid_fallthrough_ret() { - let module = dummy_procedure_module(vec![Bytecode::Ret]); - let result = verify_module(&Default::default(), &module); - assert!(result.is_ok()); -} - -#[test] -fn valid_fallthrough_abort() { - let module = dummy_procedure_module(vec![Bytecode::LdU64(7), Bytecode::Abort]); - let result = verify_module(&Default::default(), &module); - assert!(result.is_ok()); -} - -#[test] -fn nested_loops_max_depth() { - let module = dummy_procedure_module(vec![ - Bytecode::LdFalse, - Bytecode::LdFalse, - Bytecode::BrFalse(1), - Bytecode::BrFalse(0), - Bytecode::Ret, - ]); - let result = verify_module( - &VerifierConfig { - max_loop_depth: Some(2), - ..VerifierConfig::default() - }, - &module, - ); - assert!(result.is_ok()); -} - -#[test] -fn nested_loops_exceed_max_depth() { - let module = dummy_procedure_module(vec![ - Bytecode::LdFalse, - Bytecode::LdFalse, - Bytecode::LdFalse, - Bytecode::BrFalse(2), - Bytecode::BrFalse(1), - Bytecode::BrFalse(0), - Bytecode::Ret, - ]); - let result = verify_module( - &VerifierConfig { - max_loop_depth: Some(2), - ..VerifierConfig::default() - }, - &module, - ); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::LOOP_MAX_DEPTH_REACHED - ); -} - -#[test] -fn non_loop_backward_jump() { - let module = dummy_procedure_module(vec![ - Bytecode::Branch(2), - Bytecode::Ret, - Bytecode::Branch(1), - ]); - let result = verify_module(&Default::default(), &module); - assert!(result.is_ok()); -} - -#[test] -fn non_loop_backward_jump_v5() { - let mut module = dummy_procedure_module(vec![ - Bytecode::Branch(2), - Bytecode::Ret, - Bytecode::Branch(1), - ]); - - module.version = 5; - let result = verify_module(&Default::default(), &module); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::INVALID_LOOP_SPLIT, - ); -} - -#[test] -fn irreducible_control_flow_graph() { - let module = dummy_procedure_module(vec![ - Bytecode::LdTrue, - Bytecode::BrTrue(3), - Bytecode::Nop, - Bytecode::LdFalse, - Bytecode::BrFalse(2), - Bytecode::Ret, - ]); - let result = verify_module(&Default::default(), &module); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::INVALID_LOOP_SPLIT, - ); -} - -#[test] -fn nested_loop_break() { - let module = dummy_procedure_module(vec![ - Bytecode::LdFalse, - Bytecode::LdFalse, - Bytecode::LdFalse, - Bytecode::Branch(7), - Bytecode::BrFalse(2), - Bytecode::BrFalse(1), - Bytecode::BrFalse(0), - Bytecode::Ret, - ]); - let result = verify_module(&Default::default(), &module); - assert!(result.is_ok()); -} - -#[test] -fn nested_loop_break_v5() { - let mut module = dummy_procedure_module(vec![ - Bytecode::LdFalse, - Bytecode::LdFalse, - Bytecode::LdFalse, - Bytecode::Branch(7), - Bytecode::BrFalse(2), - Bytecode::BrFalse(1), - Bytecode::BrFalse(0), - Bytecode::Ret, - ]); - - module.version = 5; - let result = verify_module(&Default::default(), &module); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::INVALID_LOOP_BREAK, - ); -} diff --git a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/duplication_tests.rs b/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/duplication_tests.rs deleted file mode 100644 index 5c40fa75adb..00000000000 --- a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/duplication_tests.rs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) The Diem Core Contributors -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use move_binary_format::file_format::*; -use move_bytecode_verifier::DuplicationChecker; - -#[test] -fn duplicated_friend_decls() { - let mut m = basic_test_module(); - let handle = ModuleHandle { - address: AddressIdentifierIndex::new(0), - name: IdentifierIndex::new(0), - }; - m.friend_decls.push(handle.clone()); - m.friend_decls.push(handle); - DuplicationChecker::verify_module(&m).unwrap_err(); -} - -#[test] -fn duplicated_variant_handles() { - let mut m = basic_test_module_with_enum(); - m.variant_handles.push(m.variant_handles[0].clone()); - DuplicationChecker::verify_module(&m).unwrap_err(); -} diff --git a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/generic_ops_tests.rs b/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/generic_ops_tests.rs deleted file mode 100644 index c45ad03375d..00000000000 --- a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/generic_ops_tests.rs +++ /dev/null @@ -1,478 +0,0 @@ -// Copyright (c) The Diem Core Contributors -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use move_binary_format::file_format::*; -use move_bytecode_verifier::InstructionConsistency; -use move_core_types::{ - account_address::AccountAddress, identifier::Identifier, vm_status::StatusCode, -}; - -// Make a Module with 2 structs and 2 resources with one field each, and 2 -// functions. One of the struct/resource and one of the function is generic, the -// other "normal". Also make a test function whose body will be filled by given -// test cases. -fn make_module() -> CompiledModule { - CompiledModule { - version: move_binary_format::file_format_common::VERSION_MAX, - module_handles: vec![ - // only self module - ModuleHandle { - address: AddressIdentifierIndex(0), - name: IdentifierIndex(0), - }, - ], - self_module_handle_idx: ModuleHandleIndex(0), - identifiers: vec![ - Identifier::new("M").unwrap(), // Module name - Identifier::new("S").unwrap(), // Struct name - Identifier::new("GS").unwrap(), // Generic struct name - Identifier::new("R").unwrap(), // Resource name - Identifier::new("GR").unwrap(), // Generic resource name - Identifier::new("f").unwrap(), // Field name - Identifier::new("fn").unwrap(), // Function name - Identifier::new("g_fn").unwrap(), // Generic function name - Identifier::new("test_fn").unwrap(), // Test function name - ], - address_identifiers: vec![ - AccountAddress::ZERO, // Module address - ], - datatype_handles: vec![ - DatatypeHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(1), - abilities: AbilitySet::PRIMITIVES, - type_parameters: vec![], - }, - DatatypeHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(2), - abilities: AbilitySet::PRIMITIVES, - type_parameters: vec![DatatypeTyParameter { - constraints: AbilitySet::PRIMITIVES, - is_phantom: false, - }], - }, - DatatypeHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(3), - abilities: AbilitySet::EMPTY | Ability::Key, - type_parameters: vec![], - }, - DatatypeHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(4), - abilities: AbilitySet::EMPTY | Ability::Key, - type_parameters: vec![DatatypeTyParameter { - constraints: AbilitySet::PRIMITIVES, - is_phantom: false, - }], - }, - ], - struct_defs: vec![ - // struct S { f: u64 } - StructDefinition { - struct_handle: DatatypeHandleIndex(0), - field_information: StructFieldInformation::Declared(vec![FieldDefinition { - name: IdentifierIndex(5), - signature: TypeSignature(SignatureToken::U64), - }]), - }, - // struct GS { f: T } - StructDefinition { - struct_handle: DatatypeHandleIndex(1), - field_information: StructFieldInformation::Declared(vec![FieldDefinition { - name: IdentifierIndex(5), - signature: TypeSignature(SignatureToken::TypeParameter(0)), - }]), - }, - // struct R has key { f: u64 } - StructDefinition { - struct_handle: DatatypeHandleIndex(2), - field_information: StructFieldInformation::Declared(vec![FieldDefinition { - name: IdentifierIndex(5), - signature: TypeSignature(SignatureToken::U64), - }]), - }, - // struct GR has key { f: T } - StructDefinition { - struct_handle: DatatypeHandleIndex(3), - field_information: StructFieldInformation::Declared(vec![FieldDefinition { - name: IdentifierIndex(5), - signature: TypeSignature(SignatureToken::TypeParameter(0)), - }]), - }, - ], - function_handles: vec![ - // fun fn() - FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(6), - parameters: SignatureIndex(0), - return_: SignatureIndex(0), - type_parameters: vec![], - }, - // fun g_fn() - FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(7), - parameters: SignatureIndex(0), - return_: SignatureIndex(0), - type_parameters: vec![AbilitySet::EMPTY | Ability::Key], - }, - // fun test_fn(Sender) - FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(8), - parameters: SignatureIndex(1), - return_: SignatureIndex(0), - type_parameters: vec![], - }, - ], - function_defs: vec![ - // public fun fn() { return; } - FunctionDefinition { - function: FunctionHandleIndex(0), - visibility: Visibility::Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![Bytecode::Ret], - jump_tables: vec![], - }), - }, - // fun g_fn() { return; } - FunctionDefinition { - function: FunctionHandleIndex(1), - visibility: Visibility::Private, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![Bytecode::Ret], - jump_tables: vec![], - }), - }, - // fun test_fn() { ... } - tests will fill up the code - FunctionDefinition { - function: FunctionHandleIndex(2), - visibility: Visibility::Private, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![], - jump_tables: vec![], - }), - }, - ], - signatures: vec![ - Signature(vec![]), // void - Signature(vec![SignatureToken::Signer]), // Signer - ], - constant_pool: vec![ - // an address - Constant { - type_: SignatureToken::Address, - data: AccountAddress::random().to_vec(), - }, - ], - metadata: vec![], - field_handles: vec![], - friend_decls: vec![], - struct_def_instantiations: vec![], - function_instantiations: vec![], - field_instantiations: vec![], - enum_defs: vec![], - enum_def_instantiations: vec![], - variant_handles: vec![], - variant_instantiation_handles: vec![], - } -} - -#[test] -fn generic_call_to_non_generic_func() { - let mut module = make_module(); - // bogus `CallGeneric fn()` - module.function_defs[2].code = Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![ - Bytecode::CallGeneric(FunctionInstantiationIndex(0)), - Bytecode::Ret, - ], - jump_tables: vec![], - }); - module.function_instantiations.push(FunctionInstantiation { - handle: FunctionHandleIndex(0), - type_parameters: SignatureIndex(2), - }); - module.signatures.push(Signature(vec![SignatureToken::U64])); - let err = InstructionConsistency::verify_module(&module) - .expect_err("CallGeneric to non generic function must fail"); - assert_eq!( - err.major_status(), - StatusCode::GENERIC_MEMBER_OPCODE_MISMATCH - ); -} - -#[test] -fn non_generic_call_to_generic_func() { - let mut module = make_module(); - // bogus `Call g_fn()` - module.function_defs[2].code = Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![Bytecode::Call(FunctionHandleIndex(1)), Bytecode::Ret], - jump_tables: vec![], - }); - let err = InstructionConsistency::verify_module(&module) - .expect_err("Call to generic function must fail"); - assert_eq!( - err.major_status(), - StatusCode::GENERIC_MEMBER_OPCODE_MISMATCH - ); -} - -#[test] -fn generic_pack_on_non_generic_struct() { - let mut module = make_module(); - // bogus `PackGeneric S` - module.function_defs[2].code = Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![ - Bytecode::LdU64(10), - Bytecode::PackGeneric(StructDefInstantiationIndex(0)), - Bytecode::Pop, - Bytecode::Ret, - ], - jump_tables: vec![], - }); - module - .struct_def_instantiations - .push(StructDefInstantiation { - def: StructDefinitionIndex(0), - type_parameters: SignatureIndex(2), - }); - module.signatures.push(Signature(vec![SignatureToken::U64])); - let err = InstructionConsistency::verify_module(&module) - .expect_err("PackGeneric to non generic struct must fail"); - assert_eq!( - err.major_status(), - StatusCode::GENERIC_MEMBER_OPCODE_MISMATCH - ); -} - -#[test] -fn non_generic_pack_on_generic_struct() { - let mut module = make_module(); - // bogus `Pack GS` - module.function_defs[2].code = Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![ - Bytecode::LdU64(10), - Bytecode::Pack(StructDefinitionIndex(1)), - Bytecode::Pop, - Bytecode::Ret, - ], - jump_tables: vec![], - }); - let err = InstructionConsistency::verify_module(&module) - .expect_err("Pack to generic struct must fail"); - assert_eq!( - err.major_status(), - StatusCode::GENERIC_MEMBER_OPCODE_MISMATCH - ); -} - -#[test] -fn generic_unpack_on_non_generic_struct() { - let mut module = make_module(); - // bogus `UnpackGeneric S` - module.function_defs[2].code = Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![ - Bytecode::LdU64(10), - Bytecode::Pack(StructDefinitionIndex(0)), - Bytecode::UnpackGeneric(StructDefInstantiationIndex(0)), - Bytecode::Pop, - Bytecode::Ret, - ], - jump_tables: vec![], - }); - module - .struct_def_instantiations - .push(StructDefInstantiation { - def: StructDefinitionIndex(0), - type_parameters: SignatureIndex(2), - }); - module.signatures.push(Signature(vec![SignatureToken::U64])); - let err = InstructionConsistency::verify_module(&module) - .expect_err("UnpackGeneric to non generic struct must fail"); - assert_eq!( - err.major_status(), - StatusCode::GENERIC_MEMBER_OPCODE_MISMATCH - ); -} - -#[test] -fn non_generic_unpack_on_generic_struct() { - let mut module = make_module(); - // bogus `Unpack GS` - module.function_defs[2].code = Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![ - Bytecode::LdU64(10), - Bytecode::PackGeneric(StructDefInstantiationIndex(0)), - Bytecode::Unpack(StructDefinitionIndex(1)), - Bytecode::Pop, - Bytecode::Ret, - ], - jump_tables: vec![], - }); - module - .struct_def_instantiations - .push(StructDefInstantiation { - def: StructDefinitionIndex(1), - type_parameters: SignatureIndex(2), - }); - module.signatures.push(Signature(vec![SignatureToken::U64])); - let err = InstructionConsistency::verify_module(&module) - .expect_err("Unpack to generic struct must fail"); - assert_eq!( - err.major_status(), - StatusCode::GENERIC_MEMBER_OPCODE_MISMATCH - ); -} - -#[test] -fn generic_mut_borrow_field_on_non_generic_struct() { - let mut module = make_module(); - // bogus `MutBorrowFieldGeneric S.t` - module.function_defs[2].code = Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![ - Bytecode::LdU64(10), - Bytecode::Pack(StructDefinitionIndex(0)), - Bytecode::MutBorrowFieldGeneric(FieldInstantiationIndex(0)), - Bytecode::Pop, - Bytecode::Ret, - ], - jump_tables: vec![], - }); - module.field_instantiations.push(FieldInstantiation { - handle: FieldHandleIndex(0), - type_parameters: SignatureIndex(2), - }); - module.field_handles.push(FieldHandle { - owner: StructDefinitionIndex(0), - field: 0, - }); - module.signatures.push(Signature(vec![SignatureToken::U64])); - let err = InstructionConsistency::verify_module(&module) - .expect_err("MutBorrowFieldGeneric to non generic struct must fail"); - assert_eq!( - err.major_status(), - StatusCode::GENERIC_MEMBER_OPCODE_MISMATCH - ); -} - -#[test] -fn non_generic_mut_borrow_field_on_generic_struct() { - let mut module = make_module(); - // bogus `MutBorrowField GS.f` - module.function_defs[2].code = Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![ - Bytecode::LdU64(10), - Bytecode::PackGeneric(StructDefInstantiationIndex(0)), - Bytecode::MutBorrowField(FieldHandleIndex(0)), - Bytecode::Pop, - Bytecode::Ret, - ], - jump_tables: vec![], - }); - module - .struct_def_instantiations - .push(StructDefInstantiation { - def: StructDefinitionIndex(1), - type_parameters: SignatureIndex(2), - }); - module.field_handles.push(FieldHandle { - owner: StructDefinitionIndex(1), - field: 0, - }); - module.signatures.push(Signature(vec![SignatureToken::U64])); - let err = InstructionConsistency::verify_module(&module) - .expect_err("MutBorrowField to generic struct must fail"); - assert_eq!( - err.major_status(), - StatusCode::GENERIC_MEMBER_OPCODE_MISMATCH - ); -} - -#[test] -fn generic_borrow_field_on_non_generic_struct() { - let mut module = make_module(); - // bogus `ImmBorrowFieldGeneric S.f` - module.function_defs[2].code = Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![ - Bytecode::LdU64(10), - Bytecode::Pack(StructDefinitionIndex(0)), - Bytecode::ImmBorrowFieldGeneric(FieldInstantiationIndex(0)), - Bytecode::Pop, - Bytecode::Ret, - ], - jump_tables: vec![], - }); - module.field_instantiations.push(FieldInstantiation { - handle: FieldHandleIndex(0), - type_parameters: SignatureIndex(2), - }); - module.field_handles.push(FieldHandle { - owner: StructDefinitionIndex(0), - field: 0, - }); - module.signatures.push(Signature(vec![SignatureToken::U64])); - let err = InstructionConsistency::verify_module(&module) - .expect_err("ImmBorrowFieldGeneric to non generic struct must fail"); - assert_eq!( - err.major_status(), - StatusCode::GENERIC_MEMBER_OPCODE_MISMATCH - ); -} - -#[test] -fn non_generic_borrow_field_on_generic_struct() { - let mut module = make_module(); - // bogus `ImmBorrowField GS.f` - module.function_defs[2].code = Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![ - Bytecode::LdU64(10), - Bytecode::PackGeneric(StructDefInstantiationIndex(0)), - Bytecode::ImmBorrowField(FieldHandleIndex(0)), - Bytecode::Pop, - Bytecode::Ret, - ], - jump_tables: vec![], - }); - module - .struct_def_instantiations - .push(StructDefInstantiation { - def: StructDefinitionIndex(1), - type_parameters: SignatureIndex(2), - }); - module.field_handles.push(FieldHandle { - owner: StructDefinitionIndex(1), - field: 0, - }); - module.signatures.push(Signature(vec![SignatureToken::U64])); - let err = InstructionConsistency::verify_module(&module) - .expect_err("ImmBorrowField to generic struct must fail"); - assert_eq!( - err.major_status(), - StatusCode::GENERIC_MEMBER_OPCODE_MISMATCH - ); -} diff --git a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/large_type_test.rs b/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/large_type_test.rs deleted file mode 100644 index 3b565fa979b..00000000000 --- a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/large_type_test.rs +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use move_binary_format::file_format::{ - empty_module, Bytecode, CodeUnit, FunctionDefinition, FunctionHandle, FunctionHandleIndex, - IdentifierIndex, ModuleHandleIndex, Signature, SignatureIndex, SignatureToken, - Visibility::Public, -}; -use move_bytecode_verifier_meter::bound::BoundMeter; -use move_core_types::{identifier::Identifier, vm_status::StatusCode}; - -use crate::unit_tests::production_config; - -const NUM_LOCALS: u8 = 64; -const NUM_CALLS: u16 = 77; -const NUM_FUNCTIONS: u16 = 177; - -fn get_nested_vec_type(len: usize) -> SignatureToken { - let mut ret = SignatureToken::Bool; - for _ in 0..len { - ret = SignatureToken::Vector(Box::new(ret)); - } - ret -} - -#[test] -fn test_large_types() { - // See also: github.com/aptos-labs/aptos-core/security/advisories/ - // GHSA-37qw-jfpw-8899 - let mut m = empty_module(); - - m.signatures.push(Signature( - std::iter::repeat(SignatureToken::Reference(Box::new(get_nested_vec_type(64)))) - .take(NUM_LOCALS as usize) - .collect(), - )); - - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(0), - parameters: SignatureIndex(0), - return_: SignatureIndex(0), - type_parameters: vec![], - }); - m.function_defs.push(FunctionDefinition { - function: FunctionHandleIndex(0), - visibility: Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![Bytecode::Call(FunctionHandleIndex(0)), Bytecode::Ret], - jump_tables: vec![], - }), - }); - - // returns_vecs - m.identifiers.push(Identifier::new("returns_vecs").unwrap()); - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(1), - parameters: SignatureIndex(0), - return_: SignatureIndex(1), - type_parameters: vec![], - }); - m.function_defs.push(FunctionDefinition { - function: FunctionHandleIndex(1), - visibility: Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![Bytecode::Call(FunctionHandleIndex(1)), Bytecode::Ret], - jump_tables: vec![], - }), - }); - - // takes_and_returns_vecs - m.identifiers - .push(Identifier::new("takes_and_returns_vecs").unwrap()); - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(2), - parameters: SignatureIndex(1), - return_: SignatureIndex(1), - type_parameters: vec![], - }); - m.function_defs.push(FunctionDefinition { - function: FunctionHandleIndex(2), - visibility: Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![Bytecode::Call(FunctionHandleIndex(1)), Bytecode::Ret], - jump_tables: vec![], - }), - }); - - // takes_vecs - m.identifiers.push(Identifier::new("takes_vecs").unwrap()); - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(3), - parameters: SignatureIndex(1), - return_: SignatureIndex(0), - type_parameters: vec![], - }); - m.function_defs.push(FunctionDefinition { - function: FunctionHandleIndex(3), - visibility: Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![Bytecode::Ret], - jump_tables: vec![], - }), - }); - - // other fcts - for i in 0..NUM_FUNCTIONS { - m.identifiers - .push(Identifier::new(format!("f{}", i)).unwrap()); - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(i + 4), - parameters: SignatureIndex(0), - return_: SignatureIndex(0), - type_parameters: vec![], - }); - m.function_defs.push(FunctionDefinition { - function: FunctionHandleIndex(i + 4), - visibility: Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![], - jump_tables: vec![], - }), - }); - - let code = &mut m.function_defs[i as usize + 4].code.as_mut().unwrap().code; - code.clear(); - code.push(Bytecode::Call(FunctionHandleIndex(1))); - for _ in 0..NUM_CALLS { - code.push(Bytecode::Call(FunctionHandleIndex(2))); - } - code.push(Bytecode::Call(FunctionHandleIndex(3))); - code.push(Bytecode::Ret); - } - - let (verifier_config, meter_config) = production_config(); - let mut meter = BoundMeter::new(meter_config); - let result = move_bytecode_verifier::verify_module_with_config_for_test( - "test_large_types", - &verifier_config, - &m, - &mut meter, - ); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::CONSTRAINT_NOT_SATISFIED, - ); -} diff --git a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/limit_tests.rs b/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/limit_tests.rs deleted file mode 100644 index 271e1cf955e..00000000000 --- a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/limit_tests.rs +++ /dev/null @@ -1,827 +0,0 @@ -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use move_binary_format::file_format::*; -use move_bytecode_verifier::{limits::LimitsVerifier, verify_module_with_config_for_test}; -use move_bytecode_verifier_meter::dummy::DummyMeter; -use move_core_types::{ - account_address::AccountAddress, identifier::Identifier, vm_status::StatusCode, -}; -use move_vm_config::verifier::{VerifierConfig, DEFAULT_MAX_IDENTIFIER_LENGTH}; - -use crate::unit_tests::production_config; - -#[test] -fn test_function_handle_type_instantiation() { - let mut m = basic_test_module(); - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex::new(0), - name: IdentifierIndex::new(0), - parameters: SignatureIndex(0), - return_: SignatureIndex(0), - type_parameters: std::iter::repeat(AbilitySet::ALL).take(10).collect(), - }); - - assert_eq!( - LimitsVerifier::verify_module( - &VerifierConfig { - max_generic_instantiation_length: Some(9), - ..Default::default() - }, - &m - ) - .unwrap_err() - .major_status(), - StatusCode::TOO_MANY_TYPE_PARAMETERS - ); -} - -#[test] -fn test_struct_handle_type_instantiation() { - let mut m = basic_test_module(); - m.datatype_handles.push(DatatypeHandle { - module: ModuleHandleIndex::new(0), - name: IdentifierIndex::new(0), - abilities: AbilitySet::ALL, - type_parameters: std::iter::repeat(DatatypeTyParameter { - constraints: AbilitySet::ALL, - is_phantom: false, - }) - .take(10) - .collect(), - }); - - assert_eq!( - LimitsVerifier::verify_module( - &VerifierConfig { - max_generic_instantiation_length: Some(9), - ..Default::default() - }, - &m - ) - .unwrap_err() - .major_status(), - StatusCode::TOO_MANY_TYPE_PARAMETERS - ); -} - -#[test] -fn test_function_handle_parameters() { - let mut m = basic_test_module(); - m.signatures.push(Signature( - std::iter::repeat(SignatureToken::Bool).take(10).collect(), - )); - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex::new(0), - name: IdentifierIndex::new(0), - parameters: SignatureIndex(1), - return_: SignatureIndex(0), - type_parameters: vec![], - }); - - assert_eq!( - LimitsVerifier::verify_module( - &VerifierConfig { - max_function_parameters: Some(9), - ..Default::default() - }, - &m - ) - .unwrap_err() - .major_status(), - StatusCode::TOO_MANY_PARAMETERS - ); -} - -#[test] -fn big_vec_unpacks() { - const N_TYPE_PARAMS: usize = 16; - let mut st = SignatureToken::Vector(Box::new(SignatureToken::U8)); - let type_params = vec![st; N_TYPE_PARAMS]; - st = SignatureToken::DatatypeInstantiation(Box::new((DatatypeHandleIndex(0), type_params))); - const N_VEC_PUSH: u16 = 1000; - let mut code = vec![]; - // 1. CopyLoc: ... -> ... st - // 2. VecPack: ... st -> ... Vec - // 3. VecUnpack: ... Vec -> ... st, st, st, ... st - for _ in 0..N_VEC_PUSH { - code.push(Bytecode::CopyLoc(0)); - code.push(Bytecode::VecPack(SignatureIndex(1), 1)); - code.push(Bytecode::VecUnpack(SignatureIndex(1), 1 << 15)); - } - // 1. VecPack: ... st, st, st, ... st -> ... Vec - // 2. Pop: ... Vec -> ... - for _ in 0..N_VEC_PUSH { - code.push(Bytecode::VecPack(SignatureIndex(1), 1 << 15)); - code.push(Bytecode::Pop); - } - code.push(Bytecode::Ret); - let type_param_constraints = DatatypeTyParameter { - constraints: AbilitySet::EMPTY, - is_phantom: false, - }; - let module = CompiledModule { - version: 5, - self_module_handle_idx: ModuleHandleIndex(0), - module_handles: vec![ModuleHandle { - address: AddressIdentifierIndex(0), - name: IdentifierIndex(0), - }], - datatype_handles: vec![DatatypeHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(1), - abilities: AbilitySet::ALL, - type_parameters: vec![type_param_constraints; N_TYPE_PARAMS], - }], - function_handles: vec![FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(0), - parameters: SignatureIndex(1), - return_: SignatureIndex(0), - type_parameters: vec![], - }], - field_handles: vec![], - friend_decls: vec![], - struct_def_instantiations: vec![], - function_instantiations: vec![], - field_instantiations: vec![], - signatures: vec![Signature(vec![]), Signature(vec![st])], - identifiers: vec![ - Identifier::new("f").unwrap(), - Identifier::new("generic_struct").unwrap(), - ], - address_identifiers: vec![AccountAddress::ONE], - constant_pool: vec![], - metadata: vec![], - struct_defs: vec![StructDefinition { - struct_handle: DatatypeHandleIndex(0), - field_information: StructFieldInformation::Native, - }], - function_defs: vec![FunctionDefinition { - function: FunctionHandleIndex(0), - visibility: Visibility::Public, - is_entry: true, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(0), - code, - jump_tables: vec![], - }), - }], - enum_defs: vec![], - enum_def_instantiations: vec![], - variant_handles: vec![], - variant_instantiation_handles: vec![], - }; - - // save module and verify that it can ser/de - let mut mvbytes = vec![]; - module.serialize(&mut mvbytes).unwrap(); - let module = CompiledModule::deserialize_with_defaults(&mvbytes).unwrap(); - - let res = verify_module_with_config_for_test( - "big_vec_unpacks", - &VerifierConfig { - max_loop_depth: Some(5), - max_generic_instantiation_length: Some(32), - max_function_parameters: Some(128), - max_basic_blocks: Some(1024), - max_push_size: Some(10000), - ..Default::default() - }, - &module, - &mut DummyMeter, - ); - assert_eq!( - res.unwrap_err().major_status(), - StatusCode::VALUE_STACK_PUSH_OVERFLOW - ); -} - -const MAX_STRUCTS: usize = 200; -const MAX_FIELDS: usize = 30; -const MAX_FUNCTIONS: usize = 1000; - -#[test] -fn max_struct_test() { - let config = VerifierConfig { - max_data_definitions: Some(MAX_STRUCTS), - max_fields_in_struct: Some(MAX_FIELDS), - max_function_definitions: Some(MAX_FUNCTIONS), - ..Default::default() - }; - let mut module = leaf_module("M"); - multi_struct(&mut module, 0); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - multi_struct(&mut module, 1); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - let mut module = leaf_module("M"); - multi_struct(&mut module, MAX_STRUCTS / 2); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - let mut module = leaf_module("M"); - multi_struct(&mut module, MAX_STRUCTS); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - let mut module = leaf_module("M"); - multi_struct(&mut module, MAX_STRUCTS * 2); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!( - res.unwrap_err().major_status(), - StatusCode::MAX_STRUCT_DEFINITIONS_REACHED, - ); - let mut module = leaf_module("M"); - multi_struct(&mut module, MAX_STRUCTS + 1); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!( - res.unwrap_err().major_status(), - StatusCode::MAX_STRUCT_DEFINITIONS_REACHED, - ); -} - -#[test] -fn max_fields_test() { - let config = VerifierConfig { - max_data_definitions: Some(MAX_STRUCTS), - max_fields_in_struct: Some(MAX_FIELDS), - max_function_definitions: Some(MAX_FUNCTIONS), - ..Default::default() - }; - let mut module = leaf_module("M"); - multi_struct(&mut module, 1); - multi_fields(&mut module, MAX_FIELDS / 2); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - let mut module = leaf_module("M"); - multi_struct(&mut module, 10); - multi_fields(&mut module, MAX_FIELDS - 1); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - let mut module = leaf_module("M"); - multi_struct(&mut module, 50); - multi_fields(&mut module, MAX_FIELDS); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - let mut module = leaf_module("M"); - multi_struct(&mut module, 100); - multi_fields(&mut module, MAX_FIELDS + 1); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!( - res.unwrap_err().major_status(), - StatusCode::MAX_FIELD_DEFINITIONS_REACHED, - ); - let mut module = leaf_module("M"); - multi_struct(&mut module, 2); - multi_fields(&mut module, MAX_FIELDS * 2); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!( - res.unwrap_err().major_status(), - StatusCode::MAX_FIELD_DEFINITIONS_REACHED, - ); - let mut module = leaf_module("M"); - multi_struct(&mut module, 50); - multi_fields_except_one(&mut module, 0, 2, MAX_FIELDS + 1); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!( - res.unwrap_err().major_status(), - StatusCode::MAX_FIELD_DEFINITIONS_REACHED, - ); - let mut module = leaf_module("M"); - multi_struct(&mut module, 20); - multi_fields_except_one(&mut module, 19, MAX_FIELDS, MAX_FIELDS + 1); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!( - res.unwrap_err().major_status(), - StatusCode::MAX_FIELD_DEFINITIONS_REACHED, - ); - let mut module = leaf_module("M"); - multi_struct(&mut module, 100); - multi_fields_except_one(&mut module, 50, 1, MAX_FIELDS * 2); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!( - res.unwrap_err().major_status(), - StatusCode::MAX_FIELD_DEFINITIONS_REACHED, - ); -} - -#[test] -fn max_functions_test() { - let config = VerifierConfig { - max_data_definitions: Some(MAX_STRUCTS), - max_fields_in_struct: Some(MAX_FIELDS), - max_function_definitions: Some(MAX_FUNCTIONS), - ..Default::default() - }; - let mut module = leaf_module("M"); - multi_struct(&mut module, 1); - multi_functions(&mut module, 1); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - let mut module = leaf_module("M"); - multi_struct(&mut module, 10); - multi_functions(&mut module, MAX_FUNCTIONS / 2); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - let mut module = leaf_module("M"); - multi_struct(&mut module, 5); - multi_functions(&mut module, MAX_FUNCTIONS); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - let mut module = leaf_module("M"); - multi_struct(&mut module, 5); - multi_functions(&mut module, MAX_FUNCTIONS - 1); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - let mut module = leaf_module("M"); - multi_struct(&mut module, 5); - multi_functions(&mut module, MAX_FUNCTIONS + 1); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!( - res.unwrap_err().major_status(), - StatusCode::MAX_FUNCTION_DEFINITIONS_REACHED, - ); - let mut module = leaf_module("M"); - multi_functions(&mut module, MAX_FUNCTIONS * 2); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!( - res.unwrap_err().major_status(), - StatusCode::MAX_FUNCTION_DEFINITIONS_REACHED, - ); -} - -#[test] -fn max_mixed_config_test() { - let config = VerifierConfig { - max_data_definitions: Some(MAX_STRUCTS), - max_fields_in_struct: Some(MAX_FIELDS), - max_function_definitions: Some(MAX_FUNCTIONS), - ..Default::default() - }; - let mut module = leaf_module("M"); - multi_struct(&mut module, MAX_STRUCTS); - multi_fields(&mut module, MAX_FIELDS); - multi_functions(&mut module, MAX_FUNCTIONS); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - - let config = VerifierConfig { - max_function_definitions: None, - max_data_definitions: None, - max_fields_in_struct: None, - ..Default::default() - }; - let mut module = leaf_module("M"); - multi_struct(&mut module, 1); - multi_fields(&mut module, 1); - multi_functions(&mut module, 1); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - let mut module = leaf_module("M"); - multi_struct(&mut module, MAX_STRUCTS); - multi_fields(&mut module, MAX_FIELDS); - multi_functions(&mut module, MAX_FUNCTIONS); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - let mut module = leaf_module("M"); - multi_struct(&mut module, MAX_STRUCTS * 2); - multi_fields(&mut module, MAX_FIELDS * 2); - multi_functions(&mut module, MAX_FUNCTIONS * 2); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - let mut module = leaf_module("M"); - multi_struct(&mut module, MAX_STRUCTS + 1); - multi_fields(&mut module, MAX_FIELDS + 1); - multi_functions(&mut module, MAX_FUNCTIONS + 1); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - - let config = VerifierConfig { - max_data_definitions: Some(MAX_STRUCTS), - max_fields_in_struct: Some(MAX_FIELDS), - ..Default::default() - }; - let mut module = leaf_module("M"); - multi_struct(&mut module, MAX_STRUCTS); - multi_fields(&mut module, MAX_FIELDS); - multi_functions(&mut module, MAX_FUNCTIONS); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - let mut module = leaf_module("M"); - multi_struct(&mut module, MAX_STRUCTS); - multi_fields(&mut module, MAX_FIELDS); - multi_functions(&mut module, MAX_FUNCTIONS + 10); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - let mut module = leaf_module("M"); - multi_struct(&mut module, MAX_STRUCTS); - multi_fields(&mut module, MAX_FIELDS); - multi_functions(&mut module, MAX_FUNCTIONS * 3); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - let mut module = leaf_module("M"); - multi_struct(&mut module, MAX_STRUCTS * 2); - multi_fields(&mut module, MAX_FIELDS); - multi_functions(&mut module, MAX_FUNCTIONS + 1); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!( - res.unwrap_err().major_status(), - StatusCode::MAX_STRUCT_DEFINITIONS_REACHED, - ); - let mut module = leaf_module("M"); - multi_struct(&mut module, MAX_STRUCTS); - multi_fields(&mut module, MAX_FIELDS * 2); - multi_functions(&mut module, MAX_FUNCTIONS * 3); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!( - res.unwrap_err().major_status(), - StatusCode::MAX_FIELD_DEFINITIONS_REACHED, - ); - - let config = VerifierConfig { - max_data_definitions: Some(MAX_STRUCTS), - max_function_definitions: Some(MAX_FUNCTIONS), - ..Default::default() - }; - let mut module = leaf_module("M"); - multi_struct(&mut module, MAX_STRUCTS); - multi_fields(&mut module, MAX_FIELDS); - multi_functions(&mut module, MAX_FUNCTIONS); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - let mut module = leaf_module("M"); - multi_struct(&mut module, MAX_STRUCTS); - multi_fields(&mut module, MAX_FIELDS + 1); - multi_functions(&mut module, MAX_FUNCTIONS); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - let mut module = leaf_module("M"); - multi_struct(&mut module, MAX_STRUCTS); - multi_fields(&mut module, MAX_FIELDS * 3); - multi_functions(&mut module, MAX_FUNCTIONS); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - let mut module = leaf_module("M"); - multi_struct(&mut module, MAX_STRUCTS * 2); - multi_fields(&mut module, MAX_FIELDS * 3); - multi_functions(&mut module, MAX_FUNCTIONS); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!( - res.unwrap_err().major_status(), - StatusCode::MAX_STRUCT_DEFINITIONS_REACHED, - ); - let mut module = leaf_module("M"); - multi_struct(&mut module, MAX_STRUCTS); - multi_fields(&mut module, MAX_FIELDS * 2); - multi_functions(&mut module, MAX_FUNCTIONS * 2); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!( - res.unwrap_err().major_status(), - StatusCode::MAX_FUNCTION_DEFINITIONS_REACHED, - ); - - let config = VerifierConfig { - max_fields_in_struct: Some(MAX_FIELDS), - max_function_definitions: Some(MAX_FUNCTIONS), - ..Default::default() - }; - let mut module = leaf_module("M"); - multi_struct(&mut module, MAX_STRUCTS); - multi_fields(&mut module, MAX_FIELDS); - multi_functions(&mut module, MAX_FUNCTIONS); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - let mut module = leaf_module("M"); - multi_struct(&mut module, MAX_STRUCTS * 3); - multi_fields(&mut module, MAX_FIELDS); - multi_functions(&mut module, MAX_FUNCTIONS); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - let mut module = leaf_module("M"); - multi_struct(&mut module, MAX_STRUCTS + 1); - multi_fields(&mut module, MAX_FIELDS); - multi_functions(&mut module, MAX_FUNCTIONS); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!(res, Ok(())); - let mut module = leaf_module("M"); - multi_struct(&mut module, MAX_STRUCTS + 1); - multi_fields(&mut module, MAX_FIELDS * 3); - multi_functions(&mut module, MAX_FUNCTIONS); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!( - res.unwrap_err().major_status(), - StatusCode::MAX_FIELD_DEFINITIONS_REACHED, - ); - let mut module = leaf_module("M"); - multi_struct(&mut module, MAX_STRUCTS * 2); - multi_fields(&mut module, MAX_FIELDS); - multi_functions(&mut module, MAX_FUNCTIONS * 2); - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!( - res.unwrap_err().major_status(), - StatusCode::MAX_FUNCTION_DEFINITIONS_REACHED, - ); -} - -#[test] -fn max_identifier_len() { - let (config, _) = production_config(); - let max_ident = "z".repeat( - config - .max_identifier_len - .unwrap_or(DEFAULT_MAX_IDENTIFIER_LENGTH) as usize, - ); - let good_module = leaf_module(&max_ident); - - let res = LimitsVerifier::verify_module(&config, &good_module); - assert!(res.is_ok()); - - let max_ident = "z".repeat( - (config - .max_identifier_len - .unwrap_or(DEFAULT_MAX_IDENTIFIER_LENGTH) as usize) - / 2, - ); - let good_module = leaf_module(&max_ident); - - let res = LimitsVerifier::verify_module(&config, &good_module); - assert!(res.is_ok()); - - let over_max_ident = "z".repeat( - 1 + config - .max_identifier_len - .unwrap_or(DEFAULT_MAX_IDENTIFIER_LENGTH) as usize, - ); - let bad_module = leaf_module(&over_max_ident); - let res = LimitsVerifier::verify_module(&config, &bad_module); - - assert_eq!( - res.unwrap_err().major_status(), - StatusCode::IDENTIFIER_TOO_LONG, - ); - - let over_max_ident = "zx".repeat( - 1 + config - .max_identifier_len - .unwrap_or(DEFAULT_MAX_IDENTIFIER_LENGTH) as usize, - ); - let bad_module = leaf_module(&over_max_ident); - let res = LimitsVerifier::verify_module(&config, &bad_module); - - assert_eq!( - res.unwrap_err().major_status(), - StatusCode::IDENTIFIER_TOO_LONG, - ); -} - -#[test] -fn max_vec_len() { - let config = VerifierConfig { - max_constant_vector_len: Some(0xFFFF - 1), - ..Default::default() - }; - let double_vec = |item: Vec| -> Vec { - let mut items = vec![2]; - items.extend(item.clone()); - items.extend(item); - items - }; - let large_vec = |item: Vec| -> Vec { - let mut items = vec![0xFF, 0xFF, 3]; - (0..0xFFFF).for_each(|_| items.extend(item.clone())); - items - }; - fn tvec(s: SignatureToken) -> SignatureToken { - SignatureToken::Vector(Box::new(s)) - } - - let mut module = empty_module(); - module.constant_pool = vec![Constant { - type_: tvec(SignatureToken::Bool), - data: large_vec(vec![0]), - }]; - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!( - res.unwrap_err().major_status(), - StatusCode::TOO_MANY_VECTOR_ELEMENTS, - ); - - let mut module = empty_module(); - module.constant_pool = vec![Constant { - type_: tvec(SignatureToken::U256), - data: large_vec(vec![ - 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, 0, - ]), - }]; - let res = LimitsVerifier::verify_module(&config, &module); - assert_eq!( - res.unwrap_err().major_status(), - StatusCode::TOO_MANY_VECTOR_ELEMENTS, - ); - - let config = VerifierConfig { - max_constant_vector_len: Some(0xFFFF), - ..Default::default() - }; - - let mut module = empty_module(); - module.constant_pool = vec![ - // empty - Constant { - type_: tvec(SignatureToken::Bool), - data: vec![0], - }, - Constant { - type_: tvec(tvec(SignatureToken::Bool)), - data: vec![0], - }, - Constant { - type_: tvec(tvec(tvec(tvec(SignatureToken::Bool)))), - data: vec![0], - }, - Constant { - type_: tvec(tvec(tvec(tvec(SignatureToken::Bool)))), - data: double_vec(vec![0]), - }, - // small - Constant { - type_: tvec(SignatureToken::Bool), - data: vec![9, 1, 1, 1, 1, 1, 1, 1, 1, 1], - }, - Constant { - type_: tvec(SignatureToken::U8), - data: vec![9, 1, 1, 1, 1, 1, 1, 1, 1, 1], - }, - // large - Constant { - type_: tvec(SignatureToken::Bool), - data: large_vec(vec![0]), - }, - Constant { - type_: tvec(SignatureToken::U8), - data: large_vec(vec![0]), - }, - Constant { - type_: tvec(SignatureToken::U16), - data: large_vec(vec![0, 0]), - }, - Constant { - type_: tvec(SignatureToken::U32), - data: large_vec(vec![0, 0, 0, 0]), - }, - Constant { - type_: tvec(SignatureToken::U64), - data: large_vec(vec![0, 0, 0, 0, 0, 0, 0, 0]), - }, - Constant { - type_: tvec(SignatureToken::U128), - data: large_vec(vec![0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), - }, - Constant { - type_: tvec(SignatureToken::U256), - data: large_vec(vec![ - 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, 0, - ]), - }, - Constant { - type_: tvec(SignatureToken::Address), - data: large_vec(vec![ - 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, 0, - ]), - }, - // double large - Constant { - type_: tvec(tvec(SignatureToken::Bool)), - data: double_vec(large_vec(vec![0])), - }, - Constant { - type_: tvec(tvec(SignatureToken::U8)), - data: double_vec(large_vec(vec![0])), - }, - Constant { - type_: tvec(tvec(SignatureToken::U16)), - data: double_vec(large_vec(vec![0, 0])), - }, - Constant { - type_: tvec(tvec(SignatureToken::U32)), - data: double_vec(large_vec(vec![0, 0, 0, 0])), - }, - Constant { - type_: tvec(tvec(SignatureToken::U64)), - data: double_vec(large_vec(vec![0, 0, 0, 0, 0, 0, 0, 0])), - }, - Constant { - type_: tvec(tvec(SignatureToken::U128)), - data: double_vec(large_vec(vec![ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ])), - }, - Constant { - type_: tvec(tvec(SignatureToken::U256)), - data: double_vec(large_vec(vec![ - 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, 0, - ])), - }, - Constant { - type_: tvec(tvec(SignatureToken::Address)), - data: double_vec(large_vec(vec![ - 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, 0, - ])), - }, - ]; - let res = LimitsVerifier::verify_module(&config, &module); - - assert!(res.is_ok()); -} - -fn multi_struct(module: &mut CompiledModule, count: usize) { - for i in 0..count { - module - .identifiers - .push(Identifier::new(format!("A_{}", i)).unwrap()); - module.datatype_handles.push(DatatypeHandle { - module: module.self_module_handle_idx, - name: IdentifierIndex((module.identifiers.len() - 1) as u16), - abilities: AbilitySet::EMPTY, - type_parameters: vec![], - }); - module.struct_defs.push(StructDefinition { - struct_handle: DatatypeHandleIndex((module.datatype_handles.len() - 1) as u16), - field_information: StructFieldInformation::Declared(vec![]), - }); - } -} - -fn multi_fields(module: &mut CompiledModule, count: usize) { - for def in &mut module.struct_defs { - let mut fields = vec![]; - for i in 0..count { - module - .identifiers - .push(Identifier::new(format!("f_{}", i)).unwrap()); - fields.push(FieldDefinition { - name: Default::default(), - signature: TypeSignature(SignatureToken::U8), - }); - } - def.field_information = StructFieldInformation::Declared(fields); - } -} - -fn multi_fields_except_one(module: &mut CompiledModule, idx: usize, count: usize, one: usize) { - for (struct_idx, def) in module.struct_defs.iter_mut().enumerate() { - let mut fields = vec![]; - let count = if struct_idx == idx { one } else { count }; - for i in 0..count { - module - .identifiers - .push(Identifier::new(format!("f_{}", i)).unwrap()); - fields.push(FieldDefinition { - name: Default::default(), - signature: TypeSignature(SignatureToken::U8), - }); - } - def.field_information = StructFieldInformation::Declared(fields); - } -} - -fn multi_functions(module: &mut CompiledModule, count: usize) { - module.signatures.push(Signature(vec![])); - for i in 0..count { - module - .identifiers - .push(Identifier::new(format!("func_{}", i)).unwrap()); - module.function_handles.push(FunctionHandle { - module: module.self_module_handle_idx, - name: IdentifierIndex((module.identifiers.len() - 1) as u16), - parameters: SignatureIndex((module.signatures.len() - 1) as u16), - return_: SignatureIndex((module.signatures.len() - 1) as u16), - type_parameters: vec![], - }); - module.function_defs.push(FunctionDefinition { - function: FunctionHandleIndex((module.function_handles.len() - 1) as u16), - visibility: Visibility::Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex((module.signatures.len() - 1) as u16), - code: vec![Bytecode::Ret], - jump_tables: vec![], - }), - }); - } -} - -fn leaf_module(name: &str) -> CompiledModule { - let mut module = empty_module(); - module.identifiers[0] = Identifier::new(name).unwrap(); - module.address_identifiers[0] = AccountAddress::ONE; - module -} diff --git a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/locals.rs b/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/locals.rs deleted file mode 100644 index 4789fd9131d..00000000000 --- a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/locals.rs +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use move_binary_format::file_format::{ - empty_module, Bytecode, CodeUnit, FunctionDefinition, FunctionHandle, FunctionHandleIndex, - IdentifierIndex, ModuleHandleIndex, Signature, SignatureIndex, SignatureToken, - Visibility::Public, -}; -use move_bytecode_verifier_meter::bound::BoundMeter; -use move_core_types::{identifier::Identifier, vm_status::StatusCode}; - -use crate::unit_tests::production_config; - -#[test] -fn test_locals() { - // See also: github.com/aptos-labs/aptos-core/security/advisories/ - // GHSA-jjqw-f9pc-525j - let mut m = empty_module(); - - const MAX_BASIC_BLOCKS: u16 = 1024; - const MAX_LOCALS: u8 = 255; - const NUM_FUNCTIONS: u16 = 16; - - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(0), - parameters: SignatureIndex(0), - return_: SignatureIndex(0), - type_parameters: vec![], - }); - - m.function_defs.push(FunctionDefinition { - function: FunctionHandleIndex(0), - visibility: Public, - is_entry: true, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![Bytecode::Ret], - jump_tables: vec![], - }), - }); - - // signature of locals in f1..f - m.signatures.push(Signature( - std::iter::repeat(SignatureToken::U8) - .take(MAX_LOCALS as usize) - .collect(), - )); - - m.identifiers.push(Identifier::new("pwn").unwrap()); - - // create returns_bool_and_u64 - m.signatures - .push(Signature(vec![SignatureToken::Bool, SignatureToken::U8])); - m.identifiers - .push(Identifier::new("returns_bool_and_u64").unwrap()); - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(1), - parameters: SignatureIndex(0), - return_: SignatureIndex(2), - type_parameters: vec![], - }); - m.function_defs.push(FunctionDefinition { - function: FunctionHandleIndex(1), - visibility: Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![Bytecode::LdTrue, Bytecode::LdU8(0), Bytecode::Ret], - jump_tables: vec![], - }), - }); - - // create other functions - for i in 1..(NUM_FUNCTIONS + 1) { - m.identifiers - .push(Identifier::new(format!("f{}", i)).unwrap()); - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(i + 1), // the +1 accounts for returns_bool_and_u64 - parameters: SignatureIndex(0), - return_: SignatureIndex(0), - type_parameters: vec![], - }); - m.function_defs.push(FunctionDefinition { - function: FunctionHandleIndex(i + 1), - visibility: Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(1), - code: vec![], - jump_tables: vec![], - }), - }); - - let code = &mut m.function_defs[i as usize + 1].code.as_mut().unwrap().code; - - for _ in 0..(MAX_BASIC_BLOCKS / 2 - MAX_LOCALS as u16 - 3) { - code.push(Bytecode::LdTrue); - code.push(Bytecode::BrTrue((code.len() + 2) as u16)); - code.push(Bytecode::Ret); - code.push(Bytecode::LdTrue); - code.push(Bytecode::BrTrue(0)); - } - for i in 0..MAX_LOCALS { - code.push(Bytecode::Call(FunctionHandleIndex(1))); // calls returns_bool_and_u64 - code.push(Bytecode::StLoc(i)); // i'th local is now available for the first time - code.push(Bytecode::BrTrue(0)); - } - code.push(Bytecode::Ret); - } - - let (verifier_config, meter_config) = production_config(); - let mut meter = BoundMeter::new(meter_config); - let result = move_bytecode_verifier::verify_module_with_config_for_test( - "test_locals", - &verifier_config, - &m, - &mut meter, - ); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::CONSTRAINT_NOT_SATISFIED - ); -} diff --git a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/loop_summary_tests.rs b/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/loop_summary_tests.rs deleted file mode 100644 index bae3df1a339..00000000000 --- a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/loop_summary_tests.rs +++ /dev/null @@ -1,468 +0,0 @@ -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use move_abstract_interpreter::control_flow_graph::VMControlFlowGraph; -use move_binary_format::file_format::Bytecode; -use move_bytecode_verifier::loop_summary::{LoopPartition, LoopSummary}; - -macro_rules! assert_node { - ( $summary:ident, $node:expr ; $block:expr, $preds:expr, $descs:expr, $backs:expr ) => { - let (s, n) = (&$summary, $node); - assert_eq!(s.block(n), $block, "Block"); - - let descs = $descs; - for d in descs { - assert!(s.is_descendant(n, *d), "{:?} -> {:?}", n, d) - } - - assert_eq!(s.pred_edges(n), $preds, "Predecessor Edges"); - assert_eq!(s.back_edges(n), $backs, "Back Edges"); - }; -} - -#[test] -fn linear_summary() { - let summary = { - use Bytecode::*; - LoopSummary::new(&VMControlFlowGraph::new( - &[ - // B0, L0 - Nop, - // - Branch(2), - // B2, L1 - Nop, - // - Branch(4), - // B4, L2 - Ret, - ], - &[], - )) - }; - - let n: Vec<_> = summary.preorder().collect(); - - assert_eq!(n.len(), 3); - - assert_node!( - summary, n[0]; - /* block */ 0, - /* preds */ &[], - /* descs */ &[n[1], n[2]], - /* backs */ &[] - ); - - assert_node!( - summary, n[1]; - /* block */ 2, - /* preds */ &[n[0]], - /* descs */ &[n[2]], - /* backs */ &[] - ); - - assert_node!( - summary, n[2]; - /* block */ 4, - /* preds */ &[n[1]], - /* descs */ &[], - /* backs */ &[] - ); -} - -#[test] -fn non_loop_back_branch_summary() { - let summary = { - use Bytecode::*; - LoopSummary::new(&VMControlFlowGraph::new( - &[ - // B0, L0 - Nop, - // - Branch(3), - // B2, L2 - Ret, - // B3, L1 - Branch(2), - ], - &[], - )) - }; - - let n: Vec<_> = summary.preorder().collect(); - - assert_eq!(n.len(), 3); - - assert_node!( - summary, n[0]; - /* block */ 0, - /* preds */ &[], - /* descs */ &[n[1], n[2]], - /* backs */ &[] - ); - - assert_node!( - summary, n[1]; - /* block */ 3, - /* preds */ &[n[0]], - /* descs */ &[n[2]], - /* backs */ &[] - ); - - assert_node!( - summary, n[2]; - /* block */ 2, - /* preds */ &[n[1]], - /* descs */ &[], - /* backs */ &[] - ); -} - -#[test] -fn branching_summary() { - let summary = { - use Bytecode::*; - LoopSummary::new(&VMControlFlowGraph::new( - &[ - // B0, L0 - LdTrue, - // - BrTrue(3), - // B2, L2 - Nop, - // B3, L1 - Ret, - ], - &[], - )) - }; - - let n: Vec<_> = summary.preorder().collect(); - - assert_eq!(n.len(), 3); - - assert_node!( - summary, n[0]; - /* block */ 0, - /* preds */ &[], - /* descs */ &[n[1], n[2]], - /* backs */ &[] - ); - - assert_node!( - summary, n[1]; - /* block */ 3, - /* preds */ &[n[0], n[2]], - /* descs */ &[], - /* backs */ &[] - ); - - assert_node!( - summary, n[2]; - /* block */ 2, - /* preds */ &[n[0]], - /* descs */ &[], - /* backs */ &[] - ); - - // Although L2 -> L1 is an edge in the CFG, it's not an edge in the DFST, so L2 - // is said to have no descendants. - assert!(!summary.is_descendant(n[2], n[1])); -} - -#[test] -fn looping_summary() { - let summary = { - use Bytecode::*; - LoopSummary::new(&VMControlFlowGraph::new( - &[ - // B0, L0 - LdTrue, - // - BrTrue(4), - // B2, L2 - Nop, - // - Branch(0), - // B4, L1 - Ret, - ], - &[], - )) - }; - - let n: Vec<_> = summary.preorder().collect(); - - assert_eq!(n.len(), 3); - - assert_node!( - summary, n[0]; - /* block */ 0, - /* preds */ &[], - /* descs */ &[n[1], n[2]], - /* backs */ &[n[2]] - ); - - assert_node!( - summary, n[1]; - /* block */ 4, - /* preds */ &[n[0]], - /* descs */ &[], - /* backs */ &[] - ); - - assert_node!( - summary, n[2]; - /* block */ 2, - /* preds */ &[n[0]], - /* descs */ &[], - /* backs */ &[] - ); -} - -#[test] -fn branches_in_loops_summary() { - let summary = { - use Bytecode::*; - LoopSummary::new(&VMControlFlowGraph::new( - &[ - // B0, L0 - LdTrue, - // - BrTrue(3), - // B2, L3 - Nop, - // B3, L1 - LdFalse, - // - BrFalse(0), - // B5, L2 - Ret, - ], - &[], - )) - }; - - let n: Vec<_> = summary.preorder().collect(); - - assert_eq!(n.len(), 4); - - assert_node!( - summary, n[0]; - /* block */ 0, - /* preds */ &[], - /* descs */ &[n[1], n[2], n[3]], - /* backs */ &[n[1]] - ); - - assert_node!( - summary, n[1]; - /* block */ 3, - /* preds */ &[n[0], n[3]], - /* descs */ &[n[2]], - /* backs */ &[] - ); - - assert_node!( - summary, n[2]; - /* block */ 5, - /* preds */ &[n[1]], - /* descs */ &[], - /* backs */ &[] - ); - - assert_node!( - summary, n[3]; - /* block */ 2, - /* preds */ &[n[0]], - /* descs */ &[], - /* backs */ &[] - ); -} - -#[test] -fn loops_in_branches_summary() { - let summary = { - use Bytecode::*; - LoopSummary::new(&VMControlFlowGraph::new( - &[ - // B0, L0 - LdTrue, - // - BrTrue(8), - // B2, L5 - Nop, - // B3, L6 - LdFalse, - // - BrFalse(3), - // B5, L7 - LdTrue, - // - BrTrue(2), - // B7, L8 - Branch(13), - // B8, L1 - Nop, - // B9, L2 - LdTrue, - // - BrTrue(8), - // B11, L3 - LdFalse, - // - BrFalse(9), - // B13, L4 - Ret, - ], - &[], - )) - }; - - let n: Vec<_> = summary.preorder().collect(); - - assert_eq!(n.len(), 9); - - assert_node!( - summary, n[0]; - /* block */ 0, - /* preds */ &[], - /* descs */ &[n[1], n[2], n[3], n[4], n[5], n[6], n[7], n[8]], - /* backs */ &[] - ); - - assert_node!( - summary, n[1]; - /* block */ 8, - /* preds */ &[n[0]], - /* descs */ &[n[2], n[3], n[4]], - /* backs */ &[n[2]] - ); - - assert_node!( - summary, n[2]; - /* block */ 9, - /* preds */ &[n[1]], - /* descs */ &[n[3], n[4]], - /* backs */ &[n[3]] - ); - - assert_node!( - summary, n[3]; - /* block */ 11, - /* preds */ &[n[2]], - /* descs */ &[n[4]], - /* backs */ &[] - ); - - assert_node!( - summary, n[4]; - /* block */ 13, - /* preds */ &[n[3], n[8]], - /* descs */ &[], - /* backs */ &[] - ); - - assert_node!( - summary, n[5]; - /* block */ 2, - /* preds */ &[n[0]], - /* descs */ &[n[6], n[7], n[8]], - /* backs */ &[n[7]] - ); - - assert_node!( - summary, n[6]; - /* block */ 3, - /* preds */ &[n[5]], - /* descs */ &[n[7], n[8]], - /* backs */ &[n[6]] - ); - - assert_node!( - summary, n[7]; - /* block */ 5, - /* preds */ &[n[6]], - /* descs */ &[n[8]], - /* backs */ &[] - ); - - assert_node!( - summary, n[8]; - /* block */ 7, - /* preds */ &[n[7]], - /* descs */ &[], - /* backs */ &[] - ); -} - -#[test] -fn loop_collapsing() { - let summary = { - use Bytecode::*; - LoopSummary::new(&VMControlFlowGraph::new( - &[ - // B0, L0 - LdTrue, - // - BrTrue(4), - // B2, L2 - Nop, - // - Branch(0), - // B4, L1 - Ret, - ], - &[], - )) - }; - - let mut partition = LoopPartition::new(&summary); - let n: Vec<_> = summary.preorder().collect(); - - for id in &n { - assert_eq!(*id, partition.containing_loop(*id), "Self-parent {:?}", id); - } - - assert_eq!(partition.collapse_loop(n[0], &[n[2]].into()), 1); - assert_eq!(partition.containing_loop(n[0]), n[0]); - assert_eq!(partition.containing_loop(n[1]), n[1]); - assert_eq!(partition.containing_loop(n[2]), n[0]); -} - -#[test] -fn nested_loop_collapsing() { - let summary = { - use Bytecode::*; - LoopSummary::new(&VMControlFlowGraph::new( - &[ - // B0, L0 - Nop, - // B1, L1 - LdTrue, - // - BrTrue(1), - // B3, L2 - LdFalse, - // - BrFalse(0), - // B5, L3 - LdTrue, - // - BrTrue(0), - // B7, L4 - Ret, - ], - &[], - )) - }; - - let mut partition = LoopPartition::new(&summary); - let n: Vec<_> = summary.preorder().collect(); - - // Self-loop is a special case -- its depth should still be bumped. - assert_eq!(partition.collapse_loop(n[1], &[].into()), 1); - assert_eq!(partition.collapse_loop(n[0], &[n[1], n[2]].into()), 2); - assert_eq!(partition.collapse_loop(n[0], &[n[0], n[3]].into()), 3); -} diff --git a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/many_back_edges.rs b/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/many_back_edges.rs deleted file mode 100644 index b8b488cbafb..00000000000 --- a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/many_back_edges.rs +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use move_binary_format::file_format::{ - empty_module, Bytecode, CodeUnit, FunctionDefinition, FunctionHandle, FunctionHandleIndex, - IdentifierIndex, ModuleHandleIndex, Signature, SignatureIndex, SignatureToken, - Visibility::Public, -}; -use move_bytecode_verifier_meter::bound::BoundMeter; -use move_core_types::{identifier::Identifier, vm_status::StatusCode}; - -use crate::unit_tests::production_config; - -const MAX_BASIC_BLOCKS: u16 = 1024; -const MAX_LOCALS: u8 = 255; - -const NUM_FUNCTIONS: u16 = 16; - -#[test] -fn many_backedges() { - let mut m = empty_module(); - - // signature of locals in f1..f - m.signatures.push(Signature( - std::iter::repeat(SignatureToken::U8) - .take(MAX_LOCALS as usize) - .collect(), - )); - - // create returns_bool_and_u64 - m.signatures - .push(Signature(vec![SignatureToken::Bool, SignatureToken::U8])); - m.identifiers - .push(Identifier::new("returns_bool_and_u64").unwrap()); - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(1), - parameters: SignatureIndex(0), - return_: SignatureIndex(2), - type_parameters: vec![], - }); - m.function_defs.push(FunctionDefinition { - function: FunctionHandleIndex(0), - visibility: Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![Bytecode::LdTrue, Bytecode::LdU8(0), Bytecode::Ret], - jump_tables: vec![], - }), - }); - - // create other functions - for i in 1..(NUM_FUNCTIONS + 1) { - m.identifiers - .push(Identifier::new(format!("f{}", i)).unwrap()); - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(i + 1), // the +1 accounts for returns_bool_and_u64 - parameters: SignatureIndex(0), - return_: SignatureIndex(0), - type_parameters: vec![], - }); - m.function_defs.push(FunctionDefinition { - function: FunctionHandleIndex(i), - visibility: Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(1), - code: vec![], - jump_tables: vec![], - }), - }); - - let code = &mut m.function_defs[i as usize].code.as_mut().unwrap().code; - - for _ in 0..(MAX_BASIC_BLOCKS - MAX_LOCALS as u16 - 2) { - code.push(Bytecode::LdTrue); - code.push(Bytecode::BrTrue(0)); - } - for i in 0..MAX_LOCALS { - code.push(Bytecode::Call(FunctionHandleIndex(0))); // calls returns_bool_and_u64 - code.push(Bytecode::StLoc(i)); // i'th local is now available for the first time - code.push(Bytecode::BrTrue(0)); - } - code.push(Bytecode::Ret); - } - - let (verifier_config, meter_config) = production_config(); - let mut meter = BoundMeter::new(meter_config); - let result = move_bytecode_verifier::verify_module_with_config_for_test( - "many_backedges", - &verifier_config, - &m, - &mut meter, - ); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::CONSTRAINT_NOT_SATISFIED - ); -} diff --git a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/mod.rs b/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/mod.rs deleted file mode 100644 index 4ed2fb574f7..00000000000 --- a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/mod.rs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) The Diem Core Contributors -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use move_binary_format::file_format_common::VERSION_MAX; -use move_vm_config::verifier::{ - MeterConfig, VerifierConfig, DEFAULT_MAX_CONSTANT_VECTOR_LEN, DEFAULT_MAX_IDENTIFIER_LENGTH, - DEFAULT_MAX_VARIANTS, -}; - -pub mod binary_samples; -pub mod bounds_tests; -pub mod code_unit_tests; -pub mod constants_tests; -pub mod control_flow_tests; -pub mod duplication_tests; -pub mod generic_ops_tests; -pub mod large_type_test; -pub mod limit_tests; -pub mod locals; -pub mod loop_summary_tests; -pub mod many_back_edges; -pub mod negative_stack_size_tests; -pub mod reference_safety_tests; -pub mod signature_tests; -pub mod vec_pack_tests; - -/// Configuration used in production. -pub(crate) fn production_config() -> (VerifierConfig, MeterConfig) { - ( - VerifierConfig { - max_loop_depth: Some(5), - max_generic_instantiation_length: Some(32), - max_function_parameters: Some(128), - max_basic_blocks: Some(1024), - max_basic_blocks_in_script: Some(1024), - max_value_stack_size: 1024, - max_type_nodes: Some(256), - max_push_size: Some(10000), - max_dependency_depth: Some(100), - max_data_definitions: Some(200), - max_fields_in_struct: Some(30), - max_function_definitions: Some(1000), - - // Do not use back edge constraints as they are superseded by metering - max_back_edges_per_function: None, - max_back_edges_per_module: None, - - max_constant_vector_len: Some(DEFAULT_MAX_CONSTANT_VECTOR_LEN), - max_identifier_len: Some(DEFAULT_MAX_IDENTIFIER_LENGTH), - bytecode_version: VERSION_MAX, - max_variants_in_enum: Some(DEFAULT_MAX_VARIANTS), - }, - MeterConfig::old_default(), - ) -} diff --git a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/negative_stack_size_tests.rs b/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/negative_stack_size_tests.rs deleted file mode 100644 index 56844c517a1..00000000000 --- a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/negative_stack_size_tests.rs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) The Diem Core Contributors -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use move_binary_format::file_format::Bytecode; -use move_bytecode_verifier::{ability_cache::AbilityCache, code_unit_verifier}; -use move_bytecode_verifier_meter::dummy::DummyMeter; -use move_core_types::vm_status::StatusCode; - -use crate::support::dummy_procedure_module; - -#[test] -fn one_pop_no_push() { - let module = &dummy_procedure_module(vec![Bytecode::Pop, Bytecode::Ret]); - let ability_cache = &mut AbilityCache::new(module); - let result = code_unit_verifier::verify_module( - &Default::default(), - module, - ability_cache, - &mut DummyMeter, - ); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::NEGATIVE_STACK_SIZE_WITHIN_BLOCK - ); -} - -#[test] -fn one_pop_one_push() { - // Height: 0 + (-1 + 1) = 0 would have passed original usage verifier - let module = &dummy_procedure_module(vec![Bytecode::ReadRef, Bytecode::Ret]); - let ability_cache = &mut AbilityCache::new(module); - let result = code_unit_verifier::verify_module( - &Default::default(), - module, - ability_cache, - &mut DummyMeter, - ); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::NEGATIVE_STACK_SIZE_WITHIN_BLOCK - ); -} - -#[test] -fn two_pop_one_push() { - // Height: 0 + 1 + (-2 + 1) = 0 would have passed original usage verifier - let module = &dummy_procedure_module(vec![Bytecode::LdU64(0), Bytecode::Add, Bytecode::Ret]); - let ability_cache = &mut AbilityCache::new(module); - let result = code_unit_verifier::verify_module( - &Default::default(), - module, - ability_cache, - &mut DummyMeter, - ); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::NEGATIVE_STACK_SIZE_WITHIN_BLOCK - ); -} - -#[test] -fn two_pop_no_push() { - let module = &dummy_procedure_module(vec![Bytecode::WriteRef, Bytecode::Ret]); - let ability_cache = &mut AbilityCache::new(module); - let result = code_unit_verifier::verify_module( - &Default::default(), - module, - ability_cache, - &mut DummyMeter, - ); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::NEGATIVE_STACK_SIZE_WITHIN_BLOCK - ); -} diff --git a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/reference_safety_tests.rs b/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/reference_safety_tests.rs deleted file mode 100644 index 8be4f8a621b..00000000000 --- a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/reference_safety_tests.rs +++ /dev/null @@ -1,454 +0,0 @@ -// Copyright (c) The Diem Core Contributors -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use move_binary_format::file_format::{ - empty_module, Bytecode, CodeUnit, FunctionDefinition, FunctionHandle, FunctionHandleIndex, - IdentifierIndex, ModuleHandleIndex, Signature, SignatureIndex, SignatureToken, - Visibility::Public, -}; -use move_bytecode_verifier_meter::bound::BoundMeter; -use move_core_types::{identifier::Identifier, vm_status::StatusCode}; - -use crate::unit_tests::production_config; - -#[test] -fn test_bicliques() { - // See also: github.com/aptos-labs/aptos-core/security/advisories/ - // GHSA-xm6p-ffcq-5p2v - const NUM_LOCALS: u8 = 128; - const NUM_CALLS: u16 = 76; - const NUM_FUNCTIONS: u16 = 1; - - let mut m = empty_module(); - - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(0), - parameters: SignatureIndex(0), - return_: SignatureIndex(0), - type_parameters: vec![], - }); - m.function_defs.push(FunctionDefinition { - function: FunctionHandleIndex(0), - visibility: Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![Bytecode::Call(FunctionHandleIndex(0)), Bytecode::Ret], - jump_tables: vec![], - }), - }); - - // create take_and_return_references - m.signatures.push(Signature( - std::iter::repeat(SignatureToken::Reference(Box::new(SignatureToken::U64))) - .take(NUM_LOCALS as usize) - .collect(), - )); - m.identifiers - .push(Identifier::new("take_and_return_references").unwrap()); - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(1), - parameters: SignatureIndex(1), - return_: SignatureIndex(1), - type_parameters: vec![], - }); - m.function_defs.push(FunctionDefinition { - function: FunctionHandleIndex(1), - visibility: Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![], - jump_tables: vec![], - }), - }); - let code = &mut m.function_defs[1].code.as_mut().unwrap().code; - for i in 0..NUM_LOCALS { - code.push(Bytecode::MoveLoc(i)); - } - code.push(Bytecode::Ret); - - // create swallow_references - m.identifiers - .push(Identifier::new("swallow_references").unwrap()); - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(2), - parameters: SignatureIndex(1), - return_: SignatureIndex(0), - type_parameters: vec![], - }); - m.function_defs.push(FunctionDefinition { - function: FunctionHandleIndex(2), - visibility: Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![Bytecode::Ret], - jump_tables: vec![], - }), - }); - - // create other functions - for i in 1..(NUM_FUNCTIONS + 1) { - m.identifiers - .push(Identifier::new(format!("f{}", i)).unwrap()); - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(i + 2), - parameters: SignatureIndex(1), - return_: SignatureIndex(0), - type_parameters: vec![], - }); - m.function_defs.push(FunctionDefinition { - function: FunctionHandleIndex(i + 2), - visibility: Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![], - jump_tables: vec![], - }), - }); - let code = &mut m.function_defs[i as usize + 2].code.as_mut().unwrap().code; - for j in 0..NUM_LOCALS { - code.push(Bytecode::CopyLoc(j)); - } - for _ in 0..NUM_CALLS { - code.push(Bytecode::Call(FunctionHandleIndex(1))); - } - code.push(Bytecode::Call(FunctionHandleIndex(2))); - code.push(Bytecode::Ret); - } - - let (verifier_config, meter_config) = production_config(); - let mut meter = BoundMeter::new(meter_config); - let result = move_bytecode_verifier::verify_module_with_config_for_test( - "test_bicliques", - &verifier_config, - &m, - &mut meter, - ); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::CONSTRAINT_NOT_SATISFIED - ); -} - -#[test] -fn test_merge_state_large_graph() { - // See also: github.com/aptos-labs/aptos-core/security/advisories/ - // GHSA-g8v8-fw4c-8h82 - const N: u8 = 127; - const NUM_NOP_BLOCKS: u16 = 950; - const NUM_FUNCTIONS: u16 = 18; - - let mut m = empty_module(); - - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(0), - parameters: SignatureIndex(0), - return_: SignatureIndex(0), - type_parameters: vec![], - }); - m.function_defs.push(FunctionDefinition { - function: FunctionHandleIndex(0), - visibility: Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![Bytecode::Call(FunctionHandleIndex(0)), Bytecode::Ret], - jump_tables: vec![], - }), - }); - - m.signatures.push(Signature( - std::iter::repeat(SignatureToken::Reference(Box::new(SignatureToken::U8))) - .take(N as usize) - .collect(), - )); - - m.identifiers.push(Identifier::new("return_refs").unwrap()); - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(1), - parameters: SignatureIndex(0), - return_: SignatureIndex(1), - type_parameters: vec![], - }); - m.function_defs.push(FunctionDefinition { - function: FunctionHandleIndex(1), - visibility: Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![Bytecode::Call(FunctionHandleIndex(1)), Bytecode::Ret], - jump_tables: vec![], - }), - }); - - m.identifiers - .push(Identifier::new("take_and_return_refs").unwrap()); - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(2), - parameters: SignatureIndex(1), - return_: SignatureIndex(1), - type_parameters: vec![], - }); - m.function_defs.push(FunctionDefinition { - function: FunctionHandleIndex(2), - visibility: Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![Bytecode::Call(FunctionHandleIndex(1)), Bytecode::Ret], - jump_tables: vec![], - }), - }); - - for i in 0..NUM_FUNCTIONS { - m.identifiers - .push(Identifier::new(format!("f{}", i)).unwrap()); - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(i + 3), - parameters: SignatureIndex(1), - return_: SignatureIndex(0), - type_parameters: vec![], - }); - m.function_defs.push(FunctionDefinition { - function: FunctionHandleIndex(i + 3), - visibility: Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(1), - code: vec![], - jump_tables: vec![], - }), - }); - let code = &mut m.function_defs[i as usize + 3].code.as_mut().unwrap().code; - for j in 0..N { - code.push(Bytecode::CopyLoc(j)); - } - code.push(Bytecode::Call(FunctionHandleIndex(2))); - for j in 0..N { - code.push(Bytecode::StLoc(N + j)); - } - for _ in 0..NUM_NOP_BLOCKS { - code.push(Bytecode::LdTrue); - code.push(Bytecode::BrTrue(0)); - } - - code.push(Bytecode::Ret); - } - - let (verifier_config, meter_config) = production_config(); - let mut meter = BoundMeter::new(meter_config); - let result = move_bytecode_verifier::verify_module_with_config_for_test( - "test_merge_state_large_graph", - &verifier_config, - &m, - &mut meter, - ); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::CONSTRAINT_NOT_SATISFIED - ); -} - -#[test] -fn test_merge_state() { - // See also: github.com/aptos-labs/aptos-core/security/advisories/ - // GHSA-g8v8-fw4c-8h82 - const NUM_NOP_BLOCKS: u16 = 965; - const NUM_LOCALS: u8 = 32; - const NUM_FUNCTIONS: u16 = 21; - - let mut m = empty_module(); - - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(0), - parameters: SignatureIndex(0), - return_: SignatureIndex(0), - type_parameters: vec![], - }); - m.function_defs.push(FunctionDefinition { - function: FunctionHandleIndex(0), - visibility: Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![Bytecode::Call(FunctionHandleIndex(0)), Bytecode::Ret], - jump_tables: vec![], - }), - }); - - m.signatures - .push(Signature(vec![SignatureToken::Reference(Box::new( - SignatureToken::U8, - ))])); - m.signatures.push(Signature( - std::iter::repeat(SignatureToken::Reference(Box::new(SignatureToken::U8))) - .take(NUM_LOCALS as usize - 1) - .collect(), - )); - - for i in 0..NUM_FUNCTIONS { - m.identifiers - .push(Identifier::new(format!("f{}", i)).unwrap()); - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(i + 1), - parameters: SignatureIndex(1), - return_: SignatureIndex(0), - type_parameters: vec![], - }); - m.function_defs.push(FunctionDefinition { - function: FunctionHandleIndex(i + 1), - visibility: Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(2), - code: vec![], - jump_tables: vec![], - }), - }); - let code = &mut m.function_defs[i as usize + 1].code.as_mut().unwrap().code; - // create reference id - code.push(Bytecode::CopyLoc(0)); - code.push(Bytecode::StLoc(1)); - // create a path of length NUM_LOCALS - 1 in the borrow graph - for j in 0..(NUM_LOCALS - 2) { - // create Ref(new_id) and factor in empty-path edge id -> new_id - code.push(Bytecode::CopyLoc(1)); - // can't leave those references on stack since basic blocks need to be - // stack-neutral - code.push(Bytecode::StLoc(j + 2)); - } - for _ in 0..NUM_NOP_BLOCKS { - code.push(Bytecode::LdTrue); - // create back edge to first block - code.push(Bytecode::BrTrue(0)); - } - - code.push(Bytecode::Ret); - } - - let (verifier_config, meter_config) = production_config(); - let mut meter = BoundMeter::new(meter_config); - let result = move_bytecode_verifier::verify_module_with_config_for_test( - "test_merge_state", - &verifier_config, - &m, - &mut meter, - ); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::CONSTRAINT_NOT_SATISFIED - ); -} - -#[test] -fn test_copyloc_pop() { - // See also: github.com/aptos-labs/aptos-core/security/advisories/ - // GHSA-2qvr-c9qp-wch7 - const NUM_COPYLOCS: u16 = 1880; - const NUM_CHILDREN: u16 = 1020; - const NUM_FUNCTIONS: u16 = 2; - - let mut m = empty_module(); - - // parameters of f0, f1, ... - m.signatures - .push(Signature(vec![SignatureToken::Reference(Box::new( - SignatureToken::Vector(Box::new(SignatureToken::U8)), - ))])); - // locals of f0, f1, ... - m.signatures.push(Signature(vec![ - SignatureToken::Reference(Box::new(SignatureToken::Vector(Box::new( - SignatureToken::U8, - )))), - SignatureToken::U8, /* ignore this, it's just here because I don't want to fix indices - * and the TypeParameter after removing the collision */ - ])); - // for VecImmBorrow - m.signatures.push(Signature( - std::iter::repeat(SignatureToken::U8).take(1).collect(), - )); - m.signatures - .push(Signature(vec![SignatureToken::TypeParameter(0)])); - - for i in 0..NUM_FUNCTIONS { - m.identifiers - .push(Identifier::new(format!("f{}", i)).unwrap()); - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(i), - parameters: SignatureIndex(1), - return_: SignatureIndex(0), - type_parameters: vec![], - }); - m.function_defs.push(FunctionDefinition { - function: FunctionHandleIndex(i), - visibility: Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(2), - code: vec![], - jump_tables: vec![], - }), - }); - let code = &mut m.function_defs[i as usize].code.as_mut().unwrap().code; - - // create reference id - code.push(Bytecode::CopyLoc(0)); - code.push(Bytecode::StLoc(1)); - // create NUM_CHLIDREN children of id - for _ in 0..NUM_CHILDREN { - code.push(Bytecode::CopyLoc(1)); - code.push(Bytecode::LdU64(0)); - code.push(Bytecode::VecImmBorrow(SignatureIndex(3))); - } - // then do a whole lot of copylocs on that reference - for _ in 0..NUM_COPYLOCS { - code.push(Bytecode::CopyLoc(1)); - code.push(Bytecode::Pop); - } - for _ in 0..NUM_CHILDREN { - code.push(Bytecode::Pop); - } - - code.push(Bytecode::Ret); - } - - let (verifier_config, meter_config) = production_config(); - let mut meter = BoundMeter::new(meter_config); - let result = move_bytecode_verifier::verify_module_with_config_for_test( - "test_copyloc_pop", - &verifier_config, - &m, - &mut meter, - ); - assert_eq!( - result.unwrap_err().major_status(), - StatusCode::CONSTRAINT_NOT_SATISFIED - ); -} diff --git a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/signature_tests.rs b/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/signature_tests.rs deleted file mode 100644 index 5e9ad8923fc..00000000000 --- a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/signature_tests.rs +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) The Diem Core Contributors -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use move_binary_format::file_format::{ - Bytecode::*, CompiledModule, SignatureToken::*, Visibility::Public, *, -}; -use move_bytecode_verifier::{ - ability_cache::AbilityCache, verify_module_unmetered, verify_module_with_config_for_test, - SignatureChecker, -}; -use move_bytecode_verifier_meter::dummy::DummyMeter; -use move_core_types::{ - account_address::AccountAddress, identifier::Identifier, vm_status::StatusCode, -}; - -use crate::unit_tests::production_config; - -#[test] -fn test_reference_of_reference() { - let mut m = basic_test_module(); - m.signatures[0] = Signature(vec![Reference(Box::new(Reference(Box::new( - SignatureToken::Bool, - ))))]); - let ability_cache = &mut AbilityCache::new(&m); - let errors = SignatureChecker::verify_module(&m, ability_cache, &mut DummyMeter); - assert!(errors.is_err()); -} - -#[test] -fn no_verify_locals_good() { - let compiled_module_good = CompiledModule { - version: move_binary_format::file_format_common::VERSION_MAX, - module_handles: vec![ModuleHandle { - address: AddressIdentifierIndex(0), - name: IdentifierIndex(0), - }], - self_module_handle_idx: ModuleHandleIndex(0), - datatype_handles: vec![], - signatures: vec![ - Signature(vec![Address]), - Signature(vec![U64]), - Signature(vec![]), - ], - function_handles: vec![ - FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(1), - return_: SignatureIndex(2), - parameters: SignatureIndex(0), - type_parameters: vec![], - }, - FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(2), - return_: SignatureIndex(2), - parameters: SignatureIndex(1), - type_parameters: vec![], - }, - ], - field_handles: vec![], - friend_decls: vec![], - struct_def_instantiations: vec![], - function_instantiations: vec![], - field_instantiations: vec![], - identifiers: vec![ - Identifier::new("Bad").unwrap(), - Identifier::new("blah").unwrap(), - Identifier::new("foo").unwrap(), - ], - address_identifiers: vec![AccountAddress::new([0; AccountAddress::LENGTH])], - constant_pool: vec![], - metadata: vec![], - struct_defs: vec![], - function_defs: vec![ - FunctionDefinition { - function: FunctionHandleIndex(0), - visibility: Visibility::Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![Ret], - jump_tables: vec![], - }), - }, - FunctionDefinition { - function: FunctionHandleIndex(1), - visibility: Visibility::Public, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(1), - code: vec![Ret], - jump_tables: vec![], - }), - }, - ], - enum_defs: vec![], - enum_def_instantiations: vec![], - variant_handles: vec![], - variant_instantiation_handles: vec![], - }; - assert!(verify_module_unmetered(&compiled_module_good).is_ok()); -} - -#[test] -fn big_signature_test() { - const N_TYPE_PARAMS: usize = 5; - const INSTANTIATION_DEPTH: usize = 3; - const VECTOR_DEPTH: usize = 250; - let mut st = SignatureToken::U8; - for _ in 0..VECTOR_DEPTH { - st = SignatureToken::Vector(Box::new(st)); - } - for _ in 0..INSTANTIATION_DEPTH { - let type_params = vec![st; N_TYPE_PARAMS]; - st = SignatureToken::DatatypeInstantiation(Box::new((DatatypeHandleIndex(0), type_params))); - } - - const N_READPOP: u16 = 7500; - - let mut code = vec![]; - // 1. ImmBorrowLoc: ... ref - // 2. ReadRef: ... value - // 3. Pop: ... - for _ in 0..N_READPOP { - code.push(Bytecode::ImmBorrowLoc(0)); - code.push(Bytecode::ReadRef); - code.push(Bytecode::Pop); - } - code.push(Bytecode::Ret); - - let type_param_constraints = DatatypeTyParameter { - constraints: AbilitySet::EMPTY, - is_phantom: false, - }; - - let module = CompiledModule { - version: 5, - self_module_handle_idx: ModuleHandleIndex(0), - module_handles: vec![ModuleHandle { - address: AddressIdentifierIndex(0), - name: IdentifierIndex(0), - }], - datatype_handles: vec![DatatypeHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(1), - abilities: AbilitySet::ALL, - type_parameters: vec![type_param_constraints; N_TYPE_PARAMS], - }], - function_handles: vec![FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(0), - parameters: SignatureIndex(1), - return_: SignatureIndex(0), - type_parameters: vec![], - }], - field_handles: vec![], - friend_decls: vec![], - struct_def_instantiations: vec![], - function_instantiations: vec![], - field_instantiations: vec![], - signatures: vec![Signature(vec![]), Signature(vec![st])], - identifiers: vec![ - Identifier::new("f").unwrap(), - Identifier::new("generic_struct").unwrap(), - ], - address_identifiers: vec![AccountAddress::ONE], - constant_pool: vec![], - metadata: vec![], - struct_defs: vec![StructDefinition { - struct_handle: DatatypeHandleIndex(0), - field_information: StructFieldInformation::Native, - }], - function_defs: vec![FunctionDefinition { - function: FunctionHandleIndex(0), - visibility: Public, - is_entry: true, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(0), - code, - jump_tables: vec![], - }), - }], - enum_def_instantiations: vec![], - enum_defs: vec![], - variant_handles: vec![], - variant_instantiation_handles: vec![], - }; - - // save module and verify that it can ser/de - let mut mvbytes = vec![]; - module.serialize(&mut mvbytes).unwrap(); - let module = CompiledModule::deserialize_with_defaults(&mvbytes).unwrap(); - - let res = verify_module_with_config_for_test( - "big_signature_test", - &production_config().0, - &module, - &mut DummyMeter, - ) - .unwrap_err(); - assert_eq!(res.major_status(), StatusCode::TOO_MANY_TYPE_NODES); -} diff --git a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/vec_pack_tests.rs b/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/vec_pack_tests.rs deleted file mode 100644 index 1f7c54d8991..00000000000 --- a/external-crates/move/move-execution/v0/crates/bytecode-verifier-tests/src/unit_tests/vec_pack_tests.rs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use move_binary_format::file_format::{ - empty_module, Bytecode, CodeUnit, FunctionDefinition, FunctionHandle, FunctionHandleIndex, - IdentifierIndex, ModuleHandleIndex, Signature, SignatureIndex, SignatureToken, Visibility, -}; -use move_bytecode_verifier_meter::dummy::DummyMeter; -use move_core_types::{identifier::Identifier, vm_status::StatusCode}; - -use crate::unit_tests::production_config; - -fn vec_sig(len: usize) -> SignatureToken { - if len > 0 { - SignatureToken::Vector(Box::new(vec_sig(len - 1))) - } else { - SignatureToken::U8 - } -} - -#[test] -fn test_vec_pack() { - let mut m = empty_module(); - - let sig = SignatureIndex(m.signatures.len() as u16); - m.signatures.push(Signature(vec![vec_sig(255)])); - - m.function_defs.push(FunctionDefinition { - function: FunctionHandleIndex(0), - visibility: Visibility::Private, - is_entry: false, - acquires_global_resources: vec![], - code: Some(CodeUnit { - locals: SignatureIndex(0), - code: vec![], - jump_tables: vec![], - }), - }); - - m.function_handles.push(FunctionHandle { - module: ModuleHandleIndex(0), - name: IdentifierIndex(m.identifiers.len() as u16), - parameters: SignatureIndex(0), - return_: SignatureIndex(0), - type_parameters: vec![], - }); - m.identifiers - .push(Identifier::new("foo".to_string()).unwrap()); - - const COUNT: usize = 3000; - - m.function_defs[0].code.as_mut().unwrap().code = - std::iter::once(&[Bytecode::VecPack(sig, 0)][..]) - .chain( - std::iter::repeat( - &[Bytecode::VecUnpack(sig, 1024), Bytecode::VecPack(sig, 1024)][..], - ) - .take(COUNT), - ) - .chain(std::iter::once(&[Bytecode::Pop, Bytecode::Ret][..])) - .flatten() - .cloned() - .collect(); - - let res = move_bytecode_verifier::verify_module_with_config_for_test( - "test_vec_pack", - &production_config().0, - &m, - &mut DummyMeter, - ) - .unwrap_err(); - assert_eq!(res.major_status(), StatusCode::VALUE_STACK_PUSH_OVERFLOW); -} diff --git a/external-crates/move/move-execution/v0/crates/move-abstract-interpreter/Cargo.toml b/external-crates/move/move-execution/v0/crates/move-abstract-interpreter/Cargo.toml deleted file mode 100644 index b0dd9fc240b..00000000000 --- a/external-crates/move/move-execution/v0/crates/move-abstract-interpreter/Cargo.toml +++ /dev/null @@ -1,18 +0,0 @@ -[package] -name = "move-abstract-interpreter-v0" -version = "0.1.0" -authors = ["The Move Contributors"] -edition = "2021" -license = "Apache-2.0" -publish = false -description = "Move abstract interpreter" - -[dependencies] -move-binary-format.workspace = true -move-bytecode-verifier-meter.workspace = true - -[dev-dependencies] -itertools.workspace = true - -[features] -default = [] diff --git a/external-crates/move/move-execution/v0/crates/move-abstract-interpreter/src/absint.rs b/external-crates/move/move-execution/v0/crates/move-abstract-interpreter/src/absint.rs deleted file mode 100644 index 480ff082c60..00000000000 --- a/external-crates/move/move-execution/v0/crates/move-abstract-interpreter/src/absint.rs +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright (c) The Diem Core Contributors -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::collections::BTreeMap; - -use move_binary_format::{ - errors::PartialVMResult, - file_format::{ - AbilitySet, Bytecode, CodeOffset, CodeUnit, FunctionDefinitionIndex, FunctionHandle, - Signature, - }, - CompiledModule, -}; -use move_bytecode_verifier_meter::{Meter, Scope}; - -use crate::control_flow_graph::{BlockId, ControlFlowGraph, VMControlFlowGraph}; - -/// A `FunctionContext` holds all the information needed by the verifier for -/// `FunctionDefinition`.` A control flow graph is built for a function when the -/// `FunctionContext` is created. -pub struct FunctionContext<'a> { - index: Option, - code: &'a CodeUnit, - parameters: &'a Signature, - return_: &'a Signature, - locals: &'a Signature, - type_parameters: &'a [AbilitySet], - cfg: VMControlFlowGraph, -} - -/// Trait for finite-height abstract domains. Infinite height domains would -/// require a more complex trait with widening and a partial order. -pub trait AbstractDomain: Clone + Sized { - fn join( - &mut self, - other: &Self, - meter: &mut (impl Meter + ?Sized), - ) -> PartialVMResult; -} - -#[derive(Debug)] -pub enum JoinResult { - Changed, - Unchanged, -} - -#[allow(dead_code)] -#[derive(Clone)] -pub struct BlockInvariant { - /// Precondition of the block - pre: State, -} - -/// A map from block id's to the pre/post of each block after a fixed point is -/// reached. -#[allow(dead_code)] -pub type InvariantMap = BTreeMap>; - -/// Costs for metered verification -const ANALYZE_FUNCTION_BASE_COST: u128 = 10; -const EXECUTE_BLOCK_BASE_COST: u128 = 10; -const PER_BACKEDGE_COST: u128 = 10; -const PER_SUCCESSOR_COST: u128 = 10; - -/// Take a pre-state + instruction and mutate it to produce a post-state -/// Auxiliary data can be stored in self. -pub trait TransferFunctions { - type State: AbstractDomain; - type Error; - - /// Execute local@instr found at index local@index in the current basic - /// block from pre-state local@pre. - /// Should return an AnalysisError if executing the instruction is - /// unsuccessful, and () if the effects of successfully executing - /// local@instr have been reflected by mutatating local@pre. - /// Auxiliary data from the analysis that is not part of the abstract state - /// can be collected by mutating local@self. - /// The last instruction index in the current block is local@last_index. - /// Knowing this information allows clients to detect the end of a basic - /// block and special-case appropriately (e.g., normalizing the abstract - /// state before a join). - fn execute( - &mut self, - pre: &mut Self::State, - instr: &Bytecode, - index: CodeOffset, - last_index: CodeOffset, - meter: &mut (impl Meter + ?Sized), - ) -> PartialVMResult<()>; -} - -pub trait AbstractInterpreter: TransferFunctions { - /// Analyze procedure local@function_context starting from pre-state - /// local@initial_state. - fn analyze_function( - &mut self, - initial_state: Self::State, - function_context: &FunctionContext, - meter: &mut (impl Meter + ?Sized), - ) -> PartialVMResult<()> { - meter.add(Scope::Function, ANALYZE_FUNCTION_BASE_COST)?; - let mut inv_map = InvariantMap::new(); - let entry_block_id = function_context.cfg().entry_block_id(); - let mut next_block = Some(entry_block_id); - inv_map.insert(entry_block_id, BlockInvariant { pre: initial_state }); - - while let Some(block_id) = next_block { - let block_invariant = match inv_map.get_mut(&block_id) { - Some(invariant) => invariant, - None => { - // This can only happen when all predecessors have errors, - // so skip the block and move on to the next one - next_block = function_context.cfg().next_block(block_id); - continue; - } - }; - - let pre_state = &block_invariant.pre; - // Note: this will stop analysis after the first error occurs, to avoid the risk - // of subsequent crashes - let post_state = self.execute_block(block_id, pre_state, function_context, meter)?; - - let mut next_block_candidate = function_context.cfg().next_block(block_id); - // propagate postcondition of this block to successor blocks - for successor_block_id in function_context.cfg().successors(block_id) { - meter.add(Scope::Function, PER_SUCCESSOR_COST)?; - match inv_map.get_mut(successor_block_id) { - Some(next_block_invariant) => { - let join_result = { - let old_pre = &mut next_block_invariant.pre; - old_pre.join(&post_state, meter) - }?; - match join_result { - JoinResult::Unchanged => { - // Pre is the same after join. Reanalyzing this - // block would produce - // the same post - } - JoinResult::Changed => { - // If the cur->successor is a back edge, jump back to the beginning - // of the loop, instead of the normal next block - if function_context - .cfg() - .is_back_edge(block_id, *successor_block_id) - { - meter.add(Scope::Function, PER_BACKEDGE_COST)?; - next_block_candidate = Some(*successor_block_id); - break; - } - } - } - } - None => { - // Haven't visited the next block yet. Use the post of the current block as - // its pre - inv_map.insert( - *successor_block_id, - BlockInvariant { - pre: post_state.clone(), - }, - ); - } - } - } - next_block = next_block_candidate; - } - Ok(()) - } - - fn execute_block( - &mut self, - block_id: BlockId, - pre_state: &Self::State, - function_context: &FunctionContext, - meter: &mut (impl Meter + ?Sized), - ) -> PartialVMResult { - meter.add(Scope::Function, EXECUTE_BLOCK_BASE_COST)?; - let mut state_acc = pre_state.clone(); - let block_end = function_context.cfg().block_end(block_id); - for offset in function_context.cfg().instr_indexes(block_id) { - let instr = &function_context.code().code[offset as usize]; - self.execute(&mut state_acc, instr, offset, block_end, meter)? - } - Ok(state_acc) - } -} - -impl<'a> FunctionContext<'a> { - // Creates a `FunctionContext` for a module function. - pub fn new( - module: &'a CompiledModule, - index: FunctionDefinitionIndex, - code: &'a CodeUnit, - function_handle: &'a FunctionHandle, - ) -> Self { - Self { - index: Some(index), - code, - parameters: module.signature_at(function_handle.parameters), - return_: module.signature_at(function_handle.return_), - locals: module.signature_at(code.locals), - type_parameters: &function_handle.type_parameters, - cfg: VMControlFlowGraph::new(&code.code, &code.jump_tables), - } - } - - pub fn index(&self) -> Option { - self.index - } - - pub fn code(&self) -> &'a CodeUnit { - self.code - } - - pub fn parameters(&self) -> &'a Signature { - self.parameters - } - - pub fn return_(&self) -> &'a Signature { - self.return_ - } - - pub fn locals(&self) -> &'a Signature { - self.locals - } - - pub fn type_parameters(&self) -> &'a [AbilitySet] { - self.type_parameters - } - - pub fn cfg(&self) -> &VMControlFlowGraph { - &self.cfg - } -} diff --git a/external-crates/move/move-execution/v0/crates/move-abstract-interpreter/src/control_flow_graph.rs b/external-crates/move/move-execution/v0/crates/move-abstract-interpreter/src/control_flow_graph.rs deleted file mode 100644 index 1ee2a267829..00000000000 --- a/external-crates/move/move-execution/v0/crates/move-abstract-interpreter/src/control_flow_graph.rs +++ /dev/null @@ -1,353 +0,0 @@ -// Copyright (c) The Diem Core Contributors -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -//! This module defines the control-flow graph uses for bytecode verification. -use move_binary_format::file_format::{Bytecode, CodeOffset, VariantJumpTable}; -use std::collections::{btree_map::Entry, BTreeMap, BTreeSet}; - -// BTree/Hash agnostic type wrappers -type Map = BTreeMap; -type Set = BTreeSet; - -pub type BlockId = CodeOffset; - -/// A trait that specifies the basic requirements for a CFG -pub trait ControlFlowGraph { - /// Start index of the block ID in the bytecode vector - fn block_start(&self, block_id: BlockId) -> CodeOffset; - - /// End index of the block ID in the bytecode vector - fn block_end(&self, block_id: BlockId) -> CodeOffset; - - /// Successors of the block ID in the bytecode vector - fn successors(&self, block_id: BlockId) -> &Vec; - - /// Return the next block in traversal order - fn next_block(&self, block_id: BlockId) -> Option; - - /// Iterator over the indexes of instructions in this block - fn instr_indexes(&self, block_id: BlockId) -> Box>; - - /// Return an iterator over the blocks of the CFG - fn blocks(&self) -> Vec; - - /// Return the number of blocks (vertices) in the control flow graph - fn num_blocks(&self) -> u16; - - /// Return the id of the entry block for this control-flow graph - /// Note: even a CFG with no instructions has an (empty) entry block. - fn entry_block_id(&self) -> BlockId; - - /// Checks if the block ID is a loop head - fn is_loop_head(&self, block_id: BlockId) -> bool; - - /// Checks if the edge from cur->next is a back edge - /// returns false if the edge is not in the cfg - fn is_back_edge(&self, cur: BlockId, next: BlockId) -> bool; - - /// Return the number of back edges in the cfg - fn num_back_edges(&self) -> usize; -} - -struct BasicBlock { - exit: CodeOffset, - successors: Vec, -} - -/// The control flow graph that we build from the bytecode. -pub struct VMControlFlowGraph { - /// The basic blocks - blocks: Map, - /// Basic block ordering for traversal - traversal_successors: Map, - /// Map of loop heads with all of their back edges - loop_heads: Map>, -} - -impl BasicBlock { - pub fn display(&self, entry: BlockId) { - println!("+=======================+"); - println!("| Enter: {} |", entry); - println!("+-----------------------+"); - println!("==> Children: {:?}", self.successors); - println!("+-----------------------+"); - println!("| Exit: {} |", self.exit); - println!("+=======================+"); - } -} - -const ENTRY_BLOCK_ID: BlockId = 0; - -impl VMControlFlowGraph { - pub fn new(code: &[Bytecode], jump_tables: &[VariantJumpTable]) -> Self { - let code_len = code.len() as CodeOffset; - // First go through and collect block ids, i.e., offsets that begin basic - // blocks. Need to do this first in order to handle backwards edges. - let mut block_ids = Set::new(); - block_ids.insert(ENTRY_BLOCK_ID); - for pc in 0..code.len() { - VMControlFlowGraph::record_block_ids( - pc as CodeOffset, - code, - jump_tables, - &mut block_ids, - ); - } - - // Create basic blocks - let mut blocks = Map::new(); - let mut entry = 0; - let mut exit_to_entry = Map::new(); - for pc in 0..code.len() { - let co_pc = pc as CodeOffset; - - // Create a basic block - if Self::is_end_of_block(co_pc, code, &block_ids) { - let exit = co_pc; - exit_to_entry.insert(exit, entry); - let successors = Bytecode::get_successors(co_pc, code, jump_tables); - let bb = BasicBlock { exit, successors }; - blocks.insert(entry, bb); - entry = co_pc + 1; - } - } - let blocks = blocks; - assert_eq!(entry, code_len); - - // # Loop analysis - // - // This section identifies loops in the control-flow graph, picks a back edge - // and loop head (the basic block the back edge returns to), and decides - // the order that blocks are traversed during abstract interpretation - // (reverse post-order). - // - // The implementation is based on the algorithm for finding widening points in - // Section 4.1, "Depth-first numbering" of Bourdoncle [1993], "Efficient - // chaotic iteration strategies with widenings." - // - // NB. The comments below refer to a block's sub-graph -- the reflexive - // transitive closure of its successor edges, modulo cycles. - - #[derive(Copy, Clone)] - enum Exploration { - InProgress, - Done, - } - - let mut exploration: Map = Map::new(); - let mut stack = vec![ENTRY_BLOCK_ID]; - - // For every loop in the CFG that is reachable from the entry block, there is an - // entry in `loop_heads` mapping to all the back edges pointing to it, - // and vice versa. - // - // Entry in `loop_heads` implies loop in the CFG is justified by the comments in - // the loop below. Loop in the CFG implies entry in `loop_heads` is - // justified by considering the point at which the first node in that - // loop, `F` is added to the `exploration` map: - // - // - By definition `F` is part of a loop, meaning there is a block `L` such - // that: - // - // F - ... -> L -> F - // - // - `F` will not transition to `Done` until all the nodes reachable from it - // (including `L`) have been visited. - // - Because `F` is the first node seen in the loop, all the other nodes in the - // loop (including `L`) will be visited while `F` is `InProgress`. - // - Therefore, we will process the `L -> F` edge while `F` is `InProgress`. - // - Therefore, we will record a back edge to it. - let mut loop_heads: Map> = Map::new(); - - // Blocks appear in `post_order` after all the blocks in their (non-reflexive) - // sub-graph. - let mut post_order = Vec::with_capacity(blocks.len()); - - while let Some(block) = stack.pop() { - match exploration.entry(block) { - Entry::Vacant(entry) => { - // Record the fact that exploration of this block and its sub-graph has started. - entry.insert(Exploration::InProgress); - - // Push the block back on the stack to finish processing it, and mark it as done - // once its sub-graph has been traversed. - stack.push(block); - - for succ in &blocks[&block].successors { - match exploration.get(succ) { - // This successor has never been visited before, add it to the stack to - // be explored before `block` gets marked `Done`. - None => stack.push(*succ), - - // This block's sub-graph was being explored, meaning it is a (reflexive - // transitive) predecessor of `block` as well as being a successor, - // implying a loop has been detected -- greedily choose the successor - // block as the loop head. - Some(Exploration::InProgress) => { - loop_heads.entry(*succ).or_default().insert(block); - } - - // Cross-edge detected, this block and its entire sub-graph (modulo - // cycles) has already been explored via a different path, and is - // already present in `post_order`. - Some(Exploration::Done) => { /* skip */ } - }; - } - } - - Entry::Occupied(mut entry) => match entry.get() { - // Already traversed the sub-graph reachable from this block, so skip it. - Exploration::Done => continue, - - // Finish up the traversal by adding this block to the post-order traversal - // after its sub-graph (modulo cycles). - Exploration::InProgress => { - post_order.push(block); - entry.insert(Exploration::Done); - } - }, - } - } - - let traversal_order = { - // This reverse post order is akin to a topological sort (ignoring cycles) and - // is different from a pre-order in the presence of diamond patterns - // in the graph. - post_order.reverse(); - post_order - }; - - // build a mapping from a block id to the next block id in the traversal order - let traversal_successors = traversal_order - .windows(2) - .map(|window| { - debug_assert!(window.len() == 2); - (window[0], window[1]) - }) - .collect(); - - VMControlFlowGraph { - blocks, - traversal_successors, - loop_heads, - } - } - - pub fn display(&self) { - for (entry, block) in &self.blocks { - block.display(*entry); - } - println!("Traversal: {:#?}", self.traversal_successors); - } - - fn is_end_of_block(pc: CodeOffset, code: &[Bytecode], block_ids: &Set) -> bool { - pc + 1 == (code.len() as CodeOffset) || block_ids.contains(&(pc + 1)) - } - - fn record_block_ids( - pc: CodeOffset, - code: &[Bytecode], - jump_tables: &[VariantJumpTable], - block_ids: &mut Set, - ) { - let bytecode = &code[pc as usize]; - - block_ids.extend(bytecode.offsets(jump_tables)); - - if bytecode.is_branch() && pc + 1 < (code.len() as CodeOffset) { - block_ids.insert(pc + 1); - } - } - - /// A utility function that implements BFS-reachability from block_id with - /// respect to get_targets function - fn traverse_by(&self, block_id: BlockId) -> Vec { - let mut ret = Vec::new(); - // We use this index to keep track of our frontier. - let mut index = 0; - // Guard against cycles - let mut seen = Set::new(); - - ret.push(block_id); - seen.insert(&block_id); - - while index < ret.len() { - let block_id = ret[index]; - index += 1; - let successors = self.successors(block_id); - for block_id in successors.iter() { - if !seen.contains(&block_id) { - ret.push(*block_id); - seen.insert(block_id); - } - } - } - - ret - } - - pub fn reachable_from(&self, block_id: BlockId) -> Vec { - self.traverse_by(block_id) - } -} - -impl ControlFlowGraph for VMControlFlowGraph { - // Note: in the following procedures, it's safe not to check bounds because: - // - Every CFG (even one with no instructions) has a block at ENTRY_BLOCK_ID - // - The only way to acquire new BlockId's is via block_successors() - // - block_successors only() returns valid BlockId's - // Note: it is still possible to get a BlockId from one CFG and use it in - // another CFG where it is not valid. The design does not attempt to prevent - // this abuse of the API. - - fn block_start(&self, block_id: BlockId) -> CodeOffset { - block_id - } - - fn block_end(&self, block_id: BlockId) -> CodeOffset { - self.blocks[&block_id].exit - } - - fn successors(&self, block_id: BlockId) -> &Vec { - &self.blocks[&block_id].successors - } - - fn next_block(&self, block_id: BlockId) -> Option { - debug_assert!(self.blocks.contains_key(&block_id)); - self.traversal_successors.get(&block_id).copied() - } - - fn instr_indexes(&self, block_id: BlockId) -> Box> { - Box::new(self.block_start(block_id)..=self.block_end(block_id)) - } - - fn blocks(&self) -> Vec { - self.blocks.keys().cloned().collect() - } - - fn num_blocks(&self) -> u16 { - self.blocks.len() as u16 - } - - fn entry_block_id(&self) -> BlockId { - ENTRY_BLOCK_ID - } - - fn is_loop_head(&self, block_id: BlockId) -> bool { - self.loop_heads.contains_key(&block_id) - } - - fn is_back_edge(&self, cur: BlockId, next: BlockId) -> bool { - self.loop_heads - .get(&next) - .map_or(false, |back_edges| back_edges.contains(&cur)) - } - - fn num_back_edges(&self) -> usize { - self.loop_heads - .iter() - .fold(0, |acc, (_, edges)| acc + edges.len()) - } -} diff --git a/external-crates/move/move-execution/v0/crates/move-abstract-interpreter/src/lib.rs b/external-crates/move/move-execution/v0/crates/move-abstract-interpreter/src/lib.rs deleted file mode 100644 index e103979117e..00000000000 --- a/external-crates/move/move-execution/v0/crates/move-abstract-interpreter/src/lib.rs +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -pub mod absint; -pub mod control_flow_graph; - -#[cfg(test)] -mod unit_tests; diff --git a/external-crates/move/move-execution/v0/crates/move-abstract-interpreter/src/unit_tests/control_flow_graph_tests.rs b/external-crates/move/move-execution/v0/crates/move-abstract-interpreter/src/unit_tests/control_flow_graph_tests.rs deleted file mode 100644 index 83cb0ca6fe3..00000000000 --- a/external-crates/move/move-execution/v0/crates/move-abstract-interpreter/src/unit_tests/control_flow_graph_tests.rs +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use itertools::Itertools; - -use crate::control_flow_graph::{BlockId, ControlFlowGraph, VMControlFlowGraph}; - -use move_binary_format::file_format::{ - Bytecode, EnumDefinitionIndex, JumpTableInner, VariantJumpTable, VariantJumpTableIndex, -}; - -#[test] -fn traversal_no_loops() { - let cfg = { - use Bytecode::*; - VMControlFlowGraph::new( - &[ - /* L0 */ LdTrue, - /* */ BrTrue(3), - /* L2 */ Branch(3), - /* L3 */ Ret, - ], - &[], - ) - }; - - cfg.display(); - assert_eq!(cfg.num_blocks(), 3); - assert_eq!(traversal(&cfg), vec![0, 2, 3]); -} - -#[test] -fn traversal_no_loops_with_switch() { - let cfg = { - use Bytecode::*; - VMControlFlowGraph::new( - &[ - /* L0 */ VariantSwitch(VariantJumpTableIndex::new(0)), - /* */ Nop, - /* */ Nop, - /* */ Nop, - /* */ Nop, - /* */ Nop, - /* */ BrTrue(8), - /* L2 */ Branch(8), - /* L3 */ Ret, - ], - &[VariantJumpTable { - // Doesn't matter - head_enum: EnumDefinitionIndex::new(0), - jump_table: JumpTableInner::Full(vec![1, 8, 2, 4]), - }], - ) - }; - - cfg.display(); - assert_eq!(cfg.num_blocks(), 6); - assert_eq!(dbg!(traversal(&cfg)), vec![0, 1, 2, 4, 7, 8]); -} - -#[test] -fn traversal_loops() { - let cfg = { - use Bytecode::*; - VMControlFlowGraph::new( - &[ - /* L0: Outer head */ LdTrue, - /* Outer break */ BrTrue(6), - /* L2: Inner head */ LdTrue, - /* Inner break */ BrTrue(5), - /* L4: Inner continue */ Branch(2), - /* Outer continue */ Branch(0), - /* L6: */ Ret, - ], - &[], - ) - }; - - cfg.display(); - assert_eq!(cfg.num_blocks(), 5); - assert_eq!(traversal(&cfg), vec![0, 2, 4, 5, 6]); -} - -#[test] -fn traversal_loops_with_switch() { - let cfg = { - use Bytecode::*; - VMControlFlowGraph::new( - &[ - /* L0: Outer head */ LdTrue, - /* Outer break */ BrTrue(4), - /* L2: Inner head */ VariantSwitch(VariantJumpTableIndex::new(0)), - /* Outer continue */ Branch(0), - /* L6: */ Ret, - ], - &[VariantJumpTable { - // Doesn't matter - head_enum: EnumDefinitionIndex::new(0), - jump_table: JumpTableInner::Full(vec![ - /* Inner break */ 3, /* Inner continue */ 2, - ]), - }], - ) - }; - - cfg.display(); - assert_eq!(cfg.num_blocks(), 4); - assert_eq!(traversal(&cfg), vec![0, 2, 3, 4]); -} - -#[test] -fn traversal_non_loop_back_branch() { - let cfg = { - use Bytecode::*; - VMControlFlowGraph::new( - &[ - /* L0 */ Branch(2), - /* L1 */ Ret, - /* L2 */ Branch(1), - ], - &[], - ) - }; - - cfg.display(); - assert_eq!(cfg.num_blocks(), 3); - assert_eq!(traversal(&cfg), vec![0, 2, 1]); -} - -#[test] -fn traversal_non_loop_back_branch_variant_switch() { - let cfg = { - use Bytecode::*; - VMControlFlowGraph::new( - &[ - /* L0 */ VariantSwitch(VariantJumpTableIndex::new(0)), - /* L1 */ Ret, - /* L2 */ Branch(1), - ], - &[VariantJumpTable { - // Doesn't matter - head_enum: EnumDefinitionIndex::new(0), - jump_table: JumpTableInner::Full(vec![2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]), - }], - ) - }; - - cfg.display(); - assert_eq!(cfg.num_blocks(), 3); - assert_eq!(traversal(&cfg), vec![0, 2, 1]); -} - -#[test] -fn out_of_order_blocks_variant_switch() { - const PERMUTATION_BOUND: usize = 2000; - - let blocks = (0..=127) - .map(|i| { - ( - i, - vec![ - Bytecode::Pop, // Pop the value from the variant switch - Bytecode::LdU16(i), // Ld the number so we can track what block this is canonically - Bytecode::Pop, // Then pop it - Bytecode::Ret, // Then ret - ], - ) - }) - .collect::>(); - - let block_len = blocks.last().unwrap().1.len() as u16; - - let (canonical_blocks, canonical_traversal) = { - let jump_table = - JumpTableInner::Full(blocks.iter().map(|(i, _)| 1 + *i * block_len).collect()); - let mut start_block = vec![Bytecode::VariantSwitch(VariantJumpTableIndex::new(0))]; - start_block.extend(blocks.clone().into_iter().flat_map(|(_, block)| block)); - - let cfg = VMControlFlowGraph::new( - &start_block, - &[VariantJumpTable { - // Doesn't matter - head_enum: EnumDefinitionIndex::new(0), - jump_table, - }], - ); - - cfg.display(); - (cfg.num_blocks(), traversal(&cfg)) - }; - - assert_eq!(canonical_blocks, 129); - assert_eq!(canonical_traversal.len(), 129); - - for permutation in blocks.into_iter().permutations(128).take(PERMUTATION_BOUND) { - // orig index => new_index - // identity permutation == perm[i] == i; - let mut perm = vec![]; - let mut blocks = vec![Bytecode::VariantSwitch(VariantJumpTableIndex::new(0))]; - for (index, mut block) in permutation.into_iter() { - perm.push(index); - blocks.append(&mut block); - } - - let jump_table = JumpTableInner::Full(perm.iter().map(|i| 1 + *i * block_len).collect()); - - let cfg = VMControlFlowGraph::new( - &blocks, - &[VariantJumpTable { - // Doesn't matter - head_enum: EnumDefinitionIndex::new(0), - jump_table, - }], - ); - assert_eq!( - cfg.num_blocks(), - canonical_blocks, - "num blocks differ: Permutation: {:?}", - perm - ); - assert_eq!( - traversal(&cfg), - canonical_traversal, - "traversal differs: Permutation: {:?}", - perm - ); - } -} - -/// Return a vector containing the `BlockId`s from `cfg` in the order suggested by successively -/// calling `ControlFlowGraph::next_block` starting from the entry block. -fn traversal(cfg: &dyn ControlFlowGraph) -> Vec { - let mut order = Vec::with_capacity(cfg.num_blocks() as usize); - let mut next = Some(cfg.entry_block_id()); - - while let Some(block) = next { - order.push(block); - next = cfg.next_block(block); - } - - order -} diff --git a/external-crates/move/move-execution/v0/crates/move-abstract-interpreter/src/unit_tests/mod.rs b/external-crates/move/move-execution/v0/crates/move-abstract-interpreter/src/unit_tests/mod.rs deleted file mode 100644 index 46e078986ad..00000000000 --- a/external-crates/move/move-execution/v0/crates/move-abstract-interpreter/src/unit_tests/mod.rs +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -mod control_flow_graph_tests; diff --git a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/Cargo.toml b/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/Cargo.toml deleted file mode 100644 index 66e4d921646..00000000000 --- a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/Cargo.toml +++ /dev/null @@ -1,22 +0,0 @@ -[package] -name = "move-bytecode-verifier-v0" -version = "0.1.0" -authors = ["IOTA Foundation "] -edition = "2021" -license = "Apache-2.0" -publish = false -description = "Move bytecode verifier" - -[dependencies] -petgraph.workspace = true - -move-abstract-interpreter.workspace = true -move-abstract-stack.workspace = true -move-binary-format.workspace = true -move-borrow-graph.workspace = true -move-bytecode-verifier-meter.workspace = true -move-core-types.workspace = true -move-vm-config.workspace = true - -[features] -default = [] diff --git a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/README.md b/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/README.md deleted file mode 100644 index f062b48a66f..00000000000 --- a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/README.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -id: bytecode-verifier -title: Bytecode Verifier -custom_edit_url: https://github.com/move-language/move/edit/main/language/move-bytecode-verifier/README.md ---- - -## Overview - -The bytecode verifier contains a static analysis tool for rejecting invalid Move bytecode. It checks the safety of stack usage, types, resources, and references. - -The body of each function in a compiled module is verified separately while trusting the correctness of function signatures in the module. Checking that each function signature matches its definition is a separate responsibility. The body of a function is a sequence of bytecode instructions. This instruction sequence is checked in several phases described below. - -## CFG Construction - -A control-flow graph is constructed by decomposing the instruction sequence into a collection of basic blocks. Each basic block contains a contiguous sequence of instructions; the set of all instructions is partitioned among the blocks. Each block ends with a branch or return instruction. The decomposition into blocks guarantees that branch targets land only at the beginning of some block. The decomposition also attempts to ensure that the generated blocks are maximal. However, the soundness of the analysis does not depend on maximality. - -## Stack Safety - -The execution of a block happens in the context of a stack and an array of local variables. The parameters of the function are a prefix of the array of local variables. Arguments and return values are passed across function calls via the stack. When a function starts executing, its arguments are already loaded into its parameters. Suppose the stack height is _n_ when a function starts executing; then valid bytecode must enforce the invariant that when execution lands at the beginning of a basic block, the stack height is _n_. Furthermore, at a return instruction, the stack height must be _n_+_k_ where _k_, s.t. _k_>=0 is the number of return values. The first phase of the analysis checks that this invariant is maintained by analyzing each block separately, calculating the effect of each instruction in the block on the stack height, checking that the height does not go below _n_, and that is left either at _n_ or _n_+_k_ (depending on the final instruction of the block and the return type of the function) at the end of the block. - -## Type Safety - -The second phase of the analysis checks that each operation, primitive or defined function, is invoked with arguments of appropriate types. The operands of an operation are values located either in a local variable or on the stack. The types of local variables of a function are already provided in the bytecode. However, the types of stack values are inferred. This inference and the type checking of each operation can be done separately for each block. Since the stack height at the beginning of each block is _n_ and does not go below _n_ during the execution of the block, we only need to model the suffix of the stack starting at _n_ for type checking the block instructions. We model this suffix using a stack of types on which types are pushed and popped as the instruction stream in a block is processed. Only the type stack and the statically-known types of local variables are needed to type check each instruction. - -## Resource Safety - -Resources represent the assets of the blockchain. As such, there are certain restrictions on these types that do not apply to normal values. Intuitively, resource values cannot be copied and must be used by the end of the transaction (this means that they are moved to global storage or destroyed). Concretely, the following restrictions apply: - -- `CopyLoc` and `StLoc` require that the type of local is not of resource kind. -- `WriteRef`, `Eq`, and `Neq` require that the type of the reference is not of resource kind. -- At the end of a function (when `Ret` is reached), no local whose type is of resource kind must be empty, i.e., the value must have been moved out of the local. - -As mentioned above, this last rule around `Ret` implies that the resource _must_ have been either: - -- Moved to global storage via `MoveTo`. -- Destroyed via `Unpack`. - -Both `MoveTo` and `Unpack` are internal to the module in which the resource is declared. - -## Reference Safety - -References are first-class in the bytecode language. Fresh references become available to a function in several ways: - -- Inputting parameters. -- Taking the address of the value in a local variable. -- Taking the address of the globally published value in an address. -- Taking the address of a field from a reference to the containing struct. -- Returning value from a function. - -The goal of reference safety checking is to ensure that there are no dangling references. Here are some examples of dangling references: - -- Local variable `y` contains a reference to the value in a local variable `x`; `x` is then moved. -- Local variable `y` contains a reference to the value in a local variable `x`; `x` is then bound to a new value. -- Reference is taken to a local variable that has not been initialized. -- Reference to a value in a local variable is returned from a function. -- Reference `r` is taken to a globally published value `v`; `v` is then unpublished. - -References can be either exclusive or shared; the latter allow read-only access. A secondary goal of reference safety checking is to ensure that in the execution context of the bytecode program, including the entire evaluation stack and all function frames, if there are two distinct storage locations containing references `r1` and `r2` such that `r2` extends `r1`, then both of the following conditions hold: - -- If `r1` is tagged as exclusive, then it must be inactive, i.e. it is impossible to reach a control location where `r1` is dereferenced or mutated. -- If `r1` is shared, then `r2` is shared. - -The two conditions above establish the property of referential transparency, important for scalable program verification, which looks roughly as follows: consider the piece of code `v1 = *r; S; v2 = *r`, where `S` is an arbitrary computation that does not perform any write through the syntactic reference `r` (and no writes to any `r'` that extends `r`). Then `v1 == v2`. - -### Analysis Setup - -The reference safety analysis is set up as a flow analysis (or abstract interpretation). An abstract state is defined for abstractly executing the code of a basic block. A map is maintained from basic blocks to abstract states. Given an abstract state _S_ at the beginning of a basic block _B_, the abstract execution of _B_ results in state _S'_. This state _S'_ is propagated to all successors of _B_ and recorded in the map. If a state already existed for a block, the freshly propagated state is “joined” with the existing state. If the join fails an error is reported. If the join succeeds but the abstract state remains unchanged, no further propagation is done. Otherwise, the state is updated and propagated again through the block. An error may also be reported when an instruction is processed during the propagation of abstract state through a block. - -**Errors.** As mentioned earlier, an error is reported by the checker in one of the following situations: - -- An instruction cannot be proven to be safe during the propagation of the abstract state through a block. -- Join of abstract states propagated via different incoming edges into a block fails. - -## How is this module organized? - -```text -* -├── invalid-mutations # Library used by proptests -├── src # Core bytecode verifier files -├── tests # Proptests -``` diff --git a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/ability_cache.rs b/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/ability_cache.rs deleted file mode 100644 index 9f9a61b9329..00000000000 --- a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/ability_cache.rs +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use move_binary_format::{ - errors::PartialVMResult, - file_format::{AbilitySet, DatatypeHandleIndex, SignatureToken}, - safe_unwrap, CompiledModule, -}; -use move_bytecode_verifier_meter::{Meter, Scope}; -use std::{ - cmp::max, - collections::{btree_map::Entry, BTreeMap}, -}; - -const TYPE_ARG_COST: u128 = 1; - -pub struct AbilityCache<'a> { - module: &'a CompiledModule, - vector_results: BTreeMap, - datatype_results: BTreeMap, AbilitySet>>, -} - -impl<'a> AbilityCache<'a> { - pub fn new(module: &'a CompiledModule) -> Self { - Self { - module, - vector_results: BTreeMap::new(), - datatype_results: BTreeMap::new(), - } - } - - pub fn abilities( - &mut self, - scope: Scope, - meter: &mut (impl Meter + ?Sized), - type_parameter_abilities: &[AbilitySet], - ty: &SignatureToken, - ) -> PartialVMResult { - use SignatureToken as S; - - Ok(match ty { - S::Bool | S::U8 | S::U16 | S::U32 | S::U64 | S::U128 | S::U256 | S::Address => { - AbilitySet::PRIMITIVES - } - - S::Reference(_) | S::MutableReference(_) => AbilitySet::REFERENCES, - S::Signer => AbilitySet::SIGNER, - S::TypeParameter(idx) => *safe_unwrap!(type_parameter_abilities.get(*idx as usize)), - S::Datatype(idx) => { - let sh = self.module.datatype_handle_at(*idx); - sh.abilities - } - S::Vector(inner) => { - let inner_abilities = - self.abilities(scope, meter, type_parameter_abilities, inner)?; - let entry = self.vector_results.entry(inner_abilities); - match entry { - Entry::Occupied(entry) => *entry.get(), - Entry::Vacant(entry) => { - meter.add(scope, TYPE_ARG_COST)?; - let abilities = AbilitySet::polymorphic_abilities( - AbilitySet::VECTOR, - vec![false], - vec![inner_abilities], - )?; - entry.insert(abilities); - abilities - } - } - } - S::DatatypeInstantiation(inst) => { - let (idx, type_args) = &**inst; - let type_arg_abilities = type_args - .iter() - .map(|arg| self.abilities(scope, meter, type_parameter_abilities, arg)) - .collect::>>()?; - let entry = self - .datatype_results - .entry(*idx) - .or_default() - .entry(type_arg_abilities.clone()); - match entry { - Entry::Occupied(entry) => *entry.get(), - Entry::Vacant(entry) => { - meter.add_items(scope, TYPE_ARG_COST, max(type_args.len(), 1))?; - let sh = self.module.datatype_handle_at(*idx); - let declared_abilities = sh.abilities; - let abilities = AbilitySet::polymorphic_abilities( - declared_abilities, - sh.type_parameters.iter().map(|param| param.is_phantom), - type_arg_abilities, - )?; - entry.insert(abilities); - abilities - } - } - } - }) - } -} diff --git a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/ability_field_requirements.rs b/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/ability_field_requirements.rs deleted file mode 100644 index a7dd938c6eb..00000000000 --- a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/ability_field_requirements.rs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) The Diem Core Contributors -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -//! This module implements a checker for verifying that all of the struct's -//! fields satisfy the abilities required by the struct's abilities -use move_binary_format::{ - errors::{verification_error, Location, PartialVMResult, VMResult}, - file_format::{AbilitySet, CompiledModule, StructFieldInformation, TableIndex}, - IndexKind, -}; -use move_bytecode_verifier_meter::{Meter, Scope}; -use move_core_types::vm_status::StatusCode; - -use crate::ability_cache::AbilityCache; - -pub fn verify_module<'env>( - module: &'env CompiledModule, - ability_cache: &mut AbilityCache<'env>, - meter: &mut (impl Meter + ?Sized), -) -> VMResult<()> { - verify_module_impl(module, ability_cache, meter) - .map_err(|e| e.finish(Location::Module(module.self_id()))) -} - -fn verify_module_impl<'env>( - module: &'env CompiledModule, - ability_cache: &mut AbilityCache<'env>, - meter: &mut (impl Meter + ?Sized), -) -> PartialVMResult<()> { - for (idx, struct_def) in module.struct_defs().iter().enumerate() { - let sh = module.datatype_handle_at(struct_def.struct_handle); - let fields = match &struct_def.field_information { - StructFieldInformation::Native => continue, - StructFieldInformation::Declared(fields) => fields, - }; - let required_abilities = sh - .abilities - .into_iter() - .map(|a| a.requires()) - .fold(AbilitySet::EMPTY, |acc, required| acc | required); - // Assume type parameters have all abilities, as the struct's abilities will be - // dependent on them - let type_parameter_abilities = sh - .type_parameters - .iter() - .map(|_| AbilitySet::ALL) - .collect::>(); - for field in fields { - let field_abilities = ability_cache.abilities( - Scope::Module, - meter, - &type_parameter_abilities, - &field.signature.0, - )?; - if !required_abilities.is_subset(field_abilities) { - return Err(verification_error( - StatusCode::FIELD_MISSING_TYPE_ABILITY, - IndexKind::StructDefinition, - idx as TableIndex, - )); - } - } - } - - for (idx, enum_def) in module.enum_defs().iter().enumerate() { - let sh = module.datatype_handle_at(enum_def.enum_handle); - let required_abilities = sh - .abilities - .into_iter() - .map(|a| a.requires()) - .fold(AbilitySet::EMPTY, |acc, required| acc | required); - // Assume type parameters have all abilities, as the enum's abilities will be - // dependent on them - let type_parameter_abilities = sh - .type_parameters - .iter() - .map(|_| AbilitySet::ALL) - .collect::>(); - for (i, variant) in enum_def.variants.iter().enumerate() { - for (fi, field) in variant.fields.iter().enumerate() { - let field_abilities = ability_cache.abilities( - Scope::Module, - meter, - &type_parameter_abilities, - &field.signature.0, - )?; - if !required_abilities.is_subset(field_abilities) { - return Err(verification_error( - StatusCode::FIELD_MISSING_TYPE_ABILITY, - IndexKind::EnumDefinition, - idx as TableIndex, - ) - .at_index(IndexKind::VariantTag, i as TableIndex) - .at_index(IndexKind::FieldDefinition, fi as TableIndex)); - } - } - } - } - Ok(()) -} diff --git a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/acquires_list_verifier.rs b/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/acquires_list_verifier.rs deleted file mode 100644 index 9c94d58cd8a..00000000000 --- a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/acquires_list_verifier.rs +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright (c) The Diem Core Contributors -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -//! This module implements a checker for verifying properties about the acquires list on function -//! definitions. Function definitions must annotate the global resources (declared in that module) -//! accesssed by `BorrowGlobal`, `MoveFrom`, and any transitive function calls -//! The list of acquired resources (stored in `FunctionDefinition`'s `acquires_global_resources` -//! field) must have: -//! - No duplicate resources (checked by `check_duplication`) -//! - No missing resources (any resource acquired must be present) -//! - No additional resources (no extraneous resources not actually acquired) - -use std::collections::{BTreeSet, HashMap}; - -use move_binary_format::{ - errors::{PartialVMError, PartialVMResult}, - file_format::{ - Bytecode, CodeOffset, CompiledModule, FunctionDefinition, FunctionDefinitionIndex, - FunctionHandle, FunctionHandleIndex, StructDefinitionIndex, - }, - safe_unwrap, -}; -use move_bytecode_verifier_meter::Meter; -use move_core_types::vm_status::StatusCode; - -pub(crate) struct AcquiresVerifier<'a> { - module: &'a CompiledModule, - current_function: FunctionDefinitionIndex, - annotated_acquires: BTreeSet, - actual_acquires: BTreeSet, - handle_to_def: HashMap, -} - -impl<'a> AcquiresVerifier<'a> { - pub(crate) fn verify( - module: &'a CompiledModule, - index: FunctionDefinitionIndex, - function_definition: &'a FunctionDefinition, - _meter: &mut (impl Meter + ?Sized), // currently unused - ) -> PartialVMResult<()> { - let annotated_acquires: BTreeSet<_> = function_definition - .acquires_global_resources - .iter() - .cloned() - .collect(); - let mut handle_to_def = HashMap::new(); - for func_def in module.function_defs() { - handle_to_def.insert(func_def.function, func_def); - } - let mut verifier = Self { - module, - current_function: index, - annotated_acquires, - actual_acquires: BTreeSet::new(), - handle_to_def, - }; - - for (offset, instruction) in safe_unwrap!(function_definition.code.as_ref()) - .code - .iter() - .enumerate() - { - verifier.verify_instruction(instruction, offset as CodeOffset)? - } - - for annotation in verifier.annotated_acquires { - if !verifier.actual_acquires.contains(&annotation) { - return Err(PartialVMError::new( - StatusCode::EXTRANEOUS_ACQUIRES_ANNOTATION, - )); - } - - let struct_def = safe_unwrap!(module.struct_defs().get(annotation.0 as usize)); - let struct_handle = module.datatype_handle_at(struct_def.struct_handle); - if !struct_handle.abilities.has_key() { - return Err(PartialVMError::new(StatusCode::INVALID_ACQUIRES_ANNOTATION)); - } - } - - Ok(()) - } - - fn verify_instruction( - &mut self, - instruction: &Bytecode, - offset: CodeOffset, - ) -> PartialVMResult<()> { - match instruction { - Bytecode::Call(idx) => self.call_acquire(*idx, offset), - Bytecode::CallGeneric(idx) => { - let fi = self.module.function_instantiation_at(*idx); - self.call_acquire(fi.handle, offset) - } - Bytecode::MoveFromDeprecated(idx) - | Bytecode::MutBorrowGlobalDeprecated(idx) - | Bytecode::ImmBorrowGlobalDeprecated(idx) => self.struct_acquire(*idx, offset), - Bytecode::MoveFromGenericDeprecated(idx) - | Bytecode::MutBorrowGlobalGenericDeprecated(idx) - | Bytecode::ImmBorrowGlobalGenericDeprecated(idx) => { - let si = self.module.struct_instantiation_at(*idx); - self.struct_acquire(si.def, offset) - } - - Bytecode::Pop - | Bytecode::BrTrue(_) - | Bytecode::BrFalse(_) - | Bytecode::Abort - | Bytecode::Branch(_) - | Bytecode::Nop - | Bytecode::Ret - | Bytecode::StLoc(_) - | Bytecode::MoveLoc(_) - | Bytecode::CopyLoc(_) - | Bytecode::ImmBorrowLoc(_) - | Bytecode::MutBorrowLoc(_) - | Bytecode::FreezeRef - | Bytecode::MutBorrowField(_) - | Bytecode::MutBorrowFieldGeneric(_) - | Bytecode::ImmBorrowField(_) - | Bytecode::ImmBorrowFieldGeneric(_) - | Bytecode::LdU8(_) - | Bytecode::LdU16(_) - | Bytecode::LdU32(_) - | Bytecode::LdU64(_) - | Bytecode::LdU128(_) - | Bytecode::LdU256(_) - | Bytecode::LdConst(_) - | Bytecode::LdTrue - | Bytecode::LdFalse - | Bytecode::Pack(_) - | Bytecode::PackGeneric(_) - | Bytecode::Unpack(_) - | Bytecode::UnpackGeneric(_) - | Bytecode::ReadRef - | Bytecode::WriteRef - | Bytecode::CastU8 - | Bytecode::CastU16 - | Bytecode::CastU32 - | Bytecode::CastU64 - | Bytecode::CastU128 - | Bytecode::CastU256 - | Bytecode::Add - | Bytecode::Sub - | Bytecode::Mul - | Bytecode::Mod - | Bytecode::Div - | Bytecode::BitOr - | Bytecode::BitAnd - | Bytecode::Xor - | Bytecode::Shl - | Bytecode::Shr - | Bytecode::Or - | Bytecode::And - | Bytecode::Not - | Bytecode::Eq - | Bytecode::Neq - | Bytecode::Lt - | Bytecode::Gt - | Bytecode::Le - | Bytecode::Ge - | Bytecode::ExistsDeprecated(_) - | Bytecode::ExistsGenericDeprecated(_) - | Bytecode::MoveToDeprecated(_) - | Bytecode::MoveToGenericDeprecated(_) - | Bytecode::VecPack(..) - | Bytecode::VecLen(_) - | Bytecode::VecImmBorrow(_) - | Bytecode::VecMutBorrow(_) - | Bytecode::VecPushBack(_) - | Bytecode::VecPopBack(_) - | Bytecode::VecUnpack(..) - | Bytecode::VecSwap(_) - | Bytecode::PackVariant(_) - | Bytecode::PackVariantGeneric(_) - | Bytecode::UnpackVariant(_) - | Bytecode::UnpackVariantImmRef(_) - | Bytecode::UnpackVariantMutRef(_) - | Bytecode::UnpackVariantGeneric(_) - | Bytecode::UnpackVariantGenericImmRef(_) - | Bytecode::UnpackVariantGenericMutRef(_) - | Bytecode::VariantSwitch(_) => Ok(()), - } - } - - fn call_acquire( - &mut self, - fh_idx: FunctionHandleIndex, - offset: CodeOffset, - ) -> PartialVMResult<()> { - let function_handle = self.module.function_handle_at(fh_idx); - let mut function_acquired_resources = - self.function_acquired_resources(function_handle, fh_idx); - for acquired_resource in &function_acquired_resources { - if !self.annotated_acquires.contains(acquired_resource) { - return Err(self.error(StatusCode::MISSING_ACQUIRES_ANNOTATION, offset)); - } - } - self.actual_acquires - .append(&mut function_acquired_resources); - Ok(()) - } - - fn struct_acquire( - &mut self, - sd_idx: StructDefinitionIndex, - offset: CodeOffset, - ) -> PartialVMResult<()> { - if self.annotated_acquires.contains(&sd_idx) { - self.actual_acquires.insert(sd_idx); - Ok(()) - } else { - Err(self.error(StatusCode::MISSING_ACQUIRES_ANNOTATION, offset)) - } - } - - fn function_acquired_resources( - &self, - function_handle: &FunctionHandle, - fh_idx: FunctionHandleIndex, - ) -> BTreeSet { - if function_handle.module != self.module.self_handle_idx() { - return BTreeSet::new(); - } - match self.handle_to_def.get(&fh_idx) { - Some(func_def) => func_def.acquires_global_resources.iter().cloned().collect(), - None => BTreeSet::new(), - } - } - - fn error(&self, status: StatusCode, offset: CodeOffset) -> PartialVMError { - PartialVMError::new(status).at_code_offset(self.current_function, offset) - } -} diff --git a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/check_duplication.rs b/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/check_duplication.rs deleted file mode 100644 index cf320d91782..00000000000 --- a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/check_duplication.rs +++ /dev/null @@ -1,417 +0,0 @@ -// Copyright (c) The Diem Core Contributors -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -//! This module implements a checker for verifying that each vector in a -//! CompiledModule contains distinct values. Successful verification implies -//! that an index in vector can be used to uniquely name the entry at that -//! index. Additionally, the checker also verifies the following: -//! - struct and field definitions are consistent -//! - the handles in struct and function definitions point to the self module -//! index -//! - all struct and function handles pointing to the self module index have a -//! definition -use std::{collections::HashSet, hash::Hash}; - -use move_binary_format::{ - errors::{verification_error, Location, PartialVMResult, VMResult}, - file_format::{ - CompiledModule, Constant, DatatypeHandle, DatatypeHandleIndex, FunctionHandle, - FunctionHandleIndex, FunctionInstantiation, ModuleHandle, Signature, - StructFieldInformation, TableIndex, VariantHandle, - }, - IndexKind, -}; -use move_core_types::{ - account_address::AccountAddress, identifier::Identifier, vm_status::StatusCode, -}; - -pub struct DuplicationChecker<'a> { - module: &'a CompiledModule, -} - -impl<'a> DuplicationChecker<'a> { - pub fn verify_module(module: &'a CompiledModule) -> VMResult<()> { - Self::verify_module_impl(module).map_err(|e| e.finish(Location::Module(module.self_id()))) - } - - fn verify_module_impl(module: &'a CompiledModule) -> PartialVMResult<()> { - Self::check_identifiers(module.identifiers())?; - Self::check_address_identifiers(module.address_identifiers())?; - Self::check_constants(module.constant_pool())?; - Self::check_signatures(module.signatures())?; - Self::check_module_handles(module.module_handles())?; - Self::check_module_handles(module.friend_decls())?; - Self::check_datatype_handles(module.datatype_handles())?; - Self::check_function_handles(module.function_handles())?; - Self::check_function_instantiations(module.function_instantiations())?; - Self::check_variant_handles(module.variant_handles())?; - - let checker = Self { module }; - checker.check_field_handles()?; - checker.check_field_instantiations()?; - checker.check_function_definitions()?; - checker.check_struct_definitions()?; - checker.check_struct_instantiations()?; - checker.check_enum_definitions()?; - checker.check_enum_instantiations()?; - checker.check_datatype_handles_implemented() - } - - fn check_identifiers(identifiers: &[Identifier]) -> PartialVMResult<()> { - match Self::first_duplicate_element(identifiers) { - Some(idx) => Err(verification_error( - StatusCode::DUPLICATE_ELEMENT, - IndexKind::Identifier, - idx, - )), - None => Ok(()), - } - } - - fn check_address_identifiers(address_identifiers: &[AccountAddress]) -> PartialVMResult<()> { - match Self::first_duplicate_element(address_identifiers) { - Some(idx) => Err(verification_error( - StatusCode::DUPLICATE_ELEMENT, - IndexKind::AddressIdentifier, - idx, - )), - None => Ok(()), - } - } - - fn check_constants(constant_pool: &[Constant]) -> PartialVMResult<()> { - match Self::first_duplicate_element(constant_pool) { - Some(idx) => Err(verification_error( - StatusCode::DUPLICATE_ELEMENT, - IndexKind::ConstantPool, - idx, - )), - None => Ok(()), - } - } - - fn check_signatures(signatures: &[Signature]) -> PartialVMResult<()> { - match Self::first_duplicate_element(signatures) { - Some(idx) => Err(verification_error( - StatusCode::DUPLICATE_ELEMENT, - IndexKind::Signature, - idx, - )), - None => Ok(()), - } - } - - fn check_module_handles(module_handles: &[ModuleHandle]) -> PartialVMResult<()> { - match Self::first_duplicate_element(module_handles) { - Some(idx) => Err(verification_error( - StatusCode::DUPLICATE_ELEMENT, - IndexKind::ModuleHandle, - idx, - )), - None => Ok(()), - } - } - - // DatatypeHandles - module and name define uniqueness - fn check_datatype_handles(datatype_handles: &[DatatypeHandle]) -> PartialVMResult<()> { - match Self::first_duplicate_element(datatype_handles.iter().map(|x| (x.module, x.name))) { - Some(idx) => Err(verification_error( - StatusCode::DUPLICATE_ELEMENT, - IndexKind::DatatypeHandle, - idx, - )), - None => Ok(()), - } - } - - fn check_variant_handles(variant_handles: &[VariantHandle]) -> PartialVMResult<()> { - match Self::first_duplicate_element(variant_handles.iter().map(|x| (x.enum_def, x.variant))) - { - Some(idx) => Err(verification_error( - StatusCode::DUPLICATE_ELEMENT, - IndexKind::VariantHandle, - idx, - )), - None => Ok(()), - } - } - - fn check_function_instantiations( - function_instantiations: &[FunctionInstantiation], - ) -> PartialVMResult<()> { - match Self::first_duplicate_element(function_instantiations) { - Some(idx) => Err(verification_error( - StatusCode::DUPLICATE_ELEMENT, - IndexKind::FunctionInstantiation, - idx, - )), - None => Ok(()), - } - } - - // FunctionHandles - module and name define uniqueness - fn check_function_handles(function_handles: &[FunctionHandle]) -> PartialVMResult<()> { - match Self::first_duplicate_element(function_handles.iter().map(|x| (x.module, x.name))) { - Some(idx) => Err(verification_error( - StatusCode::DUPLICATE_ELEMENT, - IndexKind::FunctionHandle, - idx, - )), - None => Ok(()), - } - } - - // Module only code - // - - fn check_field_handles(&self) -> PartialVMResult<()> { - match Self::first_duplicate_element(self.module.field_handles()) { - Some(idx) => Err(verification_error( - StatusCode::DUPLICATE_ELEMENT, - IndexKind::FieldHandle, - idx, - )), - None => Ok(()), - } - } - - fn check_struct_instantiations(&self) -> PartialVMResult<()> { - match Self::first_duplicate_element(self.module.struct_instantiations()) { - Some(idx) => Err(verification_error( - StatusCode::DUPLICATE_ELEMENT, - IndexKind::StructDefInstantiation, - idx, - )), - None => Ok(()), - } - } - - fn check_enum_instantiations(&self) -> PartialVMResult<()> { - match Self::first_duplicate_element(self.module.enum_instantiations()) { - Some(idx) => Err(verification_error( - StatusCode::DUPLICATE_ELEMENT, - IndexKind::EnumDefInstantiation, - idx, - )), - None => Ok(()), - } - } - - fn check_field_instantiations(&self) -> PartialVMResult<()> { - if let Some(idx) = Self::first_duplicate_element(self.module.field_instantiations()) { - return Err(verification_error( - StatusCode::DUPLICATE_ELEMENT, - IndexKind::FieldInstantiation, - idx, - )); - } - Ok(()) - } - - fn check_struct_definitions(&self) -> PartialVMResult<()> { - // StructDefinition - contained DatatypeHandle defines uniqueness - if let Some(idx) = - Self::first_duplicate_element(self.module.struct_defs().iter().map(|x| x.struct_handle)) - { - return Err(verification_error( - StatusCode::DUPLICATE_ELEMENT, - IndexKind::StructDefinition, - idx, - )); - } - // Field names in structs must be unique - for (struct_idx, struct_def) in self.module.struct_defs().iter().enumerate() { - let fields = match &struct_def.field_information { - StructFieldInformation::Native => continue, - StructFieldInformation::Declared(fields) => fields, - }; - if fields.is_empty() { - return Err(verification_error( - StatusCode::ZERO_SIZED_STRUCT, - IndexKind::StructDefinition, - struct_idx as TableIndex, - )); - } - if let Some(idx) = Self::first_duplicate_element(fields.iter().map(|x| x.name)) { - return Err(verification_error( - StatusCode::DUPLICATE_ELEMENT, - IndexKind::FieldDefinition, - idx, - )); - } - } - // Check that each struct definition is pointing to the self module - if let Some(idx) = self.module.struct_defs().iter().position(|x| { - self.module.datatype_handle_at(x.struct_handle).module != self.module.self_handle_idx() - }) { - return Err(verification_error( - StatusCode::INVALID_MODULE_HANDLE, - IndexKind::StructDefinition, - idx as TableIndex, - )); - } - Ok(()) - } - - fn check_datatype_handles_implemented(&self) -> PartialVMResult<()> { - let implemented_datatype_handles: HashSet = self - .module - .struct_defs() - .iter() - .map(|x| x.struct_handle) - .chain(self.module.enum_defs().iter().map(|x| x.enum_handle)) - .collect(); - if let Some(idx) = (0..self.module.datatype_handles().len()).position(|x| { - let y = DatatypeHandleIndex::new(x as u16); - self.module.datatype_handle_at(y).module == self.module.self_handle_idx() - && !implemented_datatype_handles.contains(&y) - }) { - return Err(verification_error( - StatusCode::UNIMPLEMENTED_HANDLE, - IndexKind::DatatypeHandle, - idx as TableIndex, - )); - } - Ok(()) - } - - fn check_enum_definitions(&self) -> PartialVMResult<()> { - // EnumDefinition - contained DatatypeHandle defines uniqueness - // NB: We check uniqueness across both enum and struct handles at this point to - // make sure data definitions are not duplicated across struct and - // enums. - if let Some(idx) = Self::first_duplicate_element( - self.module - .struct_defs() - .iter() - .map(|x| x.struct_handle) - .chain(self.module.enum_defs().iter().map(|x| x.enum_handle)), - ) { - return Err(verification_error( - StatusCode::DUPLICATE_ELEMENT, - IndexKind::EnumDefinition, - idx, - )); - } - // Variant names in enums must be unique - // Field names in each variant must be unique - for (enum_idx, enum_def) in self.module.enum_defs().iter().enumerate() { - let variants = &enum_def.variants; - if variants.is_empty() { - return Err(verification_error( - StatusCode::ZERO_SIZED_ENUM, - IndexKind::EnumDefinition, - enum_idx as TableIndex, - )); - } - if let Some(idx) = - Self::first_duplicate_element(variants.iter().map(|x| x.variant_name)) - { - return Err(verification_error( - StatusCode::DUPLICATE_ELEMENT, - IndexKind::EnumDefinition, - enum_idx as TableIndex, - ) - .at_index(IndexKind::VariantTag, idx as TableIndex)); - } - - // NB: we allow zero-sized variants: since we require non-empty enums we always - // have a tag and therefore a variant with no fields is still - // non-zero sized whereas a struct with zero fields is zero-sized. - for (tag, variant) in variants.iter().enumerate() { - if let Some(idx) = - Self::first_duplicate_element(variant.fields.iter().map(|x| x.name)) - { - return Err(verification_error( - StatusCode::DUPLICATE_ELEMENT, - IndexKind::FieldDefinition, - idx, - ) - .at_index(IndexKind::VariantTag, tag as TableIndex) - .at_index(IndexKind::EnumDefinition, enum_idx as TableIndex)); - } - } - } - // Check that each enum definition is pointing to the self module - if let Some(idx) = self.module.enum_defs().iter().position(|x| { - self.module.datatype_handle_at(x.enum_handle).module != self.module.self_handle_idx() - }) { - return Err(verification_error( - StatusCode::INVALID_MODULE_HANDLE, - IndexKind::EnumDefinition, - idx as TableIndex, - )); - } - Ok(()) - } - - fn check_function_definitions(&self) -> PartialVMResult<()> { - // FunctionDefinition - contained FunctionHandle defines uniqueness - if let Some(idx) = - Self::first_duplicate_element(self.module.function_defs().iter().map(|x| x.function)) - { - return Err(verification_error( - StatusCode::DUPLICATE_ELEMENT, - IndexKind::FunctionDefinition, - idx, - )); - } - // Acquires in function declarations contain unique struct definitions - for (idx, function_def) in self.module.function_defs().iter().enumerate() { - let acquires = function_def.acquires_global_resources.iter(); - if Self::first_duplicate_element(acquires).is_some() { - return Err(verification_error( - StatusCode::DUPLICATE_ACQUIRES_ANNOTATION, - IndexKind::FunctionDefinition, - idx as TableIndex, - )); - } - } - // Check that each function definition is pointing to the self module - if let Some(idx) = self.module.function_defs().iter().position(|x| { - self.module.function_handle_at(x.function).module != self.module.self_handle_idx() - }) { - return Err(verification_error( - StatusCode::INVALID_MODULE_HANDLE, - IndexKind::FunctionDefinition, - idx as TableIndex, - )); - } - // Check that each function handle in self module is implemented (has a - // declaration) - let implemented_function_handles: HashSet = self - .module - .function_defs() - .iter() - .map(|x| x.function) - .collect(); - if let Some(idx) = (0..self.module.function_handles().len()).position(|x| { - let y = FunctionHandleIndex::new(x as u16); - self.module.function_handle_at(y).module == self.module.self_handle_idx() - && !implemented_function_handles.contains(&y) - }) { - return Err(verification_error( - StatusCode::UNIMPLEMENTED_HANDLE, - IndexKind::FunctionHandle, - idx as TableIndex, - )); - } - Ok(()) - } - - fn first_duplicate_element(iter: T) -> Option - where - T: IntoIterator, - T::Item: Eq + Hash, - { - let mut uniq = HashSet::new(); - for (i, x) in iter.into_iter().enumerate() { - if !uniq.insert(x) { - return Some(i as TableIndex); - } - } - None - } -} diff --git a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/code_unit_verifier.rs b/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/code_unit_verifier.rs deleted file mode 100644 index 8e4a1eebe54..00000000000 --- a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/code_unit_verifier.rs +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) The Diem Core Contributors -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -//! This module implements the checker for verifying correctness of function bodies. -//! The overall verification is split between stack_usage_verifier.rs and -//! abstract_interpreter.rs. CodeUnitVerifier simply orchestrates calls into these two files. -use crate::{ - ability_cache::AbilityCache, acquires_list_verifier::AcquiresVerifier, control_flow, - locals_safety, reference_safety, stack_usage_verifier::StackUsageVerifier, type_safety, -}; -use move_abstract_interpreter::{absint::FunctionContext, control_flow_graph::ControlFlowGraph}; -use move_binary_format::{ - errors::{Location, PartialVMError, PartialVMResult, VMResult}, - file_format::{ - CompiledModule, FunctionDefinition, FunctionDefinitionIndex, IdentifierIndex, TableIndex, - }, - IndexKind, -}; -use move_bytecode_verifier_meter::{Meter, Scope}; -use move_core_types::vm_status::StatusCode; -use move_vm_config::verifier::VerifierConfig; -use std::collections::HashMap; - -pub struct CodeUnitVerifier<'env, 'a> { - module: &'env CompiledModule, - function_context: FunctionContext<'env>, - name_def_map: &'a HashMap, -} - -pub fn verify_module<'env>( - verifier_config: &VerifierConfig, - module: &'env CompiledModule, - ability_cache: &mut AbilityCache<'env>, - meter: &mut (impl Meter + ?Sized), -) -> VMResult<()> { - verify_module_impl(verifier_config, module, ability_cache, meter) - .map_err(|e| e.finish(Location::Module(module.self_id()))) -} - -fn verify_module_impl<'env>( - verifier_config: &VerifierConfig, - module: &'env CompiledModule, - ability_cache: &mut AbilityCache<'env>, - meter: &mut (impl Meter + ?Sized), -) -> PartialVMResult<()> { - let mut name_def_map = HashMap::new(); - for (idx, func_def) in module.function_defs().iter().enumerate() { - let fh = module.function_handle_at(func_def.function); - name_def_map.insert(fh.name, FunctionDefinitionIndex(idx as u16)); - } - let mut total_back_edges = 0; - for (idx, function_definition) in module.function_defs().iter().enumerate() { - let index = FunctionDefinitionIndex(idx as TableIndex); - let num_back_edges = verify_function( - verifier_config, - index, - function_definition, - module, - ability_cache, - &name_def_map, - meter, - ) - .map_err(|err| err.at_index(IndexKind::FunctionDefinition, index.0))?; - total_back_edges += num_back_edges; - } - if let Some(limit) = verifier_config.max_back_edges_per_module { - if total_back_edges > limit { - return Err(PartialVMError::new(StatusCode::TOO_MANY_BACK_EDGES)); - } - } - Ok(()) -} - -fn verify_function<'env>( - verifier_config: &VerifierConfig, - index: FunctionDefinitionIndex, - function_definition: &'env FunctionDefinition, - module: &'env CompiledModule, - ability_cache: &mut AbilityCache<'env>, - name_def_map: &HashMap, - meter: &mut (impl Meter + ?Sized), -) -> PartialVMResult { - meter.enter_scope( - module - .identifier_at(module.function_handle_at(function_definition.function).name) - .as_str(), - Scope::Function, - ); - // nothing to verify for native function - let code = match &function_definition.code { - Some(code) => code, - None => return Ok(0), - }; - - // create `FunctionContext` and `BinaryIndexedView` - let function_context = control_flow::verify_function( - verifier_config, - module, - index, - function_definition, - code, - meter, - )?; - - if let Some(limit) = verifier_config.max_basic_blocks { - if function_context.cfg().blocks().len() > limit { - return Err( - PartialVMError::new(StatusCode::TOO_MANY_BASIC_BLOCKS).at_code_offset(index, 0) - ); - } - } - - let num_back_edges = function_context.cfg().num_back_edges(); - if let Some(limit) = verifier_config.max_back_edges_per_function { - if num_back_edges > limit { - return Err( - PartialVMError::new(StatusCode::TOO_MANY_BACK_EDGES).at_code_offset(index, 0) - ); - } - } - - // verify - let code_unit_verifier = CodeUnitVerifier { - module, - function_context, - name_def_map, - }; - code_unit_verifier.verify_common(verifier_config, ability_cache, meter)?; - AcquiresVerifier::verify(module, index, function_definition, meter)?; - - meter.transfer(Scope::Function, Scope::Module, 1.0)?; - - Ok(num_back_edges) -} - -impl<'env, 'a> CodeUnitVerifier<'env, 'a> { - fn verify_common( - &self, - verifier_config: &VerifierConfig, - ability_cache: &mut AbilityCache<'env>, - meter: &mut (impl Meter + ?Sized), - ) -> PartialVMResult<()> { - StackUsageVerifier::verify(verifier_config, self.module, &self.function_context, meter)?; - type_safety::verify(self.module, &self.function_context, ability_cache, meter)?; - locals_safety::verify(self.module, &self.function_context, ability_cache, meter)?; - reference_safety::verify( - self.module, - &self.function_context, - self.name_def_map, - meter, - ) - } -} diff --git a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/constants.rs b/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/constants.rs deleted file mode 100644 index fe14ea9eb3f..00000000000 --- a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/constants.rs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) The Diem Core Contributors -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -//! This module implements a checker for verifying that -//! - a constant's type only refers to primitive types -//! - a constant's data serializes correctly for that type -use move_binary_format::{ - errors::{verification_error, Location, PartialVMResult, VMResult}, - file_format::{CompiledModule, Constant, SignatureToken, TableIndex}, - IndexKind, -}; -use move_core_types::vm_status::StatusCode; - -pub fn verify_module(module: &CompiledModule) -> VMResult<()> { - verify_module_impl(module).map_err(|e| e.finish(Location::Module(module.self_id()))) -} - -fn verify_module_impl(module: &CompiledModule) -> PartialVMResult<()> { - for (idx, constant) in module.constant_pool().iter().enumerate() { - verify_constant(idx, constant)? - } - Ok(()) -} - -fn verify_constant(idx: usize, constant: &Constant) -> PartialVMResult<()> { - verify_constant_type(idx, &constant.type_)?; - verify_constant_data(idx, constant) -} - -fn verify_constant_type(idx: usize, type_: &SignatureToken) -> PartialVMResult<()> { - if type_.is_valid_for_constant() { - Ok(()) - } else { - Err(verification_error( - StatusCode::INVALID_CONSTANT_TYPE, - IndexKind::ConstantPool, - idx as TableIndex, - )) - } -} - -fn verify_constant_data(idx: usize, constant: &Constant) -> PartialVMResult<()> { - match constant.deserialize_constant() { - Some(_) => Ok(()), - None => Err(verification_error( - StatusCode::MALFORMED_CONSTANT_DATA, - IndexKind::ConstantPool, - idx as TableIndex, - )), - } -} diff --git a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/control_flow.rs b/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/control_flow.rs deleted file mode 100644 index e66039afd94..00000000000 --- a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/control_flow.rs +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (c) The Diem Core Contributors -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -//! This module implements control flow checks. -//! -//! For bytecode versions 6 and up, the following properties are ensured: -//! - The CFG is not empty and the last block ends in an unconditional jump, so -//! it's not possible to fall off the end of a function. -//! - The CFG is reducible (and optionally max loop depth is bounded), to limit -//! the potential for pathologically long abstract interpretation runtimes -//! (through poor choice of loop heads and back edges). -//! -//! For bytecode versions 5 and below, delegates to `control_flow_v5`. -use crate::{ - control_flow_v5, - loop_summary::{LoopPartition, LoopSummary}, -}; -use move_abstract_interpreter::absint::FunctionContext; -use move_binary_format::{ - errors::{PartialVMError, PartialVMResult}, - file_format::{CodeOffset, CodeUnit, FunctionDefinition, FunctionDefinitionIndex}, - CompiledModule, -}; -use move_bytecode_verifier_meter::Meter; -use move_core_types::vm_status::StatusCode; -use move_vm_config::verifier::VerifierConfig; -use std::collections::BTreeSet; - -/// Perform control flow verification on the compiled function, returning its -/// `FunctionContext` if verification was successful. -pub fn verify_function<'env>( - verifier_config: &VerifierConfig, - module: &'env CompiledModule, - index: FunctionDefinitionIndex, - function_definition: &'env FunctionDefinition, - code: &'env CodeUnit, - _meter: &mut (impl Meter + ?Sized), // TODO: metering -) -> PartialVMResult> { - let function_handle = module.function_handle_at(function_definition.function); - - if module.version() <= 5 { - control_flow_v5::verify(verifier_config, Some(index), code)?; - Ok(FunctionContext::new(module, index, code, function_handle)) - } else { - verify_fallthrough(Some(index), code)?; - let function_context = FunctionContext::new(module, index, code, function_handle); - verify_reducibility(verifier_config, &function_context)?; - Ok(function_context) - } -} - -/// Check to make sure that the bytecode vector is non-empty and ends with a -/// branching instruction. -fn verify_fallthrough( - current_function_opt: Option, - code: &CodeUnit, -) -> PartialVMResult<()> { - let current_function = current_function_opt.unwrap_or(FunctionDefinitionIndex(0)); - match code.code.last() { - None => Err(PartialVMError::new(StatusCode::EMPTY_CODE_UNIT)), - Some(last) if !last.is_unconditional_branch() => { - Err(PartialVMError::new(StatusCode::INVALID_FALL_THROUGH) - .at_code_offset(current_function, (code.code.len() - 1) as CodeOffset)) - } - Some(_) => Ok(()), - } -} - -/// Test that `function_context`'s control-flow graph is reducible using -/// Tarjan's algorithm [1]. Optionally test loop depth bounded by -/// `verifier_config.max_loop_depth`. -/// -/// A CFG, `G`, with starting block `s` is reducible if and only if [2] any of -/// the following equivalent properties hold: -/// -/// 1. G has a unique set of back-edges `u -> v` where `v` dominates `u`, that -/// corresponds to the set of back-edges for any depth-first spanning tree -/// of G. -/// -/// 2. Every loop in G contains a unique node `h` (the "head") which dominates -/// all other nodes in the loop. -/// -/// 3. G has a unique maximal (in terms of number of edges) acyclic sub-graph. -/// -/// 4. G can be reduced to a CFG containing just `s` through a sequence of the -/// following two operations: a. Delete a cyclic edge `v -> v` b. For an -/// edge `e: u -> v` where `e` is the only incident edge to `v`, collapse -/// `v` into `u` by deleting `e` and `v` and replacing all `v -> w` edges -/// with `u -> w` edges. -/// -/// Reducibility means that a control-flow graph can be decomposed into a series -/// of nested loops (strongly connected subgraphs), which leads to more -/// predictable abstract interpretation performance. -/// -/// ## References -/// -/// 1. Tarjan, R. 1974. Testing Flow Graph Reducibility. -/// 2. Hecht, M. S., Ullman J. D. 1974. Characterizations of Reducible Flow -/// Graphs. -fn verify_reducibility<'a>( - verifier_config: &VerifierConfig, - function_context: &'a FunctionContext<'a>, -) -> PartialVMResult<()> { - let current_function = function_context - .index() - .unwrap_or(FunctionDefinitionIndex(0)); - let err = move |code: StatusCode, offset: CodeOffset| { - Err(PartialVMError::new(code).at_code_offset(current_function, offset)) - }; - - let summary = LoopSummary::new(function_context.cfg()); - let mut partition = LoopPartition::new(&summary); - - // Iterate through nodes in reverse pre-order so more deeply nested loops (which - // would appear later in the pre-order) are processed first. - for head in summary.preorder().rev() { - // If a node has no back edges, it is not a loop head, so doesn't need to be - // processed. - let back = summary.back_edges(head); - if back.is_empty() { - continue; - } - - // Collect the rest of the nodes in `head`'s loop, in `body`. Start with the - // nodes that jump back to the head, and grow `body` by repeatedly - // following predecessor edges until `head` is found again. - - let mut body = BTreeSet::new(); - for node in back { - let node = partition.containing_loop(*node); - - if node != head { - body.insert(node); - } - } - - let mut frontier: Vec<_> = body.iter().copied().collect(); - while let Some(node) = frontier.pop() { - for pred in summary.pred_edges(node) { - let pred = partition.containing_loop(*pred); - - // `pred` can eventually jump back to `head`, so is part of its body. If it is - // not a descendant of `head`, it implies that `head` does not - // dominate a node in its loop, therefore the CFG is not - // reducible, according to Property 1 (see doc comment). - if !summary.is_descendant(/* ancestor */ head, /* descendant */ pred) { - return err(StatusCode::INVALID_LOOP_SPLIT, summary.block(pred)); - } - - let body_extended = pred != head && body.insert(pred); - if body_extended { - frontier.push(pred); - } - } - } - - // Collapse all the nodes in `body` into `head`, so it appears as one node when - // processing outer loops (this performs a sequence of Operation 4(b), - // followed by a 4(a)). - let depth = partition.collapse_loop(head, &body); - if let Some(max_depth) = verifier_config.max_loop_depth { - if depth as usize > max_depth { - return err(StatusCode::LOOP_MAX_DEPTH_REACHED, summary.block(head)); - } - } - } - - Ok(()) -} diff --git a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/control_flow_v5.rs b/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/control_flow_v5.rs deleted file mode 100644 index ce1a55b3a14..00000000000 --- a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/src/control_flow_v5.rs +++ /dev/null @@ -1,287 +0,0 @@ -// Copyright (c) The Diem Core Contributors -// Copyright (c) The Move Contributors -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -//! This module implements a checker to verify control flow in bytecode version -//! 5 and below. The following properties are ensured: -//! - All forward jumps do not enter into the middle of a loop -//! - All "breaks" (forward, loop-exiting jumps) go to the "end" of the loop -//! - All "continues" (back jumps in a loop) are only to the current loop -use std::{collections::HashSet, convert::TryInto}; - -use move_binary_format::{ - errors::{PartialVMError, PartialVMResult}, - file_format::{Bytecode, CodeOffset, CodeUnit, FunctionDefinitionIndex}, - safe_unwrap, -}; -use move_core_types::vm_status::StatusCode; -use move_vm_config::verifier::VerifierConfig; - -pub fn verify( - verifier_config: &VerifierConfig, - current_function_opt: Option, - code: &CodeUnit, -) -> PartialVMResult<()> { - let current_function = current_function_opt.unwrap_or(FunctionDefinitionIndex(0)); - - // check fallthrough - verify_fallthrough(current_function, &code.code)?; - - // check jumps - let context = &ControlFlowVerifier { - current_function, - code: &code.code, - }; - let labels = instruction_labels(context); - check_jumps(verifier_config, context, labels) -} - -fn verify_fallthrough( - current_function: FunctionDefinitionIndex, - code: &[Bytecode], -) -> PartialVMResult<()> { - // Check to make sure that the bytecode vector ends with a branching - // instruction. - match code.last() { - None => Err(PartialVMError::new(StatusCode::EMPTY_CODE_UNIT)), - Some(last) if !last.is_unconditional_branch() => { - Err(PartialVMError::new(StatusCode::INVALID_FALL_THROUGH) - .at_code_offset(current_function, (code.len() - 1) as CodeOffset)) - } - Some(_) => Ok(()), - } -} - -#[derive(Clone, Copy)] -enum Label { - Loop { last_continue: u16 }, - Code, -} - -struct ControlFlowVerifier<'a> { - current_function: FunctionDefinitionIndex, - code: &'a Vec, -} - -impl<'a> ControlFlowVerifier<'a> { - fn code(&self) -> impl Iterator { - self.code - .iter() - .enumerate() - .map(|(idx, instr)| (idx.try_into().unwrap(), instr)) - } - - fn labeled_code<'b: 'a>( - &self, - labels: &'b [Label], - ) -> impl Iterator { - self.code() - .zip(labels) - .map(|((i, instr), lbl)| (i, instr, lbl)) - } - - fn error(&self, status: StatusCode, offset: CodeOffset) -> PartialVMError { - PartialVMError::new(status).at_code_offset(self.current_function, offset) - } -} - -fn instruction_labels(context: &ControlFlowVerifier) -> Vec
- ( - Signature(vec![SignatureToken::Vector(Box::new( - SignatureToken::Address, - ))]), - vec![MoveValue::Vector(vec![MoveValue::Bool(true)])], - StatusCode::FAILED_TO_DESERIALIZE_ARGUMENT, - ), - // u128 passed for vec
- ( - Signature(vec![SignatureToken::Vector(Box::new( - SignatureToken::Address, - ))]), - vec![MoveValue::U128(12)], - StatusCode::FAILED_TO_DESERIALIZE_ARGUMENT, - ), - // u8 passed for vector> - ( - Signature(vec![SignatureToken::Vector(Box::new( - SignatureToken::Vector(Box::new(SignatureToken::U8)), - ))]), - vec![MoveValue::U8(12)], - StatusCode::FAILED_TO_DESERIALIZE_ARGUMENT, - ), - ] -} - -fn general_cases() -> Vec<( - Signature, - Vec, - Vec, - Option, -)> { - vec![ - // too few signers (0) - ( - Signature(vec![SignatureToken::Signer, SignatureToken::Signer]), - vec![], - vec![], - Some(StatusCode::NUMBER_OF_ARGUMENTS_MISMATCH), - ), - // too few signers (1) - ( - Signature(vec![SignatureToken::Signer, SignatureToken::Signer]), - vec![], - vec![AccountAddress::random()], - Some(StatusCode::NUMBER_OF_ARGUMENTS_MISMATCH), - ), - // too few signers (3) - ( - Signature(vec![SignatureToken::Signer, SignatureToken::Signer]), - vec![], - vec![ - AccountAddress::random(), - AccountAddress::random(), - AccountAddress::random(), - ], - Some(StatusCode::NUMBER_OF_ARGUMENTS_MISMATCH), - ), - // correct number of signers (2) - ( - Signature(vec![SignatureToken::Signer, SignatureToken::Signer]), - vec![], - vec![AccountAddress::random(), AccountAddress::random()], - None, - ), - // too many signers (1) in a script that expects 0 is no longer ok - ( - Signature(vec![SignatureToken::U8]), - vec![MoveValue::U8(0)], - vec![AccountAddress::random()], - Some(StatusCode::NUMBER_OF_ARGUMENTS_MISMATCH), - ), - // signer - ( - Signature(vec![ - SignatureToken::Signer, - SignatureToken::Bool, - SignatureToken::Address, - ]), - vec![ - MoveValue::Bool(false), - MoveValue::Address(AccountAddress::random()), - ], - vec![AccountAddress::random()], - None, - ), - ] -} - -#[test] -fn check_script_function() { - // Bad signatures - // - for signature in deprecated_bad_signatures() { - let num_args = signature.0.len(); - let dummy_args = vec![MoveValue::Bool(false); num_args]; - let (module, function_name) = make_script_function(signature); - let res = call_script_function(module, function_name, serialize_values(&dummy_args)) - .err() - .unwrap(); - // either the dummy arg matches so abort, or it fails to match - // but the important thing is that the signature was accepted - assert!( - res.major_status() == StatusCode::ABORTED - || res.major_status() == StatusCode::FAILED_TO_DESERIALIZE_ARGUMENT - ) - } - - // Good signatures - // - for (signature, args) in good_signatures_and_arguments() { - // Body of the script is just an abort, so `ABORTED` means the script was - // accepted and ran - let expected_status = StatusCode::ABORTED; - let (module, function_name) = make_script_function(signature); - assert_eq!( - call_script_function(module, function_name, serialize_values(&args)) - .err() - .unwrap() - .major_status(), - expected_status - ) - } - - // Mismatched Cases - // - for (signature, args, error) in mismatched_cases() { - let (module, function_name) = make_script_function(signature); - assert_eq!( - call_script_function(module, function_name, serialize_values(&args)) - .err() - .unwrap() - .major_status(), - error - ); - } - - for (signature, args, signers, expected_status_opt) in general_cases() { - // Body of the script is just an abort, so `ABORTED` means the script was - // accepted and ran - let expected_status = expected_status_opt.unwrap_or(StatusCode::ABORTED); - let (module, function_name) = make_script_function(signature); - assert_eq!( - call_script_function_with_args_ty_args_signers( - module, - function_name, - serialize_values(&args), - vec![], - signers - ) - .err() - .unwrap() - .major_status(), - expected_status - ); - } - - // Non script visible - // DEPRECATED this check must now be done by the adapter - // - // public - let (module, function_name) = make_module_with_function( - Visibility::Public, - false, - Signature(vec![]), - Signature(vec![]), - vec![], - ); - assert_eq!( - call_script_function_with_args_ty_args_signers( - module, - function_name, - vec![], - vec![], - vec![], - ) - .err() - .unwrap() - .major_status(), - StatusCode::ABORTED, - ); - // private - let (module, function_name) = make_module_with_function( - Visibility::Private, - false, - Signature(vec![]), - Signature(vec![]), - vec![], - ); - assert_eq!( - call_script_function_with_args_ty_args_signers( - module, - function_name, - vec![], - vec![], - vec![], - ) - .err() - .unwrap() - .major_status(), - StatusCode::ABORTED, - ); -} - -#[test] -fn call_missing_item() { - let module = empty_module(); - let id = &module.self_id(); - let function_name = IdentStr::new("foo").unwrap(); - // missing module - let move_vm = MoveVM::new(vec![]).unwrap(); - let mut remote_view = RemoteStore::new(); - let mut session = move_vm.new_session(&remote_view); - let error = session - .execute_function_bypass_visibility( - id, - function_name, - vec![], - Vec::>::new(), - &mut UnmeteredGasMeter, - ) - .err() - .unwrap(); - assert_eq!(error.major_status(), StatusCode::LINKER_ERROR); - assert_eq!(error.status_type(), StatusType::Verification); - drop(session); - - // missing function - remote_view.add_module(module); - let mut session = move_vm.new_session(&remote_view); - let error = session - .execute_function_bypass_visibility( - id, - function_name, - vec![], - Vec::>::new(), - &mut UnmeteredGasMeter, - ) - .err() - .unwrap(); - assert_eq!( - error.major_status(), - StatusCode::FUNCTION_RESOLUTION_FAILURE - ); - assert_eq!(error.status_type(), StatusType::Verification); -} diff --git a/iota-execution/Cargo.toml b/iota-execution/Cargo.toml index 8d1bf2e2543..4899d7bdbf0 100644 --- a/iota-execution/Cargo.toml +++ b/iota-execution/Cargo.toml @@ -9,24 +9,19 @@ description = "Multiplexer to choose between multiple versions of iota and move [dependencies] iota-adapter-latest = { path = "latest/iota-adapter" } -iota-adapter-v0 = { path = "v0/iota-adapter" } # iota-adapter-$CUT = { path = "$CUT/iota-adapter" } iota-move-natives-latest = { path = "latest/iota-move-natives" } -iota-move-natives-v0 = { path = "v0/iota-move-natives" } iota-protocol-config.workspace = true iota-types.workspace = true # iota-move-natives-$CUT = { path = "$CUT/iota-move-natives" } iota-verifier-latest = { path = "latest/iota-verifier" } -iota-verifier-v0 = { path = "v0/iota-verifier" } move-binary-format.workspace = true # iota-verifier-$CUT = { path = "$CUT/iota-verifier" } move-bytecode-verifier-latest = { path = "../external-crates/move/crates/move-bytecode-verifier", package = "move-bytecode-verifier" } move-bytecode-verifier-meter.workspace = true -move-bytecode-verifier-v0 = { path = "../external-crates/move/move-execution/v0/crates/move-bytecode-verifier" } move-vm-config.workspace = true # move-bytecode-verifier-$CUT = { path = "../external-crates/move/move-execution/$CUT/crates/move-bytecode-verifier" } move-vm-runtime-latest = { path = "../external-crates/move/crates/move-vm-runtime", package = "move-vm-runtime" } -move-vm-runtime-v0 = { path = "../external-crates/move/move-execution/v0/crates/move-vm-runtime" } # move-vm-runtime-$CUT = { path = "../external-crates/move/move-execution/$CUT/crates/move-vm-runtime" } [dev-dependencies] diff --git a/iota-execution/latest/iota-adapter/src/programmable_transactions/context.rs b/iota-execution/latest/iota-adapter/src/programmable_transactions/context.rs index 3881633441a..d8d20638fc6 100644 --- a/iota-execution/latest/iota-adapter/src/programmable_transactions/context.rs +++ b/iota-execution/latest/iota-adapter/src/programmable_transactions/context.rs @@ -111,8 +111,6 @@ mod checked { recipient: Owner, /// the type of the object, type_: Type, - /// if the object has public transfer or not, i.e. if it has store - has_public_transfer: bool, /// contents of the object bytes: Vec, } @@ -729,12 +727,10 @@ mod checked { let AdditionalWrite { recipient, type_, - has_public_transfer, bytes, } = additional_write; - // safe given the invariant that the runtime correctly propagates - // has_public_transfer - let move_object = unsafe { + + let move_object = { create_written_object( vm, &linkage_view, @@ -742,7 +738,6 @@ mod checked { &loaded_runtime_objects, id, type_, - has_public_transfer, bytes, )? }; @@ -754,11 +749,6 @@ mod checked { } for (id, (recipient, ty, value)) in writes { - let abilities = vm - .get_runtime() - .get_type_abilities(&ty) - .map_err(|e| convert_vm_error(e, vm, &linkage_view))?; - let has_public_transfer = abilities.has_store(); let layout = vm .get_runtime() .type_to_type_layout(&ty) @@ -766,8 +756,7 @@ mod checked { let Some(bytes) = value.simple_serialize(&layout) else { invariant_violation!("Failed to deserialize already serialized Move value"); }; - // safe because has_public_transfer has been determined by the abilities - let move_object = unsafe { + let move_object = { create_written_object( vm, &linkage_view, @@ -775,7 +764,6 @@ mod checked { &loaded_runtime_objects, id, ty, - has_public_transfer, bytes, )? }; @@ -1361,10 +1349,7 @@ mod checked { object_value: ObjectValue, ) -> Result<(), ExecutionError> { let ObjectValue { - type_, - has_public_transfer, - contents, - .. + type_, contents, .. } = object_value; let bytes = match contents { ObjectContents::Coin(coin) => coin.to_bcs_bytes(), @@ -1376,7 +1361,6 @@ mod checked { let additional_write = AdditionalWrite { recipient: owner, type_, - has_public_transfer, bytes, }; additional_writes.insert(object_id, additional_write); @@ -1409,19 +1393,13 @@ mod checked { } /// Generate an MoveObject given an updated/written object - /// # Safety - /// - /// This function assumes proper generation of has_public_transfer, either - /// from the abilities of the StructTag, or from the runtime correctly - /// propagating from the inputs - unsafe fn create_written_object( + fn create_written_object( vm: &MoveVM, linkage_view: &LinkageView, protocol_config: &ProtocolConfig, objects_modified_at: &BTreeMap, id: ObjectID, type_: Type, - has_public_transfer: bool, contents: Vec, ) -> Result { debug_assert_eq!( @@ -1443,7 +1421,6 @@ mod checked { }; MoveObject::new_from_execution( struct_tag.into(), - has_public_transfer, old_obj_ver.unwrap_or_default(), contents, protocol_config, diff --git a/iota-execution/latest/iota-move-natives/src/test_scenario.rs b/iota-execution/latest/iota-move-natives/src/test_scenario.rs index 767eff3aeb2..ca4243359c9 100644 --- a/iota-execution/latest/iota-move-natives/src/test_scenario.rs +++ b/iota-execution/latest/iota-move-natives/src/test_scenario.rs @@ -611,14 +611,8 @@ pub fn allocate_receiving_ticket_for_object( E_UNABLE_TO_ALLOCATE_RECEIVING_TICKET, )); }; - let move_object = unsafe { - MoveObject::new_from_execution_with_limit( - tag.into(), - false, - object_version, - bytes, - 250 * 1024, - ) + let move_object = { + MoveObject::new_from_execution_with_limit(tag.into(), object_version, bytes, 250 * 1024) } .unwrap(); diff --git a/iota-execution/src/lib.rs b/iota-execution/src/lib.rs index 15123bde170..adb1000c778 100644 --- a/iota-execution/src/lib.rs +++ b/iota-execution/src/lib.rs @@ -15,7 +15,6 @@ pub mod executor; pub mod verifier; mod latest; -mod v0; #[cfg(test)] mod tests; @@ -25,10 +24,8 @@ pub fn executor( silent: bool, enable_profiler: Option, ) -> IotaResult> { - let version = protocol_config.execution_version_as_option().unwrap_or(0); + let version = protocol_config.execution_version_as_option().unwrap_or(1); Ok(match version { - 0 => Arc::new(v0::Executor::new(protocol_config, silent, enable_profiler)?), - 1 => Arc::new(latest::Executor::new( protocol_config, silent, @@ -44,10 +41,9 @@ pub fn verifier<'m>( for_signing: bool, metrics: &'m Arc, ) -> Box { - let version = protocol_config.execution_version_as_option().unwrap_or(0); + let version = protocol_config.execution_version_as_option().unwrap_or(1); let config = protocol_config.verifier_config(for_signing); match version { - 0 => Box::new(v0::Verifier::new(config, metrics)), 1 => Box::new(latest::Verifier::new(config, metrics)), v => panic!("Unsupported execution version {v}"), } diff --git a/iota-execution/src/lib.template.rs b/iota-execution/src/lib.template.rs index ddfb8987759..d820b46f385 100644 --- a/iota-execution/src/lib.template.rs +++ b/iota-execution/src/lib.template.rs @@ -4,13 +4,11 @@ // $GENERATED_MESSAGE -use std::path::PathBuf; -use std::sync::Arc; +use std::{path::PathBuf, sync::Arc}; +pub use executor::Executor; use iota_protocol_config::ProtocolConfig; use iota_types::{error::IotaResult, metrics::BytecodeVerifierMetrics}; - -pub use executor::Executor; pub use verifier::Verifier; pub mod executor; @@ -27,7 +25,7 @@ pub fn executor( silent: bool, enable_profiler: Option, ) -> IotaResult> { - let version = protocol_config.execution_version_as_option().unwrap_or(0); + let version = protocol_config.execution_version_as_option().unwrap_or(1); Ok(match version { // $EXECUTOR_CUTS v => panic!("Unsupported execution version {v}"), @@ -39,7 +37,7 @@ pub fn verifier<'m>( for_signing: bool, metrics: &'m Arc, ) -> Box { - let version = protocol_config.execution_version_as_option().unwrap_or(0); + let version = protocol_config.execution_version_as_option().unwrap_or(1); let config = protocol_config.verifier_config(for_signing); match version { // $VERIFIER_CUTS diff --git a/iota-execution/src/v0.rs b/iota-execution/src/v0.rs deleted file mode 100644 index 1181c0c8606..00000000000 --- a/iota-execution/src/v0.rs +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::{collections::HashSet, path::PathBuf, sync::Arc}; - -use iota_adapter_v0::{ - adapter::{new_move_vm, run_metered_move_bytecode_verifier}, - execution_engine::{execute_genesis_state_update, execute_transaction_to_effects}, - execution_mode, - type_layout_resolver::TypeLayoutResolver, -}; -use iota_move_natives_v0::all_natives; -use iota_protocol_config::ProtocolConfig; -use iota_types::{ - base_types::{IotaAddress, ObjectRef, TxContext}, - committee::EpochId, - digests::TransactionDigest, - effects::TransactionEffects, - error::{ExecutionError, IotaError, IotaResult}, - execution::{ExecutionResult, TypeLayoutStore}, - gas::IotaGasStatus, - inner_temporary_store::InnerTemporaryStore, - layout_resolver::LayoutResolver, - metrics::{BytecodeVerifierMetrics, LimitsMetrics}, - storage::BackingStore, - transaction::{CheckedInputObjects, ProgrammableTransaction, TransactionKind}, -}; -use iota_verifier_v0::meter::IotaVerifierMeter; -use move_binary_format::CompiledModule; -use move_bytecode_verifier_meter::Meter; -use move_vm_config::verifier::{MeterConfig, VerifierConfig}; -use move_vm_runtime_v0::move_vm::MoveVM; - -use crate::{executor, verifier}; - -pub(crate) struct Executor(Arc); - -pub(crate) struct Verifier<'m> { - config: VerifierConfig, - metrics: &'m Arc, -} - -impl Executor { - pub(crate) fn new( - protocol_config: &ProtocolConfig, - silent: bool, - enable_profiler: Option, - ) -> Result { - Ok(Executor(Arc::new(new_move_vm( - all_natives(silent, protocol_config), - protocol_config, - enable_profiler, - )?))) - } -} - -impl<'m> Verifier<'m> { - pub(crate) fn new(config: VerifierConfig, metrics: &'m Arc) -> Self { - Verifier { config, metrics } - } -} - -impl executor::Executor for Executor { - fn execute_transaction_to_effects( - &self, - store: &dyn BackingStore, - protocol_config: &ProtocolConfig, - metrics: Arc, - enable_expensive_checks: bool, - certificate_deny_set: &HashSet, - epoch_id: &EpochId, - epoch_timestamp_ms: u64, - input_objects: CheckedInputObjects, - gas_coins: Vec, - gas_status: IotaGasStatus, - transaction_kind: TransactionKind, - transaction_signer: IotaAddress, - transaction_digest: TransactionDigest, - ) -> ( - InnerTemporaryStore, - IotaGasStatus, - TransactionEffects, - Result<(), ExecutionError>, - ) { - execute_transaction_to_effects::( - store, - input_objects, - gas_coins, - gas_status, - transaction_kind, - transaction_signer, - transaction_digest, - &self.0, - epoch_id, - epoch_timestamp_ms, - protocol_config, - metrics, - enable_expensive_checks, - certificate_deny_set, - ) - } - - fn dev_inspect_transaction( - &self, - store: &dyn BackingStore, - protocol_config: &ProtocolConfig, - metrics: Arc, - enable_expensive_checks: bool, - certificate_deny_set: &HashSet, - epoch_id: &EpochId, - epoch_timestamp_ms: u64, - input_objects: CheckedInputObjects, - gas_coins: Vec, - gas_status: IotaGasStatus, - transaction_kind: TransactionKind, - transaction_signer: IotaAddress, - transaction_digest: TransactionDigest, - skip_all_checks: bool, - ) -> ( - InnerTemporaryStore, - IotaGasStatus, - TransactionEffects, - Result, ExecutionError>, - ) { - if skip_all_checks { - execute_transaction_to_effects::>( - store, - input_objects, - gas_coins, - gas_status, - transaction_kind, - transaction_signer, - transaction_digest, - &self.0, - epoch_id, - epoch_timestamp_ms, - protocol_config, - metrics, - enable_expensive_checks, - certificate_deny_set, - ) - } else { - execute_transaction_to_effects::>( - store, - input_objects, - gas_coins, - gas_status, - transaction_kind, - transaction_signer, - transaction_digest, - &self.0, - epoch_id, - epoch_timestamp_ms, - protocol_config, - metrics, - enable_expensive_checks, - certificate_deny_set, - ) - } - } - - fn update_genesis_state( - &self, - store: &dyn BackingStore, - protocol_config: &ProtocolConfig, - metrics: Arc, - tx_context: &mut TxContext, - input_objects: CheckedInputObjects, - pt: ProgrammableTransaction, - ) -> Result { - execute_genesis_state_update( - store, - protocol_config, - metrics, - &self.0, - tx_context, - input_objects, - pt, - ) - } - - fn type_layout_resolver<'r, 'vm: 'r, 'store: 'r>( - &'vm self, - store: Box, - ) -> Box { - Box::new(TypeLayoutResolver::new(&self.0, store)) - } -} - -impl<'m> verifier::Verifier for Verifier<'m> { - fn meter(&self, config: MeterConfig) -> Box { - Box::new(IotaVerifierMeter::new(config)) - } - - fn meter_compiled_modules( - &mut self, - _protocol_config: &ProtocolConfig, - modules: &[CompiledModule], - meter: &mut dyn Meter, - ) -> IotaResult<()> { - run_metered_move_bytecode_verifier(modules, &self.config, meter, self.metrics) - } -} diff --git a/iota-execution/v0/iota-adapter/Cargo.toml b/iota-execution/v0/iota-adapter/Cargo.toml deleted file mode 100644 index 03405276c34..00000000000 --- a/iota-execution/v0/iota-adapter/Cargo.toml +++ /dev/null @@ -1,46 +0,0 @@ -[package] -name = "iota-adapter-v0" -version = "0.1.0" -authors = ["IOTA Foundation "] -edition = "2021" -license = "Apache-2.0" -publish = false -description = "Adapter and accompanying CLI for local iota development" - -[lints] -workspace = true - -[dependencies] -# external dependencies -anyhow = { workspace = true, features = ["backtrace"] } -bcs.workspace = true -leb128.workspace = true -parking_lot.workspace = true -serde.workspace = true -tracing.workspace = true - -# internal dependencies -iota-macros.workspace = true -iota-metrics.workspace = true -iota-move-natives = { path = "../iota-move-natives", package = "iota-move-natives-v0" } -iota-protocol-config.workspace = true -iota-types.workspace = true -iota-verifier = { path = "../iota-verifier", package = "iota-verifier-v0" } -move-binary-format.workspace = true -move-bytecode-utils.workspace = true -move-bytecode-verifier = { path = "../../../external-crates/move/move-execution/v0/crates/move-bytecode-verifier", package = "move-bytecode-verifier-v0" } -move-bytecode-verifier-meter.workspace = true -move-core-types.workspace = true -move-vm-config.workspace = true -move-vm-profiler = { path = "../../../external-crates/move/crates/move-vm-profiler" } -move-vm-runtime = { path = "../../../external-crates/move/move-execution/v0/crates/move-vm-runtime", package = "move-vm-runtime-v0" } -move-vm-types.workspace = true - -[features] -gas-profiler = [ - "iota-types/gas-profiler", - "move-vm-config/gas-profiler", - "move-vm-profiler/gas-profiler", - "move-vm-runtime/gas-profiler", - "move-vm-types/gas-profiler", -] diff --git a/iota-execution/v0/iota-adapter/src/adapter.rs b/iota-execution/v0/iota-adapter/src/adapter.rs deleted file mode 100644 index 295facc2e8f..00000000000 --- a/iota-execution/v0/iota-adapter/src/adapter.rs +++ /dev/null @@ -1,231 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -pub use checked::*; -#[iota_macros::with_checked_arithmetic] -mod checked { - use std::{collections::BTreeMap, path::PathBuf, sync::Arc}; - - use anyhow::Result; - use iota_move_natives::{NativesCostTable, object_runtime, object_runtime::ObjectRuntime}; - use iota_protocol_config::ProtocolConfig; - use iota_types::{ - base_types::*, - error::{ExecutionError, ExecutionErrorKind, IotaError}, - execution_config_utils::to_binary_config, - metrics::{BytecodeVerifierMetrics, LimitsMetrics}, - storage::ChildObjectResolver, - }; - use iota_verifier::{ - check_for_verifier_timeout, verifier::iota_verify_module_metered_check_timeout_only, - }; - use move_binary_format::file_format::CompiledModule; - use move_bytecode_verifier::verify_module_with_config_metered; - use move_bytecode_verifier_meter::{Meter, Scope}; - use move_core_types::account_address::AccountAddress; - #[cfg(feature = "gas-profiler")] - use move_vm_config::runtime::VMProfilerConfig; - use move_vm_config::{ - runtime::{VMConfig, VMRuntimeLimitsConfig}, - verifier::VerifierConfig, - }; - use move_vm_runtime::{ - move_vm::MoveVM, native_extensions::NativeContextExtensions, - native_functions::NativeFunctionTable, - }; - use tracing::instrument; - - /// Creates a new instance of `MoveVM` with the specified native functions - /// and protocol configuration. The VM is configured using a `VMConfig` - /// that sets limits for vector length, value depth, and other - /// runtime options based on the provided `ProtocolConfig`. If gas profiling - /// is enabled, the function configures the profiler with the provided - /// path. - pub fn new_move_vm( - natives: NativeFunctionTable, - protocol_config: &ProtocolConfig, - _enable_profiler: Option, - ) -> Result { - #[cfg(not(feature = "gas-profiler"))] - let vm_profiler_config = None; - #[cfg(feature = "gas-profiler")] - let vm_profiler_config = _enable_profiler.clone().map(|path| VMProfilerConfig { - full_path: path, - track_bytecode_instructions: false, - use_long_function_name: false, - }); - MoveVM::new_with_config(natives, VMConfig { - verifier: protocol_config.verifier_config(/* for_signing */ false), - max_binary_format_version: protocol_config.move_binary_format_version(), - runtime_limits_config: VMRuntimeLimitsConfig { - vector_len_max: protocol_config.max_move_vector_len(), - max_value_nest_depth: protocol_config.max_move_value_depth_as_option(), - hardened_otw_check: protocol_config.hardened_otw_check(), - }, - enable_invariant_violation_check_in_swap_loc: !protocol_config - .disable_invariant_violation_check_in_swap_loc(), - check_no_extraneous_bytes_during_deserialization: protocol_config - .no_extraneous_module_bytes(), - profiler_config: vm_profiler_config, - // Don't augment errors with execution state on-chain - error_execution_state: false, - binary_config: to_binary_config(protocol_config), - rethrow_serialization_type_layout_errors: protocol_config - .rethrow_serialization_type_layout_errors(), - }) - .map_err(|_| IotaError::ExecutionInvariantViolation) - } - - /// Creates a new set of `NativeContextExtensions` for the Move VM, - /// configuring extensions such as `ObjectRuntime` and - /// `NativesCostTable`. These extensions manage object resolution, input - /// objects, metering, protocol configuration, and metrics tracking. - /// They are available and mainly used in native function implementations - /// via `NativeContext` instance. - pub fn new_native_extensions<'r>( - child_resolver: &'r dyn ChildObjectResolver, - input_objects: BTreeMap, - is_metered: bool, - protocol_config: &'r ProtocolConfig, - metrics: Arc, - current_epoch_id: EpochId, - ) -> NativeContextExtensions<'r> { - let mut extensions = NativeContextExtensions::default(); - extensions.add(ObjectRuntime::new( - child_resolver, - input_objects, - is_metered, - protocol_config, - metrics, - current_epoch_id, - )); - extensions.add(NativesCostTable::from_protocol_config(protocol_config)); - extensions - } - - /// Given a list of `modules` and an `object_id`, mutate each module's self - /// ID (which must be 0x0) to be `object_id`. - pub fn substitute_package_id( - modules: &mut [CompiledModule], - object_id: ObjectID, - ) -> Result<(), ExecutionError> { - let new_address = AccountAddress::from(object_id); - - for module in modules.iter_mut() { - let self_handle = module.self_handle().clone(); - let self_address_idx = self_handle.address; - - let addrs = &mut module.address_identifiers; - let Some(address_mut) = addrs.get_mut(self_address_idx.0 as usize) else { - let name = module.identifier_at(self_handle.name); - return Err(ExecutionError::new_with_source( - ExecutionErrorKind::PublishErrorNonZeroAddress, - format!("Publishing module {name} with invalid address index"), - )); - }; - - if *address_mut != AccountAddress::ZERO { - let name = module.identifier_at(self_handle.name); - return Err(ExecutionError::new_with_source( - ExecutionErrorKind::PublishErrorNonZeroAddress, - format!("Publishing module {name} with non-zero address is not allowed"), - )); - }; - - *address_mut = new_address; - } - - Ok(()) - } - - /// Returns an error message for a missing unwrapped object. - pub fn missing_unwrapped_msg(id: &ObjectID) -> String { - format!( - "Unable to unwrap object {}. Was unable to retrieve last known version in the parent sync", - id - ) - } - - /// Run the bytecode verifier with a meter limit - /// - /// This function only fails if the verification does not complete within - /// the limit. If the modules fail to verify but verification completes - /// within the meter limit, the function succeeds. - #[instrument(level = "trace", skip_all)] - pub fn run_metered_move_bytecode_verifier( - modules: &[CompiledModule], - verifier_config: &VerifierConfig, - meter: &mut (impl Meter + ?Sized), - metrics: &Arc, - ) -> Result<(), IotaError> { - // run the Move verifier - for module in modules.iter() { - let per_module_meter_verifier_timer = metrics - .verifier_runtime_per_module_success_latency - .start_timer(); - - if let Err(e) = verify_module_timeout_only(module, verifier_config, meter) { - // We only checked that the failure was due to timeout - // Discard success timer, but record timeout/failure timer - metrics - .verifier_runtime_per_module_timeout_latency - .observe(per_module_meter_verifier_timer.stop_and_discard()); - metrics - .verifier_timeout_metrics - .with_label_values(&[ - BytecodeVerifierMetrics::OVERALL_TAG, - BytecodeVerifierMetrics::TIMEOUT_TAG, - ]) - .inc(); - - return Err(e); - }; - - // Save the success timer - per_module_meter_verifier_timer.stop_and_record(); - metrics - .verifier_timeout_metrics - .with_label_values(&[ - BytecodeVerifierMetrics::OVERALL_TAG, - BytecodeVerifierMetrics::SUCCESS_TAG, - ]) - .inc(); - } - - Ok(()) - } - - /// Run both the Move verifier and the Iota verifier, checking just for - /// timeouts. Returns Ok(()) if the verifier completes within the module - /// meter limit and the ticks are successfully transfered to the package - /// limit (regardless of whether verification succeeds or not). - fn verify_module_timeout_only( - module: &CompiledModule, - verifier_config: &VerifierConfig, - meter: &mut (impl Meter + ?Sized), - ) -> Result<(), IotaError> { - meter.enter_scope(module.self_id().name().as_str(), Scope::Module); - - if let Err(e) = verify_module_with_config_metered(verifier_config, module, meter) { - // Check that the status indicates metering timeout. - if check_for_verifier_timeout(&e.major_status()) { - return Err(IotaError::ModuleVerificationFailure { - error: format!("Verification timed out: {}", e), - }); - } - } else if let Err(err) = - iota_verify_module_metered_check_timeout_only(module, &BTreeMap::new(), meter) - { - return Err(err.into()); - } - - if meter.transfer(Scope::Module, Scope::Package, 1.0).is_err() { - return Err(IotaError::ModuleVerificationFailure { - error: "Verification timed out".to_string(), - }); - } - - Ok(()) - } -} diff --git a/iota-execution/v0/iota-adapter/src/error.rs b/iota-execution/v0/iota-adapter/src/error.rs deleted file mode 100644 index 828a5174505..00000000000 --- a/iota-execution/v0/iota-adapter/src/error.rs +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use iota_types::{ - error::{ExecutionError, IotaError}, - execution_status::{ExecutionFailureStatus, MoveLocation, MoveLocationOpt}, -}; -use move_binary_format::{ - errors::{Location, VMError}, - file_format::FunctionDefinitionIndex, -}; -use move_core_types::{ - resolver::MoveResolver, - vm_status::{StatusCode, StatusType}, -}; -use move_vm_runtime::move_vm::MoveVM; - -pub(crate) fn convert_vm_error>( - error: VMError, - vm: &MoveVM, - state_view: &S, -) -> ExecutionError { - let kind = match (error.major_status(), error.sub_status(), error.location()) { - (StatusCode::EXECUTED, _, _) => { - // If we have an error the status probably shouldn't ever be Executed - debug_assert!(false, "VmError shouldn't ever report successful execution"); - ExecutionFailureStatus::VMInvariantViolation - } - (StatusCode::ABORTED, None, _) => { - debug_assert!(false, "No abort code"); - // this is a Move VM invariant violation, the code should always be there - ExecutionFailureStatus::VMInvariantViolation - } - (StatusCode::ABORTED, Some(code), Location::Module(id)) => { - let abort_location_id = state_view.relocate(id).unwrap_or_else(|_| id.clone()); - let offset = error.offsets().first().copied().map(|(f, i)| (f.0, i)); - debug_assert!(offset.is_some(), "Move should set the location on aborts"); - let (function, instruction) = offset.unwrap_or((0, 0)); - let function_name = vm.load_module(id, state_view).ok().map(|module| { - let fdef = module.function_def_at(FunctionDefinitionIndex(function)); - let fhandle = module.function_handle_at(fdef.function); - module.identifier_at(fhandle.name).to_string() - }); - ExecutionFailureStatus::MoveAbort( - MoveLocation { - module: abort_location_id, - function, - instruction, - function_name, - }, - code, - ) - } - (StatusCode::OUT_OF_GAS, _, _) => ExecutionFailureStatus::InsufficientGas, - (_, _, location) => match error.major_status().status_type() { - StatusType::Execution => { - debug_assert!(error.major_status() != StatusCode::ABORTED); - let location = match location { - Location::Module(id) => { - let offset = error.offsets().first().copied().map(|(f, i)| (f.0, i)); - debug_assert!( - offset.is_some(), - "Move should set the location on all execution errors. Error {error}" - ); - let (function, instruction) = offset.unwrap_or((0, 0)); - let function_name = vm.load_module(id, state_view).ok().map(|module| { - let fdef = module.function_def_at(FunctionDefinitionIndex(function)); - let fhandle = module.function_handle_at(fdef.function); - module.identifier_at(fhandle.name).to_string() - }); - Some(MoveLocation { - module: id.clone(), - function, - instruction, - function_name, - }) - } - _ => None, - }; - ExecutionFailureStatus::MovePrimitiveRuntimeError(MoveLocationOpt(location)) - } - StatusType::Validation - | StatusType::Verification - | StatusType::Deserialization - | StatusType::Unknown => ExecutionFailureStatus::VMVerificationOrDeserializationError, - StatusType::InvariantViolation => ExecutionFailureStatus::VMInvariantViolation, - }, - }; - ExecutionError::new_with_source(kind, error) -} diff --git a/iota-execution/v0/iota-adapter/src/execution_engine.rs b/iota-execution/v0/iota-adapter/src/execution_engine.rs deleted file mode 100644 index 26353e36d0a..00000000000 --- a/iota-execution/v0/iota-adapter/src/execution_engine.rs +++ /dev/null @@ -1,1235 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -pub use checked::*; - -#[iota_macros::with_checked_arithmetic] -mod checked { - - use std::{collections::HashSet, sync::Arc}; - - use iota_move_natives::all_natives; - use iota_protocol_config::{LimitThresholdCrossed, ProtocolConfig, check_limit_by_meter}; - #[cfg(msim)] - use iota_types::iota_system_state::advance_epoch_result_injection::maybe_modify_result; - use iota_types::{ - BRIDGE_ADDRESS, IOTA_AUTHENTICATOR_STATE_OBJECT_ID, IOTA_BRIDGE_OBJECT_ID, - IOTA_FRAMEWORK_ADDRESS, IOTA_FRAMEWORK_PACKAGE_ID, IOTA_RANDOMNESS_STATE_OBJECT_ID, - IOTA_SYSTEM_PACKAGE_ID, - authenticator_state::{ - AUTHENTICATOR_STATE_CREATE_FUNCTION_NAME, - AUTHENTICATOR_STATE_EXPIRE_JWKS_FUNCTION_NAME, AUTHENTICATOR_STATE_MODULE_NAME, - AUTHENTICATOR_STATE_UPDATE_FUNCTION_NAME, - }, - balance::{ - BALANCE_CREATE_REWARDS_FUNCTION_NAME, BALANCE_DESTROY_REBATES_FUNCTION_NAME, - BALANCE_MODULE_NAME, - }, - base_types::{ - IotaAddress, ObjectID, ObjectRef, SequenceNumber, TransactionDigest, TxContext, - }, - bridge::{ - BRIDGE_COMMITTEE_MINIMAL_VOTING_POWER, BRIDGE_CREATE_FUNCTION_NAME, - BRIDGE_INIT_COMMITTEE_FUNCTION_NAME, BRIDGE_MODULE_NAME, BridgeChainId, - }, - clock::{CLOCK_MODULE_NAME, CONSENSUS_COMMIT_PROLOGUE_FUNCTION_NAME}, - committee::EpochId, - digests::{ChainIdentifier, get_mainnet_chain_identifier, get_testnet_chain_identifier}, - effects::TransactionEffects, - error::{ExecutionError, ExecutionErrorKind}, - execution::{ExecutionResults, ExecutionResultsV1, is_certificate_denied}, - execution_config_utils::to_binary_config, - execution_status::{CongestedObjects, ExecutionStatus}, - gas::{GasCostSummary, IotaGasStatus}, - gas_coin::GAS, - id::UID, - inner_temporary_store::InnerTemporaryStore, - iota_system_state::{ - ADVANCE_EPOCH_FUNCTION_NAME, AdvanceEpochParams, IOTA_SYSTEM_MODULE_NAME, - }, - messages_checkpoint::CheckpointTimestamp, - metrics::LimitsMetrics, - object::{OBJECT_START_VERSION, Object, ObjectInner}, - programmable_transaction_builder::ProgrammableTransactionBuilder, - randomness_state::{RANDOMNESS_MODULE_NAME, RANDOMNESS_STATE_UPDATE_FUNCTION_NAME}, - storage::{BackingStore, Storage}, - transaction::{ - Argument, AuthenticatorStateExpire, AuthenticatorStateUpdateV1, CallArg, ChangeEpoch, - CheckedInputObjects, Command, EndOfEpochTransactionKind, GenesisTransaction, ObjectArg, - ProgrammableTransaction, RandomnessStateUpdate, TransactionKind, - }, - }; - use move_binary_format::CompiledModule; - use move_core_types::ident_str; - use move_vm_runtime::move_vm::MoveVM; - use tracing::{info, instrument, trace, warn}; - - use crate::{ - adapter::new_move_vm, - execution_mode::{self, ExecutionMode}, - gas_charger::GasCharger, - programmable_transactions, - temporary_store::TemporaryStore, - type_layout_resolver::TypeLayoutResolver, - }; - - /// The main entry point to the adapter's transaction execution. It - /// prepares a transaction for execution, then executes it through an - /// inner execution method and finally produces an instance of - /// transaction effects. It also returns the inner temporary store, which - /// contains the objects resulting from the transction execution, the gas - /// status instance, which tracks the gas usage, and the execution result. - /// The function handles transaction execution based on the provided - /// `TransactionKind`. It checks for any expensive operations, manages - /// shared object references, and ensures transaction dependencies are - /// met. The returned objects are not committed to the store until the - /// resulting effects are applied by the caller. - #[instrument(name = "tx_execute_to_effects", level = "debug", skip_all)] - pub fn execute_transaction_to_effects( - store: &dyn BackingStore, - input_objects: CheckedInputObjects, - gas_coins: Vec, - gas_status: IotaGasStatus, - transaction_kind: TransactionKind, - transaction_signer: IotaAddress, - transaction_digest: TransactionDigest, - move_vm: &Arc, - epoch_id: &EpochId, - epoch_timestamp_ms: u64, - protocol_config: &ProtocolConfig, - metrics: Arc, - enable_expensive_checks: bool, - certificate_deny_set: &HashSet, - ) -> ( - InnerTemporaryStore, - IotaGasStatus, - TransactionEffects, - Result, - ) { - let input_objects = input_objects.into_inner(); - let mutable_inputs = if enable_expensive_checks { - input_objects.mutable_inputs().keys().copied().collect() - } else { - HashSet::new() - }; - let shared_object_refs = input_objects.filter_shared_objects(); - let receiving_objects = transaction_kind.receiving_objects(); - let mut transaction_dependencies = input_objects.transaction_dependencies(); - let contains_deleted_input = input_objects.contains_deleted_objects(); - let cancelled_objects = input_objects.get_cancelled_objects(); - - let mut temporary_store = TemporaryStore::new( - store, - input_objects, - receiving_objects, - transaction_digest, - protocol_config, - *epoch_id, - ); - - let mut gas_charger = - GasCharger::new(transaction_digest, gas_coins, gas_status, protocol_config); - - let mut tx_ctx = TxContext::new_from_components( - &transaction_signer, - &transaction_digest, - epoch_id, - epoch_timestamp_ms, - ); - - let is_epoch_change = transaction_kind.is_end_of_epoch_tx(); - - let deny_cert = is_certificate_denied(&transaction_digest, certificate_deny_set); - let (gas_cost_summary, execution_result) = execute_transaction::( - &mut temporary_store, - transaction_kind, - &mut gas_charger, - &mut tx_ctx, - move_vm, - protocol_config, - metrics, - enable_expensive_checks, - deny_cert, - contains_deleted_input, - cancelled_objects, - ); - - let status = if let Err(error) = &execution_result { - // Elaborate errors in logs if they are unexpected or their status is terse. - use ExecutionErrorKind as K; - match error.kind() { - K::InvariantViolation | K::VMInvariantViolation => { - #[skip_checked_arithmetic] - tracing::error!( - kind = ?error.kind(), - tx_digest = ?transaction_digest, - "INVARIANT VIOLATION! Source: {:?}", - error.source(), - ); - } - - K::IotaMoveVerificationError | K::VMVerificationOrDeserializationError => { - #[skip_checked_arithmetic] - tracing::debug!( - kind = ?error.kind(), - tx_digest = ?transaction_digest, - "Verification Error. Source: {:?}", - error.source(), - ); - } - - K::PublishUpgradeMissingDependency | K::PublishUpgradeDependencyDowngrade => { - #[skip_checked_arithmetic] - tracing::debug!( - kind = ?error.kind(), - tx_digest = ?transaction_digest, - "Publish/Upgrade Error. Source: {:?}", - error.source(), - ) - } - - _ => (), - }; - - let (status, command) = error.to_execution_status(); - ExecutionStatus::new_failure(status, command) - } else { - ExecutionStatus::Success - }; - - #[skip_checked_arithmetic] - trace!( - tx_digest = ?transaction_digest, - computation_gas_cost = gas_cost_summary.computation_cost, - storage_gas_cost = gas_cost_summary.storage_cost, - storage_gas_rebate = gas_cost_summary.storage_rebate, - "Finished execution of transaction with status {:?}", - status - ); - - // Genesis writes a special digest to indicate that an object was created during - // genesis and not written by any normal transaction - remove that from the - // dependencies - transaction_dependencies.remove(&TransactionDigest::genesis_marker()); - - if enable_expensive_checks && !Mode::allow_arbitrary_function_calls() { - temporary_store - .check_ownership_invariants( - &transaction_signer, - &mut gas_charger, - &mutable_inputs, - is_epoch_change, - ) - .unwrap() - } // else, in dev inspect mode and anything goes--don't check - - let (inner, effects) = temporary_store.into_effects( - shared_object_refs, - &transaction_digest, - transaction_dependencies, - gas_cost_summary, - status, - &mut gas_charger, - *epoch_id, - ); - - ( - inner, - gas_charger.into_gas_status(), - effects, - execution_result, - ) - } - - /// Function dedicated to the execution of a GenesisTransaction. - /// The function creates an `InnerTemporaryStore`, processes the input - /// objects, and executes the transaction in unmetered mode using the - /// `Genesis` execution mode. It returns an inner temporary store that - /// contains the objects found into the input `GenesisTransaction` by - /// adding the data for `previous_transaction` and `storage_rebate` fields. - pub fn execute_genesis_state_update( - store: &dyn BackingStore, - protocol_config: &ProtocolConfig, - metrics: Arc, - move_vm: &Arc, - tx_context: &mut TxContext, - input_objects: CheckedInputObjects, - pt: ProgrammableTransaction, - ) -> Result { - let input_objects = input_objects.into_inner(); - let mut temporary_store = TemporaryStore::new( - store, - input_objects, - vec![], - tx_context.digest(), - protocol_config, - 0, - ); - let mut gas_charger = GasCharger::new_unmetered(tx_context.digest()); - programmable_transactions::execution::execute::( - protocol_config, - metrics, - move_vm, - &mut temporary_store, - tx_context, - &mut gas_charger, - pt, - )?; - temporary_store.update_object_version_and_prev_tx(); - Ok(temporary_store.into_inner()) - } - - /// Executes a transaction by processing the specified `TransactionKind`, - /// applying the necessary gas charges and running the main execution logic. - /// The function handles certain error conditions such as denied - /// certificate, deleted input objects, exceeded execution meter limits, - /// failed conservation checks. It also accounts for unmetered storage - /// rebates and adjusts for special cases like epoch change - /// transactions. Gas costs are managed through the `GasCharger` - /// argument; gas is also charged in case of errors. - #[instrument(name = "tx_execute", level = "debug", skip_all)] - fn execute_transaction( - temporary_store: &mut TemporaryStore<'_>, - transaction_kind: TransactionKind, - gas_charger: &mut GasCharger, - tx_ctx: &mut TxContext, - move_vm: &Arc, - protocol_config: &ProtocolConfig, - metrics: Arc, - enable_expensive_checks: bool, - deny_cert: bool, - contains_deleted_input: bool, - cancelled_objects: Option<(Vec, SequenceNumber)>, - ) -> ( - GasCostSummary, - Result, - ) { - gas_charger.smash_gas(temporary_store); - - // At this point no charges have been applied yet - debug_assert!( - gas_charger.no_charges(), - "No gas charges must be applied yet" - ); - - let is_genesis_or_epoch_change_tx = matches!(transaction_kind, TransactionKind::Genesis(_)) - || transaction_kind.is_end_of_epoch_tx(); - - let advance_epoch_gas_summary = transaction_kind.get_advance_epoch_tx_gas_summary(); - - // We must charge object read here during transaction execution, because if this - // fails we must still ensure an effect is committed and all objects - // versions incremented - let result = gas_charger.charge_input_objects(temporary_store); - let mut result = result.and_then(|()| { - let mut execution_result = if deny_cert { - Err(ExecutionError::new( - ExecutionErrorKind::CertificateDenied, - None, - )) - } else if contains_deleted_input { - Err(ExecutionError::new( - ExecutionErrorKind::InputObjectDeleted, - None, - )) - } else if let Some((cancelled_objects, reason)) = cancelled_objects { - match reason { - SequenceNumber::CONGESTED => Err(ExecutionError::new( - ExecutionErrorKind::ExecutionCancelledDueToSharedObjectCongestion { - congested_objects: CongestedObjects(cancelled_objects), - }, - None, - )), - SequenceNumber::RANDOMNESS_UNAVAILABLE => Err(ExecutionError::new( - ExecutionErrorKind::ExecutionCancelledDueToRandomnessUnavailable, - None, - )), - _ => panic!("invalid cancellation reason SequenceNumber: {reason}"), - } - } else { - execution_loop::( - temporary_store, - transaction_kind, - tx_ctx, - move_vm, - gas_charger, - protocol_config, - metrics.clone(), - ) - }; - - let meter_check = check_meter_limit( - temporary_store, - gas_charger, - protocol_config, - metrics.clone(), - ); - if let Err(e) = meter_check { - execution_result = Err(e); - } - - if execution_result.is_ok() { - let gas_check = check_written_objects_limit::( - temporary_store, - gas_charger, - protocol_config, - metrics, - ); - if let Err(e) = gas_check { - execution_result = Err(e); - } - } - - execution_result - }); - - let cost_summary = gas_charger.charge_gas(temporary_store, &mut result); - // For advance epoch transaction, we need to provide epoch rewards and rebates - // as extra information provided to check_iota_conserved, because we - // mint rewards, and burn the rebates. We also need to pass in the - // unmetered_storage_rebate because storage rebate is not reflected in - // the storage_rebate of gas summary. This is a bit confusing. - // We could probably clean up the code a bit. - // Put all the storage rebate accumulated in the system transaction - // to the 0x5 object so that it's not lost. - temporary_store.conserve_unmetered_storage_rebate(gas_charger.unmetered_storage_rebate()); - - if let Err(e) = run_conservation_checks::( - temporary_store, - gas_charger, - tx_ctx, - move_vm, - enable_expensive_checks, - &cost_summary, - is_genesis_or_epoch_change_tx, - advance_epoch_gas_summary, - ) { - // FIXME: we cannot fail the transaction if this is an epoch change transaction. - result = Err(e); - } - - (cost_summary, result) - } - - /// Performs IOTA conservation checks during transaction execution, ensuring - /// that the transaction does not create or destroy IOTA. If - /// conservation is violated, the function attempts to recover - /// by resetting the gas charger, recharging gas, and rechecking - /// conservation. If recovery fails, it panics to avoid IOTA creation or - /// destruction. These checks include both simple and expensive - /// checks based on the configuration and are skipped for genesis or epoch - /// change transactions. - #[instrument(name = "run_conservation_checks", level = "debug", skip_all)] - fn run_conservation_checks( - temporary_store: &mut TemporaryStore<'_>, - gas_charger: &mut GasCharger, - tx_ctx: &mut TxContext, - move_vm: &Arc, - enable_expensive_checks: bool, - cost_summary: &GasCostSummary, - is_genesis_or_epoch_change_tx: bool, - advance_epoch_gas_summary: Option<(u64, u64)>, - ) -> Result<(), ExecutionError> { - let mut result: std::result::Result<(), iota_types::error::ExecutionError> = Ok(()); - if !is_genesis_or_epoch_change_tx && !Mode::skip_conservation_checks() { - // ensure that this transaction did not create or destroy IOTA, try to recover - // if the check fails - let conservation_result = { - temporary_store - .check_iota_conserved(cost_summary) - .and_then(|()| { - if enable_expensive_checks { - // ensure that this transaction did not create or destroy IOTA, try to - // recover if the check fails - let mut layout_resolver = - TypeLayoutResolver::new(move_vm, Box::new(&*temporary_store)); - temporary_store.check_iota_conserved_expensive( - cost_summary, - advance_epoch_gas_summary, - &mut layout_resolver, - ) - } else { - Ok(()) - } - }) - }; - if let Err(conservation_err) = conservation_result { - // conservation violated. try to avoid panic by dumping all writes, charging for - // gas, re-checking conservation, and surfacing an aborted - // transaction with an invariant violation if all of that works - result = Err(conservation_err); - gas_charger.reset(temporary_store); - gas_charger.charge_gas(temporary_store, &mut result); - // check conservation once more more - if let Err(recovery_err) = { - temporary_store - .check_iota_conserved(cost_summary) - .and_then(|()| { - if enable_expensive_checks { - // ensure that this transaction did not create or destroy IOTA, try - // to recover if the check fails - let mut layout_resolver = - TypeLayoutResolver::new(move_vm, Box::new(&*temporary_store)); - temporary_store.check_iota_conserved_expensive( - cost_summary, - advance_epoch_gas_summary, - &mut layout_resolver, - ) - } else { - Ok(()) - } - }) - } { - // if we still fail, it's a problem with gas - // charging that happens even in the "aborted" case--no other option but panic. - // we will create or destroy IOTA otherwise - panic!( - "IOTA conservation fail in tx block {}: {}\nGas status is {}\nTx was ", - tx_ctx.digest(), - recovery_err, - gas_charger.summary() - ) - } - } - } // else, we're in the genesis transaction which mints the IOTA supply, and hence - // does not satisfy IOTA conservation, or we're in the non-production - // dev inspect mode which allows us to violate conservation - result - } - - /// Checks if the estimated size of transaction effects exceeds predefined - /// limits based on the protocol configuration. For metered - /// transactions, it enforces hard limits, while for system transactions, it - /// allows soft limits with warnings. - #[instrument(name = "check_meter_limit", level = "debug", skip_all)] - fn check_meter_limit( - temporary_store: &mut TemporaryStore<'_>, - gas_charger: &mut GasCharger, - protocol_config: &ProtocolConfig, - metrics: Arc, - ) -> Result<(), ExecutionError> { - let effects_estimated_size = temporary_store.estimate_effects_size_upperbound(); - - // Check if a limit threshold was crossed. - // For metered transactions, there is not soft limit. - // For system transactions, we allow a soft limit with alerting, and a hard - // limit where we terminate - match check_limit_by_meter!( - !gas_charger.is_unmetered(), - effects_estimated_size, - protocol_config.max_serialized_tx_effects_size_bytes(), - protocol_config.max_serialized_tx_effects_size_bytes_system_tx(), - metrics.excessive_estimated_effects_size - ) { - LimitThresholdCrossed::None => Ok(()), - LimitThresholdCrossed::Soft(_, limit) => { - warn!( - effects_estimated_size = effects_estimated_size, - soft_limit = limit, - "Estimated transaction effects size crossed soft limit", - ); - Ok(()) - } - LimitThresholdCrossed::Hard(_, lim) => Err(ExecutionError::new_with_source( - ExecutionErrorKind::EffectsTooLarge { - current_size: effects_estimated_size as u64, - max_size: lim as u64, - }, - "Transaction effects are too large", - )), - } - } - - /// Checks if the total size of written objects in the transaction exceeds - /// the limits defined in the protocol configuration. For metered - /// transactions, it enforces a hard limit, while for system transactions, - /// it allows a soft limit with warnings. - #[instrument(name = "check_written_objects_limit", level = "debug", skip_all)] - fn check_written_objects_limit( - temporary_store: &mut TemporaryStore<'_>, - gas_charger: &mut GasCharger, - protocol_config: &ProtocolConfig, - metrics: Arc, - ) -> Result<(), ExecutionError> { - if let (Some(normal_lim), Some(system_lim)) = ( - protocol_config.max_size_written_objects_as_option(), - protocol_config.max_size_written_objects_system_tx_as_option(), - ) { - let written_objects_size = temporary_store.written_objects_size(); - - match check_limit_by_meter!( - !gas_charger.is_unmetered(), - written_objects_size, - normal_lim, - system_lim, - metrics.excessive_written_objects_size - ) { - LimitThresholdCrossed::None => (), - LimitThresholdCrossed::Soft(_, limit) => { - warn!( - written_objects_size = written_objects_size, - soft_limit = limit, - "Written objects size crossed soft limit", - ) - } - LimitThresholdCrossed::Hard(_, lim) => { - return Err(ExecutionError::new_with_source( - ExecutionErrorKind::WrittenObjectsTooLarge { - current_size: written_objects_size as u64, - max_size: lim as u64, - }, - "Written objects size crossed hard limit", - )); - } - }; - } - - Ok(()) - } - - /// Executes the given transaction based on its `TransactionKind` by - /// processing it through corresponding handlers such as epoch changes, - /// genesis transactions, consensus commit prologues, and programmable - /// transactions. For each type of transaction, the corresponding logic is - /// invoked, such as advancing the epoch, setting up consensus commits, or - /// executing a programmable transaction. - #[instrument(level = "debug", skip_all)] - fn execution_loop( - temporary_store: &mut TemporaryStore<'_>, - transaction_kind: TransactionKind, - tx_ctx: &mut TxContext, - move_vm: &Arc, - gas_charger: &mut GasCharger, - protocol_config: &ProtocolConfig, - metrics: Arc, - ) -> Result { - let result = match transaction_kind { - TransactionKind::Genesis(GenesisTransaction { objects, events }) => { - if tx_ctx.epoch() != 0 { - panic!("BUG: Genesis Transactions can only be executed in epoch 0"); - } - - for genesis_object in objects { - match genesis_object { - iota_types::transaction::GenesisObject::RawObject { data, owner } => { - let object = ObjectInner { - data, - owner, - previous_transaction: tx_ctx.digest(), - storage_rebate: 0, - }; - temporary_store.create_object(object.into()); - } - } - } - - temporary_store.record_execution_results(ExecutionResults::V1( - ExecutionResultsV1 { - user_events: events, - ..Default::default() - }, - )); - - Ok(Mode::empty_results()) - } - TransactionKind::ConsensusCommitPrologueV1(prologue) => { - setup_consensus_commit( - prologue.commit_timestamp_ms, - temporary_store, - tx_ctx, - move_vm, - gas_charger, - protocol_config, - metrics, - ) - .expect("ConsensusCommitPrologueV1 cannot fail"); - Ok(Mode::empty_results()) - } - TransactionKind::ProgrammableTransaction(pt) => { - programmable_transactions::execution::execute::( - protocol_config, - metrics, - move_vm, - temporary_store, - tx_ctx, - gas_charger, - pt, - ) - } - TransactionKind::EndOfEpochTransaction(txns) => { - let mut builder = ProgrammableTransactionBuilder::new(); - let len = txns.len(); - for (i, tx) in txns.into_iter().enumerate() { - match tx { - EndOfEpochTransactionKind::ChangeEpoch(change_epoch) => { - assert_eq!(i, len - 1); - advance_epoch( - builder, - change_epoch, - temporary_store, - tx_ctx, - move_vm, - gas_charger, - protocol_config, - metrics, - )?; - return Ok(Mode::empty_results()); - } - EndOfEpochTransactionKind::AuthenticatorStateCreate => { - assert!(protocol_config.enable_jwk_consensus_updates()); - builder = setup_authenticator_state_create(builder); - } - EndOfEpochTransactionKind::AuthenticatorStateExpire(expire) => { - assert!(protocol_config.enable_jwk_consensus_updates()); - - // TODO: it would be nice if a failure of this function didn't cause - // safe mode. - builder = setup_authenticator_state_expire(builder, expire); - } - EndOfEpochTransactionKind::BridgeStateCreate(chain_id) => { - assert!(protocol_config.enable_bridge()); - builder = setup_bridge_create(builder, chain_id) - } - EndOfEpochTransactionKind::BridgeCommitteeInit(bridge_shared_version) => { - assert!(protocol_config.enable_bridge()); - assert!(protocol_config.should_try_to_finalize_bridge_committee()); - builder = setup_bridge_committee_update(builder, bridge_shared_version) - } - } - } - unreachable!( - "EndOfEpochTransactionKind::ChangeEpoch should be the last transaction in the list" - ) - } - TransactionKind::AuthenticatorStateUpdateV1(auth_state_update) => { - setup_authenticator_state_update( - auth_state_update, - temporary_store, - tx_ctx, - move_vm, - gas_charger, - protocol_config, - metrics, - )?; - Ok(Mode::empty_results()) - } - TransactionKind::RandomnessStateUpdate(randomness_state_update) => { - setup_randomness_state_update( - randomness_state_update, - temporary_store, - tx_ctx, - move_vm, - gas_charger, - protocol_config, - metrics, - )?; - Ok(Mode::empty_results()) - } - }?; - temporary_store.check_execution_results_consistency()?; - Ok(result) - } - - /// Mints epoch rewards by creating both storage and computation rewards - /// using a `ProgrammableTransactionBuilder`. The function takes in the - /// `AdvanceEpochParams`, serializes the storage and computation - /// charges, and invokes the reward creation function within the Iota - /// Prepares invocations for creating both storage and computation rewards - /// with a `ProgrammableTransactionBuilder` using the `AdvanceEpochParams`. - /// The corresponding functions from the Iota framework can be invoked later - /// during execution of the programmable transaction. - fn mint_epoch_rewards_in_pt( - builder: &mut ProgrammableTransactionBuilder, - params: &AdvanceEpochParams, - ) -> (Argument, Argument) { - // Create storage charges. - let storage_charge_arg = builder - .input(CallArg::Pure( - bcs::to_bytes(¶ms.storage_charge).unwrap(), - )) - .unwrap(); - let storage_charges = builder.programmable_move_call( - IOTA_FRAMEWORK_PACKAGE_ID, - BALANCE_MODULE_NAME.to_owned(), - BALANCE_CREATE_REWARDS_FUNCTION_NAME.to_owned(), - vec![GAS::type_tag()], - vec![storage_charge_arg], - ); - - // Create computation rewards. - let computation_charge_arg = builder - .input(CallArg::Pure( - bcs::to_bytes(¶ms.computation_charge).unwrap(), - )) - .unwrap(); - let computation_rewards = builder.programmable_move_call( - IOTA_FRAMEWORK_PACKAGE_ID, - BALANCE_MODULE_NAME.to_owned(), - BALANCE_CREATE_REWARDS_FUNCTION_NAME.to_owned(), - vec![GAS::type_tag()], - vec![computation_charge_arg], - ); - (storage_charges, computation_rewards) - } - - /// Constructs a `ProgrammableTransaction` to advance the epoch. It creates - /// storage charges and computation rewards by invoking - /// `mint_epoch_rewards_in_pt`, advances the epoch by setting up the - /// necessary arguments, such as epoch number, protocol version, storage - /// rebate, and slashing rate, and executing the `advance_epoch` function - /// within the Iota system. Then, it destroys the storage rebates to - /// complete the transaction. - pub fn construct_advance_epoch_pt( - mut builder: ProgrammableTransactionBuilder, - params: &AdvanceEpochParams, - ) -> Result { - // Step 1: Create storage charges and computation rewards. - let (storage_charges, computation_rewards) = mint_epoch_rewards_in_pt(&mut builder, params); - - // Step 2: Advance the epoch. - let mut arguments = vec![ - builder - .pure(params.validator_target_reward) - .expect("bcs encoding a u64 should not fail"), - storage_charges, - computation_rewards, - ]; - let call_arg_arguments = vec![ - CallArg::IOTA_SYSTEM_MUT, - CallArg::Pure(bcs::to_bytes(¶ms.epoch).unwrap()), - CallArg::Pure(bcs::to_bytes(¶ms.next_protocol_version.as_u64()).unwrap()), - CallArg::Pure(bcs::to_bytes(¶ms.storage_rebate).unwrap()), - CallArg::Pure(bcs::to_bytes(¶ms.non_refundable_storage_fee).unwrap()), - CallArg::Pure(bcs::to_bytes(¶ms.reward_slashing_rate).unwrap()), - CallArg::Pure(bcs::to_bytes(¶ms.epoch_start_timestamp_ms).unwrap()), - ] - .into_iter() - .map(|a| builder.input(a)) - .collect::>(); - - assert_invariant!( - call_arg_arguments.is_ok(), - "Unable to generate args for advance_epoch transaction!" - ); - - arguments.append(&mut call_arg_arguments.unwrap()); - - info!("Call arguments to advance_epoch transaction: {:?}", params); - - let storage_rebates = builder.programmable_move_call( - IOTA_SYSTEM_PACKAGE_ID, - IOTA_SYSTEM_MODULE_NAME.to_owned(), - ADVANCE_EPOCH_FUNCTION_NAME.to_owned(), - vec![], - arguments, - ); - - // Step 3: Destroy the storage rebates. - builder.programmable_move_call( - IOTA_FRAMEWORK_PACKAGE_ID, - BALANCE_MODULE_NAME.to_owned(), - BALANCE_DESTROY_REBATES_FUNCTION_NAME.to_owned(), - vec![GAS::type_tag()], - vec![storage_rebates], - ); - Ok(builder.finish()) - } - - /// Advances the epoch by constructing a `ProgrammableTransaction` with - /// `construct_advance_epoch_pt` and executing it. - /// If the transaction fails, it switches to safe mode and retries the - /// epoch advancement in a more controlled environment. The function also - /// handles the publication and upgrade of system packages for the new - /// epoch. If any system package is added or upgraded, it ensures the - /// proper execution and storage of the changes. - fn advance_epoch( - builder: ProgrammableTransactionBuilder, - change_epoch: ChangeEpoch, - temporary_store: &mut TemporaryStore<'_>, - tx_ctx: &mut TxContext, - move_vm: &Arc, - gas_charger: &mut GasCharger, - protocol_config: &ProtocolConfig, - metrics: Arc, - ) -> Result<(), ExecutionError> { - let params = AdvanceEpochParams { - epoch: change_epoch.epoch, - next_protocol_version: change_epoch.protocol_version, - validator_target_reward: protocol_config.validator_target_reward(), - storage_charge: change_epoch.storage_charge, - computation_charge: change_epoch.computation_charge, - storage_rebate: change_epoch.storage_rebate, - non_refundable_storage_fee: change_epoch.non_refundable_storage_fee, - reward_slashing_rate: protocol_config.reward_slashing_rate(), - epoch_start_timestamp_ms: change_epoch.epoch_start_timestamp_ms, - }; - let advance_epoch_pt = construct_advance_epoch_pt(builder, ¶ms)?; - let result = programmable_transactions::execution::execute::( - protocol_config, - metrics.clone(), - move_vm, - temporary_store, - tx_ctx, - gas_charger, - advance_epoch_pt, - ); - - #[cfg(msim)] - let result = maybe_modify_result(result, change_epoch.epoch); - - if result.is_err() { - tracing::error!( - "Failed to execute advance epoch transaction. Switching to safe mode. Error: {:?}. Input objects: {:?}. Tx data: {:?}", - result.as_ref().err(), - temporary_store.objects(), - change_epoch, - ); - temporary_store.drop_writes(); - // Must reset the storage rebate since we are re-executing. - gas_charger.reset_storage_cost_and_rebate(); - - temporary_store.advance_epoch_safe_mode(¶ms, protocol_config); - } - - let new_vm = new_move_vm( - all_natives(/* silent */ true, protocol_config), - protocol_config, - // enable_profiler - None, - ) - .expect("Failed to create new MoveVM"); - process_system_packages( - change_epoch, - temporary_store, - tx_ctx, - &new_vm, - gas_charger, - protocol_config, - metrics, - ); - - Ok(()) - } - - fn process_system_packages( - change_epoch: ChangeEpoch, - temporary_store: &mut TemporaryStore<'_>, - tx_ctx: &mut TxContext, - move_vm: &MoveVM, - gas_charger: &mut GasCharger, - protocol_config: &ProtocolConfig, - metrics: Arc, - ) { - let binary_config = to_binary_config(protocol_config); - for (version, modules, dependencies) in change_epoch.system_packages.into_iter() { - let deserialized_modules: Vec<_> = modules - .iter() - .map(|m| CompiledModule::deserialize_with_config(m, &binary_config).unwrap()) - .collect(); - - if version == OBJECT_START_VERSION { - let package_id = deserialized_modules.first().unwrap().address(); - info!("adding new system package {package_id}"); - - let publish_pt = { - let mut b = ProgrammableTransactionBuilder::new(); - b.command(Command::Publish(modules, dependencies)); - b.finish() - }; - - programmable_transactions::execution::execute::( - protocol_config, - metrics.clone(), - move_vm, - temporary_store, - tx_ctx, - gas_charger, - publish_pt, - ) - .expect("System Package Publish must succeed"); - } else { - let mut new_package = Object::new_system_package( - &deserialized_modules, - version, - dependencies, - tx_ctx.digest(), - ); - - info!( - "upgraded system package {:?}", - new_package.compute_object_reference() - ); - - // Decrement the version before writing the package so that the store can record - // the version growing by one in the effects. - new_package - .data - .try_as_package_mut() - .unwrap() - .decrement_version(); - - // upgrade of a previously existing framework module - temporary_store.upgrade_system_package(new_package); - } - } - } - - /// Perform metadata updates in preparation for the transactions in the - /// upcoming checkpoint: - /// - /// - Set the timestamp for the `Clock` shared object from the timestamp in - /// the header from consensus. - fn setup_consensus_commit( - consensus_commit_timestamp_ms: CheckpointTimestamp, - temporary_store: &mut TemporaryStore<'_>, - tx_ctx: &mut TxContext, - move_vm: &Arc, - gas_charger: &mut GasCharger, - protocol_config: &ProtocolConfig, - metrics: Arc, - ) -> Result<(), ExecutionError> { - let pt = { - let mut builder = ProgrammableTransactionBuilder::new(); - let res = builder.move_call( - IOTA_FRAMEWORK_ADDRESS.into(), - CLOCK_MODULE_NAME.to_owned(), - CONSENSUS_COMMIT_PROLOGUE_FUNCTION_NAME.to_owned(), - vec![], - vec![ - CallArg::CLOCK_MUT, - CallArg::Pure(bcs::to_bytes(&consensus_commit_timestamp_ms).unwrap()), - ], - ); - assert_invariant!( - res.is_ok(), - "Unable to generate consensus_commit_prologue transaction!" - ); - builder.finish() - }; - programmable_transactions::execution::execute::( - protocol_config, - metrics, - move_vm, - temporary_store, - tx_ctx, - gas_charger, - pt, - ) - } - - /// This function adds a Move call to the Iota framework's - /// `authenticator_state_create` function, preparing the transaction for - /// execution. - fn setup_authenticator_state_create( - mut builder: ProgrammableTransactionBuilder, - ) -> ProgrammableTransactionBuilder { - builder - .move_call( - IOTA_FRAMEWORK_ADDRESS.into(), - AUTHENTICATOR_STATE_MODULE_NAME.to_owned(), - AUTHENTICATOR_STATE_CREATE_FUNCTION_NAME.to_owned(), - vec![], - vec![], - ) - .expect("Unable to generate authenticator_state_create transaction!"); - builder - } - - /// Configures a `ProgrammableTransactionBuilder` to create a bridge. - fn setup_bridge_create( - mut builder: ProgrammableTransactionBuilder, - chain_id: ChainIdentifier, - ) -> ProgrammableTransactionBuilder { - let bridge_uid = builder - .input(CallArg::Pure( - UID::new(IOTA_BRIDGE_OBJECT_ID).to_bcs_bytes(), - )) - .expect("Unable to create Bridge object UID!"); - - let bridge_chain_id = if chain_id == get_mainnet_chain_identifier() { - BridgeChainId::IotaMainnet as u8 - } else if chain_id == get_testnet_chain_identifier() { - BridgeChainId::IotaTestnet as u8 - } else { - // How do we distinguish devnet from other test envs? - BridgeChainId::IotaCustom as u8 - }; - - let bridge_chain_id = builder.pure(bridge_chain_id).unwrap(); - builder.programmable_move_call( - BRIDGE_ADDRESS.into(), - BRIDGE_MODULE_NAME.to_owned(), - BRIDGE_CREATE_FUNCTION_NAME.to_owned(), - vec![], - vec![bridge_uid, bridge_chain_id], - ); - builder - } - - /// Configures a `ProgrammableTransactionBuilder` to update the bridge - /// committee. - fn setup_bridge_committee_update( - mut builder: ProgrammableTransactionBuilder, - bridge_shared_version: SequenceNumber, - ) -> ProgrammableTransactionBuilder { - let bridge = builder - .obj(ObjectArg::SharedObject { - id: IOTA_BRIDGE_OBJECT_ID, - initial_shared_version: bridge_shared_version, - mutable: true, - }) - .expect("Unable to create Bridge object arg!"); - let system_state = builder - .obj(ObjectArg::IOTA_SYSTEM_MUT) - .expect("Unable to create System State object arg!"); - - let voting_power = builder.programmable_move_call( - IOTA_SYSTEM_PACKAGE_ID, - IOTA_SYSTEM_MODULE_NAME.to_owned(), - ident_str!("validator_voting_powers").to_owned(), - vec![], - vec![system_state], - ); - - // Hardcoding min stake participation to 75.00% - // TODO: We need to set a correct value or make this configurable. - let min_stake_participation_percentage = builder - .input(CallArg::Pure( - bcs::to_bytes(&BRIDGE_COMMITTEE_MINIMAL_VOTING_POWER).unwrap(), - )) - .unwrap(); - - builder.programmable_move_call( - BRIDGE_ADDRESS.into(), - BRIDGE_MODULE_NAME.to_owned(), - BRIDGE_INIT_COMMITTEE_FUNCTION_NAME.to_owned(), - vec![], - vec![bridge, voting_power, min_stake_participation_percentage], - ); - builder - } - - /// Sets up and executes a `ProgrammableTransaction` to update the - /// authenticator state. This function constructs a transaction that - /// invokes the `authenticator_state_update` function from the Iota - /// framework, passing the authenticator state object and new active JWKS as - /// arguments. It then executes the transaction using the system - /// execution mode. - fn setup_authenticator_state_update( - update: AuthenticatorStateUpdateV1, - temporary_store: &mut TemporaryStore<'_>, - tx_ctx: &mut TxContext, - move_vm: &Arc, - gas_charger: &mut GasCharger, - protocol_config: &ProtocolConfig, - metrics: Arc, - ) -> Result<(), ExecutionError> { - let pt = { - let mut builder = ProgrammableTransactionBuilder::new(); - let res = builder.move_call( - IOTA_FRAMEWORK_ADDRESS.into(), - AUTHENTICATOR_STATE_MODULE_NAME.to_owned(), - AUTHENTICATOR_STATE_UPDATE_FUNCTION_NAME.to_owned(), - vec![], - vec![ - CallArg::Object(ObjectArg::SharedObject { - id: IOTA_AUTHENTICATOR_STATE_OBJECT_ID, - initial_shared_version: update.authenticator_obj_initial_shared_version, - mutable: true, - }), - CallArg::Pure(bcs::to_bytes(&update.new_active_jwks).unwrap()), - ], - ); - assert_invariant!( - res.is_ok(), - "Unable to generate authenticator_state_update transaction!" - ); - builder.finish() - }; - programmable_transactions::execution::execute::( - protocol_config, - metrics, - move_vm, - temporary_store, - tx_ctx, - gas_charger, - pt, - ) - } - - /// Configures a `ProgrammableTransactionBuilder` to expire authenticator - /// state by invoking the `authenticator_state_expire_jwks` function - /// from the Iota framework. The function adds the necessary Move call - /// with the authenticator state object and the minimum epoch as arguments. - fn setup_authenticator_state_expire( - mut builder: ProgrammableTransactionBuilder, - expire: AuthenticatorStateExpire, - ) -> ProgrammableTransactionBuilder { - builder - .move_call( - IOTA_FRAMEWORK_ADDRESS.into(), - AUTHENTICATOR_STATE_MODULE_NAME.to_owned(), - AUTHENTICATOR_STATE_EXPIRE_JWKS_FUNCTION_NAME.to_owned(), - vec![], - vec![ - CallArg::Object(ObjectArg::SharedObject { - id: IOTA_AUTHENTICATOR_STATE_OBJECT_ID, - initial_shared_version: expire.authenticator_obj_initial_shared_version, - mutable: true, - }), - CallArg::Pure(bcs::to_bytes(&expire.min_epoch).unwrap()), - ], - ) - .expect("Unable to generate authenticator_state_expire transaction!"); - builder - } - - /// The function constructs a transaction that invokes - /// the `randomness_state_update` function from the Iota framework, - /// passing the randomness state object, the `randomness_round`, - /// and the `random_bytes` as arguments. It then executes the transaction - /// using the system execution mode. - fn setup_randomness_state_update( - update: RandomnessStateUpdate, - temporary_store: &mut TemporaryStore<'_>, - tx_ctx: &mut TxContext, - move_vm: &Arc, - gas_charger: &mut GasCharger, - protocol_config: &ProtocolConfig, - metrics: Arc, - ) -> Result<(), ExecutionError> { - let pt = { - let mut builder = ProgrammableTransactionBuilder::new(); - let res = builder.move_call( - IOTA_FRAMEWORK_ADDRESS.into(), - RANDOMNESS_MODULE_NAME.to_owned(), - RANDOMNESS_STATE_UPDATE_FUNCTION_NAME.to_owned(), - vec![], - vec![ - CallArg::Object(ObjectArg::SharedObject { - id: IOTA_RANDOMNESS_STATE_OBJECT_ID, - initial_shared_version: update.randomness_obj_initial_shared_version, - mutable: true, - }), - CallArg::Pure(bcs::to_bytes(&update.randomness_round).unwrap()), - CallArg::Pure(bcs::to_bytes(&update.random_bytes).unwrap()), - ], - ); - assert_invariant!( - res.is_ok(), - "Unable to generate randomness_state_update transaction!" - ); - builder.finish() - }; - programmable_transactions::execution::execute::( - protocol_config, - metrics, - move_vm, - temporary_store, - tx_ctx, - gas_charger, - pt, - ) - } -} diff --git a/iota-execution/v0/iota-adapter/src/execution_mode.rs b/iota-execution/v0/iota-adapter/src/execution_mode.rs deleted file mode 100644 index 227df901acd..00000000000 --- a/iota-execution/v0/iota-adapter/src/execution_mode.rs +++ /dev/null @@ -1,285 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use iota_types::{ - error::ExecutionError, execution::ExecutionResult, transaction::Argument, transfer::Receiving, -}; -use move_core_types::language_storage::TypeTag; - -use crate::{ - execution_value::{RawValueType, Value}, - type_resolver::TypeTagResolver, -}; - -pub type TransactionIndex = usize; - -pub trait ExecutionMode { - /// All updates to a Arguments used in that Command - type ArgumentUpdates; - /// the gathered results from batched executions - type ExecutionResults; - - /// Controls the calling of arbitrary Move functions - fn allow_arbitrary_function_calls() -> bool; - - /// Controls the ability to instantiate any Move function parameter with a - /// Pure call arg. In other words, you can instantiate any struct or - /// object or other value with its BCS byte - fn allow_arbitrary_values() -> bool; - - /// Do not perform conservation checks after execution. - fn skip_conservation_checks() -> bool; - - /// If not set, the package ID should be calculated like an object and an - /// UpgradeCap is produced - fn packages_are_predefined() -> bool; - - fn empty_arguments() -> Self::ArgumentUpdates; - - fn empty_results() -> Self::ExecutionResults; - - fn add_argument_update( - resolver: &impl TypeTagResolver, - acc: &mut Self::ArgumentUpdates, - arg: Argument, - _new_value: &Value, - ) -> Result<(), ExecutionError>; - - fn finish_command( - resolver: &impl TypeTagResolver, - acc: &mut Self::ExecutionResults, - argument_updates: Self::ArgumentUpdates, - command_result: &[Value], - ) -> Result<(), ExecutionError>; -} - -#[derive(Copy, Clone)] -pub struct Normal; - -impl ExecutionMode for Normal { - type ArgumentUpdates = (); - type ExecutionResults = (); - - fn allow_arbitrary_function_calls() -> bool { - false - } - - fn allow_arbitrary_values() -> bool { - false - } - - fn skip_conservation_checks() -> bool { - false - } - - fn packages_are_predefined() -> bool { - false - } - - fn empty_arguments() -> Self::ArgumentUpdates {} - - fn empty_results() -> Self::ExecutionResults {} - - fn add_argument_update( - _resolver: &impl TypeTagResolver, - _acc: &mut Self::ArgumentUpdates, - _arg: Argument, - _new_value: &Value, - ) -> Result<(), ExecutionError> { - Ok(()) - } - - fn finish_command( - _resolver: &impl TypeTagResolver, - _acc: &mut Self::ExecutionResults, - _argument_updates: Self::ArgumentUpdates, - _command_result: &[Value], - ) -> Result<(), ExecutionError> { - Ok(()) - } -} - -#[derive(Copy, Clone)] -pub struct Genesis; - -impl ExecutionMode for Genesis { - type ArgumentUpdates = (); - type ExecutionResults = (); - - fn allow_arbitrary_function_calls() -> bool { - true - } - - fn allow_arbitrary_values() -> bool { - true - } - - fn packages_are_predefined() -> bool { - true - } - - fn skip_conservation_checks() -> bool { - false - } - - fn empty_arguments() -> Self::ArgumentUpdates {} - - fn empty_results() -> Self::ExecutionResults {} - - fn add_argument_update( - _resolver: &impl TypeTagResolver, - _acc: &mut Self::ArgumentUpdates, - _arg: Argument, - _new_value: &Value, - ) -> Result<(), ExecutionError> { - Ok(()) - } - - fn finish_command( - _resolver: &impl TypeTagResolver, - _acc: &mut Self::ExecutionResults, - _argument_updates: Self::ArgumentUpdates, - _command_result: &[Value], - ) -> Result<(), ExecutionError> { - Ok(()) - } -} - -#[derive(Copy, Clone)] -pub struct System; - -/// Execution mode for executing a system transaction, including the epoch -/// change transaction and the consensus commit prologue. In this mode, we allow -/// calls to any function bypassing visibility. -impl ExecutionMode for System { - type ArgumentUpdates = (); - type ExecutionResults = (); - - fn allow_arbitrary_function_calls() -> bool { - // allows bypassing visibility for system calls - true - } - - fn allow_arbitrary_values() -> bool { - // For AuthenticatorStateUpdate, we need to be able to pass in a vector of - // JWKs, so we need to allow arbitrary values. - true - } - - fn skip_conservation_checks() -> bool { - false - } - - fn packages_are_predefined() -> bool { - true - } - - fn empty_arguments() -> Self::ArgumentUpdates {} - - fn empty_results() -> Self::ExecutionResults {} - - fn add_argument_update( - _resolver: &impl TypeTagResolver, - _acc: &mut Self::ArgumentUpdates, - _arg: Argument, - _new_value: &Value, - ) -> Result<(), ExecutionError> { - Ok(()) - } - - fn finish_command( - _resolver: &impl TypeTagResolver, - _acc: &mut Self::ExecutionResults, - _argument_updates: Self::ArgumentUpdates, - _command_result: &[Value], - ) -> Result<(), ExecutionError> { - Ok(()) - } -} - -/// WARNING! Using this mode will bypass all normal checks around Move entry -/// functions! This includes the various rules for function arguments, meaning -/// any object can be created just from BCS bytes! -pub struct DevInspect; - -impl ExecutionMode for DevInspect { - type ArgumentUpdates = Vec<(Argument, Vec, TypeTag)>; - type ExecutionResults = Vec; - - fn allow_arbitrary_function_calls() -> bool { - SKIP_ALL_CHECKS - } - - fn allow_arbitrary_values() -> bool { - SKIP_ALL_CHECKS - } - - fn skip_conservation_checks() -> bool { - SKIP_ALL_CHECKS - } - - fn packages_are_predefined() -> bool { - false - } - - fn empty_arguments() -> Self::ArgumentUpdates { - vec![] - } - - fn empty_results() -> Self::ExecutionResults { - vec![] - } - - fn add_argument_update( - resolver: &impl TypeTagResolver, - acc: &mut Self::ArgumentUpdates, - arg: Argument, - new_value: &Value, - ) -> Result<(), ExecutionError> { - let (bytes, type_tag) = value_to_bytes_and_tag(resolver, new_value)?; - acc.push((arg, bytes, type_tag)); - Ok(()) - } - - fn finish_command( - resolver: &impl TypeTagResolver, - acc: &mut Self::ExecutionResults, - argument_updates: Self::ArgumentUpdates, - command_result: &[Value], - ) -> Result<(), ExecutionError> { - let command_bytes = command_result - .iter() - .map(|value| value_to_bytes_and_tag(resolver, value)) - .collect::>()?; - acc.push((argument_updates, command_bytes)); - Ok(()) - } -} - -fn value_to_bytes_and_tag( - resolver: &impl TypeTagResolver, - value: &Value, -) -> Result<(Vec, TypeTag), ExecutionError> { - let (type_tag, bytes) = match value { - Value::Object(obj) => { - let tag = resolver.get_type_tag(&obj.type_)?; - let mut bytes = vec![]; - obj.write_bcs_bytes(&mut bytes); - (tag, bytes) - } - Value::Raw(RawValueType::Any, bytes) => { - // this case shouldn't happen - (TypeTag::Vector(Box::new(TypeTag::U8)), bytes.clone()) - } - Value::Raw(RawValueType::Loaded { ty, .. }, bytes) => { - let tag = resolver.get_type_tag(ty)?; - (tag, bytes.clone()) - } - Value::Receiving(id, seqno, _) => ( - Receiving::type_tag(), - Receiving::new(*id, *seqno).to_bcs_bytes(), - ), - }; - Ok((bytes, type_tag)) -} diff --git a/iota-execution/v0/iota-adapter/src/execution_value.rs b/iota-execution/v0/iota-adapter/src/execution_value.rs deleted file mode 100644 index 974555424a4..00000000000 --- a/iota-execution/v0/iota-adapter/src/execution_value.rs +++ /dev/null @@ -1,305 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use iota_types::{ - base_types::{IotaAddress, ObjectID, SequenceNumber}, - coin::Coin, - error::{ExecutionError, ExecutionErrorKind, IotaError}, - execution_status::CommandArgumentError, - object::Owner, - storage::{BackingPackageStore, ChildObjectResolver, StorageView}, - transfer::Receiving, -}; -use move_binary_format::file_format::AbilitySet; -use move_core_types::{identifier::IdentStr, resolver::ResourceResolver}; -use move_vm_types::loaded_data::runtime_types::Type; -use serde::Deserialize; - -pub trait IotaResolver: ResourceResolver + BackingPackageStore { - fn as_backing_package_store(&self) -> &dyn BackingPackageStore; -} - -impl IotaResolver for T -where - T: ResourceResolver, - T: BackingPackageStore, -{ - fn as_backing_package_store(&self) -> &dyn BackingPackageStore { - self - } -} - -/// Interface with the store necessary to execute a programmable transaction -pub trait ExecutionState: StorageView + IotaResolver { - fn as_iota_resolver(&self) -> &dyn IotaResolver; - fn as_child_resolver(&self) -> &dyn ChildObjectResolver; -} - -impl ExecutionState for T -where - T: StorageView, - T: IotaResolver, -{ - fn as_iota_resolver(&self) -> &dyn IotaResolver { - self - } - - fn as_child_resolver(&self) -> &dyn ChildObjectResolver { - self - } -} - -#[derive(Clone, Debug)] -pub enum InputObjectMetadata { - Receiving { - id: ObjectID, - version: SequenceNumber, - }, - InputObject { - id: ObjectID, - is_mutable_input: bool, - owner: Owner, - version: SequenceNumber, - }, -} - -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub enum UsageKind { - BorrowImm, - BorrowMut, - ByValue, -} - -#[derive(Clone, Copy)] -pub enum CommandKind<'a> { - MoveCall { - package: ObjectID, - module: &'a IdentStr, - function: &'a IdentStr, - }, - MakeMoveVec, - TransferObjects, - SplitCoins, - MergeCoins, - Publish, - Upgrade, -} - -#[derive(Clone, Debug)] -pub struct InputValue { - /// Used to remember the object ID and owner even if the value is taken - pub object_metadata: Option, - pub inner: ResultValue, -} - -#[derive(Clone, Debug)] -pub struct ResultValue { - /// This is used primarily for values that have `copy` but not `drop` as - /// they must have been copied after the last borrow, otherwise we - /// cannot consider the last "copy" to be instead a "move" of the value. - pub last_usage_kind: Option, - pub value: Option, -} - -#[derive(Debug, Clone)] -pub enum Value { - Object(ObjectValue), - Raw(RawValueType, Vec), - Receiving(ObjectID, SequenceNumber, Option), -} - -#[derive(Debug, Clone)] -pub struct ObjectValue { - pub type_: Type, - pub has_public_transfer: bool, - // true if it has been used in a public, non-entry Move call - // In other words, false if all usages have been with non-Move commands or - // entry Move functions - pub used_in_non_entry_move_call: bool, - pub contents: ObjectContents, -} - -#[derive(Debug, Clone)] -pub enum ObjectContents { - Coin(Coin), - Raw(Vec), -} - -#[derive(Debug, Clone)] -pub enum RawValueType { - Any, - Loaded { - ty: Type, - abilities: AbilitySet, - used_in_non_entry_move_call: bool, - }, -} - -impl InputObjectMetadata { - pub fn id(&self) -> ObjectID { - match self { - InputObjectMetadata::Receiving { id, .. } => *id, - InputObjectMetadata::InputObject { id, .. } => *id, - } - } - - pub fn version(&self) -> SequenceNumber { - match self { - InputObjectMetadata::Receiving { version, .. } => *version, - InputObjectMetadata::InputObject { version, .. } => *version, - } - } -} - -impl InputValue { - pub fn new_object(object_metadata: InputObjectMetadata, value: ObjectValue) -> Self { - InputValue { - object_metadata: Some(object_metadata), - inner: ResultValue::new(Value::Object(value)), - } - } - - pub fn new_raw(ty: RawValueType, value: Vec) -> Self { - InputValue { - object_metadata: None, - inner: ResultValue::new(Value::Raw(ty, value)), - } - } - - pub fn new_receiving_object(id: ObjectID, version: SequenceNumber) -> Self { - InputValue { - object_metadata: Some(InputObjectMetadata::Receiving { id, version }), - inner: ResultValue::new(Value::Receiving(id, version, None)), - } - } -} - -impl ResultValue { - pub fn new(value: Value) -> Self { - Self { - last_usage_kind: None, - value: Some(value), - } - } -} - -impl Value { - pub fn is_copyable(&self) -> bool { - match self { - Value::Object(_) => false, - Value::Raw(RawValueType::Any, _) => true, - Value::Raw(RawValueType::Loaded { abilities, .. }, _) => abilities.has_copy(), - Value::Receiving(_, _, _) => false, - } - } - - pub fn write_bcs_bytes(&self, buf: &mut Vec) { - match self { - Value::Object(obj_value) => obj_value.write_bcs_bytes(buf), - Value::Raw(_, bytes) => buf.extend(bytes), - Value::Receiving(id, version, _) => { - buf.extend(Receiving::new(*id, *version).to_bcs_bytes()) - } - } - } - - pub fn was_used_in_non_entry_move_call(&self) -> bool { - match self { - Value::Object(obj) => obj.used_in_non_entry_move_call, - // Any is only used for Pure inputs, and if it was used by &mut it would have switched - // to Loaded - Value::Raw(RawValueType::Any, _) => false, - Value::Raw( - RawValueType::Loaded { - used_in_non_entry_move_call, - .. - }, - _, - ) => *used_in_non_entry_move_call, - // Only thing you can do with a `Receiving` is consume it, so once it's used it - // can't be used again. - Value::Receiving(_, _, _) => false, - } - } -} - -impl ObjectValue { - /// # Safety - /// We must have the Type is the coin type, but we are unable to check it at - /// this spot - pub unsafe fn coin(type_: Type, coin: Coin) -> Self { - Self { - type_, - has_public_transfer: true, - used_in_non_entry_move_call: false, - contents: ObjectContents::Coin(coin), - } - } - - pub fn ensure_public_transfer_eligible(&self) -> Result<(), ExecutionError> { - if !self.has_public_transfer { - return Err(ExecutionErrorKind::InvalidTransferObject.into()); - } - Ok(()) - } - - pub fn write_bcs_bytes(&self, buf: &mut Vec) { - match &self.contents { - ObjectContents::Raw(bytes) => buf.extend(bytes), - ObjectContents::Coin(coin) => buf.extend(coin.to_bcs_bytes()), - } - } -} - -pub trait TryFromValue: Sized { - fn try_from_value(value: Value) -> Result; -} - -impl TryFromValue for Value { - fn try_from_value(value: Value) -> Result { - Ok(value) - } -} - -impl TryFromValue for ObjectValue { - fn try_from_value(value: Value) -> Result { - match value { - Value::Object(o) => Ok(o), - Value::Raw(RawValueType::Any, _) => Err(CommandArgumentError::TypeMismatch), - Value::Raw(RawValueType::Loaded { .. }, _) => Err(CommandArgumentError::TypeMismatch), - Value::Receiving(_, _, _) => Err(CommandArgumentError::TypeMismatch), - } - } -} - -impl TryFromValue for IotaAddress { - fn try_from_value(value: Value) -> Result { - try_from_value_prim(&value, Type::Address) - } -} - -impl TryFromValue for u64 { - fn try_from_value(value: Value) -> Result { - try_from_value_prim(&value, Type::U64) - } -} - -fn try_from_value_prim<'a, T: Deserialize<'a>>( - value: &'a Value, - expected_ty: Type, -) -> Result { - match value { - Value::Object(_) => Err(CommandArgumentError::TypeMismatch), - Value::Receiving(_, _, _) => Err(CommandArgumentError::TypeMismatch), - Value::Raw(RawValueType::Any, bytes) => { - bcs::from_bytes(bytes).map_err(|_| CommandArgumentError::InvalidBCSBytes) - } - Value::Raw(RawValueType::Loaded { ty, .. }, bytes) => { - if ty != &expected_ty { - return Err(CommandArgumentError::TypeMismatch); - } - bcs::from_bytes(bytes).map_err(|_| CommandArgumentError::InvalidBCSBytes) - } - } -} diff --git a/iota-execution/v0/iota-adapter/src/gas_charger.rs b/iota-execution/v0/iota-adapter/src/gas_charger.rs deleted file mode 100644 index d83e38ba39b..00000000000 --- a/iota-execution/v0/iota-adapter/src/gas_charger.rs +++ /dev/null @@ -1,366 +0,0 @@ -// Copyright (c) 2021, Facebook, Inc. and its affiliates -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -pub use checked::*; - -#[iota_macros::with_checked_arithmetic] -pub mod checked { - - use iota_protocol_config::ProtocolConfig; - use iota_types::{ - base_types::{ObjectID, ObjectRef}, - deny_list_v1::CONFIG_SETTING_DYNAMIC_FIELD_SIZE_FOR_GAS, - digests::TransactionDigest, - error::ExecutionError, - gas::{GasCostSummary, IotaGasStatus, deduct_gas}, - gas_model::tables::GasStatus, - is_system_package, - object::Data, - }; - use tracing::trace; - - use crate::{iota_types::gas::IotaGasStatusAPI, temporary_store::TemporaryStore}; - - /// Tracks all gas operations for a single transaction. - /// This is the main entry point for gas accounting. - /// All the information about gas is stored in this object. - /// The objective here is two-fold: - /// 1- Isolate al version info into a single entry point. This file and the - /// other gas related files are the only one that check for gas - /// version. 2- Isolate all gas accounting into a single implementation. - /// Gas objects are not passed around, and they are retrieved from - /// this instance. - #[allow(dead_code)] - #[derive(Debug)] - pub struct GasCharger { - tx_digest: TransactionDigest, - gas_model_version: u64, - gas_coins: Vec, - // this is the first gas coin in `gas_coins` and the one that all others will - // be smashed into. It can be None for system transactions when `gas_coins` is empty. - smashed_gas_coin: Option, - gas_status: IotaGasStatus, - } - - impl GasCharger { - pub fn new( - tx_digest: TransactionDigest, - gas_coins: Vec, - gas_status: IotaGasStatus, - protocol_config: &ProtocolConfig, - ) -> Self { - let gas_model_version = protocol_config.gas_model_version(); - Self { - tx_digest, - gas_model_version, - gas_coins, - smashed_gas_coin: None, - gas_status, - } - } - - pub fn new_unmetered(tx_digest: TransactionDigest) -> Self { - Self { - tx_digest, - gas_model_version: 1, // pick any of the latest, it should not matter - gas_coins: vec![], - smashed_gas_coin: None, - gas_status: IotaGasStatus::new_unmetered(), - } - } - - // TODO: there is only one caller to this function that should not exist - // otherwise. Explore way to remove it. - pub(crate) fn gas_coins(&self) -> &[ObjectRef] { - &self.gas_coins - } - - // Return the logical gas coin for this transactions or None if no gas coin was - // present (system transactions). - pub fn gas_coin(&self) -> Option { - self.smashed_gas_coin - } - - pub fn gas_budget(&self) -> u64 { - self.gas_status.gas_budget() - } - - pub fn unmetered_storage_rebate(&self) -> u64 { - self.gas_status.unmetered_storage_rebate() - } - - pub fn no_charges(&self) -> bool { - self.gas_status.gas_used() == 0 - && self.gas_status.storage_rebate() == 0 - && self.gas_status.storage_gas_units() == 0 - } - - pub fn is_unmetered(&self) -> bool { - self.gas_status.is_unmetered() - } - - pub fn move_gas_status(&self) -> &GasStatus { - self.gas_status.move_gas_status() - } - - pub fn move_gas_status_mut(&mut self) -> &mut GasStatus { - self.gas_status.move_gas_status_mut() - } - - pub fn into_gas_status(self) -> IotaGasStatus { - self.gas_status - } - - pub fn summary(&self) -> GasCostSummary { - self.gas_status.summary() - } - - // This function is called when the transaction is about to be executed. - // It will smash all gas coins into a single one and set the logical gas coin - // to be the first one in the list. - // After this call, `gas_coin` will return it id of the gas coin. - // This function panics if errors are found while operation on the gas coins. - // Transaction and certificate input checks must have insured that all gas coins - // are correct. - pub fn smash_gas(&mut self, temporary_store: &mut TemporaryStore<'_>) { - let gas_coin_count = self.gas_coins.len(); - if gas_coin_count == 0 || (gas_coin_count == 1 && self.gas_coins[0].0 == ObjectID::ZERO) - { - return; // self.smashed_gas_coin is None - } - // set the first coin to be the transaction only gas coin. - // All others will be smashed into this one. - let gas_coin_id = self.gas_coins[0].0; - self.smashed_gas_coin = Some(gas_coin_id); - if gas_coin_count == 1 { - return; - } - - // sum the value of all gas coins - let new_balance = self - .gas_coins - .iter() - .map(|obj_ref| { - let obj = temporary_store.objects().get(&obj_ref.0).unwrap(); - let Data::Move(move_obj) = &obj.data else { - return Err(ExecutionError::invariant_violation( - "Provided non-gas coin object as input for gas!", - )); - }; - if !move_obj.type_().is_gas_coin() { - return Err(ExecutionError::invariant_violation( - "Provided non-gas coin object as input for gas!", - )); - } - Ok(move_obj.get_coin_value_unsafe()) - }) - .collect::, ExecutionError>>() - // transaction and certificate input checks must have insured that all gas coins - // are valid - .unwrap_or_else(|_| { - panic!( - "Invariant violation: non-gas coin object as input for gas in txn {}", - self.tx_digest - ) - }) - .iter() - .sum(); - let mut primary_gas_object = temporary_store - .objects() - .get(&gas_coin_id) - // unwrap should be safe because we checked that this exists in `self.objects()` - // above - .unwrap_or_else(|| { - panic!( - "Invariant violation: gas coin not found in store in txn {}", - self.tx_digest - ) - }) - .clone(); - // delete all gas objects except the primary_gas_object - for (id, _version, _digest) in &self.gas_coins[1..] { - debug_assert_ne!(*id, primary_gas_object.id()); - temporary_store.delete_input_object(id); - } - primary_gas_object - .data - .try_as_move_mut() - // unwrap should be safe because we checked that the primary gas object was a coin - // object above. - .unwrap_or_else(|| { - panic!( - "Invariant violation: invalid coin object in txn {}", - self.tx_digest - ) - }) - .set_coin_value_unsafe(new_balance); - temporary_store.mutate_input_object(primary_gas_object); - } - - // Gas charging operations - // - - pub fn track_storage_mutation( - &mut self, - object_id: ObjectID, - new_size: usize, - storage_rebate: u64, - ) -> u64 { - self.gas_status - .track_storage_mutation(object_id, new_size, storage_rebate) - } - - pub fn reset_storage_cost_and_rebate(&mut self) { - self.gas_status.reset_storage_cost_and_rebate(); - } - - pub fn charge_publish_package(&mut self, size: usize) -> Result<(), ExecutionError> { - self.gas_status.charge_publish_package(size) - } - - pub fn charge_upgrade_package(&mut self, size: usize) -> Result<(), ExecutionError> { - self.gas_status.charge_publish_package(size) - } - - pub fn charge_input_objects( - &mut self, - temporary_store: &TemporaryStore<'_>, - ) -> Result<(), ExecutionError> { - let objects = temporary_store.objects(); - // TODO: Charge input object count. - let _object_count = objects.len(); - // Charge bytes read - let total_size = temporary_store - .objects() - .iter() - // don't charge for loading Iota Framework or Move stdlib - .filter(|(id, _)| !is_system_package(**id)) - .map(|(_, obj)| obj.object_size_for_gas_metering()) - .sum(); - self.gas_status.charge_storage_read(total_size) - } - - pub fn charge_coin_transfers( - &mut self, - protocol_config: &ProtocolConfig, - num_non_gas_coin_owners: u64, - ) -> Result<(), ExecutionError> { - // times two for the global pause and per-address settings - // this "overcharges" slightly since it does not check the global pause for each - // owner but rather each coin type. - let bytes_read_per_owner = CONFIG_SETTING_DYNAMIC_FIELD_SIZE_FOR_GAS; - // associate the cost with dynamic field access so that it will increase if/when - // this cost increases - let cost_per_byte = - protocol_config.dynamic_field_borrow_child_object_type_cost_per_byte() as usize; - let cost_per_owner = bytes_read_per_owner * cost_per_byte; - let owner_cost = cost_per_owner * (num_non_gas_coin_owners as usize); - self.gas_status.charge_storage_read(owner_cost) - } - - /// Resets any mutations, deletions, and events recorded in the store, - /// as well as any storage costs and rebates, then Re-runs gas - /// smashing. Effects on store are now as if we were about to begin - /// execution - pub fn reset(&mut self, temporary_store: &mut TemporaryStore<'_>) { - temporary_store.drop_writes(); - self.gas_status.reset_storage_cost_and_rebate(); - self.smash_gas(temporary_store); - } - - /// Entry point for gas charging. - /// 1. Compute tx storage gas costs and tx storage rebates, update - /// storage_rebate field of - /// mutated objects - /// 2. Deduct computation gas costs and storage costs, credit storage - /// rebates. - /// The happy path of this function follows (1) + (2) and is fairly - /// simple. Most of the complexity is in the unhappy paths: - /// - if execution aborted before calling this function, we have to dump - /// all writes + re-smash gas, then charge for storage - /// - if we run out of gas while charging for storage, we have to dump - /// all writes + re-smash gas, then charge for storage again - pub fn charge_gas( - &mut self, - temporary_store: &mut TemporaryStore<'_>, - execution_result: &mut Result, - ) -> GasCostSummary { - // at this point, we have done *all* charging for computation, - // but have not yet set the storage rebate or storage gas units - debug_assert!(self.gas_status.storage_rebate() == 0); - debug_assert!(self.gas_status.storage_gas_units() == 0); - - if self.smashed_gas_coin.is_some() { - // bucketize computation cost - if let Err(err) = self.gas_status.bucketize_computation() { - if execution_result.is_ok() { - *execution_result = Err(err); - } - } - - // On error we need to dump writes, deletes, etc before charging storage gas - if execution_result.is_err() { - self.reset(temporary_store); - } - } - - // compute and collect storage charges - temporary_store.ensure_active_inputs_mutated(); - temporary_store.collect_storage_and_rebate(self); - - if self.smashed_gas_coin.is_some() { - #[skip_checked_arithmetic] - trace!(target: "replay_gas_info", "Gas smashing has occurred for this transaction"); - } - - // system transactions (None smashed_gas_coin) do not have gas and so do not - // charge for storage, however they track storage values to check - // for conservation rules - if let Some(gas_object_id) = self.smashed_gas_coin { - self.handle_storage_and_rebate(temporary_store, execution_result); - - let cost_summary = self.gas_status.summary(); - let gas_used = cost_summary.net_gas_usage(); - - let mut gas_object = temporary_store.read_object(&gas_object_id).unwrap().clone(); - deduct_gas(&mut gas_object, gas_used); - #[skip_checked_arithmetic] - trace!(gas_used, gas_obj_id =? gas_object.id(), gas_obj_ver =? gas_object.version(), "Updated gas object"); - - temporary_store.mutate_input_object(gas_object); - cost_summary - } else { - GasCostSummary::default() - } - } - - fn handle_storage_and_rebate( - &mut self, - temporary_store: &mut TemporaryStore<'_>, - execution_result: &mut Result, - ) { - if let Err(err) = self.gas_status.charge_storage_and_rebate() { - // we run out of gas charging storage, reset and try charging for storage again. - // Input objects are touched and so they have a storage cost - self.reset(temporary_store); - temporary_store.ensure_active_inputs_mutated(); - temporary_store.collect_storage_and_rebate(self); - if let Err(err) = self.gas_status.charge_storage_and_rebate() { - // we run out of gas attempting to charge for the input objects exclusively, - // deal with this edge case by not charging for storage - self.reset(temporary_store); - self.gas_status.adjust_computation_on_out_of_gas(); - temporary_store.ensure_active_inputs_mutated(); - temporary_store.collect_rebate(self); - if execution_result.is_ok() { - *execution_result = Err(err); - } - } else if execution_result.is_ok() { - *execution_result = Err(err); - } - } - } - } -} diff --git a/iota-execution/v0/iota-adapter/src/lib.rs b/iota-execution/v0/iota-adapter/src/lib.rs deleted file mode 100644 index 7f0a6216633..00000000000 --- a/iota-execution/v0/iota-adapter/src/lib.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -#[macro_use] -extern crate iota_types; - -pub mod adapter; -pub mod error; -pub mod execution_engine; -pub mod execution_mode; -pub mod execution_value; -pub mod gas_charger; -pub mod programmable_transactions; -pub mod temporary_store; -pub mod type_layout_resolver; -pub mod type_resolver; diff --git a/iota-execution/v0/iota-adapter/src/programmable_transactions/context.rs b/iota-execution/v0/iota-adapter/src/programmable_transactions/context.rs deleted file mode 100644 index 3881633441a..00000000000 --- a/iota-execution/v0/iota-adapter/src/programmable_transactions/context.rs +++ /dev/null @@ -1,1542 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -pub use checked::*; - -#[iota_macros::with_checked_arithmetic] -mod checked { - use std::{ - borrow::Borrow, - collections::{BTreeMap, BTreeSet, HashMap}, - sync::Arc, - }; - - use iota_move_natives::object_runtime::{ - self, LoadedRuntimeObject, ObjectRuntime, RuntimeResults, get_all_uids, max_event_error, - }; - use iota_protocol_config::ProtocolConfig; - use iota_types::{ - balance::Balance, - base_types::{IotaAddress, MoveObjectType, ObjectID, TxContext}, - coin::Coin, - error::{ExecutionError, ExecutionErrorKind, command_argument_error}, - event::Event, - execution::{ExecutionResults, ExecutionResultsV1}, - execution_status::CommandArgumentError, - metrics::LimitsMetrics, - move_package::MovePackage, - object::{Data, MoveObject, Object, ObjectInner, Owner}, - storage::{BackingPackageStore, DenyListResult, PackageObject}, - transaction::{Argument, CallArg, ObjectArg}, - }; - use move_binary_format::{ - CompiledModule, - errors::{Location, PartialVMError, PartialVMResult, VMError, VMResult}, - file_format::{CodeOffset, FunctionDefinitionIndex, TypeParameterIndex}, - }; - use move_core_types::{ - account_address::AccountAddress, - identifier::IdentStr, - language_storage::{ModuleId, StructTag, TypeTag}, - resolver::ModuleResolver, - vm_status::StatusCode, - }; - use move_vm_runtime::{ - move_vm::MoveVM, - native_extensions::NativeContextExtensions, - session::{LoadedFunctionInstantiation, SerializedReturnValues}, - }; - use move_vm_types::{data_store::DataStore, loaded_data::runtime_types::Type}; - use tracing::instrument; - - use crate::{ - adapter::new_native_extensions, - error::convert_vm_error, - execution_mode::ExecutionMode, - execution_value::{ - CommandKind, ExecutionState, InputObjectMetadata, InputValue, ObjectContents, - ObjectValue, RawValueType, ResultValue, TryFromValue, UsageKind, Value, - }, - gas_charger::GasCharger, - programmable_transactions::linkage_view::LinkageView, - type_resolver::TypeTagResolver, - }; - - /// Maintains all runtime state specific to programmable transactions - pub struct ExecutionContext<'vm, 'state, 'a> { - /// The protocol config - pub protocol_config: &'a ProtocolConfig, - /// Metrics for reporting exceeded limits - pub metrics: Arc, - /// The MoveVM - pub vm: &'vm MoveVM, - /// The LinkageView for this session - pub linkage_view: LinkageView<'state>, - pub native_extensions: NativeContextExtensions<'state>, - /// The global state, used for resolving packages - pub state_view: &'state dyn ExecutionState, - /// A shared transaction context, contains transaction digest - /// information and manages the creation of new object IDs - pub tx_context: &'a mut TxContext, - /// The gas charger used for metering - pub gas_charger: &'a mut GasCharger, - /// Additional transfers not from the Move runtime - additional_transfers: Vec<(/* new owner */ IotaAddress, ObjectValue)>, - /// Newly published packages - new_packages: Vec, - /// User events are claimed after each Move call - user_events: Vec<(ModuleId, StructTag, Vec)>, - // runtime data - /// The runtime value for the Gas coin, None if it has been taken/moved - gas: InputValue, - /// The runtime value for the inputs/call args, None if it has been - /// taken/moved - inputs: Vec, - /// The results of a given command. For most commands, the inner vector - /// will have length 1. It will only not be 1 for Move calls - /// with multiple return values. Inner values are None if - /// taken/moved by-value - results: Vec>, - /// Map of arguments that are currently borrowed in this command, true - /// if the borrow is mutable This gets cleared out when new - /// results are pushed, i.e. the end of a command - borrowed: HashMap, - } - - /// A write for an object that was generated outside of the Move - /// ObjectRuntime - struct AdditionalWrite { - /// The new owner of the object - recipient: Owner, - /// the type of the object, - type_: Type, - /// if the object has public transfer or not, i.e. if it has store - has_public_transfer: bool, - /// contents of the object - bytes: Vec, - } - - impl<'vm, 'state, 'a> ExecutionContext<'vm, 'state, 'a> { - /// Creates a new instance of the transaction execution context, - /// initializing the necessary components such as protocol - /// configuration, Move VM, gas management, inputs, and native - /// extensions. This function processes the input arguments, sets up gas - /// handling for the transaction, and prepares the state for - /// executing Move programs. - #[instrument(name = "ExecutionContext::new", level = "trace", skip_all)] - pub fn new( - protocol_config: &'a ProtocolConfig, - metrics: Arc, - vm: &'vm MoveVM, - state_view: &'state dyn ExecutionState, - tx_context: &'a mut TxContext, - gas_charger: &'a mut GasCharger, - inputs: Vec, - ) -> Result - where - 'a: 'state, - { - let mut linkage_view = LinkageView::new(Box::new(state_view.as_iota_resolver())); - let mut input_object_map = BTreeMap::new(); - let inputs = inputs - .into_iter() - .map(|call_arg| { - load_call_arg( - vm, - state_view, - &mut linkage_view, - &[], - &mut input_object_map, - call_arg, - ) - }) - .collect::>()?; - let gas = if let Some(gas_coin) = gas_charger.gas_coin() { - let mut gas = load_object( - vm, - state_view, - &mut linkage_view, - &[], - &mut input_object_map, - // imm override - false, - gas_coin, - )?; - // subtract the max gas budget. This amount is off limits in the programmable - // transaction, so to mimic this "off limits" behavior, we act - // as if the coin has less balance than it really does - let Some(Value::Object(ObjectValue { - contents: ObjectContents::Coin(coin), - .. - })) = &mut gas.inner.value - else { - invariant_violation!("Gas object should be a populated coin") - }; - - let max_gas_in_balance = gas_charger.gas_budget(); - let Some(new_balance) = coin.balance.value().checked_sub(max_gas_in_balance) else { - invariant_violation!( - "Transaction input checker should check that there is enough gas" - ); - }; - coin.balance = Balance::new(new_balance); - gas - } else { - InputValue { - object_metadata: None, - inner: ResultValue { - last_usage_kind: None, - value: None, - }, - } - }; - let native_extensions = new_native_extensions( - state_view.as_child_resolver(), - input_object_map, - !gas_charger.is_unmetered(), - protocol_config, - metrics.clone(), - tx_context.epoch(), - ); - - // Set the profiler if in CLI - #[skip_checked_arithmetic] - move_vm_profiler::gas_profiler_feature_enabled! { - use move_vm_profiler::GasProfiler; - use move_vm_types::gas::GasMeter; - - let tx_digest = tx_context.digest(); - let remaining_gas: u64 = - move_vm_types::gas::GasMeter::remaining_gas(gas_charger.move_gas_status()) - .into(); - gas_charger - .move_gas_status_mut() - .set_profiler(GasProfiler::init( - &vm.config().profiler_config, - format!("{}", tx_digest), - remaining_gas, - )); - } - - Ok(Self { - protocol_config, - metrics, - vm, - linkage_view, - native_extensions, - state_view, - tx_context, - gas_charger, - gas, - inputs, - results: vec![], - additional_transfers: vec![], - new_packages: vec![], - user_events: vec![], - borrowed: HashMap::new(), - }) - } - - pub fn object_runtime(&mut self) -> &ObjectRuntime { - self.native_extensions.get() - } - - /// Create a new ID and update the state - pub fn fresh_id(&mut self) -> Result { - let object_id = self.tx_context.fresh_id(); - let object_runtime: &mut ObjectRuntime = self.native_extensions.get_mut(); - object_runtime - .new_id(object_id) - .map_err(|e| self.convert_vm_error(e.finish(Location::Undefined)))?; - Ok(object_id) - } - - /// Delete an ID and update the state - pub fn delete_id(&mut self, object_id: ObjectID) -> Result<(), ExecutionError> { - let object_runtime: &mut ObjectRuntime = self.native_extensions.get_mut(); - object_runtime - .delete_id(object_id) - .map_err(|e| self.convert_vm_error(e.finish(Location::Undefined))) - } - - /// Set the link context for the session from the linkage information in - /// the MovePackage found at `package_id`. Returns the runtime - /// ID of the link context package on success. - pub fn set_link_context( - &mut self, - package_id: ObjectID, - ) -> Result { - if self.linkage_view.has_linkage(package_id) { - // Setting same context again, can skip. - return Ok(self - .linkage_view - .original_package_id() - .unwrap_or(*package_id)); - } - - let package = package_for_linkage(&self.linkage_view, package_id) - .map_err(|e| self.convert_vm_error(e))?; - - self.linkage_view.set_linkage(package.move_package()) - } - - /// Load a type using the context's current session. - pub fn load_type(&mut self, type_tag: &TypeTag) -> VMResult { - load_type( - self.vm, - &mut self.linkage_view, - &self.new_packages, - type_tag, - ) - } - - /// Load a type using the context's current session. - pub fn load_type_from_struct(&mut self, struct_tag: &StructTag) -> VMResult { - load_type_from_struct( - self.vm, - &mut self.linkage_view, - &self.new_packages, - struct_tag, - ) - } - - /// Takes the user events from the runtime and tags them with the Move - /// module of the function that was invoked for the command - pub fn take_user_events( - &mut self, - module_id: &ModuleId, - function: FunctionDefinitionIndex, - last_offset: CodeOffset, - ) -> Result<(), ExecutionError> { - let object_runtime: &mut ObjectRuntime = self.native_extensions.get_mut(); - let events = object_runtime.take_user_events(); - let num_events = self.user_events.len() + events.len(); - let max_events = self.protocol_config.max_num_event_emit(); - if num_events as u64 > max_events { - let err = max_event_error(max_events) - .at_code_offset(function, last_offset) - .finish(Location::Module(module_id.clone())); - return Err(self.convert_vm_error(err)); - } - let new_events = events - .into_iter() - .map(|(ty, tag, value)| { - let layout = self - .vm - .get_runtime() - .type_to_type_layout(&ty) - .map_err(|e| self.convert_vm_error(e))?; - let Some(bytes) = value.simple_serialize(&layout) else { - invariant_violation!("Failed to deserialize already serialized Move value"); - }; - Ok((module_id.clone(), tag, bytes)) - }) - .collect::, ExecutionError>>()?; - self.user_events.extend(new_events); - Ok(()) - } - - /// Get the argument value. Cloning the value if it is copyable, and - /// setting its value to None if it is not (making it - /// unavailable). Errors if out of bounds, if the argument is - /// borrowed, if it is unavailable (already taken), or if it is - /// an object that cannot be taken by value (shared or immutable) - pub fn by_value_arg( - &mut self, - command_kind: CommandKind<'_>, - arg_idx: usize, - arg: Argument, - ) -> Result { - self.by_value_arg_(command_kind, arg) - .map_err(|e| command_argument_error(e, arg_idx)) - } - fn by_value_arg_( - &mut self, - command_kind: CommandKind<'_>, - arg: Argument, - ) -> Result { - let is_borrowed = self.arg_is_borrowed(&arg); - let (input_metadata_opt, val_opt) = self.borrow_mut(arg, UsageKind::ByValue)?; - let is_copyable = if let Some(val) = val_opt { - val.is_copyable() - } else { - return Err(CommandArgumentError::InvalidValueUsage); - }; - // If it was taken, we catch this above. - // If it was not copyable and was borrowed, error as it creates a dangling - // reference in effect. - // We allow copyable values to be copied out even if borrowed, as we do not care - // about referential transparency at this level. - if !is_copyable && is_borrowed { - return Err(CommandArgumentError::InvalidValueUsage); - } - // Gas coin cannot be taken by value, except in TransferObjects - if matches!(arg, Argument::GasCoin) - && !matches!(command_kind, CommandKind::TransferObjects) - { - return Err(CommandArgumentError::InvalidGasCoinUsage); - } - // Immutable objects cannot be taken by value - if matches!( - input_metadata_opt, - Some(InputObjectMetadata::InputObject { - owner: Owner::Immutable, - .. - }) - ) { - return Err(CommandArgumentError::InvalidObjectByValue); - } - - // Any input object taken by value must be mutable - if matches!( - input_metadata_opt, - Some(InputObjectMetadata::InputObject { - is_mutable_input: false, - .. - }) - ) { - return Err(CommandArgumentError::InvalidObjectByValue); - } - - let val = if is_copyable { - val_opt.as_ref().unwrap().clone() - } else { - val_opt.take().unwrap() - }; - V::try_from_value(val) - } - - /// Mimic a mutable borrow by taking the argument value, setting its - /// value to None, making it unavailable. The value will be - /// marked as borrowed and must be returned with restore_arg - /// Errors if out of bounds, if the argument is borrowed, if it is - /// unavailable (already taken), or if it is an object that - /// cannot be mutably borrowed (immutable) - pub fn borrow_arg_mut( - &mut self, - arg_idx: usize, - arg: Argument, - ) -> Result { - self.borrow_arg_mut_(arg) - .map_err(|e| command_argument_error(e, arg_idx)) - } - fn borrow_arg_mut_( - &mut self, - arg: Argument, - ) -> Result { - // mutable borrowing requires unique usage - if self.arg_is_borrowed(&arg) { - return Err(CommandArgumentError::InvalidValueUsage); - } - self.borrowed.insert(arg, /* is_mut */ true); - let (input_metadata_opt, val_opt) = self.borrow_mut(arg, UsageKind::BorrowMut)?; - let is_copyable = if let Some(val) = val_opt { - val.is_copyable() - } else { - // error if taken - return Err(CommandArgumentError::InvalidValueUsage); - }; - if let Some(InputObjectMetadata::InputObject { - is_mutable_input: false, - .. - }) = input_metadata_opt - { - return Err(CommandArgumentError::InvalidObjectByMutRef); - } - // if it is copyable, don't take it as we allow for the value to be copied even - // if mutably borrowed - let val = if is_copyable { - val_opt.as_ref().unwrap().clone() - } else { - val_opt.take().unwrap() - }; - V::try_from_value(val) - } - - /// Mimics an immutable borrow by cloning the argument value without - /// setting its value to None Errors if out of bounds, if the - /// argument is mutably borrowed, or if it is unavailable - /// (already taken) - pub fn borrow_arg( - &mut self, - arg_idx: usize, - arg: Argument, - type_: &Type, - ) -> Result { - self.borrow_arg_(arg, type_) - .map_err(|e| command_argument_error(e, arg_idx)) - } - fn borrow_arg_( - &mut self, - arg: Argument, - arg_type: &Type, - ) -> Result { - // immutable borrowing requires the value was not mutably borrowed. - // If it was copied, that is okay. - // If it was taken/moved, we will find out below - if self.arg_is_mut_borrowed(&arg) { - return Err(CommandArgumentError::InvalidValueUsage); - } - self.borrowed.insert(arg, /* is_mut */ false); - let (_input_metadata_opt, val_opt) = self.borrow_mut(arg, UsageKind::BorrowImm)?; - if val_opt.is_none() { - return Err(CommandArgumentError::InvalidValueUsage); - } - - // We eagerly reify receiving argument types at the first usage of them. - if let &mut Some(Value::Receiving(_, _, ref mut recv_arg_type @ None)) = val_opt { - let Type::Reference(inner) = arg_type else { - return Err(CommandArgumentError::InvalidValueUsage); - }; - *recv_arg_type = Some(*(*inner).clone()); - } - - V::try_from_value(val_opt.as_ref().unwrap().clone()) - } - - /// Restore an argument after being mutably borrowed - pub fn restore_arg( - &mut self, - updates: &mut Mode::ArgumentUpdates, - arg: Argument, - value: Value, - ) -> Result<(), ExecutionError> { - Mode::add_argument_update(self, updates, arg, &value)?; - let was_mut_opt = self.borrowed.remove(&arg); - assert_invariant!( - was_mut_opt.is_some() && was_mut_opt.unwrap(), - "Should never restore a non-mut borrowed value. \ - The take+restore is an implementation detail of mutable references" - ); - // restore is exclusively used for mut - let Ok((_, value_opt)) = self.borrow_mut_impl(arg, None) else { - invariant_violation!("Should be able to borrow argument to restore it") - }; - - let old_value = value_opt.replace(value); - assert_invariant!( - old_value.is_none() || old_value.unwrap().is_copyable(), - "Should never restore a non-taken value, unless it is copyable. \ - The take+restore is an implementation detail of mutable references" - ); - - Ok(()) - } - - /// Transfer the object to a new owner - pub fn transfer_object( - &mut self, - obj: ObjectValue, - addr: IotaAddress, - ) -> Result<(), ExecutionError> { - self.additional_transfers.push((addr, obj)); - Ok(()) - } - - /// Create a new package - pub fn new_package<'p>( - &self, - modules: &[CompiledModule], - dependencies: impl IntoIterator, - ) -> Result { - MovePackage::new_initial( - modules, - self.protocol_config.max_move_package_size(), - self.protocol_config.move_binary_format_version(), - dependencies, - ) - } - - /// Create a package upgrade from `previous_package` with `new_modules` - /// and `dependencies` - pub fn upgrade_package<'p>( - &self, - storage_id: ObjectID, - previous_package: &MovePackage, - new_modules: &[CompiledModule], - dependencies: impl IntoIterator, - ) -> Result { - previous_package.new_upgraded( - storage_id, - new_modules, - self.protocol_config, - dependencies, - ) - } - - /// Add a newly created package to write as an effect of the transaction - pub fn write_package(&mut self, package: MovePackage) { - self.new_packages.push(package); - } - - /// Return the last package pushed in `write_package`. - /// This function should be used in block of codes that push a package, - /// verify it, run the init and in case of error will remove the - /// package. The package has to be pushed for the init to run - /// correctly. - pub fn pop_package(&mut self) -> Option { - self.new_packages.pop() - } - - /// Finish a command: clearing the borrows and adding the results to the - /// result vector - pub fn push_command_results(&mut self, results: Vec) -> Result<(), ExecutionError> { - assert_invariant!( - self.borrowed.values().all(|is_mut| !is_mut), - "all mut borrows should be restored" - ); - // clear borrow state - self.borrowed = HashMap::new(); - self.results - .push(results.into_iter().map(ResultValue::new).collect()); - Ok(()) - } - - /// Determine the object changes and collect all user events - pub fn finish(self) -> Result { - let Self { - protocol_config, - vm, - linkage_view, - mut native_extensions, - tx_context, - gas_charger, - additional_transfers, - new_packages, - gas, - inputs, - results, - user_events, - state_view, - .. - } = self; - let tx_digest = tx_context.digest(); - let gas_id_opt = gas.object_metadata.as_ref().map(|info| info.id()); - let mut loaded_runtime_objects = BTreeMap::new(); - let mut additional_writes = BTreeMap::new(); - let mut by_value_shared_objects = BTreeSet::new(); - for input in inputs.into_iter().chain(std::iter::once(gas)) { - let InputValue { - object_metadata: - Some(InputObjectMetadata::InputObject { - // We are only interested in mutable inputs. - is_mutable_input: true, - id, - version, - owner, - }), - inner: ResultValue { value, .. }, - } = input - else { - continue; - }; - loaded_runtime_objects.insert(id, LoadedRuntimeObject { - version, - is_modified: true, - }); - if let Some(Value::Object(object_value)) = value { - add_additional_write(&mut additional_writes, owner, object_value)?; - } else if owner.is_shared() { - by_value_shared_objects.insert(id); - } - } - // check for unused values - // disable this check for dev inspect - if !Mode::allow_arbitrary_values() { - for (i, command_result) in results.iter().enumerate() { - for (j, result_value) in command_result.iter().enumerate() { - let ResultValue { - last_usage_kind, - value, - } = result_value; - match value { - None => (), - Some(Value::Object(_)) => { - return Err(ExecutionErrorKind::UnusedValueWithoutDrop { - result_idx: i as u16, - secondary_idx: j as u16, - } - .into()); - } - Some(Value::Raw(RawValueType::Any, _)) => (), - Some(Value::Raw(RawValueType::Loaded { abilities, .. }, _)) => { - // - nothing to check for drop - // - if it does not have drop, but has copy, the last usage must be - // by value in order to "lie" and say that the last usage is - // actually a take instead of a clone - // - Otherwise, an error - if abilities.has_drop() - || (abilities.has_copy() - && matches!(last_usage_kind, Some(UsageKind::ByValue))) - { - } else { - let msg = if abilities.has_copy() { - "The value has copy, but not drop. \ - Its last usage must be by-value so it can be taken." - } else { - "Unused value without drop" - }; - return Err(ExecutionError::new_with_source( - ExecutionErrorKind::UnusedValueWithoutDrop { - result_idx: i as u16, - secondary_idx: j as u16, - }, - msg, - )); - } - } - // Receiving arguments can be dropped without being received - Some(Value::Receiving(_, _, _)) => (), - } - } - } - } - // add transfers from TransferObjects command - for (recipient, object_value) in additional_transfers { - let owner = Owner::AddressOwner(recipient); - add_additional_write(&mut additional_writes, owner, object_value)?; - } - // Refund unused gas - if let Some(gas_id) = gas_id_opt { - refund_max_gas_budget(&mut additional_writes, gas_charger, gas_id)?; - } - - let object_runtime: ObjectRuntime = native_extensions.remove(); - - let RuntimeResults { - writes, - user_events: remaining_events, - loaded_child_objects, - mut created_object_ids, - deleted_object_ids, - } = object_runtime.finish()?; - assert_invariant!( - remaining_events.is_empty(), - "Events should be taken after every Move call" - ); - - loaded_runtime_objects.extend(loaded_child_objects); - - let mut written_objects = BTreeMap::new(); - for package in new_packages { - let package_obj = Object::new_from_package(package, tx_digest); - let id = package_obj.id(); - created_object_ids.insert(id); - written_objects.insert(id, package_obj); - } - for (id, additional_write) in additional_writes { - let AdditionalWrite { - recipient, - type_, - has_public_transfer, - bytes, - } = additional_write; - // safe given the invariant that the runtime correctly propagates - // has_public_transfer - let move_object = unsafe { - create_written_object( - vm, - &linkage_view, - protocol_config, - &loaded_runtime_objects, - id, - type_, - has_public_transfer, - bytes, - )? - }; - let object = Object::new_move(move_object, recipient, tx_digest); - written_objects.insert(id, object); - if let Some(loaded) = loaded_runtime_objects.get_mut(&id) { - loaded.is_modified = true; - } - } - - for (id, (recipient, ty, value)) in writes { - let abilities = vm - .get_runtime() - .get_type_abilities(&ty) - .map_err(|e| convert_vm_error(e, vm, &linkage_view))?; - let has_public_transfer = abilities.has_store(); - let layout = vm - .get_runtime() - .type_to_type_layout(&ty) - .map_err(|e| convert_vm_error(e, vm, &linkage_view))?; - let Some(bytes) = value.simple_serialize(&layout) else { - invariant_violation!("Failed to deserialize already serialized Move value"); - }; - // safe because has_public_transfer has been determined by the abilities - let move_object = unsafe { - create_written_object( - vm, - &linkage_view, - protocol_config, - &loaded_runtime_objects, - id, - ty, - has_public_transfer, - bytes, - )? - }; - let object = Object::new_move(move_object, recipient, tx_digest); - written_objects.insert(id, object); - } - - // Before finishing, ensure that any shared object taken by value by the - // transaction is either: - // 1. Mutated (and still has a shared ownership); or - // 2. Deleted. - // Otherwise, the shared object operation is not allowed and we fail the - // transaction. - for id in &by_value_shared_objects { - // If it's been written it must have been reshared so must still have an - // ownership of `Shared`. - if let Some(obj) = written_objects.get(id) { - if !obj.is_shared() { - return Err(ExecutionError::new( - ExecutionErrorKind::SharedObjectOperationNotAllowed, - Some( - format!( - "Shared object operation on {} not allowed: \ - cannot be frozen, transferred, or wrapped", - id - ) - .into(), - ), - )); - } - } else { - // If it's not in the written objects, the object must have been deleted. - // Otherwise it's an error. - if !deleted_object_ids.contains(id) { - return Err(ExecutionError::new( - ExecutionErrorKind::SharedObjectOperationNotAllowed, - Some( - format!("Shared object operation on {} not allowed: \ - shared objects used by value must be re-shared if not deleted", id).into(), - ), - )); - } - } - } - - let DenyListResult { - result, - num_non_gas_coin_owners, - } = state_view.check_coin_deny_list(&written_objects); - gas_charger.charge_coin_transfers(protocol_config, num_non_gas_coin_owners)?; - result?; - - let user_events = user_events - .into_iter() - .map(|(module_id, tag, contents)| { - Event::new( - module_id.address(), - module_id.name(), - tx_context.sender(), - tag, - contents, - ) - }) - .collect(); - - Ok(ExecutionResults::V1(ExecutionResultsV1 { - written_objects, - modified_objects: loaded_runtime_objects - .into_iter() - .filter_map(|(id, loaded)| loaded.is_modified.then_some(id)) - .collect(), - created_object_ids: created_object_ids.into_iter().collect(), - deleted_object_ids: deleted_object_ids.into_iter().collect(), - user_events, - })) - } - - /// Convert a VM Error to an execution one - pub fn convert_vm_error(&self, error: VMError) -> ExecutionError { - crate::error::convert_vm_error(error, self.vm, &self.linkage_view) - } - - /// Special case errors for type arguments to Move functions - pub fn convert_type_argument_error(&self, idx: usize, error: VMError) -> ExecutionError { - use iota_types::execution_status::TypeArgumentError; - use move_core_types::vm_status::StatusCode; - match error.major_status() { - StatusCode::NUMBER_OF_TYPE_ARGUMENTS_MISMATCH => { - ExecutionErrorKind::TypeArityMismatch.into() - } - StatusCode::TYPE_RESOLUTION_FAILURE => ExecutionErrorKind::TypeArgumentError { - argument_idx: idx as TypeParameterIndex, - kind: TypeArgumentError::TypeNotFound, - } - .into(), - StatusCode::CONSTRAINT_NOT_SATISFIED => ExecutionErrorKind::TypeArgumentError { - argument_idx: idx as TypeParameterIndex, - kind: TypeArgumentError::ConstraintNotSatisfied, - } - .into(), - _ => self.convert_vm_error(error), - } - } - - /// Returns true if the value at the argument's location is borrowed, - /// mutably or immutably - fn arg_is_borrowed(&self, arg: &Argument) -> bool { - self.borrowed.contains_key(arg) - } - - /// Returns true if the value at the argument's location is mutably - /// borrowed - fn arg_is_mut_borrowed(&self, arg: &Argument) -> bool { - matches!(self.borrowed.get(arg), Some(/* mut */ true)) - } - - /// Internal helper to borrow the value for an argument and update the - /// most recent usage - fn borrow_mut( - &mut self, - arg: Argument, - usage: UsageKind, - ) -> Result<(Option<&InputObjectMetadata>, &mut Option), CommandArgumentError> - { - self.borrow_mut_impl(arg, Some(usage)) - } - - /// Internal helper to borrow the value for an argument - /// Updates the most recent usage if specified - fn borrow_mut_impl( - &mut self, - arg: Argument, - update_last_usage: Option, - ) -> Result<(Option<&InputObjectMetadata>, &mut Option), CommandArgumentError> - { - let (metadata, result_value) = match arg { - Argument::GasCoin => (self.gas.object_metadata.as_ref(), &mut self.gas.inner), - Argument::Input(i) => { - let Some(input_value) = self.inputs.get_mut(i as usize) else { - return Err(CommandArgumentError::IndexOutOfBounds { idx: i }); - }; - (input_value.object_metadata.as_ref(), &mut input_value.inner) - } - Argument::Result(i) => { - let Some(command_result) = self.results.get_mut(i as usize) else { - return Err(CommandArgumentError::IndexOutOfBounds { idx: i }); - }; - if command_result.len() != 1 { - return Err(CommandArgumentError::InvalidResultArity { result_idx: i }); - } - (None, &mut command_result[0]) - } - Argument::NestedResult(i, j) => { - let Some(command_result) = self.results.get_mut(i as usize) else { - return Err(CommandArgumentError::IndexOutOfBounds { idx: i }); - }; - let Some(result_value) = command_result.get_mut(j as usize) else { - return Err(CommandArgumentError::SecondaryIndexOutOfBounds { - result_idx: i, - secondary_idx: j, - }); - }; - (None, result_value) - } - }; - if let Some(usage) = update_last_usage { - result_value.last_usage_kind = Some(usage); - } - Ok((metadata, &mut result_value.value)) - } - - /// Executes a Move function bypassing visibility checks, allowing the - /// execution of private or protected functions. This method - /// sets up the necessary gas status and data store, and then - /// delegates the execution to the Move VM runtime. - pub(crate) fn execute_function_bypass_visibility( - &mut self, - module: &ModuleId, - function_name: &IdentStr, - ty_args: Vec, - args: Vec>, - ) -> VMResult { - let gas_status = self.gas_charger.move_gas_status_mut(); - let mut data_store = IotaDataStore::new(&self.linkage_view, &self.new_packages); - self.vm.get_runtime().execute_function_bypass_visibility( - module, - function_name, - ty_args, - args, - &mut data_store, - gas_status, - &mut self.native_extensions, - ) - } - - /// Loads a Move function from the specified module with the given type - /// arguments without executing it. This function initializes - /// the data store and delegates the loading process to the Move - /// VM runtime. - pub(crate) fn load_function( - &mut self, - module_id: &ModuleId, - function_name: &IdentStr, - type_arguments: &[Type], - ) -> VMResult { - let mut data_store = IotaDataStore::new(&self.linkage_view, &self.new_packages); - self.vm.get_runtime().load_function( - module_id, - function_name, - type_arguments, - &mut data_store, - ) - } - - /// Constructs an `ObjectValue` based on the provided Move object type, - /// transferability, usage context, and byte contents. This - /// function utilizes the protocol configuration, Move VM, and - /// linkage view to properly interpret and instantiate the object. - pub(crate) fn make_object_value( - &mut self, - type_: MoveObjectType, - used_in_non_entry_move_call: bool, - contents: &[u8], - ) -> Result { - make_object_value( - self.vm, - &mut self.linkage_view, - &self.new_packages, - type_, - used_in_non_entry_move_call, - contents, - ) - } - - /// Publishes a bundle of Move modules to the blockchain under the - /// specified sender's account address. The function initializes - /// a data store and delegates the publishing operation to the Move VM - /// runtime. - pub fn publish_module_bundle( - &mut self, - modules: Vec>, - sender: AccountAddress, - ) -> VMResult<()> { - // TODO: publish_module_bundle() currently doesn't charge gas. - // Do we want to charge there? - let mut data_store = IotaDataStore::new(&self.linkage_view, &self.new_packages); - self.vm.get_runtime().publish_module_bundle( - modules, - sender, - &mut data_store, - self.gas_charger.move_gas_status_mut(), - ) - } - } - - impl<'vm, 'state, 'a> TypeTagResolver for ExecutionContext<'vm, 'state, 'a> { - /// Retrieves the `TypeTag` corresponding to the provided `Type` by - /// querying the Move VM runtime. - fn get_type_tag(&self, type_: &Type) -> Result { - self.vm - .get_runtime() - .get_type_tag(type_) - .map_err(|e| self.convert_vm_error(e)) - } - } - - /// Fetch the package at `package_id` with a view to using it as a link - /// context. Produces an error if the object at that ID does not exist, - /// or is not a package. - fn package_for_linkage( - linkage_view: &LinkageView, - package_id: ObjectID, - ) -> VMResult { - use move_binary_format::errors::PartialVMError; - use move_core_types::vm_status::StatusCode; - - match linkage_view.get_package_object(&package_id) { - Ok(Some(package)) => Ok(package), - Ok(None) => Err(PartialVMError::new(StatusCode::LINKER_ERROR) - .with_message(format!("Cannot find link context {package_id} in store")) - .finish(Location::Undefined)), - Err(err) => Err(PartialVMError::new(StatusCode::LINKER_ERROR) - .with_message(format!( - "Error loading link context {package_id} from store: {err}" - )) - .finish(Location::Undefined)), - } - } - - /// Loads a `Type` from the given `StructTag`, retrieving the corresponding - /// struct from the package in storage. The function sets up the linkage - /// context to resolve the struct's module and verifies - /// any type parameter constraints. If the struct has type parameters, they - /// are recursively loaded and verified. - pub fn load_type_from_struct( - vm: &MoveVM, - linkage_view: &mut LinkageView, - new_packages: &[MovePackage], - struct_tag: &StructTag, - ) -> VMResult { - fn verification_error(code: StatusCode) -> VMResult { - Err(PartialVMError::new(code).finish(Location::Undefined)) - } - - let StructTag { - address, - module, - name, - type_params, - } = struct_tag; - - // Load the package that the struct is defined in, in storage - let defining_id = ObjectID::from_address(*address); - let package = package_for_linkage(linkage_view, defining_id)?; - - // Set the defining package as the link context while loading the - // struct - let original_address = linkage_view - .set_linkage(package.move_package()) - .map_err(|e| { - PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message(e.to_string()) - .finish(Location::Undefined) - })?; - - let runtime_id = ModuleId::new(original_address, module.clone()); - let data_store = IotaDataStore::new(linkage_view, new_packages); - let res = vm.get_runtime().load_type(&runtime_id, name, &data_store); - linkage_view.reset_linkage(); - let (idx, struct_type) = res?; - - // Recursively load type parameters, if necessary - let type_param_constraints = struct_type.type_param_constraints(); - if type_param_constraints.len() != type_params.len() { - return verification_error(StatusCode::NUMBER_OF_TYPE_ARGUMENTS_MISMATCH); - } - - if type_params.is_empty() { - Ok(Type::Datatype(idx)) - } else { - let loaded_type_params = type_params - .iter() - .map(|type_param| load_type(vm, linkage_view, new_packages, type_param)) - .collect::>>()?; - - // Verify that the type parameter constraints on the struct are met - for (constraint, param) in type_param_constraints.zip(&loaded_type_params) { - let abilities = vm.get_runtime().get_type_abilities(param)?; - if !constraint.is_subset(abilities) { - return verification_error(StatusCode::CONSTRAINT_NOT_SATISFIED); - } - } - - Ok(Type::DatatypeInstantiation(Box::new(( - idx, - loaded_type_params, - )))) - } - } - - /// Load `type_tag` to get a `Type` in the provided `session`. `session`'s - /// linkage context may be reset after this operation, because during - /// the operation, it may change when loading a struct. - pub fn load_type( - vm: &MoveVM, - linkage_view: &mut LinkageView, - new_packages: &[MovePackage], - type_tag: &TypeTag, - ) -> VMResult { - Ok(match type_tag { - TypeTag::Bool => Type::Bool, - TypeTag::U8 => Type::U8, - TypeTag::U16 => Type::U16, - TypeTag::U32 => Type::U32, - TypeTag::U64 => Type::U64, - TypeTag::U128 => Type::U128, - TypeTag::U256 => Type::U256, - TypeTag::Address => Type::Address, - TypeTag::Signer => Type::Signer, - - TypeTag::Vector(inner) => { - Type::Vector(Box::new(load_type(vm, linkage_view, new_packages, inner)?)) - } - TypeTag::Struct(struct_tag) => { - return load_type_from_struct(vm, linkage_view, new_packages, struct_tag); - } - }) - } - - /// Constructs an `ObjectValue` based on the provided `MoveObjectType`, - /// contents, and additional flags such as transferability and usage - /// context. If the object is a coin, it deserializes the contents into - /// a `Coin` type; otherwise, it treats the contents as raw data. The - /// function then loads the corresponding struct type from the Move - /// package and verifies its abilities if needed. - pub(crate) fn make_object_value( - vm: &MoveVM, - linkage_view: &mut LinkageView, - new_packages: &[MovePackage], - type_: MoveObjectType, - used_in_non_entry_move_call: bool, - contents: &[u8], - ) -> Result { - let contents = if type_.is_coin() { - let Ok(coin) = Coin::from_bcs_bytes(contents) else { - invariant_violation!("Could not deserialize a coin") - }; - ObjectContents::Coin(coin) - } else { - ObjectContents::Raw(contents.to_vec()) - }; - - let tag: StructTag = type_.into(); - let type_ = load_type_from_struct(vm, linkage_view, new_packages, &tag) - .map_err(|e| crate::error::convert_vm_error(e, vm, linkage_view))?; - let abilities = vm - .get_runtime() - .get_type_abilities(&type_) - .map_err(|e| crate::error::convert_vm_error(e, vm, linkage_view))?; - let has_public_transfer = abilities.has_store(); - Ok(ObjectValue { - type_, - has_public_transfer, - used_in_non_entry_move_call, - contents, - }) - } - - /// Converts a provided `Object` into an `ObjectValue`, extracting and - /// validating the `MoveObjectType` and contents. This function assumes - /// the object contains Move-specific data and passes the extracted data - /// through `make_object_value` to create the corresponding `ObjectValue`. - pub(crate) fn value_from_object( - vm: &MoveVM, - linkage_view: &mut LinkageView, - new_packages: &[MovePackage], - object: &Object, - ) -> Result { - let ObjectInner { - data: Data::Move(object), - .. - } = object.as_inner() - else { - invariant_violation!("Expected a Move object"); - }; - - let used_in_non_entry_move_call = false; - make_object_value( - vm, - linkage_view, - new_packages, - object.type_().clone(), - used_in_non_entry_move_call, - object.contents(), - ) - } - - /// Load an input object from the state_view - fn load_object( - vm: &MoveVM, - state_view: &dyn ExecutionState, - linkage_view: &mut LinkageView, - new_packages: &[MovePackage], - input_object_map: &mut BTreeMap, - override_as_immutable: bool, - id: ObjectID, - ) -> Result { - let Some(obj) = state_view.read_object(&id) else { - // protected by transaction input checker - invariant_violation!("Object {} does not exist yet", id); - }; - // override_as_immutable ==> Owner::Shared - assert_invariant!( - !override_as_immutable || matches!(obj.owner, Owner::Shared { .. }), - "override_as_immutable should only be set for shared objects" - ); - let is_mutable_input = match obj.owner { - Owner::AddressOwner(_) => true, - Owner::Shared { .. } => !override_as_immutable, - Owner::Immutable => false, - Owner::ObjectOwner(_) => { - // protected by transaction input checker - invariant_violation!("ObjectOwner objects cannot be input") - } - }; - let owner = obj.owner; - let version = obj.version(); - let object_metadata = InputObjectMetadata::InputObject { - id, - is_mutable_input, - owner, - version, - }; - let obj_value = value_from_object(vm, linkage_view, new_packages, obj)?; - let contained_uids = { - let fully_annotated_layout = vm - .get_runtime() - .type_to_fully_annotated_layout(&obj_value.type_) - .map_err(|e| convert_vm_error(e, vm, linkage_view))?; - let mut bytes = vec![]; - obj_value.write_bcs_bytes(&mut bytes); - match get_all_uids(&fully_annotated_layout, &bytes) { - Err(e) => { - invariant_violation!("Unable to retrieve UIDs for object. Got error: {e}") - } - Ok(uids) => uids, - } - }; - let runtime_input = object_runtime::InputObject { - contained_uids, - owner, - version, - }; - let prev = input_object_map.insert(id, runtime_input); - // protected by transaction input checker - assert_invariant!(prev.is_none(), "Duplicate input object {}", id); - Ok(InputValue::new_object(object_metadata, obj_value)) - } - - /// Load an a CallArg, either an object or a raw set of BCS bytes - fn load_call_arg( - vm: &MoveVM, - state_view: &dyn ExecutionState, - linkage_view: &mut LinkageView, - new_packages: &[MovePackage], - input_object_map: &mut BTreeMap, - call_arg: CallArg, - ) -> Result { - Ok(match call_arg { - CallArg::Pure(bytes) => InputValue::new_raw(RawValueType::Any, bytes), - CallArg::Object(obj_arg) => load_object_arg( - vm, - state_view, - linkage_view, - new_packages, - input_object_map, - obj_arg, - )?, - }) - } - - /// Load an ObjectArg from state view, marking if it can be treated as - /// mutable or not - fn load_object_arg( - vm: &MoveVM, - state_view: &dyn ExecutionState, - linkage_view: &mut LinkageView, - new_packages: &[MovePackage], - input_object_map: &mut BTreeMap, - obj_arg: ObjectArg, - ) -> Result { - match obj_arg { - ObjectArg::ImmOrOwnedObject((id, _, _)) => load_object( - vm, - state_view, - linkage_view, - new_packages, - input_object_map, - // imm override - false, - id, - ), - ObjectArg::SharedObject { id, mutable, .. } => load_object( - vm, - state_view, - linkage_view, - new_packages, - input_object_map, - // imm override - !mutable, - id, - ), - ObjectArg::Receiving((id, version, _)) => { - Ok(InputValue::new_receiving_object(id, version)) - } - } - } - - /// Generate an additional write for an ObjectValue - fn add_additional_write( - additional_writes: &mut BTreeMap, - owner: Owner, - object_value: ObjectValue, - ) -> Result<(), ExecutionError> { - let ObjectValue { - type_, - has_public_transfer, - contents, - .. - } = object_value; - let bytes = match contents { - ObjectContents::Coin(coin) => coin.to_bcs_bytes(), - ObjectContents::Raw(bytes) => bytes, - }; - let object_id = MoveObject::id_opt(&bytes).map_err(|e| { - ExecutionError::invariant_violation(format!("No id for Raw object bytes. {e}")) - })?; - let additional_write = AdditionalWrite { - recipient: owner, - type_, - has_public_transfer, - bytes, - }; - additional_writes.insert(object_id, additional_write); - Ok(()) - } - - /// The max budget was deducted from the gas coin at the beginning of the - /// transaction, now we return exactly that amount. Gas will be charged - /// by the execution engine - fn refund_max_gas_budget( - additional_writes: &mut BTreeMap, - gas_charger: &mut GasCharger, - gas_id: ObjectID, - ) -> Result<(), ExecutionError> { - let Some(AdditionalWrite { bytes, .. }) = additional_writes.get_mut(&gas_id) else { - invariant_violation!("Gas object cannot be wrapped or destroyed") - }; - let Ok(mut coin) = Coin::from_bcs_bytes(bytes) else { - invariant_violation!("Gas object must be a coin") - }; - let Some(new_balance) = coin.balance.value().checked_add(gas_charger.gas_budget()) else { - return Err(ExecutionError::new_with_source( - ExecutionErrorKind::CoinBalanceOverflow, - "Gas coin too large after returning the max gas budget", - )); - }; - coin.balance = Balance::new(new_balance); - *bytes = coin.to_bcs_bytes(); - Ok(()) - } - - /// Generate an MoveObject given an updated/written object - /// # Safety - /// - /// This function assumes proper generation of has_public_transfer, either - /// from the abilities of the StructTag, or from the runtime correctly - /// propagating from the inputs - unsafe fn create_written_object( - vm: &MoveVM, - linkage_view: &LinkageView, - protocol_config: &ProtocolConfig, - objects_modified_at: &BTreeMap, - id: ObjectID, - type_: Type, - has_public_transfer: bool, - contents: Vec, - ) -> Result { - debug_assert_eq!( - id, - MoveObject::id_opt(&contents).expect("object contents should start with an id") - ); - let old_obj_ver = objects_modified_at - .get(&id) - .map(|obj: &LoadedRuntimeObject| obj.version); - - let type_tag = vm - .get_runtime() - .get_type_tag(&type_) - .map_err(|e| crate::error::convert_vm_error(e, vm, linkage_view))?; - - let struct_tag = match type_tag { - TypeTag::Struct(inner) => *inner, - _ => invariant_violation!("Non struct type for object"), - }; - MoveObject::new_from_execution( - struct_tag.into(), - has_public_transfer, - old_obj_ver.unwrap_or_default(), - contents, - protocol_config, - ) - } - - // Implementation of the `DataStore` trait for the Move VM. - // When used during execution it may have a list of new packages that have - // just been published in the current context. Those are used for module/type - // resolution when executing module init. - // It may be created with an empty slice of packages either when no - // publish/upgrade are performed or when a type is requested not during - // execution. - pub(crate) struct IotaDataStore<'state, 'a> { - linkage_view: &'a LinkageView<'state>, - new_packages: &'a [MovePackage], - } - - impl<'state, 'a> IotaDataStore<'state, 'a> { - pub(crate) fn new( - linkage_view: &'a LinkageView<'state>, - new_packages: &'a [MovePackage], - ) -> Self { - Self { - linkage_view, - new_packages, - } - } - - fn get_module(&self, module_id: &ModuleId) -> Option<&Vec> { - for package in self.new_packages { - let module = package.get_module(module_id); - if module.is_some() { - return module; - } - } - None - } - } - - // TODO: `DataStore` will be reworked and this is likely to disappear. - // Leaving this comment around until then as testament to better days to - // come... - impl<'state, 'a> DataStore for IotaDataStore<'state, 'a> { - fn link_context(&self) -> AccountAddress { - self.linkage_view.link_context() - } - - fn relocate(&self, module_id: &ModuleId) -> PartialVMResult { - self.linkage_view.relocate(module_id).map_err(|err| { - PartialVMError::new(StatusCode::LINKER_ERROR) - .with_message(format!("Error relocating {module_id}: {err:?}")) - }) - } - - fn defining_module( - &self, - runtime_id: &ModuleId, - struct_: &IdentStr, - ) -> PartialVMResult { - self.linkage_view - .defining_module(runtime_id, struct_) - .map_err(|err| { - PartialVMError::new(StatusCode::LINKER_ERROR).with_message(format!( - "Error finding defining module for {runtime_id}::{struct_}: {err:?}" - )) - }) - } - - fn load_module(&self, module_id: &ModuleId) -> VMResult> { - if let Some(bytes) = self.get_module(module_id) { - return Ok(bytes.clone()); - } - match self.linkage_view.get_module(module_id) { - Ok(Some(bytes)) => Ok(bytes), - Ok(None) => Err(PartialVMError::new(StatusCode::LINKER_ERROR) - .with_message(format!("Cannot find {:?} in data cache", module_id)) - .finish(Location::Undefined)), - Err(err) => { - let msg = format!("Unexpected storage error: {:?}", err); - Err( - PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message(msg) - .finish(Location::Undefined), - ) - } - } - } - - fn publish_module(&mut self, _module_id: &ModuleId, _blob: Vec) -> VMResult<()> { - // we cannot panic here because during execution and publishing this is - // currently called from the publish flow in the Move runtime - Ok(()) - } - } -} diff --git a/iota-execution/v0/iota-adapter/src/programmable_transactions/execution.rs b/iota-execution/v0/iota-adapter/src/programmable_transactions/execution.rs deleted file mode 100644 index cc70099dc59..00000000000 --- a/iota-execution/v0/iota-adapter/src/programmable_transactions/execution.rs +++ /dev/null @@ -1,1728 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -pub use checked::*; - -#[iota_macros::with_checked_arithmetic] -mod checked { - use std::{ - collections::{BTreeMap, BTreeSet}, - fmt, - sync::Arc, - }; - - use iota_move_natives::object_runtime::ObjectRuntime; - use iota_protocol_config::ProtocolConfig; - use iota_types::{ - IOTA_FRAMEWORK_ADDRESS, - base_types::{ - IotaAddress, MoveObjectType, ObjectID, RESOLVED_ASCII_STR, RESOLVED_STD_OPTION, - RESOLVED_UTF8_STR, TX_CONTEXT_MODULE_NAME, TX_CONTEXT_STRUCT_NAME, TxContext, - TxContextKind, - }, - coin::Coin, - error::{ExecutionError, ExecutionErrorKind, command_argument_error}, - execution_config_utils::to_binary_config, - execution_status::{CommandArgumentError, PackageUpgradeError}, - id::{RESOLVED_IOTA_ID, UID}, - metrics::LimitsMetrics, - move_package::{ - MovePackage, UpgradeCap, UpgradePolicy, UpgradeReceipt, UpgradeTicket, - normalize_deserialized_modules, - }, - storage::{PackageObject, get_package_objects}, - transaction::{Argument, Command, ProgrammableMoveCall, ProgrammableTransaction}, - transfer::RESOLVED_RECEIVING_STRUCT, - }; - use iota_verifier::{ - INIT_FN_NAME, - private_generics::{EVENT_MODULE, PRIVATE_TRANSFER_FUNCTIONS, TRANSFER_MODULE}, - }; - use move_binary_format::{ - CompiledModule, - compatibility::{Compatibility, InclusionCheck}, - errors::{Location, PartialVMResult, VMResult}, - file_format::{AbilitySet, CodeOffset, FunctionDefinitionIndex, LocalIndex, Visibility}, - file_format_common::VERSION_6, - normalized, - }; - use move_core_types::{ - account_address::AccountAddress, - identifier::IdentStr, - language_storage::{ModuleId, TypeTag}, - u256::U256, - }; - use move_vm_runtime::{ - move_vm::MoveVM, - session::{LoadedFunctionInstantiation, SerializedReturnValues}, - }; - use move_vm_types::loaded_data::runtime_types::{CachedDatatype, Type}; - use serde::{Deserialize, de::DeserializeSeed}; - use tracing::instrument; - - use crate::{ - adapter::substitute_package_id, - execution_mode::ExecutionMode, - execution_value::{ - CommandKind, ExecutionState, ObjectContents, ObjectValue, RawValueType, Value, - }, - gas_charger::GasCharger, - programmable_transactions::context::*, - }; - - /// Executes a `ProgrammableTransaction` in the specified `ExecutionMode`, - /// applying a series of commands to the execution context. The - /// function initializes the execution context, processes each command - /// in sequence, and handles errors by recording any loaded runtime objects - /// before exiting. After successful command execution, it applies the - /// resulting changes, saving the loaded runtime objects and wrapped - /// object containers for later use. - pub fn execute( - protocol_config: &ProtocolConfig, - metrics: Arc, - vm: &MoveVM, - state_view: &mut dyn ExecutionState, - tx_context: &mut TxContext, - gas_charger: &mut GasCharger, - pt: ProgrammableTransaction, - ) -> Result { - let ProgrammableTransaction { inputs, commands } = pt; - let mut context = ExecutionContext::new( - protocol_config, - metrics, - vm, - state_view, - tx_context, - gas_charger, - inputs, - )?; - // execute commands - let mut mode_results = Mode::empty_results(); - for (idx, command) in commands.into_iter().enumerate() { - if let Err(err) = execute_command::(&mut context, &mut mode_results, command) { - let object_runtime: &ObjectRuntime = context.object_runtime(); - // We still need to record the loaded child objects for replay - let loaded_runtime_objects = object_runtime.loaded_runtime_objects(); - // we do not save the wrapped objects since on error, they should not be - // modified - drop(context); - state_view.save_loaded_runtime_objects(loaded_runtime_objects); - return Err(err.with_command_index(idx)); - }; - } - - // Save loaded objects table in case we fail in post execution - let object_runtime: &ObjectRuntime = context.object_runtime(); - // We still need to record the loaded child objects for replay - // Record the objects loaded at runtime (dynamic fields + received) for - // storage rebate calculation. - let loaded_runtime_objects = object_runtime.loaded_runtime_objects(); - // We record what objects were contained in at the start of the transaction - // for expensive invariant checks - let wrapped_object_containers = object_runtime.wrapped_object_containers(); - - // apply changes - let finished = context.finish::(); - // Save loaded objects for debug. We dont want to lose the info - state_view.save_loaded_runtime_objects(loaded_runtime_objects); - state_view.save_wrapped_object_containers(wrapped_object_containers); - state_view.record_execution_results(finished?); - Ok(mode_results) - } - - /// Execute a single command - #[instrument(level = "trace", skip_all)] - fn execute_command( - context: &mut ExecutionContext<'_, '_, '_>, - mode_results: &mut Mode::ExecutionResults, - command: Command, - ) -> Result<(), ExecutionError> { - let mut argument_updates = Mode::empty_arguments(); - let results = match command { - Command::MakeMoveVec(tag_opt, args) if args.is_empty() => { - let Some(tag) = tag_opt else { - invariant_violation!( - "input checker ensures if args are empty, there is a type specified" - ); - }; - let elem_ty = context - .load_type(&tag) - .map_err(|e| context.convert_vm_error(e))?; - let ty = Type::Vector(Box::new(elem_ty)); - let abilities = context - .vm - .get_runtime() - .get_type_abilities(&ty) - .map_err(|e| context.convert_vm_error(e))?; - // BCS layout for any empty vector should be the same - let bytes = bcs::to_bytes::>(&vec![]).unwrap(); - vec![Value::Raw( - RawValueType::Loaded { - ty, - abilities, - used_in_non_entry_move_call: false, - }, - bytes, - )] - } - Command::MakeMoveVec(tag_opt, args) => { - let mut res = vec![]; - leb128::write::unsigned(&mut res, args.len() as u64).unwrap(); - let mut arg_iter = args.into_iter().enumerate(); - let (mut used_in_non_entry_move_call, elem_ty) = match tag_opt { - Some(tag) => { - let elem_ty = context - .load_type(&tag) - .map_err(|e| context.convert_vm_error(e))?; - (false, elem_ty) - } - // If no tag specified, it _must_ be an object - None => { - // empty args covered above - let (idx, arg) = arg_iter.next().unwrap(); - let obj: ObjectValue = - context.by_value_arg(CommandKind::MakeMoveVec, idx, arg)?; - obj.write_bcs_bytes(&mut res); - (obj.used_in_non_entry_move_call, obj.type_) - } - }; - for (idx, arg) in arg_iter { - let value: Value = context.by_value_arg(CommandKind::MakeMoveVec, idx, arg)?; - check_param_type::(context, idx, &value, &elem_ty)?; - used_in_non_entry_move_call = - used_in_non_entry_move_call || value.was_used_in_non_entry_move_call(); - value.write_bcs_bytes(&mut res); - } - let ty = Type::Vector(Box::new(elem_ty)); - let abilities = context - .vm - .get_runtime() - .get_type_abilities(&ty) - .map_err(|e| context.convert_vm_error(e))?; - vec![Value::Raw( - RawValueType::Loaded { - ty, - abilities, - used_in_non_entry_move_call, - }, - res, - )] - } - Command::TransferObjects(objs, addr_arg) => { - let objs: Vec = objs - .into_iter() - .enumerate() - .map(|(idx, arg)| context.by_value_arg(CommandKind::TransferObjects, idx, arg)) - .collect::>()?; - let addr: IotaAddress = - context.by_value_arg(CommandKind::TransferObjects, objs.len(), addr_arg)?; - for obj in objs { - obj.ensure_public_transfer_eligible()?; - context.transfer_object(obj, addr)?; - } - vec![] - } - Command::SplitCoins(coin_arg, amount_args) => { - let mut obj: ObjectValue = context.borrow_arg_mut(0, coin_arg)?; - let ObjectContents::Coin(coin) = &mut obj.contents else { - let e = ExecutionErrorKind::command_argument_error( - CommandArgumentError::TypeMismatch, - 0, - ); - let msg = "Expected a coin but got an non coin object".to_owned(); - return Err(ExecutionError::new_with_source(e, msg)); - }; - let split_coins = amount_args - .into_iter() - .map(|amount_arg| { - let amount: u64 = - context.by_value_arg(CommandKind::SplitCoins, 1, amount_arg)?; - let new_coin_id = context.fresh_id()?; - let new_coin = coin.split(amount, UID::new(new_coin_id))?; - let coin_type = obj.type_.clone(); - // safe because we are propagating the coin type, and relying on the - // internal invariant that coin values have a coin - // type - let new_coin = unsafe { ObjectValue::coin(coin_type, new_coin) }; - Ok(Value::Object(new_coin)) - }) - .collect::>()?; - context.restore_arg::(&mut argument_updates, coin_arg, Value::Object(obj))?; - split_coins - } - Command::MergeCoins(target_arg, coin_args) => { - let mut target: ObjectValue = context.borrow_arg_mut(0, target_arg)?; - let ObjectContents::Coin(target_coin) = &mut target.contents else { - let e = ExecutionErrorKind::command_argument_error( - CommandArgumentError::TypeMismatch, - 0, - ); - let msg = "Expected a coin but got an non coin object".to_owned(); - return Err(ExecutionError::new_with_source(e, msg)); - }; - let coins: Vec = coin_args - .into_iter() - .enumerate() - .map(|(idx, arg)| context.by_value_arg(CommandKind::MergeCoins, idx + 1, arg)) - .collect::>()?; - for (idx, coin) in coins.into_iter().enumerate() { - if target.type_ != coin.type_ { - let e = ExecutionErrorKind::command_argument_error( - CommandArgumentError::TypeMismatch, - (idx + 1) as u16, - ); - let msg = "Coins do not have the same type".to_owned(); - return Err(ExecutionError::new_with_source(e, msg)); - } - let ObjectContents::Coin(Coin { id, balance }) = coin.contents else { - invariant_violation!( - "Target coin was a coin, and we already checked for the same type. \ - This should be a coin" - ); - }; - context.delete_id(*id.object_id())?; - target_coin.add(balance)?; - } - context.restore_arg::( - &mut argument_updates, - target_arg, - Value::Object(target), - )?; - vec![] - } - Command::MoveCall(move_call) => { - let ProgrammableMoveCall { - package, - module, - function, - type_arguments, - arguments, - } = *move_call; - - // Convert type arguments to `Type`s - let mut loaded_type_arguments = Vec::with_capacity(type_arguments.len()); - for (ix, type_arg) in type_arguments.into_iter().enumerate() { - let ty = context - .load_type(&type_arg) - .map_err(|e| context.convert_type_argument_error(ix, e))?; - loaded_type_arguments.push(ty); - } - - let original_address = context.set_link_context(package)?; - let runtime_id = ModuleId::new(original_address, module); - let return_values = execute_move_call::( - context, - &mut argument_updates, - &runtime_id, - &function, - loaded_type_arguments, - arguments, - // is_init - false, - ); - - context.linkage_view.reset_linkage(); - return_values? - } - Command::Publish(modules, dep_ids) => { - execute_move_publish::(context, &mut argument_updates, modules, dep_ids)? - } - Command::Upgrade(modules, dep_ids, current_package_id, upgrade_ticket) => { - execute_move_upgrade::( - context, - modules, - dep_ids, - current_package_id, - upgrade_ticket, - )? - } - }; - - Mode::finish_command(context, mode_results, argument_updates, &results)?; - context.push_command_results(results)?; - Ok(()) - } - - /// Execute a single Move call - fn execute_move_call( - context: &mut ExecutionContext<'_, '_, '_>, - argument_updates: &mut Mode::ArgumentUpdates, - module_id: &ModuleId, - function: &IdentStr, - type_arguments: Vec, - arguments: Vec, - is_init: bool, - ) -> Result, ExecutionError> { - // check that the function is either an entry function or a valid public - // function - let LoadedFunctionInfo { - kind, - signature, - return_value_kinds, - index, - last_instr, - } = check_visibility_and_signature::( - context, - module_id, - function, - &type_arguments, - is_init, - )?; - // build the arguments, storing meta data about by-mut-ref args - let (tx_context_kind, by_mut_ref, serialized_arguments) = - build_move_args::(context, module_id, function, kind, &signature, &arguments)?; - // invoke the VM - let SerializedReturnValues { - mutable_reference_outputs, - return_values, - } = vm_move_call( - context, - module_id, - function, - type_arguments, - tx_context_kind, - serialized_arguments, - )?; - assert_invariant!( - by_mut_ref.len() == mutable_reference_outputs.len(), - "lost mutable input" - ); - - context.take_user_events(module_id, index, last_instr)?; - - // save the link context because calls to `make_value` below can set new ones, - // and we don't want it to be clobbered. - let saved_linkage = context.linkage_view.steal_linkage(); - // write back mutable inputs. We also update if they were used in non entry Move - // calls though we do not care for immutable usages of objects or other - // values - let used_in_non_entry_move_call = kind == FunctionKind::NonEntry; - let res = write_back_results::( - context, - argument_updates, - &arguments, - used_in_non_entry_move_call, - mutable_reference_outputs - .into_iter() - .map(|(i, bytes, _layout)| (i, bytes)), - by_mut_ref, - return_values.into_iter().map(|(bytes, _layout)| bytes), - return_value_kinds, - ); - - context.linkage_view.restore_linkage(saved_linkage)?; - res - } - - /// Writes back the results of an execution, updating mutable references and - /// processing return values. This function iterates through mutable - /// reference values and their corresponding kinds, restoring them to - /// the execution context. It also processes return values for non-entry - /// Move calls by converting them into `Value` types. - fn write_back_results( - context: &mut ExecutionContext<'_, '_, '_>, - argument_updates: &mut Mode::ArgumentUpdates, - arguments: &[Argument], - non_entry_move_call: bool, - mut_ref_values: impl IntoIterator)>, - mut_ref_kinds: impl IntoIterator, - return_values: impl IntoIterator>, - return_value_kinds: impl IntoIterator, - ) -> Result, ExecutionError> { - for ((i, bytes), (j, kind)) in mut_ref_values.into_iter().zip(mut_ref_kinds) { - assert_invariant!(i == j, "lost mutable input"); - let arg_idx = i as usize; - let value = make_value(context, kind, bytes, non_entry_move_call)?; - context.restore_arg::(argument_updates, arguments[arg_idx], value)?; - } - - return_values - .into_iter() - .zip(return_value_kinds) - .map(|(bytes, kind)| { - // only non entry functions have return values - make_value( - context, kind, bytes, // used_in_non_entry_move_call - true, - ) - }) - .collect() - } - - /// Constructs a `Value` from the given `ValueKind` and byte data. Depending - /// on the kind, it either creates an `Object` or `Raw` value. For - /// `Object` types, it uses the execution context to generate an - /// `ObjectValue`, considering whether the object was used in a non-entry - /// Move call. For `Raw` types, it wraps the raw bytes with type and ability - /// information. - fn make_value( - context: &mut ExecutionContext<'_, '_, '_>, - value_info: ValueKind, - bytes: Vec, - used_in_non_entry_move_call: bool, - ) -> Result { - Ok(match value_info { - ValueKind::Object { type_, .. } => Value::Object(context.make_object_value( - type_, - used_in_non_entry_move_call, - &bytes, - )?), - ValueKind::Raw(ty, abilities) => Value::Raw( - RawValueType::Loaded { - ty, - abilities, - used_in_non_entry_move_call, - }, - bytes, - ), - }) - } - - /// Publish Move modules and call the init functions. Returns an - /// `UpgradeCap` for the newly published package on success. - fn execute_move_publish( - context: &mut ExecutionContext<'_, '_, '_>, - argument_updates: &mut Mode::ArgumentUpdates, - module_bytes: Vec>, - dep_ids: Vec, - ) -> Result, ExecutionError> { - assert_invariant!( - !module_bytes.is_empty(), - "empty package is checked in transaction input checker" - ); - context - .gas_charger - .charge_publish_package(module_bytes.iter().map(|v| v.len()).sum())?; - - let mut modules = deserialize_modules::(context, &module_bytes)?; - - // It should be fine that this does not go through ExecutionContext::fresh_id - // since the Move runtime does not to know about new packages created, - // since Move objects and Move packages cannot interact - let runtime_id = if Mode::packages_are_predefined() { - // do not calculate or substitute id for predefined packages - (*modules[0].self_id().address()).into() - } else { - let id = context.tx_context.fresh_id(); - substitute_package_id(&mut modules, id)?; - id - }; - - // For newly published packages, runtime ID matches storage ID. - let storage_id = runtime_id; - let dependencies = fetch_packages(context, &dep_ids)?; - let package = - context.new_package(&modules, dependencies.iter().map(|p| p.move_package()))?; - - // Here we optimistically push the package that is being published/upgraded - // and if there is an error of any kind (verification or module init) we - // remove it. - // The call to `pop_last_package` later is fine because we cannot re-enter and - // the last package we pushed is the one we are verifying and running the init - // from - context.linkage_view.set_linkage(&package)?; - context.write_package(package); - let res = publish_and_verify_modules(context, runtime_id, &modules) - .and_then(|_| init_modules::(context, argument_updates, &modules)); - context.linkage_view.reset_linkage(); - if res.is_err() { - context.pop_package(); - } - res?; - - let values = if Mode::packages_are_predefined() { - // no upgrade cap for genesis modules - vec![] - } else { - let cap = &UpgradeCap::new(context.fresh_id()?, storage_id); - vec![Value::Object(context.make_object_value( - UpgradeCap::type_().into(), - // used_in_non_entry_move_call - false, - &bcs::to_bytes(cap).unwrap(), - )?)] - }; - Ok(values) - } - - /// Upgrade a Move package. Returns an `UpgradeReceipt` for the upgraded - /// package on success. - fn execute_move_upgrade( - context: &mut ExecutionContext<'_, '_, '_>, - module_bytes: Vec>, - dep_ids: Vec, - current_package_id: ObjectID, - upgrade_ticket_arg: Argument, - ) -> Result, ExecutionError> { - assert_invariant!( - !module_bytes.is_empty(), - "empty package is checked in transaction input checker" - ); - context - .gas_charger - .charge_upgrade_package(module_bytes.iter().map(|v| v.len()).sum())?; - - let upgrade_ticket_type = context - .load_type_from_struct(&UpgradeTicket::type_()) - .map_err(|e| context.convert_vm_error(e))?; - let upgrade_receipt_type = context - .load_type_from_struct(&UpgradeReceipt::type_()) - .map_err(|e| context.convert_vm_error(e))?; - - let upgrade_ticket: UpgradeTicket = { - let mut ticket_bytes = Vec::new(); - let ticket_val: Value = - context.by_value_arg(CommandKind::Upgrade, 0, upgrade_ticket_arg)?; - check_param_type::(context, 0, &ticket_val, &upgrade_ticket_type)?; - ticket_val.write_bcs_bytes(&mut ticket_bytes); - bcs::from_bytes(&ticket_bytes).map_err(|_| { - ExecutionError::from_kind(ExecutionErrorKind::CommandArgumentError { - arg_idx: 0, - kind: CommandArgumentError::InvalidBCSBytes, - }) - })? - }; - - // Make sure the passed-in package ID matches the package ID in the - // `upgrade_ticket`. - if current_package_id != upgrade_ticket.package.bytes { - return Err(ExecutionError::from_kind( - ExecutionErrorKind::PackageUpgradeError { - upgrade_error: PackageUpgradeError::PackageIDDoesNotMatch { - package_id: current_package_id, - ticket_id: upgrade_ticket.package.bytes, - }, - }, - )); - } - - // Check digest. - let computed_digest = - MovePackage::compute_digest_for_modules_and_deps(&module_bytes, &dep_ids).into(); - if computed_digest != upgrade_ticket.digest { - return Err(ExecutionError::from_kind( - ExecutionErrorKind::PackageUpgradeError { - upgrade_error: PackageUpgradeError::DigestDoesNotMatch { - digest: computed_digest, - }, - }, - )); - } - - // Check that this package ID points to a package and get the package we're - // upgrading. - let current_package = fetch_package(context, &upgrade_ticket.package.bytes)?; - - let mut modules = deserialize_modules::(context, &module_bytes)?; - let runtime_id = current_package.move_package().original_package_id(); - substitute_package_id(&mut modules, runtime_id)?; - - // Upgraded packages share their predecessor's runtime ID but get a new storage - // ID. - let storage_id = context.tx_context.fresh_id(); - - let dependencies = fetch_packages(context, &dep_ids)?; - let package = context.upgrade_package( - storage_id, - current_package.move_package(), - &modules, - dependencies.iter().map(|p| p.move_package()), - )?; - - context.linkage_view.set_linkage(&package)?; - let res = publish_and_verify_modules(context, runtime_id, &modules); - context.linkage_view.reset_linkage(); - res?; - - check_compatibility( - context, - current_package.move_package(), - &modules, - upgrade_ticket.policy, - )?; - - context.write_package(package); - Ok(vec![Value::Raw( - RawValueType::Loaded { - ty: upgrade_receipt_type, - abilities: AbilitySet::EMPTY, - used_in_non_entry_move_call: false, - }, - bcs::to_bytes(&UpgradeReceipt::new(upgrade_ticket, storage_id)).unwrap(), - )]) - } - - /// Checks the compatibility between an existing Move package and the new - /// upgrading modules based on the specified upgrade policy. The - /// function first validates the upgrade policy, then normalizes the - /// existing and new modules to compare them. For each module, it verifies - /// compatibility according to the policy. - fn check_compatibility<'a>( - context: &ExecutionContext, - existing_package: &MovePackage, - upgrading_modules: impl IntoIterator, - policy: u8, - ) -> Result<(), ExecutionError> { - // Make sure this is a known upgrade policy. - let Ok(policy) = UpgradePolicy::try_from(policy) else { - return Err(ExecutionError::from_kind( - ExecutionErrorKind::PackageUpgradeError { - upgrade_error: PackageUpgradeError::UnknownUpgradePolicy { policy }, - }, - )); - }; - - let binary_config = to_binary_config(context.protocol_config); - let Ok(current_normalized) = existing_package.normalize(&binary_config) else { - invariant_violation!("Tried to normalize modules in existing package but failed") - }; - - let mut new_normalized = normalize_deserialized_modules(upgrading_modules.into_iter()); - for (name, cur_module) in current_normalized { - let Some(new_module) = new_normalized.remove(&name) else { - return Err(ExecutionError::new_with_source( - ExecutionErrorKind::PackageUpgradeError { - upgrade_error: PackageUpgradeError::IncompatibleUpgrade, - }, - format!("Existing module {name} not found in next version of package"), - )); - }; - - check_module_compatibility(&policy, &cur_module, &new_module)?; - } - - Ok(()) - } - - /// Verifies the compatibility of two normalized Move modules based on the - /// specified upgrade policy. Depending on the policy, it checks if the - /// new module is a subset, equal, or compatible with the - /// current module. The compatibility check may include aspects like struct - /// layout, public function linking, and struct type parameters. - fn check_module_compatibility( - policy: &UpgradePolicy, - cur_module: &normalized::Module, - new_module: &normalized::Module, - ) -> Result<(), ExecutionError> { - match policy { - UpgradePolicy::Additive => InclusionCheck::Subset.check(cur_module, new_module), - UpgradePolicy::DepOnly => InclusionCheck::Equal.check(cur_module, new_module), - UpgradePolicy::Compatible => { - let compatibility = Compatibility { - check_datatype_and_pub_function_linking: true, - check_datatype_layout: true, - check_friend_linking: false, - check_private_entry_linking: false, - disallowed_new_abilities: AbilitySet::ALL, - disallow_change_datatype_type_params: true, - // We disallow adding new variants to enums for now - disallow_new_variants: true, - }; - - compatibility.check(cur_module, new_module) - } - } - .map_err(|e| { - ExecutionError::new_with_source( - ExecutionErrorKind::PackageUpgradeError { - upgrade_error: PackageUpgradeError::IncompatibleUpgrade, - }, - e, - ) - }) - } - - /// Retrieves a `PackageObject` from the storage based on the provided - /// `package_id`. It ensures that exactly one package is fetched, - /// returning an invariant violation if the number of fetched packages - /// does not match the expected count. - fn fetch_package( - context: &ExecutionContext<'_, '_, '_>, - package_id: &ObjectID, - ) -> Result { - let mut fetched_packages = fetch_packages(context, vec![package_id])?; - assert_invariant!( - fetched_packages.len() == 1, - "Number of fetched packages must match the number of package object IDs if successful." - ); - match fetched_packages.pop() { - Some(pkg) => Ok(pkg), - None => invariant_violation!( - "We should always fetch a package for each object or return a dependency error." - ), - } - } - - /// Fetches a list of `PackageObject` instances based on the provided - /// package IDs from the execution context. It collects the package IDs - /// and attempts to retrieve the corresponding packages from the state view. - fn fetch_packages<'ctx, 'vm, 'state, 'a>( - context: &'ctx ExecutionContext<'vm, 'state, 'a>, - package_ids: impl IntoIterator, - ) -> Result, ExecutionError> { - let package_ids: BTreeSet<_> = package_ids.into_iter().collect(); - match get_package_objects(&context.state_view, package_ids) { - Err(e) => Err(ExecutionError::new_with_source( - ExecutionErrorKind::PublishUpgradeMissingDependency, - e, - )), - Ok(Err(missing_deps)) => { - let msg = format!( - "Missing dependencies: {}", - missing_deps - .into_iter() - .map(|dep| format!("{}", dep)) - .collect::>() - .join(", ") - ); - Err(ExecutionError::new_with_source( - ExecutionErrorKind::PublishUpgradeMissingDependency, - msg, - )) - } - Ok(Ok(pkgs)) => Ok(pkgs), - } - } - - /// ************************************************************************ - /// **** ********************* Move execution - /// ************************************************************************ - /// **** ******************* - - /// Executes a Move function within the given module by invoking the Move - /// VM, passing the specified type arguments and serialized arguments. - /// Depending on the `TxContextKind`, the transaction context - /// is appended to the arguments. The function handles mutable updates to - /// the transaction context when objects are created during execution. - fn vm_move_call( - context: &mut ExecutionContext<'_, '_, '_>, - module_id: &ModuleId, - function: &IdentStr, - type_arguments: Vec, - tx_context_kind: TxContextKind, - mut serialized_arguments: Vec>, - ) -> Result { - match tx_context_kind { - TxContextKind::None => (), - TxContextKind::Mutable | TxContextKind::Immutable => { - serialized_arguments.push(context.tx_context.to_vec()); - } - } - // script visibility checked manually for entry points - let mut result = context - .execute_function_bypass_visibility( - module_id, - function, - type_arguments, - serialized_arguments, - ) - .map_err(|e| context.convert_vm_error(e))?; - - // When this function is used during publishing, it - // may be executed several times, with objects being - // created in the Move VM in each Move call. In such - // case, we need to update TxContext value so that it - // reflects what happened each time we call into the - // Move VM (e.g. to account for the number of created - // objects). - if tx_context_kind == TxContextKind::Mutable { - let Some((_, ctx_bytes, _)) = result.mutable_reference_outputs.pop() else { - invariant_violation!("Missing TxContext in reference outputs"); - }; - let updated_ctx: TxContext = bcs::from_bytes(&ctx_bytes).map_err(|e| { - ExecutionError::invariant_violation(format!( - "Unable to deserialize TxContext bytes. {e}" - )) - })?; - context.tx_context.update_state(updated_ctx)?; - } - Ok(result) - } - - /// Deserializes a list of binary-encoded Move modules into `CompiledModule` - /// instances using the protocol's binary configuration. The function - /// ensures that the module list is not empty and converts any - /// deserialization errors into an `ExecutionError`. - #[allow(clippy::extra_unused_type_parameters)] - fn deserialize_modules( - context: &mut ExecutionContext<'_, '_, '_>, - module_bytes: &[Vec], - ) -> Result, ExecutionError> { - let binary_config = to_binary_config(context.protocol_config); - let modules = module_bytes - .iter() - .map(|b| { - CompiledModule::deserialize_with_config(b, &binary_config) - .map_err(|e| e.finish(Location::Undefined)) - }) - .collect::>>() - .map_err(|e| context.convert_vm_error(e))?; - - assert_invariant!( - !modules.is_empty(), - "input checker ensures package is not empty" - ); - - Ok(modules) - } - - /// Publishes a set of `CompiledModule` instances to the blockchain under - /// the specified package ID and verifies them using the Iota bytecode - /// verifier. The modules are serialized and published via the VM, - /// and the Iota verifier runs additional checks after the Move bytecode - /// verifier has passed. - fn publish_and_verify_modules( - context: &mut ExecutionContext<'_, '_, '_>, - package_id: ObjectID, - modules: &[CompiledModule], - ) -> Result<(), ExecutionError> { - // TODO(https://github.com/iotaledger/iota/issues/69): avoid this redundant serialization by exposing VM API that allows us to run the linker directly on `Vec` - let binary_version = context.protocol_config.move_binary_format_version(); - let new_module_bytes: Vec<_> = modules - .iter() - .map(|m| { - let mut bytes = Vec::new(); - let version = if binary_version > VERSION_6 { - m.version - } else { - VERSION_6 - }; - m.serialize_with_version(version, &mut bytes).unwrap(); - bytes - }) - .collect(); - context - .publish_module_bundle(new_module_bytes, AccountAddress::from(package_id)) - .map_err(|e| context.convert_vm_error(e))?; - - // run the Iota verifier - for module in modules { - // Run Iota bytecode verifier, which runs some additional checks that assume the - // Move bytecode verifier has passed. - iota_verifier::verifier::iota_verify_module_unmetered(module, &BTreeMap::new())?; - } - - Ok(()) - } - - /// Initializes the provided `CompiledModule` instances by searching for and - /// executing any functions named `INIT_FN_NAME`. For each module - /// containing an initialization function, the function is invoked - /// without arguments, and the result is checked to ensure no return values - /// are present. - fn init_modules( - context: &mut ExecutionContext<'_, '_, '_>, - argument_updates: &mut Mode::ArgumentUpdates, - modules: &[CompiledModule], - ) -> Result<(), ExecutionError> { - let modules_to_init = modules.iter().filter_map(|module| { - for fdef in &module.function_defs { - let fhandle = module.function_handle_at(fdef.function); - let fname = module.identifier_at(fhandle.name); - if fname == INIT_FN_NAME { - return Some(module.self_id()); - } - } - None - }); - - for module_id in modules_to_init { - let return_values = execute_move_call::( - context, - argument_updates, - &module_id, - INIT_FN_NAME, - vec![], - vec![], - // is_init - true, - )?; - - assert_invariant!( - return_values.is_empty(), - "init should not have return values" - ) - } - - Ok(()) - } - - /// ************************************************************************ - /// **** ********************* Move signatures - /// ************************************************************************ - /// **** ******************* - - /// Helper marking what function we are invoking - #[derive(PartialEq, Eq, Clone, Copy)] - enum FunctionKind { - PrivateEntry, - PublicEntry, - NonEntry, - Init, - } - - /// Used to remember type information about a type when resolving the - /// signature - enum ValueKind { - Object { type_: MoveObjectType }, - Raw(Type, AbilitySet), - } - - struct LoadedFunctionInfo { - /// The kind of the function, e.g. public or private or init - kind: FunctionKind, - /// The signature information of the function - signature: LoadedFunctionInstantiation, - /// Object or type information for the return values - return_value_kinds: Vec, - /// Definition index of the function - index: FunctionDefinitionIndex, - /// The length of the function used for setting error information, or 0 - /// if native - last_instr: CodeOffset, - } - - /// Checks that the function to be called is either - /// - an entry function - /// - a public function that does not return references - /// - module init (only internal usage) - fn check_visibility_and_signature( - context: &mut ExecutionContext<'_, '_, '_>, - module_id: &ModuleId, - function: &IdentStr, - type_arguments: &[Type], - from_init: bool, - ) -> Result { - if from_init { - let result = context.load_function(module_id, function, type_arguments); - assert_invariant!( - result.is_ok(), - "The modules init should be able to be loaded" - ); - } - let no_new_packages = vec![]; - let data_store = IotaDataStore::new(&context.linkage_view, &no_new_packages); - let module = context - .vm - .get_runtime() - .load_module(module_id, &data_store) - .map_err(|e| context.convert_vm_error(e))?; - let Some((index, fdef)) = module - .function_defs - .iter() - .enumerate() - .find(|(_index, fdef)| { - module.identifier_at(module.function_handle_at(fdef.function).name) == function - }) - else { - return Err(ExecutionError::new_with_source( - ExecutionErrorKind::FunctionNotFound, - format!( - "Could not resolve function '{}' in module {}", - function, &module_id, - ), - )); - }; - - // entry on init is banned, so ban invoking it - if !from_init && function == INIT_FN_NAME { - return Err(ExecutionError::new_with_source( - ExecutionErrorKind::NonEntryFunctionInvoked, - "Cannot call 'init'", - )); - } - - let last_instr: CodeOffset = fdef - .code - .as_ref() - .map(|code| code.code.len() - 1) - .unwrap_or(0) as CodeOffset; - let function_kind = match (fdef.visibility, fdef.is_entry) { - (Visibility::Private | Visibility::Friend, true) => FunctionKind::PrivateEntry, - (Visibility::Public, true) => FunctionKind::PublicEntry, - (Visibility::Public, false) => FunctionKind::NonEntry, - (Visibility::Private, false) if from_init => { - assert_invariant!( - function == INIT_FN_NAME, - "module init specified non-init function" - ); - FunctionKind::Init - } - (Visibility::Private | Visibility::Friend, false) - if Mode::allow_arbitrary_function_calls() => - { - FunctionKind::NonEntry - } - (Visibility::Private | Visibility::Friend, false) => { - return Err(ExecutionError::new_with_source( - ExecutionErrorKind::NonEntryFunctionInvoked, - "Can only call `entry` or `public` functions", - )); - } - }; - let signature = context - .load_function(module_id, function, type_arguments) - .map_err(|e| context.convert_vm_error(e))?; - let signature = - subst_signature(signature, type_arguments).map_err(|e| context.convert_vm_error(e))?; - let return_value_kinds = match function_kind { - FunctionKind::Init => { - assert_invariant!( - signature.return_.is_empty(), - "init functions must have no return values" - ); - vec![] - } - FunctionKind::PrivateEntry | FunctionKind::PublicEntry | FunctionKind::NonEntry => { - check_non_entry_signature::(context, module_id, function, &signature)? - } - }; - check_private_generics(context, module_id, function, type_arguments)?; - Ok(LoadedFunctionInfo { - kind: function_kind, - signature, - return_value_kinds, - index: FunctionDefinitionIndex(index as u16), - last_instr, - }) - } - - /// substitutes the type arguments into the parameter and return types - fn subst_signature( - signature: LoadedFunctionInstantiation, - type_arguments: &[Type], - ) -> VMResult { - let LoadedFunctionInstantiation { - parameters, - return_, - } = signature; - let parameters = parameters - .into_iter() - .map(|ty| ty.subst(type_arguments)) - .collect::>>() - .map_err(|err| err.finish(Location::Undefined))?; - let return_ = return_ - .into_iter() - .map(|ty| ty.subst(type_arguments)) - .collect::>>() - .map_err(|err| err.finish(Location::Undefined))?; - Ok(LoadedFunctionInstantiation { - parameters, - return_, - }) - } - - /// Checks that the non-entry function does not return references. And marks - /// the return values as object or non-object return values - fn check_non_entry_signature( - context: &mut ExecutionContext<'_, '_, '_>, - _module_id: &ModuleId, - _function: &IdentStr, - signature: &LoadedFunctionInstantiation, - ) -> Result, ExecutionError> { - signature - .return_ - .iter() - .enumerate() - .map(|(idx, return_type)| { - let return_type = match return_type { - // for dev-inspect, just dereference the value - Type::Reference(inner) | Type::MutableReference(inner) - if Mode::allow_arbitrary_values() => - { - inner - } - Type::Reference(_) | Type::MutableReference(_) => { - return Err(ExecutionError::from_kind( - ExecutionErrorKind::InvalidPublicFunctionReturnType { idx: idx as u16 }, - )); - } - t => t, - }; - let abilities = context - .vm - .get_runtime() - .get_type_abilities(return_type) - .map_err(|e| context.convert_vm_error(e))?; - Ok(match return_type { - Type::MutableReference(_) | Type::Reference(_) => unreachable!(), - Type::TyParam(_) => { - invariant_violation!("TyParam should have been substituted") - } - Type::Datatype(_) | Type::DatatypeInstantiation(_) if abilities.has_key() => { - let type_tag = context - .vm - .get_runtime() - .get_type_tag(return_type) - .map_err(|e| context.convert_vm_error(e))?; - let TypeTag::Struct(struct_tag) = type_tag else { - invariant_violation!("Struct type make a non struct type tag") - }; - ValueKind::Object { - type_: MoveObjectType::from(*struct_tag), - } - } - Type::Datatype(_) - | Type::DatatypeInstantiation(_) - | Type::Bool - | Type::U8 - | Type::U64 - | Type::U128 - | Type::Address - | Type::Signer - | Type::Vector(_) - | Type::U16 - | Type::U32 - | Type::U256 => ValueKind::Raw(return_type.clone(), abilities), - }) - }) - .collect() - } - - /// Verifies that certain private functions in the Iota framework are not - /// directly invoked. This function checks if the module and function - /// being called belong to restricted areas, such as the `iota::event` - /// or `iota::transfer` modules. - fn check_private_generics( - _context: &mut ExecutionContext, - module_id: &ModuleId, - function: &IdentStr, - _type_arguments: &[Type], - ) -> Result<(), ExecutionError> { - let module_ident = (module_id.address(), module_id.name()); - if module_ident == (&IOTA_FRAMEWORK_ADDRESS, EVENT_MODULE) { - return Err(ExecutionError::new_with_source( - ExecutionErrorKind::NonEntryFunctionInvoked, - format!("Cannot directly call functions in iota::{}", EVENT_MODULE), - )); - } - - if module_ident == (&IOTA_FRAMEWORK_ADDRESS, TRANSFER_MODULE) - && PRIVATE_TRANSFER_FUNCTIONS.contains(&function) - { - let msg = format!( - "Cannot directly call iota::{m}::{f}. \ - Use the public variant instead, iota::{m}::public_{f}", - m = TRANSFER_MODULE, - f = function - ); - return Err(ExecutionError::new_with_source( - ExecutionErrorKind::NonEntryFunctionInvoked, - msg, - )); - } - - Ok(()) - } - - type ArgInfo = ( - TxContextKind, - // mut ref - Vec<(LocalIndex, ValueKind)>, - Vec>, - ); - - /// Serializes the arguments into BCS values for Move. Performs the - /// necessary type checking for each value - fn build_move_args( - context: &mut ExecutionContext<'_, '_, '_>, - module_id: &ModuleId, - function: &IdentStr, - function_kind: FunctionKind, - signature: &LoadedFunctionInstantiation, - args: &[Argument], - ) -> Result { - // check the arity - let parameters = &signature.parameters; - let tx_ctx_kind = match parameters.last() { - Some(t) => is_tx_context(context, t)?, - None => TxContextKind::None, - }; - // an init function can have one or two arguments, with the last one always - // being of type &mut TxContext and the additional (first) one - // representing a one time witness type (see one_time_witness verifier - // pass for additional explanation) - let has_one_time_witness = function_kind == FunctionKind::Init && parameters.len() == 2; - let has_tx_context = tx_ctx_kind != TxContextKind::None; - let num_args = args.len() + (has_one_time_witness as usize) + (has_tx_context as usize); - if num_args != parameters.len() { - return Err(ExecutionError::new_with_source( - ExecutionErrorKind::ArityMismatch, - format!( - "Expected {:?} argument{} calling function '{}', but found {:?}", - parameters.len(), - if parameters.len() == 1 { "" } else { "s" }, - function, - num_args - ), - )); - } - - // check the types and remember which are by mutable ref - let mut by_mut_ref = vec![]; - let mut serialized_args = Vec::with_capacity(num_args); - let command_kind = CommandKind::MoveCall { - package: (*module_id.address()).into(), - module: module_id.name(), - function, - }; - // an init function can have one or two arguments, with the last one always - // being of type &mut TxContext and the additional (first) one - // representing a one time witness type (see one_time_witness verifier - // pass for additional explanation) - if has_one_time_witness { - // one time witness type is a struct with a single bool filed which in bcs is - // encoded as 0x01 - let bcs_true_value = bcs::to_bytes(&true).unwrap(); - serialized_args.push(bcs_true_value) - } - for ((idx, arg), param_ty) in args.iter().copied().enumerate().zip(parameters) { - let (value, non_ref_param_ty): (Value, &Type) = match param_ty { - Type::MutableReference(inner) => { - let value = context.borrow_arg_mut(idx, arg)?; - let object_info = if let Value::Object(ObjectValue { type_, .. }) = &value { - let type_tag = context - .vm - .get_runtime() - .get_type_tag(type_) - .map_err(|e| context.convert_vm_error(e))?; - let TypeTag::Struct(struct_tag) = type_tag else { - invariant_violation!("Struct type make a non struct type tag") - }; - let type_ = (*struct_tag).into(); - ValueKind::Object { type_ } - } else { - let abilities = context - .vm - .get_runtime() - .get_type_abilities(inner) - .map_err(|e| context.convert_vm_error(e))?; - ValueKind::Raw((**inner).clone(), abilities) - }; - by_mut_ref.push((idx as LocalIndex, object_info)); - (value, inner) - } - Type::Reference(inner) => (context.borrow_arg(idx, arg, param_ty)?, inner), - t => { - let value = context.by_value_arg(command_kind, idx, arg)?; - (value, t) - } - }; - if matches!( - function_kind, - FunctionKind::PrivateEntry | FunctionKind::Init - ) && value.was_used_in_non_entry_move_call() - { - return Err(command_argument_error( - CommandArgumentError::InvalidArgumentToPrivateEntryFunction, - idx, - )); - } - check_param_type::(context, idx, &value, non_ref_param_ty)?; - let bytes = { - let mut v = vec![]; - value.write_bcs_bytes(&mut v); - v - }; - serialized_args.push(bytes); - } - Ok((tx_ctx_kind, by_mut_ref, serialized_args)) - } - - /// checks that the value is compatible with the specified type - fn check_param_type( - context: &mut ExecutionContext<'_, '_, '_>, - idx: usize, - value: &Value, - param_ty: &Type, - ) -> Result<(), ExecutionError> { - match value { - // For dev-spect, allow any BCS bytes. This does mean internal invariants for types can - // be violated (like for string or Option) - Value::Raw(RawValueType::Any, _) if Mode::allow_arbitrary_values() => return Ok(()), - // Any means this was just some bytes passed in as an argument (as opposed to being - // generated from a Move function). Meaning we only allow "primitive" values - // and might need to run validation in addition to the BCS layout - Value::Raw(RawValueType::Any, bytes) => { - let Some(layout) = primitive_serialization_layout(context, param_ty)? else { - let msg = format!( - "Non-primitive argument at index {}. If it is an object, it must be \ - populated by an object", - idx, - ); - return Err(ExecutionError::new_with_source( - ExecutionErrorKind::command_argument_error( - CommandArgumentError::InvalidUsageOfPureArg, - idx as u16, - ), - msg, - )); - }; - bcs_argument_validate(bytes, idx as u16, layout)?; - return Ok(()); - } - Value::Raw(RawValueType::Loaded { ty, abilities, .. }, _) => { - assert_invariant!( - Mode::allow_arbitrary_values() || !abilities.has_key(), - "Raw value should never be an object" - ); - if ty != param_ty { - return Err(command_argument_error( - CommandArgumentError::TypeMismatch, - idx, - )); - } - } - Value::Object(obj) => { - let ty = &obj.type_; - if ty != param_ty { - return Err(command_argument_error( - CommandArgumentError::TypeMismatch, - idx, - )); - } - } - Value::Receiving(_, _, assigned_type) => { - // If the type has been fixed, make sure the types match up - if let Some(assigned_type) = assigned_type { - if assigned_type != param_ty { - return Err(command_argument_error( - CommandArgumentError::TypeMismatch, - idx, - )); - } - } - - // Now make sure the param type is a struct instantiation of the receiving - // struct - let Type::DatatypeInstantiation(inst) = param_ty else { - return Err(command_argument_error( - CommandArgumentError::TypeMismatch, - idx, - )); - }; - let (sidx, targs) = &**inst; - let Some(s) = context.vm.get_runtime().get_type(*sidx) else { - invariant_violation!("iota::transfer::Receiving struct not found in session") - }; - let resolved_struct = get_datatype_ident(&s); - - if resolved_struct != RESOLVED_RECEIVING_STRUCT || targs.len() != 1 { - return Err(command_argument_error( - CommandArgumentError::TypeMismatch, - idx, - )); - } - } - } - Ok(()) - } - - fn get_datatype_ident(s: &CachedDatatype) -> (&AccountAddress, &IdentStr, &IdentStr) { - let module_id = &s.defining_id; - let struct_name = &s.name; - ( - module_id.address(), - module_id.name(), - struct_name.as_ident_str(), - ) - } - - // Returns Some(kind) if the type is a reference to the TxnContext. kind being - // Mutable with a MutableReference, and Immutable otherwise. - // Returns None for all other types - pub fn is_tx_context( - context: &mut ExecutionContext<'_, '_, '_>, - t: &Type, - ) -> Result { - let (is_mut, inner) = match t { - Type::MutableReference(inner) => (true, inner), - Type::Reference(inner) => (false, inner), - _ => return Ok(TxContextKind::None), - }; - let Type::Datatype(idx) = &**inner else { - return Ok(TxContextKind::None); - }; - let Some(s) = context.vm.get_runtime().get_type(*idx) else { - invariant_violation!("Loaded struct not found") - }; - let (module_addr, module_name, struct_name) = get_datatype_ident(&s); - let is_tx_context_type = module_addr == &IOTA_FRAMEWORK_ADDRESS - && module_name == TX_CONTEXT_MODULE_NAME - && struct_name == TX_CONTEXT_STRUCT_NAME; - Ok(if is_tx_context_type { - if is_mut { - TxContextKind::Mutable - } else { - TxContextKind::Immutable - } - } else { - TxContextKind::None - }) - } - - /// Returns Some(layout) iff it is a primitive, an ID, a String, or an - /// option/vector of a valid type - fn primitive_serialization_layout( - context: &mut ExecutionContext<'_, '_, '_>, - param_ty: &Type, - ) -> Result, ExecutionError> { - Ok(match param_ty { - Type::Signer => return Ok(None), - Type::Reference(_) | Type::MutableReference(_) | Type::TyParam(_) => { - invariant_violation!("references and type parameters should be checked elsewhere") - } - Type::Bool => Some(PrimitiveArgumentLayout::Bool), - Type::U8 => Some(PrimitiveArgumentLayout::U8), - Type::U16 => Some(PrimitiveArgumentLayout::U16), - Type::U32 => Some(PrimitiveArgumentLayout::U32), - Type::U64 => Some(PrimitiveArgumentLayout::U64), - Type::U128 => Some(PrimitiveArgumentLayout::U128), - Type::U256 => Some(PrimitiveArgumentLayout::U256), - Type::Address => Some(PrimitiveArgumentLayout::Address), - - Type::Vector(inner) => { - let info_opt = primitive_serialization_layout(context, inner)?; - info_opt.map(|layout| PrimitiveArgumentLayout::Vector(Box::new(layout))) - } - Type::DatatypeInstantiation(inst) => { - let (idx, targs) = &**inst; - let Some(s) = context.vm.get_runtime().get_type(*idx) else { - invariant_violation!("Loaded struct not found") - }; - let resolved_struct = get_datatype_ident(&s); - // is option of a string - if resolved_struct == RESOLVED_STD_OPTION && targs.len() == 1 { - let info_opt = primitive_serialization_layout(context, &targs[0])?; - info_opt.map(|layout| PrimitiveArgumentLayout::Option(Box::new(layout))) - } else { - None - } - } - Type::Datatype(idx) => { - let Some(s) = context.vm.get_runtime().get_type(*idx) else { - invariant_violation!("Loaded struct not found") - }; - let resolved_struct = get_datatype_ident(&s); - if resolved_struct == RESOLVED_IOTA_ID { - Some(PrimitiveArgumentLayout::Address) - } else if resolved_struct == RESOLVED_ASCII_STR { - Some(PrimitiveArgumentLayout::Ascii) - } else if resolved_struct == RESOLVED_UTF8_STR { - Some(PrimitiveArgumentLayout::UTF8) - } else { - None - } - } - }) - } - - /// ************************************************************************ - /// **** ********************* Special serialization formats - /// ************************************************************************ - /// **** ******************* - - /// Special enum for values that need additional validation, in other words - /// There is validation to do on top of the BCS layout. Currently only - /// needed for strings - #[derive(Debug)] - pub enum PrimitiveArgumentLayout { - /// An option - Option(Box), - /// A vector - Vector(Box), - /// An ASCII encoded string - Ascii, - /// A UTF8 encoded string - UTF8, - // needed for Option validation - Bool, - U8, - U16, - U32, - U64, - U128, - U256, - Address, - } - - impl PrimitiveArgumentLayout { - /// returns true iff all BCS compatible bytes are actually values for - /// this type. For example, this function returns false for - /// Option and Strings since they need additional validation. - pub fn bcs_only(&self) -> bool { - match self { - // have additional restrictions past BCS - PrimitiveArgumentLayout::Option(_) - | PrimitiveArgumentLayout::Ascii - | PrimitiveArgumentLayout::UTF8 => false, - // Move primitives are BCS compatible and do not need additional validation - PrimitiveArgumentLayout::Bool - | PrimitiveArgumentLayout::U8 - | PrimitiveArgumentLayout::U16 - | PrimitiveArgumentLayout::U32 - | PrimitiveArgumentLayout::U64 - | PrimitiveArgumentLayout::U128 - | PrimitiveArgumentLayout::U256 - | PrimitiveArgumentLayout::Address => true, - // vector only needs validation if it's inner type does - PrimitiveArgumentLayout::Vector(inner) => inner.bcs_only(), - } - } - } - - /// Checks the bytes against the `SpecialArgumentLayout` using `bcs`. It - /// does not actually generate the deserialized value, only walks the - /// bytes. While not necessary if the layout does not contain - /// special arguments (e.g. Option or String) we check the BCS bytes for - /// predictability - pub fn bcs_argument_validate( - bytes: &[u8], - idx: u16, - layout: PrimitiveArgumentLayout, - ) -> Result<(), ExecutionError> { - bcs::from_bytes_seed(&layout, bytes).map_err(|_| { - ExecutionError::new_with_source( - ExecutionErrorKind::command_argument_error( - CommandArgumentError::InvalidBCSBytes, - idx, - ), - format!("Function expects {layout} but provided argument's value does not match",), - ) - }) - } - - impl<'d> serde::de::DeserializeSeed<'d> for &PrimitiveArgumentLayout { - type Value = (); - fn deserialize>( - self, - deserializer: D, - ) -> Result { - use serde::de::Error; - match self { - PrimitiveArgumentLayout::Ascii => { - let s: &str = serde::Deserialize::deserialize(deserializer)?; - if !s.is_ascii() { - Err(D::Error::custom("not an ascii string")) - } else { - Ok(()) - } - } - PrimitiveArgumentLayout::UTF8 => { - deserializer.deserialize_string(serde::de::IgnoredAny)?; - Ok(()) - } - PrimitiveArgumentLayout::Option(layout) => { - deserializer.deserialize_option(OptionElementVisitor(layout)) - } - PrimitiveArgumentLayout::Vector(layout) => { - deserializer.deserialize_seq(VectorElementVisitor(layout)) - } - // primitive move value cases, which are hit to make sure the correct number of - // bytes are removed for elements of an option/vector - PrimitiveArgumentLayout::Bool => { - deserializer.deserialize_bool(serde::de::IgnoredAny)?; - Ok(()) - } - PrimitiveArgumentLayout::U8 => { - deserializer.deserialize_u8(serde::de::IgnoredAny)?; - Ok(()) - } - PrimitiveArgumentLayout::U16 => { - deserializer.deserialize_u16(serde::de::IgnoredAny)?; - Ok(()) - } - PrimitiveArgumentLayout::U32 => { - deserializer.deserialize_u32(serde::de::IgnoredAny)?; - Ok(()) - } - PrimitiveArgumentLayout::U64 => { - deserializer.deserialize_u64(serde::de::IgnoredAny)?; - Ok(()) - } - PrimitiveArgumentLayout::U128 => { - deserializer.deserialize_u128(serde::de::IgnoredAny)?; - Ok(()) - } - PrimitiveArgumentLayout::U256 => { - U256::deserialize(deserializer)?; - Ok(()) - } - PrimitiveArgumentLayout::Address => { - IotaAddress::deserialize(deserializer)?; - Ok(()) - } - } - } - } - - struct VectorElementVisitor<'a>(&'a PrimitiveArgumentLayout); - - impl<'d, 'a> serde::de::Visitor<'d> for VectorElementVisitor<'a> { - type Value = (); - - fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { - formatter.write_str("Vector") - } - - fn visit_seq(self, mut seq: A) -> Result - where - A: serde::de::SeqAccess<'d>, - { - while seq.next_element_seed(self.0)?.is_some() {} - Ok(()) - } - } - - struct OptionElementVisitor<'a>(&'a PrimitiveArgumentLayout); - - impl<'d, 'a> serde::de::Visitor<'d> for OptionElementVisitor<'a> { - type Value = (); - - fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { - formatter.write_str("Option") - } - - fn visit_none(self) -> Result - where - E: serde::de::Error, - { - Ok(()) - } - - fn visit_some(self, deserializer: D) -> Result - where - D: serde::Deserializer<'d>, - { - self.0.deserialize(deserializer) - } - } - - impl fmt::Display for PrimitiveArgumentLayout { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { - PrimitiveArgumentLayout::Vector(inner) => { - write!(f, "vector<{inner}>") - } - PrimitiveArgumentLayout::Option(inner) => { - write!(f, "std::option::Option<{inner}>") - } - PrimitiveArgumentLayout::Ascii => { - write!(f, "std::{}::{}", RESOLVED_ASCII_STR.1, RESOLVED_ASCII_STR.2) - } - PrimitiveArgumentLayout::UTF8 => { - write!(f, "std::{}::{}", RESOLVED_UTF8_STR.1, RESOLVED_UTF8_STR.2) - } - PrimitiveArgumentLayout::Bool => write!(f, "bool"), - PrimitiveArgumentLayout::U8 => write!(f, "u8"), - PrimitiveArgumentLayout::U16 => write!(f, "u16"), - PrimitiveArgumentLayout::U32 => write!(f, "u32"), - PrimitiveArgumentLayout::U64 => write!(f, "u64"), - PrimitiveArgumentLayout::U128 => write!(f, "u128"), - PrimitiveArgumentLayout::U256 => write!(f, "u256"), - PrimitiveArgumentLayout::Address => write!(f, "address"), - } - } - } -} diff --git a/iota-execution/v0/iota-adapter/src/programmable_transactions/linkage_view.rs b/iota-execution/v0/iota-adapter/src/programmable_transactions/linkage_view.rs deleted file mode 100644 index 40a0270c3fe..00000000000 --- a/iota-execution/v0/iota-adapter/src/programmable_transactions/linkage_view.rs +++ /dev/null @@ -1,352 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::{ - cell::RefCell, - collections::{BTreeMap, HashMap, HashSet, hash_map::Entry}, - str::FromStr, -}; - -use iota_types::{ - base_types::ObjectID, - error::{ExecutionError, IotaError, IotaResult}, - move_package::{MovePackage, TypeOrigin, UpgradeInfo}, - storage::{BackingPackageStore, PackageObject, get_module}, -}; -use move_core_types::{ - account_address::AccountAddress, - identifier::{IdentStr, Identifier}, - language_storage::{ModuleId, StructTag}, - resolver::{LinkageResolver, ModuleResolver, ResourceResolver}, -}; - -use crate::execution_value::IotaResolver; - -/// Exposes module and linkage resolution to the Move runtime. The first by -/// delegating to `resolver` and the second via linkage information that is -/// loaded from a move package. -pub struct LinkageView<'state> { - /// Interface to resolve packages, modules and resources directly from the - /// store. - resolver: Box, - /// Information used to change module and type identities during linkage. - linkage_info: Option, - /// Cache containing the type origin information from every package that has - /// been set as the link context, and every other type that has been - /// requested by the loader in this session. It's okay to retain entries - /// in this cache between different link contexts because a type's - /// Runtime ID and Defining ID are invariant between across link contexts. - /// - /// Cache is keyed first by the Runtime ID of the type's module, and then - /// the type's identifier. The value is the ObjectID/Address of the - /// package that introduced the type. - type_origin_cache: RefCell>>, - /// Cache of past package addresses that have been the link context -- if a - /// package is in this set, then we will not try to load its type origin - /// table when setting it as a context (again). - past_contexts: RefCell>, -} - -#[derive(Debug)] -pub struct LinkageInfo { - storage_id: AccountAddress, - runtime_id: AccountAddress, - link_table: BTreeMap, -} - -pub struct SavedLinkage(LinkageInfo); - -impl<'state> LinkageView<'state> { - /// Creates a new `LinkageView` instance with the provided `IotaResolver`. - /// This instance is responsible for resolving and linking types across - /// different contexts. It initializes internal caches for type origins - /// and past contexts. - pub fn new(resolver: Box) -> Self { - Self { - resolver, - linkage_info: None, - type_origin_cache: RefCell::new(HashMap::new()), - past_contexts: RefCell::new(HashSet::new()), - } - } - - /// Reset the `LinkageInfo`. - pub fn reset_linkage(&mut self) { - self.linkage_info = None; - } - - /// Indicates whether this `LinkageView` has had its context set to match - /// the linkage in `context`. - pub fn has_linkage(&self, context: ObjectID) -> bool { - self.linkage_info - .as_ref() - .is_some_and(|l| l.storage_id == *context) - } - - /// Reset the linkage, but save the context that existed before, if there - /// was one. - pub fn steal_linkage(&mut self) -> Option { - Some(SavedLinkage(self.linkage_info.take()?)) - } - - /// Restore a previously saved linkage context. Fails if there is already a - /// context set. - pub fn restore_linkage(&mut self, saved: Option) -> Result<(), ExecutionError> { - let Some(SavedLinkage(saved)) = saved else { - return Ok(()); - }; - - if let Some(existing) = &self.linkage_info { - invariant_violation!( - "Attempt to overwrite linkage by restoring: {saved:#?} \ - Existing linkage: {existing:#?}", - ) - } - - // No need to populate type origin cache, because a saved context must have been - // set as a linkage before, and the cache would have been populated at - // that time. - self.linkage_info = Some(saved); - Ok(()) - } - - /// Set the linkage context to the information based on the linkage and type - /// origin tables from the `context` package. Returns the original - /// package ID (aka the runtime ID) of the context package on success. - pub fn set_linkage(&mut self, context: &MovePackage) -> Result { - if let Some(existing) = &self.linkage_info { - invariant_violation!( - "Attempt to overwrite linkage info with context from {}. \ - Existing linkage: {existing:#?}", - context.id(), - ) - } - - let linkage = LinkageInfo::from(context); - let storage_id = context.id(); - let runtime_id = linkage.runtime_id; - self.linkage_info = Some(linkage); - - if !self.past_contexts.borrow_mut().insert(storage_id) { - return Ok(runtime_id); - } - - // Pre-populate the type origin cache with entries from the current package -- - // this is necessary to serve "defining module" requests for unpublished - // packages, but will also speed up other requests. - for TypeOrigin { - module_name, - datatype_name: struct_name, - package: defining_id, - } in context.type_origin_table() - { - let Ok(module_name) = Identifier::from_str(module_name) else { - invariant_violation!("Module name isn't an identifier: {module_name}"); - }; - - let Ok(struct_name) = Identifier::from_str(struct_name) else { - invariant_violation!("Struct name isn't an identifier: {struct_name}"); - }; - - let runtime_id = ModuleId::new(runtime_id, module_name); - self.add_type_origin(runtime_id, struct_name, *defining_id)?; - } - - Ok(runtime_id) - } - - /// Retrieves the original package ID (as an `AccountAddress`) from the - /// linkage information, if available. - pub fn original_package_id(&self) -> Option { - Some(self.linkage_info.as_ref()?.runtime_id) - } - - /// Retrieves the cached type origin for the given `ModuleId` and struct - /// identifier (`IdentStr`). This method uses the internal - /// `type_origin_cache` to provide fast lookups for previously resolved - /// types. - fn get_cached_type_origin( - &self, - runtime_id: &ModuleId, - struct_: &IdentStr, - ) -> Option { - self.type_origin_cache - .borrow() - .get(runtime_id)? - .get(struct_) - .cloned() - } - - /// Adds a type origin to the cache, associating the given `ModuleId` and - /// struct identifier (`Identifier`) with the provided defining `ObjectID`. - fn add_type_origin( - &self, - runtime_id: ModuleId, - struct_: Identifier, - defining_id: ObjectID, - ) -> Result<(), ExecutionError> { - let mut cache = self.type_origin_cache.borrow_mut(); - let module_cache = cache.entry(runtime_id.clone()).or_default(); - - match module_cache.entry(struct_) { - Entry::Vacant(entry) => { - entry.insert(*defining_id); - } - - Entry::Occupied(entry) => { - if entry.get() != &*defining_id { - invariant_violation!( - "Conflicting defining ID for {}::{}: {} and {}", - runtime_id, - entry.key(), - defining_id, - entry.get(), - ); - } - } - } - - Ok(()) - } - - /// Retrieves the current link context's storage ID as an `AccountAddress`. - pub(crate) fn link_context(&self) -> AccountAddress { - self.linkage_info - .as_ref() - .map_or(AccountAddress::ZERO, |l| l.storage_id) - } - - /// Relocates a given `ModuleId` based on the current linkage context. - pub(crate) fn relocate(&self, module_id: &ModuleId) -> Result { - let Some(linkage) = &self.linkage_info else { - invariant_violation!("No linkage context set while relocating {module_id}.") - }; - - // The request is to relocate a module in the package that the link context is - // from. This entry will not be stored in the linkage table, so must be - // handled specially. - if module_id.address() == &linkage.runtime_id { - return Ok(ModuleId::new( - linkage.storage_id, - module_id.name().to_owned(), - )); - } - - let runtime_id = ObjectID::from_address(*module_id.address()); - let Some(upgrade) = linkage.link_table.get(&runtime_id) else { - invariant_violation!( - "Missing linkage for {runtime_id} in context {}, runtime_id is {}", - linkage.storage_id, - linkage.runtime_id - ); - }; - - Ok(ModuleId::new( - upgrade.upgraded_id.into(), - module_id.name().to_owned(), - )) - } - - /// Determines the defining module for a given struct within a `ModuleId`. - /// The function first checks the cached type origin and returns the - /// corresponding `ModuleId` if found. If not, it relocates the - /// module and queries the type origin table from the associated package. If - /// the defining module is found, it caches the result and returns the - /// `ModuleId`. - pub(crate) fn defining_module( - &self, - runtime_id: &ModuleId, - struct_: &IdentStr, - ) -> Result { - if self.linkage_info.is_none() { - invariant_violation!( - "No linkage context set for defining module query on {runtime_id}::{struct_}." - ) - } - - if let Some(cached) = self.get_cached_type_origin(runtime_id, struct_) { - return Ok(ModuleId::new(cached, runtime_id.name().to_owned())); - } - - let storage_id = ObjectID::from(*self.relocate(runtime_id)?.address()); - let Some(package) = self.resolver.get_package_object(&storage_id)? else { - invariant_violation!("Missing dependent package in store: {storage_id}",) - }; - - for TypeOrigin { - module_name, - datatype_name: struct_name, - package, - } in package.move_package().type_origin_table() - { - if module_name == runtime_id.name().as_str() && struct_name == struct_.as_str() { - self.add_type_origin(runtime_id.clone(), struct_.to_owned(), *package)?; - return Ok(ModuleId::new(**package, runtime_id.name().to_owned())); - } - } - - invariant_violation!( - "{runtime_id}::{struct_} not found in type origin table in {storage_id} (v{})", - package.move_package().version(), - ) - } -} - -impl From<&MovePackage> for LinkageInfo { - fn from(package: &MovePackage) -> Self { - Self { - storage_id: package.id().into(), - runtime_id: package.original_package_id().into(), - link_table: package.linkage_table().clone(), - } - } -} - -impl<'state> LinkageResolver for LinkageView<'state> { - type Error = IotaError; - - fn link_context(&self) -> AccountAddress { - LinkageView::link_context(self) - } - - fn relocate(&self, module_id: &ModuleId) -> Result { - LinkageView::relocate(self, module_id) - } - - fn defining_module( - &self, - runtime_id: &ModuleId, - struct_: &IdentStr, - ) -> Result { - LinkageView::defining_module(self, runtime_id, struct_) - } -} - -/// Remaining implementations delegated to state_view ************************ - -impl<'state> ResourceResolver for LinkageView<'state> { - type Error = IotaError; - - fn get_resource( - &self, - address: &AccountAddress, - typ: &StructTag, - ) -> Result>, Self::Error> { - self.resolver.get_resource(address, typ) - } -} - -impl<'state> ModuleResolver for LinkageView<'state> { - type Error = IotaError; - - fn get_module(&self, id: &ModuleId) -> Result>, Self::Error> { - get_module(self, id) - } -} - -impl<'state> BackingPackageStore for LinkageView<'state> { - fn get_package_object(&self, package_id: &ObjectID) -> IotaResult> { - self.resolver.get_package_object(package_id) - } -} diff --git a/iota-execution/v0/iota-adapter/src/programmable_transactions/mod.rs b/iota-execution/v0/iota-adapter/src/programmable_transactions/mod.rs deleted file mode 100644 index 19383c20167..00000000000 --- a/iota-execution/v0/iota-adapter/src/programmable_transactions/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -pub mod context; -pub mod execution; -pub mod linkage_view; diff --git a/iota-execution/v0/iota-adapter/src/temporary_store.rs b/iota-execution/v0/iota-adapter/src/temporary_store.rs deleted file mode 100644 index 10f5a7304f5..00000000000 --- a/iota-execution/v0/iota-adapter/src/temporary_store.rs +++ /dev/null @@ -1,1141 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::collections::{BTreeMap, BTreeSet, HashSet}; - -use iota_metrics::monitored_scope; -use iota_protocol_config::ProtocolConfig; -use iota_types::{ - IOTA_DENY_LIST_OBJECT_ID, IOTA_SYSTEM_STATE_OBJECT_ID, - base_types::{ - IotaAddress, ObjectID, ObjectRef, SequenceNumber, TransactionDigest, VersionDigest, - }, - committee::EpochId, - deny_list_v1::check_coin_deny_list_v1_during_execution, - effects::{EffectsObjectChange, TransactionEffects, TransactionEvents}, - error::{ExecutionError, IotaError, IotaResult}, - execution::{ - DynamicallyLoadedObjectMetadata, ExecutionResults, ExecutionResultsV1, SharedInput, - }, - execution_config_utils::to_binary_config, - execution_status::ExecutionStatus, - fp_bail, - gas::GasCostSummary, - inner_temporary_store::InnerTemporaryStore, - iota_system_state::{AdvanceEpochParams, get_iota_system_state_wrapper}, - is_system_package, - layout_resolver::LayoutResolver, - object::{Data, Object, Owner}, - storage::{ - BackingPackageStore, BackingStore, ChildObjectResolver, DenyListResult, PackageObject, - Storage, - }, - transaction::InputObjects, -}; -use move_core_types::{ - account_address::AccountAddress, language_storage::StructTag, resolver::ResourceResolver, -}; -use parking_lot::RwLock; - -use crate::gas_charger::GasCharger; - -pub struct TemporaryStore<'backing> { - // The backing store for retrieving Move packages onchain. - // When executing a Move call, the dependent packages are not going to be - // in the input objects. They will be fetched from the backing store. - // Also used for fetching the backing parent_sync to get the last known version for wrapped - // objects - store: &'backing dyn BackingStore, - tx_digest: TransactionDigest, - input_objects: BTreeMap, - /// The version to assign to all objects written by the transaction using - /// this store. - lamport_timestamp: SequenceNumber, - mutable_input_refs: BTreeMap, // Inputs that are mutable - execution_results: ExecutionResultsV1, - /// Objects that were loaded during execution (dynamic fields + received - /// objects). - loaded_runtime_objects: BTreeMap, - /// A map from wrapped object to its container. Used during expensive - /// invariant checks. - wrapped_object_containers: BTreeMap, - protocol_config: &'backing ProtocolConfig, - - /// Every package that was loaded from DB store during execution. - /// These packages were not previously loaded into the temporary store. - runtime_packages_loaded_from_db: RwLock>, - - /// The set of objects that we may receive during execution. Not guaranteed - /// to receive all, or any of the objects referenced in this set. - receiving_objects: Vec, - - // TODO: Now that we track epoch here, there are a few places we don't need to pass it around. - /// The current epoch. - cur_epoch: EpochId, - - /// The set of per-epoch config objects that were loaded during execution, - /// and are not in the input objects. This allows us to commit them to - /// the effects. - loaded_per_epoch_config_objects: RwLock>, -} - -impl<'backing> TemporaryStore<'backing> { - /// Creates a new store associated with an authority store, and populates it - /// with initial objects. - pub fn new( - store: &'backing dyn BackingStore, - input_objects: InputObjects, - receiving_objects: Vec, - tx_digest: TransactionDigest, - protocol_config: &'backing ProtocolConfig, - cur_epoch: EpochId, - ) -> Self { - let mutable_input_refs = input_objects.mutable_inputs(); - let lamport_timestamp = input_objects.lamport_timestamp(&receiving_objects); - let objects = input_objects.into_object_map(); - #[cfg(debug_assertions)] - { - // Ensure that input objects and receiving objects must not overlap. - assert!( - objects - .keys() - .collect::>() - .intersection( - &receiving_objects - .iter() - .map(|oref| &oref.0) - .collect::>() - ) - .next() - .is_none() - ); - } - Self { - store, - tx_digest, - input_objects: objects, - lamport_timestamp, - mutable_input_refs, - execution_results: ExecutionResultsV1::default(), - protocol_config, - loaded_runtime_objects: BTreeMap::new(), - wrapped_object_containers: BTreeMap::new(), - runtime_packages_loaded_from_db: RwLock::new(BTreeMap::new()), - receiving_objects, - cur_epoch, - loaded_per_epoch_config_objects: RwLock::new(BTreeSet::new()), - } - } - - // Helpers to access private fields - pub fn objects(&self) -> &BTreeMap { - &self.input_objects - } - - pub fn update_object_version_and_prev_tx(&mut self) { - self.execution_results.update_version_and_previous_tx( - self.lamport_timestamp, - self.tx_digest, - &self.input_objects, - ); - - #[cfg(debug_assertions)] - { - self.check_invariants(); - } - } - - /// Break up the structure and return its internal stores (objects, - /// active_inputs, written, deleted) - pub fn into_inner(self) -> InnerTemporaryStore { - let results = self.execution_results; - InnerTemporaryStore { - input_objects: self.input_objects, - mutable_inputs: self.mutable_input_refs, - written: results.written_objects, - events: TransactionEvents { - data: results.user_events, - }, - loaded_runtime_objects: self.loaded_runtime_objects, - runtime_packages_loaded_from_db: self.runtime_packages_loaded_from_db.into_inner(), - lamport_version: self.lamport_timestamp, - binary_config: to_binary_config(self.protocol_config), - } - } - - /// For every object from active_inputs (i.e. all mutable objects), if they - /// are not mutated during the transaction execution, force mutating - /// them by incrementing the sequence number. This is required to - /// achieve safety. - pub(crate) fn ensure_active_inputs_mutated(&mut self) { - let mut to_be_updated = vec![]; - for id in self.mutable_input_refs.keys() { - if !self.execution_results.modified_objects.contains(id) { - // We cannot update here but have to push to `to_be_updated` and update later - // because the for loop is holding a reference to `self`, and calling - // `self.mutate_input_object` requires a mutable reference to `self`. - to_be_updated.push(self.input_objects[id].clone()); - } - } - for object in to_be_updated { - // The object must be mutated as it was present in the input objects - self.mutate_input_object(object.clone()); - } - } - - fn get_object_changes(&self) -> BTreeMap { - let results = &self.execution_results; - let all_ids = results - .created_object_ids - .iter() - .chain(&results.deleted_object_ids) - .chain(&results.modified_objects) - .chain(results.written_objects.keys()) - .collect::>(); - all_ids - .into_iter() - .map(|id| { - ( - *id, - EffectsObjectChange::new( - self.get_object_modified_at(id) - .map(|metadata| ((metadata.version, metadata.digest), metadata.owner)), - results.written_objects.get(id), - results.created_object_ids.contains(id), - results.deleted_object_ids.contains(id), - ), - ) - }) - .collect() - } - - pub fn into_effects( - mut self, - shared_object_refs: Vec, - transaction_digest: &TransactionDigest, - mut transaction_dependencies: BTreeSet, - gas_cost_summary: GasCostSummary, - status: ExecutionStatus, - gas_charger: &mut GasCharger, - epoch: EpochId, - ) -> (InnerTemporaryStore, TransactionEffects) { - self.update_object_version_and_prev_tx(); - - // Regardless of execution status (including aborts), we insert the previous - // transaction for any successfully received objects during the - // transaction. - for (id, expected_version, expected_digest) in &self.receiving_objects { - // If the receiving object is in the loaded runtime objects, then that means - // that it was actually successfully loaded (so existed, and there - // was authenticated mutable access to it). So we insert the - // previous transaction as a dependency. - if let Some(obj_meta) = self.loaded_runtime_objects.get(id) { - // Check that the expected version, digest, and owner match the loaded version, - // digest, and owner. If they don't then don't register a dependency. - // This is because this could be "spoofed" by loading a dynamic object field. - let loaded_via_receive = obj_meta.version == *expected_version - && obj_meta.digest == *expected_digest - && obj_meta.owner.is_address_owned(); - if loaded_via_receive { - transaction_dependencies.insert(obj_meta.previous_transaction); - } - } - } - - // In the case of special transactions that don't require a gas object, - // we don't really care about the effects to gas, just use the input for it. - // Gas coins are guaranteed to be at least size 1 and if more than 1 - // the first coin is where all the others are merged. - let gas_coin = gas_charger.gas_coin(); - - let object_changes = self.get_object_changes(); - - let lamport_version = self.lamport_timestamp; - // TODO: Cleanup this clone. Potentially add unchanged_shraed_objects directly - // to InnerTempStore. - let loaded_per_epoch_config_objects = self.loaded_per_epoch_config_objects.read().clone(); - let inner = self.into_inner(); - - let effects = TransactionEffects::new_from_execution_v1( - status, - epoch, - gas_cost_summary, - // TODO: Provide the list of read-only shared objects directly. - shared_object_refs, - loaded_per_epoch_config_objects, - *transaction_digest, - lamport_version, - object_changes, - gas_coin, - if inner.events.data.is_empty() { - None - } else { - Some(inner.events.digest()) - }, - transaction_dependencies.into_iter().collect(), - ); - - (inner, effects) - } - - /// An internal check of the invariants (will only fire in debug) - #[cfg(debug_assertions)] - fn check_invariants(&self) { - // Check not both deleted and written - debug_assert!( - { - self.execution_results - .written_objects - .keys() - .all(|id| !self.execution_results.deleted_object_ids.contains(id)) - }, - "Object both written and deleted." - ); - - // Check all mutable inputs are modified - debug_assert!( - { - self.mutable_input_refs - .keys() - .all(|id| self.execution_results.modified_objects.contains(id)) - }, - "Mutable input not modified." - ); - - debug_assert!( - { - self.execution_results - .written_objects - .values() - .all(|obj| obj.previous_transaction == self.tx_digest) - }, - "Object previous transaction not properly set", - ); - } - - /// Mutate a mutable input object. This is used to mutate input objects - /// outside of PT execution. - pub fn mutate_input_object(&mut self, object: Object) { - let id = object.id(); - debug_assert!(self.input_objects.contains_key(&id)); - debug_assert!(!object.is_immutable()); - self.execution_results.modified_objects.insert(id); - self.execution_results.written_objects.insert(id, object); - } - - /// Mutate a child object outside of PT. This should be used extremely - /// rarely. Currently it's only used by advance_epoch_safe_mode because - /// it's all native without PT. This should almost never be used - /// otherwise. - pub fn mutate_child_object(&mut self, old_object: Object, new_object: Object) { - let id = new_object.id(); - let old_ref = old_object.compute_object_reference(); - debug_assert_eq!(old_ref.0, id); - self.loaded_runtime_objects - .insert(id, DynamicallyLoadedObjectMetadata { - version: old_ref.1, - digest: old_ref.2, - owner: old_object.owner, - storage_rebate: old_object.storage_rebate, - previous_transaction: old_object.previous_transaction, - }); - self.execution_results.modified_objects.insert(id); - self.execution_results - .written_objects - .insert(id, new_object); - } - - /// Upgrade system package during epoch change. This requires special - /// treatment since the system package to be upgraded is not in the - /// input objects. We could probably fix above to make it less special. - pub fn upgrade_system_package(&mut self, package: Object) { - let id = package.id(); - assert!(package.is_package() && is_system_package(id)); - self.execution_results.modified_objects.insert(id); - self.execution_results.written_objects.insert(id, package); - } - - /// Crate a new objcet. This is used to create objects outside of PT - /// execution. - pub fn create_object(&mut self, object: Object) { - // Created mutable objects' versions are set to the store's lamport timestamp - // when it is committed to effects. Creating an object at a non-zero - // version risks violating the lamport timestamp invariant (that a - // transaction's lamport timestamp is strictly greater than all versions - // witnessed by the transaction). - debug_assert!( - object.is_immutable() || object.version() == SequenceNumber::MIN, - "Created mutable objects should not have a version set", - ); - let id = object.id(); - self.execution_results.created_object_ids.insert(id); - self.execution_results.written_objects.insert(id, object); - } - - /// Delete a mutable input object. This is used to delete input objects - /// outside of PT execution. - pub fn delete_input_object(&mut self, id: &ObjectID) { - // there should be no deletion after write - debug_assert!(!self.execution_results.written_objects.contains_key(id)); - debug_assert!(self.input_objects.contains_key(id)); - self.execution_results.modified_objects.insert(*id); - self.execution_results.deleted_object_ids.insert(*id); - } - - pub fn drop_writes(&mut self) { - self.execution_results.drop_writes(); - } - - pub fn read_object(&self, id: &ObjectID) -> Option<&Object> { - // there should be no read after delete - debug_assert!(!self.execution_results.deleted_object_ids.contains(id)); - self.execution_results - .written_objects - .get(id) - .or_else(|| self.input_objects.get(id)) - } - - pub fn save_loaded_runtime_objects( - &mut self, - loaded_runtime_objects: BTreeMap, - ) { - #[cfg(debug_assertions)] - { - for (id, v1) in &loaded_runtime_objects { - if let Some(v2) = self.loaded_runtime_objects.get(id) { - assert_eq!(v1, v2); - } - } - for (id, v1) in &self.loaded_runtime_objects { - if let Some(v2) = loaded_runtime_objects.get(id) { - assert_eq!(v1, v2); - } - } - } - // Merge the two maps because we may be calling the execution engine more than - // once (e.g. in advance epoch transaction, where we may be publishing a - // new system package). - self.loaded_runtime_objects.extend(loaded_runtime_objects); - } - - pub fn save_wrapped_object_containers( - &mut self, - wrapped_object_containers: BTreeMap, - ) { - #[cfg(debug_assertions)] - { - for (id, container1) in &wrapped_object_containers { - if let Some(container2) = self.wrapped_object_containers.get(id) { - assert_eq!(container1, container2); - } - } - for (id, container1) in &self.wrapped_object_containers { - if let Some(container2) = wrapped_object_containers.get(id) { - assert_eq!(container1, container2); - } - } - } - // Merge the two maps because we may be calling the execution engine more than - // once (e.g. in advance epoch transaction, where we may be publishing a - // new system package). - self.wrapped_object_containers - .extend(wrapped_object_containers); - } - - pub fn estimate_effects_size_upperbound(&self) -> usize { - TransactionEffects::estimate_effects_size_upperbound_v1( - self.execution_results.written_objects.len(), - self.execution_results.modified_objects.len(), - self.input_objects.len(), - ) - } - - pub fn written_objects_size(&self) -> usize { - self.execution_results - .written_objects - .values() - .fold(0, |sum, obj| sum + obj.object_size_for_gas_metering()) - } - - /// If there are unmetered storage rebate (due to system transaction), we - /// put them into the storage rebate of 0x5 object. - /// TODO: This will not work for potential future new system transactions if - /// 0x5 is not in the input. We should fix this. - pub fn conserve_unmetered_storage_rebate(&mut self, unmetered_storage_rebate: u64) { - if unmetered_storage_rebate == 0 { - // If unmetered_storage_rebate is 0, we are most likely executing the genesis - // transaction. And in that case we cannot mutate the 0x5 object - // because it's newly created. And there is no storage rebate that - // needs distribution anyway. - return; - } - tracing::debug!( - "Amount of unmetered storage rebate from system tx: {:?}", - unmetered_storage_rebate - ); - let mut system_state_wrapper = self - .read_object(&IOTA_SYSTEM_STATE_OBJECT_ID) - .expect("0x5 object must be mutated in system tx with unmetered storage rebate") - .clone(); - // In unmetered execution, storage_rebate field of mutated object must be 0. - // If not, we would be dropping IOTA on the floor by overriding it. - assert_eq!(system_state_wrapper.storage_rebate, 0); - system_state_wrapper.storage_rebate = unmetered_storage_rebate; - self.mutate_input_object(system_state_wrapper); - } - - /// Given an object ID, if it's not modified, returns None. - /// Otherwise returns its metadata, including version, digest, owner and - /// storage rebate. A modified object must be either a mutable input, or - /// a loaded child object. The only exception is when we upgrade system - /// packages, in which case the upgraded system packages are not part of - /// input, but are modified. - fn get_object_modified_at( - &self, - object_id: &ObjectID, - ) -> Option { - if self.execution_results.modified_objects.contains(object_id) { - Some( - self.mutable_input_refs - .get(object_id) - .map( - |((version, digest), owner)| DynamicallyLoadedObjectMetadata { - version: *version, - digest: *digest, - owner: *owner, - // It's guaranteed that a mutable input object is an input object. - storage_rebate: self.input_objects[object_id].storage_rebate, - previous_transaction: self.input_objects[object_id] - .previous_transaction, - }, - ) - .or_else(|| self.loaded_runtime_objects.get(object_id).cloned()) - .unwrap_or_else(|| { - debug_assert!(is_system_package(*object_id)); - let package_obj = - self.store.get_package_object(object_id).unwrap().unwrap(); - let obj = package_obj.object(); - DynamicallyLoadedObjectMetadata { - version: obj.version(), - digest: obj.digest(), - owner: obj.owner, - storage_rebate: obj.storage_rebate, - previous_transaction: obj.previous_transaction, - } - }), - ) - } else { - None - } - } -} - -impl<'backing> TemporaryStore<'backing> { - // check that every object read is owned directly or indirectly by sender, - // sponsor, or a shared object input - pub fn check_ownership_invariants( - &self, - sender: &IotaAddress, - gas_charger: &mut GasCharger, - mutable_inputs: &HashSet, - is_epoch_change: bool, - ) -> IotaResult<()> { - let gas_objs: HashSet<&ObjectID> = gas_charger.gas_coins().iter().map(|g| &g.0).collect(); - // mark input objects as authenticated - let mut authenticated_for_mutation: HashSet<_> = self - .input_objects - .iter() - .filter_map(|(id, obj)| { - if gas_objs.contains(id) { - // gas could be owned by either the sender (common case) or sponsor - // (if this is a sponsored tx, which we do not know inside this function). - // Either way, no object ownership chain should be rooted in a gas object - // thus, consider object authenticated, but don't add it to authenticated_objs - return None; - } - match &obj.owner { - Owner::AddressOwner(a) => { - assert!(sender == a, "Input object not owned by sender"); - Some(id) - } - Owner::Shared { .. } => Some(id), - Owner::Immutable => { - // object is authenticated, but it cannot own other objects, - // so we should not add it to `authenticated_objs` - // However, we would definitely want to add immutable objects - // to the set of authenticated roots if we were doing runtime - // checks inside the VM instead of after-the-fact in the temporary - // store. Here, we choose not to add them because this will catch a - // bug where we mutate or delete an object that belongs to an immutable - // object (though it will show up somewhat opaquely as an authentication - // failure), whereas adding the immutable object to the roots will prevent - // us from catching this. - None - } - Owner::ObjectOwner(_parent) => { - unreachable!("Input objects must be address owned, shared, or immutable") - } - } - }) - .filter(|id| { - // remove any non-mutable inputs. This will remove deleted or readonly shared - // objects - mutable_inputs.contains(id) - }) - .copied() - .collect(); - - // check all modified objects are authenticated (excluding gas objects) - let mut objects_to_authenticate = self - .execution_results - .modified_objects - .iter() - .filter(|id| !gas_objs.contains(id)) - .copied() - .collect::>(); - // Map from an ObjectID to the ObjectID that covers it. - while let Some(to_authenticate) = objects_to_authenticate.pop() { - if authenticated_for_mutation.contains(&to_authenticate) { - // object has been authenticated - continue; - } - let wrapped_parent = self.wrapped_object_containers.get(&to_authenticate); - let parent = if let Some(container_id) = wrapped_parent { - // If the object is wrapped, then the container must be authenticated. - // For example, the ID is for a wrapped table or bag. - *container_id - } else { - let Some(old_obj) = self.store.get_object(&to_authenticate)? else { - panic!( - " - Failed to load object {to_authenticate:?}. \n\ - If it cannot be loaded, \ - we would expect it to be in the wrapped object map: {:?}", - &self.wrapped_object_containers - ) - }; - match &old_obj.owner { - Owner::ObjectOwner(parent) => ObjectID::from(*parent), - Owner::AddressOwner(parent) => { - // For Receiving<_> objects, the address owner is actually an object. - // If it was actually an address, we should have caught it as an input and - // it would already have been in authenticated_for_mutation - ObjectID::from(*parent) - } - owner @ Owner::Shared { .. } => panic!( - "Unauthenticated root at {to_authenticate:?} with owner {owner:?}\n\ - Potentially covering objects in: {authenticated_for_mutation:#?}", - ), - Owner::Immutable => { - assert!( - is_epoch_change, - "Immutable objects cannot be written, except for \ - Iota Framework/Move stdlib upgrades at epoch change boundaries" - ); - // Note: this assumes that the only immutable objects an epoch change - // tx can update are system packages, - // but in principle we could allow others. - assert!( - is_system_package(to_authenticate), - "Only system packages can be upgraded" - ); - continue; - } - } - }; - // we now assume the object is authenticated and must check the parent - authenticated_for_mutation.insert(to_authenticate); - objects_to_authenticate.push(parent); - } - Ok(()) - } -} - -impl<'backing> TemporaryStore<'backing> { - /// Track storage gas for each mutable input object (including the gas coin) - /// and each created object. Compute storage refunds for each deleted - /// object. Will *not* charge anything, gas status keeps track of - /// storage cost and rebate. All objects will be updated with their new - /// (current) storage rebate/cost. `IotaGasStatus` `storage_rebate` and - /// `storage_gas_units` track the transaction overall storage rebate and - /// cost. - pub(crate) fn collect_storage_and_rebate(&mut self, gas_charger: &mut GasCharger) { - // Use two loops because we cannot mut iterate written while calling - // get_object_modified_at. - let old_storage_rebates: Vec<_> = self - .execution_results - .written_objects - .keys() - .map(|object_id| { - self.get_object_modified_at(object_id) - .map(|metadata| metadata.storage_rebate) - .unwrap_or_default() - }) - .collect(); - for (object, old_storage_rebate) in self - .execution_results - .written_objects - .values_mut() - .zip(old_storage_rebates) - { - // new object size - let new_object_size = object.object_size_for_gas_metering(); - // track changes and compute the new object `storage_rebate` - let new_storage_rebate = gas_charger.track_storage_mutation( - object.id(), - new_object_size, - old_storage_rebate, - ); - object.storage_rebate = new_storage_rebate; - } - - self.collect_rebate(gas_charger); - } - - pub(crate) fn collect_rebate(&self, gas_charger: &mut GasCharger) { - for object_id in &self.execution_results.modified_objects { - if self - .execution_results - .written_objects - .contains_key(object_id) - { - continue; - } - // get and track the deleted object `storage_rebate` - let storage_rebate = self - .get_object_modified_at(object_id) - // Unwrap is safe because this loop iterates through all modified objects. - .unwrap() - .storage_rebate; - gas_charger.track_storage_mutation(*object_id, 0, storage_rebate); - } - } - - pub fn check_execution_results_consistency(&self) -> Result<(), ExecutionError> { - assert_invariant!( - self.execution_results - .created_object_ids - .iter() - .all(|id| !self.execution_results.deleted_object_ids.contains(id) - && !self.execution_results.modified_objects.contains(id)), - "Created object IDs cannot also be deleted or modified" - ); - assert_invariant!( - self.execution_results.modified_objects.iter().all(|id| { - self.mutable_input_refs.contains_key(id) - || self.loaded_runtime_objects.contains_key(id) - || is_system_package(*id) - }), - "A modified object must be either a mutable input, a loaded child object, or a system package" - ); - Ok(()) - } -} -//============================================================================== -// Charge gas current - end -//============================================================================== - -impl<'backing> TemporaryStore<'backing> { - pub fn advance_epoch_safe_mode( - &mut self, - params: &AdvanceEpochParams, - protocol_config: &ProtocolConfig, - ) { - let wrapper = get_iota_system_state_wrapper(self.store.as_object_store()) - .expect("System state wrapper object must exist"); - let (old_object, new_object) = - wrapper.advance_epoch_safe_mode(params, self.store.as_object_store(), protocol_config); - self.mutate_child_object(old_object, new_object); - } -} - -type ModifiedObjectInfo<'a> = ( - ObjectID, - // old object metadata, including version, digest, owner, and storage rebate. - Option, - Option<&'a Object>, -); - -impl<'backing> TemporaryStore<'backing> { - fn get_input_iota( - &self, - id: &ObjectID, - expected_version: SequenceNumber, - layout_resolver: &mut impl LayoutResolver, - ) -> Result { - if let Some(obj) = self.input_objects.get(id) { - // the assumption here is that if it is in the input objects must be the right - // one - if obj.version() != expected_version { - invariant_violation!( - "Version mismatching when resolving input object to check conservation--\ - expected {}, got {}", - expected_version, - obj.version(), - ); - } - obj.get_total_iota(layout_resolver).map_err(|e| { - make_invariant_violation!( - "Failed looking up input IOTA in IOTA conservation checking for input with \ - type {:?}: {e:#?}", - obj.struct_tag(), - ) - }) - } else { - // not in input objects, must be a dynamic field - let Ok(Some(obj)) = self.store.get_object_by_key(id, expected_version) else { - invariant_violation!( - "Failed looking up dynamic field {id} in IOTA conservation checking" - ); - }; - obj.get_total_iota(layout_resolver).map_err(|e| { - make_invariant_violation!( - "Failed looking up input IOTA in IOTA conservation checking for type \ - {:?}: {e:#?}", - obj.struct_tag(), - ) - }) - } - } - - /// Return the list of all modified objects, for each object, returns - /// - Object ID, - /// - Input: If the object existed prior to this transaction, include their - /// version and storage_rebate, - /// - Output: If a new version of the object is written, include the new - /// object. - fn get_modified_objects(&self) -> Vec> { - self.execution_results - .modified_objects - .iter() - .map(|id| { - let metadata = self.get_object_modified_at(id); - let output = self.execution_results.written_objects.get(id); - (*id, metadata, output) - }) - .chain( - self.execution_results - .written_objects - .iter() - .filter_map(|(id, object)| { - if self.execution_results.modified_objects.contains(id) { - None - } else { - Some((*id, None, Some(object))) - } - }), - ) - .collect() - } - - /// Check that this transaction neither creates nor destroys IOTA. This - /// should hold for all txes except the epoch change tx, which mints - /// staking rewards equal to the gas fees burned in the previous epoch. - /// Specifically, this checks two key invariants about storage - /// fees and storage rebate: - /// - /// 1. all IOTA in storage rebate fields of input objects should flow either - /// to the transaction storage rebate, or the transaction non-refundable - /// storage rebate - /// 2. all IOTA charged for storage should flow into the storage rebate - /// field of some output object - /// - /// This function is intended to be called *after* we have charged for - /// gas + applied the storage rebate to the gas object, but *before* we - /// have updated object versions. - pub fn check_iota_conserved(&self, gas_summary: &GasCostSummary) -> Result<(), ExecutionError> { - // total amount of IOTA in storage rebate of input objects - let mut total_input_rebate = 0; - // total amount of IOTA in storage rebate of output objects - let mut total_output_rebate = 0; - for (_, input, output) in self.get_modified_objects() { - if let Some(input) = input { - total_input_rebate += input.storage_rebate; - } - if let Some(object) = output { - total_output_rebate += object.storage_rebate; - } - } - - if gas_summary.storage_cost == 0 { - // this condition is usually true when the transaction went OOG and no - // gas is left for storage charges. - // The storage cost has to be there at least for the gas coin which - // will not be deleted even when going to 0. - // However if the storage cost is 0 and if there is any object touched - // or deleted the value in input must be equal to the output plus rebate and - // non refundable. - // Rebate and non refundable will be positive when there are object deleted - // (gas smashing being the primary and possibly only example). - // A more typical condition is for all storage charges in summary to be 0 and - // then input and output must be the same value - if total_input_rebate - != total_output_rebate - + gas_summary.storage_rebate - + gas_summary.non_refundable_storage_fee - { - return Err(ExecutionError::invariant_violation(format!( - "IOTA conservation failed -- no storage charges in gas summary \ - and total storage input rebate {} not equal \ - to total storage output rebate {}", - total_input_rebate, total_output_rebate, - ))); - } - } else { - // all IOTA in storage rebate fields of input objects should flow either to - // the transaction storage rebate, or the non-refundable storage rebate pool - if total_input_rebate - != gas_summary.storage_rebate + gas_summary.non_refundable_storage_fee - { - return Err(ExecutionError::invariant_violation(format!( - "IOTA conservation failed -- {} IOTA in storage rebate field of input objects, \ - {} IOTA in tx storage rebate or tx non-refundable storage rebate", - total_input_rebate, gas_summary.non_refundable_storage_fee, - ))); - } - - // all IOTA charged for storage should flow into the storage rebate field - // of some output object - if gas_summary.storage_cost != total_output_rebate { - return Err(ExecutionError::invariant_violation(format!( - "IOTA conservation failed -- {} IOTA charged for storage, \ - {} IOTA in storage rebate field of output objects", - gas_summary.storage_cost, total_output_rebate - ))); - } - } - Ok(()) - } - - /// Check that this transaction neither creates nor destroys IOTA. - /// This more expensive check will check a third invariant on top of the 2 - /// performed by `check_iota_conserved` above: - /// - /// * all IOTA in input objects (including coins etc in the Move part of an - /// object) should flow either to an output object, or be burned as part - /// of computation fees or non-refundable storage rebate - /// - /// This function is intended to be called *after* we have charged for gas + - /// applied the storage rebate to the gas object, but *before* we have - /// updated object versions. The advance epoch transaction would mint - /// `epoch_fees` amount of IOTA, and burn `epoch_rebates` amount of IOTA. - /// We need these information for this check. - pub fn check_iota_conserved_expensive( - &self, - gas_summary: &GasCostSummary, - advance_epoch_gas_summary: Option<(u64, u64)>, - layout_resolver: &mut impl LayoutResolver, - ) -> Result<(), ExecutionError> { - // total amount of IOTA in input objects, including both coins and storage - // rebates - let mut total_input_iota = 0; - // total amount of IOTA in output objects, including both coins and storage - // rebates - let mut total_output_iota = 0; - for (id, input, output) in self.get_modified_objects() { - if let Some(input) = input { - total_input_iota += self.get_input_iota(&id, input.version, layout_resolver)?; - } - if let Some(object) = output { - total_output_iota += object.get_total_iota(layout_resolver).map_err(|e| { - make_invariant_violation!( - "Failed looking up output IOTA in IOTA conservation checking for \ - mutated type {:?}: {e:#?}", - object.struct_tag(), - ) - })?; - } - } - // note: storage_cost flows into the storage_rebate field of the output objects, - // which is why it is not accounted for here. - // similarly, all of the storage_rebate *except* the storage_fund_rebate_inflow - // gets credited to the gas coin both computation costs and storage rebate - // inflow are - total_output_iota += gas_summary.computation_cost + gas_summary.non_refundable_storage_fee; - if let Some((epoch_fees, epoch_rebates)) = advance_epoch_gas_summary { - total_input_iota += epoch_fees; - total_output_iota += epoch_rebates; - } - if total_input_iota != total_output_iota { - return Err(ExecutionError::invariant_violation(format!( - "IOTA conservation failed: input={}, output={}, \ - this transaction either mints or burns IOTA", - total_input_iota, total_output_iota, - ))); - } - Ok(()) - } -} - -impl<'backing> ChildObjectResolver for TemporaryStore<'backing> { - fn read_child_object( - &self, - parent: &ObjectID, - child: &ObjectID, - child_version_upper_bound: SequenceNumber, - ) -> IotaResult> { - let obj_opt = self.execution_results.written_objects.get(child); - if obj_opt.is_some() { - Ok(obj_opt.cloned()) - } else { - let _scope = monitored_scope("Execution::read_child_object"); - self.store - .read_child_object(parent, child, child_version_upper_bound) - } - } - - fn get_object_received_at_version( - &self, - owner: &ObjectID, - receiving_object_id: &ObjectID, - receive_object_at_version: SequenceNumber, - epoch_id: EpochId, - ) -> IotaResult> { - // You should never be able to try and receive an object after deleting it or - // writing it in the same transaction since `Receiving` doesn't have - // copy. - debug_assert!( - !self - .execution_results - .written_objects - .contains_key(receiving_object_id) - ); - debug_assert!( - !self - .execution_results - .deleted_object_ids - .contains(receiving_object_id) - ); - self.store.get_object_received_at_version( - owner, - receiving_object_id, - receive_object_at_version, - epoch_id, - ) - } -} - -impl<'backing> Storage for TemporaryStore<'backing> { - fn reset(&mut self) { - self.drop_writes(); - } - - fn read_object(&self, id: &ObjectID) -> Option<&Object> { - TemporaryStore::read_object(self, id) - } - - /// Take execution results v1. - fn record_execution_results(&mut self, results: ExecutionResults) { - let ExecutionResults::V1(results) = results; - - // It's important to merge instead of override results because it's - // possible to execute PT more than once during tx execution. - self.execution_results.merge_results(results); - } - - fn save_loaded_runtime_objects( - &mut self, - loaded_runtime_objects: BTreeMap, - ) { - TemporaryStore::save_loaded_runtime_objects(self, loaded_runtime_objects) - } - - fn save_wrapped_object_containers( - &mut self, - wrapped_object_containers: BTreeMap, - ) { - TemporaryStore::save_wrapped_object_containers(self, wrapped_object_containers) - } - - fn check_coin_deny_list(&self, written_objects: &BTreeMap) -> DenyListResult { - let result = check_coin_deny_list_v1_during_execution( - written_objects, - self.cur_epoch, - self.store.as_object_store(), - ); - // The denylist object is only loaded if there are regulated transfers. - // And also if we already have it in the input there is no need to commit it - // again in the effects. - if result.num_non_gas_coin_owners > 0 - && !self.input_objects.contains_key(&IOTA_DENY_LIST_OBJECT_ID) - { - self.loaded_per_epoch_config_objects - .write() - .insert(IOTA_DENY_LIST_OBJECT_ID); - } - result - } -} - -impl<'backing> BackingPackageStore for TemporaryStore<'backing> { - fn get_package_object(&self, package_id: &ObjectID) -> IotaResult> { - // We first check the objects in the temporary store because in non-production - // code path, it is possible to read packages that are just written in - // the same transaction. This can happen for example when we run the - // expensive conservation checks, where we may look into the types of - // each written object in the output, and some of them need the - // newly written packages for type checking. - // In production path though, this should never happen. - if let Some(obj) = self.execution_results.written_objects.get(package_id) { - Ok(Some(PackageObject::new(obj.clone()))) - } else { - self.store.get_package_object(package_id).inspect(|obj| { - // Track object but leave unchanged - if let Some(v) = obj { - if !self - .runtime_packages_loaded_from_db - .read() - .contains_key(package_id) - { - // TODO: Can this lock ever block execution? - // TODO: Another way to avoid the cost of maintaining this map is to not - // enable it in normal runs, and if a fork is detected, rerun it with a flag - // turned on and start populating this field. - self.runtime_packages_loaded_from_db - .write() - .insert(*package_id, v.clone()); - } - } - }) - } - } -} - -impl<'backing> ResourceResolver for TemporaryStore<'backing> { - type Error = IotaError; - - fn get_resource( - &self, - address: &AccountAddress, - struct_tag: &StructTag, - ) -> Result>, Self::Error> { - let object = match self.read_object(&ObjectID::from(*address)) { - Some(x) => x, - None => match self.read_object(&ObjectID::from(*address)) { - None => return Ok(None), - Some(x) => { - if !x.is_immutable() { - fp_bail!(IotaError::ExecutionInvariantViolation); - } - x - } - }, - }; - - match &object.data { - Data::Move(m) => { - assert!( - m.is_type(struct_tag), - "Invariant violation: ill-typed object in storage \ - or bad object request from caller" - ); - Ok(Some(m.contents().to_vec())) - } - other => unimplemented!( - "Bad object lookup: expected Move object, but got {:?}", - other - ), - } - } -} diff --git a/iota-execution/v0/iota-adapter/src/type_layout_resolver.rs b/iota-execution/v0/iota-adapter/src/type_layout_resolver.rs deleted file mode 100644 index 4520d29b0ad..00000000000 --- a/iota-execution/v0/iota-adapter/src/type_layout_resolver.rs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use iota_types::{ - base_types::ObjectID, - error::{IotaError, IotaResult}, - execution::TypeLayoutStore, - layout_resolver::LayoutResolver, - storage::{BackingPackageStore, PackageObject}, -}; -use move_core_types::{ - account_address::AccountAddress, annotated_value as A, language_storage::StructTag, - resolver::ResourceResolver, -}; -use move_vm_runtime::move_vm::MoveVM; - -use crate::programmable_transactions::{context::load_type_from_struct, linkage_view::LinkageView}; - -/// Retrieve a `MoveStructLayout` from a `Type`. -/// Invocation into the `Session` to leverage the `LinkageView` implementation -/// common to the runtime. -pub struct TypeLayoutResolver<'state, 'vm> { - vm: &'vm MoveVM, - linkage_view: LinkageView<'state>, -} - -/// Implements IotaResolver traits by providing null implementations for module -/// and resource resolution and delegating backing package resolution to the -/// trait object. -struct NullIotaResolver<'state>(Box); - -impl<'state, 'vm> TypeLayoutResolver<'state, 'vm> { - pub fn new(vm: &'vm MoveVM, state_view: Box) -> Self { - let linkage_view = LinkageView::new(Box::new(NullIotaResolver(state_view))); - Self { vm, linkage_view } - } -} - -impl<'state, 'vm> LayoutResolver for TypeLayoutResolver<'state, 'vm> { - fn get_annotated_layout( - &mut self, - struct_tag: &StructTag, - ) -> Result { - let Ok(ty) = load_type_from_struct(self.vm, &mut self.linkage_view, &[], struct_tag) else { - return Err(IotaError::FailObjectLayout { - st: format!("{}", struct_tag), - }); - }; - let layout = self.vm.get_runtime().type_to_fully_annotated_layout(&ty); - match layout { - Ok(A::MoveTypeLayout::Struct(s)) => Ok(A::MoveDatatypeLayout::Struct(s)), - Ok(A::MoveTypeLayout::Enum(e)) => Ok(A::MoveDatatypeLayout::Enum(e)), - _ => Err(IotaError::FailObjectLayout { - st: format!("{}", struct_tag), - }), - } - } -} - -impl<'state> BackingPackageStore for NullIotaResolver<'state> { - fn get_package_object(&self, package_id: &ObjectID) -> IotaResult> { - self.0.get_package_object(package_id) - } -} - -impl<'state> ResourceResolver for NullIotaResolver<'state> { - type Error = IotaError; - - fn get_resource( - &self, - _address: &AccountAddress, - _typ: &StructTag, - ) -> Result>, Self::Error> { - Ok(None) - } -} diff --git a/iota-execution/v0/iota-adapter/src/type_resolver.rs b/iota-execution/v0/iota-adapter/src/type_resolver.rs deleted file mode 100644 index 25f338841d9..00000000000 --- a/iota-execution/v0/iota-adapter/src/type_resolver.rs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use iota_types::error::ExecutionError; -use move_core_types::language_storage::TypeTag; -use move_vm_types::loaded_data::runtime_types::Type; - -pub trait TypeTagResolver { - fn get_type_tag(&self, type_: &Type) -> Result; -} diff --git a/iota-execution/v0/iota-move-natives/Cargo.toml b/iota-execution/v0/iota-move-natives/Cargo.toml deleted file mode 100644 index d493f43d646..00000000000 --- a/iota-execution/v0/iota-move-natives/Cargo.toml +++ /dev/null @@ -1,29 +0,0 @@ -[package] -name = "iota-move-natives-v0" -version = "0.1.0" -authors = ["IOTA Foundation "] -edition = "2021" -license = "Apache-2.0" -publish = false -description = "Move framework for iota platform" - -[dependencies] -# external dependencies -bcs.workspace = true -better_any.workspace = true -fastcrypto.workspace = true -fastcrypto-vdf.workspace = true -fastcrypto-zkp.workspace = true -indexmap.workspace = true -rand = { workspace = true, features = ["small_rng"] } -smallvec.workspace = true -tracing.workspace = true - -# internal dependencies -iota-protocol-config.workspace = true -iota-types.workspace = true -move-binary-format.workspace = true -move-core-types.workspace = true -move-stdlib-natives = { path = "../../../external-crates/move/move-execution/v0/crates/move-stdlib-natives", package = "move-stdlib-natives-v0" } -move-vm-runtime = { path = "../../../external-crates/move/move-execution/v0/crates/move-vm-runtime", package = "move-vm-runtime-v0" } -move-vm-types.workspace = true diff --git a/iota-execution/v0/iota-move-natives/src/address.rs b/iota-execution/v0/iota-move-natives/src/address.rs deleted file mode 100644 index 928218d0de8..00000000000 --- a/iota-execution/v0/iota-move-natives/src/address.rs +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::collections::VecDeque; - -use move_binary_format::errors::PartialVMResult; -use move_core_types::{account_address::AccountAddress, gas_algebra::InternalGas, u256::U256}; -use move_vm_runtime::{native_charge_gas_early_exit, native_functions::NativeContext}; -use move_vm_types::{ - loaded_data::runtime_types::Type, natives::function::NativeResult, pop_arg, values::Value, -}; -use smallvec::smallvec; - -use crate::NativesCostTable; - -const E_ADDRESS_PARSE_ERROR: u64 = 0; -#[derive(Clone)] -pub struct AddressFromBytesCostParams { - /// addresses are constant size, so base cost suffices - pub address_from_bytes_cost_base: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun from_bytes -/// Implementation of the Move native function `address::from_bytes(bytes: -/// vector)` gas cost: address_from_bytes_cost_base -/// | addresses are constant size, so base cost suffices *********************** -/// ************************************************************************ -pub fn from_bytes( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 1); - - let address_from_bytes_cost_params = context - .extensions_mut() - .get::() - .address_from_bytes_cost_params - .clone(); - - // Charge base fee - native_charge_gas_early_exit!( - context, - address_from_bytes_cost_params.address_from_bytes_cost_base - ); - - let addr_bytes = pop_arg!(args, Vec); - let cost = context.gas_used(); - - // Address parsing can fail if fed the incorrect number of bytes. - Ok(match AccountAddress::from_bytes(addr_bytes) { - Ok(addr) => NativeResult::ok(cost, smallvec![Value::address(addr)]), - Err(_) => NativeResult::err(cost, E_ADDRESS_PARSE_ERROR), - }) -} -#[derive(Clone)] -pub struct AddressToU256CostParams { - /// addresses and u256 are constant size, so base cost suffices - pub address_to_u256_cost_base: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun to_u256 -/// Implementation of the Move native function `address::to_u256(address): u256` -/// gas cost: address_to_u256_cost_base | addresses and -/// u256 are constant size, so base cost suffices ****************************** -/// ***************************************************************** -pub fn to_u256( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 1); - - let address_to_u256_cost_params = context - .extensions_mut() - .get::() - .address_to_u256_cost_params - .clone(); - - // Charge flat cost - native_charge_gas_early_exit!( - context, - address_to_u256_cost_params.address_to_u256_cost_base - ); - - let addr = pop_arg!(args, AccountAddress); - let mut addr_bytes_le = addr.to_vec(); - addr_bytes_le.reverse(); - - // unwrap safe because we know addr_bytes_le is length 32 - let u256_val = Value::u256(U256::from_le_bytes(&addr_bytes_le.try_into().unwrap())); - Ok(NativeResult::ok(context.gas_used(), smallvec![u256_val])) -} - -#[derive(Clone)] -pub struct AddressFromU256CostParams { - /// addresses and u256 are constant size, so base cost suffices - pub address_from_u256_cost_base: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun from_u256 -/// Implementation of the Move native function `address::from_u256(u256): -/// address` gas cost: address_from_u256_cost_base | addresses -/// and u256 are constant size, so base cost suffices ************************** -/// ********************************************************************* -pub fn from_u256( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 1); - - let address_from_u256_cost_params = context - .extensions_mut() - .get::() - .address_from_u256_cost_params - .clone(); - - // charge flat fee - native_charge_gas_early_exit!( - context, - address_from_u256_cost_params.address_from_u256_cost_base - ); - - let u256 = pop_arg!(args, U256); - let mut u256_bytes = u256.to_le_bytes().to_vec(); - u256_bytes.reverse(); - - // unwrap safe because we are passing a 32 byte slice - let addr_val = Value::address(AccountAddress::from_bytes(&u256_bytes[..]).unwrap()); - Ok(NativeResult::ok(context.gas_used(), smallvec![addr_val])) -} diff --git a/iota-execution/v0/iota-move-natives/src/config.rs b/iota-execution/v0/iota-move-natives/src/config.rs deleted file mode 100644 index ca0c7e1105e..00000000000 --- a/iota-execution/v0/iota-move-natives/src/config.rs +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::collections::VecDeque; - -use iota_types::{TypeTag, base_types::MoveObjectType}; -use move_binary_format::errors::{PartialVMError, PartialVMResult}; -use move_core_types::{ - account_address::AccountAddress, gas_algebra::InternalGas, language_storage::StructTag, - runtime_value as R, vm_status::StatusCode, -}; -use move_vm_runtime::{native_charge_gas_early_exit, native_functions::NativeContext}; -use move_vm_types::{ - loaded_data::runtime_types::Type, - natives::function::NativeResult, - pop_arg, - values::{Struct, Value, Vector}, -}; -use smallvec::smallvec; -use tracing::{error, instrument}; - -use crate::{NativesCostTable, object_runtime::ObjectRuntime}; - -const E_BCS_SERIALIZATION_FAILURE: u64 = 2; - -#[derive(Clone)] -pub struct ConfigReadSettingImplCostParams { - pub config_read_setting_impl_cost_base: Option, - pub config_read_setting_impl_cost_per_byte: Option, -} - -#[instrument(level = "trace", skip_all, err)] -pub fn read_setting_impl( - context: &mut NativeContext, - mut ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - assert_eq!(ty_args.len(), 4); - assert_eq!(args.len(), 3); - - let ConfigReadSettingImplCostParams { - config_read_setting_impl_cost_base, - config_read_setting_impl_cost_per_byte, - } = context - .extensions_mut() - .get::() - .config_read_setting_impl_cost_params - .clone(); - - let config_read_setting_impl_cost_base = - config_read_setting_impl_cost_base.ok_or_else(|| { - PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message("gas cost is not set".to_string()) - })?; - let config_read_setting_impl_cost_per_byte = config_read_setting_impl_cost_per_byte - .ok_or_else(|| { - PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message("gas cost is not set".to_string()) - })?; - // Charge base fee - native_charge_gas_early_exit!(context, config_read_setting_impl_cost_base); - - let value_ty = ty_args.pop().unwrap(); - let setting_data_value_ty = ty_args.pop().unwrap(); - let setting_value_ty = ty_args.pop().unwrap(); - let field_setting_ty = ty_args.pop().unwrap(); - - let current_epoch = pop_arg!(args, u64); - let name_df_addr = pop_arg!(args, AccountAddress); - let config_addr = pop_arg!(args, AccountAddress); - - let field_setting_tag: StructTag = match context.type_to_type_tag(&field_setting_ty)? { - TypeTag::Struct(s) => *s, - _ => { - return Err( - PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message("Iota verifier guarantees this is a struct".to_string()), - ); - } - }; - let Some(field_setting_layout) = context.type_to_type_layout(&field_setting_ty)? else { - return Ok(NativeResult::err( - context.gas_used(), - E_BCS_SERIALIZATION_FAILURE, - )); - }; - let object_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut(); - - let read_value_opt = consistent_value_before_current_epoch( - object_runtime, - &field_setting_ty, - field_setting_tag, - &field_setting_layout, - &setting_value_ty, - &setting_data_value_ty, - &value_ty, - config_addr, - name_df_addr, - current_epoch, - )?; - - native_charge_gas_early_exit!( - context, - config_read_setting_impl_cost_per_byte * u64::from(read_value_opt.legacy_size()).into() - ); - - Ok(NativeResult::ok(context.gas_used(), smallvec![ - read_value_opt - ])) -} - -fn consistent_value_before_current_epoch( - object_runtime: &mut ObjectRuntime, - field_setting_ty: &Type, - field_setting_tag: StructTag, - field_setting_layout: &R::MoveTypeLayout, - _setting_value_ty: &Type, - setting_data_value_ty: &Type, - value_ty: &Type, - config_addr: AccountAddress, - name_df_addr: AccountAddress, - current_epoch: u64, -) -> PartialVMResult { - let field_setting_obj_ty = MoveObjectType::from(field_setting_tag); - let Some(field) = object_runtime.config_setting_unsequenced_read( - config_addr.into(), - name_df_addr.into(), - field_setting_ty, - field_setting_layout, - &field_setting_obj_ty, - ) else { - return option_none(value_ty); - }; - - let [_id, _name, setting]: [Value; 3] = unpack_struct(field)?; - let [data_opt]: [Value; 1] = unpack_struct(setting)?; - let data = match unpack_option(data_opt, setting_data_value_ty)? { - None => { - error!( - " - SettingData is none. - config_addr: {config_addr}, - name_df_addr: {name_df_addr}, - field_setting_obj_ty: {field_setting_obj_ty:?}", - ); - return option_none(value_ty); - } - Some(data) => data, - }; - let [newer_value_epoch, newer_value, older_value_opt]: [Value; 3] = unpack_struct(data)?; - let newer_value_epoch: u64 = newer_value_epoch.value_as()?; - debug_assert!( - unpack_option(newer_value.copy_value()?, value_ty)?.is_some() - || unpack_option(older_value_opt.copy_value()?, value_ty)?.is_some() - ); - Ok(if current_epoch > newer_value_epoch { - newer_value - } else { - older_value_opt - }) -} - -fn unpack_struct(s: Value) -> PartialVMResult<[Value; N]> { - let s: Struct = s.value_as()?; - s.unpack()?.collect::>().try_into().map_err(|e| { - PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message(format!("struct expected to have have {N} fields: {e:?}")) - }) -} - -fn unpack_option(option: Value, type_param: &Type) -> PartialVMResult> { - let [vec_value]: [Value; 1] = unpack_struct(option)?; - let vec: Vector = vec_value.value_as()?; - Ok(if vec.elem_len() == 0 { - None - } else { - let [elem]: [Value; 1] = vec.unpack(type_param, 1)?.try_into().map_err(|e| { - PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message(format!("vector expected to have one element: {e:?}")) - })?; - Some(elem) - }) -} - -fn option_none(type_param: &Type) -> PartialVMResult { - Ok(Value::struct_(Struct::pack(vec![Vector::empty( - type_param, - )?]))) -} diff --git a/iota-execution/v0/iota-move-natives/src/crypto/bls12381.rs b/iota-execution/v0/iota-move-natives/src/crypto/bls12381.rs deleted file mode 100644 index a3aaf1f845e..00000000000 --- a/iota-execution/v0/iota-move-natives/src/crypto/bls12381.rs +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::collections::VecDeque; - -use fastcrypto::{ - bls12381::{min_pk, min_sig}, - traits::{ToFromBytes, VerifyingKey}, -}; -use move_binary_format::errors::PartialVMResult; -use move_core_types::gas_algebra::InternalGas; -use move_vm_runtime::{native_charge_gas_early_exit, native_functions::NativeContext}; -use move_vm_types::{ - loaded_data::runtime_types::Type, - natives::function::NativeResult, - pop_arg, - values::{Value, VectorRef}, -}; -use smallvec::smallvec; - -use crate::NativesCostTable; - -const BLS12381_BLOCK_SIZE: usize = 64; - -#[derive(Clone)] -pub struct Bls12381Bls12381MinSigVerifyCostParams { - /// Base cost for invoking the `bls12381_min_sig_verify` function - pub bls12381_bls12381_min_sig_verify_cost_base: InternalGas, - /// Cost per byte of `msg` - pub bls12381_bls12381_min_sig_verify_msg_cost_per_byte: InternalGas, - /// Cost per block of `msg`, where a block is 64 bytes - pub bls12381_bls12381_min_sig_verify_msg_cost_per_block: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun bls12381_min_sig_verify -/// Implementation of the Move native function -/// `bls12381_min_sig_verify(signature: &vector, public_key: &vector, -/// msg: &vector): bool` gas cost: -/// bls12381_bls12381_min_sig_verify_cost_base | covers -/// various fixed costs in the oper -/// + bls12381_bls12381_min_sig_verify_msg_cost_per_byte * -/// size_of(msg) | covers cost of operating on each byte -/// of `msg` -/// + bls12381_bls12381_min_sig_verify_msg_cost_per_block * -/// num_blocks(msg) | covers cost of operating on each block -/// in `msg` -/// Note: each block is of size `BLS12381_BLOCK_SIZE` bytes, and we round up. -/// `signature` and `public_key` are fixed size, so their costs are -/// included in the base cost. ************************************************* -/// ********************************************** -pub fn bls12381_min_sig_verify( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 3); - - // Load the cost parameters from the protocol config - let bls12381_bls12381_min_sig_verify_cost_params = &context - .extensions() - .get::() - .bls12381_bls12381_min_sig_verify_cost_params - .clone(); - // Charge the base cost for this oper - native_charge_gas_early_exit!( - context, - bls12381_bls12381_min_sig_verify_cost_params.bls12381_bls12381_min_sig_verify_cost_base - ); - - let msg = pop_arg!(args, VectorRef); - let public_key_bytes = pop_arg!(args, VectorRef); - let signature_bytes = pop_arg!(args, VectorRef); - - let msg_ref = msg.as_bytes_ref(); - let public_key_bytes_ref = public_key_bytes.as_bytes_ref(); - let signature_bytes_ref = signature_bytes.as_bytes_ref(); - - // Charge the arg size dependent costs - native_charge_gas_early_exit!( - context, - bls12381_bls12381_min_sig_verify_cost_params - .bls12381_bls12381_min_sig_verify_msg_cost_per_byte - * (msg_ref.len() as u64).into() - + bls12381_bls12381_min_sig_verify_cost_params - .bls12381_bls12381_min_sig_verify_msg_cost_per_block - * (((msg_ref.len() + BLS12381_BLOCK_SIZE - 1) / BLS12381_BLOCK_SIZE) as u64).into() - ); - - let cost = context.gas_used(); - - let Ok(signature) = - ::from_bytes(&signature_bytes_ref) - else { - return Ok(NativeResult::ok(cost, smallvec![Value::bool(false)])); - }; - - let public_key = - match ::from_bytes(&public_key_bytes_ref) { - Ok(public_key) => match public_key.validate() { - Ok(_) => public_key, - Err(_) => return Ok(NativeResult::ok(cost, smallvec![Value::bool(false)])), - }, - Err(_) => return Ok(NativeResult::ok(cost, smallvec![Value::bool(false)])), - }; - - Ok(NativeResult::ok(cost, smallvec![Value::bool( - public_key.verify(&msg_ref, &signature).is_ok() - )])) -} - -#[derive(Clone)] -pub struct Bls12381Bls12381MinPkVerifyCostParams { - /// Base cost for invoking the `bls12381_min_sig_verify` function - pub bls12381_bls12381_min_pk_verify_cost_base: InternalGas, - /// Cost per byte of `msg` - pub bls12381_bls12381_min_pk_verify_msg_cost_per_byte: InternalGas, - /// Cost per block of `msg`, where a block is 64 bytes - pub bls12381_bls12381_min_pk_verify_msg_cost_per_block: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun bls12381_min_pk_verify -/// Implementation of the Move native function -/// `bls12381_min_pk_verify(signature: &vector, public_key: &vector, -/// msg: &vector): bool` gas cost: -/// bls12381_bls12381_min_pk_verify_cost_base | covers -/// various fixed costs in the oper -/// + bls12381_bls12381_min_pk_verify_msg_cost_per_byte * -/// size_of(msg) | covers cost of operating on each byte -/// of `msg` -/// + bls12381_bls12381_min_pk_verify_msg_cost_per_block * -/// num_blocks(msg) | covers cost of operating on each block -/// in `msg` -/// Note: each block is of size `BLS12381_BLOCK_SIZE` bytes, and we round up. -/// `signature` and `public_key` are fixed size, so their costs are -/// included in the base cost. ************************************************* -/// ********************************************** -pub fn bls12381_min_pk_verify( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 3); - - // Load the cost parameters from the protocol config - let bls12381_bls12381_min_pk_verify_cost_params = &context - .extensions() - .get::() - .bls12381_bls12381_min_pk_verify_cost_params - .clone(); - - // Charge the base cost for this oper - native_charge_gas_early_exit!( - context, - bls12381_bls12381_min_pk_verify_cost_params.bls12381_bls12381_min_pk_verify_cost_base - ); - - let msg = pop_arg!(args, VectorRef); - let public_key_bytes = pop_arg!(args, VectorRef); - let signature_bytes = pop_arg!(args, VectorRef); - - let msg_ref = msg.as_bytes_ref(); - let public_key_bytes_ref = public_key_bytes.as_bytes_ref(); - let signature_bytes_ref = signature_bytes.as_bytes_ref(); - - // Charge the arg size dependent costs - native_charge_gas_early_exit!( - context, - bls12381_bls12381_min_pk_verify_cost_params - .bls12381_bls12381_min_pk_verify_msg_cost_per_byte - * (msg_ref.len() as u64).into() - + bls12381_bls12381_min_pk_verify_cost_params - .bls12381_bls12381_min_pk_verify_msg_cost_per_block - * (((msg_ref.len() + BLS12381_BLOCK_SIZE - 1) / BLS12381_BLOCK_SIZE) as u64).into() - ); - - let cost = context.gas_used(); - - let signature = - match ::from_bytes(&signature_bytes_ref) { - Ok(signature) => signature, - Err(_) => return Ok(NativeResult::ok(cost, smallvec![Value::bool(false)])), - }; - - let public_key = - match ::from_bytes(&public_key_bytes_ref) { - Ok(public_key) => match public_key.validate() { - Ok(_) => public_key, - Err(_) => return Ok(NativeResult::ok(cost, smallvec![Value::bool(false)])), - }, - Err(_) => return Ok(NativeResult::ok(cost, smallvec![Value::bool(false)])), - }; - - Ok(NativeResult::ok(cost, smallvec![Value::bool( - public_key.verify(&msg_ref, &signature).is_ok() - )])) -} diff --git a/iota-execution/v0/iota-move-natives/src/crypto/ecdsa_k1.rs b/iota-execution/v0/iota-move-natives/src/crypto/ecdsa_k1.rs deleted file mode 100644 index 8ae62fe1ed8..00000000000 --- a/iota-execution/v0/iota-move-natives/src/crypto/ecdsa_k1.rs +++ /dev/null @@ -1,414 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::collections::VecDeque; - -use fastcrypto::{ - error::FastCryptoError, - hash::{Keccak256, Sha256}, - secp256k1::{ - Secp256k1KeyPair, Secp256k1PrivateKey, Secp256k1PublicKey, Secp256k1Signature, - recoverable::Secp256k1RecoverableSignature, - }, - traits::{RecoverableSignature, RecoverableSigner, ToFromBytes}, -}; -use iota_types::crypto::KeypairTraits; -use move_binary_format::errors::PartialVMResult; -use move_core_types::gas_algebra::InternalGas; -use move_vm_runtime::{native_charge_gas_early_exit, native_functions::NativeContext}; -use move_vm_types::{ - loaded_data::runtime_types::Type, - natives::function::NativeResult, - pop_arg, - values::{self, Value, VectorRef}, -}; -use rand::{SeedableRng, rngs::StdRng}; -use smallvec::smallvec; - -use crate::NativesCostTable; - -pub const FAIL_TO_RECOVER_PUBKEY: u64 = 0; -pub const INVALID_SIGNATURE: u64 = 1; -pub const INVALID_PUBKEY: u64 = 2; -pub const INVALID_PRIVKEY: u64 = 3; -pub const INVALID_HASH_FUNCTION: u64 = 4; -pub const INVALID_SEED: u64 = 5; - -pub const KECCAK256: u8 = 0; -pub const SHA256: u8 = 1; - -const KECCAK256_BLOCK_SIZE: usize = 136; -const SHA256_BLOCK_SIZE: usize = 64; -const SEED_LENGTH: usize = 32; - -#[derive(Clone)] -pub struct EcdsaK1EcrecoverCostParams { - /// Base cost for invoking the `ecrecover` function with `hash=0` implying - /// KECCAK256 - pub ecdsa_k1_ecrecover_keccak256_cost_base: InternalGas, - /// Cost per byte of `msg` with `hash=0`implying KECCAK256 - pub ecdsa_k1_ecrecover_keccak256_msg_cost_per_byte: InternalGas, - /// Cost per block of `msg` with `hash=0`implying KECCAK256, with block - /// size = 136 - pub ecdsa_k1_ecrecover_keccak256_msg_cost_per_block: InternalGas, - - /// Base cost for invoking the `ecrecover` function with `hash=1` implying - /// SHA256 - pub ecdsa_k1_ecrecover_sha256_cost_base: InternalGas, - /// Cost per byte of `msg` with `hash=1`implying SHA256 - pub ecdsa_k1_ecrecover_sha256_msg_cost_per_byte: InternalGas, - /// Cost per block of `msg` with `hash=1`implying SHA256, with block size = - /// 64 - pub ecdsa_k1_ecrecover_sha256_msg_cost_per_block: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun secp256k1_ecrecover -/// Implementation of the Move native function `secp256k1_ecrecover(signature: -/// &vector, msg: &vector, hash: u8): vector` This function has two -/// cost modes depending on the hash being set to `KECCAK256` or `SHA256`. The -/// core formula is same but constants differ. If hash = 0, we use the -/// `keccak256` cost constants, otherwise we use the `sha256` cost constants. -/// gas cost: ecdsa_k1_ecrecover_cost_base | covers various -/// fixed costs in the oper -/// + ecdsa_k1_ecrecover_msg_cost_per_byte * size_of(msg) | -/// covers cost of operating on each byte of `msg` -/// + ecdsa_k1_ecrecover_msg_cost_per_block * num_blocks(msg) | -/// covers cost of operating on each block in `msg` -/// Note: each block is of size `KECCAK256_BLOCK_SIZE` bytes for `keccak256` and -/// `SHA256_BLOCK_SIZE` for `sha256`, and we round up. `signature` is -/// fixed size, so the cost is included in the base cost. ********************** -/// ************************************************************************* -pub fn ecrecover( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 3); - - let hash = pop_arg!(args, u8); - - // Load the cost parameters from the protocol config - let (ecdsa_k1_ecrecover_cost_params, crypto_invalid_arguments_cost) = { - let cost_table = &context.extensions().get::(); - ( - cost_table.ecdsa_k1_ecrecover_cost_params.clone(), - cost_table.crypto_invalid_arguments_cost, - ) - }; - let (base_cost, cost_per_byte, cost_per_block, block_size) = match hash { - KECCAK256 => ( - ecdsa_k1_ecrecover_cost_params.ecdsa_k1_ecrecover_keccak256_cost_base, - ecdsa_k1_ecrecover_cost_params.ecdsa_k1_ecrecover_keccak256_msg_cost_per_byte, - ecdsa_k1_ecrecover_cost_params.ecdsa_k1_ecrecover_keccak256_msg_cost_per_block, - KECCAK256_BLOCK_SIZE, - ), - SHA256 => ( - ecdsa_k1_ecrecover_cost_params.ecdsa_k1_ecrecover_sha256_cost_base, - ecdsa_k1_ecrecover_cost_params.ecdsa_k1_ecrecover_sha256_msg_cost_per_byte, - ecdsa_k1_ecrecover_cost_params.ecdsa_k1_ecrecover_sha256_msg_cost_per_block, - SHA256_BLOCK_SIZE, - ), - _ => { - // Charge for failure but dont fail if we run out of gas otherwise the actual - // error is masked by OUT_OF_GAS error - context.charge_gas(crypto_invalid_arguments_cost); - return Ok(NativeResult::err( - context.gas_used(), - FAIL_TO_RECOVER_PUBKEY, - )); - } - }; - - // Charge the base cost for this oper - native_charge_gas_early_exit!(context, base_cost); - - let msg = pop_arg!(args, VectorRef); - let signature = pop_arg!(args, VectorRef); - - let msg_ref = msg.as_bytes_ref(); - let signature_ref = signature.as_bytes_ref(); - - // Charge the arg size dependent costs - native_charge_gas_early_exit!( - context, - cost_per_byte * (msg_ref.len() as u64).into() - + cost_per_block * (((msg_ref.len() + block_size - 1) / block_size) as u64).into() - ); - - let cost = context.gas_used(); - - let Ok(sig) = ::from_bytes(&signature_ref) else { - return Ok(NativeResult::err(cost, INVALID_SIGNATURE)); - }; - - let pk = match hash { - KECCAK256 => sig.recover_with_hash::(&msg_ref), - SHA256 => sig.recover_with_hash::(&msg_ref), - _ => Err(FastCryptoError::InvalidInput), // We should never reach here - }; - - match pk { - Ok(pk) => Ok(NativeResult::ok(cost, smallvec![Value::vector_u8( - pk.as_bytes().to_vec() - )])), - Err(_) => Ok(NativeResult::err(cost, FAIL_TO_RECOVER_PUBKEY)), - } -} - -#[derive(Clone)] -pub struct EcdsaK1DecompressPubkeyCostParams { - pub ecdsa_k1_decompress_pubkey_cost_base: InternalGas, -} -pub fn decompress_pubkey( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 1); - - // Load the cost parameters from the protocol config - let ecdsa_k1_decompress_pubkey_cost_params = &context - .extensions() - .get::() - .ecdsa_k1_decompress_pubkey_cost_params - .clone(); - // Charge the base cost for this oper - native_charge_gas_early_exit!( - context, - ecdsa_k1_decompress_pubkey_cost_params.ecdsa_k1_decompress_pubkey_cost_base - ); - - let pubkey = pop_arg!(args, VectorRef); - let pubkey_ref = pubkey.as_bytes_ref(); - - let cost = context.gas_used(); - - match Secp256k1PublicKey::from_bytes(&pubkey_ref) { - Ok(pubkey) => { - let uncompressed = &pubkey.pubkey.serialize_uncompressed(); - Ok(NativeResult::ok(cost, smallvec![Value::vector_u8( - uncompressed.to_vec() - )])) - } - Err(_) => Ok(NativeResult::err(cost, INVALID_PUBKEY)), - } -} - -#[derive(Clone)] -pub struct EcdsaK1Secp256k1VerifyCostParams { - /// Base cost for invoking the `secp256k1_verify` function with `hash=0` - /// implying KECCAK256 - pub ecdsa_k1_secp256k1_verify_keccak256_cost_base: InternalGas, - /// Cost per byte of `msg` with `hash=0`implying KECCAK256 - pub ecdsa_k1_secp256k1_verify_keccak256_msg_cost_per_byte: InternalGas, - /// Cost per block of `msg` with `hash=0`implying KECCAK256, with block - /// size = 136 - pub ecdsa_k1_secp256k1_verify_keccak256_msg_cost_per_block: InternalGas, - - /// Base cost for invoking the `secp256k1_verify` function with `hash=1` - /// implying SHA256 - pub ecdsa_k1_secp256k1_verify_sha256_cost_base: InternalGas, - /// Cost per byte of `msg` with `hash=1`implying SHA256 - pub ecdsa_k1_secp256k1_verify_sha256_msg_cost_per_byte: InternalGas, - /// Cost per block of `msg` with `hash=1`implying SHA256, with block size = - /// 64 - pub ecdsa_k1_secp256k1_verify_sha256_msg_cost_per_block: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun secp256k1_verify -/// Implementation of the Move native function `secp256k1_verify(signature: -/// &vector, public_key: &vector, msg: &vector, hash: u8): bool` -/// This function has two cost modes depending on the hash being set -/// to`KECCAK256` or `SHA256`. The core formula is same but constants differ. If -/// hash = 0, we use the `keccak256` cost constants, otherwise we use the -/// `sha256` cost constants. gas cost: ecdsa_k1_secp256k1_verify_cost_base -/// | covers various fixed costs in the oper -/// + ecdsa_k1_secp256k1_verify_msg_cost_per_byte * size_of(msg) -/// | covers cost of operating on each byte of `msg` -/// + ecdsa_k1_secp256k1_verify_msg_cost_per_block * -/// num_blocks(msg) | covers cost of operating on each block -/// in `msg` -/// Note: each block is of size `KECCAK256_BLOCK_SIZE` bytes for `keccak256` and -/// `SHA256_BLOCK_SIZE` for `sha256`, and we round up. `signature` and -/// `public_key` are fixed size, so their costs are included in the base cost. -/// **************************************************************************** -/// ******************* -pub fn secp256k1_verify( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 4); - - let hash = pop_arg!(args, u8); - - // Load the cost parameters from the protocol config - let (ecdsa_k1_secp256k1_verify_cost_params, crypto_invalid_arguments_cost) = { - let cost_table = &context.extensions().get::(); - ( - cost_table.ecdsa_k1_secp256k1_verify_cost_params.clone(), - cost_table.crypto_invalid_arguments_cost, - ) - }; - - let (base_cost, cost_per_byte, cost_per_block, block_size) = match hash { - KECCAK256 => ( - ecdsa_k1_secp256k1_verify_cost_params.ecdsa_k1_secp256k1_verify_keccak256_cost_base, - ecdsa_k1_secp256k1_verify_cost_params - .ecdsa_k1_secp256k1_verify_keccak256_msg_cost_per_byte, - ecdsa_k1_secp256k1_verify_cost_params - .ecdsa_k1_secp256k1_verify_keccak256_msg_cost_per_block, - KECCAK256_BLOCK_SIZE, - ), - SHA256 => ( - ecdsa_k1_secp256k1_verify_cost_params.ecdsa_k1_secp256k1_verify_sha256_cost_base, - ecdsa_k1_secp256k1_verify_cost_params - .ecdsa_k1_secp256k1_verify_sha256_msg_cost_per_byte, - ecdsa_k1_secp256k1_verify_cost_params - .ecdsa_k1_secp256k1_verify_sha256_msg_cost_per_block, - SHA256_BLOCK_SIZE, - ), - _ => { - // Charge for failure but dont fail if we run out of gas otherwise the actual - // error is masked by OUT_OF_GAS error - context.charge_gas(crypto_invalid_arguments_cost); - - return Ok(NativeResult::ok(context.gas_used(), smallvec![ - Value::bool(false) - ])); - } - }; - // Charge the base cost for this oper - native_charge_gas_early_exit!(context, base_cost); - - let msg = pop_arg!(args, VectorRef); - let public_key_bytes = pop_arg!(args, VectorRef); - let signature_bytes = pop_arg!(args, VectorRef); - - let msg_ref = msg.as_bytes_ref(); - let public_key_bytes_ref = public_key_bytes.as_bytes_ref(); - let signature_bytes_ref = signature_bytes.as_bytes_ref(); - - // Charge the arg size dependent costs - native_charge_gas_early_exit!( - context, - cost_per_byte * (msg_ref.len() as u64).into() - + cost_per_block * (((msg_ref.len() + block_size - 1) / block_size) as u64).into() - ); - - let cost = context.gas_used(); - - let Ok(sig) = ::from_bytes(&signature_bytes_ref) else { - return Ok(NativeResult::ok(cost, smallvec![Value::bool(false)])); - }; - - let Ok(pk) = ::from_bytes(&public_key_bytes_ref) else { - return Ok(NativeResult::ok(cost, smallvec![Value::bool(false)])); - }; - - let result = match hash { - KECCAK256 => pk.verify_with_hash::(&msg_ref, &sig).is_ok(), - SHA256 => pk.verify_with_hash::(&msg_ref, &sig).is_ok(), - _ => false, - }; - - Ok(NativeResult::ok(cost, smallvec![Value::bool(result)])) -} - -/// **************************************************************************** -/// ********************* native fun secp256k1_sign (TEST ONLY) -/// Implementation of the Move native function `secp256k1_sign(private_key: -/// &vector, msg: &vector, hash: u8): vector` This function has two -/// cost modes depending on the hash being set to`KECCAK256` or `SHA256`. The -/// core formula is same but constants differ. If hash = 0, we use the -/// `keccak256` cost constants, otherwise we use the `sha256` cost constants. -/// gas cost: 0 (because it is only for test purposes) -/// **************************************************************************** -/// ******************* -pub fn secp256k1_sign( - _context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 4); - - // The corresponding Move function, iota::ecdsa_k1::secp256k1_sign, is only used - // for testing, so we don't need to charge any gas. - let cost = 0.into(); - - let recoverable = pop_arg!(args, bool); - let hash = pop_arg!(args, u8); - let msg = pop_arg!(args, VectorRef); - let private_key_bytes = pop_arg!(args, VectorRef); - - let msg_ref = msg.as_bytes_ref(); - let private_key_bytes_ref = private_key_bytes.as_bytes_ref(); - - let sk = match ::from_bytes(&private_key_bytes_ref) { - Ok(sk) => sk, - Err(_) => return Ok(NativeResult::err(cost, INVALID_PRIVKEY)), - }; - - let kp = Secp256k1KeyPair::from(sk); - - let signature = match (hash, recoverable) { - (KECCAK256, true) => kp - .sign_recoverable_with_hash::(&msg_ref) - .as_bytes() - .to_vec(), - (KECCAK256, false) => kp.sign_with_hash::(&msg_ref).as_bytes().to_vec(), - (SHA256, true) => kp - .sign_recoverable_with_hash::(&msg_ref) - .as_bytes() - .to_vec(), - (SHA256, false) => kp.sign_with_hash::(&msg_ref).as_bytes().to_vec(), - _ => return Ok(NativeResult::err(cost, INVALID_HASH_FUNCTION)), - }; - - Ok(NativeResult::ok(cost, smallvec![Value::vector_u8( - signature - )])) -} - -/// **************************************************************************** -/// ********************* native fun secp256k1_keypair_from_seed (TEST ONLY) -/// Implementation of the Move native function `secp256k1_sign(seed: -/// &vector): KeyPair` Seed must be exactly 32 bytes long. -/// gas cost: 0 (because it is only for test purposes) -/// **************************************************************************** -/// ******************* -pub fn secp256k1_keypair_from_seed( - _context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 1); - - // The corresponding Move function, iota::ecdsa_k1::secp256k1_keypair_from_seed, - // is only used for testing, so we don't need to charge any gas. - let cost = 0.into(); - - let seed = pop_arg!(args, VectorRef); - let seed_ref = seed.as_bytes_ref(); - - if seed_ref.len() != SEED_LENGTH { - return Ok(NativeResult::err(cost, INVALID_SEED)); - } - let mut seed_array = [0u8; SEED_LENGTH]; - seed_array.clone_from_slice(&seed_ref); - - let kp = Secp256k1KeyPair::generate(&mut StdRng::from_seed(seed_array)); - - let pk_bytes = kp.public().as_bytes().to_vec(); - let sk_bytes = kp.private().as_bytes().to_vec(); - - Ok(NativeResult::ok(cost, smallvec![Value::struct_( - values::Struct::pack(vec![Value::vector_u8(sk_bytes), Value::vector_u8(pk_bytes),]) - )])) -} diff --git a/iota-execution/v0/iota-move-natives/src/crypto/ecdsa_r1.rs b/iota-execution/v0/iota-move-natives/src/crypto/ecdsa_r1.rs deleted file mode 100644 index f680a5ad505..00000000000 --- a/iota-execution/v0/iota-move-natives/src/crypto/ecdsa_r1.rs +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::collections::VecDeque; - -use fastcrypto::{ - error::FastCryptoError, - hash::{Keccak256, Sha256}, - secp256r1::{ - Secp256r1PublicKey, Secp256r1Signature, recoverable::Secp256r1RecoverableSignature, - }, - traits::{RecoverableSignature, ToFromBytes}, -}; -use move_binary_format::errors::PartialVMResult; -use move_core_types::gas_algebra::InternalGas; -use move_vm_runtime::{native_charge_gas_early_exit, native_functions::NativeContext}; -use move_vm_types::{ - loaded_data::runtime_types::Type, - natives::function::NativeResult, - pop_arg, - values::{Value, VectorRef}, -}; -use smallvec::smallvec; - -use crate::NativesCostTable; - -pub const FAIL_TO_RECOVER_PUBKEY: u64 = 0; -pub const INVALID_SIGNATURE: u64 = 1; - -pub const KECCAK256: u8 = 0; -pub const SHA256: u8 = 1; - -const KECCAK256_BLOCK_SIZE: usize = 136; -const SHA256_BLOCK_SIZE: usize = 64; - -#[derive(Clone)] -pub struct EcdsaR1EcrecoverCostParams { - /// Base cost for invoking the `ecrecover` function with `hash=0` implying - /// KECCAK256 - pub ecdsa_r1_ecrecover_keccak256_cost_base: InternalGas, - /// Cost per byte of `msg` with `hash=0`implying KECCAK256 - pub ecdsa_r1_ecrecover_keccak256_msg_cost_per_byte: InternalGas, - /// Cost per block of `msg` with `hash=0`implying KECCAK256, with block - /// size = 136 - pub ecdsa_r1_ecrecover_keccak256_msg_cost_per_block: InternalGas, - - /// Base cost for invoking the `ecrecover` function with `hash=1` implying - /// SHA256 - pub ecdsa_r1_ecrecover_sha256_cost_base: InternalGas, - /// Cost per byte of `msg` with `hash=1`implying SHA256 - pub ecdsa_r1_ecrecover_sha256_msg_cost_per_byte: InternalGas, - /// Cost per block of `msg` with `hash=1`implying SHA256, with block size = - /// 64 - pub ecdsa_r1_ecrecover_sha256_msg_cost_per_block: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun secp256r1_ecrecover -/// Implementation of the Move native function `secp256r1_ecrecover(signature: -/// &vector, msg: &vector, hash: u8): vector` This function has two -/// cost modes depending on the hash being set to `KECCAK256` or `SHA256`. The -/// core formula is same but constants differ. If hash = 0, we use the -/// `keccak256` cost constants, otherwise we use the `sha256` cost constants. -/// gas cost: ecdsa_r1_ecrecover_cost_base | covers various -/// fixed costs in the oper -/// + ecdsa_r1_ecrecover_msg_cost_per_byte * size_of(msg) | -/// covers cost of operating on each byte of `msg` -/// + ecdsa_r1_ecrecover_msg_cost_per_block * num_blocks(msg) | -/// covers cost of operating on each block in `msg` -/// Note: each block is of size `KECCAK256_BLOCK_SIZE` bytes for `keccak256` and -/// `SHA256_BLOCK_SIZE` for `sha256`, and we round up. `signature` is -/// fixed size, so the cost is included in the base cost. ********************** -/// ************************************************************************* -pub fn ecrecover( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 3); - - let hash = pop_arg!(args, u8); - - // Load the cost parameters from the protocol config - let (ecdsa_r1_ecrecover_cost_params, crypto_invalid_arguments_cost) = { - let cost_table = &context.extensions().get::(); - ( - cost_table.ecdsa_r1_ecrecover_cost_params.clone(), - cost_table.crypto_invalid_arguments_cost, - ) - }; - - let (base_cost, cost_per_byte, cost_per_block, block_size) = match hash { - KECCAK256 => ( - ecdsa_r1_ecrecover_cost_params.ecdsa_r1_ecrecover_keccak256_cost_base, - ecdsa_r1_ecrecover_cost_params.ecdsa_r1_ecrecover_keccak256_msg_cost_per_byte, - ecdsa_r1_ecrecover_cost_params.ecdsa_r1_ecrecover_keccak256_msg_cost_per_block, - KECCAK256_BLOCK_SIZE, - ), - SHA256 => ( - ecdsa_r1_ecrecover_cost_params.ecdsa_r1_ecrecover_sha256_cost_base, - ecdsa_r1_ecrecover_cost_params.ecdsa_r1_ecrecover_sha256_msg_cost_per_byte, - ecdsa_r1_ecrecover_cost_params.ecdsa_r1_ecrecover_sha256_msg_cost_per_block, - SHA256_BLOCK_SIZE, - ), - _ => { - // Charge for failure but dont fail if we run out of gas otherwise the actual - // error is masked by OUT_OF_GAS error - context.charge_gas(crypto_invalid_arguments_cost); - - return Ok(NativeResult::err( - context.gas_used(), - FAIL_TO_RECOVER_PUBKEY, - )); - } - }; - - // Charge the base cost for this oper - native_charge_gas_early_exit!(context, base_cost); - - let msg = pop_arg!(args, VectorRef); - let signature = pop_arg!(args, VectorRef); - - let msg_ref = msg.as_bytes_ref(); - let signature_ref = signature.as_bytes_ref(); - - // Charge the arg size dependent costs - native_charge_gas_early_exit!( - context, - cost_per_byte * (msg_ref.len() as u64).into() - + cost_per_block * (((msg_ref.len() + block_size - 1) / block_size) as u64).into() - ); - - let cost = context.gas_used(); - - let Ok(sig) = ::from_bytes(&signature_ref) else { - return Ok(NativeResult::err(cost, INVALID_SIGNATURE)); - }; - - let pk = match hash { - KECCAK256 => sig.recover_with_hash::(&msg_ref), - SHA256 => sig.recover_with_hash::(&msg_ref), - _ => Err(FastCryptoError::InvalidInput), - }; - - match pk { - Ok(pk) => Ok(NativeResult::ok(cost, smallvec![Value::vector_u8( - pk.as_bytes().to_vec() - )])), - Err(_) => Ok(NativeResult::err(cost, FAIL_TO_RECOVER_PUBKEY)), - } -} - -#[derive(Clone)] -pub struct EcdsaR1Secp256R1VerifyCostParams { - /// Base cost for invoking the `secp256r1_verify` function with `hash=0` - /// implying KECCAK256 - pub ecdsa_r1_secp256r1_verify_keccak256_cost_base: InternalGas, - /// Cost per byte of `msg` with `hash=0`implying KECCAK256 - pub ecdsa_r1_secp256r1_verify_keccak256_msg_cost_per_byte: InternalGas, - /// Cost per block of `msg` with `hash=0`implying KECCAK256, with block - /// size = 136 - pub ecdsa_r1_secp256r1_verify_keccak256_msg_cost_per_block: InternalGas, - - /// Base cost for invoking the `secp256r1_verify` function with `hash=1` - /// implying SHA256 - pub ecdsa_r1_secp256r1_verify_sha256_cost_base: InternalGas, - /// Cost per byte of `msg` with `hash=1`implying SHA256 - pub ecdsa_r1_secp256r1_verify_sha256_msg_cost_per_byte: InternalGas, - /// Cost per block of `msg` with `hash=1`implying SHA256, with block size = - /// 64 - pub ecdsa_r1_secp256r1_verify_sha256_msg_cost_per_block: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun secp256r1_verify -/// Implementation of the Move native function `secp256r1_verify(signature: -/// &vector, public_key: &vector, msg: &vector, hash: u8): bool` -/// This function has two cost modes depending on the hash being set to -/// `KECCAK256` or `SHA256`. The core formula is same but constants differ. -/// If hash = 0, we use the `keccak256` cost constants, otherwise we use the -/// `sha256` cost constants. gas cost: ecdsa_r1_secp256r1_verify_cost_base -/// | covers various fixed costs in the oper -/// + ecdsa_r1_secp256r1_verify_msg_cost_per_byte * size_of(msg) -/// | covers cost of operating on each byte of `msg` -/// + ecdsa_r1_secp256r1_verify_msg_cost_per_block * -/// num_blocks(msg) | covers cost of operating on each block -/// in `msg` -/// Note: each block is of size `KECCAK256_BLOCK_SIZE` bytes for `keccak256` and -/// `SHA256_BLOCK_SIZE` for `sha256`, and we round up. `signature` and -/// `public_key` are fixed size, so their costs are included in the base cost. -/// **************************************************************************** -/// ******************* -pub fn secp256r1_verify( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 4); - // Load the cost parameters from the protocol config - let (ecdsa_r1_secp256_r1_verify_cost_params, crypto_invalid_arguments_cost) = { - let cost_table = &context.extensions().get::(); - ( - cost_table.ecdsa_r1_secp256_r1_verify_cost_params.clone(), - cost_table.crypto_invalid_arguments_cost, - ) - }; - let hash = pop_arg!(args, u8); - let (base_cost, cost_per_byte, cost_per_block, block_size) = match hash { - KECCAK256 => ( - ecdsa_r1_secp256_r1_verify_cost_params.ecdsa_r1_secp256r1_verify_keccak256_cost_base, - ecdsa_r1_secp256_r1_verify_cost_params - .ecdsa_r1_secp256r1_verify_keccak256_msg_cost_per_byte, - ecdsa_r1_secp256_r1_verify_cost_params - .ecdsa_r1_secp256r1_verify_keccak256_msg_cost_per_block, - KECCAK256_BLOCK_SIZE, - ), - SHA256 => ( - ecdsa_r1_secp256_r1_verify_cost_params.ecdsa_r1_secp256r1_verify_sha256_cost_base, - ecdsa_r1_secp256_r1_verify_cost_params - .ecdsa_r1_secp256r1_verify_sha256_msg_cost_per_byte, - ecdsa_r1_secp256_r1_verify_cost_params - .ecdsa_r1_secp256r1_verify_sha256_msg_cost_per_block, - SHA256_BLOCK_SIZE, - ), - _ => { - // Charge for failure but dont fail if we run out of gas otherwise the actual - // error is masked by OUT_OF_GAS error - context.charge_gas(crypto_invalid_arguments_cost); - return Ok(NativeResult::ok(context.gas_used(), smallvec![ - Value::bool(false) - ])); - } - }; - - // Charge the base cost for this oper - native_charge_gas_early_exit!(context, base_cost); - - let msg = pop_arg!(args, VectorRef); - let public_key_bytes = pop_arg!(args, VectorRef); - let signature_bytes = pop_arg!(args, VectorRef); - - let msg_ref = msg.as_bytes_ref(); - let public_key_bytes_ref = public_key_bytes.as_bytes_ref(); - let signature_bytes_ref = signature_bytes.as_bytes_ref(); - - // Charge the arg size dependent costs - native_charge_gas_early_exit!( - context, - cost_per_byte * (msg_ref.len() as u64).into() - + cost_per_block * (((msg_ref.len() + block_size - 1) / block_size) as u64).into() - ); - - let cost = context.gas_used(); - - let Ok(sig) = ::from_bytes(&signature_bytes_ref) else { - return Ok(NativeResult::ok(cost, smallvec![Value::bool(false)])); - }; - - let Ok(pk) = ::from_bytes(&public_key_bytes_ref) else { - return Ok(NativeResult::ok(cost, smallvec![Value::bool(false)])); - }; - - let result = match hash { - KECCAK256 => pk.verify_with_hash::(&msg_ref, &sig).is_ok(), - SHA256 => pk.verify_with_hash::(&msg_ref, &sig).is_ok(), - _ => false, - }; - - Ok(NativeResult::ok(cost, smallvec![Value::bool(result)])) -} diff --git a/iota-execution/v0/iota-move-natives/src/crypto/ecvrf.rs b/iota-execution/v0/iota-move-natives/src/crypto/ecvrf.rs deleted file mode 100644 index ebdbf2bbd69..00000000000 --- a/iota-execution/v0/iota-move-natives/src/crypto/ecvrf.rs +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::collections::VecDeque; - -use fastcrypto::vrf::{ - VRFProof, - ecvrf::{ECVRFProof, ECVRFPublicKey}, -}; -use move_binary_format::errors::PartialVMResult; -use move_core_types::gas_algebra::InternalGas; -use move_vm_runtime::{native_charge_gas_early_exit, native_functions::NativeContext}; -use move_vm_types::{ - loaded_data::runtime_types::Type, - natives::function::NativeResult, - pop_arg, - values::{Value, VectorRef}, -}; -use smallvec::smallvec; - -use crate::NativesCostTable; - -pub const INVALID_ECVRF_HASH_LENGTH: u64 = 1; -pub const INVALID_ECVRF_PUBLIC_KEY: u64 = 2; -pub const INVALID_ECVRF_PROOF: u64 = 3; - -const ECVRF_SHA512_BLOCK_SIZE: usize = 128; - -#[derive(Clone)] -pub struct EcvrfEcvrfVerifyCostParams { - /// Base cost for invoking the `ecvrf_verify` - pub ecvrf_ecvrf_verify_cost_base: InternalGas, - /// Cost per byte of `alpha_string` - pub ecvrf_ecvrf_verify_alpha_string_cost_per_byte: InternalGas, - /// Cost per block of `alpha_string` with block size = 128 - pub ecvrf_ecvrf_verify_alpha_string_cost_per_block: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun ecvrf_verify -/// Implementation of the Move native function `ecvrf_verify(hash: &vector, -/// alpha_string: &vector, public_key: &vector, proof: &vector): -/// bool` gas cost: ecvrf_ecvrf_verify_cost_base | covers -/// various fixed costs in the oper -/// + ecvrf_ecvrf_verify_alpha_string_cost_per_byte * -/// size_of(alpha_string) | covers cost of operating on -/// each byte of `alpha_string` -/// + ecvrf_ecvrf_verify_alpha_string_cost_per_block * -/// num_blocks(alpha_string) | covers cost of operating on -/// each block in `alpha_string` -/// Note: each block is of size `ECVRF_SHA512_BLOCK_SIZE` bytes, and we round -/// up. `hash`, `proof`, and `public_key` are fixed size, so their costs -/// are included in the base cost. ********************************************* -/// ************************************************** -pub fn ecvrf_verify( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 4); - - // Load the cost parameters from the protocol config - let ecvrf_ecvrf_verify_cost_params = &context - .extensions() - .get::() - .ecvrf_ecvrf_verify_cost_params - .clone(); - // Charge the base cost for this oper - native_charge_gas_early_exit!( - context, - ecvrf_ecvrf_verify_cost_params.ecvrf_ecvrf_verify_cost_base - ); - - let proof_bytes = pop_arg!(args, VectorRef); - let public_key_bytes = pop_arg!(args, VectorRef); - let alpha_string = pop_arg!(args, VectorRef); - let hash_bytes = pop_arg!(args, VectorRef); - - let alpha_string_len = alpha_string.as_bytes_ref().len(); - // Charge the arg size dependent costs - native_charge_gas_early_exit!( - context, - ecvrf_ecvrf_verify_cost_params.ecvrf_ecvrf_verify_alpha_string_cost_per_byte - * (alpha_string_len as u64).into() - + ecvrf_ecvrf_verify_cost_params.ecvrf_ecvrf_verify_alpha_string_cost_per_block - * (((alpha_string_len + ECVRF_SHA512_BLOCK_SIZE - 1) / ECVRF_SHA512_BLOCK_SIZE) - as u64) - .into() - ); - - let cost = context.gas_used(); - - let Ok(hash) = hash_bytes.as_bytes_ref().as_slice().try_into() else { - return Ok(NativeResult::err(cost, INVALID_ECVRF_HASH_LENGTH)); - }; - - let Ok(public_key) = - bcs::from_bytes::(public_key_bytes.as_bytes_ref().as_slice()) - else { - return Ok(NativeResult::err(cost, INVALID_ECVRF_PUBLIC_KEY)); - }; - - let Ok(proof) = bcs::from_bytes::(proof_bytes.as_bytes_ref().as_slice()) else { - return Ok(NativeResult::err(cost, INVALID_ECVRF_PROOF)); - }; - - let result = proof.verify_output(alpha_string.as_bytes_ref().as_slice(), &public_key, &hash); - Ok(NativeResult::ok(cost, smallvec![Value::bool( - result.is_ok() - )])) -} diff --git a/iota-execution/v0/iota-move-natives/src/crypto/ed25519.rs b/iota-execution/v0/iota-move-natives/src/crypto/ed25519.rs deleted file mode 100644 index abcbd502e6f..00000000000 --- a/iota-execution/v0/iota-move-natives/src/crypto/ed25519.rs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::collections::VecDeque; - -use fastcrypto::{ - ed25519::{Ed25519PublicKey, Ed25519Signature}, - traits::{ToFromBytes, VerifyingKey}, -}; -use move_binary_format::errors::PartialVMResult; -use move_core_types::gas_algebra::InternalGas; -use move_vm_runtime::{native_charge_gas_early_exit, native_functions::NativeContext}; -use move_vm_types::{ - loaded_data::runtime_types::Type, - natives::function::NativeResult, - pop_arg, - values::{Value, VectorRef}, -}; -use smallvec::smallvec; - -use crate::NativesCostTable; - -const ED25519_BLOCK_SIZE: usize = 128; - -#[derive(Clone)] -pub struct Ed25519VerifyCostParams { - /// Base cost for invoking the `ed25519_verify` function - pub ed25519_ed25519_verify_cost_base: InternalGas, - /// Cost per byte of `msg` - pub ed25519_ed25519_verify_msg_cost_per_byte: InternalGas, - /// Cost per block of `msg`, where a block is 128 bytes - pub ed25519_ed25519_verify_msg_cost_per_block: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun ed25519_verify -/// Implementation of the Move native function -/// `ed25519::ed25519_verify(signature: &vector, public_key: &vector, -/// msg: &vector): bool;` gas cost: ed25519_ed25519_verify_cost_base -/// | base cost for function call and fixed opers -/// + ed25519_ed25519_verify_msg_cost_per_byte * msg.len() | cost -/// depends on length of message -/// + ed25519_ed25519_verify_msg_cost_per_block * num_blocks(msg) | -/// cost depends on number of blocks in message -/// Note: each block is of size `ED25519_BLOCK_SIZE` bytes, and we round up. -/// `signature` and `public_key` are fixed size, so their costs are -/// included in the base cost. ************************************************* -/// ********************************************** -pub fn ed25519_verify( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 3); - - // Load the cost parameters from the protocol config - let ed25519_verify_cost_params = &context - .extensions() - .get::() - .ed25519_verify_cost_params - .clone(); - // Charge the base cost for this oper - native_charge_gas_early_exit!( - context, - ed25519_verify_cost_params.ed25519_ed25519_verify_cost_base - ); - - let msg = pop_arg!(args, VectorRef); - let msg_ref = msg.as_bytes_ref(); - let public_key_bytes = pop_arg!(args, VectorRef); - let public_key_bytes_ref = public_key_bytes.as_bytes_ref(); - let signature_bytes = pop_arg!(args, VectorRef); - let signature_bytes_ref = signature_bytes.as_bytes_ref(); - - // Charge the arg size dependent costs - native_charge_gas_early_exit!( - context, - ed25519_verify_cost_params.ed25519_ed25519_verify_msg_cost_per_byte - * (msg_ref.len() as u64).into() - + ed25519_verify_cost_params.ed25519_ed25519_verify_msg_cost_per_block - * (((msg_ref.len() + ED25519_BLOCK_SIZE - 1) / ED25519_BLOCK_SIZE) as u64).into() - ); - let cost = context.gas_used(); - - let Ok(signature) = ::from_bytes(&signature_bytes_ref) else { - return Ok(NativeResult::ok(cost, smallvec![Value::bool(false)])); - }; - - let Ok(public_key) = ::from_bytes(&public_key_bytes_ref) - else { - return Ok(NativeResult::ok(cost, smallvec![Value::bool(false)])); - }; - - Ok(NativeResult::ok(cost, smallvec![Value::bool( - public_key.verify(&msg_ref, &signature).is_ok() - )])) -} diff --git a/iota-execution/v0/iota-move-natives/src/crypto/groth16.rs b/iota-execution/v0/iota-move-natives/src/crypto/groth16.rs deleted file mode 100644 index 0bb0c790a2a..00000000000 --- a/iota-execution/v0/iota-move-natives/src/crypto/groth16.rs +++ /dev/null @@ -1,255 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::collections::VecDeque; - -use move_binary_format::errors::PartialVMResult; -use move_core_types::gas_algebra::InternalGas; -use move_vm_runtime::{native_charge_gas_early_exit, native_functions::NativeContext}; -use move_vm_types::{ - loaded_data::runtime_types::Type, - natives::function::NativeResult, - pop_arg, - values::{self, Value, VectorRef}, -}; -use smallvec::smallvec; - -use crate::NativesCostTable; - -pub const INVALID_VERIFYING_KEY: u64 = 0; -pub const INVALID_CURVE: u64 = 1; -pub const TOO_MANY_PUBLIC_INPUTS: u64 = 2; - -// These must match the corresponding values in iota::groth16::Curve. -pub const BLS12381: u8 = 0; -pub const BN254: u8 = 1; - -// We need to set an upper bound on the number of public inputs to avoid a DoS -// attack -pub const MAX_PUBLIC_INPUTS: usize = 8; - -#[derive(Clone)] -pub struct Groth16PrepareVerifyingKeyCostParams { - pub groth16_prepare_verifying_key_bls12381_cost_base: InternalGas, - pub groth16_prepare_verifying_key_bn254_cost_base: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun prepare_verifying_key_internal -/// Implementation of the Move native function -/// `prepare_verifying_key_internal(curve: u8, verifying_key: &vector): -/// PreparedVerifyingKey` This function has two cost modes depending on the -/// curve being set to `BLS12381` or `BN254`. The core formula is same but -/// constants differ. If curve = 0, we use the `bls12381` cost constants, -/// otherwise we use the `bn254` cost constants. gas cost: -/// groth16_prepare_verifying_key_cost_base | covers various -/// fixed costs in the oper Note: `curve` and `verifying_key` are fixed size, so -/// their costs are included in the base cost. ********************************* -/// ************************************************************** -pub fn prepare_verifying_key_internal( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 2); - - // Load the cost parameters from the protocol config - let (groth16_prepare_verifying_key_cost_params, crypto_invalid_arguments_cost) = { - let cost_table = &context.extensions().get::(); - ( - cost_table.groth16_prepare_verifying_key_cost_params.clone(), - cost_table.crypto_invalid_arguments_cost, - ) - }; - let bytes = pop_arg!(args, VectorRef); - let verifying_key = bytes.as_bytes_ref(); - - let curve = pop_arg!(args, u8); - - // Load the cost parameters from the protocol config - let base_cost = match curve { - BLS12381 => { - groth16_prepare_verifying_key_cost_params - .groth16_prepare_verifying_key_bls12381_cost_base - } - BN254 => { - groth16_prepare_verifying_key_cost_params.groth16_prepare_verifying_key_bn254_cost_base - } - _ => { - // Charge for failure but dont fail if we run out of gas otherwise the actual - // error is masked by OUT_OF_GAS error - context.charge_gas(crypto_invalid_arguments_cost); - return Ok(NativeResult::err(context.gas_used(), INVALID_CURVE)); - } - }; - // Charge the base cost for this oper - native_charge_gas_early_exit!(context, base_cost); - let cost = context.gas_used(); - - let result; - if curve == BLS12381 { - result = fastcrypto_zkp::bls12381::api::prepare_pvk_bytes(&verifying_key); - } else if curve == BN254 { - result = fastcrypto_zkp::bn254::api::prepare_pvk_bytes(&verifying_key); - } else { - return Ok(NativeResult::err(cost, INVALID_CURVE)); - } - - match result { - Ok(pvk) => Ok(NativeResult::ok(cost, smallvec![Value::struct_( - values::Struct::pack(vec![ - Value::vector_u8(pvk[0].to_vec()), - Value::vector_u8(pvk[1].to_vec()), - Value::vector_u8(pvk[2].to_vec()), - Value::vector_u8(pvk[3].to_vec()) - ]) - )])), - Err(_) => Ok(NativeResult::err(cost, INVALID_VERIFYING_KEY)), - } -} - -#[derive(Clone)] -pub struct Groth16VerifyGroth16ProofInternalCostParams { - pub groth16_verify_groth16_proof_internal_bls12381_cost_base: InternalGas, - pub groth16_verify_groth16_proof_internal_bls12381_cost_per_public_input: InternalGas, - - pub groth16_verify_groth16_proof_internal_bn254_cost_base: InternalGas, - pub groth16_verify_groth16_proof_internal_bn254_cost_per_public_input: InternalGas, - - pub groth16_verify_groth16_proof_internal_public_input_cost_per_byte: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun verify_groth16_proof_internal -/// Implementation of the Move native function -/// `verify_groth16_proof_internal(curve: u8, vk_gamma_abc_g1_bytes: -/// &vector, alpha_g1_beta_g2_bytes: &vector, -/// gamma_g2_neg_pc_bytes: &vector, delta_g2_neg_pc_bytes: &vector, -/// public_proof_inputs: &vector, proof_points: -/// &vector): bool` -/// -/// This function has two cost modes depending on the curve being set to -/// `BLS12381` or `BN254`. The core formula is same but constants differ. -/// If curve = 0, we use the `bls12381` cost constants, otherwise we use the -/// `bn254` cost constants. gas cost: groth16_prepare_verifying_key_cost_base -/// | covers various fixed costs in the oper -/// + groth16_verify_groth16_proof_internal_public_input_cost_per_byte -/// * size_of(public_proof_inputs) | covers the cost of verifying each public input per byte -/// + groth16_verify_groth16_proof_internal_cost_per_public_input -/// * num_public_inputs) | -/// covers the cost of -/// verifying each public -/// input per input -/// Note: every other arg is fixed size, so their costs are included in the base -/// cost. ********************************************************************** -/// ************************* -pub fn verify_groth16_proof_internal( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 7); - - // Load the cost parameters from the protocol config - let (groth16_verify_groth16_proof_internal_cost_params, crypto_invalid_arguments_cost) = { - let cost_table = &context.extensions().get::(); - ( - cost_table - .groth16_verify_groth16_proof_internal_cost_params - .clone(), - cost_table.crypto_invalid_arguments_cost, - ) - }; - let bytes5 = pop_arg!(args, VectorRef); - let proof_points = bytes5.as_bytes_ref(); - - let bytes4 = pop_arg!(args, VectorRef); - let public_proof_inputs = bytes4.as_bytes_ref(); - - let bytes3 = pop_arg!(args, VectorRef); - let delta_g2_neg_pc = bytes3.as_bytes_ref(); - - let bytes2 = pop_arg!(args, VectorRef); - let gamma_g2_neg_pc = bytes2.as_bytes_ref(); - - let byte1 = pop_arg!(args, VectorRef); - let alpha_g1_beta_g2 = byte1.as_bytes_ref(); - - let bytes = pop_arg!(args, VectorRef); - let vk_gamma_abc_g1 = bytes.as_bytes_ref(); - - let curve = pop_arg!(args, u8); - - let (base_cost, cost_per_public_input, num_public_inputs) = match curve { - BLS12381 => ( - groth16_verify_groth16_proof_internal_cost_params - .groth16_verify_groth16_proof_internal_bls12381_cost_base, - groth16_verify_groth16_proof_internal_cost_params - .groth16_verify_groth16_proof_internal_bls12381_cost_per_public_input, - (public_proof_inputs.len() + fastcrypto_zkp::bls12381::conversions::SCALAR_SIZE - 1) - / fastcrypto_zkp::bls12381::conversions::SCALAR_SIZE, - ), - BN254 => ( - groth16_verify_groth16_proof_internal_cost_params - .groth16_verify_groth16_proof_internal_bn254_cost_base, - groth16_verify_groth16_proof_internal_cost_params - .groth16_verify_groth16_proof_internal_bn254_cost_per_public_input, - (public_proof_inputs.len() + fastcrypto_zkp::bn254::api::SCALAR_SIZE - 1) - / fastcrypto_zkp::bn254::api::SCALAR_SIZE, - ), - _ => { - // Charge for failure but dont fail if we run out of gas otherwise the actual - // error is masked by OUT_OF_GAS error - context.charge_gas(crypto_invalid_arguments_cost); - return Ok(NativeResult::err(context.gas_budget(), INVALID_CURVE)); - } - }; - // Charge the base cost for this oper - native_charge_gas_early_exit!(context, base_cost); - // Charge the arg size dependent costs - native_charge_gas_early_exit!( - context, - cost_per_public_input * (num_public_inputs as u64).into() - + groth16_verify_groth16_proof_internal_cost_params - .groth16_verify_groth16_proof_internal_public_input_cost_per_byte - * (public_proof_inputs.len() as u64).into() - ); - - let cost = context.gas_used(); - - let result; - if curve == BLS12381 { - if public_proof_inputs.len() - > fastcrypto_zkp::bls12381::conversions::SCALAR_SIZE * MAX_PUBLIC_INPUTS - { - return Ok(NativeResult::err(cost, TOO_MANY_PUBLIC_INPUTS)); - } - result = fastcrypto_zkp::bls12381::api::verify_groth16_in_bytes( - &vk_gamma_abc_g1, - &alpha_g1_beta_g2, - &gamma_g2_neg_pc, - &delta_g2_neg_pc, - &public_proof_inputs, - &proof_points, - ); - } else if curve == BN254 { - if public_proof_inputs.len() > fastcrypto_zkp::bn254::api::SCALAR_SIZE * MAX_PUBLIC_INPUTS { - return Ok(NativeResult::err(cost, TOO_MANY_PUBLIC_INPUTS)); - } - result = fastcrypto_zkp::bn254::api::verify_groth16_in_bytes( - &vk_gamma_abc_g1, - &alpha_g1_beta_g2, - &gamma_g2_neg_pc, - &delta_g2_neg_pc, - &public_proof_inputs, - &proof_points, - ); - } else { - return Ok(NativeResult::err(cost, INVALID_CURVE)); - } - - Ok(NativeResult::ok(cost, smallvec![Value::bool( - result.unwrap_or(false) - )])) -} diff --git a/iota-execution/v0/iota-move-natives/src/crypto/group_ops.rs b/iota-execution/v0/iota-move-natives/src/crypto/group_ops.rs deleted file mode 100644 index 5c8fe823dc1..00000000000 --- a/iota-execution/v0/iota-move-natives/src/crypto/group_ops.rs +++ /dev/null @@ -1,744 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::collections::VecDeque; - -use fastcrypto::{ - error::{FastCryptoError, FastCryptoResult}, - groups::{ - FromTrustedByteArray, GroupElement, HashToGroupElement, MultiScalarMul, Pairing, - bls12381 as bls, - }, - serde_helpers::ToFromByteArray, -}; -use move_binary_format::errors::{PartialVMError, PartialVMResult}; -use move_core_types::{gas_algebra::InternalGas, vm_status::StatusCode}; -use move_vm_runtime::{native_charge_gas_early_exit, native_functions::NativeContext}; -use move_vm_types::{ - loaded_data::runtime_types::Type, - natives::function::NativeResult, - pop_arg, - values::{Value, VectorRef}, -}; -use smallvec::smallvec; - -use crate::{NativesCostTable, object_runtime::ObjectRuntime}; - -pub const NOT_SUPPORTED_ERROR: u64 = 0; -pub const INVALID_INPUT_ERROR: u64 = 1; -pub const INPUT_TOO_LONG_ERROR: u64 = 2; - -fn is_msm_supported(context: &NativeContext) -> bool { - context - .extensions() - .get::() - .protocol_config - .enable_group_ops_native_function_msm() -} - -// Gas related structs and functions. - -#[derive(Clone)] -pub struct GroupOpsCostParams { - // costs for decode and validate - pub bls12381_decode_scalar_cost: Option, - pub bls12381_decode_g1_cost: Option, - pub bls12381_decode_g2_cost: Option, - pub bls12381_decode_gt_cost: Option, - // costs for decode, add, and encode output - pub bls12381_scalar_add_cost: Option, - pub bls12381_g1_add_cost: Option, - pub bls12381_g2_add_cost: Option, - pub bls12381_gt_add_cost: Option, - // costs for decode, sub, and encode output - pub bls12381_scalar_sub_cost: Option, - pub bls12381_g1_sub_cost: Option, - pub bls12381_g2_sub_cost: Option, - pub bls12381_gt_sub_cost: Option, - // costs for decode, mul, and encode output - pub bls12381_scalar_mul_cost: Option, - pub bls12381_g1_mul_cost: Option, - pub bls12381_g2_mul_cost: Option, - pub bls12381_gt_mul_cost: Option, - // costs for decode, div, and encode output - pub bls12381_scalar_div_cost: Option, - pub bls12381_g1_div_cost: Option, - pub bls12381_g2_div_cost: Option, - pub bls12381_gt_div_cost: Option, - // costs for hashing - pub bls12381_g1_hash_to_base_cost: Option, - pub bls12381_g2_hash_to_base_cost: Option, - pub bls12381_g1_hash_to_cost_per_byte: Option, - pub bls12381_g2_hash_to_cost_per_byte: Option, - // costs for encoding the output + base cost for MSM (the |q| doublings) but not decoding - pub bls12381_g1_msm_base_cost: Option, - pub bls12381_g2_msm_base_cost: Option, - // cost that is multiplied with the approximated number of additions - pub bls12381_g1_msm_base_cost_per_input: Option, - pub bls12381_g2_msm_base_cost_per_input: Option, - // limit the length of the input vectors for MSM - pub bls12381_msm_max_len: Option, - // costs for decode, pairing, and encode output - pub bls12381_pairing_cost: Option, -} - -macro_rules! native_charge_gas_early_exit_option { - ($native_context:ident, $cost:expr) => {{ - use move_binary_format::errors::PartialVMError; - use move_core_types::vm_status::StatusCode; - native_charge_gas_early_exit!( - $native_context, - $cost.ok_or_else(|| { - PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message("Gas cost for group ops is missing".to_string()) - })? - ); - }}; -} - -// Next should be aligned with the related Move modules. -#[repr(u8)] -enum Groups { - BLS12381Scalar = 0, - BLS12381G1 = 1, - BLS12381G2 = 2, - BLS12381GT = 3, -} - -impl Groups { - fn from_u8(value: u8) -> Option { - match value { - 0 => Some(Groups::BLS12381Scalar), - 1 => Some(Groups::BLS12381G1), - 2 => Some(Groups::BLS12381G2), - 3 => Some(Groups::BLS12381GT), - _ => None, - } - } -} - -fn parse_untrusted + FromTrustedByteArray, const S: usize>( - e: &[u8], -) -> FastCryptoResult { - G::from_byte_array(e.try_into().map_err(|_| FastCryptoError::InvalidInput)?) -} - -fn parse_trusted + FromTrustedByteArray, const S: usize>( - e: &[u8], -) -> FastCryptoResult { - G::from_trusted_byte_array(e.try_into().map_err(|_| FastCryptoError::InvalidInput)?) -} - -// Binary operations with 2 different types. -fn binary_op_diff< - G1: ToFromByteArray + FromTrustedByteArray, - G2: ToFromByteArray + FromTrustedByteArray, - const S1: usize, - const S2: usize, ->( - op: impl Fn(G1, G2) -> FastCryptoResult, - a1: &[u8], - a2: &[u8], -) -> FastCryptoResult> { - let e1 = parse_trusted::(a1)?; - let e2 = parse_trusted::(a2)?; - let result = op(e1, e2)?; - Ok(result.to_byte_array().to_vec()) -} - -// Binary operations with the same type. -fn binary_op + FromTrustedByteArray, const S: usize>( - op: impl Fn(G, G) -> FastCryptoResult, - a1: &[u8], - a2: &[u8], -) -> FastCryptoResult> { - binary_op_diff::(op, a1, a2) -} - -// TODO: Since in many cases more than one group operation will be performed in -// a single transaction, it might be worth caching the affine representation of -// the group elements and use them to save conversions. - -/// **************************************************************************** -/// ********************* native fun internal_validate -/// Implementation of the Move native function `internal_validate(type: u8, -/// bytes: &vector): bool` gas cost: group_ops_decode_bls12381_X_cost -/// where X is the requested type ********************************************** -/// ************************************************* - -pub fn internal_validate( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 2); - - let cost = context.gas_used(); - - let bytes_ref = pop_arg!(args, VectorRef); - let bytes = bytes_ref.as_bytes_ref(); - let group_type = pop_arg!(args, u8); - - let cost_params = &context - .extensions() - .get::() - .group_ops_cost_params - .clone(); - - let result = match Groups::from_u8(group_type) { - Some(Groups::BLS12381Scalar) => { - native_charge_gas_early_exit_option!(context, cost_params.bls12381_decode_scalar_cost); - parse_untrusted::(&bytes).is_ok() - } - Some(Groups::BLS12381G1) => { - native_charge_gas_early_exit_option!(context, cost_params.bls12381_decode_g1_cost); - parse_untrusted::(&bytes).is_ok() - } - Some(Groups::BLS12381G2) => { - native_charge_gas_early_exit_option!(context, cost_params.bls12381_decode_g2_cost); - parse_untrusted::(&bytes).is_ok() - } - _ => false, - }; - - Ok(NativeResult::ok(cost, smallvec![Value::bool(result)])) -} - -/// **************************************************************************** -/// ********************* native fun internal_add -/// Implementation of the Move native function `internal_add(type: u8, e1: -/// &vector, e2: &vector): vector` gas cost: -/// group_ops_bls12381_X_add_cost where X is the requested type **************** -/// **************************************************************************** -/// *** -pub fn internal_add( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 3); - - let cost = context.gas_used(); - - let e2_ref = pop_arg!(args, VectorRef); - let e2 = e2_ref.as_bytes_ref(); - let e1_ref = pop_arg!(args, VectorRef); - let e1 = e1_ref.as_bytes_ref(); - let group_type = pop_arg!(args, u8); - - let cost_params = &context - .extensions() - .get::() - .group_ops_cost_params - .clone(); - - let result = match Groups::from_u8(group_type) { - Some(Groups::BLS12381Scalar) => { - native_charge_gas_early_exit_option!(context, cost_params.bls12381_scalar_add_cost); - binary_op::(|a, b| Ok(a + b), &e1, &e2) - } - Some(Groups::BLS12381G1) => { - native_charge_gas_early_exit_option!(context, cost_params.bls12381_g1_add_cost); - binary_op::(|a, b| Ok(a + b), &e1, &e2) - } - Some(Groups::BLS12381G2) => { - native_charge_gas_early_exit_option!(context, cost_params.bls12381_g2_add_cost); - binary_op::(|a, b| Ok(a + b), &e1, &e2) - } - Some(Groups::BLS12381GT) => { - native_charge_gas_early_exit_option!(context, cost_params.bls12381_gt_add_cost); - binary_op::(|a, b| Ok(a + b), &e1, &e2) - } - _ => Err(FastCryptoError::InvalidInput), - }; - - match result { - Ok(bytes) => Ok(NativeResult::ok(cost, smallvec![Value::vector_u8(bytes)])), - // Since all Element are validated on construction, this error should never happen unless - // the requested type is wrong or inputs are invalid. - Err(_) => Ok(NativeResult::err(cost, INVALID_INPUT_ERROR)), - } -} - -/// **************************************************************************** -/// ********************* native fun internal_sub -/// Implementation of the Move native function `internal_sub(type: u8, e1: -/// &vector, e2: &vector): vector` gas cost: -/// group_ops_bls12381_X_sub_cost where X is the requested type **************** -/// **************************************************************************** -/// *** -pub fn internal_sub( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 3); - - let cost = context.gas_used(); - - let e2_ref = pop_arg!(args, VectorRef); - let e2 = e2_ref.as_bytes_ref(); - let e1_ref = pop_arg!(args, VectorRef); - let e1 = e1_ref.as_bytes_ref(); - let group_type = pop_arg!(args, u8); - - let cost_params = &context - .extensions() - .get::() - .group_ops_cost_params - .clone(); - - let result = match Groups::from_u8(group_type) { - Some(Groups::BLS12381Scalar) => { - native_charge_gas_early_exit_option!(context, cost_params.bls12381_scalar_sub_cost); - binary_op::(|a, b| Ok(a - b), &e1, &e2) - } - Some(Groups::BLS12381G1) => { - native_charge_gas_early_exit_option!(context, cost_params.bls12381_g1_sub_cost); - binary_op::(|a, b| Ok(a - b), &e1, &e2) - } - Some(Groups::BLS12381G2) => { - native_charge_gas_early_exit_option!(context, cost_params.bls12381_g2_sub_cost); - binary_op::(|a, b| Ok(a - b), &e1, &e2) - } - Some(Groups::BLS12381GT) => { - native_charge_gas_early_exit_option!(context, cost_params.bls12381_gt_sub_cost); - binary_op::(|a, b| Ok(a - b), &e1, &e2) - } - _ => Err(FastCryptoError::InvalidInput), - }; - - match result { - Ok(bytes) => Ok(NativeResult::ok(cost, smallvec![Value::vector_u8(bytes)])), - // Since all Element are validated on construction, this error should never happen unless - // the requested type is wrong or inputs are invalid. - Err(_) => Ok(NativeResult::err(cost, INVALID_INPUT_ERROR)), - } -} - -/// **************************************************************************** -/// ********************* native fun internal_mul -/// Implementation of the Move native function `internal_mul(type: u8, e1: -/// &vector, e2: &vector): vector` gas cost: -/// group_ops_bls12381_X_mul_cost where X is the requested type **************** -/// **************************************************************************** -/// *** -pub fn internal_mul( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 3); - - let cost = context.gas_used(); - - let e2_ref = pop_arg!(args, VectorRef); - let e2 = e2_ref.as_bytes_ref(); - let e1_ref = pop_arg!(args, VectorRef); - let e1 = e1_ref.as_bytes_ref(); - let group_type = pop_arg!(args, u8); - - let cost_params = &context - .extensions() - .get::() - .group_ops_cost_params - .clone(); - - let result = match Groups::from_u8(group_type) { - Some(Groups::BLS12381Scalar) => { - native_charge_gas_early_exit_option!(context, cost_params.bls12381_scalar_mul_cost); - binary_op::(|a, b| Ok(b * a), &e1, &e2) - } - Some(Groups::BLS12381G1) => { - native_charge_gas_early_exit_option!(context, cost_params.bls12381_g1_mul_cost); - binary_op_diff::< - bls::Scalar, - bls::G1Element, - { bls::Scalar::BYTE_LENGTH }, - { bls::G1Element::BYTE_LENGTH }, - >(|a, b| Ok(b * a), &e1, &e2) - } - Some(Groups::BLS12381G2) => { - native_charge_gas_early_exit_option!(context, cost_params.bls12381_g2_mul_cost); - binary_op_diff::< - bls::Scalar, - bls::G2Element, - { bls::Scalar::BYTE_LENGTH }, - { bls::G2Element::BYTE_LENGTH }, - >(|a, b| Ok(b * a), &e1, &e2) - } - Some(Groups::BLS12381GT) => { - native_charge_gas_early_exit_option!(context, cost_params.bls12381_gt_mul_cost); - binary_op_diff::< - bls::Scalar, - bls::GTElement, - { bls::Scalar::BYTE_LENGTH }, - { bls::GTElement::BYTE_LENGTH }, - >(|a, b| Ok(b * a), &e1, &e2) - } - _ => Err(FastCryptoError::InvalidInput), - }; - - match result { - Ok(bytes) => Ok(NativeResult::ok(cost, smallvec![Value::vector_u8(bytes)])), - // Since all Element are validated on construction, this error should never happen unless - // the requested type is wrong or inputs are invalid. - Err(_) => Ok(NativeResult::err(cost, INVALID_INPUT_ERROR)), - } -} - -/// **************************************************************************** -/// ********************* native fun internal_div -/// Implementation of the Move native function `internal_div(type: u8, e1: -/// &vector, e2: &vector): vector` gas cost: -/// group_ops_bls12381_X_div_cost where X is the requested type **************** -/// **************************************************************************** -/// *** -pub fn internal_div( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 3); - - let cost = context.gas_used(); - - let e2_ref = pop_arg!(args, VectorRef); - let e2 = e2_ref.as_bytes_ref(); - let e1_ref = pop_arg!(args, VectorRef); - let e1 = e1_ref.as_bytes_ref(); - let group_type = pop_arg!(args, u8); - - let cost_params = &context - .extensions() - .get::() - .group_ops_cost_params - .clone(); - - let result = match Groups::from_u8(group_type) { - Some(Groups::BLS12381Scalar) => { - native_charge_gas_early_exit_option!(context, cost_params.bls12381_scalar_div_cost); - binary_op::(|a, b| b / a, &e1, &e2) - } - Some(Groups::BLS12381G1) => { - native_charge_gas_early_exit_option!(context, cost_params.bls12381_g1_div_cost); - binary_op_diff::< - bls::Scalar, - bls::G1Element, - { bls::Scalar::BYTE_LENGTH }, - { bls::G1Element::BYTE_LENGTH }, - >(|a, b| b / a, &e1, &e2) - } - Some(Groups::BLS12381G2) => { - native_charge_gas_early_exit_option!(context, cost_params.bls12381_g2_div_cost); - binary_op_diff::< - bls::Scalar, - bls::G2Element, - { bls::Scalar::BYTE_LENGTH }, - { bls::G2Element::BYTE_LENGTH }, - >(|a, b| b / a, &e1, &e2) - } - Some(Groups::BLS12381GT) => { - native_charge_gas_early_exit_option!(context, cost_params.bls12381_gt_div_cost); - binary_op_diff::< - bls::Scalar, - bls::GTElement, - { bls::Scalar::BYTE_LENGTH }, - { bls::GTElement::BYTE_LENGTH }, - >(|a, b| b / a, &e1, &e2) - } - _ => Err(FastCryptoError::InvalidInput), - }; - - match result { - Ok(bytes) => Ok(NativeResult::ok(cost, smallvec![Value::vector_u8(bytes)])), - // Since all Element are validated on construction, this error should never happen unless - // the requested type is wrong, inputs are invalid, or a=0. - Err(_) => Ok(NativeResult::err(cost, INVALID_INPUT_ERROR)), - } -} - -#[rustfmt::skip] -// native fun internal_hash_to -// Implementation of the Move native function `internal_hash_to(type: u8, m: &vector): vector` -// gas cost: group_ops_bls12381_X_hash_to_base_cost + group_ops_bls12381_X_hash_to_cost_per_byte * |input| -// where X is the requested type -pub fn internal_hash_to( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 2); - - let cost = context.gas_used(); - - let m_ref = pop_arg!(args, VectorRef); - let m = m_ref.as_bytes_ref(); - let group_type = pop_arg!(args, u8); - - if m.is_empty() { - return Ok(NativeResult::err(cost, INVALID_INPUT_ERROR)); - } - - let cost_params = &context - .extensions() - .get::() - .group_ops_cost_params - .clone(); - - let result = match Groups::from_u8(group_type) { - Some(Groups::BLS12381G1) => { - native_charge_gas_early_exit_option!( - context, - cost_params - .bls12381_g1_hash_to_base_cost - .and_then(|base_cost| cost_params - .bls12381_g1_hash_to_cost_per_byte - .map(|per_byte| base_cost + per_byte * (m.len() as u64).into())) - ); - Ok(bls::G1Element::hash_to_group_element(&m) - .to_byte_array() - .to_vec()) - } - Some(Groups::BLS12381G2) => { - native_charge_gas_early_exit_option!( - context, - cost_params - .bls12381_g2_hash_to_base_cost - .and_then(|base_cost| cost_params - .bls12381_g2_hash_to_cost_per_byte - .map(|per_byte| base_cost + per_byte * (m.len() as u64).into())) - ); - Ok(bls::G2Element::hash_to_group_element(&m) - .to_byte_array() - .to_vec()) - } - _ => Err(FastCryptoError::InvalidInput), - }; - - match result { - Ok(bytes) => Ok(NativeResult::ok(cost, smallvec![Value::vector_u8(bytes)])), - // Since all Element are validated on construction, this error should never happen unless - // the requested type is wrong or inputs are invalid. - Err(_) => Ok(NativeResult::err(cost, INVALID_INPUT_ERROR)), - } -} - -// Based on calculation from https://github.com/supranational/blst/blob/master/src/multi_scalar.c#L270 -fn msm_num_of_additions(n: u64) -> u64 { - debug_assert!(n > 0); - let wbits = (64 - n.leading_zeros() - 1) as u64; - let window_size = match wbits { - 0 => 1, - 1..=4 => 2, - 5..=12 => wbits - 2, - _ => wbits - 3, - }; - let num_of_windows = 255 / window_size + if 255 % window_size == 0 { 0 } else { 1 }; - num_of_windows * (n + (1 << window_size) + 1) -} - -#[test] -fn test_msm_factor() { - assert_eq!(msm_num_of_additions(1), 1020); - assert_eq!(msm_num_of_additions(2), 896); - assert_eq!(msm_num_of_additions(3), 1024); - assert_eq!(msm_num_of_additions(4), 1152); - assert_eq!(msm_num_of_additions(32), 3485); -} - -fn multi_scalar_mul( - context: &mut NativeContext, - scalar_decode_cost: Option, - point_decode_cost: Option, - base_cost: Option, - base_cost_per_addition: Option, - max_len: u32, - scalars: &[u8], - points: &[u8], -) -> PartialVMResult -where - G: GroupElement - + ToFromByteArray - + FromTrustedByteArray - + MultiScalarMul, - G::ScalarType: ToFromByteArray + FromTrustedByteArray, -{ - if points.is_empty() - || scalars.is_empty() - || scalars.len() % SCALAR_SIZE != 0 - || points.len() % POINT_SIZE != 0 - || points.len() / POINT_SIZE != scalars.len() / SCALAR_SIZE - { - return Ok(NativeResult::err(context.gas_used(), INVALID_INPUT_ERROR)); - } - - if points.len() / POINT_SIZE > max_len as usize { - return Ok(NativeResult::err(context.gas_used(), INPUT_TOO_LONG_ERROR)); - } - - native_charge_gas_early_exit_option!( - context, - scalar_decode_cost.map(|cost| cost * ((scalars.len() / SCALAR_SIZE) as u64).into()) - ); - let scalars = scalars - .chunks(SCALAR_SIZE) - .map(parse_trusted::) - .collect::, _>>(); - - native_charge_gas_early_exit_option!( - context, - point_decode_cost.map(|cost| cost * ((points.len() / POINT_SIZE) as u64).into()) - ); - let points = points - .chunks(POINT_SIZE) - .map(parse_trusted::) - .collect::, _>>(); - - if let (Ok(scalars), Ok(points)) = (scalars, points) { - // Checked above that len()>0 - let num_of_additions = msm_num_of_additions(scalars.len() as u64); - native_charge_gas_early_exit_option!( - context, - base_cost.and_then(|base| base_cost_per_addition - .map(|per_addition| base + per_addition * num_of_additions.into())) - ); - - let r = G::multi_scalar_mul(&scalars, &points) - .expect("Already checked the lengths of the vectors"); - Ok(NativeResult::ok(context.gas_used(), smallvec![ - Value::vector_u8(r.to_byte_array().to_vec()) - ])) - } else { - Ok(NativeResult::err(context.gas_used(), INVALID_INPUT_ERROR)) - } -} - -/// **************************************************************************** -/// ********************* native fun internal_multi_scalar_mul -/// Implementation of the Move native function `internal_multi_scalar_mul(type: -/// u8, scalars: &vector, elements: &vector): vector` gas cost: -/// (bls12381_decode_scalar_cost + bls12381_decode_X_cost) * N + -/// bls12381_X_msm_base_cost + bls12381_X_msm_base_cost_per_input * -/// num_of_additions(N) ******************************************************** -/// *************************************** -pub fn internal_multi_scalar_mul( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 3); - - let cost = context.gas_used(); - if !is_msm_supported(context) { - return Ok(NativeResult::err(cost, NOT_SUPPORTED_ERROR)); - } - - let elements_ref = pop_arg!(args, VectorRef); - let elements = elements_ref.as_bytes_ref(); - let scalars_ref = pop_arg!(args, VectorRef); - let scalars = scalars_ref.as_bytes_ref(); - let group_type = pop_arg!(args, u8); - - let cost_params = &context - .extensions() - .get::() - .group_ops_cost_params - .clone(); - - let max_len = cost_params.bls12381_msm_max_len.ok_or_else(|| { - PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message("Max len for MSM is not set".to_string()) - })?; - - // TODO: can potentially improve performance when some of the points are the - // generator. - match Groups::from_u8(group_type) { - Some(Groups::BLS12381G1) => multi_scalar_mul::< - bls::G1Element, - { bls::Scalar::BYTE_LENGTH }, - { bls::G1Element::BYTE_LENGTH }, - >( - context, - cost_params.bls12381_decode_scalar_cost, - cost_params.bls12381_decode_g1_cost, - cost_params.bls12381_g1_msm_base_cost, - cost_params.bls12381_g1_msm_base_cost_per_input, - max_len, - scalars.as_ref(), - elements.as_ref(), - ), - Some(Groups::BLS12381G2) => multi_scalar_mul::< - bls::G2Element, - { bls::Scalar::BYTE_LENGTH }, - { bls::G2Element::BYTE_LENGTH }, - >( - context, - cost_params.bls12381_decode_scalar_cost, - cost_params.bls12381_decode_g2_cost, - cost_params.bls12381_g2_msm_base_cost, - cost_params.bls12381_g2_msm_base_cost_per_input, - max_len, - scalars.as_ref(), - elements.as_ref(), - ), - _ => Ok(NativeResult::err(cost, INVALID_INPUT_ERROR)), - } -} - -/// **************************************************************************** -/// ********************* native fun internal_pairing -/// Implementation of the Move native function `internal_pairing(type:u8, e1: -/// &vector, e2: &vector): vector` gas cost: -/// group_ops_bls12381_pairing_cost ******************************************** -/// *************************************************** -pub fn internal_pairing( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 3); - - let cost = context.gas_used(); - - let e2_ref = pop_arg!(args, VectorRef); - let e2 = e2_ref.as_bytes_ref(); - let e1_ref = pop_arg!(args, VectorRef); - let e1 = e1_ref.as_bytes_ref(); - let group_type = pop_arg!(args, u8); - - let cost_params = &context - .extensions() - .get::() - .group_ops_cost_params - .clone(); - - let result = match Groups::from_u8(group_type) { - Some(Groups::BLS12381G1) => { - native_charge_gas_early_exit_option!(context, cost_params.bls12381_pairing_cost); - parse_trusted::(&e1).and_then(|e1| { - parse_trusted::(&e2).map(|e2| { - let e3 = e1.pairing(&e2); - e3.to_byte_array().to_vec() - }) - }) - } - _ => Err(FastCryptoError::InvalidInput), - }; - - match result { - Ok(bytes) => Ok(NativeResult::ok(cost, smallvec![Value::vector_u8(bytes)])), - // Since all Element are validated on construction, this error should never happen unless - // the requested type is wrong. - Err(_) => Ok(NativeResult::err(cost, INVALID_INPUT_ERROR)), - } -} diff --git a/iota-execution/v0/iota-move-natives/src/crypto/hash.rs b/iota-execution/v0/iota-move-natives/src/crypto/hash.rs deleted file mode 100644 index 8c229194533..00000000000 --- a/iota-execution/v0/iota-move-natives/src/crypto/hash.rs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::{collections::VecDeque, ops::Mul}; - -use fastcrypto::hash::{Blake2b256, HashFunction, Keccak256}; -use move_binary_format::errors::PartialVMResult; -use move_core_types::gas_algebra::InternalGas; -use move_vm_runtime::{native_charge_gas_early_exit, native_functions::NativeContext}; -use move_vm_types::{ - loaded_data::runtime_types::Type, - natives::function::NativeResult, - pop_arg, - values::{Value, VectorRef}, -}; -use smallvec::smallvec; - -use crate::NativesCostTable; - -const BLAKE_2B256_BLOCK_SIZE: u16 = 128; -const KECCAK_256_BLOCK_SIZE: u16 = 136; - -fn hash, const DIGEST_SIZE: usize>( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, - // The caller provides the cost per byte - msg_cost_per_byte: InternalGas, - // The caller provides the cost per block - msg_cost_per_block: InternalGas, - // The caller specifies the block size - block_size: u16, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 1); - - let msg = pop_arg!(args, VectorRef); - let msg_ref = msg.as_bytes_ref(); - - let block_size = block_size as usize; - - // Charge the msg dependent costs - native_charge_gas_early_exit!( - context, - msg_cost_per_byte.mul((msg_ref.len() as u64).into()) - // Round up the blocks - + msg_cost_per_block - .mul((((msg_ref.len() + block_size - 1) / block_size) as u64).into()) - ); - - Ok(NativeResult::ok(context.gas_used(), smallvec![ - Value::vector_u8(H::digest(msg.as_bytes_ref().as_slice()).digest) - ])) -} - -#[derive(Clone)] -pub struct HashKeccak256CostParams { - /// Base cost for invoking the `blake2b256` function - pub hash_keccak256_cost_base: InternalGas, - /// Cost per byte of `data` - pub hash_keccak256_data_cost_per_byte: InternalGas, - /// Cost per block of `data`, where a block is 136 bytes - pub hash_keccak256_data_cost_per_block: InternalGas, -} - -/// **************************************************************************** -/// ********************* native fun keccak256 -/// Implementation of the Move native function `hash::keccak256(data: -/// &vector): vector` gas cost: hash_keccak256_cost_base -/// | base cost for function call and fixed opers -/// + hash_keccak256_data_cost_per_byte * msg.len() | cost -/// depends on length of message -/// + hash_keccak256_data_cost_per_block * num_blocks | cost -/// depends on number of blocks in message -/// **************************************************************************** -/// ******************* -pub fn keccak256( - context: &mut NativeContext, - ty_args: Vec, - args: VecDeque, -) -> PartialVMResult { - // Load the cost parameters from the protocol config - let hash_keccak256_cost_params = &context - .extensions() - .get::() - .hash_keccak256_cost_params - .clone(); - // Charge the base cost for this oper - native_charge_gas_early_exit!(context, hash_keccak256_cost_params.hash_keccak256_cost_base); - - hash::( - context, - ty_args, - args, - hash_keccak256_cost_params.hash_keccak256_data_cost_per_byte, - hash_keccak256_cost_params.hash_keccak256_data_cost_per_block, - KECCAK_256_BLOCK_SIZE, - ) -} - -#[derive(Clone)] -pub struct HashBlake2b256CostParams { - /// Base cost for invoking the `blake2b256` function - pub hash_blake2b256_cost_base: InternalGas, - /// Cost per byte of `data` - pub hash_blake2b256_data_cost_per_byte: InternalGas, - /// Cost per block of `data`, where a block is 128 bytes - pub hash_blake2b256_data_cost_per_block: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun blake2b256 -/// Implementation of the Move native function `hash::blake2b256(data: -/// &vector): vector` gas cost: hash_blake2b256_cost_base -/// | base cost for function call and fixed opers -/// + hash_blake2b256_data_cost_per_byte * msg.len() | cost -/// depends on length of message -/// + hash_blake2b256_data_cost_per_block * num_blocks | cost -/// depends on number of blocks in message -/// **************************************************************************** -/// ******************* -pub fn blake2b256( - context: &mut NativeContext, - ty_args: Vec, - args: VecDeque, -) -> PartialVMResult { - // Load the cost parameters from the protocol config - let hash_blake2b256_cost_params = &context - .extensions() - .get::() - .hash_blake2b256_cost_params - .clone(); - // Charge the base cost for this oper - native_charge_gas_early_exit!( - context, - hash_blake2b256_cost_params.hash_blake2b256_cost_base - ); - - hash::( - context, - ty_args, - args, - hash_blake2b256_cost_params.hash_blake2b256_data_cost_per_byte, - hash_blake2b256_cost_params.hash_blake2b256_data_cost_per_block, - BLAKE_2B256_BLOCK_SIZE, - ) -} diff --git a/iota-execution/v0/iota-move-natives/src/crypto/hmac.rs b/iota-execution/v0/iota-move-natives/src/crypto/hmac.rs deleted file mode 100644 index 42684007dc2..00000000000 --- a/iota-execution/v0/iota-move-natives/src/crypto/hmac.rs +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::collections::VecDeque; - -use fastcrypto::{hmac, traits::ToFromBytes}; -use move_binary_format::errors::PartialVMResult; -use move_core_types::gas_algebra::InternalGas; -use move_vm_runtime::{native_charge_gas_early_exit, native_functions::NativeContext}; -use move_vm_types::{ - loaded_data::runtime_types::Type, - natives::function::NativeResult, - pop_arg, - values::{Value, VectorRef}, -}; -use smallvec::smallvec; - -use crate::NativesCostTable; - -const HMAC_SHA3_256_BLOCK_SIZE: usize = 136; - -#[derive(Clone)] -pub struct HmacHmacSha3256CostParams { - /// Base cost for invoking the `hmac_sha3_256` function - pub hmac_hmac_sha3_256_cost_base: InternalGas, - /// Cost per byte of `msg` and `key` - pub hmac_hmac_sha3_256_input_cost_per_byte: InternalGas, - /// Cost per block of `msg` and `key`, with block size = 136 - pub hmac_hmac_sha3_256_input_cost_per_block: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun ed25519_verify -/// Implementation of the Move native function `hmac_sha3_256(key: &vector, -/// msg: &vector): vector;` gas cost: hmac_hmac_sha3_256_cost_base -/// | base cost for function call and fixed opers -/// + hmac_hmac_sha3_256_input_cost_per_byte * msg.len() | cost -/// depends on length of message -/// + hmac_hmac_sha3_256_input_cost_per_block * num_blocks(msg) | -/// cost depends on number of blocks in message -/// Note: each block is of size `HMAC_SHA3_256_BLOCK_SIZE` bytes, and we round -/// up. `key` is fixed size, so the cost is included in the base cost. -/// **************************************************************************** -/// ******************* -pub fn hmac_sha3_256( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 2); - - // Load the cost parameters from the protocol config - let hmac_hmac_sha3_256_cost_params = &context - .extensions() - .get::() - .hmac_hmac_sha3_256_cost_params - .clone(); - - // Charge the base cost for this operation - native_charge_gas_early_exit!( - context, - hmac_hmac_sha3_256_cost_params.hmac_hmac_sha3_256_cost_base - ); - - let message = pop_arg!(args, VectorRef); - let key = pop_arg!(args, VectorRef); - - let msg_len = message.as_bytes_ref().len(); - let key_len = key.as_bytes_ref().len(); - // Charge the arg size dependent costs - native_charge_gas_early_exit!( - context, - hmac_hmac_sha3_256_cost_params.hmac_hmac_sha3_256_input_cost_per_byte - // same cost for msg and key - * ((msg_len + key_len) as u64).into() - + hmac_hmac_sha3_256_cost_params.hmac_hmac_sha3_256_input_cost_per_block - * ((((msg_len + key_len) + (2 * HMAC_SHA3_256_BLOCK_SIZE - 2)) - / HMAC_SHA3_256_BLOCK_SIZE) as u64) - .into() - ); - - let hmac_key = hmac::HmacKey::from_bytes(&key.as_bytes_ref()) - .expect("HMAC key can be of any length and from_bytes should always succeed"); - let cost = context.gas_used(); - - Ok(NativeResult::ok(cost, smallvec![Value::vector_u8( - hmac::hmac_sha3_256(&hmac_key, &message.as_bytes_ref()).to_vec() - )])) -} diff --git a/iota-execution/v0/iota-move-natives/src/crypto/mod.rs b/iota-execution/v0/iota-move-natives/src/crypto/mod.rs deleted file mode 100644 index f1c55b18bca..00000000000 --- a/iota-execution/v0/iota-move-natives/src/crypto/mod.rs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -pub mod bls12381; -pub mod ecdsa_k1; -pub mod ecdsa_r1; -pub mod ecvrf; -pub mod ed25519; -pub mod groth16; -pub mod group_ops; -pub mod hash; -pub mod hmac; -pub mod poseidon; -pub mod vdf; -pub mod zklogin; diff --git a/iota-execution/v0/iota-move-natives/src/crypto/poseidon.rs b/iota-execution/v0/iota-move-natives/src/crypto/poseidon.rs deleted file mode 100644 index f32c543d980..00000000000 --- a/iota-execution/v0/iota-move-natives/src/crypto/poseidon.rs +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::{collections::VecDeque, ops::Mul}; - -use fastcrypto_zkp::bn254::poseidon::poseidon_bytes; -use move_binary_format::errors::PartialVMResult; -use move_core_types::{gas_algebra::InternalGas, vm_status::StatusCode}; -use move_vm_runtime::{native_charge_gas_early_exit, native_functions::NativeContext}; -use move_vm_types::{ - loaded_data::runtime_types::Type, - natives::function::{NativeResult, PartialVMError}, - pop_arg, - values::{Value, VectorRef}, -}; -use smallvec::smallvec; - -use crate::{NativesCostTable, object_runtime::ObjectRuntime}; - -pub const NON_CANONICAL_INPUT: u64 = 0; -pub const NOT_SUPPORTED_ERROR: u64 = 1; - -fn is_supported(context: &NativeContext) -> bool { - context - .extensions() - .get::() - .protocol_config - .enable_poseidon() -} - -#[derive(Clone)] -pub struct PoseidonBN254CostParams { - /// Base cost for invoking the `poseidon_bn254` function - pub poseidon_bn254_cost_base: Option, - /// Cost per block of `data`, where a block is 32 bytes - pub poseidon_bn254_data_cost_per_block: Option, -} - -/// **************************************************************************** -/// ********************* native fun poseidon_bn254 -/// Implementation of the Move native function -/// `poseidon::poseidon_bn254_internal(data: &vector>): vector -/// gas cost: poseidon_bn254_cost_base | base cost -/// for function call and fixed opers -/// + poseidon_bn254_data_cost_per_block * num_inputs | cost -/// depends on number of inputs -/// **************************************************************************** -/// ******************* -pub fn poseidon_bn254_internal( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - let cost = context.gas_used(); - if !is_supported(context) { - return Ok(NativeResult::err(cost, NOT_SUPPORTED_ERROR)); - } - - // Load the cost parameters from the protocol config - let cost_params = &context - .extensions() - .get::() - .poseidon_bn254_cost_params - .clone(); - - // Charge the base cost for this operation - native_charge_gas_early_exit!( - context, - cost_params - .poseidon_bn254_cost_base - .ok_or_else( - || PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message("Gas cost for poseidon_bn254 not available".to_string()) - )? - ); - - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 1); - - // The input is a reference to a vector of vector's - let inputs = pop_arg!(args, VectorRef); - - let length = inputs - .len(&Type::Vector(Box::new(Type::U8)))? - .value_as::()?; - - // Charge the msg dependent costs - native_charge_gas_early_exit!( - context, - cost_params - .poseidon_bn254_data_cost_per_block - .ok_or_else( - || PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message("Gas cost for poseidon_bn254 not available".to_string()) - )? - .mul(length.into()) - ); - - // Read the input vector - let field_elements = (0..length) - .map(|i| { - let reference = inputs.borrow_elem(i as usize, &Type::Vector(Box::new(Type::U8)))?; - let value = reference.value_as::()?.as_bytes_ref().clone(); - Ok(value) - }) - .collect::, _>>()?; - - match poseidon_bytes(&field_elements) { - Ok(result) => Ok(NativeResult::ok(context.gas_used(), smallvec![ - Value::vector_u8(result) - ])), - // This is also checked in the poseidon_bn254 move function but to be sure we handle it here - // also. - Err(_) => Ok(NativeResult::err(context.gas_used(), NON_CANONICAL_INPUT)), - } -} diff --git a/iota-execution/v0/iota-move-natives/src/crypto/vdf.rs b/iota-execution/v0/iota-move-natives/src/crypto/vdf.rs deleted file mode 100644 index 7b34fe0e82b..00000000000 --- a/iota-execution/v0/iota-move-natives/src/crypto/vdf.rs +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::collections::VecDeque; - -use fastcrypto_vdf::{ - class_group::{QuadraticForm, discriminant::DISCRIMINANT_3072}, - vdf::{VDF, wesolowski::DefaultVDF}, -}; -use move_binary_format::errors::PartialVMResult; -use move_core_types::{gas_algebra::InternalGas, vm_status::StatusCode}; -use move_vm_runtime::{native_charge_gas_early_exit, native_functions::NativeContext}; -use move_vm_types::{ - loaded_data::runtime_types::Type, - natives::function::{NativeResult, PartialVMError}, - pop_arg, - values::{Value, VectorRef}, -}; -use smallvec::smallvec; - -use crate::{NativesCostTable, object_runtime::ObjectRuntime}; - -pub const INVALID_INPUT_ERROR: u64 = 0; -pub const NOT_SUPPORTED_ERROR: u64 = 1; - -fn is_supported(context: &NativeContext) -> bool { - context - .extensions() - .get::() - .protocol_config - .enable_vdf() -} - -#[derive(Clone)] -pub struct VDFCostParams { - pub vdf_verify_cost: Option, - pub hash_to_input_cost: Option, -} - -/// **************************************************************************** -/// ********************* native fun vdf_verify_internal -/// -/// Implementation of the Move native function `vdf::verify_vdf_internal( -/// input: &vector, -/// output: &vector, -/// proof: &vector, -/// iterations: u64): bool` -/// -/// Gas cost: verify_vdf_cost -/// **************************************************************************** -/// ******************* -pub fn vdf_verify_internal( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - let cost = context.gas_used(); - if !is_supported(context) { - return Ok(NativeResult::err(cost, NOT_SUPPORTED_ERROR)); - } - - // Load the cost parameters from the protocol config - let cost_params = &context - .extensions() - .get::() - .vdf_cost_params - .clone(); - - // Charge the base cost for this operation - native_charge_gas_early_exit!( - context, - cost_params - .vdf_verify_cost - .ok_or_else( - || PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message("Gas cost for vdf_verify not available".to_string()) - )? - ); - - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 4); - - // The input is a reference to a vector of vector's - let iterations = pop_arg!(args, u64); - let proof_bytes = pop_arg!(args, VectorRef); - let output_bytes = pop_arg!(args, VectorRef); - let input_bytes = pop_arg!(args, VectorRef); - - let input = match bcs::from_bytes::(&input_bytes.as_bytes_ref()) { - Ok(input) => input, - Err(_) => return Ok(NativeResult::err(context.gas_used(), INVALID_INPUT_ERROR)), - }; - - let proof = match bcs::from_bytes::(&proof_bytes.as_bytes_ref()) { - Ok(proof) => proof, - Err(_) => return Ok(NativeResult::err(context.gas_used(), INVALID_INPUT_ERROR)), - }; - - let output = match bcs::from_bytes::(&output_bytes.as_bytes_ref()) { - Ok(output) => output, - Err(_) => return Ok(NativeResult::err(context.gas_used(), INVALID_INPUT_ERROR)), - }; - - // We use the default VDF construction: Wesolowski's construction using a strong - // Fiat-Shamir construction and a windowed scalar multiplier to speed up the - // proof verification. - let vdf = DefaultVDF::new(DISCRIMINANT_3072.clone(), iterations); - let verified = vdf.verify(&input, &output, &proof).is_ok(); - - Ok(NativeResult::ok(context.gas_used(), smallvec![ - Value::bool(verified) - ])) -} - -/// **************************************************************************** -/// ********************* native fun hash_to_input_internal -/// -/// Implementation of the Move native function -/// `vdf::hash_to_input_internal(message: &vector): vector` -/// -/// Gas cost: hash_to_input_cost -/// **************************************************************************** -/// ******************* -pub fn hash_to_input_internal( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - let cost = context.gas_used(); - if !is_supported(context) { - return Ok(NativeResult::err(cost, NOT_SUPPORTED_ERROR)); - } - - // Load the cost parameters from the protocol config - let cost_params = &context - .extensions() - .get::() - .vdf_cost_params - .clone(); - - // Charge the base cost for this operation - native_charge_gas_early_exit!( - context, - cost_params - .hash_to_input_cost - .ok_or_else( - || PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message("Gas cost for hash_to_input not available".to_string()) - )? - ); - - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 1); - - let message = pop_arg!(args, VectorRef); - - let output = match QuadraticForm::hash_to_group_with_default_parameters( - &message.as_bytes_ref(), - &DISCRIMINANT_3072, - ) { - Ok(output) => output, - Err(_) => return Ok(NativeResult::err(context.gas_used(), INVALID_INPUT_ERROR)), - }; - - let output_bytes = match bcs::to_bytes(&output) { - Ok(bytes) => bytes, - // This should only fail on extremely large inputs, so we treat it as an invalid input error - Err(_) => return Ok(NativeResult::err(context.gas_used(), INVALID_INPUT_ERROR)), - }; - - Ok(NativeResult::ok(context.gas_used(), smallvec![ - Value::vector_u8(output_bytes) - ])) -} diff --git a/iota-execution/v0/iota-move-natives/src/crypto/zklogin.rs b/iota-execution/v0/iota-move-natives/src/crypto/zklogin.rs deleted file mode 100644 index 28d54d78917..00000000000 --- a/iota-execution/v0/iota-move-natives/src/crypto/zklogin.rs +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::collections::VecDeque; - -use fastcrypto::error::FastCryptoError; -use move_binary_format::errors::PartialVMResult; -use move_core_types::{ - account_address::AccountAddress, gas_algebra::InternalGas, u256::U256, vm_status::StatusCode, -}; -use move_vm_runtime::{native_charge_gas_early_exit, native_functions::NativeContext}; -use move_vm_types::{ - loaded_data::runtime_types::Type, - natives::function::{NativeResult, PartialVMError}, - pop_arg, - values::{Value, VectorRef}, -}; -use smallvec::smallvec; - -use crate::NativesCostTable; - -pub const INVALID_INPUT: u64 = 0; - -#[derive(Clone)] -pub struct CheckZkloginIdCostParams { - /// Base cost for invoking the `check_zklogin_id` function - pub check_zklogin_id_cost_base: Option, -} - -/// **************************************************************************** -/// ********************* native fun check_zklogin_id_internal -/// -/// Implementation of the Move native function -/// `zklogin_verified_id::check_zklogin_id_internal( address: address, -/// key_claim_name: &vector, -/// key_claim_value: &vector, -/// issuer: &vector, -/// audience: &vector, -/// pin_hash: u256 -/// ): bool;` -/// -/// Gas cost: check_zklogin_id_cost | The values name, value, iss and aud are -/// hashed as part of this function, but their sizes are bounded from above, so -/// we may assume that the cost is constant. *********************************** -/// ************************************************************ -pub fn check_zklogin_id_internal( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - // Load the cost parameters from the protocol config - let check_zklogin_id_cost_params = &context - .extensions() - .get::() - .check_zklogin_id_cost_params - .clone(); - - // Charge the base cost for this operation - native_charge_gas_early_exit!( - context, - check_zklogin_id_cost_params - .check_zklogin_id_cost_base - .ok_or_else( - || PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message("Gas cost for check_zklogin_id not available".to_string()) - )? - ); - - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 6); - - // Poseidon hash of the user's pin code - let pin_hash = pop_arg!(args, U256); - - // The audience (wallet) id - let audience = pop_arg!(args, VectorRef); - - // The issuer (identity provider) id - let issuer = pop_arg!(args, VectorRef); - - // The claim value (sub, email, etc) - let key_claim_value = pop_arg!(args, VectorRef); - - // The claim name (sub, email, etc) - let key_claim_name = pop_arg!(args, VectorRef); - - // The address to check - let address = pop_arg!(args, AccountAddress); - - let result = check_id_internal( - &address, - &key_claim_name.as_bytes_ref(), - &key_claim_value.as_bytes_ref(), - &audience.as_bytes_ref(), - &issuer.as_bytes_ref(), - &pin_hash, - ); - - match result { - Ok(result) => Ok(NativeResult::ok(context.gas_used(), smallvec![ - Value::bool(result) - ])), - Err(_) => Ok(NativeResult::err(context.gas_used(), INVALID_INPUT)), - } -} - -fn check_id_internal( - address: &AccountAddress, - key_claim_name: &[u8], - key_claim_value: &[u8], - audience: &[u8], - issuer: &[u8], - pin_hash: &U256, -) -> Result { - match fastcrypto_zkp::bn254::zk_login_api::verify_zk_login_id( - &address.into_bytes(), - std::str::from_utf8(key_claim_name).map_err(|_| FastCryptoError::InvalidInput)?, - std::str::from_utf8(key_claim_value).map_err(|_| FastCryptoError::InvalidInput)?, - std::str::from_utf8(audience).map_err(|_| FastCryptoError::InvalidInput)?, - std::str::from_utf8(issuer).map_err(|_| FastCryptoError::InvalidInput)?, - &pin_hash.to_string(), - ) { - Ok(_) => Ok(true), - Err(FastCryptoError::InvalidProof) => Ok(false), - Err(_) => Err(FastCryptoError::InvalidInput), - } -} - -#[derive(Clone)] -pub struct CheckZkloginIssuerCostParams { - /// Base cost for invoking the `check_zklogin_issuer` function - pub check_zklogin_issuer_cost_base: Option, -} - -/// **************************************************************************** -/// ********************* native fun check_zklogin_issuer_internal -/// -/// Implementation of the Move native function -/// `zklogin_verified_issuer::check_zklogin_issuer_internal( address: -/// address, address_seed: u256, -/// issuer: &vector, -/// ): bool;` -/// -/// Gas cost: check_zklogin_issuer_cost | The iss value is hashed as part of -/// this function, but its size is bounded from above so we may assume that the -/// cost is constant. ********************************************************** -/// ************************************* -pub fn check_zklogin_issuer_internal( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - // Load the cost parameters from the protocol config - let check_zklogin_issuer_cost_params = &context - .extensions() - .get::() - .check_zklogin_issuer_cost_params - .clone(); - - // Charge the base cost for this operation - native_charge_gas_early_exit!( - context, - check_zklogin_issuer_cost_params - .check_zklogin_issuer_cost_base - .ok_or_else( - || PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message("Gas cost for check_zklogin_issuer not available".to_string()) - )? - ); - - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 3); - - // The issuer (identity provider) id - let issuer = pop_arg!(args, VectorRef); - - // The audience (wallet) id - let address_seed = pop_arg!(args, U256); - - // The address to check - let address = pop_arg!(args, AccountAddress); - - let result = check_issuer_internal(&address, &address_seed, &issuer.as_bytes_ref()); - - match result { - Ok(result) => Ok(NativeResult::ok(context.gas_used(), smallvec![ - Value::bool(result) - ])), - Err(_) => Ok(NativeResult::err(context.gas_used(), INVALID_INPUT)), - } -} - -fn check_issuer_internal( - address: &AccountAddress, - address_seed: &U256, - issuer: &[u8], -) -> Result { - match fastcrypto_zkp::bn254::zk_login_api::verify_zk_login_iss( - &address.into_bytes(), - &address_seed.to_string(), - std::str::from_utf8(issuer).map_err(|_| FastCryptoError::InvalidInput)?, - ) { - Ok(_) => Ok(true), - Err(FastCryptoError::InvalidProof) => Ok(false), - // This will only happen if the address_seed as a string cannot be converted to a BigInt in - // fastcrypto. This should not happen, so an InvalidInput error from `check_iss_internal` - // implies that the `iss` bytes array could not be parsed as an UTF-8 string. - Err(_) => Err(FastCryptoError::InvalidInput), - } -} diff --git a/iota-execution/v0/iota-move-natives/src/dynamic_field.rs b/iota-execution/v0/iota-move-natives/src/dynamic_field.rs deleted file mode 100644 index e087c44b1a7..00000000000 --- a/iota-execution/v0/iota-move-natives/src/dynamic_field.rs +++ /dev/null @@ -1,537 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::collections::VecDeque; - -use iota_types::{base_types::MoveObjectType, dynamic_field::derive_dynamic_field_id}; -use move_binary_format::errors::{PartialVMError, PartialVMResult}; -use move_core_types::{ - account_address::AccountAddress, - gas_algebra::InternalGas, - language_storage::{StructTag, TypeTag}, - vm_status::StatusCode, -}; -use move_vm_runtime::{native_charge_gas_early_exit, native_functions::NativeContext}; -use move_vm_types::{ - loaded_data::runtime_types::Type, - natives::function::NativeResult, - pop_arg, - values::{StructRef, Value}, -}; -use smallvec::smallvec; -use tracing::instrument; - -use crate::{ - NativesCostTable, get_nested_struct_field, get_object_id, - object_runtime::{ObjectRuntime, object_store::ObjectResult}, -}; - -const E_KEY_DOES_NOT_EXIST: u64 = 1; -const E_FIELD_TYPE_MISMATCH: u64 = 2; -const E_BCS_SERIALIZATION_FAILURE: u64 = 3; - -macro_rules! get_or_fetch_object { - ($context:ident, $ty_args:ident, $parent:ident, $child_id:ident, $ty_cost_per_byte:expr) => {{ - let child_ty = $ty_args.pop().unwrap(); - native_charge_gas_early_exit!( - $context, - $ty_cost_per_byte * u64::from(child_ty.size()).into() - ); - - assert!($ty_args.is_empty()); - let (tag, layout, annotated_layout) = match crate::get_tag_and_layouts($context, &child_ty)? - { - Some(res) => res, - None => { - return Ok(NativeResult::err( - $context.gas_used(), - E_BCS_SERIALIZATION_FAILURE, - )); - } - }; - - let object_runtime: &mut ObjectRuntime = $context.extensions_mut().get_mut(); - object_runtime.get_or_fetch_child_object( - $parent, - $child_id, - &child_ty, - &layout, - &annotated_layout, - MoveObjectType::from(tag), - )? - }}; -} - -#[derive(Clone)] -pub struct DynamicFieldHashTypeAndKeyCostParams { - pub dynamic_field_hash_type_and_key_cost_base: InternalGas, - pub dynamic_field_hash_type_and_key_type_cost_per_byte: InternalGas, - pub dynamic_field_hash_type_and_key_value_cost_per_byte: InternalGas, - pub dynamic_field_hash_type_and_key_type_tag_cost_per_byte: InternalGas, -} - -/// **************************************************************************** -/// ********************* native fun hash_type_and_key -/// Implementation of the Move native function `hash_type_and_key(parent: address, k: K): address` gas cost: -/// dynamic_field_hash_type_and_key_cost_base | -/// covers various fixed costs in the oper -/// + dynamic_field_hash_type_and_key_type_cost_per_byte * -/// size_of(K) | covers cost of operating on the type `K` -/// + dynamic_field_hash_type_and_key_value_cost_per_byte * -/// size_of(k) | covers cost of operating on the value `k` -/// + dynamic_field_hash_type_and_key_type_tag_cost_per_byte * -/// size_of(type_tag(k)) | covers cost of operating on the -/// type tag of `K` -/// **************************************************************************** -/// ******************* -#[instrument(level = "trace", skip_all, err)] -pub fn hash_type_and_key( - context: &mut NativeContext, - mut ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - assert_eq!(ty_args.len(), 1); - assert_eq!(args.len(), 2); - - let dynamic_field_hash_type_and_key_cost_params = context - .extensions_mut() - .get::() - .dynamic_field_hash_type_and_key_cost_params - .clone(); - - // Charge base fee - native_charge_gas_early_exit!( - context, - dynamic_field_hash_type_and_key_cost_params.dynamic_field_hash_type_and_key_cost_base - ); - - let k_ty = ty_args.pop().unwrap(); - let k: Value = args.pop_back().unwrap(); - let parent = pop_arg!(args, AccountAddress); - - // Get size info for costing for derivations, serializations, etc - let k_ty_size = u64::from(k_ty.size()); - let k_value_size = u64::from(k.legacy_size()); - native_charge_gas_early_exit!( - context, - dynamic_field_hash_type_and_key_cost_params - .dynamic_field_hash_type_and_key_type_cost_per_byte - * k_ty_size.into() - + dynamic_field_hash_type_and_key_cost_params - .dynamic_field_hash_type_and_key_value_cost_per_byte - * k_value_size.into() - ); - - let k_tag = context.type_to_type_tag(&k_ty)?; - let k_tag_size = u64::from(k_tag.abstract_size_for_gas_metering()); - - native_charge_gas_early_exit!( - context, - dynamic_field_hash_type_and_key_cost_params - .dynamic_field_hash_type_and_key_type_tag_cost_per_byte - * k_tag_size.into() - ); - - let cost = context.gas_used(); - - let k_layout = match context.type_to_type_layout(&k_ty) { - Ok(Some(layout)) => layout, - _ => return Ok(NativeResult::err(cost, E_BCS_SERIALIZATION_FAILURE)), - }; - let Some(k_bytes) = k.simple_serialize(&k_layout) else { - return Ok(NativeResult::err(cost, E_BCS_SERIALIZATION_FAILURE)); - }; - let Ok(id) = derive_dynamic_field_id(parent, &k_tag, &k_bytes) else { - return Ok(NativeResult::err(cost, E_BCS_SERIALIZATION_FAILURE)); - }; - - Ok(NativeResult::ok(cost, smallvec![Value::address(id.into())])) -} - -#[derive(Clone)] -pub struct DynamicFieldAddChildObjectCostParams { - pub dynamic_field_add_child_object_cost_base: InternalGas, - pub dynamic_field_add_child_object_type_cost_per_byte: InternalGas, - pub dynamic_field_add_child_object_value_cost_per_byte: InternalGas, - pub dynamic_field_add_child_object_struct_tag_cost_per_byte: InternalGas, -} - -/// **************************************************************************** -/// ********************* native fun add_child_object -/// throws `E_KEY_ALREADY_EXISTS` if a child already exists with that ID -/// Implementation of the Move native function `add_child_object(parent: address, child: Child)` gas cost: -/// dynamic_field_add_child_object_cost_base | covers various -/// fixed costs in the oper -/// + dynamic_field_add_child_object_type_cost_per_byte * -/// size_of(Child) | covers cost of operating on the type -/// `Child` -/// + dynamic_field_add_child_object_value_cost_per_byte * -/// size_of(child) | covers cost of operating on the value -/// `child` -/// + dynamic_field_add_child_object_struct_tag_cost_per_byte * -/// size_of(struct)tag(Child)) | covers cost of operating on the -/// struct tag of `Child` -/// **************************************************************************** -/// ******************* -#[instrument(level = "trace", skip_all, err)] -pub fn add_child_object( - context: &mut NativeContext, - mut ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - assert!(ty_args.len() == 1); - assert!(args.len() == 2); - - let dynamic_field_add_child_object_cost_params = context - .extensions_mut() - .get::() - .dynamic_field_add_child_object_cost_params - .clone(); - - // Charge base fee - native_charge_gas_early_exit!( - context, - dynamic_field_add_child_object_cost_params.dynamic_field_add_child_object_cost_base - ); - - let child = args.pop_back().unwrap(); - let parent = pop_arg!(args, AccountAddress).into(); - assert!(args.is_empty()); - - let child_value_size = u64::from(child.legacy_size()); - // ID extraction step - native_charge_gas_early_exit!( - context, - dynamic_field_add_child_object_cost_params - .dynamic_field_add_child_object_value_cost_per_byte - * child_value_size.into() - ); - - // TODO remove this copy_value, which will require VM changes - let child_id = get_object_id(child.copy_value().unwrap()) - .unwrap() - .value_as::() - .unwrap() - .into(); - let child_ty = ty_args.pop().unwrap(); - let child_type_size = u64::from(child_ty.size()); - - native_charge_gas_early_exit!( - context, - dynamic_field_add_child_object_cost_params - .dynamic_field_add_child_object_type_cost_per_byte - * child_type_size.into() - ); - - assert!(ty_args.is_empty()); - let tag = match context.type_to_type_tag(&child_ty)? { - TypeTag::Struct(s) => *s, - _ => { - return Err( - PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message("Iota verifier guarantees this is a struct".to_string()), - ); - } - }; - - let struct_tag_size = u64::from(tag.abstract_size_for_gas_metering()); - native_charge_gas_early_exit!( - context, - dynamic_field_add_child_object_cost_params - .dynamic_field_add_child_object_struct_tag_cost_per_byte - * struct_tag_size.into() - ); - - let object_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut(); - object_runtime.add_child_object( - parent, - child_id, - &child_ty, - MoveObjectType::from(tag), - child, - )?; - Ok(NativeResult::ok(context.gas_used(), smallvec![])) -} - -#[derive(Clone)] -pub struct DynamicFieldBorrowChildObjectCostParams { - pub dynamic_field_borrow_child_object_cost_base: InternalGas, - pub dynamic_field_borrow_child_object_child_ref_cost_per_byte: InternalGas, - pub dynamic_field_borrow_child_object_type_cost_per_byte: InternalGas, -} - -/// **************************************************************************** -/// ********************* native fun borrow_child_object -/// throws `E_KEY_DOES_NOT_EXIST` if a child does not exist with that ID at that -/// type or throws `E_FIELD_TYPE_MISMATCH` if the type does not match (as the -/// runtime does not distinguish different reference types) Implementation of -/// the Move native function `borrow_child_object_mut(parent: &mut -/// UID, id: address): &mut Child` gas cost: -/// dynamic_field_borrow_child_object_cost_base | covers -/// various fixed costs in the oper -/// + dynamic_field_borrow_child_object_child_ref_cost_per_byte * -/// size_of(&Child) | covers cost of fetching and returning -/// `&Child` -/// + dynamic_field_borrow_child_object_type_cost_per_byte * -/// size_of(Child) | covers cost of operating on type -/// `Child` -/// **************************************************************************** -/// ******************* -#[instrument(level = "trace", skip_all, err)] -pub fn borrow_child_object( - context: &mut NativeContext, - mut ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - assert!(ty_args.len() == 1); - assert!(args.len() == 2); - - let dynamic_field_borrow_child_object_cost_params = context - .extensions_mut() - .get::() - .dynamic_field_borrow_child_object_cost_params - .clone(); - native_charge_gas_early_exit!( - context, - dynamic_field_borrow_child_object_cost_params.dynamic_field_borrow_child_object_cost_base - ); - - let child_id = pop_arg!(args, AccountAddress).into(); - - let parent_uid = pop_arg!(args, StructRef).read_ref().unwrap(); - // UID { id: ID { bytes: address } } - let parent = get_nested_struct_field(parent_uid, &[0, 0]) - .unwrap() - .value_as::() - .unwrap() - .into(); - - assert!(args.is_empty()); - let global_value_result = get_or_fetch_object!( - context, - ty_args, - parent, - child_id, - dynamic_field_borrow_child_object_cost_params - .dynamic_field_borrow_child_object_type_cost_per_byte - ); - let global_value = match global_value_result { - ObjectResult::MismatchedType => { - return Ok(NativeResult::err(context.gas_used(), E_FIELD_TYPE_MISMATCH)); - } - ObjectResult::Loaded(gv) => gv, - }; - if !global_value.exists()? { - return Ok(NativeResult::err(context.gas_used(), E_KEY_DOES_NOT_EXIST)); - } - let child_ref = global_value.borrow_global().inspect_err(|err| { - assert!(err.major_status() != StatusCode::MISSING_DATA); - })?; - - native_charge_gas_early_exit!( - context, - dynamic_field_borrow_child_object_cost_params - .dynamic_field_borrow_child_object_child_ref_cost_per_byte - * u64::from(child_ref.legacy_size()).into() - ); - - Ok(NativeResult::ok(context.gas_used(), smallvec![child_ref])) -} - -#[derive(Clone)] -pub struct DynamicFieldRemoveChildObjectCostParams { - pub dynamic_field_remove_child_object_cost_base: InternalGas, - pub dynamic_field_remove_child_object_child_cost_per_byte: InternalGas, - pub dynamic_field_remove_child_object_type_cost_per_byte: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun remove_child_object -/// throws `E_KEY_DOES_NOT_EXIST` if a child does not exist with that ID at that -/// type or throws `E_FIELD_TYPE_MISMATCH` if the type does not match -/// Implementation of the Move native function `remove_child_object(parent: address, id: address): Child` gas cost: -/// dynamic_field_remove_child_object_cost_base | covers -/// various fixed costs in the oper -/// + dynamic_field_remove_child_object_type_cost_per_byte * -/// size_of(Child) | covers cost of operating on type -/// `Child` -/// + dynamic_field_remove_child_object_child_cost_per_byte * -/// size_of(child) | covers cost of fetching and returning -/// value of type `Child` -/// **************************************************************************** -/// ******************* -#[instrument(level = "trace", skip_all, err)] -pub fn remove_child_object( - context: &mut NativeContext, - mut ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - assert!(ty_args.len() == 1); - assert!(args.len() == 2); - - let dynamic_field_remove_child_object_cost_params = context - .extensions_mut() - .get::() - .dynamic_field_remove_child_object_cost_params - .clone(); - native_charge_gas_early_exit!( - context, - dynamic_field_remove_child_object_cost_params.dynamic_field_remove_child_object_cost_base - ); - - let child_id = pop_arg!(args, AccountAddress).into(); - let parent = pop_arg!(args, AccountAddress).into(); - assert!(args.is_empty()); - let global_value_result = get_or_fetch_object!( - context, - ty_args, - parent, - child_id, - dynamic_field_remove_child_object_cost_params - .dynamic_field_remove_child_object_type_cost_per_byte - ); - let global_value = match global_value_result { - ObjectResult::MismatchedType => { - return Ok(NativeResult::err(context.gas_used(), E_FIELD_TYPE_MISMATCH)); - } - ObjectResult::Loaded(gv) => gv, - }; - if !global_value.exists()? { - return Ok(NativeResult::err(context.gas_used(), E_KEY_DOES_NOT_EXIST)); - } - let child = global_value.move_from().inspect_err(|err| { - assert!(err.major_status() != StatusCode::MISSING_DATA); - })?; - - native_charge_gas_early_exit!( - context, - dynamic_field_remove_child_object_cost_params - .dynamic_field_remove_child_object_child_cost_per_byte - * u64::from(child.legacy_size()).into() - ); - - Ok(NativeResult::ok(context.gas_used(), smallvec![child])) -} - -#[derive(Clone)] -pub struct DynamicFieldHasChildObjectCostParams { - // All inputs are constant same size. No need for special costing as this is a lookup - pub dynamic_field_has_child_object_cost_base: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun has_child_object -/// Implementation of the Move native function `has_child_object(parent: -/// address, id: address): bool` gas cost: -/// dynamic_field_has_child_object_cost_base | covers various -/// fixed costs in the oper **************************************************** -/// ******************************************* -#[instrument(level = "trace", skip_all, err)] -pub fn has_child_object( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - assert!(ty_args.is_empty()); - assert!(args.len() == 2); - - let dynamic_field_has_child_object_cost_params = context - .extensions_mut() - .get::() - .dynamic_field_has_child_object_cost_params - .clone(); - native_charge_gas_early_exit!( - context, - dynamic_field_has_child_object_cost_params.dynamic_field_has_child_object_cost_base - ); - - let child_id = pop_arg!(args, AccountAddress).into(); - let parent = pop_arg!(args, AccountAddress).into(); - let object_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut(); - let has_child = object_runtime.child_object_exists(parent, child_id)?; - Ok(NativeResult::ok(context.gas_used(), smallvec![ - Value::bool(has_child) - ])) -} - -#[derive(Clone)] -pub struct DynamicFieldHasChildObjectWithTyCostParams { - pub dynamic_field_has_child_object_with_ty_cost_base: InternalGas, - pub dynamic_field_has_child_object_with_ty_type_cost_per_byte: InternalGas, - pub dynamic_field_has_child_object_with_ty_type_tag_cost_per_byte: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun has_child_object_with_ty -/// Implementation of the Move native function `has_child_object_with_ty(parent: address, id: address): bool` gas cost: -/// dynamic_field_has_child_object_with_ty_cost_base | covers -/// various fixed costs in the oper -/// + dynamic_field_has_child_object_with_ty_type_cost_per_byte * -/// size_of(Child) | covers cost of operating on type -/// `Child` -/// + dynamic_field_has_child_object_with_ty_type_tag_cost_per_byte -/// * size_of(Child) | covers cost of fetching and returning -/// value of type tag for `Child` -/// **************************************************************************** -/// ******************* -#[instrument(level = "trace", skip_all, err)] -pub fn has_child_object_with_ty( - context: &mut NativeContext, - mut ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - assert!(ty_args.len() == 1); - assert!(args.len() == 2); - - let dynamic_field_has_child_object_with_ty_cost_params = context - .extensions_mut() - .get::() - .dynamic_field_has_child_object_with_ty_cost_params - .clone(); - native_charge_gas_early_exit!( - context, - dynamic_field_has_child_object_with_ty_cost_params - .dynamic_field_has_child_object_with_ty_cost_base - ); - - let child_id = pop_arg!(args, AccountAddress).into(); - let parent = pop_arg!(args, AccountAddress).into(); - assert!(args.is_empty()); - let ty = ty_args.pop().unwrap(); - - native_charge_gas_early_exit!( - context, - dynamic_field_has_child_object_with_ty_cost_params - .dynamic_field_has_child_object_with_ty_type_cost_per_byte - * u64::from(ty.size()).into() - ); - - let tag: StructTag = match context.type_to_type_tag(&ty)? { - TypeTag::Struct(s) => *s, - _ => { - return Err( - PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message("Iota verifier guarantees this is a struct".to_string()), - ); - } - }; - - native_charge_gas_early_exit!( - context, - dynamic_field_has_child_object_with_ty_cost_params - .dynamic_field_has_child_object_with_ty_type_tag_cost_per_byte - * u64::from(tag.abstract_size_for_gas_metering()).into() - ); - - let object_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut(); - let has_child = object_runtime.child_object_exists_and_has_type( - parent, - child_id, - &MoveObjectType::from(tag), - )?; - Ok(NativeResult::ok(context.gas_used(), smallvec![ - Value::bool(has_child) - ])) -} diff --git a/iota-execution/v0/iota-move-natives/src/event.rs b/iota-execution/v0/iota-move-natives/src/event.rs deleted file mode 100644 index ea09a3aa9b6..00000000000 --- a/iota-execution/v0/iota-move-natives/src/event.rs +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::collections::VecDeque; - -use iota_types::error::VMMemoryLimitExceededSubStatusCode; -use move_binary_format::errors::{PartialVMError, PartialVMResult}; -use move_core_types::{gas_algebra::InternalGas, language_storage::TypeTag, vm_status::StatusCode}; -use move_vm_runtime::{native_charge_gas_early_exit, native_functions::NativeContext}; -use move_vm_types::{ - loaded_data::runtime_types::Type, natives::function::NativeResult, values::Value, -}; -use smallvec::smallvec; - -use crate::{NativesCostTable, legacy_test_cost, object_runtime::ObjectRuntime}; - -#[derive(Clone, Debug)] -pub struct EventEmitCostParams { - pub event_emit_cost_base: InternalGas, - pub event_emit_value_size_derivation_cost_per_byte: InternalGas, - pub event_emit_tag_size_derivation_cost_per_byte: InternalGas, - pub event_emit_output_cost_per_byte: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun emit -/// Implementation of the Move native function `event::emit(event: T)` Adds an event to the transaction's event log -/// gas cost: event_emit_cost_base | covers various fixed -/// costs in the oper -/// + event_emit_value_size_derivation_cost_per_byte * event_size | -/// derivation of size -/// + event_emit_tag_size_derivation_cost_per_byte * tag_size | -/// converting type -/// + event_emit_output_cost_per_byte * (tag_size + event_size) | -/// emitting the actual event -/// **************************************************************************** -/// ******************* -pub fn emit( - context: &mut NativeContext, - mut ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.len() == 1); - debug_assert!(args.len() == 1); - - let event_emit_cost_params = context - .extensions_mut() - .get::() - .event_emit_cost_params - .clone(); - - native_charge_gas_early_exit!(context, event_emit_cost_params.event_emit_cost_base); - - let ty = ty_args.pop().unwrap(); - let event_value = args.pop_back().unwrap(); - - let event_value_size = event_value.legacy_size(); - - // Deriving event value size can be expensive due to recursion overhead - native_charge_gas_early_exit!( - context, - event_emit_cost_params.event_emit_value_size_derivation_cost_per_byte - * u64::from(event_value_size).into() - ); - - let tag = match context.type_to_type_tag(&ty)? { - TypeTag::Struct(s) => s, - _ => { - return Err( - PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message("Iota verifier guarantees this is a struct".to_string()), - ); - } - }; - let tag_size = tag.abstract_size_for_gas_metering(); - - // Converting type to typetag be expensive due to recursion overhead - native_charge_gas_early_exit!( - context, - event_emit_cost_params.event_emit_tag_size_derivation_cost_per_byte - * u64::from(tag_size).into() - ); - - let obj_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut(); - let max_event_emit_size = obj_runtime.protocol_config.max_event_emit_size(); - let ev_size = u64::from(tag_size + event_value_size); - // Check if the event size is within the limit - if ev_size > max_event_emit_size { - return Err(PartialVMError::new(StatusCode::MEMORY_LIMIT_EXCEEDED) - .with_message(format!( - "Emitting event of size {ev_size} bytes. Limit is {max_event_emit_size} bytes." - )) - .with_sub_status( - VMMemoryLimitExceededSubStatusCode::EVENT_SIZE_LIMIT_EXCEEDED as u64, - )); - } - - // Check that the size contribution of the event is within the total size limit - // This feature is guarded as its only present in some versions - if let Some(max_event_emit_size_total) = obj_runtime - .protocol_config - .max_event_emit_size_total_as_option() - { - let total_events_size = obj_runtime.state.total_events_size() + ev_size; - if total_events_size > max_event_emit_size_total { - return Err(PartialVMError::new(StatusCode::MEMORY_LIMIT_EXCEEDED) - .with_message(format!( - "Reached total event size of size {total_events_size} bytes. Limit is {max_event_emit_size_total} bytes." - )) - .with_sub_status( - VMMemoryLimitExceededSubStatusCode::TOTAL_EVENT_SIZE_LIMIT_EXCEEDED as u64, - )); - } - obj_runtime.state.incr_total_events_size(ev_size); - } - // Emitting an event is cheap since its a vector push - native_charge_gas_early_exit!( - context, - event_emit_cost_params.event_emit_output_cost_per_byte * ev_size.into() - ); - - let obj_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut(); - - obj_runtime.emit_event(ty, *tag, event_value)?; - Ok(NativeResult::ok(context.gas_used(), smallvec![])) -} - -/// Get the all emitted events of type `T`, starting at the specified index -pub fn num_events( - context: &mut NativeContext, - ty_args: Vec, - args: VecDeque, -) -> PartialVMResult { - assert!(ty_args.is_empty()); - assert!(args.is_empty()); - let object_runtime_ref: &ObjectRuntime = context.extensions().get(); - let num_events = object_runtime_ref.state.events().len(); - Ok(NativeResult::ok(legacy_test_cost(), smallvec![Value::u32( - num_events as u32 - )])) -} - -/// Get the all emitted events of type `T`, starting at the specified index -pub fn get_events_by_type( - context: &mut NativeContext, - mut ty_args: Vec, - args: VecDeque, -) -> PartialVMResult { - assert_eq!(ty_args.len(), 1); - let specified_ty = ty_args.pop().unwrap(); - assert!(args.is_empty()); - let object_runtime_ref: &ObjectRuntime = context.extensions().get(); - let matched_events = object_runtime_ref - .state - .events() - .iter() - .filter_map(|(ty, _, event)| { - if specified_ty == *ty { - Some(event.copy_value().unwrap()) - } else { - None - } - }) - .collect::>(); - Ok(NativeResult::ok(legacy_test_cost(), smallvec![ - Value::vector_for_testing_only(matched_events) - ])) -} diff --git a/iota-execution/v0/iota-move-natives/src/lib.rs b/iota-execution/v0/iota-move-natives/src/lib.rs deleted file mode 100644 index 94ff40bd61f..00000000000 --- a/iota-execution/v0/iota-move-natives/src/lib.rs +++ /dev/null @@ -1,1154 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::sync::Arc; - -use better_any::{Tid, TidAble}; -use crypto::vdf::{self, VDFCostParams}; -use iota_protocol_config::ProtocolConfig; -use iota_types::{IOTA_FRAMEWORK_ADDRESS, IOTA_SYSTEM_ADDRESS, MOVE_STDLIB_ADDRESS}; -use move_binary_format::errors::{PartialVMError, PartialVMResult}; -use move_core_types::{ - annotated_value as A, - gas_algebra::InternalGas, - identifier::Identifier, - language_storage::{StructTag, TypeTag}, - runtime_value as R, - vm_status::StatusCode, -}; -use move_stdlib_natives::{self as MSN, GasParameters}; -use move_vm_runtime::native_functions::{NativeContext, NativeFunction, NativeFunctionTable}; -use move_vm_types::{ - loaded_data::runtime_types::Type, - natives::function::NativeResult, - values::{Struct, Value}, -}; -use transfer::TransferReceiveObjectInternalCostParams; - -use self::{ - address::{AddressFromBytesCostParams, AddressFromU256CostParams, AddressToU256CostParams}, - config::ConfigReadSettingImplCostParams, - crypto::{ - bls12381, - bls12381::{Bls12381Bls12381MinPkVerifyCostParams, Bls12381Bls12381MinSigVerifyCostParams}, - ecdsa_k1, - ecdsa_k1::{ - EcdsaK1DecompressPubkeyCostParams, EcdsaK1EcrecoverCostParams, - EcdsaK1Secp256k1VerifyCostParams, - }, - ecdsa_r1, - ecdsa_r1::{EcdsaR1EcrecoverCostParams, EcdsaR1Secp256R1VerifyCostParams}, - ecvrf, - ecvrf::EcvrfEcvrfVerifyCostParams, - ed25519, - ed25519::Ed25519VerifyCostParams, - groth16, - groth16::{ - Groth16PrepareVerifyingKeyCostParams, Groth16VerifyGroth16ProofInternalCostParams, - }, - hash, - hash::{HashBlake2b256CostParams, HashKeccak256CostParams}, - hmac, - hmac::HmacHmacSha3256CostParams, - poseidon, - }, - dynamic_field::{ - DynamicFieldAddChildObjectCostParams, DynamicFieldBorrowChildObjectCostParams, - DynamicFieldHasChildObjectCostParams, DynamicFieldHasChildObjectWithTyCostParams, - DynamicFieldHashTypeAndKeyCostParams, DynamicFieldRemoveChildObjectCostParams, - }, - event::EventEmitCostParams, - object::{BorrowUidCostParams, DeleteImplCostParams, RecordNewIdCostParams}, - transfer::{ - TransferFreezeObjectCostParams, TransferInternalCostParams, TransferShareObjectCostParams, - }, - tx_context::TxContextDeriveIdCostParams, - types::TypesIsOneTimeWitnessCostParams, - validator::ValidatorValidateMetadataBcsCostParams, -}; -use crate::crypto::{ - group_ops, - group_ops::GroupOpsCostParams, - poseidon::PoseidonBN254CostParams, - zklogin, - zklogin::{CheckZkloginIdCostParams, CheckZkloginIssuerCostParams}, -}; - -mod address; -mod config; -mod crypto; -mod dynamic_field; -mod event; -mod object; -pub mod object_runtime; -mod random; -pub mod test_scenario; -mod test_utils; -mod transfer; -mod tx_context; -mod types; -mod validator; - -#[derive(Tid)] -pub struct NativesCostTable { - // Address natives - pub address_from_bytes_cost_params: AddressFromBytesCostParams, - pub address_to_u256_cost_params: AddressToU256CostParams, - pub address_from_u256_cost_params: AddressFromU256CostParams, - - // Config - pub config_read_setting_impl_cost_params: ConfigReadSettingImplCostParams, - - // Dynamic field natives - pub dynamic_field_hash_type_and_key_cost_params: DynamicFieldHashTypeAndKeyCostParams, - pub dynamic_field_add_child_object_cost_params: DynamicFieldAddChildObjectCostParams, - pub dynamic_field_borrow_child_object_cost_params: DynamicFieldBorrowChildObjectCostParams, - pub dynamic_field_remove_child_object_cost_params: DynamicFieldRemoveChildObjectCostParams, - pub dynamic_field_has_child_object_cost_params: DynamicFieldHasChildObjectCostParams, - pub dynamic_field_has_child_object_with_ty_cost_params: - DynamicFieldHasChildObjectWithTyCostParams, - - // Event natives - pub event_emit_cost_params: EventEmitCostParams, - - // Object - pub borrow_uid_cost_params: BorrowUidCostParams, - pub delete_impl_cost_params: DeleteImplCostParams, - pub record_new_id_cost_params: RecordNewIdCostParams, - - // Transfer - pub transfer_transfer_internal_cost_params: TransferInternalCostParams, - pub transfer_freeze_object_cost_params: TransferFreezeObjectCostParams, - pub transfer_share_object_cost_params: TransferShareObjectCostParams, - - // TxContext - pub tx_context_derive_id_cost_params: TxContextDeriveIdCostParams, - - // Type - pub type_is_one_time_witness_cost_params: TypesIsOneTimeWitnessCostParams, - - // Validator - pub validator_validate_metadata_bcs_cost_params: ValidatorValidateMetadataBcsCostParams, - - // Crypto natives - pub crypto_invalid_arguments_cost: InternalGas, - // bls12381 - pub bls12381_bls12381_min_sig_verify_cost_params: Bls12381Bls12381MinSigVerifyCostParams, - pub bls12381_bls12381_min_pk_verify_cost_params: Bls12381Bls12381MinPkVerifyCostParams, - - // ecdsak1 - pub ecdsa_k1_ecrecover_cost_params: EcdsaK1EcrecoverCostParams, - pub ecdsa_k1_decompress_pubkey_cost_params: EcdsaK1DecompressPubkeyCostParams, - pub ecdsa_k1_secp256k1_verify_cost_params: EcdsaK1Secp256k1VerifyCostParams, - - // ecdsar1 - pub ecdsa_r1_ecrecover_cost_params: EcdsaR1EcrecoverCostParams, - pub ecdsa_r1_secp256_r1_verify_cost_params: EcdsaR1Secp256R1VerifyCostParams, - - // ecvrf - pub ecvrf_ecvrf_verify_cost_params: EcvrfEcvrfVerifyCostParams, - - // ed25519 - pub ed25519_verify_cost_params: Ed25519VerifyCostParams, - - // groth16 - pub groth16_prepare_verifying_key_cost_params: Groth16PrepareVerifyingKeyCostParams, - pub groth16_verify_groth16_proof_internal_cost_params: - Groth16VerifyGroth16ProofInternalCostParams, - - // hash - pub hash_blake2b256_cost_params: HashBlake2b256CostParams, - pub hash_keccak256_cost_params: HashKeccak256CostParams, - - // poseidon - pub poseidon_bn254_cost_params: PoseidonBN254CostParams, - - // hmac - pub hmac_hmac_sha3_256_cost_params: HmacHmacSha3256CostParams, - - // group ops - pub group_ops_cost_params: GroupOpsCostParams, - - // vdf - pub vdf_cost_params: VDFCostParams, - - // zklogin - pub check_zklogin_id_cost_params: CheckZkloginIdCostParams, - pub check_zklogin_issuer_cost_params: CheckZkloginIssuerCostParams, - - // Receive object - pub transfer_receive_object_internal_cost_params: TransferReceiveObjectInternalCostParams, -} - -impl NativesCostTable { - pub fn from_protocol_config(protocol_config: &ProtocolConfig) -> NativesCostTable { - Self { - address_from_bytes_cost_params: AddressFromBytesCostParams { - address_from_bytes_cost_base: protocol_config.address_from_bytes_cost_base().into(), - }, - address_to_u256_cost_params: AddressToU256CostParams { - address_to_u256_cost_base: protocol_config.address_to_u256_cost_base().into(), - }, - address_from_u256_cost_params: AddressFromU256CostParams { - address_from_u256_cost_base: protocol_config.address_from_u256_cost_base().into(), - }, - - config_read_setting_impl_cost_params: ConfigReadSettingImplCostParams { - config_read_setting_impl_cost_base: protocol_config - .config_read_setting_impl_cost_base_as_option() - .map(Into::into), - config_read_setting_impl_cost_per_byte: protocol_config - .config_read_setting_impl_cost_per_byte_as_option() - .map(Into::into), - }, - - dynamic_field_hash_type_and_key_cost_params: DynamicFieldHashTypeAndKeyCostParams { - dynamic_field_hash_type_and_key_cost_base: protocol_config - .dynamic_field_hash_type_and_key_cost_base() - .into(), - dynamic_field_hash_type_and_key_type_cost_per_byte: protocol_config - .dynamic_field_hash_type_and_key_type_cost_per_byte() - .into(), - dynamic_field_hash_type_and_key_value_cost_per_byte: protocol_config - .dynamic_field_hash_type_and_key_value_cost_per_byte() - .into(), - dynamic_field_hash_type_and_key_type_tag_cost_per_byte: protocol_config - .dynamic_field_hash_type_and_key_type_tag_cost_per_byte() - .into(), - }, - dynamic_field_add_child_object_cost_params: DynamicFieldAddChildObjectCostParams { - dynamic_field_add_child_object_cost_base: protocol_config - .dynamic_field_add_child_object_cost_base() - .into(), - dynamic_field_add_child_object_type_cost_per_byte: protocol_config - .dynamic_field_add_child_object_type_cost_per_byte() - .into(), - dynamic_field_add_child_object_value_cost_per_byte: protocol_config - .dynamic_field_add_child_object_value_cost_per_byte() - .into(), - dynamic_field_add_child_object_struct_tag_cost_per_byte: protocol_config - .dynamic_field_add_child_object_struct_tag_cost_per_byte() - .into(), - }, - dynamic_field_borrow_child_object_cost_params: - DynamicFieldBorrowChildObjectCostParams { - dynamic_field_borrow_child_object_cost_base: protocol_config - .dynamic_field_borrow_child_object_cost_base() - .into(), - dynamic_field_borrow_child_object_child_ref_cost_per_byte: protocol_config - .dynamic_field_borrow_child_object_child_ref_cost_per_byte() - .into(), - dynamic_field_borrow_child_object_type_cost_per_byte: protocol_config - .dynamic_field_borrow_child_object_type_cost_per_byte() - .into(), - }, - dynamic_field_remove_child_object_cost_params: - DynamicFieldRemoveChildObjectCostParams { - dynamic_field_remove_child_object_cost_base: protocol_config - .dynamic_field_remove_child_object_cost_base() - .into(), - dynamic_field_remove_child_object_child_cost_per_byte: protocol_config - .dynamic_field_remove_child_object_child_cost_per_byte() - .into(), - dynamic_field_remove_child_object_type_cost_per_byte: protocol_config - .dynamic_field_remove_child_object_type_cost_per_byte() - .into(), - }, - dynamic_field_has_child_object_cost_params: DynamicFieldHasChildObjectCostParams { - dynamic_field_has_child_object_cost_base: protocol_config - .dynamic_field_has_child_object_cost_base() - .into(), - }, - dynamic_field_has_child_object_with_ty_cost_params: - DynamicFieldHasChildObjectWithTyCostParams { - dynamic_field_has_child_object_with_ty_cost_base: protocol_config - .dynamic_field_has_child_object_with_ty_cost_base() - .into(), - dynamic_field_has_child_object_with_ty_type_cost_per_byte: protocol_config - .dynamic_field_has_child_object_with_ty_type_cost_per_byte() - .into(), - dynamic_field_has_child_object_with_ty_type_tag_cost_per_byte: protocol_config - .dynamic_field_has_child_object_with_ty_type_tag_cost_per_byte() - .into(), - }, - - event_emit_cost_params: EventEmitCostParams { - event_emit_value_size_derivation_cost_per_byte: protocol_config - .event_emit_value_size_derivation_cost_per_byte() - .into(), - event_emit_tag_size_derivation_cost_per_byte: protocol_config - .event_emit_tag_size_derivation_cost_per_byte() - .into(), - event_emit_output_cost_per_byte: protocol_config - .event_emit_output_cost_per_byte() - .into(), - event_emit_cost_base: protocol_config.event_emit_cost_base().into(), - }, - - borrow_uid_cost_params: BorrowUidCostParams { - object_borrow_uid_cost_base: protocol_config.object_borrow_uid_cost_base().into(), - }, - delete_impl_cost_params: DeleteImplCostParams { - object_delete_impl_cost_base: protocol_config.object_delete_impl_cost_base().into(), - }, - record_new_id_cost_params: RecordNewIdCostParams { - object_record_new_uid_cost_base: protocol_config - .object_record_new_uid_cost_base() - .into(), - }, - - // Crypto - crypto_invalid_arguments_cost: protocol_config.crypto_invalid_arguments_cost().into(), - // ed25519 - ed25519_verify_cost_params: Ed25519VerifyCostParams { - ed25519_ed25519_verify_cost_base: protocol_config - .ed25519_ed25519_verify_cost_base() - .into(), - ed25519_ed25519_verify_msg_cost_per_byte: protocol_config - .ed25519_ed25519_verify_msg_cost_per_byte() - .into(), - ed25519_ed25519_verify_msg_cost_per_block: protocol_config - .ed25519_ed25519_verify_msg_cost_per_block() - .into(), - }, - // hash - hash_blake2b256_cost_params: HashBlake2b256CostParams { - hash_blake2b256_cost_base: protocol_config.hash_blake2b256_cost_base().into(), - hash_blake2b256_data_cost_per_byte: protocol_config - .hash_blake2b256_data_cost_per_byte() - .into(), - hash_blake2b256_data_cost_per_block: protocol_config - .hash_blake2b256_data_cost_per_block() - .into(), - }, - hash_keccak256_cost_params: HashKeccak256CostParams { - hash_keccak256_cost_base: protocol_config.hash_keccak256_cost_base().into(), - hash_keccak256_data_cost_per_byte: protocol_config - .hash_keccak256_data_cost_per_byte() - .into(), - hash_keccak256_data_cost_per_block: protocol_config - .hash_keccak256_data_cost_per_block() - .into(), - }, - transfer_transfer_internal_cost_params: TransferInternalCostParams { - transfer_transfer_internal_cost_base: protocol_config - .transfer_transfer_internal_cost_base() - .into(), - }, - transfer_freeze_object_cost_params: TransferFreezeObjectCostParams { - transfer_freeze_object_cost_base: protocol_config - .transfer_freeze_object_cost_base() - .into(), - }, - transfer_share_object_cost_params: TransferShareObjectCostParams { - transfer_share_object_cost_base: protocol_config - .transfer_share_object_cost_base() - .into(), - }, - tx_context_derive_id_cost_params: TxContextDeriveIdCostParams { - tx_context_derive_id_cost_base: protocol_config - .tx_context_derive_id_cost_base() - .into(), - }, - type_is_one_time_witness_cost_params: TypesIsOneTimeWitnessCostParams { - types_is_one_time_witness_cost_base: protocol_config - .types_is_one_time_witness_cost_base() - .into(), - types_is_one_time_witness_type_tag_cost_per_byte: protocol_config - .types_is_one_time_witness_type_tag_cost_per_byte() - .into(), - types_is_one_time_witness_type_cost_per_byte: protocol_config - .types_is_one_time_witness_type_cost_per_byte() - .into(), - }, - validator_validate_metadata_bcs_cost_params: ValidatorValidateMetadataBcsCostParams { - validator_validate_metadata_cost_base: protocol_config - .validator_validate_metadata_cost_base() - .into(), - validator_validate_metadata_data_cost_per_byte: protocol_config - .validator_validate_metadata_data_cost_per_byte() - .into(), - }, - bls12381_bls12381_min_sig_verify_cost_params: Bls12381Bls12381MinSigVerifyCostParams { - bls12381_bls12381_min_sig_verify_cost_base: protocol_config - .bls12381_bls12381_min_sig_verify_cost_base() - .into(), - bls12381_bls12381_min_sig_verify_msg_cost_per_byte: protocol_config - .bls12381_bls12381_min_sig_verify_msg_cost_per_byte() - .into(), - bls12381_bls12381_min_sig_verify_msg_cost_per_block: protocol_config - .bls12381_bls12381_min_sig_verify_msg_cost_per_block() - .into(), - }, - bls12381_bls12381_min_pk_verify_cost_params: Bls12381Bls12381MinPkVerifyCostParams { - bls12381_bls12381_min_pk_verify_cost_base: protocol_config - .bls12381_bls12381_min_pk_verify_cost_base() - .into(), - bls12381_bls12381_min_pk_verify_msg_cost_per_byte: protocol_config - .bls12381_bls12381_min_pk_verify_msg_cost_per_byte() - .into(), - bls12381_bls12381_min_pk_verify_msg_cost_per_block: protocol_config - .bls12381_bls12381_min_pk_verify_msg_cost_per_block() - .into(), - }, - ecdsa_k1_ecrecover_cost_params: EcdsaK1EcrecoverCostParams { - ecdsa_k1_ecrecover_keccak256_cost_base: protocol_config - .ecdsa_k1_ecrecover_keccak256_cost_base() - .into(), - ecdsa_k1_ecrecover_keccak256_msg_cost_per_byte: protocol_config - .ecdsa_k1_ecrecover_keccak256_msg_cost_per_byte() - .into(), - ecdsa_k1_ecrecover_keccak256_msg_cost_per_block: protocol_config - .ecdsa_k1_ecrecover_keccak256_msg_cost_per_block() - .into(), - ecdsa_k1_ecrecover_sha256_cost_base: protocol_config - .ecdsa_k1_ecrecover_sha256_cost_base() - .into(), - ecdsa_k1_ecrecover_sha256_msg_cost_per_byte: protocol_config - .ecdsa_k1_ecrecover_sha256_msg_cost_per_byte() - .into(), - ecdsa_k1_ecrecover_sha256_msg_cost_per_block: protocol_config - .ecdsa_k1_ecrecover_sha256_msg_cost_per_block() - .into(), - }, - ecdsa_k1_decompress_pubkey_cost_params: EcdsaK1DecompressPubkeyCostParams { - ecdsa_k1_decompress_pubkey_cost_base: protocol_config - .ecdsa_k1_decompress_pubkey_cost_base() - .into(), - }, - ecdsa_k1_secp256k1_verify_cost_params: EcdsaK1Secp256k1VerifyCostParams { - ecdsa_k1_secp256k1_verify_keccak256_cost_base: protocol_config - .ecdsa_k1_secp256k1_verify_keccak256_cost_base() - .into(), - ecdsa_k1_secp256k1_verify_keccak256_msg_cost_per_byte: protocol_config - .ecdsa_k1_secp256k1_verify_keccak256_msg_cost_per_byte() - .into(), - ecdsa_k1_secp256k1_verify_keccak256_msg_cost_per_block: protocol_config - .ecdsa_k1_secp256k1_verify_keccak256_msg_cost_per_block() - .into(), - ecdsa_k1_secp256k1_verify_sha256_cost_base: protocol_config - .ecdsa_k1_secp256k1_verify_sha256_cost_base() - .into(), - ecdsa_k1_secp256k1_verify_sha256_msg_cost_per_byte: protocol_config - .ecdsa_k1_secp256k1_verify_sha256_msg_cost_per_byte() - .into(), - ecdsa_k1_secp256k1_verify_sha256_msg_cost_per_block: protocol_config - .ecdsa_k1_secp256k1_verify_sha256_msg_cost_per_block() - .into(), - }, - ecdsa_r1_ecrecover_cost_params: EcdsaR1EcrecoverCostParams { - ecdsa_r1_ecrecover_keccak256_cost_base: protocol_config - .ecdsa_r1_ecrecover_keccak256_cost_base() - .into(), - ecdsa_r1_ecrecover_keccak256_msg_cost_per_byte: protocol_config - .ecdsa_r1_ecrecover_keccak256_msg_cost_per_byte() - .into(), - ecdsa_r1_ecrecover_keccak256_msg_cost_per_block: protocol_config - .ecdsa_r1_ecrecover_keccak256_msg_cost_per_block() - .into(), - ecdsa_r1_ecrecover_sha256_cost_base: protocol_config - .ecdsa_r1_ecrecover_sha256_cost_base() - .into(), - ecdsa_r1_ecrecover_sha256_msg_cost_per_byte: protocol_config - .ecdsa_r1_ecrecover_sha256_msg_cost_per_byte() - .into(), - ecdsa_r1_ecrecover_sha256_msg_cost_per_block: protocol_config - .ecdsa_r1_ecrecover_sha256_msg_cost_per_block() - .into(), - }, - ecdsa_r1_secp256_r1_verify_cost_params: EcdsaR1Secp256R1VerifyCostParams { - ecdsa_r1_secp256r1_verify_keccak256_cost_base: protocol_config - .ecdsa_r1_secp256r1_verify_keccak256_cost_base() - .into(), - ecdsa_r1_secp256r1_verify_keccak256_msg_cost_per_byte: protocol_config - .ecdsa_r1_secp256r1_verify_keccak256_msg_cost_per_byte() - .into(), - ecdsa_r1_secp256r1_verify_keccak256_msg_cost_per_block: protocol_config - .ecdsa_r1_secp256r1_verify_keccak256_msg_cost_per_block() - .into(), - ecdsa_r1_secp256r1_verify_sha256_cost_base: protocol_config - .ecdsa_r1_secp256r1_verify_sha256_cost_base() - .into(), - ecdsa_r1_secp256r1_verify_sha256_msg_cost_per_byte: protocol_config - .ecdsa_r1_secp256r1_verify_sha256_msg_cost_per_byte() - .into(), - ecdsa_r1_secp256r1_verify_sha256_msg_cost_per_block: protocol_config - .ecdsa_r1_secp256r1_verify_sha256_msg_cost_per_block() - .into(), - }, - ecvrf_ecvrf_verify_cost_params: EcvrfEcvrfVerifyCostParams { - ecvrf_ecvrf_verify_cost_base: protocol_config.ecvrf_ecvrf_verify_cost_base().into(), - ecvrf_ecvrf_verify_alpha_string_cost_per_byte: protocol_config - .ecvrf_ecvrf_verify_alpha_string_cost_per_byte() - .into(), - ecvrf_ecvrf_verify_alpha_string_cost_per_block: protocol_config - .ecvrf_ecvrf_verify_alpha_string_cost_per_block() - .into(), - }, - groth16_prepare_verifying_key_cost_params: Groth16PrepareVerifyingKeyCostParams { - groth16_prepare_verifying_key_bls12381_cost_base: protocol_config - .groth16_prepare_verifying_key_bls12381_cost_base() - .into(), - groth16_prepare_verifying_key_bn254_cost_base: protocol_config - .groth16_prepare_verifying_key_bn254_cost_base() - .into(), - }, - groth16_verify_groth16_proof_internal_cost_params: - Groth16VerifyGroth16ProofInternalCostParams { - groth16_verify_groth16_proof_internal_bls12381_cost_base: protocol_config - .groth16_verify_groth16_proof_internal_bls12381_cost_base() - .into(), - groth16_verify_groth16_proof_internal_bls12381_cost_per_public_input: - protocol_config - .groth16_verify_groth16_proof_internal_bls12381_cost_per_public_input() - .into(), - groth16_verify_groth16_proof_internal_bn254_cost_base: protocol_config - .groth16_verify_groth16_proof_internal_bn254_cost_base() - .into(), - groth16_verify_groth16_proof_internal_bn254_cost_per_public_input: - protocol_config - .groth16_verify_groth16_proof_internal_bn254_cost_per_public_input() - .into(), - groth16_verify_groth16_proof_internal_public_input_cost_per_byte: - protocol_config - .groth16_verify_groth16_proof_internal_public_input_cost_per_byte() - .into(), - }, - hmac_hmac_sha3_256_cost_params: HmacHmacSha3256CostParams { - hmac_hmac_sha3_256_cost_base: protocol_config.hmac_hmac_sha3_256_cost_base().into(), - hmac_hmac_sha3_256_input_cost_per_byte: protocol_config - .hmac_hmac_sha3_256_input_cost_per_byte() - .into(), - hmac_hmac_sha3_256_input_cost_per_block: protocol_config - .hmac_hmac_sha3_256_input_cost_per_block() - .into(), - }, - transfer_receive_object_internal_cost_params: TransferReceiveObjectInternalCostParams { - transfer_receive_object_internal_cost_base: protocol_config - .transfer_receive_object_cost_base_as_option() - .unwrap_or(0) - .into(), - }, - check_zklogin_id_cost_params: CheckZkloginIdCostParams { - check_zklogin_id_cost_base: protocol_config - .check_zklogin_id_cost_base_as_option() - .map(Into::into), - }, - check_zklogin_issuer_cost_params: CheckZkloginIssuerCostParams { - check_zklogin_issuer_cost_base: protocol_config - .check_zklogin_issuer_cost_base_as_option() - .map(Into::into), - }, - poseidon_bn254_cost_params: PoseidonBN254CostParams { - poseidon_bn254_cost_base: protocol_config - .poseidon_bn254_cost_base_as_option() - .map(Into::into), - poseidon_bn254_data_cost_per_block: protocol_config - .poseidon_bn254_cost_per_block_as_option() - .map(Into::into), - }, - group_ops_cost_params: GroupOpsCostParams { - bls12381_decode_scalar_cost: protocol_config - .group_ops_bls12381_decode_scalar_cost_as_option() - .map(Into::into), - bls12381_decode_g1_cost: protocol_config - .group_ops_bls12381_decode_g1_cost_as_option() - .map(Into::into), - bls12381_decode_g2_cost: protocol_config - .group_ops_bls12381_decode_g2_cost_as_option() - .map(Into::into), - bls12381_decode_gt_cost: protocol_config - .group_ops_bls12381_decode_gt_cost_as_option() - .map(Into::into), - bls12381_scalar_add_cost: protocol_config - .group_ops_bls12381_scalar_add_cost_as_option() - .map(Into::into), - bls12381_g1_add_cost: protocol_config - .group_ops_bls12381_g1_add_cost_as_option() - .map(Into::into), - bls12381_g2_add_cost: protocol_config - .group_ops_bls12381_g2_add_cost_as_option() - .map(Into::into), - bls12381_gt_add_cost: protocol_config - .group_ops_bls12381_gt_add_cost_as_option() - .map(Into::into), - bls12381_scalar_sub_cost: protocol_config - .group_ops_bls12381_scalar_sub_cost_as_option() - .map(Into::into), - bls12381_g1_sub_cost: protocol_config - .group_ops_bls12381_g1_sub_cost_as_option() - .map(Into::into), - bls12381_g2_sub_cost: protocol_config - .group_ops_bls12381_g2_sub_cost_as_option() - .map(Into::into), - bls12381_gt_sub_cost: protocol_config - .group_ops_bls12381_gt_sub_cost_as_option() - .map(Into::into), - bls12381_scalar_mul_cost: protocol_config - .group_ops_bls12381_scalar_mul_cost_as_option() - .map(Into::into), - bls12381_g1_mul_cost: protocol_config - .group_ops_bls12381_g1_mul_cost_as_option() - .map(Into::into), - bls12381_g2_mul_cost: protocol_config - .group_ops_bls12381_g2_mul_cost_as_option() - .map(Into::into), - bls12381_gt_mul_cost: protocol_config - .group_ops_bls12381_gt_mul_cost_as_option() - .map(Into::into), - bls12381_scalar_div_cost: protocol_config - .group_ops_bls12381_scalar_div_cost_as_option() - .map(Into::into), - bls12381_g1_div_cost: protocol_config - .group_ops_bls12381_g1_div_cost_as_option() - .map(Into::into), - bls12381_g2_div_cost: protocol_config - .group_ops_bls12381_g2_div_cost_as_option() - .map(Into::into), - bls12381_gt_div_cost: protocol_config - .group_ops_bls12381_gt_div_cost_as_option() - .map(Into::into), - bls12381_g1_hash_to_base_cost: protocol_config - .group_ops_bls12381_g1_hash_to_base_cost_as_option() - .map(Into::into), - bls12381_g2_hash_to_base_cost: protocol_config - .group_ops_bls12381_g2_hash_to_base_cost_as_option() - .map(Into::into), - bls12381_g1_hash_to_cost_per_byte: protocol_config - .group_ops_bls12381_g1_hash_to_cost_per_byte_as_option() - .map(Into::into), - bls12381_g2_hash_to_cost_per_byte: protocol_config - .group_ops_bls12381_g2_hash_to_cost_per_byte_as_option() - .map(Into::into), - bls12381_g1_msm_base_cost: protocol_config - .group_ops_bls12381_g1_msm_base_cost_as_option() - .map(Into::into), - bls12381_g2_msm_base_cost: protocol_config - .group_ops_bls12381_g2_msm_base_cost_as_option() - .map(Into::into), - bls12381_g1_msm_base_cost_per_input: protocol_config - .group_ops_bls12381_g1_msm_base_cost_per_input_as_option() - .map(Into::into), - bls12381_g2_msm_base_cost_per_input: protocol_config - .group_ops_bls12381_g2_msm_base_cost_per_input_as_option() - .map(Into::into), - bls12381_msm_max_len: protocol_config - .group_ops_bls12381_msm_max_len_as_option() - .map(Into::into), - bls12381_pairing_cost: protocol_config - .group_ops_bls12381_pairing_cost_as_option() - .map(Into::into), - }, - vdf_cost_params: VDFCostParams { - vdf_verify_cost: protocol_config - .vdf_verify_vdf_cost_as_option() - .map(Into::into), - hash_to_input_cost: protocol_config - .vdf_hash_to_input_cost_as_option() - .map(Into::into), - }, - } - } -} - -pub fn make_stdlib_gas_params_for_protocol_config( - protocol_config: &ProtocolConfig, -) -> GasParameters { - macro_rules! get_gas_cost_or_default { - ($name: ident) => {{ - debug_assert!( - protocol_config.version.as_u64() < 53 || protocol_config.$name().is_some() - ); - protocol_config.$name().map(Into::into).unwrap_or(0.into()) - }}; - } - GasParameters::new( - MSN::bcs::GasParameters { - to_bytes: MSN::bcs::ToBytesGasParameters { - per_byte_serialized: get_gas_cost_or_default!( - bcs_per_byte_serialized_cost_as_option - ), - legacy_min_output_size: get_gas_cost_or_default!( - bcs_legacy_min_output_size_cost_as_option - ), - failure: get_gas_cost_or_default!(bcs_failure_cost_as_option), - }, - }, - MSN::debug::GasParameters { - print: MSN::debug::PrintGasParameters { - base_cost: get_gas_cost_or_default!(debug_print_base_cost_as_option), - }, - print_stack_trace: MSN::debug::PrintStackTraceGasParameters { - base_cost: get_gas_cost_or_default!(debug_print_stack_trace_base_cost_as_option), - }, - }, - MSN::hash::GasParameters { - sha2_256: MSN::hash::Sha2_256GasParameters { - base: get_gas_cost_or_default!(hash_sha2_256_base_cost_as_option), - per_byte: get_gas_cost_or_default!(hash_sha2_256_per_byte_cost_as_option), - legacy_min_input_len: get_gas_cost_or_default!( - hash_sha2_256_legacy_min_input_len_cost_as_option - ), - }, - sha3_256: MSN::hash::Sha3_256GasParameters { - base: get_gas_cost_or_default!(hash_sha3_256_base_cost_as_option), - per_byte: get_gas_cost_or_default!(hash_sha3_256_per_byte_cost_as_option), - legacy_min_input_len: get_gas_cost_or_default!( - hash_sha3_256_legacy_min_input_len_cost_as_option - ), - }, - }, - MSN::string::GasParameters { - check_utf8: MSN::string::CheckUtf8GasParameters { - base: get_gas_cost_or_default!(string_check_utf8_base_cost_as_option), - per_byte: get_gas_cost_or_default!(string_check_utf8_per_byte_cost_as_option), - }, - is_char_boundary: MSN::string::IsCharBoundaryGasParameters { - base: get_gas_cost_or_default!(string_is_char_boundary_base_cost_as_option), - }, - sub_string: MSN::string::SubStringGasParameters { - base: get_gas_cost_or_default!(string_sub_string_base_cost_as_option), - per_byte: get_gas_cost_or_default!(string_sub_string_per_byte_cost_as_option), - }, - index_of: MSN::string::IndexOfGasParameters { - base: get_gas_cost_or_default!(string_index_of_base_cost_as_option), - per_byte_pattern: get_gas_cost_or_default!( - string_index_of_per_byte_pattern_cost_as_option - ), - per_byte_searched: get_gas_cost_or_default!( - string_index_of_per_byte_searched_cost_as_option - ), - }, - }, - MSN::type_name::GasParameters { - get: MSN::type_name::GetGasParameters { - base: get_gas_cost_or_default!(type_name_get_base_cost_as_option), - per_byte: get_gas_cost_or_default!(type_name_get_per_byte_cost_as_option), - }, - }, - MSN::vector::GasParameters { - empty: MSN::vector::EmptyGasParameters { - base: get_gas_cost_or_default!(vector_empty_base_cost_as_option), - }, - length: MSN::vector::LengthGasParameters { - base: get_gas_cost_or_default!(vector_length_base_cost_as_option), - }, - push_back: MSN::vector::PushBackGasParameters { - base: get_gas_cost_or_default!(vector_push_back_base_cost_as_option), - legacy_per_abstract_memory_unit: get_gas_cost_or_default!( - vector_push_back_legacy_per_abstract_memory_unit_cost_as_option - ), - }, - borrow: MSN::vector::BorrowGasParameters { - base: get_gas_cost_or_default!(vector_borrow_base_cost_as_option), - }, - pop_back: MSN::vector::PopBackGasParameters { - base: get_gas_cost_or_default!(vector_pop_back_base_cost_as_option), - }, - destroy_empty: MSN::vector::DestroyEmptyGasParameters { - base: get_gas_cost_or_default!(vector_destroy_empty_base_cost_as_option), - }, - swap: MSN::vector::SwapGasParameters { - base: get_gas_cost_or_default!(vector_swap_base_cost_as_option), - }, - }, - ) -} - -pub fn all_natives(silent: bool, protocol_config: &ProtocolConfig) -> NativeFunctionTable { - let iota_framework_natives: &[(&str, &str, NativeFunction)] = &[ - ("address", "from_bytes", make_native!(address::from_bytes)), - ("address", "to_u256", make_native!(address::to_u256)), - ("address", "from_u256", make_native!(address::from_u256)), - ("hash", "blake2b256", make_native!(hash::blake2b256)), - ( - "bls12381", - "bls12381_min_sig_verify", - make_native!(bls12381::bls12381_min_sig_verify), - ), - ( - "bls12381", - "bls12381_min_pk_verify", - make_native!(bls12381::bls12381_min_pk_verify), - ), - ( - "dynamic_field", - "hash_type_and_key", - make_native!(dynamic_field::hash_type_and_key), - ), - ( - "config", - "read_setting_impl", - make_native!(config::read_setting_impl), - ), - ( - "dynamic_field", - "add_child_object", - make_native!(dynamic_field::add_child_object), - ), - ( - "dynamic_field", - "borrow_child_object", - make_native!(dynamic_field::borrow_child_object), - ), - ( - "dynamic_field", - "borrow_child_object_mut", - make_native!(dynamic_field::borrow_child_object), - ), - ( - "dynamic_field", - "remove_child_object", - make_native!(dynamic_field::remove_child_object), - ), - ( - "dynamic_field", - "has_child_object", - make_native!(dynamic_field::has_child_object), - ), - ( - "dynamic_field", - "has_child_object_with_ty", - make_native!(dynamic_field::has_child_object_with_ty), - ), - ( - "ecdsa_k1", - "secp256k1_ecrecover", - make_native!(ecdsa_k1::ecrecover), - ), - ( - "ecdsa_k1", - "decompress_pubkey", - make_native!(ecdsa_k1::decompress_pubkey), - ), - ( - "ecdsa_k1", - "secp256k1_verify", - make_native!(ecdsa_k1::secp256k1_verify), - ), - ("ecvrf", "ecvrf_verify", make_native!(ecvrf::ecvrf_verify)), - ( - "ecdsa_r1", - "secp256r1_ecrecover", - make_native!(ecdsa_r1::ecrecover), - ), - ( - "ecdsa_r1", - "secp256r1_verify", - make_native!(ecdsa_r1::secp256r1_verify), - ), - ( - "ed25519", - "ed25519_verify", - make_native!(ed25519::ed25519_verify), - ), - ("event", "emit", make_native!(event::emit)), - ( - "event", - "events_by_type", - make_native!(event::get_events_by_type), - ), - ("event", "num_events", make_native!(event::num_events)), - ( - "groth16", - "verify_groth16_proof_internal", - make_native!(groth16::verify_groth16_proof_internal), - ), - ( - "groth16", - "prepare_verifying_key_internal", - make_native!(groth16::prepare_verifying_key_internal), - ), - ("hmac", "hmac_sha3_256", make_native!(hmac::hmac_sha3_256)), - ("hash", "keccak256", make_native!(hash::keccak256)), - ( - "group_ops", - "internal_validate", - make_native!(group_ops::internal_validate), - ), - ( - "group_ops", - "internal_add", - make_native!(group_ops::internal_add), - ), - ( - "group_ops", - "internal_sub", - make_native!(group_ops::internal_sub), - ), - ( - "group_ops", - "internal_mul", - make_native!(group_ops::internal_mul), - ), - ( - "group_ops", - "internal_div", - make_native!(group_ops::internal_div), - ), - ( - "group_ops", - "internal_hash_to", - make_native!(group_ops::internal_hash_to), - ), - ( - "group_ops", - "internal_multi_scalar_mul", - make_native!(group_ops::internal_multi_scalar_mul), - ), - ( - "group_ops", - "internal_pairing", - make_native!(group_ops::internal_pairing), - ), - ("object", "delete_impl", make_native!(object::delete_impl)), - ("object", "borrow_uid", make_native!(object::borrow_uid)), - ( - "object", - "record_new_uid", - make_native!(object::record_new_uid), - ), - ( - "test_scenario", - "take_from_address_by_id", - make_native!(test_scenario::take_from_address_by_id), - ), - ( - "test_scenario", - "most_recent_id_for_address", - make_native!(test_scenario::most_recent_id_for_address), - ), - ( - "test_scenario", - "was_taken_from_address", - make_native!(test_scenario::was_taken_from_address), - ), - ( - "test_scenario", - "take_immutable_by_id", - make_native!(test_scenario::take_immutable_by_id), - ), - ( - "test_scenario", - "most_recent_immutable_id", - make_native!(test_scenario::most_recent_immutable_id), - ), - ( - "test_scenario", - "was_taken_immutable", - make_native!(test_scenario::was_taken_immutable), - ), - ( - "test_scenario", - "take_shared_by_id", - make_native!(test_scenario::take_shared_by_id), - ), - ( - "test_scenario", - "most_recent_id_shared", - make_native!(test_scenario::most_recent_id_shared), - ), - ( - "test_scenario", - "was_taken_shared", - make_native!(test_scenario::was_taken_shared), - ), - ( - "test_scenario", - "end_transaction", - make_native!(test_scenario::end_transaction), - ), - ( - "test_scenario", - "ids_for_address", - make_native!(test_scenario::ids_for_address), - ), - ( - "test_scenario", - "allocate_receiving_ticket_for_object", - make_native!(test_scenario::allocate_receiving_ticket_for_object), - ), - ( - "test_scenario", - "deallocate_receiving_ticket_for_object", - make_native!(test_scenario::deallocate_receiving_ticket_for_object), - ), - ( - "transfer", - "transfer_impl", - make_native!(transfer::transfer_internal), - ), - ( - "transfer", - "freeze_object_impl", - make_native!(transfer::freeze_object), - ), - ( - "transfer", - "share_object_impl", - make_native!(transfer::share_object), - ), - ( - "transfer", - "receive_impl", - make_native!(transfer::receive_object_internal), - ), - ( - "tx_context", - "derive_id", - make_native!(tx_context::derive_id), - ), - ( - "types", - "is_one_time_witness", - make_native!(types::is_one_time_witness), - ), - ("test_utils", "destroy", make_native!(test_utils::destroy)), - ( - "test_utils", - "create_one_time_witness", - make_native!(test_utils::create_one_time_witness), - ), - ( - "random", - "generate_rand_seed_for_testing", - make_native!(random::generate_rand_seed_for_testing), - ), - ( - "zklogin_verified_id", - "check_zklogin_id_internal", - make_native!(zklogin::check_zklogin_id_internal), - ), - ( - "zklogin_verified_issuer", - "check_zklogin_issuer_internal", - make_native!(zklogin::check_zklogin_issuer_internal), - ), - ( - "poseidon", - "poseidon_bn254_internal", - make_native!(poseidon::poseidon_bn254_internal), - ), - ( - "vdf", - "vdf_verify_internal", - make_native!(vdf::vdf_verify_internal), - ), - ( - "vdf", - "hash_to_input_internal", - make_native!(vdf::hash_to_input_internal), - ), - ( - "ecdsa_k1", - "secp256k1_sign", - make_native!(ecdsa_k1::secp256k1_sign), - ), - ( - "ecdsa_k1", - "secp256k1_keypair_from_seed", - make_native!(ecdsa_k1::secp256k1_keypair_from_seed), - ), - ]; - let iota_framework_natives_iter = - iota_framework_natives - .iter() - .cloned() - .map(|(module_name, func_name, func)| { - ( - IOTA_FRAMEWORK_ADDRESS, - Identifier::new(module_name).unwrap(), - Identifier::new(func_name).unwrap(), - func, - ) - }); - let iota_system_natives: &[(&str, &str, NativeFunction)] = &[( - "validator", - "validate_metadata_bcs", - make_native!(validator::validate_metadata_bcs), - )]; - iota_system_natives - .iter() - .cloned() - .map(|(module_name, func_name, func)| { - ( - IOTA_SYSTEM_ADDRESS, - Identifier::new(module_name).unwrap(), - Identifier::new(func_name).unwrap(), - func, - ) - }) - .chain(iota_framework_natives_iter) - .chain(move_stdlib_natives::all_natives( - MOVE_STDLIB_ADDRESS, - make_stdlib_gas_params_for_protocol_config(protocol_config), - silent, - )) - .collect() -} - -// ID { bytes: address } -// Extract the first field of the struct to get the address bytes. -pub fn get_receiver_object_id(object: Value) -> Result { - get_nested_struct_field(object, &[0]) -} - -// Object { id: UID { id: ID { bytes: address } } .. } -// Extract the first field of the struct 3 times to get the id bytes. -pub fn get_object_id(object: Value) -> Result { - get_nested_struct_field(object, &[0, 0, 0]) -} - -// Extract a field value that's nested inside value `v`. The offset of each -// nesting is determined by `offsets`. -pub fn get_nested_struct_field(mut v: Value, offsets: &[usize]) -> Result { - for offset in offsets { - v = get_nth_struct_field(v, *offset)?; - } - Ok(v) -} - -pub fn get_nth_struct_field(v: Value, n: usize) -> Result { - let mut itr = v.value_as::()?.unpack()?; - Ok(itr.nth(n).unwrap()) -} - -/// Returns the struct tag, non-annotated type layout, and fully annotated type -/// layout of `ty`. -pub(crate) fn get_tag_and_layouts( - context: &NativeContext, - ty: &Type, -) -> PartialVMResult> { - let tag = match context.type_to_type_tag(ty)? { - TypeTag::Struct(s) => s, - _ => { - return Err( - PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message("Iota verifier guarantees this is a struct".to_string()), - ); - } - }; - let Some(layout) = context.type_to_type_layout(ty)? else { - return Ok(None); - }; - let Some(annotated_layout) = context.type_to_fully_annotated_layout(ty)? else { - return Ok(None); - }; - Ok(Some((*tag, layout, annotated_layout))) -} - -#[macro_export] -macro_rules! make_native { - ($native: expr) => { - Arc::new( - move |context, ty_args, args| -> PartialVMResult { - $native(context, ty_args, args) - }, - ) - }; -} - -pub(crate) fn legacy_test_cost() -> InternalGas { - InternalGas::new(0) -} diff --git a/iota-execution/v0/iota-move-natives/src/object.rs b/iota-execution/v0/iota-move-natives/src/object.rs deleted file mode 100644 index 93c44de4f77..00000000000 --- a/iota-execution/v0/iota-move-natives/src/object.rs +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::collections::VecDeque; - -use move_binary_format::errors::PartialVMResult; -use move_core_types::{account_address::AccountAddress, gas_algebra::InternalGas}; -use move_vm_runtime::{native_charge_gas_early_exit, native_functions::NativeContext}; -use move_vm_types::{ - loaded_data::runtime_types::Type, - natives::function::NativeResult, - pop_arg, - values::{StructRef, Value}, -}; -use smallvec::smallvec; - -use crate::{NativesCostTable, object_runtime::ObjectRuntime}; - -#[derive(Clone)] -pub struct BorrowUidCostParams { - pub object_borrow_uid_cost_base: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun borrow_uid -/// Implementation of the Move native function `borrow_uid(obj: &T): -/// &UID` gas cost: object_borrow_uid_cost_base | this is hard -/// to calculate as it's very sensitive to `borrow_field` impl. Making it flat -/// **************************************************************************** -/// ******************* -pub fn borrow_uid( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.len() == 1); - debug_assert!(args.len() == 1); - - let borrow_uid_cost_params = context - .extensions_mut() - .get::() - .borrow_uid_cost_params - .clone(); - - // Charge base fee - native_charge_gas_early_exit!(context, borrow_uid_cost_params.object_borrow_uid_cost_base); - - let obj = pop_arg!(args, StructRef); - let id_field = obj.borrow_field(0)?; - - Ok(NativeResult::ok(context.gas_used(), smallvec![id_field])) -} - -#[derive(Clone)] -pub struct DeleteImplCostParams { - pub object_delete_impl_cost_base: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun delete_impl -/// Implementation of the Move native function `delete_impl(id: address)` -/// gas cost: cost_base | this is a simple ID deletion -/// **************************************************************************** -/// ******************* -pub fn delete_impl( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 1); - - let delete_impl_cost_params = context - .extensions_mut() - .get::() - .delete_impl_cost_params - .clone(); - - // Charge base fee - native_charge_gas_early_exit!( - context, - delete_impl_cost_params.object_delete_impl_cost_base - ); - - // unwrap safe because the interface of native function guarantees it. - let uid_bytes = pop_arg!(args, AccountAddress); - - let obj_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut(); - obj_runtime.delete_id(uid_bytes.into())?; - Ok(NativeResult::ok(context.gas_used(), smallvec![])) -} - -#[derive(Clone)] -pub struct RecordNewIdCostParams { - pub object_record_new_uid_cost_base: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun record_new_uid -/// Implementation of the Move native function `record_new_uid(id: address)` -/// gas cost: object_record_new_uid_cost_base | this is a -/// simple ID addition ********************************************************* -/// ************************************** -pub fn record_new_uid( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 1); - - let record_new_id_cost_params = context - .extensions_mut() - .get::() - .record_new_id_cost_params - .clone(); - - // Charge base fee - native_charge_gas_early_exit!( - context, - record_new_id_cost_params.object_record_new_uid_cost_base - ); - - // unwrap safe because the interface of native function guarantees it. - let uid_bytes = pop_arg!(args, AccountAddress); - - let obj_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut(); - obj_runtime.new_id(uid_bytes.into())?; - Ok(NativeResult::ok(context.gas_used(), smallvec![])) -} diff --git a/iota-execution/v0/iota-move-natives/src/object_runtime/mod.rs b/iota-execution/v0/iota-move-natives/src/object_runtime/mod.rs deleted file mode 100644 index 9244a158540..00000000000 --- a/iota-execution/v0/iota-move-natives/src/object_runtime/mod.rs +++ /dev/null @@ -1,727 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -pub(crate) mod object_store; - -use std::{ - collections::{BTreeMap, BTreeSet}, - sync::Arc, -}; - -use better_any::{Tid, TidAble}; -use indexmap::{map::IndexMap, set::IndexSet}; -use iota_protocol_config::{LimitThresholdCrossed, ProtocolConfig, check_limit_by_meter}; -use iota_types::{ - IOTA_AUTHENTICATOR_STATE_OBJECT_ID, IOTA_BRIDGE_OBJECT_ID, IOTA_CLOCK_OBJECT_ID, - IOTA_DENY_LIST_OBJECT_ID, IOTA_RANDOMNESS_STATE_OBJECT_ID, IOTA_SYSTEM_STATE_OBJECT_ID, - base_types::{IotaAddress, MoveObjectType, ObjectID, SequenceNumber}, - committee::EpochId, - error::{ExecutionError, ExecutionErrorKind, VMMemoryLimitExceededSubStatusCode}, - execution::DynamicallyLoadedObjectMetadata, - id::UID, - metrics::LimitsMetrics, - object::{MoveObject, Owner}, - storage::ChildObjectResolver, -}; -use move_binary_format::errors::{PartialVMError, PartialVMResult}; -use move_core_types::{ - account_address::AccountAddress, - annotated_value::{MoveTypeLayout, MoveValue}, - annotated_visitor as AV, - effects::Op, - language_storage::StructTag, - runtime_value as R, - vm_status::StatusCode, -}; -use move_vm_types::{ - loaded_data::runtime_types::Type, - values::{GlobalValue, Value}, -}; -use object_store::{ActiveChildObject, ChildObjectStore}; -use tracing::error; - -use self::object_store::{ChildObjectEffect, ObjectResult}; -use super::get_object_id; - -pub enum ObjectEvent { - /// Transfer to a new address or object. Or make it shared or immutable. - Transfer(Owner, MoveObject), - /// An object ID is deleted - DeleteObjectID(ObjectID), -} - -type Set = IndexSet; - -#[derive(Default)] -pub(crate) struct TestInventories { - pub(crate) objects: BTreeMap, - // address inventories. Most recent objects are at the back of the set - pub(crate) address_inventories: BTreeMap>>, - // global inventories.Most recent objects are at the back of the set - pub(crate) shared_inventory: BTreeMap>, - pub(crate) immutable_inventory: BTreeMap>, - pub(crate) taken_immutable_values: BTreeMap>, - // object has been taken from the inventory - pub(crate) taken: BTreeMap, - // allocated receiving tickets - pub(crate) allocated_tickets: BTreeMap, -} - -pub struct LoadedRuntimeObject { - pub version: SequenceNumber, - pub is_modified: bool, -} - -pub struct RuntimeResults { - pub writes: IndexMap, - pub user_events: Vec<(Type, StructTag, Value)>, - // Loaded child objects, their loaded version/digest and whether they were modified. - pub loaded_child_objects: BTreeMap, - pub created_object_ids: Set, - pub deleted_object_ids: Set, -} - -#[derive(Default)] -pub(crate) struct ObjectRuntimeState { - pub(crate) input_objects: BTreeMap, - // new ids from object::new - new_ids: Set, - // ids passed to object::delete - deleted_ids: Set, - // transfers to a new owner (shared, immutable, object, or account address) - // TODO these struct tags can be removed if type_to_type_tag was exposed in the session - transfers: IndexMap, - events: Vec<(Type, StructTag, Value)>, - // total size of events emitted so far - total_events_size: u64, - received: IndexMap, -} - -#[derive(Tid)] -pub struct ObjectRuntime<'a> { - child_object_store: ChildObjectStore<'a>, - // inventories for test scenario - pub(crate) test_inventories: TestInventories, - // the internal state - pub(crate) state: ObjectRuntimeState, - // whether or not this TX is gas metered - is_metered: bool, - - pub(crate) protocol_config: &'a ProtocolConfig, - pub(crate) metrics: Arc, -} - -pub enum TransferResult { - New, - SameOwner, - OwnerChanged, -} - -pub struct InputObject { - pub contained_uids: BTreeSet, - pub version: SequenceNumber, - pub owner: Owner, -} - -impl TestInventories { - fn new() -> Self { - Self::default() - } -} - -impl<'a> ObjectRuntime<'a> { - pub fn new( - object_resolver: &'a dyn ChildObjectResolver, - input_objects: BTreeMap, - is_metered: bool, - protocol_config: &'a ProtocolConfig, - metrics: Arc, - epoch_id: EpochId, - ) -> Self { - let mut input_object_owners = BTreeMap::new(); - let mut root_version = BTreeMap::new(); - let mut wrapped_object_containers = BTreeMap::new(); - for (id, input_object) in input_objects { - let InputObject { - contained_uids, - version, - owner, - } = input_object; - input_object_owners.insert(id, owner); - debug_assert!(contained_uids.contains(&id)); - for contained_uid in contained_uids { - root_version.insert(contained_uid, version); - if contained_uid != id { - let prev = wrapped_object_containers.insert(contained_uid, id); - debug_assert!(prev.is_none()); - } - } - } - Self { - child_object_store: ChildObjectStore::new( - object_resolver, - root_version, - wrapped_object_containers, - is_metered, - protocol_config, - metrics.clone(), - epoch_id, - ), - test_inventories: TestInventories::new(), - state: ObjectRuntimeState { - input_objects: input_object_owners, - new_ids: Set::new(), - deleted_ids: Set::new(), - transfers: IndexMap::new(), - events: vec![], - total_events_size: 0, - received: IndexMap::new(), - }, - is_metered, - protocol_config, - metrics, - } - } - - pub fn new_id(&mut self, id: ObjectID) -> PartialVMResult<()> { - // If metered, we use the metered limit (non system tx limit) as the hard limit - // This macro takes care of that - if let LimitThresholdCrossed::Hard(_, lim) = check_limit_by_meter!( - self.is_metered, - self.state.new_ids.len(), - self.protocol_config.max_num_new_move_object_ids(), - self.protocol_config.max_num_new_move_object_ids_system_tx(), - self.metrics.excessive_new_move_object_ids - ) { - return Err(PartialVMError::new(StatusCode::MEMORY_LIMIT_EXCEEDED) - .with_message(format!("Creating more than {} IDs is not allowed", lim)) - .with_sub_status( - VMMemoryLimitExceededSubStatusCode::NEW_ID_COUNT_LIMIT_EXCEEDED as u64, - )); - }; - - // remove from deleted_ids for the case in dynamic fields where the Field object - // was deleted and then re-added in a single transaction. In that case, - // we also skip adding it to new_ids. - let was_present = self.state.deleted_ids.shift_remove(&id); - if !was_present { - // mark the id as new - self.state.new_ids.insert(id); - } - Ok(()) - } - - pub fn delete_id(&mut self, id: ObjectID) -> PartialVMResult<()> { - // This is defensive because `self.state.deleted_ids` may not indeed - // be called based on the `was_new` flag - // Metered transactions don't have limits for now - - if let LimitThresholdCrossed::Hard(_, lim) = check_limit_by_meter!( - self.is_metered, - self.state.deleted_ids.len(), - self.protocol_config.max_num_deleted_move_object_ids(), - self.protocol_config - .max_num_deleted_move_object_ids_system_tx(), - self.metrics.excessive_deleted_move_object_ids - ) { - return Err(PartialVMError::new(StatusCode::MEMORY_LIMIT_EXCEEDED) - .with_message(format!("Deleting more than {} IDs is not allowed", lim)) - .with_sub_status( - VMMemoryLimitExceededSubStatusCode::DELETED_ID_COUNT_LIMIT_EXCEEDED as u64, - )); - }; - - let was_new = self.state.new_ids.shift_remove(&id); - if !was_new { - self.state.deleted_ids.insert(id); - } - Ok(()) - } - - pub fn transfer( - &mut self, - owner: Owner, - ty: Type, - obj: Value, - ) -> PartialVMResult { - let id: ObjectID = get_object_id(obj.copy_value()?)? - .value_as::()? - .into(); - // - An object is new if it is contained in the new ids or if it is one of the - // objects created during genesis (the system state object or clock). - // - Otherwise, check the input objects for the previous owner - // - If it was not in the input objects, it must have been wrapped or must have - // been a child object - let is_framework_obj = [ - IOTA_SYSTEM_STATE_OBJECT_ID, - IOTA_CLOCK_OBJECT_ID, - IOTA_AUTHENTICATOR_STATE_OBJECT_ID, - IOTA_RANDOMNESS_STATE_OBJECT_ID, - IOTA_DENY_LIST_OBJECT_ID, - IOTA_BRIDGE_OBJECT_ID, - ] - .contains(&id); - let transfer_result = if self.state.new_ids.contains(&id) { - TransferResult::New - } else if is_framework_obj { - // framework objects are always created when they are transferred, but the id is - // hard-coded so it is not yet in new_ids - self.state.new_ids.insert(id); - TransferResult::New - } else if let Some(prev_owner) = self.state.input_objects.get(&id) { - match (&owner, prev_owner) { - // don't use == for dummy values in Shared owner - (Owner::Shared { .. }, Owner::Shared { .. }) => TransferResult::SameOwner, - (new, old) if new == old => TransferResult::SameOwner, - _ => TransferResult::OwnerChanged, - } - } else { - TransferResult::OwnerChanged - }; - - // Metered transactions don't have limits for now - - if let LimitThresholdCrossed::Hard(_, lim) = check_limit_by_meter!( - // TODO: is this not redundant? Metered TX implies framework obj cannot be transferred - self.is_metered && !is_framework_obj, /* We have higher limits for unmetered - * transactions and framework obj */ - self.state.transfers.len(), - self.protocol_config.max_num_transferred_move_object_ids(), - self.protocol_config - .max_num_transferred_move_object_ids_system_tx(), - self.metrics.excessive_transferred_move_object_ids - ) { - return Err(PartialVMError::new(StatusCode::MEMORY_LIMIT_EXCEEDED) - .with_message(format!("Transferring more than {} IDs is not allowed", lim)) - .with_sub_status( - VMMemoryLimitExceededSubStatusCode::TRANSFER_ID_COUNT_LIMIT_EXCEEDED as u64, - )); - }; - - self.state.transfers.insert(id, (owner, ty, obj)); - Ok(transfer_result) - } - - pub fn emit_event(&mut self, ty: Type, tag: StructTag, event: Value) -> PartialVMResult<()> { - if self.state.events.len() >= (self.protocol_config.max_num_event_emit() as usize) { - return Err(max_event_error(self.protocol_config.max_num_event_emit())); - } - self.state.events.push((ty, tag, event)); - Ok(()) - } - - pub fn take_user_events(&mut self) -> Vec<(Type, StructTag, Value)> { - std::mem::take(&mut self.state.events) - } - - pub(crate) fn child_object_exists( - &mut self, - parent: ObjectID, - child: ObjectID, - ) -> PartialVMResult { - self.child_object_store.object_exists(parent, child) - } - - pub(crate) fn child_object_exists_and_has_type( - &mut self, - parent: ObjectID, - child: ObjectID, - child_type: &MoveObjectType, - ) -> PartialVMResult { - self.child_object_store - .object_exists_and_has_type(parent, child, child_type) - } - - pub(super) fn receive_object( - &mut self, - parent: ObjectID, - child: ObjectID, - child_version: SequenceNumber, - child_ty: &Type, - child_layout: &R::MoveTypeLayout, - child_fully_annotated_layout: &MoveTypeLayout, - child_move_type: MoveObjectType, - ) -> PartialVMResult>> { - let Some((value, obj_meta)) = self.child_object_store.receive_object( - parent, - child, - child_version, - child_ty, - child_layout, - child_fully_annotated_layout, - child_move_type, - )? - else { - return Ok(None); - }; - // NB: It is important that the object only be added to the received set after - // it has been fully authenticated and loaded. - if self.state.received.insert(child, obj_meta).is_some() { - // We should never hit this -- it means that we have received the same object - // twice which means we have a duplicated a receiving ticket - // somehow. - return Err( - PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR).with_message(format!( - "Object {child} at version {child_version} already received. This can only happen \ - if multiple `Receiving` arguments exist for the same object in the transaction which is impossible." - )), - ); - } - Ok(Some(value)) - } - - pub(crate) fn get_or_fetch_child_object( - &mut self, - parent: ObjectID, - child: ObjectID, - child_ty: &Type, - child_layout: &R::MoveTypeLayout, - child_fully_annotated_layout: &MoveTypeLayout, - child_move_type: MoveObjectType, - ) -> PartialVMResult> { - let res = self.child_object_store.get_or_fetch_object( - parent, - child, - child_ty, - child_layout, - child_fully_annotated_layout, - child_move_type, - )?; - Ok(match res { - ObjectResult::MismatchedType => ObjectResult::MismatchedType, - ObjectResult::Loaded(child_object) => ObjectResult::Loaded(&mut child_object.value), - }) - } - - pub(crate) fn add_child_object( - &mut self, - parent: ObjectID, - child: ObjectID, - child_ty: &Type, - child_move_type: MoveObjectType, - child_value: Value, - ) -> PartialVMResult<()> { - self.child_object_store - .add_object(parent, child, child_ty, child_move_type, child_value) - } - - pub(crate) fn config_setting_unsequenced_read( - &mut self, - config_id: ObjectID, - name_df_id: ObjectID, - field_setting_ty: &Type, - field_setting_layout: &R::MoveTypeLayout, - field_setting_object_type: &MoveObjectType, - ) -> Option { - match self.child_object_store.config_setting_unsequenced_read( - config_id, - name_df_id, - field_setting_ty, - field_setting_layout, - field_setting_object_type, - ) { - Err(e) => { - error!( - "Failed to read config setting. - config_id: {config_id}, - name_df_id: {name_df_id}, - field_setting_object_type: {field_setting_object_type:?}, - error: {e}" - ); - None - } - Ok(ObjectResult::MismatchedType) | Ok(ObjectResult::Loaded(None)) => None, - Ok(ObjectResult::Loaded(Some(value))) => Some(value), - } - } - - pub(super) fn config_setting_cache_update( - &mut self, - config_id: ObjectID, - name_df_id: ObjectID, - setting_value_object_type: MoveObjectType, - value: Option, - ) { - self.child_object_store.config_setting_cache_update( - config_id, - name_df_id, - setting_value_object_type, - value, - ) - } - - // returns None if a child object is still borrowed - pub(crate) fn take_state(&mut self) -> ObjectRuntimeState { - std::mem::take(&mut self.state) - } - - pub fn finish(mut self) -> Result { - let loaded_child_objects = self.loaded_runtime_objects(); - let child_effects = self.child_object_store.take_effects(); - self.state.finish(loaded_child_objects, child_effects) - } - - pub(crate) fn all_active_child_objects(&self) -> impl Iterator> { - self.child_object_store.all_active_objects() - } - - pub fn loaded_runtime_objects(&self) -> BTreeMap { - // The loaded child objects, and the received objects, should be disjoint. If - // they are not, this is an error since it could lead to incorrect - // transaction dependency computations. - debug_assert!( - self.child_object_store - .cached_objects() - .keys() - .all(|id| !self.state.received.contains_key(id)) - ); - self.child_object_store - .cached_objects() - .iter() - .filter_map(|(id, obj_opt)| { - obj_opt.as_ref().map(|obj| { - (*id, DynamicallyLoadedObjectMetadata { - version: obj.version(), - digest: obj.digest(), - storage_rebate: obj.storage_rebate, - owner: obj.owner, - previous_transaction: obj.previous_transaction, - }) - }) - }) - .chain( - self.state - .received - .iter() - .map(|(id, meta)| (*id, meta.clone())), - ) - .collect() - } - - /// A map from wrapped objects to the object that wraps them at the - /// beginning of the transaction. - pub fn wrapped_object_containers(&self) -> BTreeMap { - self.child_object_store.wrapped_object_containers().clone() - } -} - -pub fn max_event_error(max_events: u64) -> PartialVMError { - PartialVMError::new(StatusCode::MEMORY_LIMIT_EXCEEDED) - .with_message(format!( - "Emitting more than {} events is not allowed", - max_events - )) - .with_sub_status(VMMemoryLimitExceededSubStatusCode::EVENT_COUNT_LIMIT_EXCEEDED as u64) -} - -impl ObjectRuntimeState { - /// Update `state_view` with the effects of successfully executing a - /// transaction: - /// - Given the effects `Op` of child objects, processes the changes - /// in terms of object writes/deletes - /// - Process `transfers` and `input_objects` to determine whether the type - /// of change (WriteKind) to the object - /// - Process `deleted_ids` with previously determined information to - /// determine the DeleteKind - /// - Passes through user events - pub(crate) fn finish( - mut self, - loaded_child_objects: BTreeMap, - child_object_effects: BTreeMap, - ) -> Result { - let mut loaded_child_objects: BTreeMap<_, _> = loaded_child_objects - .into_iter() - .map(|(id, metadata)| { - (id, LoadedRuntimeObject { - version: metadata.version, - is_modified: false, - }) - }) - .collect(); - for (child, child_object_effect) in child_object_effects { - let ChildObjectEffect { - owner: parent, - ty, - effect, - } = child_object_effect; - - if let Some(loaded_child) = loaded_child_objects.get_mut(&child) { - loaded_child.is_modified = true; - } - - match effect { - // was modified, so mark it as mutated and transferred - Op::Modify(v) => { - debug_assert!(!self.transfers.contains_key(&child)); - debug_assert!(!self.new_ids.contains(&child)); - debug_assert!(loaded_child_objects.contains_key(&child)); - self.transfers - .insert(child, (Owner::ObjectOwner(parent.into()), ty, v)); - } - - Op::New(v) => { - debug_assert!(!self.transfers.contains_key(&child)); - self.transfers - .insert(child, (Owner::ObjectOwner(parent.into()), ty, v)); - } - - Op::Delete => { - // was transferred so not actually deleted - if self.transfers.contains_key(&child) { - debug_assert!(!self.deleted_ids.contains(&child)); - } - // ID was deleted too was deleted so mark as deleted - if self.deleted_ids.contains(&child) { - debug_assert!(!self.transfers.contains_key(&child)); - debug_assert!(!self.new_ids.contains(&child)); - } - } - } - } - let ObjectRuntimeState { - input_objects: _, - new_ids, - deleted_ids, - transfers, - events: user_events, - total_events_size: _, - received, - } = self; - - // Check new owners from transfers, reports an error on cycles. - // TODO can we have cycles in the new system? - check_circular_ownership(transfers.iter().map(|(id, (owner, _, _))| (*id, *owner)))?; - // For both written_objects and deleted_ids, we need to mark the loaded child - // object as modified. These may not be covered in the child object - // effects if they are taken out in one PT command and then transferred/ - // deleted in a different command. Marking them as modified will allow us - // properly determine their mutation category in effects. - // TODO: This could get error-prone quickly: what if we forgot to mark an object - // as modified? There may be a cleaner sulution. - let written_objects: IndexMap<_, _> = transfers - .into_iter() - .map(|(id, (owner, type_, value))| { - if let Some(loaded_child) = loaded_child_objects.get_mut(&id) { - loaded_child.is_modified = true; - } - (id, (owner, type_, value)) - }) - .collect(); - for deleted_id in &deleted_ids { - if let Some(loaded_child) = loaded_child_objects.get_mut(deleted_id) { - loaded_child.is_modified = true; - } - } - - // Any received objects are viewed as modified. They had to be loaded in order - // to be received so they must be in the loaded_child_objects map - // otherwise it's an invariant violation. - for (received_object, _) in received.into_iter() { - match loaded_child_objects.get_mut(&received_object) { - Some(loaded_child) => { - loaded_child.is_modified = true; - } - None => { - return Err(ExecutionError::invariant_violation(format!( - "Failed to find received UID {received_object} in loaded child objects." - ))); - } - } - } - - Ok(RuntimeResults { - writes: written_objects, - user_events, - loaded_child_objects, - created_object_ids: new_ids, - deleted_object_ids: deleted_ids, - }) - } - - pub fn events(&self) -> &[(Type, StructTag, Value)] { - &self.events - } - - pub fn total_events_size(&self) -> u64 { - self.total_events_size - } - - pub fn incr_total_events_size(&mut self, size: u64) { - self.total_events_size += size; - } -} - -fn check_circular_ownership( - transfers: impl IntoIterator, -) -> Result<(), ExecutionError> { - let mut object_owner_map = BTreeMap::new(); - for (id, recipient) in transfers { - object_owner_map.remove(&id); - match recipient { - Owner::AddressOwner(_) | Owner::Shared { .. } | Owner::Immutable => (), - Owner::ObjectOwner(new_owner) => { - let new_owner: ObjectID = new_owner.into(); - let mut cur = new_owner; - loop { - if cur == id { - return Err(ExecutionError::from_kind( - ExecutionErrorKind::CircularObjectOwnership { object: cur }, - )); - } - if let Some(parent) = object_owner_map.get(&cur) { - cur = *parent; - } else { - break; - } - } - object_owner_map.insert(id, new_owner); - } - } - } - Ok(()) -} - -/// WARNING! This function assumes that the bcs bytes have already been -/// validated, and it will give an invariant violation otherwise. -/// In short, we are relying on the invariant that the bytes are valid for -/// objects in storage. We do not need this invariant for dev-inspect, as the -/// programmable transaction execution will validate the bytes before we get to -/// this point. -pub fn get_all_uids( - fully_annotated_layout: &MoveTypeLayout, - bcs_bytes: &[u8], -) -> Result, /* invariant violation */ String> { - let mut ids = BTreeSet::new(); - struct UIDTraversalV1<'i>(&'i mut BTreeSet); - struct UIDCollectorV1<'i>(&'i mut BTreeSet); - - impl<'i> AV::Traversal for UIDTraversalV1<'i> { - type Error = AV::Error; - - fn traverse_struct(&mut self, driver: &mut AV::StructDriver) -> Result<(), Self::Error> { - if driver.struct_layout().type_ == UID::type_() { - while driver.next_field(&mut UIDCollectorV1(self.0))?.is_some() {} - } else { - while driver.next_field(self)?.is_some() {} - } - Ok(()) - } - } - - impl<'i> AV::Traversal for UIDCollectorV1<'i> { - type Error = AV::Error; - fn traverse_address(&mut self, value: AccountAddress) -> Result<(), Self::Error> { - self.0.insert(value.into()); - Ok(()) - } - } - - MoveValue::visit_deserialize( - bcs_bytes, - fully_annotated_layout, - &mut UIDTraversalV1(&mut ids), - ) - .map_err(|e| format!("Failed to deserialize. {e:?}"))?; - Ok(ids) -} diff --git a/iota-execution/v0/iota-move-natives/src/object_runtime/object_store.rs b/iota-execution/v0/iota-move-natives/src/object_runtime/object_store.rs deleted file mode 100644 index 6883e4b6b46..00000000000 --- a/iota-execution/v0/iota-move-natives/src/object_runtime/object_store.rs +++ /dev/null @@ -1,749 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::{ - collections::{BTreeMap, btree_map}, - sync::Arc, -}; - -use iota_protocol_config::{LimitThresholdCrossed, ProtocolConfig, check_limit_by_meter}; -use iota_types::{ - base_types::{MoveObjectType, ObjectID, SequenceNumber}, - committee::EpochId, - error::VMMemoryLimitExceededSubStatusCode, - execution::DynamicallyLoadedObjectMetadata, - metrics::LimitsMetrics, - object::{Data, MoveObject, Object, Owner}, - storage::ChildObjectResolver, -}; -use move_binary_format::errors::{PartialVMError, PartialVMResult}; -use move_core_types::{ - annotated_value as A, effects::Op, runtime_value as R, vm_status::StatusCode, -}; -use move_vm_types::{ - loaded_data::runtime_types::Type, - values::{GlobalValue, StructRef, Value}, -}; - -use crate::object_runtime::get_all_uids; - -pub(super) struct ChildObject { - pub(super) owner: ObjectID, - pub(super) ty: Type, - pub(super) move_type: MoveObjectType, - pub(super) value: GlobalValue, -} - -pub(crate) struct ActiveChildObject<'a> { - pub(crate) id: &'a ObjectID, - pub(crate) owner: &'a ObjectID, - pub(crate) ty: &'a Type, - pub(crate) move_type: &'a MoveObjectType, - pub(crate) copied_value: Option, -} - -#[derive(Debug)] -struct ConfigSetting { - config: ObjectID, - ty: MoveObjectType, - value: Value, -} - -#[derive(Debug)] -pub(crate) struct ChildObjectEffect { - pub(super) owner: ObjectID, - pub(super) ty: Type, - pub(super) effect: Op, -} - -struct Inner<'a> { - // used for loading child objects - resolver: &'a dyn ChildObjectResolver, - // The version of the root object in ownership at the beginning of the transaction. - // If it was a child object, it resolves to the root parent's sequence number. - // Otherwise, it is just the sequence number at the beginning of the transaction. - root_version: BTreeMap, - // A map from a wrapped object to the object it was contained in at the - // beginning of the transaction. - wrapped_object_containers: BTreeMap, - // cached objects from the resolver. An object might be in this map but not in the store - // if it's existence was queried, but the value was not used. - cached_objects: BTreeMap>, - // whether or not this TX is gas metered - is_metered: bool, - // Protocol config used to enforce limits - protocol_config: &'a ProtocolConfig, - // Metrics for reporting exceeded limits - metrics: Arc, - // Epoch ID for the current transaction. Used for receiving objects. - current_epoch_id: EpochId, -} - -// maintains the runtime GlobalValues for child objects and manages the fetching -// of objects from storage, through the `ChildObjectResolver` -pub(super) struct ChildObjectStore<'a> { - // contains object resolver and object cache - // kept as a separate struct to deal with lifetime issues where the `store` is accessed - // at the same time as the `cached_objects` is populated - inner: Inner<'a>, - // Maps of populated GlobalValues, meaning the child object has been accessed in this - // transaction - store: BTreeMap, - config_setting_cache: BTreeMap, - // whether or not this TX is gas metered - is_metered: bool, -} - -pub(crate) enum ObjectResult { - // object exists but type does not match. Should result in an abort - MismatchedType, - Loaded(V), -} - -type LoadedWithMetadataResult = Option<(V, DynamicallyLoadedObjectMetadata)>; - -macro_rules! fetch_child_object_unbounded { - ($inner:ident, $parent:ident, $child:ident, $parents_root_version:expr, $had_parent_root_version:expr) => {{ - let child_opt = $inner - .resolver - .read_child_object(&$parent, &$child, $parents_root_version) - .map_err(|msg| { - PartialVMError::new(StatusCode::STORAGE_ERROR).with_message(format!("{msg}")) - })?; - if let Some(object) = child_opt { - // if there was no root version, guard against reading a child object. A newly - // created parent should not have a child in storage - if !$had_parent_root_version { - return Err( - PartialVMError::new(StatusCode::STORAGE_ERROR).with_message(format!( - "A new parent {} should not have a child object {}.", - $parent, $child - )), - ); - } - // guard against bugs in `read_child_object`: if it returns a child object such - // that C.parent != parent, we raise an invariant violation - match &object.owner { - Owner::ObjectOwner(id) => { - if ObjectID::from(*id) != $parent { - return Err(PartialVMError::new(StatusCode::STORAGE_ERROR).with_message( - format!( - "Bad owner for {}. Expected owner {} but found owner {}", - $child, $parent, id - ), - )); - } - } - Owner::AddressOwner(_) | Owner::Immutable | Owner::Shared { .. } => { - return Err(PartialVMError::new(StatusCode::STORAGE_ERROR).with_message( - format!( - "Bad owner for {}. \ - Expected an id owner {} but found an address, \ - immutable, or shared owner", - $child, $parent - ), - )); - } - }; - match object.data { - Data::Package(_) => { - return Err(PartialVMError::new(StatusCode::STORAGE_ERROR).with_message( - format!( - "Mismatched object type for {}. \ - Expected a Move object but found a Move package", - $child - ), - )); - } - Data::Move(_) => Some(object), - } - } else { - None - } - }}; -} - -impl<'a> Inner<'a> { - fn receive_object_from_store( - &self, - owner: ObjectID, - child: ObjectID, - version: SequenceNumber, - ) -> PartialVMResult> { - let child_opt = self - .resolver - .get_object_received_at_version(&owner, &child, version, self.current_epoch_id) - .map_err(|msg| { - PartialVMError::new(StatusCode::STORAGE_ERROR).with_message(format!("{msg}")) - })?; - let obj_opt = if let Some(object) = child_opt { - // guard against bugs in `receive_object_at_version`: if it returns a child - // object such that C.parent != parent, we raise an invariant - // violation since that should be checked by - // `receive_object_at_version`. - if object.owner != Owner::AddressOwner(owner.into()) { - return Err( - PartialVMError::new(StatusCode::STORAGE_ERROR).with_message(format!( - "Bad owner for {child}. \ - Expected owner {owner} but found owner {}", - object.owner - )), - ); - } - let loaded_metadata = DynamicallyLoadedObjectMetadata { - version, - digest: object.digest(), - storage_rebate: object.storage_rebate, - owner: object.owner, - previous_transaction: object.previous_transaction, - }; - - // `ChildObjectResolver::receive_object_at_version` should return the object at - // the version or nothing at all. If it returns an object with a - // different version, we should raise an invariant violation since - // it should be checked by `receive_object_at_version`. - if object.version() != version { - return Err( - PartialVMError::new(StatusCode::STORAGE_ERROR).with_message(format!( - "Bad version for {child}. \ - Expected version {version} but found version {}", - object.version() - )), - ); - } - match object.into_inner().data { - Data::Package(_) => { - return Err(PartialVMError::new(StatusCode::STORAGE_ERROR).with_message( - format!( - "Mismatched object type for {child}. \ - Expected a Move object but found a Move package" - ), - )); - } - Data::Move(mo @ MoveObject { .. }) => Some((mo, loaded_metadata)), - } - } else { - None - }; - Ok(obj_opt) - } - - #[allow(clippy::map_entry)] - fn get_or_fetch_object_from_store( - &mut self, - parent: ObjectID, - child: ObjectID, - ) -> PartialVMResult> { - let cached_objects_count = self.cached_objects.len() as u64; - let parents_root_version = self.root_version.get(&parent).copied(); - let had_parent_root_version = parents_root_version.is_some(); - // if not found, it must be new so it won't have any child objects, thus - // we can return SequenceNumber(0) as no child object will be found - let parents_root_version = parents_root_version.unwrap_or(SequenceNumber::new()); - if let btree_map::Entry::Vacant(e) = self.cached_objects.entry(child) { - let obj_opt = fetch_child_object_unbounded!( - self, - parent, - child, - parents_root_version, - had_parent_root_version - ); - - if let LimitThresholdCrossed::Hard(_, lim) = check_limit_by_meter!( - self.is_metered, - cached_objects_count, - self.protocol_config.object_runtime_max_num_cached_objects(), - self.protocol_config - .object_runtime_max_num_cached_objects_system_tx(), - self.metrics.excessive_object_runtime_cached_objects - ) { - return Err(PartialVMError::new(StatusCode::MEMORY_LIMIT_EXCEEDED) - .with_message(format!( - "Object runtime cached objects limit ({} entries) reached", - lim - )) - .with_sub_status( - VMMemoryLimitExceededSubStatusCode::OBJECT_RUNTIME_CACHE_LIMIT_EXCEEDED - as u64, - )); - }; - - e.insert(obj_opt); - } - Ok(self - .cached_objects - .get(&child) - .unwrap() - .as_ref() - .map(|obj| { - obj.data - .try_as_move() - // unwrap safe because we only insert Move objects - .unwrap() - })) - } - - fn fetch_object_impl( - &mut self, - parent: ObjectID, - child: ObjectID, - child_ty: &Type, - child_ty_layout: &R::MoveTypeLayout, - child_ty_fully_annotated_layout: &A::MoveTypeLayout, - child_move_type: &MoveObjectType, - ) -> PartialVMResult> { - let obj = match self.get_or_fetch_object_from_store(parent, child)? { - None => { - return Ok(ObjectResult::Loaded(( - child_ty.clone(), - GlobalValue::none(), - ))); - } - Some(obj) => obj, - }; - // object exists, but the type does not match - if obj.type_() != child_move_type { - return Ok(ObjectResult::MismatchedType); - } - // generate a GlobalValue - let obj_contents = obj.contents(); - let v = match Value::simple_deserialize(obj_contents, child_ty_layout) { - Some(v) => v, - None => return Err( - PartialVMError::new(StatusCode::FAILED_TO_DESERIALIZE_RESOURCE).with_message( - format!("Failed to deserialize object {child} with type {child_move_type}",), - ), - ), - }; - let global_value = - match GlobalValue::cached(v) { - Ok(gv) => gv, - Err(e) => { - return Err(PartialVMError::new(StatusCode::STORAGE_ERROR).with_message( - format!("Object {child} did not deserialize to a struct Value. Error: {e}"), - )); - } - }; - // Find all UIDs inside of the value and update the object parent maps - let contained_uids = - get_all_uids(child_ty_fully_annotated_layout, obj_contents).map_err(|e| { - PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message(format!("Failed to find UIDs. ERROR: {e}")) - })?; - let parents_root_version = self.root_version.get(&parent).copied(); - if let Some(v) = parents_root_version { - debug_assert!(contained_uids.contains(&child)); - for id in contained_uids { - self.root_version.insert(id, v); - if id != child { - let prev = self.wrapped_object_containers.insert(id, child); - debug_assert!(prev.is_none()) - } - } - } - Ok(ObjectResult::Loaded((child_ty.clone(), global_value))) - } -} - -fn deserialize_move_object( - obj: &MoveObject, - child_ty: &Type, - child_ty_layout: &R::MoveTypeLayout, - child_move_type: MoveObjectType, -) -> PartialVMResult> { - let child_id = obj.id(); - // object exists, but the type does not match - if obj.type_() != &child_move_type { - return Ok(ObjectResult::MismatchedType); - } - let value = match Value::simple_deserialize(obj.contents(), child_ty_layout) { - Some(v) => v, - None => { - return Err( - PartialVMError::new(StatusCode::FAILED_TO_DESERIALIZE_RESOURCE).with_message( - format!("Failed to deserialize object {child_id} with type {child_move_type}",), - ), - ); - } - }; - Ok(ObjectResult::Loaded(( - child_ty.clone(), - child_move_type, - value, - ))) -} - -impl<'a> ChildObjectStore<'a> { - pub(super) fn new( - resolver: &'a dyn ChildObjectResolver, - root_version: BTreeMap, - wrapped_object_containers: BTreeMap, - is_metered: bool, - protocol_config: &'a ProtocolConfig, - metrics: Arc, - current_epoch_id: EpochId, - ) -> Self { - Self { - inner: Inner { - resolver, - root_version, - wrapped_object_containers, - cached_objects: BTreeMap::new(), - is_metered, - protocol_config, - metrics, - current_epoch_id, - }, - store: BTreeMap::new(), - config_setting_cache: BTreeMap::new(), - is_metered, - } - } - - pub(super) fn receive_object( - &mut self, - parent: ObjectID, - child: ObjectID, - child_version: SequenceNumber, - child_ty: &Type, - child_layout: &R::MoveTypeLayout, - child_fully_annotated_layout: &A::MoveTypeLayout, - child_move_type: MoveObjectType, - ) -> PartialVMResult>> { - let Some((obj, obj_meta)) = - self.inner - .receive_object_from_store(parent, child, child_version)? - else { - return Ok(None); - }; - - Ok(Some( - match deserialize_move_object(&obj, child_ty, child_layout, child_move_type)? { - ObjectResult::MismatchedType => (ObjectResult::MismatchedType, obj_meta), - ObjectResult::Loaded((_, _, v)) => { - // Find all UIDs inside of the value and update the object parent maps with the - // contained UIDs in the received value. They should all - // have an upper bound version as the receiving object. Only - // do this if we successfully load the object though. - let contained_uids = get_all_uids(child_fully_annotated_layout, obj.contents()) - .map_err(|e| { - PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message(format!( - "Failed to find UIDs for receiving object. ERROR: {e}" - )) - })?; - for id in contained_uids { - self.inner.root_version.insert(id, child_version); - if id != child { - let prev = self.inner.wrapped_object_containers.insert(id, child); - debug_assert!(prev.is_none()) - } - } - (ObjectResult::Loaded(v), obj_meta) - } - }, - )) - } - - pub(super) fn object_exists( - &mut self, - parent: ObjectID, - child: ObjectID, - ) -> PartialVMResult { - if let Some(child_object) = self.store.get(&child) { - return child_object.value.exists(); - } - Ok(self - .inner - .get_or_fetch_object_from_store(parent, child)? - .is_some()) - } - - pub(super) fn object_exists_and_has_type( - &mut self, - parent: ObjectID, - child: ObjectID, - child_move_type: &MoveObjectType, - ) -> PartialVMResult { - if let Some(child_object) = self.store.get(&child) { - // exists and has same type - return Ok(child_object.value.exists()? && &child_object.move_type == child_move_type); - } - Ok(self - .inner - .get_or_fetch_object_from_store(parent, child)? - .map(|move_obj| move_obj.type_() == child_move_type) - .unwrap_or(false)) - } - - pub(super) fn get_or_fetch_object( - &mut self, - parent: ObjectID, - child: ObjectID, - child_ty: &Type, - child_layout: &R::MoveTypeLayout, - child_fully_annotated_layout: &A::MoveTypeLayout, - child_move_type: MoveObjectType, - ) -> PartialVMResult> { - let store_entries_count = self.store.len() as u64; - let child_object = match self.store.entry(child) { - btree_map::Entry::Vacant(e) => { - let (ty, value) = match self.inner.fetch_object_impl( - parent, - child, - child_ty, - child_layout, - child_fully_annotated_layout, - &child_move_type, - )? { - ObjectResult::MismatchedType => return Ok(ObjectResult::MismatchedType), - ObjectResult::Loaded(res) => res, - }; - - if let LimitThresholdCrossed::Hard(_, lim) = check_limit_by_meter!( - self.is_metered, - store_entries_count, - self.inner - .protocol_config - .object_runtime_max_num_store_entries(), - self.inner - .protocol_config - .object_runtime_max_num_store_entries_system_tx(), - self.inner.metrics.excessive_object_runtime_store_entries - ) { - return Err(PartialVMError::new(StatusCode::MEMORY_LIMIT_EXCEEDED) - .with_message(format!( - "Object runtime store limit ({} entries) reached", - lim - )) - .with_sub_status( - VMMemoryLimitExceededSubStatusCode::OBJECT_RUNTIME_STORE_LIMIT_EXCEEDED - as u64, - )); - }; - - e.insert(ChildObject { - owner: parent, - ty, - move_type: child_move_type, - value, - }) - } - btree_map::Entry::Occupied(e) => { - let child_object = e.into_mut(); - if child_object.move_type != child_move_type { - return Ok(ObjectResult::MismatchedType); - } - child_object - } - }; - Ok(ObjectResult::Loaded(child_object)) - } - - pub(super) fn add_object( - &mut self, - parent: ObjectID, - child: ObjectID, - child_ty: &Type, - child_move_type: MoveObjectType, - child_value: Value, - ) -> PartialVMResult<()> { - if let LimitThresholdCrossed::Hard(_, lim) = check_limit_by_meter!( - self.is_metered, - self.store.len(), - self.inner - .protocol_config - .object_runtime_max_num_store_entries(), - self.inner - .protocol_config - .object_runtime_max_num_store_entries_system_tx(), - self.inner.metrics.excessive_object_runtime_store_entries - ) { - return Err(PartialVMError::new(StatusCode::MEMORY_LIMIT_EXCEEDED) - .with_message(format!( - "Object runtime store limit ({} entries) reached", - lim - )) - .with_sub_status( - VMMemoryLimitExceededSubStatusCode::OBJECT_RUNTIME_STORE_LIMIT_EXCEEDED as u64, - )); - }; - - let mut value = if let Some(ChildObject { value, .. }) = self.store.remove(&child) { - if value.exists()? { - return Err( - PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message( - "Duplicate addition of a child object. \ - The previous value cannot be dropped. Indicates possible duplication \ - of objects as an object was fetched more than once from two different \ - parents, yet was not removed from one first" - .to_string(), - ), - ); - } - value - } else { - GlobalValue::none() - }; - if let Err((e, _)) = value.move_to(child_value) { - return Err( - PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR).with_message( - format!("Unable to set value for child {child}, with error {e}",), - ), - ); - } - let child_object = ChildObject { - owner: parent, - ty: child_ty.clone(), - move_type: child_move_type, - value, - }; - self.store.insert(child, child_object); - Ok(()) - } - - pub(super) fn config_setting_unsequenced_read( - &mut self, - config_id: ObjectID, - name_df_id: ObjectID, - _field_setting_ty: &Type, - field_setting_layout: &R::MoveTypeLayout, - field_setting_object_type: &MoveObjectType, - ) -> PartialVMResult>> { - let parent = config_id; - let child = name_df_id; - - let setting = match self.config_setting_cache.entry(child) { - btree_map::Entry::Vacant(e) => { - let child_move_type = field_setting_object_type; - let inner = &self.inner; - let obj_opt = - fetch_child_object_unbounded!(inner, parent, child, SequenceNumber::MAX, true); - let Some(move_obj) = obj_opt.as_ref().map(|obj| obj.data.try_as_move().unwrap()) - else { - return Ok(ObjectResult::Loaded(None)); - }; - let Some(value) = - Value::simple_deserialize(move_obj.contents(), field_setting_layout) - else { - return Err( - PartialVMError::new(StatusCode::FAILED_TO_DESERIALIZE_RESOURCE) - .with_message(format!( - "Failed to deserialize object {child} with type {field_setting_layout}", - )), - ); - }; - e.insert(ConfigSetting { - config: parent, - ty: child_move_type.clone(), - value, - }) - } - btree_map::Entry::Occupied(e) => { - let setting = e.into_mut(); - if setting.ty != *field_setting_object_type { - return Ok(ObjectResult::MismatchedType); - } - if setting.config != parent { - return Err( - PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message(format!( - "Parent for config setting changed. Potential hash collision? - parent: {parent}, - child: {child}, - setting_value_object_type: {field_setting_object_type}, - setting: {setting:#?}" - )), - ); - } - setting - } - }; - let value = setting.value.copy_value().map_err(|e| { - PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR).with_message( - format!("Failed to copy value for config setting {child}, with error {e}",), - ) - })?; - Ok(ObjectResult::Loaded(Some(value))) - } - - /// Used by test scenario to insert a config setting into the cache, which - /// replicates the behavior of a config already being in the object - /// store. - pub(super) fn config_setting_cache_update( - &mut self, - config_id: ObjectID, - name_df_id: ObjectID, - setting_value_object_type: MoveObjectType, - value: Option, - ) { - let child_move_type = setting_value_object_type; - match value { - Some(value) => { - let setting = ConfigSetting { - config: config_id, - ty: child_move_type, - value, - }; - self.config_setting_cache.insert(name_df_id, setting); - } - None => { - self.config_setting_cache.remove(&name_df_id); - } - } - } - - pub(super) fn cached_objects(&self) -> &BTreeMap> { - &self.inner.cached_objects - } - - pub(super) fn wrapped_object_containers(&self) -> &BTreeMap { - &self.inner.wrapped_object_containers - } - - // retrieve the `Op` effects for the child objects - pub(super) fn take_effects(&mut self) -> BTreeMap { - std::mem::take(&mut self.store) - .into_iter() - .filter_map(|(id, child_object)| { - let ChildObject { - owner, - ty, - move_type: _, - value, - } = child_object; - let effect = value.into_effect()?; - let child_effect = ChildObjectEffect { owner, ty, effect }; - Some((id, child_effect)) - }) - .collect() - } - - pub(super) fn all_active_objects(&self) -> impl Iterator> { - self.store.iter().map(|(id, child_object)| { - let copied_child_value = if child_object.value.exists().unwrap() { - Some( - child_object - .value - .borrow_global() - .unwrap() - .value_as::() - .unwrap() - .read_ref() - .unwrap(), - ) - } else { - None - }; - ActiveChildObject { - id, - owner: &child_object.owner, - ty: &child_object.ty, - move_type: &child_object.move_type, - copied_value: copied_child_value, - } - }) - } -} diff --git a/iota-execution/v0/iota-move-natives/src/random.rs b/iota-execution/v0/iota-move-natives/src/random.rs deleted file mode 100644 index 3c8a4eafa3c..00000000000 --- a/iota-execution/v0/iota-move-natives/src/random.rs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::collections::VecDeque; - -use move_binary_format::errors::PartialVMResult; -use move_vm_runtime::native_functions::NativeContext; -use move_vm_types::{ - loaded_data::runtime_types::Type, natives::function::NativeResult, values::Value, -}; -use rand::Rng; -use smallvec::smallvec; - -use crate::legacy_test_cost; - -pub fn generate_rand_seed_for_testing( - _context: &mut NativeContext, - _ty_args: Vec, - _args: VecDeque, -) -> PartialVMResult { - let mut seed = [0u8; 32]; - rand::thread_rng() - .try_fill(&mut seed) - .expect("should never fail"); - Ok(NativeResult::ok(legacy_test_cost(), smallvec![ - Value::vector_u8(seed) - ])) -} diff --git a/iota-execution/v0/iota-move-natives/src/test_scenario.rs b/iota-execution/v0/iota-move-natives/src/test_scenario.rs deleted file mode 100644 index 767eff3aeb2..00000000000 --- a/iota-execution/v0/iota-move-natives/src/test_scenario.rs +++ /dev/null @@ -1,940 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::{ - borrow::Borrow, - collections::{BTreeMap, BTreeSet, VecDeque}, - sync::RwLock, -}; - -use better_any::{Tid, TidAble}; -use indexmap::{IndexMap, IndexSet}; -use iota_types::{ - TypeTag, - base_types::{IotaAddress, ObjectID, SequenceNumber}, - config, - digests::{ObjectDigest, TransactionDigest}, - dynamic_field::DynamicFieldInfo, - execution::DynamicallyLoadedObjectMetadata, - id::UID, - in_memory_storage::InMemoryStorage, - object::{MoveObject, Object, Owner}, - storage::ChildObjectResolver, -}; -use move_binary_format::errors::{PartialVMError, PartialVMResult}; -use move_core_types::{ - account_address::AccountAddress, - annotated_value::{MoveStruct, MoveValue, MoveVariant}, - identifier::Identifier, - language_storage::StructTag, - vm_status::StatusCode, -}; -use move_vm_runtime::native_functions::NativeContext; -use move_vm_types::{ - loaded_data::runtime_types::Type, - natives::function::NativeResult, - pop_arg, - values::{self, StructRef, Value}, -}; -use smallvec::smallvec; - -use crate::{ - get_nth_struct_field, get_tag_and_layouts, legacy_test_cost, - object_runtime::{ObjectRuntime, RuntimeResults}, -}; - -const E_COULD_NOT_GENERATE_EFFECTS: u64 = 0; -const E_INVALID_SHARED_OR_IMMUTABLE_USAGE: u64 = 1; -const E_OBJECT_NOT_FOUND_CODE: u64 = 4; -const E_UNABLE_TO_ALLOCATE_RECEIVING_TICKET: u64 = 5; -const E_RECEIVING_TICKET_ALREADY_ALLOCATED: u64 = 6; -const E_UNABLE_TO_DEALLOCATE_RECEIVING_TICKET: u64 = 7; - -type Set = IndexSet; - -/// An in-memory test store is a thin wrapper around the in-memory storage in a -/// mutex. The mutex allows this to be used by both the object runtime (for -/// reading) and the test scenario (for writing) while hiding mutability. -#[derive(Tid)] -pub struct InMemoryTestStore(pub &'static RwLock); - -impl ChildObjectResolver for InMemoryTestStore { - fn read_child_object( - &self, - parent: &ObjectID, - child: &ObjectID, - child_version_upper_bound: SequenceNumber, - ) -> iota_types::error::IotaResult> { - self.0 - .read() - .unwrap() - .read_child_object(parent, child, child_version_upper_bound) - } - - fn get_object_received_at_version( - &self, - owner: &ObjectID, - receiving_object_id: &ObjectID, - receive_object_at_version: SequenceNumber, - epoch_id: iota_types::committee::EpochId, - ) -> iota_types::error::IotaResult> { - self.0.read().unwrap().get_object_received_at_version( - owner, - receiving_object_id, - receive_object_at_version, - epoch_id, - ) - } -} - -// This function updates the inventories based on the transfers and deletes that -// occurred in the transaction -// native fun end_transaction(): TransactionResult; -pub fn end_transaction( - context: &mut NativeContext, - ty_args: Vec, - args: VecDeque, -) -> PartialVMResult { - assert!(ty_args.is_empty()); - assert!(args.is_empty()); - let object_runtime_ref: &mut ObjectRuntime = context.extensions_mut().get_mut(); - let taken_shared_or_imm: BTreeMap<_, _> = object_runtime_ref - .test_inventories - .taken - .iter() - .filter(|(_id, owner)| matches!(owner, Owner::Shared { .. } | Owner::Immutable)) - .map(|(id, owner)| (*id, *owner)) - .collect(); - // set to true if a shared or imm object was: - // - transferred in a way that changes it from its original shared/imm state - // - wraps the object - // if true, we will "abort" - let mut incorrect_shared_or_imm_handling = false; - - let received = object_runtime_ref - .test_inventories - .allocated_tickets - .iter() - .map(|(k, (metadata, _))| (*k, metadata.clone())) - .collect(); - - let object_runtime_state = object_runtime_ref.take_state(); - // Determine writes and deletes - // We pass the received objects since they should be viewed as "loaded" for the - // purposes of of calculating the effects of the transaction. - let results = object_runtime_state.finish(received, BTreeMap::new()); - let RuntimeResults { - writes, - user_events, - loaded_child_objects: _, - created_object_ids, - deleted_object_ids, - } = match results { - Ok(res) => res, - Err(_) => { - return Ok(NativeResult::err( - legacy_test_cost(), - E_COULD_NOT_GENERATE_EFFECTS, - )); - } - }; - let object_runtime_ref: &mut ObjectRuntime = context.extensions_mut().get_mut(); - let all_active_child_objects_with_values = object_runtime_ref - .all_active_child_objects() - .filter(|child| child.copied_value.is_some()) - .map(|child| *child.id) - .collect::>(); - let inventories = &mut object_runtime_ref.test_inventories; - let mut new_object_values = IndexMap::new(); - let mut transferred = vec![]; - // cleanup inventories - // we will remove all changed objects - // - deleted objects need to be removed to mark deletions - // - written objects are removed and later replaced to mark new values and new - // owners - // - child objects will not be reflected in transfers, but need to be no longer - // retrievable - for id in deleted_object_ids - .iter() - .chain(writes.keys()) - .chain(&all_active_child_objects_with_values) - { - for addr_inventory in inventories.address_inventories.values_mut() { - for s in addr_inventory.values_mut() { - s.shift_remove(id); - } - } - for s in &mut inventories.shared_inventory.values_mut() { - s.shift_remove(id); - } - for s in &mut inventories.immutable_inventory.values_mut() { - s.shift_remove(id); - } - inventories.taken.remove(id); - } - // handle transfers, inserting transferred/written objects into their respective - // inventory - let mut created = vec![]; - let mut written = vec![]; - for (id, (owner, ty, value)) in writes { - // write configs to cache - new_object_values.insert(id, (ty.clone(), value.copy_value().unwrap())); - transferred.push((id, owner)); - incorrect_shared_or_imm_handling = incorrect_shared_or_imm_handling - || taken_shared_or_imm - .get(&id) - .map(|shared_or_imm_owner| shared_or_imm_owner != &owner) - .unwrap_or(/* not incorrect */ false); - if created_object_ids.contains(&id) { - created.push(id); - } else { - written.push(id); - } - match owner { - Owner::AddressOwner(a) => { - inventories - .address_inventories - .entry(a) - .or_default() - .entry(ty) - .or_default() - .insert(id); - } - Owner::ObjectOwner(_) => (), - Owner::Shared { .. } => { - inventories - .shared_inventory - .entry(ty) - .or_default() - .insert(id); - } - Owner::Immutable => { - inventories - .immutable_inventory - .entry(ty) - .or_default() - .insert(id); - } - } - } - // deletions already handled above, but we drop the delete kind for the effects - let mut deleted = vec![]; - for id in deleted_object_ids { - // Mark as "incorrect" if a imm object was deleted. Allow shared objects to be - // deleted though. - incorrect_shared_or_imm_handling = incorrect_shared_or_imm_handling - || taken_shared_or_imm - .get(&id) - .is_some_and(|owner| matches!(owner, Owner::Immutable)); - deleted.push(id); - } - // find all wrapped objects - let mut all_wrapped = BTreeSet::new(); - let object_runtime_ref: &ObjectRuntime = context.extensions().get(); - find_all_wrapped_objects( - context, - &mut all_wrapped, - new_object_values - .iter() - .map(|(id, (ty, value))| (id, ty, value)), - ); - find_all_wrapped_objects( - context, - &mut all_wrapped, - object_runtime_ref - .all_active_child_objects() - .filter_map(|child| Some((child.id, child.ty, child.copied_value?))), - ); - // mark as "incorrect" if a shared/imm object was wrapped or is a child object - incorrect_shared_or_imm_handling = incorrect_shared_or_imm_handling - || taken_shared_or_imm.keys().any(|id| { - all_wrapped.contains(id) || all_active_child_objects_with_values.contains(id) - }); - // if incorrect handling, return with an 'abort' - if incorrect_shared_or_imm_handling { - return Ok(NativeResult::err( - legacy_test_cost(), - E_INVALID_SHARED_OR_IMMUTABLE_USAGE, - )); - } - - // mark all wrapped as deleted - for wrapped in all_wrapped { - deleted.push(wrapped) - } - - // new input objects are remaining taken objects not written/deleted - let object_runtime_ref: &mut ObjectRuntime = context.extensions_mut().get_mut(); - let mut config_settings = vec![]; - for child in object_runtime_ref.all_active_child_objects() { - let s: StructTag = child.move_type.clone().into(); - let is_setting = DynamicFieldInfo::is_dynamic_field(&s) - && matches!(&s.type_params[1], TypeTag::Struct(s) if config::is_setting(s)); - if is_setting { - config_settings.push(( - *child.owner, - *child.id, - child.move_type.clone(), - child.copied_value, - )); - } - } - for (config, setting, ty, value) in config_settings { - object_runtime_ref.config_setting_cache_update(config, setting, ty, value) - } - object_runtime_ref.state.input_objects = object_runtime_ref - .test_inventories - .taken - .iter() - .map(|(id, owner)| (*id, *owner)) - .collect::>(); - // update inventories - // check for bad updates to immutable values - for (id, (ty, value)) in new_object_values { - debug_assert!(!all_active_child_objects_with_values.contains(&id)); - if let Some(prev_value) = object_runtime_ref - .test_inventories - .taken_immutable_values - .get(&ty) - .and_then(|values| values.get(&id)) - { - if !value.equals(prev_value)? { - return Ok(NativeResult::err( - legacy_test_cost(), - E_INVALID_SHARED_OR_IMMUTABLE_USAGE, - )); - } - } - object_runtime_ref - .test_inventories - .objects - .insert(id, value); - } - // remove deleted - for id in &deleted { - object_runtime_ref.test_inventories.objects.remove(id); - } - // remove active child objects - for id in all_active_child_objects_with_values { - object_runtime_ref.test_inventories.objects.remove(&id); - } - - let effects = transaction_effects( - created, - written, - deleted, - transferred, - user_events.len() as u64, - ); - Ok(NativeResult::ok(legacy_test_cost(), smallvec![effects])) -} - -// native fun take_from_address_by_id(account: address, id: ID): T; -pub fn take_from_address_by_id( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - let specified_ty = get_specified_ty(ty_args); - let id = pop_id(&mut args)?; - let account: IotaAddress = pop_arg!(args, AccountAddress).into(); - pop_arg!(args, StructRef); - assert!(args.is_empty()); - let object_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut(); - let inventories = &mut object_runtime.test_inventories; - let res = take_from_inventory( - |x| { - inventories - .address_inventories - .get(&account) - .and_then(|inv| inv.get(&specified_ty)) - .map(|s| s.contains(x)) - .unwrap_or(false) - }, - &inventories.objects, - &mut inventories.taken, - &mut object_runtime.state.input_objects, - id, - Owner::AddressOwner(account), - ); - Ok(match res { - Ok(value) => NativeResult::ok(legacy_test_cost(), smallvec![value]), - Err(native_err) => native_err, - }) -} - -// native fun ids_for_address(account: address): vector; -pub fn ids_for_address( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - let specified_ty = get_specified_ty(ty_args); - let account: IotaAddress = pop_arg!(args, AccountAddress).into(); - assert!(args.is_empty()); - let object_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut(); - let inventories = &mut object_runtime.test_inventories; - let ids = inventories - .address_inventories - .get(&account) - .and_then(|inv| inv.get(&specified_ty)) - .map(|s| s.iter().map(|id| pack_id(*id)).collect::>()) - .unwrap_or_default(); - let ids_vector = Value::vector_for_testing_only(ids); - Ok(NativeResult::ok(legacy_test_cost(), smallvec![ids_vector])) -} - -// native fun most_recent_id_for_address(account: address): Option; -pub fn most_recent_id_for_address( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - let specified_ty = get_specified_ty(ty_args); - let account: IotaAddress = pop_arg!(args, AccountAddress).into(); - assert!(args.is_empty()); - let object_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut(); - let inventories = &mut object_runtime.test_inventories; - let most_recent_id = match inventories.address_inventories.get(&account) { - None => pack_option(None), - Some(inv) => most_recent_at_ty(&inventories.taken, inv, specified_ty), - }; - Ok(NativeResult::ok(legacy_test_cost(), smallvec![ - most_recent_id - ])) -} - -// native fun was_taken_from_address(account: address, id: ID): bool; -pub fn was_taken_from_address( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - assert!(ty_args.is_empty()); - let id = pop_id(&mut args)?; - let account: IotaAddress = pop_arg!(args, AccountAddress).into(); - assert!(args.is_empty()); - let object_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut(); - let inventories = &mut object_runtime.test_inventories; - let was_taken = inventories - .taken - .get(&id) - .map(|owner| owner == &Owner::AddressOwner(account)) - .unwrap_or(false); - Ok(NativeResult::ok(legacy_test_cost(), smallvec![ - Value::bool(was_taken) - ])) -} - -// native fun take_immutable_by_id(id: ID): T; -pub fn take_immutable_by_id( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - let specified_ty = get_specified_ty(ty_args); - let id = pop_id(&mut args)?; - pop_arg!(args, StructRef); - assert!(args.is_empty()); - let object_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut(); - let inventories = &mut object_runtime.test_inventories; - let res = take_from_inventory( - |x| { - inventories - .immutable_inventory - .get(&specified_ty) - .map(|s| s.contains(x)) - .unwrap_or(false) - }, - &inventories.objects, - &mut inventories.taken, - &mut object_runtime.state.input_objects, - id, - Owner::Immutable, - ); - Ok(match res { - Ok(value) => { - inventories - .taken_immutable_values - .entry(specified_ty) - .or_default() - .insert(id, value.copy_value().unwrap()); - NativeResult::ok(legacy_test_cost(), smallvec![value]) - } - Err(native_err) => native_err, - }) -} - -// native fun most_recent_immutable_id(): Option; -pub fn most_recent_immutable_id( - context: &mut NativeContext, - ty_args: Vec, - args: VecDeque, -) -> PartialVMResult { - let specified_ty = get_specified_ty(ty_args); - assert!(args.is_empty()); - let object_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut(); - let inventories = &mut object_runtime.test_inventories; - let most_recent_id = most_recent_at_ty( - &inventories.taken, - &inventories.immutable_inventory, - specified_ty, - ); - Ok(NativeResult::ok(legacy_test_cost(), smallvec![ - most_recent_id - ])) -} - -// native fun was_taken_immutable(id: ID): bool; -pub fn was_taken_immutable( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - assert!(ty_args.is_empty()); - let id = pop_id(&mut args)?; - assert!(args.is_empty()); - let object_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut(); - let inventories = &mut object_runtime.test_inventories; - let was_taken = inventories - .taken - .get(&id) - .map(|owner| owner == &Owner::Immutable) - .unwrap_or(false); - Ok(NativeResult::ok(legacy_test_cost(), smallvec![ - Value::bool(was_taken) - ])) -} - -// native fun take_shared_by_id(id: ID): T; -pub fn take_shared_by_id( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - let specified_ty = get_specified_ty(ty_args); - let id = pop_id(&mut args)?; - pop_arg!(args, StructRef); - assert!(args.is_empty()); - let object_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut(); - let inventories = &mut object_runtime.test_inventories; - let res = take_from_inventory( - |x| { - inventories - .shared_inventory - .get(&specified_ty) - .map(|s| s.contains(x)) - .unwrap_or(false) - }, - &inventories.objects, - &mut inventories.taken, - &mut object_runtime.state.input_objects, - id, - Owner::Shared { initial_shared_version: /* dummy */ SequenceNumber::new() }, - ); - Ok(match res { - Ok(value) => NativeResult::ok(legacy_test_cost(), smallvec![value]), - Err(native_err) => native_err, - }) -} - -// native fun most_recent_id_shared(): Option; -pub fn most_recent_id_shared( - context: &mut NativeContext, - ty_args: Vec, - args: VecDeque, -) -> PartialVMResult { - let specified_ty = get_specified_ty(ty_args); - assert!(args.is_empty()); - let object_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut(); - let inventories = &mut object_runtime.test_inventories; - let most_recent_id = most_recent_at_ty( - &inventories.taken, - &inventories.shared_inventory, - specified_ty, - ); - Ok(NativeResult::ok(legacy_test_cost(), smallvec![ - most_recent_id - ])) -} - -// native fun was_taken_shared(id: ID): bool; -pub fn was_taken_shared( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - assert!(ty_args.is_empty()); - let id = pop_id(&mut args)?; - assert!(args.is_empty()); - let object_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut(); - let inventories = &mut object_runtime.test_inventories; - let was_taken = inventories - .taken - .get(&id) - .map(|owner| matches!(owner, Owner::Shared { .. })) - .unwrap_or(false); - Ok(NativeResult::ok(legacy_test_cost(), smallvec![ - Value::bool(was_taken) - ])) -} - -pub fn allocate_receiving_ticket_for_object( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - let ty = get_specified_ty(ty_args); - let id = pop_id(&mut args)?; - - let Some((tag, layout, _)) = get_tag_and_layouts(context, &ty)? else { - return Ok(NativeResult::err( - context.gas_used(), - E_UNABLE_TO_ALLOCATE_RECEIVING_TICKET, - )); - }; - let object_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut(); - let object_version = SequenceNumber::new(); - let inventories = &mut object_runtime.test_inventories; - if inventories.allocated_tickets.contains_key(&id) { - return Ok(NativeResult::err( - context.gas_used(), - E_RECEIVING_TICKET_ALREADY_ALLOCATED, - )); - } - - let obj_value = inventories.objects.remove(&id).unwrap(); - let Some(bytes) = obj_value.simple_serialize(&layout) else { - return Ok(NativeResult::err( - context.gas_used(), - E_UNABLE_TO_ALLOCATE_RECEIVING_TICKET, - )); - }; - let move_object = unsafe { - MoveObject::new_from_execution_with_limit( - tag.into(), - false, - object_version, - bytes, - 250 * 1024, - ) - } - .unwrap(); - - let Some((owner, _)) = inventories - .address_inventories - .iter() - .find(|(_addr, objs)| objs.iter().any(|(_, ids)| ids.contains(&id))) - else { - return Ok(NativeResult::err( - context.gas_used(), - E_OBJECT_NOT_FOUND_CODE, - )); - }; - - inventories.allocated_tickets.insert( - id, - ( - DynamicallyLoadedObjectMetadata { - version: SequenceNumber::new(), - digest: ObjectDigest::MIN, - owner: Owner::AddressOwner(*owner), - storage_rebate: 0, - previous_transaction: TransactionDigest::default(), - }, - obj_value, - ), - ); - - let object = Object::new_move( - move_object, - Owner::AddressOwner(*owner), - TransactionDigest::default(), - ); - - // NB: Must be a `&&` reference since the extension stores a static ref to the - // object storage. - let store: &&InMemoryTestStore = context.extensions().get(); - store.0.write().unwrap().insert_object(object); - - Ok(NativeResult::ok(legacy_test_cost(), smallvec![Value::u64( - object_version.value() - )])) -} - -pub fn deallocate_receiving_ticket_for_object( - context: &mut NativeContext, - _ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - let id = pop_id(&mut args)?; - - let object_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut(); - let inventories = &mut object_runtime.test_inventories; - // Deallocate the ticket -- we should never hit this scenario - let Some((_, value)) = inventories.allocated_tickets.remove(&id) else { - return Ok(NativeResult::err( - context.gas_used(), - E_UNABLE_TO_DEALLOCATE_RECEIVING_TICKET, - )); - }; - - // Insert the object value that we saved from earlier and put it back into the - // object set. This is fine since it can't have been touched. - inventories.objects.insert(id, value); - - // Remove the object from storage. We should never hit this scenario either. - let store: &&InMemoryTestStore = context.extensions().get(); - if store.0.write().unwrap().remove_object(id).is_none() { - return Ok(NativeResult::err( - context.gas_used(), - E_UNABLE_TO_DEALLOCATE_RECEIVING_TICKET, - )); - }; - - Ok(NativeResult::ok(legacy_test_cost(), smallvec![])) -} - -// impls - -fn take_from_inventory( - is_in_inventory: impl FnOnce(&ObjectID) -> bool, - objects: &BTreeMap, - taken: &mut BTreeMap, - input_objects: &mut BTreeMap, - id: ObjectID, - owner: Owner, -) -> Result { - let obj_opt = objects.get(&id); - let is_taken = taken.contains_key(&id); - if is_taken || !is_in_inventory(&id) || obj_opt.is_none() { - return Err(NativeResult::err( - legacy_test_cost(), - E_OBJECT_NOT_FOUND_CODE, - )); - } - taken.insert(id, owner); - input_objects.insert(id, owner); - let obj = obj_opt.unwrap(); - Ok(obj.copy_value().unwrap()) -} - -fn most_recent_at_ty( - taken: &BTreeMap, - inv: &BTreeMap>, - ty: Type, -) -> Value { - pack_option(most_recent_at_ty_opt(taken, inv, ty)) -} - -fn most_recent_at_ty_opt( - taken: &BTreeMap, - inv: &BTreeMap>, - ty: Type, -) -> Option { - let s = inv.get(&ty)?; - let most_recent_id = s.iter().filter(|id| !taken.contains_key(id)).last()?; - Some(pack_id(*most_recent_id)) -} - -fn get_specified_ty(mut ty_args: Vec) -> Type { - assert!(ty_args.len() == 1); - ty_args.pop().unwrap() -} - -// helpers -fn pop_id(args: &mut VecDeque) -> PartialVMResult { - let v = match args.pop_back() { - None => { - return Err(PartialVMError::new( - StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR, - )); - } - Some(v) => v, - }; - Ok(get_nth_struct_field(v, 0)? - .value_as::()? - .into()) -} - -fn pack_id(a: impl Into) -> Value { - Value::struct_(values::Struct::pack(vec![Value::address(a.into())])) -} - -fn pack_ids(items: impl IntoIterator>) -> Value { - Value::vector_for_testing_only(items.into_iter().map(pack_id)) -} - -fn pack_vec_map(items: impl IntoIterator) -> Value { - Value::struct_(values::Struct::pack(vec![Value::vector_for_testing_only( - items - .into_iter() - .map(|(k, v)| Value::struct_(values::Struct::pack(vec![k, v]))), - )])) -} - -fn transaction_effects( - created: impl IntoIterator>, - written: impl IntoIterator>, - deleted: impl IntoIterator>, - transferred: impl IntoIterator, - num_events: u64, -) -> Value { - let mut transferred_to_account = vec![]; - let mut transferred_to_object = vec![]; - let mut shared = vec![]; - let mut frozen = vec![]; - for (id, owner) in transferred { - match owner { - Owner::AddressOwner(a) => { - transferred_to_account.push((pack_id(id), Value::address(a.into()))) - } - Owner::ObjectOwner(o) => transferred_to_object.push((pack_id(id), pack_id(o))), - Owner::Shared { .. } => shared.push(id), - Owner::Immutable => frozen.push(id), - } - } - - let created_field = pack_ids(created); - let written_field = pack_ids(written); - let deleted_field = pack_ids(deleted); - let transferred_to_account_field = pack_vec_map(transferred_to_account); - let transferred_to_object_field = pack_vec_map(transferred_to_object); - let shared_field = pack_ids(shared); - let frozen_field = pack_ids(frozen); - let num_events_field = Value::u64(num_events); - Value::struct_(values::Struct::pack(vec![ - created_field, - written_field, - deleted_field, - transferred_to_account_field, - transferred_to_object_field, - shared_field, - frozen_field, - num_events_field, - ])) -} - -fn pack_option(opt: Option) -> Value { - let item = match opt { - Some(v) => vec![v], - None => vec![], - }; - Value::struct_(values::Struct::pack(vec![Value::vector_for_testing_only( - item, - )])) -} - -fn find_all_wrapped_objects<'a>( - context: &NativeContext, - ids: &mut BTreeSet, - new_object_values: impl IntoIterator)>, -) { - for (_id, ty, value) in new_object_values { - let layout = match context.type_to_type_layout(ty) { - Ok(Some(layout)) => layout, - _ => { - debug_assert!(false); - continue; - } - }; - let annotated_layout = match context.type_to_fully_annotated_layout(ty) { - Ok(Some(layout)) => layout, - _ => { - debug_assert!(false); - continue; - } - }; - let blob = value.borrow().simple_serialize(&layout).unwrap(); - // TODO (annotated-visitor): Replace with a custom visitor. - let move_value = MoveValue::simple_deserialize(&blob, &annotated_layout).unwrap(); - let uid = UID::type_(); - visit_structs(&move_value, |depth, tag, fields| { - if tag != &uid { - return if depth == 0 { - debug_assert!(!fields.is_empty()); - // all object values so the first field is a UID that should be skipped - &fields[1..] - } else { - fields - }; - } - debug_assert!(fields.len() == 1); - let id = &fields[0].1; - let addr_field = match &id { - MoveValue::Struct(MoveStruct { fields, .. }) => { - debug_assert!(fields.len() == 1); - &fields[0].1 - } - v => unreachable!("Not reachable via Move type system: {:?}", v), - }; - let addr = match addr_field { - MoveValue::Address(a) => *a, - v => unreachable!("Not reachable via Move type system: {:?}", v), - }; - ids.insert(addr.into()); - fields - }) - } -} - -fn visit_structs(move_value: &MoveValue, mut visit_with_types: FVisitTypes) -where - for<'a> FVisitTypes: FnMut( - // value depth - usize, - &StructTag, - &'a Vec<(Identifier, MoveValue)>, - ) -> &'a [(Identifier, MoveValue)], -{ - visit_structs_impl(move_value, &mut visit_with_types, 0) -} - -fn visit_structs_impl( - move_value: &MoveValue, - visit_with_types: &mut FVisitTypes, - depth: usize, -) where - for<'a> FVisitTypes: FnMut( - // value depth - usize, - &StructTag, - &'a Vec<(Identifier, MoveValue)>, - ) -> &'a [(Identifier, MoveValue)], -{ - let next_depth = depth + 1; - match move_value { - MoveValue::U8(_) - | MoveValue::U16(_) - | MoveValue::U32(_) - | MoveValue::U64(_) - | MoveValue::U128(_) - | MoveValue::U256(_) - | MoveValue::Bool(_) - | MoveValue::Address(_) - | MoveValue::Signer(_) => (), - MoveValue::Vector(vs) => { - for v in vs { - visit_structs_impl(v, visit_with_types, next_depth) - } - } - MoveValue::Struct(MoveStruct { type_, fields }) => { - let fields = visit_with_types(depth, type_, fields); - for (_, v) in fields { - visit_structs_impl(v, visit_with_types, next_depth) - } - } - MoveValue::Variant(MoveVariant { - type_, - variant_name: _, - tag: _, - fields, - }) => { - let fields = visit_with_types(depth, type_, fields); - for (_, v) in fields { - visit_structs_impl(v, visit_with_types, next_depth) - } - } - } -} diff --git a/iota-execution/v0/iota-move-natives/src/test_utils.rs b/iota-execution/v0/iota-move-natives/src/test_utils.rs deleted file mode 100644 index 26a503eb9fb..00000000000 --- a/iota-execution/v0/iota-move-natives/src/test_utils.rs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::collections::VecDeque; - -use move_binary_format::errors::PartialVMResult; -use move_core_types::{gas_algebra::InternalGas, runtime_value::MoveTypeLayout}; -use move_vm_runtime::native_functions::NativeContext; -use move_vm_types::{ - loaded_data::runtime_types::Type, natives::function::NativeResult, values::Value, -}; -use smallvec::smallvec; - -use crate::{legacy_test_cost, types::is_otw_struct}; - -pub fn destroy( - _context: &mut NativeContext, - _ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - args.pop_back(); - Ok(NativeResult::ok(legacy_test_cost(), smallvec![])) -} - -pub fn create_one_time_witness( - context: &mut NativeContext, - mut ty_args: Vec, - args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.len() == 1); - debug_assert!(args.is_empty()); - - let ty = ty_args.pop().unwrap(); - let type_tag = context.type_to_type_tag(&ty)?; - let type_layout = context.type_to_type_layout(&ty)?; - - let Some(MoveTypeLayout::Struct(struct_layout)) = type_layout else { - return Ok(NativeResult::err(InternalGas::new(1), 0)); - }; - - let hardened_check = context.runtime_limits_config().hardened_otw_check; - if is_otw_struct(&struct_layout, &type_tag, hardened_check) { - Ok(NativeResult::ok(legacy_test_cost(), smallvec![ - Value::struct_(move_vm_types::values::Struct::pack(vec![Value::bool(true)])) - ])) - } else { - Ok(NativeResult::err(InternalGas::new(1), 1)) - } -} diff --git a/iota-execution/v0/iota-move-natives/src/transfer.rs b/iota-execution/v0/iota-move-natives/src/transfer.rs deleted file mode 100644 index e870b3fac1c..00000000000 --- a/iota-execution/v0/iota-move-natives/src/transfer.rs +++ /dev/null @@ -1,253 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::collections::VecDeque; - -use iota_types::{ - base_types::{MoveObjectType, ObjectID, SequenceNumber}, - object::Owner, -}; -use move_binary_format::errors::{PartialVMError, PartialVMResult}; -use move_core_types::{ - account_address::AccountAddress, gas_algebra::InternalGas, language_storage::TypeTag, - vm_status::StatusCode, -}; -use move_vm_runtime::{native_charge_gas_early_exit, native_functions::NativeContext}; -use move_vm_types::{ - loaded_data::runtime_types::Type, natives::function::NativeResult, pop_arg, values::Value, -}; -use smallvec::smallvec; - -use super::object_runtime::{ObjectRuntime, TransferResult}; -use crate::{ - NativesCostTable, get_receiver_object_id, get_tag_and_layouts, - object_runtime::object_store::ObjectResult, -}; - -const E_SHARED_NON_NEW_OBJECT: u64 = 0; -const E_BCS_SERIALIZATION_FAILURE: u64 = 1; -const E_RECEIVING_OBJECT_TYPE_MISMATCH: u64 = 2; -// Represents both the case where the object does not exist and the case where -// the object is not able to be accessed through the parent that is passed-in. -const E_UNABLE_TO_RECEIVE_OBJECT: u64 = 3; - -#[derive(Clone, Debug)] -pub struct TransferReceiveObjectInternalCostParams { - pub transfer_receive_object_internal_cost_base: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun receive_object_internal -/// Implementation of the Move native function `receive_object_internal(parent: &mut UID, rec: Receiver): T` gas cost: -/// transfer_receive_object_internal_cost_base | covers various fixed costs in -/// the oper ******************************************************************* -/// **************************** - -pub fn receive_object_internal( - context: &mut NativeContext, - mut ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.len() == 1); - debug_assert!(args.len() == 3); - let transfer_receive_object_internal_cost_params = context - .extensions_mut() - .get::() - .transfer_receive_object_internal_cost_params - .clone(); - native_charge_gas_early_exit!( - context, - transfer_receive_object_internal_cost_params.transfer_receive_object_internal_cost_base - ); - let child_ty = ty_args.pop().unwrap(); - let child_receiver_sequence_number: SequenceNumber = pop_arg!(args, u64).into(); - let child_receiver_object_id = args.pop_back().unwrap(); - let parent = pop_arg!(args, AccountAddress).into(); - assert!(args.is_empty()); - let child_id: ObjectID = get_receiver_object_id(child_receiver_object_id.copy_value().unwrap()) - .unwrap() - .value_as::() - .unwrap() - .into(); - assert!(ty_args.is_empty()); - - let Some((tag, layout, annotated_layout)) = get_tag_and_layouts(context, &child_ty)? else { - return Ok(NativeResult::err( - context.gas_used(), - E_BCS_SERIALIZATION_FAILURE, - )); - }; - - let object_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut(); - let child = match object_runtime.receive_object( - parent, - child_id, - child_receiver_sequence_number, - &child_ty, - &layout, - &annotated_layout, - MoveObjectType::from(tag), - ) { - // NB: Loaded and doesn't exist and inauthenticated read should lead to the exact same error - Ok(None) => { - return Ok(NativeResult::err( - context.gas_used(), - E_UNABLE_TO_RECEIVE_OBJECT, - )); - } - Ok(Some(ObjectResult::Loaded(gv))) => gv, - Ok(Some(ObjectResult::MismatchedType)) => { - return Ok(NativeResult::err( - context.gas_used(), - E_RECEIVING_OBJECT_TYPE_MISMATCH, - )); - } - Err(x) => return Err(x), - }; - - Ok(NativeResult::ok(context.gas_used(), smallvec![child])) -} - -#[derive(Clone, Debug)] -pub struct TransferInternalCostParams { - pub transfer_transfer_internal_cost_base: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun transfer_impl -/// Implementation of the Move native function `transfer_impl(obj: T, -/// recipient: address)` gas cost: transfer_transfer_internal_cost_base -/// | covers various fixed costs in the oper ********************************** -/// ************************************************************* -pub fn transfer_internal( - context: &mut NativeContext, - mut ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.len() == 1); - debug_assert!(args.len() == 2); - - let transfer_transfer_internal_cost_params = context - .extensions_mut() - .get::() - .transfer_transfer_internal_cost_params - .clone(); - - native_charge_gas_early_exit!( - context, - transfer_transfer_internal_cost_params.transfer_transfer_internal_cost_base - ); - - let ty = ty_args.pop().unwrap(); - let recipient = pop_arg!(args, AccountAddress); - let obj = args.pop_back().unwrap(); - - let owner = Owner::AddressOwner(recipient.into()); - object_runtime_transfer(context, owner, ty, obj)?; - let cost = context.gas_used(); - Ok(NativeResult::ok(cost, smallvec![])) -} - -#[derive(Clone, Debug)] -pub struct TransferFreezeObjectCostParams { - pub transfer_freeze_object_cost_base: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun freeze_object -/// Implementation of the Move native function `freeze_object(obj: T)` -/// gas cost: transfer_freeze_object_cost_base | covers -/// various fixed costs in the oper ******************************************** -/// *************************************************** -pub fn freeze_object( - context: &mut NativeContext, - mut ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.len() == 1); - debug_assert!(args.len() == 1); - - let transfer_freeze_object_cost_params = context - .extensions_mut() - .get::() - .transfer_freeze_object_cost_params - .clone(); - - native_charge_gas_early_exit!( - context, - transfer_freeze_object_cost_params.transfer_freeze_object_cost_base - ); - - let ty = ty_args.pop().unwrap(); - let obj = args.pop_back().unwrap(); - - object_runtime_transfer(context, Owner::Immutable, ty, obj)?; - - Ok(NativeResult::ok(context.gas_used(), smallvec![])) -} - -#[derive(Clone, Debug)] -pub struct TransferShareObjectCostParams { - pub transfer_share_object_cost_base: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun share_object -/// Implementation of the Move native function `share_object(obj: T)` -/// gas cost: transfer_share_object_cost_base | covers -/// various fixed costs in the oper ******************************************** -/// *************************************************** -pub fn share_object( - context: &mut NativeContext, - mut ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.len() == 1); - debug_assert!(args.len() == 1); - - let transfer_share_object_cost_params = context - .extensions_mut() - .get::() - .transfer_share_object_cost_params - .clone(); - - native_charge_gas_early_exit!( - context, - transfer_share_object_cost_params.transfer_share_object_cost_base - ); - - let ty = ty_args.pop().unwrap(); - let obj = args.pop_back().unwrap(); - let transfer_result = object_runtime_transfer( - context, - // Dummy version, to be filled with the correct initial version when the effects of the - // transaction are written to storage. - Owner::Shared { - initial_shared_version: SequenceNumber::new(), - }, - ty, - obj, - )?; - let cost = context.gas_used(); - Ok(match transfer_result { - // New means the ID was created in this transaction - // SameOwner means the object was previously shared and was re-shared - TransferResult::New | TransferResult::SameOwner => NativeResult::ok(cost, smallvec![]), - TransferResult::OwnerChanged => NativeResult::err(cost, E_SHARED_NON_NEW_OBJECT), - }) -} - -fn object_runtime_transfer( - context: &mut NativeContext, - owner: Owner, - ty: Type, - obj: Value, -) -> PartialVMResult { - if !matches!(context.type_to_type_tag(&ty)?, TypeTag::Struct(_)) { - return Err( - PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) - .with_message("Iota verifier guarantees this is a struct".to_string()), - ); - } - - let obj_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut(); - obj_runtime.transfer(owner, ty, obj) -} diff --git a/iota-execution/v0/iota-move-natives/src/tx_context.rs b/iota-execution/v0/iota-move-natives/src/tx_context.rs deleted file mode 100644 index 99bb489c6b6..00000000000 --- a/iota-execution/v0/iota-move-natives/src/tx_context.rs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::{collections::VecDeque, convert::TryFrom}; - -use iota_types::base_types::{ObjectID, TransactionDigest}; -use move_binary_format::errors::PartialVMResult; -use move_core_types::{account_address::AccountAddress, gas_algebra::InternalGas}; -use move_vm_runtime::{native_charge_gas_early_exit, native_functions::NativeContext}; -use move_vm_types::{ - loaded_data::runtime_types::Type, natives::function::NativeResult, pop_arg, values::Value, -}; -use smallvec::smallvec; - -use crate::{NativesCostTable, object_runtime::ObjectRuntime}; - -#[derive(Clone)] -pub struct TxContextDeriveIdCostParams { - pub tx_context_derive_id_cost_base: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun derive_id -/// Implementation of the Move native function `fun derive_id(tx_hash: -/// vector, ids_created: u64): address` gas cost: -/// tx_context_derive_id_cost_base | we operate on fixed size -/// data structures ************************************************************ -/// *********************************** -pub fn derive_id( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 2); - - let tx_context_derive_id_cost_params = context - .extensions_mut() - .get::() - .tx_context_derive_id_cost_params - .clone(); - native_charge_gas_early_exit!( - context, - tx_context_derive_id_cost_params.tx_context_derive_id_cost_base - ); - - let ids_created = pop_arg!(args, u64); - let tx_hash = pop_arg!(args, Vec); - - // unwrap safe because all digests in Move are serialized from the Rust - // `TransactionDigest` - let digest = TransactionDigest::try_from(tx_hash.as_slice()).unwrap(); - let address = AccountAddress::from(ObjectID::derive_id(digest, ids_created)); - let obj_runtime: &mut ObjectRuntime = context.extensions_mut().get_mut(); - obj_runtime.new_id(address.into())?; - - Ok(NativeResult::ok(context.gas_used(), smallvec![ - Value::address(address) - ])) -} diff --git a/iota-execution/v0/iota-move-natives/src/types.rs b/iota-execution/v0/iota-move-natives/src/types.rs deleted file mode 100644 index d5837407015..00000000000 --- a/iota-execution/v0/iota-move-natives/src/types.rs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::collections::VecDeque; - -use move_binary_format::errors::PartialVMResult; -use move_core_types::{ - gas_algebra::InternalGas, - language_storage::TypeTag, - runtime_value::{MoveStructLayout, MoveTypeLayout}, -}; -use move_vm_runtime::{native_charge_gas_early_exit, native_functions::NativeContext}; -use move_vm_types::{ - loaded_data::runtime_types::Type, natives::function::NativeResult, values::Value, -}; -use smallvec::smallvec; - -use crate::NativesCostTable; - -pub(crate) fn is_otw_struct( - struct_layout: &MoveStructLayout, - type_tag: &TypeTag, - hardened_check: bool, -) -> bool { - let has_one_bool_field = matches!(struct_layout.0.as_slice(), [MoveTypeLayout::Bool]); - - // If a struct type has the same name as the module that defines it but - // capitalized, and it has a single field of type bool, it means that it's a - // one-time witness type. The remaining properties of a one-time witness - // type are checked in the one_time_witness_verifier pass in - // the Iota bytecode verifier (a type with this name and with a single bool - // field that does not have all the remaining properties of a one-time - // witness type will cause a verifier error). - matches!( - type_tag, - TypeTag::Struct(struct_tag) if - has_one_bool_field && - struct_tag.name.to_string() == struct_tag.module.to_string().to_ascii_uppercase() && - // hardened check ==> no generic types - (!hardened_check || struct_tag.type_params.is_empty()) - ) -} - -#[derive(Clone)] -pub struct TypesIsOneTimeWitnessCostParams { - pub types_is_one_time_witness_cost_base: InternalGas, - pub types_is_one_time_witness_type_tag_cost_per_byte: InternalGas, - pub types_is_one_time_witness_type_cost_per_byte: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun is_one_time_witness -/// Implementation of the Move native function `is_one_time_witness(_: -/// &T): bool` gas cost: types_is_one_time_witness_cost_base -/// | base cost as this can be expensive oper -/// + types_is_one_time_witness_type_tag_cost_per_byte * -/// type_tag.size() | cost per byte of converting type to -/// type tag -/// + types_is_one_time_witness_type_cost_per_byte * ty.size() | -/// cost per byte of converting type to type layout -/// **************************************************************************** -/// ******************* -pub fn is_one_time_witness( - context: &mut NativeContext, - mut ty_args: Vec, - args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.len() == 1); - debug_assert!(args.len() == 1); - - let type_is_one_time_witness_cost_params = context - .extensions_mut() - .get::() - .type_is_one_time_witness_cost_params - .clone(); - - native_charge_gas_early_exit!( - context, - type_is_one_time_witness_cost_params.types_is_one_time_witness_cost_base - ); - - // unwrap safe because the interface of native function guarantees it. - let ty = ty_args.pop().unwrap(); - - native_charge_gas_early_exit!( - context, - type_is_one_time_witness_cost_params.types_is_one_time_witness_type_cost_per_byte - * u64::from(ty.size()).into() - ); - - let type_tag = context.type_to_type_tag(&ty)?; - native_charge_gas_early_exit!( - context, - type_is_one_time_witness_cost_params.types_is_one_time_witness_type_tag_cost_per_byte - * u64::from(type_tag.abstract_size_for_gas_metering()).into() - ); - - let type_layout = context.type_to_type_layout(&ty)?; - - let cost = context.gas_used(); - let Some(MoveTypeLayout::Struct(struct_layout)) = type_layout else { - return Ok(NativeResult::ok(cost, smallvec![Value::bool(false)])); - }; - - let hardened_check = context.runtime_limits_config().hardened_otw_check; - let is_otw = is_otw_struct(&struct_layout, &type_tag, hardened_check); - - Ok(NativeResult::ok(cost, smallvec![Value::bool(is_otw)])) -} diff --git a/iota-execution/v0/iota-move-natives/src/validator.rs b/iota-execution/v0/iota-move-natives/src/validator.rs deleted file mode 100644 index 00616f21375..00000000000 --- a/iota-execution/v0/iota-move-natives/src/validator.rs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use std::collections::VecDeque; - -use iota_types::iota_system_state::iota_system_state_inner_v1::ValidatorMetadataV1; -use move_binary_format::errors::{PartialVMError, PartialVMResult}; -use move_core_types::{gas_algebra::InternalGas, vm_status::StatusCode}; -use move_vm_runtime::{native_charge_gas_early_exit, native_functions::NativeContext}; -use move_vm_types::{ - loaded_data::runtime_types::Type, natives::function::NativeResult, pop_arg, values::Value, -}; -use smallvec::smallvec; - -use crate::NativesCostTable; - -#[derive(Clone, Debug)] -pub struct ValidatorValidateMetadataBcsCostParams { - pub validator_validate_metadata_cost_base: InternalGas, - pub validator_validate_metadata_data_cost_per_byte: InternalGas, -} -/// **************************************************************************** -/// ********************* native fun validate_metadata_bcs -/// Implementation of the Move native function `validate_metadata_bcs(metadata: -/// vector)` gas cost: validator_validate_metadata_cost_base | -/// fixed cosrs -/// + validator_validate_metadata_data_cost_per_byte * -/// metadata_bytes.len() | assume cost is proportional to size -/// **************************************************************************** -/// ******************* -pub fn validate_metadata_bcs( - context: &mut NativeContext, - ty_args: Vec, - mut args: VecDeque, -) -> PartialVMResult { - debug_assert!(ty_args.is_empty()); - debug_assert!(args.len() == 1); - - let validator_validate_metadata_bcs_cost_params = context - .extensions_mut() - .get::() - .validator_validate_metadata_bcs_cost_params - .clone(); - - native_charge_gas_early_exit!( - context, - validator_validate_metadata_bcs_cost_params.validator_validate_metadata_cost_base - ); - - let metadata_bytes = pop_arg!(args, Vec); - - native_charge_gas_early_exit!( - context, - validator_validate_metadata_bcs_cost_params.validator_validate_metadata_data_cost_per_byte - * (metadata_bytes.len() as u64).into() - ); - - let validator_metadata = - bcs::from_bytes::(&metadata_bytes).map_err(|_| { - PartialVMError::new(StatusCode::MALFORMED).with_message( - "ValidatorMetadata Move struct does not match internal ValidatorMetadataV1 struct" - .to_string(), - ) - })?; - - let cost = context.gas_used(); - - if let Result::Err(err_code) = validator_metadata.verify() { - return Ok(NativeResult::err(cost, err_code)); - } - - Ok(NativeResult::ok(cost, smallvec![])) -} diff --git a/iota-execution/v0/iota-verifier/Cargo.toml b/iota-execution/v0/iota-verifier/Cargo.toml deleted file mode 100644 index bc6a55ecdef..00000000000 --- a/iota-execution/v0/iota-verifier/Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -[package] -name = "iota-verifier-v0" -version = "0.1.0" -authors = ["IOTA Foundation "] -edition = "2021" -license = "Apache-2.0" -publish = false -description = "Move framework for Iota platform" - -[dependencies] -iota-protocol-config.workspace = true -iota-types.workspace = true -move-abstract-interpreter = { path = "../../../external-crates/move/move-execution/v0/crates/move-abstract-interpreter", package = "move-abstract-interpreter-v0" } -move-abstract-stack.workspace = true -move-binary-format.workspace = true -move-bytecode-utils.workspace = true -move-bytecode-verifier-meter.workspace = true -move-core-types.workspace = true -move-vm-config.workspace = true diff --git a/iota-execution/v0/iota-verifier/src/entry_points_verifier.rs b/iota-execution/v0/iota-verifier/src/entry_points_verifier.rs deleted file mode 100644 index 4c556f64069..00000000000 --- a/iota-execution/v0/iota-verifier/src/entry_points_verifier.rs +++ /dev/null @@ -1,260 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use iota_types::{ - IOTA_FRAMEWORK_ADDRESS, - base_types::{TX_CONTEXT_MODULE_NAME, TX_CONTEXT_STRUCT_NAME, TxContext, TxContextKind}, - clock::Clock, - error::ExecutionError, - is_object, is_object_vector, is_primitive, - move_package::{FnInfoMap, is_test_fun}, - randomness_state::is_mutable_random, - transfer::Receiving, -}; -use move_binary_format::{ - CompiledModule, - file_format::{AbilitySet, Bytecode, FunctionDefinition, SignatureToken, Visibility}, -}; -use move_bytecode_utils::format_signature_token; - -use crate::{INIT_FN_NAME, verification_failure}; - -/// Checks valid rules rules for entry points, both for module initialization -/// and transactions -/// -/// For module initialization -/// - The existence of the function is optional -/// - The function must have the name specified by `INIT_FN_NAME` -/// - The function must have `Visibility::Private` -/// - The function can have at most two parameters: -/// - mandatory &mut TxContext or &TxContext (see `is_tx_context`) in the last -/// position -/// - optional one-time witness type (see one_time_witness verifier pass) -/// passed by value in the first position -/// -/// For transaction entry points -/// - The function must have `is_entry` true -/// - The function may have a &mut TxContext or &TxContext (see `is_tx_context`) -/// parameter -/// - The transaction context parameter must be the last parameter -/// - The function cannot have any return values -pub fn verify_module( - module: &CompiledModule, - fn_info_map: &FnInfoMap, -) -> Result<(), ExecutionError> { - // When verifying test functions, a check preventing explicit calls to init - // functions is disabled. - - for func_def in &module.function_defs { - let handle = module.function_handle_at(func_def.function); - let name = module.identifier_at(handle.name); - - // allow calling init function in the test code - if !is_test_fun(name, module, fn_info_map) { - verify_init_not_called(module, func_def).map_err(verification_failure)?; - } - - if name == INIT_FN_NAME { - verify_init_function(module, func_def).map_err(verification_failure)?; - continue; - } - - // find candidate entry functions and check their parameters - // (ignore other functions) - if !func_def.is_entry { - // it's not an entry function - continue; - } - verify_entry_function_impl(module, func_def).map_err(verification_failure)?; - } - Ok(()) -} - -fn verify_init_not_called( - module: &CompiledModule, - fdef: &FunctionDefinition, -) -> Result<(), String> { - let code = match &fdef.code { - None => return Ok(()), - Some(code) => code, - }; - code.code - .iter() - .enumerate() - .filter_map(|(idx, instr)| match instr { - Bytecode::Call(fhandle_idx) => Some((idx, module.function_handle_at(*fhandle_idx))), - Bytecode::CallGeneric(finst_idx) => { - let finst = module.function_instantiation_at(*finst_idx); - Some((idx, module.function_handle_at(finst.handle))) - } - _ => None, - }) - .try_for_each(|(idx, fhandle)| { - let name = module.identifier_at(fhandle.name); - if name == INIT_FN_NAME { - Err(format!( - "{}::{} at offset {}. Cannot call a module's '{}' function from another Move function", - module.self_id(), - name, - idx, - INIT_FN_NAME - )) - } else { - Ok(()) - } - }) -} - -/// Checks if this module has a conformant `init` -fn verify_init_function(module: &CompiledModule, fdef: &FunctionDefinition) -> Result<(), String> { - if fdef.visibility != Visibility::Private { - return Err(format!( - "{}. '{}' function must be private", - module.self_id(), - INIT_FN_NAME - )); - } - - if fdef.is_entry { - return Err(format!( - "{}. '{}' cannot be 'entry'", - module.self_id(), - INIT_FN_NAME - )); - } - - let fhandle = module.function_handle_at(fdef.function); - if !fhandle.type_parameters.is_empty() { - return Err(format!( - "{}. '{}' function cannot have type parameters", - module.self_id(), - INIT_FN_NAME - )); - } - - if !module.signature_at(fhandle.return_).is_empty() { - return Err(format!( - "{}, '{}' function cannot have return values", - module.self_id(), - INIT_FN_NAME - )); - } - - let parameters = &module.signature_at(fhandle.parameters).0; - if parameters.is_empty() || parameters.len() > 2 { - return Err(format!( - "Expected at least one and at most two parameters for {}::{}", - module.self_id(), - INIT_FN_NAME, - )); - } - - // Checking only the last (and possibly the only) parameter here. If there are - // two parameters, then the first parameter must be of a one-time witness - // type and must be passed by value. This is checked by the verifier for - // pass one-time witness value (one_time_witness_verifier) - please see the - // description of this pass for additional details. - if TxContext::kind(module, ¶meters[parameters.len() - 1]) != TxContextKind::None { - Ok(()) - } else { - Err(format!( - "Expected last parameter for {0}::{1} to be &mut {2}::{3}::{4} or &{2}::{3}::{4}, \ - but found {5}", - module.self_id(), - INIT_FN_NAME, - IOTA_FRAMEWORK_ADDRESS, - TX_CONTEXT_MODULE_NAME, - TX_CONTEXT_STRUCT_NAME, - format_signature_token(module, ¶meters[0]), - )) - } -} - -fn verify_entry_function_impl( - view: &CompiledModule, - func_def: &FunctionDefinition, -) -> Result<(), String> { - let handle = view.function_handle_at(func_def.function); - let params = view.signature_at(handle.parameters); - - let all_non_ctx_params = match params.0.last() { - Some(last_param) if TxContext::kind(view, last_param) != TxContextKind::None => { - ¶ms.0[0..params.0.len() - 1] - } - _ => ¶ms.0, - }; - for param in all_non_ctx_params { - verify_param_type(view, &handle.type_parameters, param)?; - } - - for return_ty in &view.signature_at(handle.return_).0 { - verify_return_type(view, &handle.type_parameters, return_ty)?; - } - - Ok(()) -} - -fn verify_return_type( - view: &CompiledModule, - type_parameters: &[AbilitySet], - return_ty: &SignatureToken, -) -> Result<(), String> { - if matches!( - return_ty, - SignatureToken::Reference(_) | SignatureToken::MutableReference(_) - ) { - return Err("Invalid entry point return type. Expected a non reference type.".to_owned()); - } - let abilities = view - .abilities(return_ty, type_parameters) - .map_err(|e| format!("Unexpected CompiledModule error: {}", e))?; - if abilities.has_drop() { - Ok(()) - } else { - Err(format!( - "Invalid entry point return type. \ - The specified return type does not have the 'drop' ability: {}", - format_signature_token(view, return_ty), - )) - } -} - -fn verify_param_type( - view: &CompiledModule, - function_type_args: &[AbilitySet], - param: &SignatureToken, -) -> Result<(), String> { - // Only `iota::iota_system` is allowed to expose entry functions that accept a - // mutable clock parameter. - if Clock::is_mutable(view, param) { - return Err(format!( - "Invalid entry point parameter type. Clock must be passed by immutable reference. got: \ - {}", - format_signature_token(view, param), - )); - } - - // Only `iota::iota_system` is allowed to expose entry functions that accept a - // mutable Random parameter. - if is_mutable_random(view, param) { - return Err(format!( - "Invalid entry point parameter type. Random must be passed by immutable reference. got: \ - {}", - format_signature_token(view, param), - )); - } - - if is_primitive(view, function_type_args, param) - || is_object(view, function_type_args, param)? - || is_object_vector(view, function_type_args, param)? - || Receiving::is_receiving(view, param) - { - Ok(()) - } else { - Err(format!( - "Invalid entry point parameter type. Expected primitive or object type. Got: {}", - format_signature_token(view, param) - )) - } -} diff --git a/iota-execution/v0/iota-verifier/src/global_storage_access_verifier.rs b/iota-execution/v0/iota-verifier/src/global_storage_access_verifier.rs deleted file mode 100644 index 4ec2d052fa7..00000000000 --- a/iota-execution/v0/iota-verifier/src/global_storage_access_verifier.rs +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use iota_types::error::ExecutionError; -use move_binary_format::file_format::{Bytecode, CompiledModule}; - -use crate::verification_failure; - -pub fn verify_module(module: &CompiledModule) -> Result<(), ExecutionError> { - verify_global_storage_access(module) -} - -/// Global storage in iota is handled by iota instead of within Move. -/// Hence we want to forbid any global storage access in Move. -fn verify_global_storage_access(module: &CompiledModule) -> Result<(), ExecutionError> { - for func_def in &module.function_defs { - if func_def.code.is_none() { - continue; - } - let code = &func_def.code.as_ref().unwrap().code; - let mut invalid_bytecode = vec![]; - for bytecode in code { - match bytecode { - Bytecode::MoveFromDeprecated(_) - | Bytecode::MoveFromGenericDeprecated(_) - | Bytecode::MoveToDeprecated(_) - | Bytecode::MoveToGenericDeprecated(_) - | Bytecode::ImmBorrowGlobalDeprecated(_) - | Bytecode::MutBorrowGlobalDeprecated(_) - | Bytecode::ImmBorrowGlobalGenericDeprecated(_) - | Bytecode::MutBorrowGlobalGenericDeprecated(_) - | Bytecode::ExistsDeprecated(_) - | Bytecode::ExistsGenericDeprecated(_) => { - invalid_bytecode.push(bytecode); - } - Bytecode::Pop - | Bytecode::Ret - | Bytecode::BrTrue(_) - | Bytecode::BrFalse(_) - | Bytecode::Branch(_) - | Bytecode::LdU8(_) - | Bytecode::LdU16(_) - | Bytecode::LdU32(_) - | Bytecode::LdU64(_) - | Bytecode::LdU128(_) - | Bytecode::LdU256(_) - | Bytecode::CastU8 - | Bytecode::CastU16 - | Bytecode::CastU32 - | Bytecode::CastU64 - | Bytecode::CastU128 - | Bytecode::CastU256 - | Bytecode::LdConst(_) - | Bytecode::LdTrue - | Bytecode::LdFalse - | Bytecode::CopyLoc(_) - | Bytecode::MoveLoc(_) - | Bytecode::StLoc(_) - | Bytecode::Call(_) - | Bytecode::CallGeneric(_) - | Bytecode::Pack(_) - | Bytecode::PackGeneric(_) - | Bytecode::Unpack(_) - | Bytecode::UnpackGeneric(_) - | Bytecode::ReadRef - | Bytecode::WriteRef - | Bytecode::FreezeRef - | Bytecode::MutBorrowLoc(_) - | Bytecode::ImmBorrowLoc(_) - | Bytecode::MutBorrowField(_) - | Bytecode::MutBorrowFieldGeneric(_) - | Bytecode::ImmBorrowField(_) - | Bytecode::ImmBorrowFieldGeneric(_) - | Bytecode::Add - | Bytecode::Sub - | Bytecode::Mul - | Bytecode::Mod - | Bytecode::Div - | Bytecode::BitOr - | Bytecode::BitAnd - | Bytecode::Xor - | Bytecode::Shl - | Bytecode::Shr - | Bytecode::Or - | Bytecode::And - | Bytecode::Not - | Bytecode::Eq - | Bytecode::Neq - | Bytecode::Lt - | Bytecode::Gt - | Bytecode::Le - | Bytecode::Ge - | Bytecode::Abort - | Bytecode::Nop - | Bytecode::VecPack(_, _) - | Bytecode::VecLen(_) - | Bytecode::VecImmBorrow(_) - | Bytecode::VecMutBorrow(_) - | Bytecode::VecPushBack(_) - | Bytecode::VecPopBack(_) - | Bytecode::VecUnpack(_, _) - | Bytecode::VecSwap(_) - | Bytecode::PackVariant(_) - | Bytecode::PackVariantGeneric(_) - | Bytecode::UnpackVariant(_) - | Bytecode::UnpackVariantImmRef(_) - | Bytecode::UnpackVariantMutRef(_) - | Bytecode::UnpackVariantGeneric(_) - | Bytecode::UnpackVariantGenericImmRef(_) - | Bytecode::UnpackVariantGenericMutRef(_) - | Bytecode::VariantSwitch(_) => {} - } - } - if !invalid_bytecode.is_empty() { - return Err(verification_failure(format!( - "Access to Move global storage is not allowed. Found in function {}: {:?}", - module.identifier_at(module.function_handle_at(func_def.function).name), - invalid_bytecode, - ))); - } - } - Ok(()) -} diff --git a/iota-execution/v0/iota-verifier/src/id_leak_verifier.rs b/iota-execution/v0/iota-verifier/src/id_leak_verifier.rs deleted file mode 100644 index ab6c62783e7..00000000000 --- a/iota-execution/v0/iota-verifier/src/id_leak_verifier.rs +++ /dev/null @@ -1,588 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -//! Objects whose struct type has key ability represent Iota objects. -//! They have unique IDs that should never be reused. This verifier makes -//! sure that the id field of Iota objects never get leaked. -//! Unpack is the only bytecode that could extract the id field out of -//! a Iota object. From there, we track the flow of the value and make -//! sure it can never get leaked outside of the function. There are four -//! ways it can happen: -//! 1. Returned -//! 2. Written into a mutable reference -//! 3. Added to a vector -//! 4. Passed to a function cal::; -use std::{collections::BTreeMap, error::Error, num::NonZeroU64}; - -use iota_types::{ - BRIDGE_ADDRESS, IOTA_FRAMEWORK_ADDRESS, IOTA_SYSTEM_ADDRESS, - authenticator_state::AUTHENTICATOR_STATE_MODULE_NAME, - bridge::BRIDGE_MODULE_NAME, - clock::CLOCK_MODULE_NAME, - deny_list_v1::{DENY_LIST_CREATE_FUNC, DENY_LIST_MODULE}, - error::{ExecutionError, VMMVerifierErrorSubStatusCode}, - id::OBJECT_MODULE_NAME, - iota_system_state::IOTA_SYSTEM_MODULE_NAME, - randomness_state::RANDOMNESS_MODULE_NAME, -}; -use move_abstract_interpreter::absint::{ - AbstractDomain, AbstractInterpreter, FunctionContext, JoinResult, TransferFunctions, -}; -use move_abstract_stack::AbstractStack; -use move_binary_format::{ - errors::PartialVMError, - file_format::{ - Bytecode, CodeOffset, CompiledModule, FunctionDefinitionIndex, FunctionHandle, LocalIndex, - StructDefinition, StructFieldInformation, - }, -}; -use move_bytecode_verifier_meter::{Meter, Scope}; -use move_core_types::{ - account_address::AccountAddress, ident_str, identifier::IdentStr, vm_status::StatusCode, -}; - -use crate::{ - TEST_SCENARIO_MODULE_NAME, check_for_verifier_timeout, to_verification_timeout_error, - verification_failure, -}; -pub(crate) const JOIN_BASE_COST: u128 = 10; -pub(crate) const JOIN_PER_LOCAL_COST: u128 = 5; -pub(crate) const STEP_BASE_COST: u128 = 15; - -#[derive(Clone, Copy, Debug, Eq, PartialEq)] -enum AbstractValue { - Fresh, - Other, -} - -type FunctionIdent<'a> = (&'a AccountAddress, &'a IdentStr, &'a IdentStr); -const OBJECT_NEW: FunctionIdent = ( - &IOTA_FRAMEWORK_ADDRESS, - OBJECT_MODULE_NAME, - ident_str!("new"), -); -const OBJECT_NEW_UID_FROM_HASH: FunctionIdent = ( - &IOTA_FRAMEWORK_ADDRESS, - OBJECT_MODULE_NAME, - ident_str!("new_uid_from_hash"), -); -const TS_NEW_OBJECT: FunctionIdent = ( - &IOTA_FRAMEWORK_ADDRESS, - ident_str!(TEST_SCENARIO_MODULE_NAME), - ident_str!("new_object"), -); -const IOTA_SYSTEM_CREATE: FunctionIdent = ( - &IOTA_SYSTEM_ADDRESS, - IOTA_SYSTEM_MODULE_NAME, - ident_str!("create"), -); -const IOTA_CLOCK_CREATE: FunctionIdent = ( - &IOTA_FRAMEWORK_ADDRESS, - CLOCK_MODULE_NAME, - ident_str!("create"), -); -const IOTA_AUTHENTICATOR_STATE_CREATE: FunctionIdent = ( - &IOTA_FRAMEWORK_ADDRESS, - AUTHENTICATOR_STATE_MODULE_NAME, - ident_str!("create"), -); -const IOTA_RANDOMNESS_STATE_CREATE: FunctionIdent = ( - &IOTA_FRAMEWORK_ADDRESS, - RANDOMNESS_MODULE_NAME, - ident_str!("create"), -); -const IOTA_DENY_LIST_CREATE: FunctionIdent = ( - &IOTA_FRAMEWORK_ADDRESS, - DENY_LIST_MODULE, - DENY_LIST_CREATE_FUNC, -); - -const IOTA_BRIDGE_CREATE: FunctionIdent = - (&BRIDGE_ADDRESS, BRIDGE_MODULE_NAME, ident_str!("create")); -const FRESH_ID_FUNCTIONS: &[FunctionIdent] = &[OBJECT_NEW, OBJECT_NEW_UID_FROM_HASH, TS_NEW_OBJECT]; -const FUNCTIONS_TO_SKIP: &[FunctionIdent] = &[ - IOTA_SYSTEM_CREATE, - IOTA_CLOCK_CREATE, - IOTA_AUTHENTICATOR_STATE_CREATE, - IOTA_RANDOMNESS_STATE_CREATE, - IOTA_DENY_LIST_CREATE, - IOTA_BRIDGE_CREATE, -]; - -impl AbstractValue { - pub fn join(&self, value: &AbstractValue) -> AbstractValue { - if self == value { - *value - } else { - AbstractValue::Other - } - } -} - -pub fn verify_module( - module: &CompiledModule, - meter: &mut (impl Meter + ?Sized), -) -> Result<(), ExecutionError> { - verify_id_leak(module, meter) -} - -fn verify_id_leak( - module: &CompiledModule, - meter: &mut (impl Meter + ?Sized), -) -> Result<(), ExecutionError> { - for (index, func_def) in module.function_defs.iter().enumerate() { - let code = match func_def.code.as_ref() { - Some(code) => code, - None => continue, - }; - let handle = module.function_handle_at(func_def.function); - let func_view = - FunctionContext::new(module, FunctionDefinitionIndex(index as u16), code, handle); - let initial_state = AbstractState::new(&func_view); - let mut verifier = IDLeakAnalysis::new(module, &func_view); - let function_to_verify = verifier.cur_function(); - if FUNCTIONS_TO_SKIP - .iter() - .any(|to_skip| function_to_verify == *to_skip) - { - continue; - } - verifier - .analyze_function(initial_state, &func_view, meter) - .map_err(|err| { - // Handle verifificaiton timeout specially - if check_for_verifier_timeout(&err.major_status()) { - to_verification_timeout_error(err.to_string()) - } else if let Some(message) = err.source().as_ref() { - let function_name = - module.identifier_at(module.function_handle_at(func_def.function).name); - let module_name = module.self_id(); - verification_failure(format!( - "{} Found in {module_name}::{function_name}", - message - )) - } else { - verification_failure(err.to_string()) - } - })?; - } - - Ok(()) -} - -#[derive(Clone, Debug, PartialEq, Eq)] -pub(crate) struct AbstractState { - locals: BTreeMap, -} - -impl AbstractState { - /// create a new abstract state - pub fn new(function_context: &FunctionContext) -> Self { - let mut state = AbstractState { - locals: BTreeMap::new(), - }; - - for param_idx in 0..function_context.parameters().len() { - state - .locals - .insert(param_idx as LocalIndex, AbstractValue::Other); - } - - state - } -} - -impl AbstractDomain for AbstractState { - /// attempts to join state to self and returns the result - fn join( - &mut self, - state: &AbstractState, - meter: &mut (impl Meter + ?Sized), - ) -> Result { - meter.add(Scope::Function, JOIN_BASE_COST)?; - meter.add_items(Scope::Function, JOIN_PER_LOCAL_COST, state.locals.len())?; - let mut changed = false; - for (local, value) in &state.locals { - let old_value = *self.locals.get(local).unwrap_or(&AbstractValue::Other); - let new_value = value.join(&old_value); - changed |= new_value != old_value; - self.locals.insert(*local, new_value); - } - if changed { - Ok(JoinResult::Changed) - } else { - Ok(JoinResult::Unchanged) - } - } -} - -struct IDLeakAnalysis<'a> { - binary_view: &'a CompiledModule, - function_context: &'a FunctionContext<'a>, - stack: AbstractStack, -} - -impl<'a> IDLeakAnalysis<'a> { - fn new(binary_view: &'a CompiledModule, function_context: &'a FunctionContext<'a>) -> Self { - Self { - binary_view, - function_context, - stack: AbstractStack::new(), - } - } - - fn stack_popn(&mut self, n: u64) -> Result<(), PartialVMError> { - let Some(n) = NonZeroU64::new(n) else { - return Ok(()); - }; - self.stack.pop_any_n(n).map_err(|e| { - PartialVMError::new(StatusCode::VERIFIER_INVARIANT_VIOLATION) - .with_message(format!("Unexpected stack error on pop_n: {e}")) - }) - } - - fn stack_push(&mut self, val: AbstractValue) -> Result<(), PartialVMError> { - self.stack.push(val).map_err(|e| { - PartialVMError::new(StatusCode::VERIFIER_INVARIANT_VIOLATION) - .with_message(format!("Unexpected stack error on push: {e}")) - }) - } - - fn stack_pushn(&mut self, n: u64, val: AbstractValue) -> Result<(), PartialVMError> { - self.stack.push_n(val, n).map_err(|e| { - PartialVMError::new(StatusCode::VERIFIER_INVARIANT_VIOLATION) - .with_message(format!("Unexpected stack error on push_n: {e}")) - }) - } - - fn resolve_function(&self, function_handle: &FunctionHandle) -> FunctionIdent<'a> { - let m = self.binary_view.module_handle_at(function_handle.module); - let address = self.binary_view.address_identifier_at(m.address); - let module = self.binary_view.identifier_at(m.name); - let function = self.binary_view.identifier_at(function_handle.name); - (address, module, function) - } - - fn cur_function(&self) -> FunctionIdent<'a> { - let fdef = self - .binary_view - .function_def_at(self.function_context.index().unwrap()); - let handle = self.binary_view.function_handle_at(fdef.function); - self.resolve_function(handle) - } -} - -impl<'a> TransferFunctions for IDLeakAnalysis<'a> { - type Error = ExecutionError; - type State = AbstractState; - - fn execute( - &mut self, - state: &mut Self::State, - bytecode: &Bytecode, - index: CodeOffset, - last_index: CodeOffset, - meter: &mut (impl Meter + ?Sized), - ) -> Result<(), PartialVMError> { - execute_inner(self, state, bytecode, index, meter)?; - // invariant: the stack should be empty at the end of the block - // If it is not, something is wrong with the implementation, so throw an - // invariant violation - if index == last_index && !self.stack.is_empty() { - let msg = "Invalid stack transitions. Non-zero stack size at the end of the block" - .to_string(); - debug_assert!(false, "{msg}",); - return Err( - PartialVMError::new(StatusCode::VERIFIER_INVARIANT_VIOLATION).with_message(msg), - ); - } - Ok(()) - } -} - -impl<'a> AbstractInterpreter for IDLeakAnalysis<'a> {} - -fn call( - verifier: &mut IDLeakAnalysis, - function_handle: &FunctionHandle, -) -> Result<(), PartialVMError> { - let parameters = verifier - .binary_view - .signature_at(function_handle.parameters); - verifier.stack_popn(parameters.len() as u64)?; - - let return_ = verifier.binary_view.signature_at(function_handle.return_); - let function = verifier.resolve_function(function_handle); - if FRESH_ID_FUNCTIONS - .iter() - .any(|makes_fresh| function == *makes_fresh) - { - if return_.0.len() != 1 { - debug_assert!(false, "{:?} should have a single return value", function); - return Err(PartialVMError::new(StatusCode::UNKNOWN_VERIFICATION_ERROR) - .with_message("Should have a single return value".to_string()) - .with_sub_status( - VMMVerifierErrorSubStatusCode::MULTIPLE_RETURN_VALUES_NOT_ALLOWED as u64, - )); - } - verifier.stack_push(AbstractValue::Fresh)?; - } else { - verifier.stack_pushn(return_.0.len() as u64, AbstractValue::Other)?; - } - Ok(()) -} - -fn num_fields(struct_def: &StructDefinition) -> u64 { - match &struct_def.field_information { - StructFieldInformation::Native => 0, - StructFieldInformation::Declared(fields) => fields.len() as u64, - } -} - -fn pack( - verifier: &mut IDLeakAnalysis, - struct_def: &StructDefinition, -) -> Result<(), PartialVMError> { - // When packing, an object whose struct type has key ability must have the first - // field as "id". That fields must come from one of the functions that - // creates a new UID. - let handle = verifier - .binary_view - .datatype_handle_at(struct_def.struct_handle); - let num_fields = num_fields(struct_def); - verifier.stack_popn(num_fields - 1)?; - let last_value = verifier.stack.pop().unwrap(); - if handle.abilities.has_key() && last_value != AbstractValue::Fresh { - let (cur_package, cur_module, cur_function) = verifier.cur_function(); - let msg = format!( - "Invalid object creation in {cur_package}::{cur_module}::{cur_function}. \ - Object created without a newly created UID. \ - The UID must come directly from iota::{}::{}. \ - Or for tests, it can come from iota::{}::{}", - OBJECT_NEW.1, OBJECT_NEW.2, TS_NEW_OBJECT.1, TS_NEW_OBJECT.2, - ); - - return Err(PartialVMError::new(StatusCode::UNKNOWN_VERIFICATION_ERROR) - .with_message(msg) - .with_sub_status(VMMVerifierErrorSubStatusCode::INVALID_OBJECT_CREATION as u64)); - } - verifier.stack_push(AbstractValue::Other)?; - Ok(()) -} - -fn unpack( - verifier: &mut IDLeakAnalysis, - struct_def: &StructDefinition, -) -> Result<(), PartialVMError> { - verifier.stack.pop().unwrap(); - verifier.stack_pushn(num_fields(struct_def), AbstractValue::Other) -} - -fn execute_inner( - verifier: &mut IDLeakAnalysis, - state: &mut AbstractState, - bytecode: &Bytecode, - _: CodeOffset, - meter: &mut (impl Meter + ?Sized), -) -> Result<(), PartialVMError> { - meter.add(Scope::Function, STEP_BASE_COST)?; - // TODO: Better diagnostics with location - match bytecode { - Bytecode::Pop => { - verifier.stack.pop().unwrap(); - } - Bytecode::CopyLoc(_local) => { - // cannot copy a UID - verifier.stack_push(AbstractValue::Other)?; - } - Bytecode::MoveLoc(local) => { - let value = state.locals.remove(local).unwrap(); - verifier.stack_push(value)?; - } - Bytecode::StLoc(local) => { - let value = verifier.stack.pop().unwrap(); - state.locals.insert(*local, value); - } - - // Reference won't be ID. - Bytecode::FreezeRef - // ID doesn't have copy ability, hence ReadRef won't produce an ID. - | Bytecode::ReadRef - // Following are unary operators that don't apply to ID. - | Bytecode::CastU8 - | Bytecode::CastU16 - | Bytecode::CastU32 - | Bytecode::CastU64 - | Bytecode::CastU128 - | Bytecode::CastU256 - | Bytecode::Not - | Bytecode::VecLen(_) - | Bytecode::VecPopBack(_) => { - verifier.stack.pop().unwrap(); - verifier.stack_push(AbstractValue::Other)?; - } - - // These bytecodes don't operate on any value. - Bytecode::Branch(_) - | Bytecode::Nop => {} - - // These binary operators cannot produce ID as result. - Bytecode::Eq - | Bytecode::Neq - | Bytecode::Add - | Bytecode::Sub - | Bytecode::Mul - | Bytecode::Mod - | Bytecode::Div - | Bytecode::BitOr - | Bytecode::BitAnd - | Bytecode::Xor - | Bytecode::Shl - | Bytecode::Shr - | Bytecode::Or - | Bytecode::And - | Bytecode::Lt - | Bytecode::Gt - | Bytecode::Le - | Bytecode::Ge - | Bytecode::VecImmBorrow(_) - | Bytecode::VecMutBorrow(_) => { - verifier.stack.pop().unwrap(); - verifier.stack.pop().unwrap(); - verifier.stack_push(AbstractValue::Other)?; - } - Bytecode::WriteRef => { - verifier.stack.pop().unwrap(); - verifier.stack.pop().unwrap(); - } - - // These bytecodes produce references, and hence cannot be ID. - Bytecode::MutBorrowLoc(_) - | Bytecode::ImmBorrowLoc(_) => verifier.stack_push(AbstractValue::Other)?, - - | Bytecode::MutBorrowField(_) - | Bytecode::MutBorrowFieldGeneric(_) - | Bytecode::ImmBorrowField(_) - | Bytecode::ImmBorrowFieldGeneric(_) => { - verifier.stack.pop().unwrap(); - verifier.stack_push(AbstractValue::Other)?; - } - - // These bytecodes are not allowed, and will be - // flagged as error in a different verifier. - Bytecode::MoveFromDeprecated(_) - | Bytecode::MoveFromGenericDeprecated(_) - | Bytecode::MoveToDeprecated(_) - | Bytecode::MoveToGenericDeprecated(_) - | Bytecode::ImmBorrowGlobalDeprecated(_) - | Bytecode::MutBorrowGlobalDeprecated(_) - | Bytecode::ImmBorrowGlobalGenericDeprecated(_) - | Bytecode::MutBorrowGlobalGenericDeprecated(_) - | Bytecode::ExistsDeprecated(_) - | Bytecode::ExistsGenericDeprecated(_) => { - panic!("Should have been checked by global_storage_access_verifier."); - } - - Bytecode::Call(idx) => { - let function_handle = verifier.binary_view.function_handle_at(*idx); - call(verifier, function_handle)?; - } - Bytecode::CallGeneric(idx) => { - let func_inst = verifier.binary_view.function_instantiation_at(*idx); - let function_handle = verifier.binary_view.function_handle_at(func_inst.handle); - call(verifier, function_handle)?; - } - - Bytecode::Ret => { - verifier.stack_popn(verifier.function_context.return_().len() as u64)? - } - - Bytecode::BrTrue(_) | Bytecode::BrFalse(_) | Bytecode::Abort => { - verifier.stack.pop().unwrap(); - } - - // These bytecodes produce constants, and hence cannot be ID. - Bytecode::LdTrue | Bytecode::LdFalse | Bytecode::LdU8(_) | Bytecode::LdU16(_)| Bytecode::LdU32(_) | Bytecode::LdU64(_) | Bytecode::LdU128(_)| Bytecode::LdU256(_) | Bytecode::LdConst(_) => { - verifier.stack_push(AbstractValue::Other)?; - } - - Bytecode::Pack(idx) => { - let struct_def = verifier.binary_view.struct_def_at(*idx); - pack(verifier, struct_def)?; - } - Bytecode::PackGeneric(idx) => { - let struct_inst = verifier.binary_view.struct_instantiation_at(*idx); - let struct_def = verifier.binary_view.struct_def_at(struct_inst.def); - pack(verifier, struct_def)?; - } - Bytecode::Unpack(idx) => { - let struct_def = verifier.binary_view.struct_def_at(*idx); - unpack(verifier, struct_def)?; - } - Bytecode::UnpackGeneric(idx) => { - let struct_inst = verifier.binary_view.struct_instantiation_at(*idx); - let struct_def = verifier.binary_view.struct_def_at(struct_inst.def); - unpack(verifier, struct_def)?; - } - - Bytecode::VecPack(_, num) => { - verifier.stack_popn(*num )?; - verifier.stack_push(AbstractValue::Other)?; - } - - Bytecode::VecPushBack(_) => { - verifier.stack.pop().unwrap(); - verifier.stack.pop().unwrap(); - } - - Bytecode::VecUnpack(_, num) => { - verifier.stack.pop().unwrap(); - verifier.stack_pushn(*num, AbstractValue::Other)?; - } - - Bytecode::VecSwap(_) => { - verifier.stack.pop().unwrap(); - verifier.stack.pop().unwrap(); - verifier.stack.pop().unwrap(); - } - Bytecode::PackVariant(vidx) => { - let handle = verifier.binary_view.variant_handle_at(*vidx); - let variant = verifier.binary_view.variant_def_at(handle.enum_def, handle.variant); - let num_fields = variant.fields.len(); - verifier.stack_popn(num_fields as u64)?; - verifier.stack_push(AbstractValue::Other)?; - } - Bytecode::PackVariantGeneric(vidx) => { - let handle = verifier.binary_view.variant_instantiation_handle_at(*vidx); - let enum_inst = verifier.binary_view.enum_instantiation_at(handle.enum_def); - let variant = verifier.binary_view.variant_def_at(enum_inst.def, handle.variant); - let num_fields = variant.fields.len(); - verifier.stack_popn(num_fields as u64)?; - verifier.stack_push(AbstractValue::Other)?; - } - Bytecode::UnpackVariant(vidx) - | Bytecode::UnpackVariantImmRef(vidx) - | Bytecode::UnpackVariantMutRef(vidx) => { - let handle = verifier.binary_view.variant_handle_at(*vidx); - let variant = verifier.binary_view.variant_def_at(handle.enum_def, handle.variant); - let num_fields = variant.fields.len(); - verifier.stack.pop().unwrap(); - verifier.stack_pushn(num_fields as u64, AbstractValue::Other)?; - } - Bytecode::UnpackVariantGeneric(vidx) - | Bytecode::UnpackVariantGenericImmRef(vidx) - | Bytecode::UnpackVariantGenericMutRef(vidx) => { - let handle = verifier.binary_view.variant_instantiation_handle_at(*vidx); - let enum_inst = verifier.binary_view.enum_instantiation_at(handle.enum_def); - let variant = verifier.binary_view.variant_def_at(enum_inst.def, handle.variant); - let num_fields = variant.fields.len(); - verifier.stack.pop().unwrap(); - verifier.stack_pushn(num_fields as u64, AbstractValue::Other)?; - } - Bytecode::VariantSwitch(_) => { - verifier.stack.pop().unwrap(); - } - }; - Ok(()) -} diff --git a/iota-execution/v0/iota-verifier/src/lib.rs b/iota-execution/v0/iota-verifier/src/lib.rs deleted file mode 100644 index e01d51b6c07..00000000000 --- a/iota-execution/v0/iota-verifier/src/lib.rs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -pub mod verifier; - -pub mod entry_points_verifier; -pub mod global_storage_access_verifier; -pub mod id_leak_verifier; -pub mod meter; -pub mod one_time_witness_verifier; -pub mod private_generics; -pub mod struct_with_key_verifier; - -use iota_types::error::{ExecutionError, ExecutionErrorKind}; -use move_core_types::{ident_str, identifier::IdentStr, vm_status::StatusCode}; - -pub const INIT_FN_NAME: &IdentStr = ident_str!("init"); -pub const TEST_SCENARIO_MODULE_NAME: &str = "test_scenario"; - -fn verification_failure(error: String) -> ExecutionError { - ExecutionError::new_with_source(ExecutionErrorKind::IotaMoveVerificationError, error) -} - -fn to_verification_timeout_error(error: String) -> ExecutionError { - ExecutionError::new_with_source(ExecutionErrorKind::IotaMoveVerificationTimeout, error) -} - -/// Runs the Move verifier and checks if the error counts as a Move verifier -/// timeout NOTE: this function only check if the verifier error is a timeout -/// All other errors are ignored -pub fn check_for_verifier_timeout(major_status_code: &StatusCode) -> bool { - [ - StatusCode::PROGRAM_TOO_COMPLEX, - // Do we want to make this a substatus of `PROGRAM_TOO_COMPLEX`? - StatusCode::TOO_MANY_BACK_EDGES, - ] - .contains(major_status_code) -} diff --git a/iota-execution/v0/iota-verifier/src/meter.rs b/iota-execution/v0/iota-verifier/src/meter.rs deleted file mode 100644 index c7df1336455..00000000000 --- a/iota-execution/v0/iota-verifier/src/meter.rs +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use move_binary_format::errors::{PartialVMError, PartialVMResult}; -use move_bytecode_verifier_meter::{Meter, Scope}; -use move_core_types::vm_status::StatusCode; -use move_vm_config::verifier::MeterConfig; - -struct IotaVerifierMeterBounds { - name: String, - ticks: u128, - max_ticks: Option, -} - -impl IotaVerifierMeterBounds { - fn add(&mut self, ticks: u128) -> PartialVMResult<()> { - let max_ticks = self.max_ticks.unwrap_or(u128::MAX); - - let new_ticks = self.ticks.saturating_add(ticks); - if new_ticks >= max_ticks { - return Err(PartialVMError::new(StatusCode::PROGRAM_TOO_COMPLEX) - .with_message(format!( - "program too complex. Ticks exceeded `{}` will exceed limits: `{} current + {} new > {} max`)", - self.name, self.ticks, ticks, max_ticks - ))); - } - self.ticks = new_ticks; - Ok(()) - } -} - -pub struct IotaVerifierMeter { - transaction_bounds: IotaVerifierMeterBounds, - package_bounds: IotaVerifierMeterBounds, - module_bounds: IotaVerifierMeterBounds, - function_bounds: IotaVerifierMeterBounds, -} - -impl IotaVerifierMeter { - pub fn new(config: MeterConfig) -> Self { - Self { - transaction_bounds: IotaVerifierMeterBounds { - name: "".to_string(), - ticks: 0, - max_ticks: None, - }, - package_bounds: IotaVerifierMeterBounds { - name: "".to_string(), - ticks: 0, - max_ticks: config.max_per_pkg_meter_units, - }, - module_bounds: IotaVerifierMeterBounds { - name: "".to_string(), - ticks: 0, - max_ticks: config.max_per_mod_meter_units, - }, - function_bounds: IotaVerifierMeterBounds { - name: "".to_string(), - ticks: 0, - max_ticks: config.max_per_fun_meter_units, - }, - } - } - - fn get_bounds_mut(&mut self, scope: Scope) -> &mut IotaVerifierMeterBounds { - match scope { - Scope::Transaction => &mut self.transaction_bounds, - Scope::Package => &mut self.package_bounds, - Scope::Module => &mut self.module_bounds, - Scope::Function => &mut self.function_bounds, - } - } - - fn get_bounds(&self, scope: Scope) -> &IotaVerifierMeterBounds { - match scope { - Scope::Transaction => &self.transaction_bounds, - Scope::Package => &self.package_bounds, - Scope::Module => &self.module_bounds, - Scope::Function => &self.function_bounds, - } - } - - pub fn get_usage(&self, scope: Scope) -> u128 { - self.get_bounds(scope).ticks - } - - pub fn get_limit(&self, scope: Scope) -> Option { - self.get_bounds(scope).max_ticks - } -} - -impl Meter for IotaVerifierMeter { - fn enter_scope(&mut self, name: &str, scope: Scope) { - let bounds = self.get_bounds_mut(scope); - bounds.name = name.into(); - bounds.ticks = 0; - } - - fn transfer(&mut self, from: Scope, to: Scope, factor: f32) -> PartialVMResult<()> { - let ticks = (self.get_bounds_mut(from).ticks as f32 * factor) as u128; - self.add(to, ticks) - } - - fn add(&mut self, scope: Scope, ticks: u128) -> PartialVMResult<()> { - self.get_bounds_mut(scope).add(ticks) - } -} diff --git a/iota-execution/v0/iota-verifier/src/one_time_witness_verifier.rs b/iota-execution/v0/iota-verifier/src/one_time_witness_verifier.rs deleted file mode 100644 index ed956ac4e81..00000000000 --- a/iota-execution/v0/iota-verifier/src/one_time_witness_verifier.rs +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -//! A module can define a one-time witness type, that is a type that is -//! instantiated only once, and this property is enforced by the system. We -//! define a one-time witness type as a struct type that has the same name as -//! the module that defines it but with all the letters capitalized, and -//! possessing certain special properties specified below (please note that by -//! convention, "regular" struct type names are expressed in camel case). In -//! other words, if a module defines a struct type whose name is the same as the -//! module name, this type MUST possess these special properties, otherwise the -//! module definition will be considered invalid and will be rejected by the -//! validator: -//! -//! - it has only one ability: drop -//! - it has only one arbitrarily named field of type boolean (since Move -//! structs cannot be empty) -//! - its definition does not involve type parameters -//! - its only instance in existence is passed as an argument to the module -//! initializer -//! - it is never instantiated anywhere in its defining module -use iota_types::{ - BRIDGE_ADDRESS, IOTA_FRAMEWORK_ADDRESS, - base_types::{TX_CONTEXT_MODULE_NAME, TX_CONTEXT_STRUCT_NAME}, - bridge::BRIDGE_SUPPORTED_ASSET, - error::ExecutionError, - move_package::{FnInfoMap, is_test_fun}, -}; -use move_binary_format::file_format::{ - Ability, AbilitySet, Bytecode, CompiledModule, DatatypeHandle, FunctionDefinition, - FunctionHandle, SignatureToken, StructDefinition, -}; -use move_core_types::{ident_str, language_storage::ModuleId}; - -use crate::{INIT_FN_NAME, verification_failure}; - -pub fn verify_module( - module: &CompiledModule, - fn_info_map: &FnInfoMap, -) -> Result<(), ExecutionError> { - // When verifying test functions, a check preventing by-hand instantiation of - // one-time withess is disabled - - // In Iota's framework code there is an exception to the one-time witness type - // rule - we have a IOTA type in the iota module but it is instantiated - // outside of the module initializer (in fact, the module has no - // initializer). The reason for it is that the IOTA coin is only instantiated - // during genesis. It is easiest to simply special-case this module particularly - // that this is framework code and thus deemed correct. - let self_id = module.self_id(); - - if ModuleId::new(IOTA_FRAMEWORK_ADDRESS, ident_str!("iota").to_owned()) == self_id { - return Ok(()); - } - - if BRIDGE_SUPPORTED_ASSET - .iter() - .any(|token| ModuleId::new(BRIDGE_ADDRESS, ident_str!(token).to_owned()) == self_id) - { - return Ok(()); - } - - let mod_handle = module.module_handle_at(module.self_module_handle_idx); - let mod_name = module.identifier_at(mod_handle.name).as_str(); - let struct_defs = &module.struct_defs; - let mut one_time_witness_candidate = None; - // find structs that can potentially represent a one-time witness type - for def in struct_defs { - let struct_handle = module.datatype_handle_at(def.struct_handle); - let struct_name = module.identifier_at(struct_handle.name).as_str(); - if mod_name.to_ascii_uppercase() == struct_name { - // one-time witness candidate's type name must be the same as capitalized module - // name - if let Ok(field_count) = def.declared_field_count() { - // checks if the struct is non-native (and if it isn't then that's why unwrap - // below is safe) - if field_count == 1 && def.field(0).unwrap().signature.0 == SignatureToken::Bool { - // a single boolean field means that we found a one-time witness candidate - - // make sure that the remaining properties hold - verify_one_time_witness(module, struct_name, struct_handle) - .map_err(verification_failure)?; - // if we reached this point, it means we have a legitimate one-time witness type - // candidate and we have to make sure that both the init function's signature - // reflects this and that this type is not instantiated in any function of the - // module - one_time_witness_candidate = Some((struct_name, struct_handle, def)); - break; // no reason to look any further - } - } - } - } - for fn_def in &module.function_defs { - let fn_handle = module.function_handle_at(fn_def.function); - let fn_name = module.identifier_at(fn_handle.name); - if fn_name == INIT_FN_NAME { - if let Some((candidate_name, candidate_handle, _)) = one_time_witness_candidate { - // only verify if init function conforms to one-time witness type requirements - // if we have a one-time witness type candidate - verify_init_one_time_witness(module, fn_handle, candidate_name, candidate_handle) - .map_err(verification_failure)?; - } else { - // if there is no one-time witness type candidate than the init function should - // have only one parameter of TxContext type - verify_init_single_param(module, fn_handle).map_err(verification_failure)?; - } - } - if let Some((candidate_name, _, def)) = one_time_witness_candidate { - // only verify lack of one-time witness type instantiations if we have a - // one-time witness type candidate and if instantiation does not - // happen in test code - - if !is_test_fun(fn_name, module, fn_info_map) { - verify_no_instantiations(module, fn_def, candidate_name, def) - .map_err(verification_failure)?; - } - } - } - - Ok(()) -} - -// Verifies all required properties of a one-time witness type candidate (that -// is a type whose name is the same as the name of a module but capitalized) -fn verify_one_time_witness( - module: &CompiledModule, - candidate_name: &str, - candidate_handle: &DatatypeHandle, -) -> Result<(), String> { - // must have only one ability: drop - let drop_set = AbilitySet::EMPTY | Ability::Drop; - let abilities = candidate_handle.abilities; - if abilities != drop_set { - return Err(format!( - "one-time witness type candidate {}::{} must have a single ability: drop", - module.self_id(), - candidate_name, - )); - } - - if !candidate_handle.type_parameters.is_empty() { - return Err(format!( - "one-time witness type candidate {}::{} cannot have type parameters", - module.self_id(), - candidate_name, - )); - } - Ok(()) -} - -/// Checks if this module's `init` function conformant with the one-time witness -/// type -fn verify_init_one_time_witness( - module: &CompiledModule, - fn_handle: &FunctionHandle, - candidate_name: &str, - candidate_handle: &DatatypeHandle, -) -> Result<(), String> { - let fn_sig = module.signature_at(fn_handle.parameters); - if fn_sig.len() != 2 || !is_one_time_witness(module, &fn_sig.0[0], candidate_handle) { - // check only the first parameter - the other one is checked in entry_points - // verification pass - return Err(format!( - "init function of a module containing one-time witness type candidate must have \ - {}::{} as the first parameter (a struct which has no fields or a single field of type \ - bool)", - module.self_id(), - candidate_name, - )); - } - - Ok(()) -} - -// Checks if a given SignatureToken represents a one-time witness type struct -fn is_one_time_witness( - view: &CompiledModule, - tok: &SignatureToken, - candidate_handle: &DatatypeHandle, -) -> bool { - matches!(tok, SignatureToken::Datatype(idx) if view.datatype_handle_at(*idx) == candidate_handle) -} - -/// Checks if this module's `init` function has a single parameter of TxContext -/// type only -fn verify_init_single_param( - module: &CompiledModule, - fn_handle: &FunctionHandle, -) -> Result<(), String> { - let fn_sig = module.signature_at(fn_handle.parameters); - if fn_sig.len() != 1 { - return Err(format!( - "Expected last (and at most second) parameter for {0}::{1} to be &mut {2}::{3}::{4} or \ - &{2}::{3}::{4}; optional first parameter must be of one-time witness type whose name \ - is the same as the capitalized module name ({5}::{6}) and which has no fields or a \ - single field of type bool", - module.self_id(), - INIT_FN_NAME, - IOTA_FRAMEWORK_ADDRESS, - TX_CONTEXT_MODULE_NAME, - TX_CONTEXT_STRUCT_NAME, - module.self_id(), - module.self_id().name().as_str().to_uppercase(), - )); - } - - Ok(()) -} - -/// Checks if this module function does not contain instantiation of the -/// one-time witness type -fn verify_no_instantiations( - module: &CompiledModule, - fn_def: &FunctionDefinition, - struct_name: &str, - struct_def: &StructDefinition, -) -> Result<(), String> { - if fn_def.code.is_none() { - return Ok(()); - } - for bcode in &fn_def.code.as_ref().unwrap().code { - let struct_def_idx = match bcode { - Bytecode::Pack(idx) => idx, - _ => continue, - }; - // unwrap is safe below since we know we are getting a struct out of a module - // (see definition of struct_def_at) - if module.struct_def_at(*struct_def_idx) == struct_def { - let fn_handle = module.function_handle_at(fn_def.function); - let fn_name = module.identifier_at(fn_handle.name); - return Err(format!( - "one-time witness type {}::{} is instantiated \ - in the {}::{} function and must never be", - module.self_id(), - struct_name, - module.self_id(), - fn_name, - )); - } - } - - Ok(()) -} diff --git a/iota-execution/v0/iota-verifier/src/private_generics.rs b/iota-execution/v0/iota-verifier/src/private_generics.rs deleted file mode 100644 index bf7dbb30b20..00000000000 --- a/iota-execution/v0/iota-verifier/src/private_generics.rs +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use iota_types::{IOTA_FRAMEWORK_ADDRESS, error::ExecutionError}; -use move_binary_format::{ - CompiledModule, - file_format::{ - Bytecode, FunctionDefinition, FunctionHandle, FunctionInstantiation, ModuleHandle, - SignatureToken, - }, -}; -use move_bytecode_utils::format_signature_token; -use move_core_types::{account_address::AccountAddress, ident_str, identifier::IdentStr}; - -use crate::{TEST_SCENARIO_MODULE_NAME, verification_failure}; - -pub const TRANSFER_MODULE: &IdentStr = ident_str!("transfer"); -pub const EVENT_MODULE: &IdentStr = ident_str!("event"); -pub const EVENT_FUNCTION: &IdentStr = ident_str!("emit"); -pub const GET_EVENTS_TEST_FUNCTION: &IdentStr = ident_str!("events_by_type"); -pub const PUBLIC_TRANSFER_FUNCTIONS: &[&IdentStr] = &[ - ident_str!("public_transfer"), - ident_str!("public_freeze_object"), - ident_str!("public_share_object"), - ident_str!("public_receive"), - ident_str!("receiving_object_id"), -]; -pub const PRIVATE_TRANSFER_FUNCTIONS: &[&IdentStr] = &[ - ident_str!("transfer"), - ident_str!("freeze_object"), - ident_str!("share_object"), - ident_str!("receive"), -]; -pub const TRANSFER_IMPL_FUNCTIONS: &[&IdentStr] = &[ - ident_str!("transfer_impl"), - ident_str!("freeze_object_impl"), - ident_str!("share_object_impl"), - ident_str!("receive_impl"), -]; - -/// All transfer functions (the functions in `iota::transfer`) are "private" in -/// that they are restricted to the module. -/// For example, with `transfer::transfer(...)`, either: -/// - `T` must be a type declared in the current module or -/// - `T` must have `store` -/// -/// Similarly, `event::emit` is also "private" to the module. Unlike the -/// `transfer` functions, there is no relaxation for `store` -/// Concretely, with `event::emit(...)`: -/// - `T` must be a type declared in the current module -pub fn verify_module(module: &CompiledModule) -> Result<(), ExecutionError> { - if *module.address() == IOTA_FRAMEWORK_ADDRESS - && module.name() == IdentStr::new(TEST_SCENARIO_MODULE_NAME).unwrap() - { - // exclude test_module which is a test-only module in the Iota framework which - // "emulates" transactional execution and needs to allow test code to - // bypass private generics - return Ok(()); - } - // do not need to check the iota::transfer module itself - for func_def in &module.function_defs { - verify_function(module, func_def).map_err(|error| { - verification_failure(format!( - "{}::{}. {}", - module.self_id(), - module.identifier_at(module.function_handle_at(func_def.function).name), - error - )) - })?; - } - Ok(()) -} - -fn verify_function(view: &CompiledModule, fdef: &FunctionDefinition) -> Result<(), String> { - let code = match &fdef.code { - None => return Ok(()), - Some(code) => code, - }; - for instr in &code.code { - if let Bytecode::CallGeneric(finst_idx) = instr { - let FunctionInstantiation { - handle, - type_parameters, - } = view.function_instantiation_at(*finst_idx); - - let fhandle = view.function_handle_at(*handle); - let mhandle = view.module_handle_at(fhandle.module); - - let type_arguments = &view.signature_at(*type_parameters).0; - let ident = addr_module(view, mhandle); - if ident == (IOTA_FRAMEWORK_ADDRESS, TRANSFER_MODULE) { - verify_private_transfer(view, fhandle, type_arguments)? - } else if ident == (IOTA_FRAMEWORK_ADDRESS, EVENT_MODULE) { - verify_private_event_emit(view, fhandle, type_arguments)? - } - } - } - Ok(()) -} - -fn verify_private_transfer( - view: &CompiledModule, - fhandle: &FunctionHandle, - type_arguments: &[SignatureToken], -) -> Result<(), String> { - let self_handle = view.module_handle_at(view.self_handle_idx()); - if addr_module(view, self_handle) == (IOTA_FRAMEWORK_ADDRESS, TRANSFER_MODULE) { - return Ok(()); - } - let fident = view.identifier_at(fhandle.name); - // public transfer functions require `store` and have no additional rules - if PUBLIC_TRANSFER_FUNCTIONS.contains(&fident) { - return Ok(()); - } - if !PRIVATE_TRANSFER_FUNCTIONS.contains(&fident) { - // unknown function, so a bug in the implementation here - debug_assert!(false, "unknown transfer function {}", fident); - return Err(format!("Calling unknown transfer function, {}", fident)); - }; - - if type_arguments.len() != 1 { - debug_assert!(false, "Expected 1 type argument for {}", fident); - return Err(format!("Expected 1 type argument for {}", fident)); - } - - let type_arg = &type_arguments[0]; - if !is_defined_in_current_module(view, type_arg) { - return Err(format!( - "Invalid call to '{iota}::transfer::{f}' on an object of type '{t}'. \ - The transferred object's type must be defined in the current module. \ - If the object has the 'store' type ability, you can use the non-internal variant \ - instead, i.e. '{iota}::transfer::public_{f}'", - iota = IOTA_FRAMEWORK_ADDRESS, - f = fident, - t = format_signature_token(view, type_arg), - )); - } - - Ok(()) -} - -fn verify_private_event_emit( - view: &CompiledModule, - fhandle: &FunctionHandle, - type_arguments: &[SignatureToken], -) -> Result<(), String> { - let fident = view.identifier_at(fhandle.name); - if fident == GET_EVENTS_TEST_FUNCTION { - // test-only function with no params--no need to verify - return Ok(()); - } - if fident != EVENT_FUNCTION { - debug_assert!(false, "unknown event function {}", fident); - return Err(format!("Calling unknown event function, {}", fident)); - }; - - if type_arguments.len() != 1 { - debug_assert!(false, "Expected 1 type argument for {}", fident); - return Err(format!("Expected 1 type argument for {}", fident)); - } - - let type_arg = &type_arguments[0]; - if !is_defined_in_current_module(view, type_arg) { - return Err(format!( - "Invalid call to '{}::event::{}' with an event type '{}'. \ - The event's type must be defined in the current module", - IOTA_FRAMEWORK_ADDRESS, - fident, - format_signature_token(view, type_arg), - )); - } - - Ok(()) -} - -fn is_defined_in_current_module(view: &CompiledModule, type_arg: &SignatureToken) -> bool { - match type_arg { - SignatureToken::Datatype(_) | SignatureToken::DatatypeInstantiation(_) => { - let idx = match type_arg { - SignatureToken::Datatype(idx) => *idx, - SignatureToken::DatatypeInstantiation(s) => s.0, - _ => unreachable!(), - }; - let shandle = view.datatype_handle_at(idx); - view.self_handle_idx() == shandle.module - } - SignatureToken::TypeParameter(_) - | SignatureToken::Bool - | SignatureToken::U8 - | SignatureToken::U16 - | SignatureToken::U32 - | SignatureToken::U64 - | SignatureToken::U128 - | SignatureToken::U256 - | SignatureToken::Address - | SignatureToken::Vector(_) - | SignatureToken::Signer - | SignatureToken::Reference(_) - | SignatureToken::MutableReference(_) => false, - } -} - -fn addr_module<'a>( - view: &'a CompiledModule, - mhandle: &ModuleHandle, -) -> (AccountAddress, &'a IdentStr) { - let maddr = view.address_identifier_at(mhandle.address); - let mident = view.identifier_at(mhandle.name); - (*maddr, mident) -} diff --git a/iota-execution/v0/iota-verifier/src/struct_with_key_verifier.rs b/iota-execution/v0/iota-verifier/src/struct_with_key_verifier.rs deleted file mode 100644 index 5eb0713654a..00000000000 --- a/iota-execution/v0/iota-verifier/src/struct_with_key_verifier.rs +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -//! This pass verifies necessary properties for Move Objects, i.e. structs with -//! the `key` ability. The properties checked are -//! - The first field is named "id" -//! - The first field has type `iota::object::UID` - -use iota_types::{ - IOTA_FRAMEWORK_ADDRESS, - error::ExecutionError, - fp_ensure, - id::{OBJECT_MODULE_NAME, UID_STRUCT_NAME}, -}; -use move_binary_format::file_format::{CompiledModule, SignatureToken}; - -use crate::verification_failure; - -pub fn verify_module(module: &CompiledModule) -> Result<(), ExecutionError> { - verify_key_structs(module)?; - verify_no_key_enums(module) -} - -fn verify_key_structs(module: &CompiledModule) -> Result<(), ExecutionError> { - let struct_defs = &module.struct_defs; - for def in struct_defs { - let handle = module.datatype_handle_at(def.struct_handle); - if !handle.abilities.has_key() { - continue; - } - let name = module.identifier_at(handle.name); - - // Check that the first field of the struct must be named "id". - let first_field = match def.field(0) { - Some(field) => field, - None => { - return Err(verification_failure(format!( - "First field of struct {} must be 'id', no field found", - name - ))); - } - }; - let first_field_name = module.identifier_at(first_field.name).as_str(); - if first_field_name != "id" { - return Err(verification_failure(format!( - "First field of struct {} must be 'id', {} found", - name, first_field_name - ))); - } - // Check that the "id" field must have a struct type. - let uid_field_type = &first_field.signature.0; - let uid_field_type = match uid_field_type { - SignatureToken::Datatype(struct_type) => struct_type, - _ => { - return Err(verification_failure(format!( - "First field of struct {} must be of type {}::object::UID, \ - {:?} type found", - name, IOTA_FRAMEWORK_ADDRESS, uid_field_type - ))); - } - }; - // check that the struct type for "id" field must be - // IOTA_FRAMEWORK_ADDRESS::object::UID. - let uid_type_struct = module.datatype_handle_at(*uid_field_type); - let uid_type_struct_name = module.identifier_at(uid_type_struct.name); - let uid_type_module = module.module_handle_at(uid_type_struct.module); - let uid_type_module_address = module.address_identifier_at(uid_type_module.address); - let uid_type_module_name = module.identifier_at(uid_type_module.name); - fp_ensure!( - uid_type_struct_name == UID_STRUCT_NAME - && uid_type_module_address == &IOTA_FRAMEWORK_ADDRESS - && uid_type_module_name == OBJECT_MODULE_NAME, - verification_failure(format!( - "First field of struct {} must be of type {}::object::UID, \ - {}::{}::{} type found", - name, - IOTA_FRAMEWORK_ADDRESS, - uid_type_module_address, - uid_type_module_name, - uid_type_struct_name - )) - ); - } - Ok(()) -} - -fn verify_no_key_enums(module: &CompiledModule) -> Result<(), ExecutionError> { - for def in &module.enum_defs { - let handle = module.datatype_handle_at(def.enum_handle); - if handle.abilities.has_key() { - return Err(verification_failure(format!( - "Enum {} cannot have the 'key' ability. Enums cannot have the 'key' ability.", - module.identifier_at(handle.name) - ))); - } - } - Ok(()) -} diff --git a/iota-execution/v0/iota-verifier/src/verifier.rs b/iota-execution/v0/iota-verifier/src/verifier.rs deleted file mode 100644 index 7303e6a9ef1..00000000000 --- a/iota-execution/v0/iota-verifier/src/verifier.rs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -//! This module contains the public APIs supported by the bytecode verifier. - -use iota_types::{error::ExecutionError, move_package::FnInfoMap}; -use move_binary_format::file_format::CompiledModule; -use move_bytecode_verifier_meter::{Meter, dummy::DummyMeter}; - -use crate::{ - entry_points_verifier, global_storage_access_verifier, id_leak_verifier, - one_time_witness_verifier, private_generics, struct_with_key_verifier, -}; - -/// Helper for a "canonical" verification of a module. -pub fn iota_verify_module_metered( - module: &CompiledModule, - fn_info_map: &FnInfoMap, - meter: &mut (impl Meter + ?Sized), -) -> Result<(), ExecutionError> { - struct_with_key_verifier::verify_module(module)?; - global_storage_access_verifier::verify_module(module)?; - id_leak_verifier::verify_module(module, meter)?; - private_generics::verify_module(module)?; - entry_points_verifier::verify_module(module, fn_info_map)?; - one_time_witness_verifier::verify_module(module, fn_info_map) -} - -/// Runs the Iota verifier and checks if the error counts as a Iota verifier -/// timeout NOTE: this function only check if the verifier error is a timeout -/// All other errors are ignored -pub fn iota_verify_module_metered_check_timeout_only( - module: &CompiledModule, - fn_info_map: &FnInfoMap, - meter: &mut (impl Meter + ?Sized), -) -> Result<(), ExecutionError> { - // Checks if the error counts as a Iota verifier timeout - if let Err(error) = iota_verify_module_metered(module, fn_info_map, meter) { - if matches!( - error.kind(), - iota_types::execution_status::ExecutionFailureStatus::IotaMoveVerificationTimeout - ) { - return Err(error); - } - } - // Any other scenario, including a non-timeout error counts as Ok - Ok(()) -} - -pub fn iota_verify_module_unmetered( - module: &CompiledModule, - fn_info_map: &FnInfoMap, -) -> Result<(), ExecutionError> { - iota_verify_module_metered(module, fn_info_map, &mut DummyMeter).inspect_err(|err| { - // We must never see timeout error in execution - debug_assert!( - !matches!( - err.kind(), - iota_types::execution_status::ExecutionFailureStatus::IotaMoveVerificationTimeout - ), - "Unexpected timeout error in execution" - ); - }) -} diff --git a/iota-execution/v0/iota-verifier/tests/common/mod.rs b/iota-execution/v0/iota-verifier/tests/common/mod.rs deleted file mode 100644 index 3d35db71407..00000000000 --- a/iota-execution/v0/iota-verifier/tests/common/mod.rs +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) 2021, Facebook, Inc. and its affiliates -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -pub mod module_builder; diff --git a/iota-execution/v0/iota-verifier/tests/common/module_builder.rs b/iota-execution/v0/iota-verifier/tests/common/module_builder.rs deleted file mode 100644 index 6007904c83d..00000000000 --- a/iota-execution/v0/iota-verifier/tests/common/module_builder.rs +++ /dev/null @@ -1,272 +0,0 @@ -// Copyright (c) 2021, Facebook, Inc. and its affiliates -// Copyright (c) Mysten Labs, Inc. -// Modifications Copyright (c) 2024 IOTA Stiftung -// SPDX-License-Identifier: Apache-2.0 - -use move_binary_format::file_format::*; -use move_core_types::{account_address::AccountAddress, identifier::Identifier}; -use iota_types::IOTA_FRAMEWORK_ADDRESS; - -pub struct ModuleBuilder { - module: CompiledModule, -} - -pub struct StructInfo { - pub handle: DatatypeHandleIndex, - pub def: StructDefinitionIndex, - pub fields: Vec, -} - -pub struct FuncInfo { - pub handle: FunctionHandleIndex, - pub def: FunctionDefinitionIndex, -} - -pub struct GenericFuncInfo { - pub handle: FunctionInstantiationIndex, - pub def: FunctionDefinitionIndex, -} - -impl ModuleBuilder { - pub fn new(address: AccountAddress, name: &str) -> Self { - Self { - module: CompiledModule { - version: move_binary_format::file_format_common::VERSION_MAX, - module_handles: vec![ModuleHandle { - address: AddressIdentifierIndex(0), - name: IdentifierIndex(0), - }], - self_module_handle_idx: ModuleHandleIndex(0), - identifiers: vec![Identifier::new(name).unwrap()], - address_identifiers: vec![address], - struct_handles: vec![], - struct_defs: vec![], - function_handles: vec![], - function_defs: vec![], - signatures: vec![ - Signature(vec![]), // void - ], - constant_pool: vec![], - field_handles: vec![], - friend_decls: vec![], - struct_def_instantiations: vec![], - function_instantiations: vec![], - field_instantiations: vec![], - }, - } - } - - /// Creates the "object" module in framework address, along with the "Info" struct. - /// Both the module and the Info struct information are returned. - pub fn default() -> (Self, StructInfo) { - let mut module = Self::new(IOTA_FRAMEWORK_ADDRESS, OBJECT_MODULE_NAME); - let id = module.add_struct( - module.get_self_index(), - INFO_STRUCT_NAME, - AbilitySet::EMPTY | Ability::Store | Ability::Drop, - vec![], - ); - (module, id) - } - - pub fn get_module(&self) -> &CompiledModule { - &self.module - } - - pub fn get_self_index(&self) -> ModuleHandleIndex { - self.module.self_module_handle_idx - } - - pub fn add_function_verbose( - &mut self, - module_idx: ModuleHandleIndex, - name: &str, - parameters: Vec, - ret: Vec, - type_parameters: Vec, - visibility: Visibility, - code_unit: CodeUnit, - ) -> FuncInfo { - let new_handle = FunctionHandle { - module: module_idx, - name: self.add_identifier(name), - parameters: self.add_signature(parameters), - return_: self.add_signature(ret), - type_parameters, - }; - let handle_idx = FunctionHandleIndex(self.module.function_handles.len() as u16); - self.module.function_handles.push(new_handle); - let new_def = FunctionDefinition { - function: handle_idx, - visibility, - acquires_global_resources: vec![], - code: Some(code_unit), - }; - self.module.function_defs.push(new_def); - FuncInfo { - handle: handle_idx, - def: FunctionDefinitionIndex((self.module.function_defs.len() - 1) as u16), - } - } - - pub fn add_function( - &mut self, - module_idx: ModuleHandleIndex, - name: &str, - parameters: Vec, - ret: Vec, - ) -> FuncInfo { - self.add_function_verbose( - module_idx, - name, - parameters, - ret, - vec![], - Visibility::Public, - CodeUnit { - locals: SignatureIndex(0), - code: vec![Bytecode::Ret], - }, - ) - } - - pub fn add_generic_function( - &mut self, - module_idx: ModuleHandleIndex, - name: &str, - type_parameters: Vec, - parameters: Vec, - ret: Vec, - ) -> GenericFuncInfo { - let func_info = self.add_function(module_idx, name, parameters, ret); - let sig = self.add_signature(type_parameters); - let handle_idx = - FunctionInstantiationIndex(self.module.function_instantiations.len() as u16); - self.module - .function_instantiations - .push(FunctionInstantiation { - handle: func_info.handle, - type_parameters: sig, - }); - GenericFuncInfo { - handle: handle_idx, - def: func_info.def, - } - } - - pub fn add_struct_verbose( - &mut self, - module_index: ModuleHandleIndex, - name: &str, - abilities: AbilitySet, - fields: Vec<(&str, SignatureToken)>, - type_parameters: Vec, - ) -> StructInfo { - let new_handle = DatatypeHandle { - module: module_index, - name: self.add_identifier(name), - abilities, - type_parameters, - }; - let handle_idx = DatatypeHandleIndex(self.module.struct_handles.len() as u16); - self.module.struct_handles.push(new_handle); - - let field_len = fields.len(); - let field_defs = fields - .into_iter() - .map(|(name, ty)| self.create_field(name, ty)) - .collect(); - let new_def = StructDefinition { - struct_handle: handle_idx, - field_information: StructFieldInformation::Declared(field_defs), - }; - let def_idx = StructDefinitionIndex(self.module.struct_defs.len() as u16); - self.module.struct_defs.push(new_def); - - let field_handles = (0..field_len) - .map(|idx| self.add_field_handle(def_idx, idx as u16)) - .collect(); - - StructInfo { - handle: handle_idx, - def: def_idx, - fields: field_handles, - } - } - - pub fn add_struct( - &mut self, - module_index: ModuleHandleIndex, - name: &str, - abilities: AbilitySet, - fields: Vec<(&str, SignatureToken)>, - ) -> StructInfo { - self.add_struct_verbose(module_index, name, abilities, fields, vec![]) - } - - pub fn add_module(&mut self, address: AccountAddress, name: &str) -> ModuleHandleIndex { - let handle = ModuleHandle { - address: self.add_address(address), - name: self.add_identifier(name), - }; - self.module.module_handles.push(handle); - ModuleHandleIndex((self.module.module_handles.len() - 1) as u16) - } - - fn create_field(&mut self, name: &str, ty: SignatureToken) -> FieldDefinition { - let id = self.add_identifier(name); - FieldDefinition { - name: id, - signature: TypeSignature(ty), - } - } - - pub fn set_bytecode(&mut self, func_def: FunctionDefinitionIndex, bytecode: Vec) { - let code = &mut self.module.function_defs[func_def.0 as usize] - .code - .as_mut() - .unwrap() - .code; - *code = bytecode; - } - - pub fn add_field_instantiation( - &mut self, - handle: FieldHandleIndex, - type_params: Vec, - ) -> FieldInstantiationIndex { - let type_parameters = self.add_signature(type_params); - self.module.field_instantiations.push(FieldInstantiation { - handle, - type_parameters, - }); - FieldInstantiationIndex((self.module.field_instantiations.len() - 1) as u16) - } - - fn add_field_handle( - &mut self, - struct_def: StructDefinitionIndex, - field: u16, - ) -> FieldHandleIndex { - self.module.field_handles.push(FieldHandle { - owner: struct_def, - field, - }); - FieldHandleIndex((self.module.field_handles.len() - 1) as u16) - } - - fn add_identifier(&mut self, id: &str) -> IdentifierIndex { - self.module.identifiers.push(Identifier::new(id).unwrap()); - IdentifierIndex((self.module.identifiers.len() - 1) as u16) - } - - fn add_signature(&mut self, sig: Vec) -> SignatureIndex { - self.module.signatures.push(Signature(sig)); - SignatureIndex((self.module.signatures.len() - 1) as u16) - } - - fn add_address(&mut self, address: AccountAddress) -> AddressIdentifierIndex { - self.module.address_identifiers.push(address); - AddressIdentifierIndex((self.module.address_identifiers.len() - 1) as u16) - } -} diff --git a/nre/helm/README.md b/nre/helm/README.md index 41b0f769623..d77e77806ad 100644 --- a/nre/helm/README.md +++ b/nre/helm/README.md @@ -67,7 +67,7 @@ _Resource Reccomendations_ ### Containers -**iota-indexer-writer** - Indexer writer syncs and indexes iota checkpoint data into a Postgres database. Checkpoint data can be pulled from a fullnode or a cloud provider hosted bucket. More info and available buckets can be found in iota [doc site](https://wiki.iota.org/guides/developer/advanced/custom-indexer#remote-reader). +**iota-indexer-writer** - Indexer writer syncs and indexes iota checkpoint data into a Postgres database. Checkpoint data can be pulled from a fullnode or a cloud provider hosted bucket. More info and available buckets can be found in iota [doc site](https://docs.iota.org/developer/advanced/custom-indexer#remote-reader). ### Resource Recommendations diff --git a/nre/validator_tool.md b/nre/validator_tool.md index 51b294e4e94..3c6c3291463 100644 --- a/nre/validator_tool.md +++ b/nre/validator_tool.md @@ -6,7 +6,7 @@ This document is focused on using Validator Tool. ## Preparation -1. Make sure you have completed all the [prerequisites](https://wiki.iota.org/devnet/build/install). +1. Make sure you have completed all the [prerequisites](https://docs.iota.org/developer/getting-started/install-iota#prerequisites). 2. Build the `iota` binary, which you will need for the genesis ceremony. This step can be done on any machine you like. It does not have to be done on the machine on which you will run the validator. @@ -35,7 +35,7 @@ This document is focused on using Validator Tool. b. `active_address` is correct in `client.yaml`. b. `iota.keystore` contains your account key pair. - If at this point you can't find where `client.yaml` or `iota.keystore` is or have other questions, read [Iota Client CLI tutorial](https://wiki.iota.org/devnet/build/cli-client). + If at this point you can't find where `client.yaml` or `iota.keystore` is or have other questions, read [Iota Client CLI tutorial](https://docs.iota.org/references/cli/client). ```bash $IOTA_BINARY client diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 13aeddf218c..8255e037e8d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -866,7 +866,7 @@ importers: specifier: ^7.59.2 version: 7.119.0(react@18.3.1) '@sentry/webpack-plugin': - specifier: ^1.20.0 + specifier: ^1.21.0 version: 1.21.0 '@svgr/webpack': specifier: ^7.0.0 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 18f0d2ffae5..58699ae570b 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -11,7 +11,6 @@ packages: - "!sdk/typescript/cryptography" - "!sdk/typescript/faucet" - "!sdk/typescript/graphql" - - "!sdk/typescript/graphql/schemas/2024.10" - "!sdk/typescript/keypairs/ed25519" - "!sdk/typescript/keypairs/secp256k1" - "!sdk/typescript/keypairs/secp256r1" @@ -21,3 +20,4 @@ packages: - "!sdk/typescript/utils" - "!sdk/typescript/verify" - "!sdk/move-bytecode-template/pkg" + - "!sdk/typescript/graphql/schemas/2024.11" diff --git a/scripts/execution_layer.py b/scripts/execution_layer.py index 3aa5962ca6f..cecfd209d0a 100755 --- a/scripts/execution_layer.py +++ b/scripts/execution_layer.py @@ -464,8 +464,8 @@ def generate_lib(output_file: TextIO): Generates the contents of iota-execution/src/lib.rs to assign a numeric execution version for every module that implements an execution version. - Version snapshots (whose names follow the pattern `/v[0-9]+/`) are assigned - versions according to their names (v0 gets 0, v1 gets 1, etc). + Version snapshots (whose names follow the pattern `/v[1-9][0-9]*/`) are assigned + versions according to their names (v1 gets 1, v2 gets 2, etc). `latest` gets the next version after all version snapshots. @@ -551,7 +551,7 @@ def discover_cuts(): used to easily export the versions for features. - The 2nd element is the name of the module. - Snapshot cuts (with names following the pattern /latest|v[0-9]+/) + Snapshot cuts (with names following the pattern /latest|v[1-9][0-9]*/) are assigned version numbers according to their name (with latest getting the version one higher than the highest occupied snapshot version). @@ -568,7 +568,7 @@ def discover_cuts(): for f in src.iterdir(): if not f.is_file() or f.stem in NOT_A_CUT: continue - elif re.match(r"latest|v[0-9]+", f.stem): + elif re.match(r"latest|v[1-9][0-9]*", f.stem): snapshots.append(f) else: features.append(f) @@ -585,17 +585,22 @@ def feature_key(path): snapshots.sort(key=snapshot_key) features.sort(key=feature_key) + single_snapshot = len(snapshots) == 1 cuts = [] - for snapshot in snapshots: - mod = snapshot.stem - if mod != "latest": - cuts.append((mod[1:], None, mod)) - continue - - # Latest gets one higher version than any other snapshot - # version we've assigned so far - ver = 1 + max(int(v) for (v, _, _) in cuts) - cuts.append((str(ver), None, "latest")) + if single_snapshot: + # If there is only one snapshot it should be latest + cuts.append((str(1), None, "latest")) + else: + for snapshot in snapshots: + mod = snapshot.stem + if mod != "latest": + cuts.append((mod[1:], None, mod)) + continue + + # Latest gets one higher version than any other snapshot + # version we've assigned so far + ver = 1 + max(int(v) for (v, _, _) in cuts) + cuts.append((str(ver), None, "latest")) # "Feature" cuts are not intended to be used on production # networks, so stability is not as important for them, they are diff --git a/scripts/update_all_snapshots.sh b/scripts/update_all_snapshots.sh index 918cae62c91..f3f50e33e80 100755 --- a/scripts/update_all_snapshots.sh +++ b/scripts/update_all_snapshots.sh @@ -13,6 +13,7 @@ SCRIPT_DIR=$(dirname "$SCRIPT_PATH") ROOT="$SCRIPT_DIR/.." cd "$ROOT/crates/iota-protocol-config" && cargo insta test --review +cd "$ROOT/crates/iota-cost" && cargo insta test --review cd "$ROOT/crates/iota-swarm-config" && cargo insta test --review cd "$ROOT/crates/iota-open-rpc" && cargo run --example generate-json-rpc-spec -- record cd "$ROOT/crates/iota-core" && cargo -q run --example generate-format -- print > tests/staged/iota.yaml diff --git a/sdk/.env.defaults b/sdk/.env.defaults index 4b1dd6b6ee6..2d1458fa6dc 100644 --- a/sdk/.env.defaults +++ b/sdk/.env.defaults @@ -1,38 +1,32 @@ DEFAULT_NETWORK = 'localnet' APPS_BACKEND = 'http://localhost:3003' +SENTRY_AUTH_TOKEN= IOTA_NETWORKS = ' { - "mainnet": { - "id": "mainnet", - "name": "Mainnet", - "url": "https://fullnode.mainnet.iota.org:443", - "chain": "iota:mainnet", - "explorer": "https://explorer.iota.org" - }, "testnet": { "id": "testnet", "name": "Testnet", - "url": "https://fullnode.testnet.iota.org:443", - "explorer": "https://explorer.iota.org", + "url": "https://api.testnet.iota.cafe", + "explorer": "https://explorer.rebased.iota.org", "chain": "iota:testnet", - "faucet": "https://faucet.testnet.iota.org/gas" + "faucet": "https://faucet.testnet.iota.cafe" }, "devnet": { "id": "devnet", "name": "Devnet", - "url": "https://fullnode.devnet.iota.org:443", - "explorer": "https://explorer.iota.org", + "url": "https://api.devnet.iota.cafe", + "explorer": "https://explorer.rebased.iota.org", "chain": "iota:devnet", - "faucet": "https://faucet.devnet.iota.org/gas" + "faucet": "https://faucet.devnet.iota.cafe" }, "localnet": { "id": "localnet", "name": "Localnet", "url": "http://localhost:9000", - "explorer": "https://explorer.iota.org", + "explorer": "http://localhost:3000", "chain": "iota:local", - "faucet": "http://localhost:9123/gas" + "faucet": "http://localhost:9123" } } ' diff --git a/sdk/bcs/CHANGELOG.md b/sdk/bcs/CHANGELOG.md index 51a1114cc6e..5fd5d4a1d2b 100644 --- a/sdk/bcs/CHANGELOG.md +++ b/sdk/bcs/CHANGELOG.md @@ -1,5 +1,11 @@ # @iota/bcs +## 0.2.1 + +### Patch Changes + +- 220fa7a: First public release. + ## 0.2.0 ### Minor Changes diff --git a/sdk/bcs/package.json b/sdk/bcs/package.json index 4169398b067..bcc7caaafca 100644 --- a/sdk/bcs/package.json +++ b/sdk/bcs/package.json @@ -1,6 +1,6 @@ { "name": "@iota/bcs", - "version": "0.2.0", + "version": "0.2.1", "description": "BCS - Canonical Binary Serialization implementation for JavaScript", "license": "Apache-2.0", "author": "IOTA Foundation ", diff --git a/sdk/build-scripts/src/utils/buildPackage.ts b/sdk/build-scripts/src/utils/buildPackage.ts index b90113abb0a..84c7d386c1b 100755 --- a/sdk/build-scripts/src/utils/buildPackage.ts +++ b/sdk/build-scripts/src/utils/buildPackage.ts @@ -62,6 +62,7 @@ async function embedIOTAEnvVars() { 'process.env.DEFAULT_NETWORK': JSON.stringify(process.env['DEFAULT_NETWORK']), 'process.env.IOTA_NETWORKS': JSON.stringify(process.env['IOTA_NETWORKS']), 'process.env.APPS_BACKEND': JSON.stringify(process.env['APPS_BACKEND']), + 'process.env.SENTRY_AUTH_TOKEN': JSON.stringify(process.env['SENTRY_AUTH_TOKEN']), }; } @@ -230,7 +231,7 @@ async function addIgnoredWorkspaces(paths: string[]) { for (const path of paths) { if (!lines.find((line) => line.includes(`!${path}`))) { changed = true; - lines.push(` - '!${path}'`); + lines.push(` - "!${path}"`); } } diff --git a/sdk/create-dapp/CHANGELOG.md b/sdk/create-dapp/CHANGELOG.md index 5af9cd4f1a6..1354dbff338 100644 --- a/sdk/create-dapp/CHANGELOG.md +++ b/sdk/create-dapp/CHANGELOG.md @@ -1,5 +1,14 @@ # @iota/create-dapp +## 0.2.1 + +### Patch Changes + +- 220fa7a: First public release. +- Updated dependencies [220fa7a] + - @iota/dapp-kit@0.3.1 + - @iota/iota-sdk@0.3.1 + ## 0.2.0 ### Minor Changes diff --git a/sdk/create-dapp/README.md b/sdk/create-dapp/README.md index 690bff2783e..43655d7126c 100644 --- a/sdk/create-dapp/README.md +++ b/sdk/create-dapp/README.md @@ -27,7 +27,7 @@ you including: - [Vite](https://vitejs.dev/) - [Radix UI](https://www.radix-ui.com/) - [ESLint](https://eslint.org/) -- [`@iota/dapp-kit`](https://wiki.iota.org/references/ts-sdk/dapp-kit) +- [`@iota/dapp-kit`](https://docs.iota.org/references/ts-sdk/dapp-kit) These templates are still new, and would love to get feedback and suggestions for improvements or future templates. Please open an issue on GitHub if you have any feedback. diff --git a/sdk/create-dapp/package.json b/sdk/create-dapp/package.json index 4ee9291df38..af275038111 100644 --- a/sdk/create-dapp/package.json +++ b/sdk/create-dapp/package.json @@ -2,7 +2,8 @@ "name": "@iota/create-dapp", "author": "IOTA Foundation ", "description": "A CLI for creating new IOTA dApps", - "version": "0.2.0", + "homepage": "https://docs.iota.org/references/ts-sdk/typescript/", + "version": "0.2.1", "license": "Apache-2.0", "files": [ "CHANGELOG.md", diff --git a/sdk/create-dapp/templates/react-client-dapp/README.md b/sdk/create-dapp/templates/react-client-dapp/README.md index c2e02daefce..0ab6d299881 100644 --- a/sdk/create-dapp/templates/react-client-dapp/README.md +++ b/sdk/create-dapp/templates/react-client-dapp/README.md @@ -8,7 +8,7 @@ Client dApp using the following tools: - [Vite](https://vitejs.dev/) for build tooling - [Radix UI](https://www.radix-ui.com/) for pre-built UI components - [ESLint](https://eslint.org/) -- [`@iota/dapp-kit`](https://wiki.iota.org/references/ts-sdk/dapp-kit) for +- [`@iota/dapp-kit`](https://docs.iota.org/references/ts-sdk/dapp-kit) for connecting to wallets and loading data - [pnpm](https://pnpm.io/) for package management diff --git a/sdk/create-dapp/templates/react-e2e-counter/README.md b/sdk/create-dapp/templates/react-e2e-counter/README.md index a222ee66d02..7e7f648f195 100644 --- a/sdk/create-dapp/templates/react-e2e-counter/README.md +++ b/sdk/create-dapp/templates/react-e2e-counter/README.md @@ -8,20 +8,17 @@ Client dApp using the following tools: - [Vite](https://vitejs.dev/) for build tooling - [Radix UI](https://www.radix-ui.com/) for pre-built UI components - [ESLint](https://eslint.org/) for linting -- [`@iota/dapp-kit`](https://wiki.iota.org/references/ts-sdk/dapp-kit) for +- [`@iota/dapp-kit`](https://docs.iota.org/references/ts-sdk/dapp-kit) for connecting to wallets and loading data - [pnpm](https://pnpm.io/) for package management -For a full guide on how to build this dApp from scratch, visit this -[guide](http://wiki.iota.org/guides/developer/app-examples/e2e-counter#frontend). - ## Deploying your Move code ### Install IOTA cli Before deploying your move code, ensure that you have installed the IOTA CLI. You can follow the -[IOTA installation instruction](https://wiki.iota.org/build/install) to get +[IOTA installation instruction](https://docs.iota.org/developer/getting-started/install-iota) to get everything set up. This template uses `testnet` by default, so we'll need to set up a testnet diff --git a/sdk/dapp-kit/CHANGELOG.md b/sdk/dapp-kit/CHANGELOG.md index f99b9def2b9..c385559519c 100644 --- a/sdk/dapp-kit/CHANGELOG.md +++ b/sdk/dapp-kit/CHANGELOG.md @@ -1,5 +1,14 @@ # @iota/dapp-kit +## 0.3.1 + +### Patch Changes + +- 220fa7a: First public release. +- Updated dependencies [220fa7a] + - @iota/iota-sdk@0.3.1 + - @iota/wallet-standard@0.2.1 + ## 0.3.0 ### Minor Changes diff --git a/sdk/dapp-kit/README.md b/sdk/dapp-kit/README.md index 57fb238d3db..8ee45dda9a2 100644 --- a/sdk/dapp-kit/README.md +++ b/sdk/dapp-kit/README.md @@ -4,7 +4,7 @@ The IOTA dApp Kit is a set of React components, hooks, and utilities that make i dApp for the IOTA ecosystem. It provides hooks and components for querying data from the IOTA blockchain, and connecting to IOTA wallets. -See https://wiki.iota.org/references/ts-sdk/typescript for full documentation +See https://docs.iota.org/references/ts-sdk/typescript for full documentation ### Core Features @@ -68,7 +68,7 @@ dApp up and running. To use our provided UI components, you will need to import the dApp Kit's CSS stylesheet into your dApp as shown below. For more information regarding customization options, check out the respective documentation pages for the components and -[themes](https://wiki.iota.org/references/ts-sdk/dapp-kit/themes). +[themes](https://docs.iota.org/references/ts-sdk/dapp-kit/themes). ```tsx import '@iota/dapp-kit/dist/index.css'; diff --git a/sdk/dapp-kit/package.json b/sdk/dapp-kit/package.json index c7e9c4b9fca..4060a691508 100644 --- a/sdk/dapp-kit/package.json +++ b/sdk/dapp-kit/package.json @@ -2,7 +2,8 @@ "name": "@iota/dapp-kit", "author": "IOTA Foundation ", "description": "A collection of React hooks and components for interacting with the IOTA blockchain and wallets.", - "version": "0.3.0", + "homepage": "https://docs.iota.org/references/ts-sdk/dapp-kit/", + "version": "0.3.1", "license": "Apache-2.0", "files": [ "CHANGELOG.md", diff --git a/sdk/dapp-kit/src/components/IotaClientProvider.tsx b/sdk/dapp-kit/src/components/IotaClientProvider.tsx index 4f9d149dbbc..3f53437956f 100644 --- a/sdk/dapp-kit/src/components/IotaClientProvider.tsx +++ b/sdk/dapp-kit/src/components/IotaClientProvider.tsx @@ -40,7 +40,7 @@ export type IotaClientProviderProps = { ); const DEFAULT_NETWORKS = { - localnet: { url: getNetwork(Network.Local).url }, + localnet: { url: getNetwork(Network.Localnet).url }, }; const DEFAULT_CREATE_CLIENT = function createClient( diff --git a/sdk/dapp-kit/src/components/connect-modal/views/GettingStarted.tsx b/sdk/dapp-kit/src/components/connect-modal/views/GettingStarted.tsx index 47d2f0ad608..816a3d3a7d5 100644 --- a/sdk/dapp-kit/src/components/connect-modal/views/GettingStarted.tsx +++ b/sdk/dapp-kit/src/components/connect-modal/views/GettingStarted.tsx @@ -26,7 +26,7 @@ export function GettingStarted() {