diff --git a/.assets/libra.png b/.assets/diem.png
similarity index 100%
rename from .assets/libra.png
rename to .assets/diem.png
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 1287a46dfe..976ad9588d 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -377,9 +377,9 @@ jobs:
- run:
command: RUST_BACKTRACE=1 cargo xbuild -j 16 -p language-benchmarks
- run:
- command: RUST_BACKTRACE=1 cargo xbuild -j 16 -p libra-fuzzer
+ command: RUST_BACKTRACE=1 cargo xbuild -j 16 -p diem-fuzzer
- run:
- command: RUST_BACKTRACE=1 cargo xbuild -j 16 -p libra-swarm
+ command: RUST_BACKTRACE=1 cargo xbuild -j 16 -p diem-swarm
- run:
command: RUST_BACKTRACE=1 cargo xbuild -j 16 -p test-generation
- run:
diff --git a/.circleci/get_pr_info.sh b/.circleci/get_pr_info.sh
index df20072279..56492507a8 100755
--- a/.circleci/get_pr_info.sh
+++ b/.circleci/get_pr_info.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright (c) The Libra Core Contributors
+# Copyright (c) The Diem Core Contributors
# SPDX-License-Identifier: Apache-2.0
#Check prerequists.
diff --git a/.circleci/should_run_lbt.sh b/.circleci/should_run_lbt.sh
index 5a905ce106..b981cb4223 100755
--- a/.circleci/should_run_lbt.sh
+++ b/.circleci/should_run_lbt.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright (c) The Libra Core Contributors
+# Copyright (c) The Diem Core Contributors
# SPDX-License-Identifier: Apache-2.0
set -eo pipefail
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index e1638c2b48..73ee304490 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -1,6 +1,6 @@
---
name: "\U0001F41B Bug report"
-about: Create a bug report to help improve Libra Core
+about: Create a bug report to help improve Diem Core
title: "[Bug]"
labels: bug
assignees: ''
@@ -32,7 +32,7 @@ To report a security issue, please email security@libra.org. -->
## System information
**Please complete the following information:**
--
+-
-
-
diff --git a/.github/ISSUE_TEMPLATE/documentation_bug_report.md b/.github/ISSUE_TEMPLATE/documentation_bug_report.md
index 4f9d004fef..0505ec87bc 100644
--- a/.github/ISSUE_TEMPLATE/documentation_bug_report.md
+++ b/.github/ISSUE_TEMPLATE/documentation_bug_report.md
@@ -1,6 +1,6 @@
---
name: "\U0001F41B Documentation/developers.libra.org Bug report"
-about: Create a bug report to help improve the Libra Developers' Website
+about: Create a bug report to help improve the Diem Developers' Website
title: "[Bug]"
labels: bug
assignees: ''
@@ -9,7 +9,7 @@ assignees: ''
# 🐛 Bug
-If you're looking to report an issue with the Libra Core project go to https://github.com/libra/libra
+If you're looking to report an issue with the Diem Core project go to https://github.com/libra/libra
diff --git a/.github/actions/README.md b/.github/actions/README.md
index cf728f6dfd..29a25da3d7 100644
--- a/.github/actions/README.md
+++ b/.github/actions/README.md
@@ -1,3 +1,3 @@
# github actions
-These actions are custom for Libra Core workflows.
+These actions are custom for Diem Core workflows.
diff --git a/.github/actions/land-blocking/cti-codebuild.sh b/.github/actions/land-blocking/cti-codebuild.sh
index 52a7bb9237..bebd52e9fb 100755
--- a/.github/actions/land-blocking/cti-codebuild.sh
+++ b/.github/actions/land-blocking/cti-codebuild.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright (c) The Libra Core Contributors
+# Copyright (c) The Diem Core Contributors
# SPDX-License-Identifier: Apache-2.0
# Expects these environment variables
diff --git a/.github/actions/land-blocking/find-lbt-images.sh b/.github/actions/land-blocking/find-lbt-images.sh
index f45c309212..0bf2f77bf2 100755
--- a/.github/actions/land-blocking/find-lbt-images.sh
+++ b/.github/actions/land-blocking/find-lbt-images.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright (c) The Libra Core Contributors
+# Copyright (c) The Diem Core Contributors
# SPDX-License-Identifier: Apache-2.0
# adapted from --build-all-cti option from libra/docker/build-aws.sh, which is how
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 2295f67ae3..eecfa9642a 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -1,3 +1,3 @@
# Code of Conduct
-The Libra Core project has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://developers.libra.org/docs/policies/code-of-conduct) so that you can understand what actions will and will not be tolerated.
+The Diem Core project has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://developers.diem.com/docs/policies/code-of-conduct) so that you can understand what actions will and will not be tolerated.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 22948cee66..4363b976c8 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,20 +1,20 @@
---
id: contributing
-title: Contributing to Libra
+title: Contributing to Diem
---
-Our goal is to make contributing to the Libra project easy and transparent.
+Our goal is to make contributing to the Diem project easy and transparent.
-> **Note**: As the Libra Core project is currently an early-stage prototype, it
+> **Note**: As the Diem Core project is currently an early-stage prototype, it
> is undergoing rapid development. While we welcome contributions, before
> making substantial contributions be sure to discuss them in the Discourse
> forum to ensure that they fit into the project roadmap.
## On Contributing
-### Libra Core
+### Diem Core
-To contribute to the Libra Core implementation, first start with the proper
+To contribute to the Diem Core implementation, first start with the proper
development copy.
To get the development installation with all the necessary dependencies for
@@ -32,17 +32,17 @@ cargo xtest
#### Code Style, Hints, and Testing
Refer to our [Coding
-Guidelines](https://developers.libra.org/docs/community/coding-guidelines) for
+Guidelines](https://developers.diem.com/docs/community/coding-guidelines) for
detailed guidance about how to contribute to the project.
#### Documentation
-Libra's developer website is also open source (the code can be found in this
-[repository](https://github.com/libra/libra/developers.libra.org/website/)). It is built using
+Diem's developer website is also open source (the code can be found in this
+[repository](https://github.com/libra/libra/developers.diem.com/website/)). It is built using
[Docusaurus](https://docusaurus.io/):
If you know Markdown, you can already contribute! How to contribute can be found in the [website
-repo](https://github.com/libra/developers.libra.org/website/CONTRIBUTING.md).
+repo](https://github.com/diem/developers.diem.com/website/CONTRIBUTING.md).
## Developer Workflow
@@ -167,8 +167,8 @@ able to be built and passes all checks performed by CI.
## Contributor License Agreement
-For pull request to be accepted by any Libra projects, a CLA must be signed.
-You will only need to do this once to work on any of Libra's open source
+For pull request to be accepted by any Diem projects, a CLA must be signed.
+You will only need to do this once to work on any of Diem's open source
projects. Individuals contributing on their own behalf can sign the [Individual
CLA](https://github.com/libra/libra/blob/master/documentation/contributing/individual-cla.pdf).
If you are contributing on behalf of your employer, please ask them to sign the
@@ -177,6 +177,6 @@ CLA](https://github.com/libra/libra/blob/master/documentation/contributing/corpo
## Issues
-Libra uses [GitHub issues](https://github.com/libra/libra/issues) to track
+Diem uses [GitHub issues](https://github.com/libra/libra/issues) to track
bugs. Please include necessary information and instructions to reproduce your
issue.
diff --git a/Cargo.lock b/Cargo.lock
index b7f8d1e81e..fac8089b75 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -17,11 +17,11 @@ dependencies = [
"anyhow",
"codespan-reporting",
"datatest-stable",
+ "diem-temppath",
+ "diem-types",
+ "diem-workspace-hack",
"heck",
"libra-canonical-serialization",
- "libra-temppath",
- "libra-types",
- "libra-workspace-hack",
"log",
"move-core-types",
"move-prover",
@@ -35,9 +35,9 @@ name = "accumulator"
version = "0.1.0"
dependencies = [
"anyhow",
- "libra-crypto",
- "libra-types",
- "libra-workspace-hack",
+ "diem-crypto",
+ "diem-types",
+ "diem-workspace-hack",
"mirai-annotations",
"proptest",
"rand 0.7.3",
@@ -242,6 +242,18 @@ dependencies = [
"backup-service",
"byteorder",
"bytes",
+ "diem-config",
+ "diem-crypto",
+ "diem-infallible",
+ "diem-jellyfish-merkle",
+ "diem-logger",
+ "diem-proptest-helpers",
+ "diem-secure-push-metrics",
+ "diem-temppath",
+ "diem-types",
+ "diem-vm",
+ "diem-workspace-hack",
+ "diemdb",
"executor",
"executor-test-helpers",
"executor-types",
@@ -249,18 +261,6 @@ dependencies = [
"hex",
"itertools 0.9.0",
"libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-infallible",
- "libra-jellyfish-merkle",
- "libra-logger",
- "libra-proptest-helpers",
- "libra-secure-push-metrics",
- "libra-temppath",
- "libra-types",
- "libra-vm",
- "libra-workspace-hack",
- "libradb",
"num_cpus",
"once_cell",
"pin-project 1.0.2",
@@ -283,17 +283,17 @@ version = "0.1.0"
dependencies = [
"anyhow",
"bytes",
+ "diem-config",
+ "diem-crypto",
+ "diem-logger",
+ "diem-metrics",
+ "diem-temppath",
+ "diem-types",
+ "diem-workspace-hack",
+ "diemdb",
"futures 0.3.8",
"hyper",
"libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-logger",
- "libra-metrics",
- "libra-temppath",
- "libra-types",
- "libra-workspace-hack",
- "libradb",
"once_cell",
"reqwest",
"serde",
@@ -439,7 +439,7 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae"
name = "borrow-graph"
version = "0.0.1"
dependencies = [
- "libra-workspace-hack",
+ "diem-workspace-hack",
"mirai-annotations",
]
@@ -447,8 +447,8 @@ dependencies = [
name = "bounded-executor"
version = "0.1.0"
dependencies = [
+ "diem-workspace-hack",
"futures 0.3.8",
- "libra-workspace-hack",
"tokio",
]
@@ -496,11 +496,11 @@ dependencies = [
"codespan",
"codespan-reporting",
"datatest-stable",
+ "diem-temppath",
+ "diem-types",
+ "diem-workspace-hack",
"ir-to-bytecode",
"itertools 0.9.0",
- "libra-temppath",
- "libra-types",
- "libra-workspace-hack",
"log",
"move-core-types",
"num 0.3.1",
@@ -516,9 +516,9 @@ dependencies = [
"anyhow",
"codespan",
"codespan-reporting",
+ "diem-types",
+ "diem-workspace-hack",
"libra-canonical-serialization",
- "libra-types",
- "libra-workspace-hack",
"move-core-types",
"move-ir-types",
"serde",
@@ -531,9 +531,9 @@ version = "0.1.0"
dependencies = [
"anyhow",
"borrow-graph",
+ "diem-types",
+ "diem-workspace-hack",
"invalid-mutations",
- "libra-types",
- "libra-workspace-hack",
"mirai-annotations",
"move-core-types",
"petgraph",
@@ -546,9 +546,9 @@ version = "0.1.0"
dependencies = [
"bytecode-verifier",
"compiled-stdlib",
+ "diem-types",
+ "diem-workspace-hack",
"invalid-mutations",
- "libra-types",
- "libra-workspace-hack",
"move-core-types",
"petgraph",
"proptest",
@@ -640,11 +640,11 @@ name = "channel"
version = "0.1.0"
dependencies = [
"anyhow",
+ "diem-infallible",
+ "diem-metrics",
+ "diem-types",
+ "diem-workspace-hack",
"futures 0.3.8",
- "libra-infallible",
- "libra-metrics",
- "libra-types",
- "libra-workspace-hack",
"tokio",
]
@@ -712,20 +712,20 @@ dependencies = [
"compiled-stdlib",
"compiler",
"crash-handler",
+ "diem-config",
+ "diem-crypto",
+ "diem-infallible",
+ "diem-json-rpc-client",
+ "diem-logger",
+ "diem-metrics",
+ "diem-network-address",
+ "diem-temppath",
+ "diem-types",
+ "diem-wallet",
+ "diem-workspace-hack",
"generate-key",
"hex",
"libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-infallible",
- "libra-json-rpc-client",
- "libra-logger",
- "libra-metrics",
- "libra-network-address",
- "libra-temppath",
- "libra-types",
- "libra-wallet",
- "libra-workspace-hack",
"num-traits",
"once_cell",
"proptest",
@@ -758,6 +758,25 @@ dependencies = [
"chrono",
"consensus-types",
"debug-interface",
+ "diem-config",
+ "diem-crypto",
+ "diem-genesis-tool",
+ "diem-global-constants",
+ "diem-infallible",
+ "diem-json-rpc-client",
+ "diem-logger",
+ "diem-management",
+ "diem-mempool",
+ "diem-network-address",
+ "diem-network-address-encryption",
+ "diem-node",
+ "diem-operational-tool",
+ "diem-retrier",
+ "diem-secure-storage",
+ "diem-swarm",
+ "diem-trace",
+ "diem-types",
+ "diem-workspace-hack",
"flate2",
"futures 0.3.8",
"generate-key",
@@ -766,25 +785,6 @@ dependencies = [
"k8s-openapi",
"kube",
"libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-genesis-tool",
- "libra-global-constants",
- "libra-infallible",
- "libra-json-rpc-client",
- "libra-logger",
- "libra-management",
- "libra-mempool",
- "libra-network-address",
- "libra-network-address-encryption",
- "libra-node",
- "libra-operational-tool",
- "libra-retrier",
- "libra-secure-storage",
- "libra-swarm",
- "libra-trace",
- "libra-types",
- "libra-workspace-hack",
"network",
"network-builder",
"num_cpus",
@@ -857,11 +857,11 @@ version = "0.1.0"
dependencies = [
"anyhow",
"bytecode-verifier",
+ "diem-crypto",
+ "diem-types",
+ "diem-workspace-hack",
"include_dir",
"libra-canonical-serialization",
- "libra-crypto",
- "libra-types",
- "libra-workspace-hack",
"once_cell",
"sha2",
"stdlib",
@@ -876,10 +876,10 @@ dependencies = [
"bytecode-source-map",
"bytecode-verifier",
"compiled-stdlib",
+ "diem-types",
+ "diem-workspace-hack",
"ir-to-bytecode",
"libra-canonical-serialization",
- "libra-types",
- "libra-workspace-hack",
"move-ir-types",
"serde_json",
"structopt 0.3.21",
@@ -896,6 +896,18 @@ dependencies = [
"bytes",
"channel",
"consensus-types",
+ "diem-config",
+ "diem-crypto",
+ "diem-infallible",
+ "diem-logger",
+ "diem-mempool",
+ "diem-metrics",
+ "diem-secure-storage",
+ "diem-temppath",
+ "diem-trace",
+ "diem-types",
+ "diem-vm",
+ "diem-workspace-hack",
"execution-correctness",
"executor",
"executor-test-helpers",
@@ -904,18 +916,6 @@ dependencies = [
"futures 0.3.8",
"itertools 0.9.0",
"libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-infallible",
- "libra-logger",
- "libra-mempool",
- "libra-metrics",
- "libra-secure-storage",
- "libra-temppath",
- "libra-trace",
- "libra-types",
- "libra-vm",
- "libra-workspace-hack",
"mirai-annotations",
"network",
"num-derive",
@@ -943,13 +943,13 @@ name = "consensus-types"
version = "0.1.0"
dependencies = [
"anyhow",
+ "diem-crypto",
+ "diem-crypto-derive",
+ "diem-infallible",
+ "diem-types",
+ "diem-workspace-hack",
"executor-types",
"libra-canonical-serialization",
- "libra-crypto",
- "libra-crypto-derive",
- "libra-infallible",
- "libra-types",
- "libra-workspace-hack",
"mirai-annotations",
"proptest",
"serde",
@@ -1004,8 +1004,8 @@ name = "crash-handler"
version = "0.1.0"
dependencies = [
"backtrace",
- "libra-logger",
- "libra-workspace-hack",
+ "diem-logger",
+ "diem-workspace-hack",
"serde",
"toml",
]
@@ -1234,7 +1234,7 @@ dependencies = [
name = "datatest-stable"
version = "0.1.0"
dependencies = [
- "libra-workspace-hack",
+ "diem-workspace-hack",
"regex",
"structopt 0.3.21",
"termcolor",
@@ -1246,15 +1246,15 @@ name = "db-bootstrapper"
version = "0.1.0"
dependencies = [
"anyhow",
+ "diem-config",
+ "diem-crypto",
+ "diem-temppath",
+ "diem-types",
+ "diem-vm",
+ "diem-workspace-hack",
+ "diemdb",
"executor",
"libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-temppath",
- "libra-types",
- "libra-vm",
- "libra-workspace-hack",
- "libradb",
"storage-interface",
"structopt 0.3.21",
]
@@ -1265,9 +1265,9 @@ version = "0.1.0"
dependencies = [
"anyhow",
"bytes",
- "libra-logger",
- "libra-metrics",
- "libra-workspace-hack",
+ "diem-logger",
+ "diem-metrics",
+ "diem-workspace-hack",
"reqwest",
"tokio",
"warp",
@@ -1294,2475 +1294,2475 @@ name = "diagen"
version = "0.1.0"
dependencies = [
"anyhow",
- "libra-workspace-hack",
+ "diem-workspace-hack",
"regex",
]
[[package]]
-name = "difference"
-version = "2.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198"
-
-[[package]]
-name = "diffus"
-version = "0.9.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d3b0f382a0651ab91518390f16df755c6e2ca11f52a8e06b301fd3f7dfb576c"
+name = "diem-bitvec"
+version = "0.1.0"
dependencies = [
- "itertools 0.8.2",
+ "diem-proptest-helpers",
+ "diem-workspace-hack",
+ "libra-canonical-serialization",
+ "proptest",
+ "proptest-derive",
+ "serde",
+ "serde_bytes",
]
[[package]]
-name = "digest"
-version = "0.8.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5"
+name = "diem-config"
+version = "0.1.0"
dependencies = [
- "generic-array 0.12.3",
+ "diem-crypto",
+ "diem-crypto-derive",
+ "diem-global-constants",
+ "diem-logger",
+ "diem-network-address",
+ "diem-network-address-encryption",
+ "diem-secure-storage",
+ "diem-temppath",
+ "diem-types",
+ "diem-workspace-hack",
+ "get_if_addrs",
+ "libra-canonical-serialization",
+ "log",
+ "mirai-annotations",
+ "rand 0.7.3",
+ "serde",
+ "serde_yaml",
+ "thiserror",
]
[[package]]
-name = "digest"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
+name = "diem-crypto"
+version = "0.1.0"
dependencies = [
- "generic-array 0.14.4",
+ "aes-gcm",
+ "anyhow",
+ "bitvec",
+ "byteorder",
+ "bytes",
+ "criterion",
+ "curve25519-dalek 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curve25519-dalek 3.0.0 (git+https://github.com/novifinancial/curve25519-dalek.git?branch=fiat3)",
+ "diem-crypto-derive",
+ "diem-nibble",
+ "diem-workspace-hack",
+ "digest 0.9.0",
+ "ed25519-dalek 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ed25519-dalek 1.0.1 (git+https://github.com/novifinancial/ed25519-dalek.git?branch=fiat5)",
+ "hex",
+ "hkdf",
+ "libra-canonical-serialization",
+ "mirai-annotations",
+ "once_cell",
+ "proptest",
+ "proptest-derive",
+ "rand 0.7.3",
+ "rand_core 0.5.1",
+ "ripemd160",
+ "serde",
+ "serde-name",
+ "serde_bytes",
+ "serde_json",
+ "sha2",
+ "sha3",
+ "short-hex-str",
+ "static_assertions",
+ "thiserror",
+ "tiny-keccak",
+ "trybuild",
+ "x25519-dalek 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "x25519-dalek 1.1.0 (git+https://github.com/novifinancial/x25519-dalek.git?branch=fiat4)",
]
[[package]]
-name = "dirs"
-version = "1.0.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901"
+name = "diem-crypto-derive"
+version = "0.1.0"
dependencies = [
- "libc",
- "redox_users",
- "winapi 0.3.9",
+ "anyhow",
+ "diem-workspace-hack",
+ "proc-macro2 1.0.24",
+ "quote 1.0.7",
+ "syn 1.0.53",
]
[[package]]
-name = "dirs"
-version = "2.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3"
+name = "diem-dev"
+version = "0.1.0"
dependencies = [
- "cfg-if 0.1.10",
- "dirs-sys",
+ "bindgen",
+ "diem-crypto",
+ "diem-types",
+ "diem-workspace-hack",
+ "libc",
+ "libra-canonical-serialization",
+ "move-core-types",
+ "rand 0.7.3",
+ "static_assertions",
+ "transaction-builder",
]
[[package]]
-name = "dirs"
-version = "3.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "142995ed02755914747cc6ca76fc7e4583cd18578746716d0508ea6ed558b9ff"
+name = "diem-documentation-tool"
+version = "0.1.0"
dependencies = [
- "dirs-sys",
+ "anyhow",
+ "diem-workspace-hack",
+ "once_cell",
+ "regex",
+ "serde",
+ "serde-generate",
+ "serde-reflection",
+ "serde_yaml",
+ "structopt 0.3.21",
+ "tempfile",
]
[[package]]
-name = "dirs-sys"
-version = "0.3.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e93d7f5705de3e49895a2b5e0b8855a1c27f080192ae9c32a6432d50741a57a"
+name = "diem-events-fetcher"
+version = "0.1.0"
dependencies = [
- "libc",
- "redox_users",
- "winapi 0.3.9",
+ "anyhow",
+ "diem-json-rpc-client",
+ "diem-types",
+ "diem-workspace-hack",
+ "futures 0.3.8",
+ "hex",
+ "libra-canonical-serialization",
+ "reqwest",
+ "structopt 0.3.21",
+ "tokio",
]
[[package]]
-name = "disassembler"
+name = "diem-faucet"
version = "0.1.0"
dependencies = [
"anyhow",
- "bytecode-source-map",
- "bytecode-verifier",
- "colored",
- "libra-types",
- "libra-workspace-hack",
+ "diem-config",
+ "diem-crypto",
+ "diem-infallible",
+ "diem-json-rpc-client",
+ "diem-logger",
+ "diem-types",
+ "diem-workspace-hack",
+ "generate-key",
+ "hex",
+ "libra-canonical-serialization",
"move-core-types",
- "move-coverage",
- "move-ir-types",
+ "reqwest",
+ "serde",
+ "serde_derive",
+ "serde_json",
"structopt 0.3.21",
- "vm",
+ "tempfile",
+ "tokio",
+ "transaction-builder-generated",
+ "warp",
]
[[package]]
-name = "discard"
-version = "1.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0"
+name = "diem-fuzz"
+version = "0.1.0"
+dependencies = [
+ "diem-fuzzer",
+ "diem-workspace-hack",
+ "libfuzzer-sys",
+ "once_cell",
+]
[[package]]
-name = "docgen"
+name = "diem-fuzzer"
version = "0.1.0"
dependencies = [
+ "accumulator",
"anyhow",
- "bytecode",
- "codespan",
- "codespan-reporting",
+ "byteorder",
+ "consensus",
+ "consensus-types",
"datatest-stable",
- "itertools 0.9.0",
- "libra-temppath",
- "libra-workspace-hack",
- "log",
- "move-prover",
- "num 0.3.1",
+ "diem-crypto",
+ "diem-jellyfish-merkle",
+ "diem-json-rpc",
+ "diem-mempool",
+ "diem-proptest-helpers",
+ "diem-secure-json-rpc",
+ "diem-types",
+ "diem-vault-client",
+ "diem-workspace-hack",
+ "diemdb",
+ "executor",
+ "executor-types",
+ "hex",
+ "language-e2e-tests",
+ "libra-canonical-serialization",
+ "move-core-types",
+ "move-vm-types",
+ "network",
"once_cell",
- "regex",
- "serde",
- "spec-lang",
- "test-utils",
+ "proptest",
+ "proptest-derive",
+ "rand 0.7.3",
+ "rusty-fork",
+ "safety-rules",
+ "serde_json",
+ "sha-1 0.9.2",
+ "state-synchronizer",
+ "stats_alloc",
+ "storage-interface",
+ "structopt 0.3.21",
+ "ureq",
+ "vm",
]
[[package]]
-name = "dtoa"
-version = "0.4.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b"
+name = "diem-genesis-tool"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "consensus-types",
+ "diem-config",
+ "diem-crypto",
+ "diem-global-constants",
+ "diem-management",
+ "diem-network-address",
+ "diem-network-address-encryption",
+ "diem-secure-storage",
+ "diem-secure-time",
+ "diem-temppath",
+ "diem-types",
+ "diem-vm",
+ "diem-workspace-hack",
+ "diemdb",
+ "executor",
+ "generate-key",
+ "libra-canonical-serialization",
+ "rand 0.7.3",
+ "serde",
+ "storage-interface",
+ "structopt 0.3.21",
+ "thiserror",
+ "toml",
+ "transaction-builder",
+ "vm-genesis",
+]
[[package]]
-name = "ed25519"
-version = "1.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "37c66a534cbb46ab4ea03477eae19d5c22c01da8258030280b7bd9d8433fb6ef"
+name = "diem-github-client"
+version = "0.1.0"
dependencies = [
+ "base64 0.13.0",
+ "diem-workspace-hack",
"serde",
- "signature",
+ "serde_json",
+ "thiserror",
+ "ureq",
]
[[package]]
-name = "ed25519-dalek"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d"
+name = "diem-global-constants"
+version = "0.1.0"
+
+[[package]]
+name = "diem-infallible"
+version = "0.1.0"
dependencies = [
- "curve25519-dalek 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "ed25519",
- "rand 0.7.3",
- "serde",
- "sha2",
- "zeroize",
+ "diem-workspace-hack",
]
[[package]]
-name = "ed25519-dalek"
-version = "1.0.1"
-source = "git+https://github.com/novifinancial/ed25519-dalek.git?branch=fiat5#88603ebf0196015e9b4106844f9f47ed6c01e951"
+name = "diem-jellyfish-merkle"
+version = "0.1.0"
dependencies = [
- "curve25519-dalek 3.0.0 (git+https://github.com/novifinancial/curve25519-dalek.git?branch=fiat3)",
- "ed25519",
+ "anyhow",
+ "byteorder",
+ "diem-crypto",
+ "diem-crypto-derive",
+ "diem-infallible",
+ "diem-nibble",
+ "diem-types",
+ "diem-workspace-hack",
+ "libra-canonical-serialization",
+ "mirai-annotations",
+ "num-derive",
+ "num-traits",
+ "proptest",
+ "proptest-derive",
"rand 0.7.3",
"serde",
- "serde_bytes",
- "sha2",
- "zeroize",
+ "thiserror",
]
[[package]]
-name = "either"
-version = "1.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
+name = "diem-json-rpc"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "compiled-stdlib",
+ "diem-config",
+ "diem-crypto",
+ "diem-genesis-tool",
+ "diem-json-rpc-client",
+ "diem-json-rpc-types",
+ "diem-logger",
+ "diem-mempool",
+ "diem-metrics",
+ "diem-node",
+ "diem-proptest-helpers",
+ "diem-temppath",
+ "diem-trace",
+ "diem-types",
+ "diem-workspace-hack",
+ "diemdb",
+ "executor",
+ "executor-types",
+ "fail",
+ "futures 0.3.8",
+ "generate-key",
+ "hex",
+ "hyper",
+ "libra-canonical-serialization",
+ "move-core-types",
+ "move-vm-types",
+ "network",
+ "once_cell",
+ "proptest",
+ "rand 0.7.3",
+ "reqwest",
+ "scratchpad",
+ "serde",
+ "serde_json",
+ "storage-interface",
+ "tokio",
+ "transaction-builder-generated",
+ "vm-genesis",
+ "vm-validator",
+ "warp",
+]
[[package]]
-name = "encode_unicode"
-version = "0.3.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
+name = "diem-json-rpc-client"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "diem-config",
+ "diem-crypto",
+ "diem-json-rpc-types",
+ "diem-types",
+ "diem-workspace-hack",
+ "hex",
+ "libra-canonical-serialization",
+ "reqwest",
+ "serde",
+ "serde_json",
+ "tokio",
+ "warp",
+]
[[package]]
-name = "encoding_rs"
-version = "0.8.26"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "801bbab217d7f79c0062f4f7205b5d4427c6d1a7bd7aafdd1475f7c59d62b283"
+name = "diem-json-rpc-types"
+version = "0.1.0"
dependencies = [
- "cfg-if 1.0.0",
+ "anyhow",
+ "compiled-stdlib",
+ "diem-crypto",
+ "diem-types",
+ "diem-workspace-hack",
+ "hex",
+ "libra-canonical-serialization",
+ "move-core-types",
+ "move-explain",
+ "prost",
+ "prost-build",
+ "serde",
+ "serde_json",
]
[[package]]
-name = "enum_dispatch"
-version = "0.3.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "15b748aeb1b8c58d317739aa3171a2752ca3e76b8077c13dc748f327aebc0a72"
+name = "diem-key-manager"
+version = "0.1.0"
dependencies = [
+ "anyhow",
+ "diem-config",
+ "diem-crypto",
+ "diem-genesis-tool",
+ "diem-global-constants",
+ "diem-json-rpc",
+ "diem-logger",
+ "diem-network-address",
+ "diem-secure-json-rpc",
+ "diem-secure-push-metrics",
+ "diem-secure-storage",
+ "diem-secure-time",
+ "diem-types",
+ "diem-vm",
+ "diem-workspace-hack",
+ "diemdb",
+ "executor",
+ "executor-test-helpers",
+ "executor-types",
+ "futures 0.3.8",
"once_cell",
+ "rand 0.7.3",
+ "serde",
+ "storage-interface",
+ "thiserror",
+ "tokio",
+ "transaction-builder-generated",
+ "vm-validator",
+]
+
+[[package]]
+name = "diem-log-derive"
+version = "0.1.0"
+dependencies = [
+ "diem-workspace-hack",
"proc-macro2 1.0.24",
"quote 1.0.7",
"syn 1.0.53",
]
[[package]]
-name = "env_logger"
-version = "0.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
+name = "diem-logger"
+version = "0.1.0"
dependencies = [
- "atty",
- "humantime 1.3.0",
- "log",
- "regex",
- "termcolor",
+ "chrono",
+ "diem-infallible",
+ "diem-log-derive",
+ "diem-workspace-hack",
+ "erased-serde",
+ "hostname",
+ "once_cell",
+ "prometheus",
+ "serde",
+ "serde_json",
]
[[package]]
-name = "env_logger"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f26ecb66b4bdca6c1409b40fb255eefc2bd4f6d135dab3c3124f80ffa2a9661e"
+name = "diem-management"
+version = "0.1.0"
dependencies = [
- "atty",
- "humantime 2.0.1",
- "log",
- "regex",
- "termcolor",
+ "anyhow",
+ "diem-config",
+ "diem-crypto",
+ "diem-global-constants",
+ "diem-network-address",
+ "diem-network-address-encryption",
+ "diem-secure-storage",
+ "diem-secure-time",
+ "diem-temppath",
+ "diem-types",
+ "diem-workspace-hack",
+ "hex",
+ "libra-canonical-serialization",
+ "serde",
+ "serde_yaml",
+ "structopt 0.3.21",
+ "thiserror",
+ "toml",
+ "transaction-builder",
]
[[package]]
-name = "erased-serde"
-version = "0.3.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ca8b296792113e1500fd935ae487be6e00ce318952a6880555554824d6ebf38"
+name = "diem-mempool"
+version = "0.1.0"
dependencies = [
+ "anyhow",
+ "bounded-executor",
+ "channel",
+ "diem-config",
+ "diem-crypto",
+ "diem-infallible",
+ "diem-logger",
+ "diem-metrics",
+ "diem-network-address",
+ "diem-proptest-helpers",
+ "diem-trace",
+ "diem-types",
+ "diem-workspace-hack",
+ "fail",
+ "futures 0.3.8",
+ "itertools 0.9.0",
+ "libra-canonical-serialization",
+ "mirai-annotations",
+ "netcore",
+ "network",
+ "once_cell",
+ "proptest",
+ "rand 0.7.3",
+ "rayon",
"serde",
+ "serde_json",
+ "storage-interface",
+ "storage-service",
+ "subscription-service",
+ "tokio",
+ "vm-validator",
]
[[package]]
-name = "errmapgen"
+name = "diem-metrics"
version = "0.1.0"
dependencies = [
"anyhow",
- "codespan-reporting",
- "datatest-stable",
+ "assert_approx_eq",
+ "diem-logger",
+ "diem-metrics-core",
+ "diem-workspace-hack",
+ "futures 0.3.8",
+ "hyper",
+ "once_cell",
+ "prometheus",
+ "rusty-fork",
+ "serde_json",
+ "tokio",
+]
+
+[[package]]
+name = "diem-metrics-core"
+version = "0.1.0"
+dependencies = [
+ "diem-workspace-hack",
+ "prometheus",
+]
+
+[[package]]
+name = "diem-network-address"
+version = "0.1.0"
+dependencies = [
+ "aes-gcm",
+ "anyhow",
+ "diem-crypto",
+ "diem-workspace-hack",
"libra-canonical-serialization",
- "libra-types",
- "libra-workspace-hack",
- "log",
"move-core-types",
- "move-prover",
+ "proptest",
+ "proptest-derive",
"serde",
- "spec-lang",
- "test-utils",
+ "serde_bytes",
+ "static_assertions",
+ "thiserror",
]
[[package]]
-name = "execution-correctness"
+name = "diem-network-address-encryption"
version = "0.1.0"
dependencies = [
- "anyhow",
- "consensus-types",
- "executor",
- "executor-test-helpers",
- "executor-types",
+ "base64 0.13.0",
+ "diem-global-constants",
+ "diem-infallible",
+ "diem-logger",
+ "diem-network-address",
+ "diem-secure-storage",
+ "diem-workspace-hack",
"libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-genesis-tool",
- "libra-global-constants",
- "libra-infallible",
- "libra-logger",
- "libra-secure-net",
- "libra-secure-storage",
- "libra-temppath",
- "libra-types",
- "libra-vm",
- "libra-workspace-hack",
+ "move-core-types",
"rand 0.7.3",
"serde",
- "storage-client",
"thiserror",
- "transaction-builder",
]
[[package]]
-name = "executor"
+name = "diem-nibble"
version = "0.1.0"
dependencies = [
- "anyhow",
- "compiled-stdlib",
- "compiler",
- "consensus-types",
- "executor-test-helpers",
- "executor-types",
- "fail",
- "itertools 0.9.0",
- "libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-genesis-tool",
- "libra-infallible",
- "libra-logger",
- "libra-metrics",
- "libra-secure-net",
- "libra-state-view",
- "libra-temppath",
- "libra-trace",
- "libra-types",
- "libra-vm",
- "libra-workspace-hack",
- "libradb",
- "move-core-types",
- "once_cell",
+ "diem-workspace-hack",
"proptest",
- "rand 0.7.3",
- "scratchpad",
"serde",
- "serde_json",
- "storage-interface",
- "transaction-builder",
- "vm-genesis",
]
[[package]]
-name = "executor-benchmark"
+name = "diem-node"
version = "0.1.0"
dependencies = [
+ "backup-service",
+ "consensus",
+ "crash-handler",
+ "debug-interface",
+ "diem-config",
+ "diem-crypto",
+ "diem-genesis-tool",
+ "diem-json-rpc",
+ "diem-logger",
+ "diem-mempool",
+ "diem-metrics",
+ "diem-secure-storage",
+ "diem-temppath",
+ "diem-trace",
+ "diem-types",
+ "diem-vm",
+ "diem-workspace-hack",
+ "diemdb",
"executor",
"executor-types",
- "itertools 0.9.0",
- "libra-config",
- "libra-crypto",
- "libra-genesis-tool",
- "libra-infallible",
- "libra-logger",
- "libra-types",
- "libra-vm",
- "libra-workspace-hack",
- "libradb",
- "rand 0.7.3",
- "rayon",
+ "fail",
+ "futures 0.3.8",
+ "jemallocator",
+ "network-builder",
+ "state-synchronizer",
"storage-client",
"storage-interface",
"storage-service",
"structopt 0.3.21",
- "transaction-builder",
+ "subscription-service",
+ "tokio",
]
[[package]]
-name = "executor-test-helpers"
+name = "diem-operational-tool"
version = "0.1.0"
dependencies = [
"anyhow",
- "executor",
- "executor-types",
- "libra-config",
- "libra-crypto",
- "libra-genesis-tool",
- "libra-temppath",
- "libra-types",
- "libra-vm",
- "libra-workspace-hack",
- "libradb",
- "rand 0.7.3",
- "storage-interface",
- "storage-service",
- "tempfile",
+ "diem-config",
+ "diem-crypto",
+ "diem-global-constants",
+ "diem-management",
+ "diem-network-address",
+ "diem-network-address-encryption",
+ "diem-secure-json-rpc",
+ "diem-secure-storage",
+ "diem-secure-time",
+ "diem-temppath",
+ "diem-types",
+ "diem-workspace-hack",
+ "hex",
+ "libra-canonical-serialization",
+ "serde",
+ "serde_json",
+ "structopt 0.3.21",
+ "thiserror",
+ "toml",
"transaction-builder",
- "vm-genesis",
]
[[package]]
-name = "executor-types"
+name = "diem-proptest-helpers"
version = "0.1.0"
dependencies = [
- "anyhow",
- "libra-canonical-serialization",
- "libra-crypto",
- "libra-secure-net",
- "libra-types",
- "libra-workspace-hack",
- "scratchpad",
- "serde",
- "storage-interface",
- "thiserror",
+ "crossbeam",
+ "diem-workspace-hack",
+ "proptest",
+ "proptest-derive",
]
[[package]]
-name = "fail"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3be3c61c59fdc91f5dbc3ea31ee8623122ce80057058be560654c5d410d181a6"
+name = "diem-retrier"
+version = "0.1.0"
dependencies = [
- "lazy_static",
- "log",
- "rand 0.7.3",
+ "diem-logger",
+ "diem-workspace-hack",
+ "tokio",
]
[[package]]
-name = "fake-simd"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
-
-[[package]]
-name = "fiat-crypto"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f6ab97095615857b6ad00a8330fff0e443f1def9fd357cef82d0ca0677b616b"
-
-[[package]]
-name = "fixedbitset"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d"
+name = "diem-secure-json-rpc"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "diem-config",
+ "diem-crypto",
+ "diem-json-rpc",
+ "diem-proptest-helpers",
+ "diem-temppath",
+ "diem-types",
+ "diem-workspace-hack",
+ "diemdb",
+ "futures 0.3.8",
+ "hex",
+ "libra-canonical-serialization",
+ "proptest",
+ "serde",
+ "serde_json",
+ "storage-interface",
+ "thiserror",
+ "tokio",
+ "ureq",
+ "vm-validator",
+]
[[package]]
-name = "flate2"
-version = "1.0.19"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7411863d55df97a419aa64cb4d2f167103ea9d767e2c54a1868b7ac3f6b47129"
+name = "diem-secure-net"
+version = "0.1.0"
dependencies = [
- "cfg-if 1.0.0",
- "crc32fast",
- "libc",
- "miniz_oxide",
+ "diem-config",
+ "diem-logger",
+ "diem-secure-push-metrics",
+ "diem-workspace-hack",
+ "once_cell",
+ "serde",
+ "thiserror",
]
[[package]]
-name = "fnv"
-version = "1.0.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
+name = "diem-secure-push-metrics"
+version = "0.1.0"
+dependencies = [
+ "diem-logger",
+ "diem-metrics-core",
+ "diem-workspace-hack",
+ "ureq",
+]
[[package]]
-name = "foreign-types"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
+name = "diem-secure-storage"
+version = "0.1.0"
dependencies = [
- "foreign-types-shared",
+ "base64 0.13.0",
+ "chrono",
+ "diem-crypto",
+ "diem-crypto-derive",
+ "diem-github-client",
+ "diem-infallible",
+ "diem-logger",
+ "diem-secure-time",
+ "diem-temppath",
+ "diem-vault-client",
+ "diem-workspace-hack",
+ "enum_dispatch",
+ "libra-canonical-serialization",
+ "rand 0.7.3",
+ "serde",
+ "serde_json",
+ "thiserror",
]
[[package]]
-name = "foreign-types-shared"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
+name = "diem-secure-time"
+version = "0.1.0"
+dependencies = [
+ "diem-infallible",
+ "diem-workspace-hack",
+]
[[package]]
-name = "form_urlencoded"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ece68d15c92e84fa4f19d3780f1294e5ca82a78a6d515f1efaabcc144688be00"
+name = "diem-smoke-test-attribute"
+version = "0.1.0"
dependencies = [
- "matches",
- "percent-encoding",
+ "diem-workspace-hack",
+ "proc-macro2 1.0.24",
+ "quote 1.0.7",
]
[[package]]
-name = "fs2"
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213"
+name = "diem-state-view"
+version = "0.1.0"
dependencies = [
- "libc",
- "winapi 0.3.9",
+ "anyhow",
+ "diem-crypto",
+ "diem-types",
+ "diem-workspace-hack",
]
[[package]]
-name = "fs_extra"
-version = "1.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394"
+name = "diem-storage-inspector"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "diem-config",
+ "diem-crypto",
+ "diem-logger",
+ "diem-types",
+ "diem-workspace-hack",
+ "diemdb",
+ "storage-interface",
+ "structopt 0.3.21",
+ "tempfile",
+ "transaction-builder",
+]
[[package]]
-name = "fuchsia-cprng"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
+name = "diem-swarm"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "ctrlc",
+ "debug-interface",
+ "diem-config",
+ "diem-genesis-tool",
+ "diem-logger",
+ "diem-temppath",
+ "diem-types",
+ "diem-workspace-hack",
+ "reqwest",
+ "structopt 0.3.21",
+ "thiserror",
+]
[[package]]
-name = "fuchsia-zircon"
-version = "0.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
+name = "diem-temppath"
+version = "0.1.0"
dependencies = [
- "bitflags",
- "fuchsia-zircon-sys",
+ "diem-workspace-hack",
+ "hex",
+ "rand 0.7.3",
]
[[package]]
-name = "fuchsia-zircon-sys"
-version = "0.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
+name = "diem-trace"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "chrono",
+ "diem-logger",
+ "diem-metrics",
+ "diem-workspace-hack",
+ "once_cell",
+ "reqwest",
+ "serde",
+ "serde_json",
+ "structopt 0.3.21",
+ "tokio",
+]
[[package]]
-name = "functional-tests"
+name = "diem-transaction-replay"
version = "0.1.0"
dependencies = [
- "aho-corasick",
"anyhow",
- "bytecode-verifier",
"compiled-stdlib",
- "datatest-stable",
+ "diem-state-view",
+ "diem-types",
+ "diem-validator-interface",
+ "diem-vm",
+ "diem-workspace-hack",
+ "diemdb",
"difference",
+ "libra-canonical-serialization",
+ "move-core-types",
+ "move-lang",
+ "move-vm-runtime",
+ "move-vm-test-utils",
+ "move-vm-types",
+ "resource-viewer",
+ "stdlib",
+ "structopt 0.3.21",
+ "vm",
+ "vm-genesis",
+]
+
+[[package]]
+name = "diem-types"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "bytes",
+ "chrono",
+ "diem-crypto",
+ "diem-crypto-derive",
+ "diem-infallible",
+ "diem-network-address",
+ "diem-proptest-helpers",
+ "diem-workspace-hack",
"hex",
"itertools 0.9.0",
- "language-e2e-tests",
- "libra-config",
- "libra-crypto",
- "libra-state-view",
- "libra-types",
- "libra-vm",
- "libra-workspace-hack",
+ "libra-canonical-serialization",
"mirai-annotations",
"move-core-types",
"once_cell",
+ "proptest",
+ "proptest-derive",
+ "rand 0.7.3",
"regex",
- "term_size",
- "termcolor",
+ "serde",
+ "serde_bytes",
+ "serde_json",
"thiserror",
- "vm",
- "vm-genesis",
+ "tiny-keccak",
]
[[package]]
-name = "funty"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ba62103ce691c2fd80fbae2213dfdda9ce60804973ac6b6e97de818ea7f52c8"
-
-[[package]]
-name = "futures"
-version = "0.1.30"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c7e4c2612746b0df8fed4ce0c69156021b704c9aefa360311c04e6e9e002eed"
-
-[[package]]
-name = "futures"
-version = "0.3.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b3b0c040a1fe6529d30b3c5944b280c7f0dcb2930d2c3062bca967b602583d0"
+name = "diem-validator-interface"
+version = "0.1.0"
dependencies = [
- "futures-channel",
- "futures-core",
- "futures-executor",
- "futures-io",
- "futures-sink",
- "futures-task",
- "futures-util",
+ "anyhow",
+ "diem-config",
+ "diem-json-rpc-client",
+ "diem-state-view",
+ "diem-types",
+ "diem-workspace-hack",
+ "diemdb",
+ "libra-canonical-serialization",
+ "reqwest",
+ "scratchpad",
+ "storage-interface",
]
[[package]]
-name = "futures-channel"
-version = "0.3.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4b7109687aa4e177ef6fe84553af6280ef2778bdb7783ba44c9dc3399110fe64"
+name = "diem-vault-client"
+version = "0.1.0"
dependencies = [
- "futures-core",
- "futures-sink",
+ "base64 0.13.0",
+ "chrono",
+ "diem-crypto",
+ "diem-proptest-helpers",
+ "diem-types",
+ "diem-workspace-hack",
+ "native-tls",
+ "once_cell",
+ "proptest",
+ "serde",
+ "serde_json",
+ "thiserror",
+ "ureq",
]
[[package]]
-name = "futures-core"
-version = "0.3.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "847ce131b72ffb13b6109a221da9ad97a64cbe48feb1028356b836b47b8f1748"
-
-[[package]]
-name = "futures-executor"
-version = "0.3.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4caa2b2b68b880003057c1dd49f1ed937e38f22fcf6c212188a121f08cf40a65"
+name = "diem-vm"
+version = "0.1.0"
dependencies = [
- "futures-core",
- "futures-task",
- "futures-util",
+ "anyhow",
+ "diem-crypto",
+ "diem-logger",
+ "diem-metrics",
+ "diem-state-view",
+ "diem-trace",
+ "diem-types",
+ "diem-workspace-hack",
+ "fail",
+ "libra-canonical-serialization",
+ "mirai-annotations",
+ "move-core-types",
+ "move-vm-runtime",
+ "move-vm-types",
+ "once_cell",
+ "proptest",
+ "rayon",
+ "serde",
+ "serde_json",
+ "vm",
]
[[package]]
-name = "futures-io"
-version = "0.3.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "611834ce18aaa1bd13c4b374f5d653e1027cf99b6b502584ff8c9a64413b30bb"
-
-[[package]]
-name = "futures-macro"
-version = "0.3.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77408a692f1f97bcc61dc001d752e00643408fbc922e4d634c655df50d595556"
+name = "diem-wallet"
+version = "0.1.0"
dependencies = [
- "proc-macro-hack",
- "proc-macro2 1.0.24",
- "quote 1.0.7",
- "syn 1.0.53",
-]
-
-[[package]]
-name = "futures-sink"
-version = "0.3.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f878195a49cee50e006b02b93cf7e0a95a38ac7b776b4c4d9cc1207cd20fcb3d"
-
-[[package]]
-name = "futures-task"
-version = "0.3.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c554eb5bf48b2426c4771ab68c6b14468b6e76cc90996f528c3338d761a4d0d"
-dependencies = [
- "once_cell",
+ "anyhow",
+ "byteorder",
+ "diem-crypto",
+ "diem-temppath",
+ "diem-types",
+ "diem-workspace-hack",
+ "ed25519-dalek 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ed25519-dalek 1.0.1 (git+https://github.com/novifinancial/ed25519-dalek.git?branch=fiat5)",
+ "hex",
+ "hmac 0.10.1",
+ "mirai-annotations",
+ "pbkdf2",
+ "rand 0.7.3",
+ "serde",
+ "sha2",
+ "thiserror",
]
[[package]]
-name = "futures-util"
-version = "0.3.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d304cff4a7b99cfb7986f7d43fbe93d175e72e704a8860787cc95e9ffd85cbd2"
+name = "diem-workspace-hack"
+version = "0.1.0"
dependencies = [
- "futures-channel",
- "futures-core",
- "futures-io",
- "futures-macro",
- "futures-sink",
- "futures-task",
+ "bytes",
+ "cc",
+ "log",
"memchr",
- "pin-project 1.0.2",
- "pin-utils",
- "proc-macro-hack",
- "proc-macro-nested",
- "slab",
+ "num-traits",
+ "petgraph",
+ "serde",
+ "sha-1 0.9.2",
+ "subtle",
+ "syn 1.0.53",
]
[[package]]
-name = "gcc"
-version = "0.3.55"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2"
-
-[[package]]
-name = "generate-format"
+name = "diem-writeset-generator"
version = "0.1.0"
dependencies = [
- "consensus",
- "consensus-types",
+ "anyhow",
+ "diem-types",
+ "diem-workspace-hack",
+ "handlebars",
"libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-crypto-derive",
- "libra-network-address",
- "libra-types",
- "libra-workspace-hack",
- "move-core-types",
- "network",
- "rand 0.7.3",
+ "move-lang",
"serde",
- "serde-reflection",
- "serde_yaml",
+ "serde_json",
+ "stdlib",
"structopt 0.3.21",
+ "tempfile",
]
[[package]]
-name = "generate-key"
+name = "diemdb"
version = "0.1.0"
dependencies = [
+ "accumulator",
+ "anyhow",
+ "arc-swap",
+ "byteorder",
+ "diem-config",
+ "diem-crypto",
+ "diem-infallible",
+ "diem-jellyfish-merkle",
+ "diem-logger",
+ "diem-metrics",
+ "diem-proptest-helpers",
+ "diem-temppath",
+ "diem-types",
+ "diem-workspace-hack",
+ "itertools 0.9.0",
"libra-canonical-serialization",
- "libra-crypto",
- "libra-temppath",
- "libra-workspace-hack",
+ "num-derive",
+ "num-traits",
+ "num-variants",
+ "once_cell",
+ "proptest",
+ "proptest-derive",
"rand 0.7.3",
+ "schemadb",
+ "serde",
+ "storage-interface",
+ "thiserror",
]
[[package]]
-name = "generic-array"
-version = "0.12.3"
+name = "difference"
+version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec"
-dependencies = [
- "typenum",
-]
+checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198"
[[package]]
-name = "generic-array"
-version = "0.14.4"
+name = "diffus"
+version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817"
+checksum = "8d3b0f382a0651ab91518390f16df755c6e2ca11f52a8e06b301fd3f7dfb576c"
dependencies = [
- "typenum",
- "version_check",
+ "itertools 0.8.2",
]
[[package]]
-name = "genesis-viewer"
-version = "0.1.0"
+name = "digest"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5"
dependencies = [
- "compiled-stdlib",
- "libra-canonical-serialization",
- "libra-types",
- "libra-workspace-hack",
- "resource-viewer",
- "structopt 0.3.21",
- "vm",
- "vm-genesis",
+ "generic-array 0.12.3",
]
[[package]]
-name = "get_if_addrs"
-version = "0.5.3"
+name = "digest"
+version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "abddb55a898d32925f3148bd281174a68eeb68bbfd9a5938a57b18f506ee4ef7"
+checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
dependencies = [
- "c_linked_list",
- "get_if_addrs-sys",
- "libc",
- "winapi 0.2.8",
+ "generic-array 0.14.4",
]
[[package]]
-name = "get_if_addrs-sys"
-version = "0.1.1"
+name = "dirs"
+version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0d04f9fb746cf36b191c00f3ede8bde9c8e64f9f4b05ae2694a9ccf5e3f5ab48"
+checksum = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901"
dependencies = [
- "gcc",
"libc",
+ "redox_users",
+ "winapi 0.3.9",
]
[[package]]
-name = "getrandom"
-version = "0.1.15"
+name = "dirs"
+version = "2.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6"
+checksum = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3"
dependencies = [
"cfg-if 0.1.10",
- "libc",
- "wasi 0.9.0+wasi-snapshot-preview1",
+ "dirs-sys",
]
[[package]]
-name = "getrandom"
-version = "0.2.0"
+name = "dirs"
+version = "3.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4"
+checksum = "142995ed02755914747cc6ca76fc7e4583cd18578746716d0508ea6ed558b9ff"
dependencies = [
- "cfg-if 0.1.10",
- "libc",
- "wasi 0.9.0+wasi-snapshot-preview1",
+ "dirs-sys",
]
[[package]]
-name = "ghash"
-version = "0.3.0"
+name = "dirs-sys"
+version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d6e27f0689a6e15944bdce7e45425efb87eaa8ab0c6e87f11d0987a9133e2531"
+checksum = "8e93d7f5705de3e49895a2b5e0b8855a1c27f080192ae9c32a6432d50741a57a"
dependencies = [
- "polyval",
+ "libc",
+ "redox_users",
+ "winapi 0.3.9",
]
[[package]]
-name = "gimli"
-version = "0.23.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce"
+name = "disassembler"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "bytecode-source-map",
+ "bytecode-verifier",
+ "colored",
+ "diem-types",
+ "diem-workspace-hack",
+ "move-core-types",
+ "move-coverage",
+ "move-ir-types",
+ "structopt 0.3.21",
+ "vm",
+]
[[package]]
-name = "glob"
-version = "0.3.0"
+name = "discard"
+version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
+checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0"
[[package]]
-name = "globset"
-version = "0.4.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c152169ef1e421390738366d2f796655fec62621dabbd0fd476f905934061e4a"
+name = "docgen"
+version = "0.1.0"
dependencies = [
- "aho-corasick",
- "bstr",
- "fnv",
+ "anyhow",
+ "bytecode",
+ "codespan",
+ "codespan-reporting",
+ "datatest-stable",
+ "diem-temppath",
+ "diem-workspace-hack",
+ "itertools 0.9.0",
"log",
+ "move-prover",
+ "num 0.3.1",
+ "once_cell",
"regex",
+ "serde",
+ "spec-lang",
+ "test-utils",
]
[[package]]
-name = "goldenfile"
-version = "1.1.0"
+name = "dtoa"
+version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f46e6a4d70c06f0b9a70d36dd8eef4fdeaa1ab657e4f1eaff290f69e48145f2"
-dependencies = [
- "difference",
- "tempfile",
-]
+checksum = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b"
[[package]]
-name = "guppy"
-version = "0.6.1"
+name = "ed25519"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a0658e39db7498a195f3f68c3ecf0ed2bce7f35c580c2ee9dd2c2dc4bbe1e7c4"
+checksum = "37c66a534cbb46ab4ea03477eae19d5c22c01da8258030280b7bd9d8433fb6ef"
dependencies = [
- "cargo_metadata",
- "fixedbitset",
- "guppy-summaries",
- "indexmap",
- "itertools 0.9.0",
- "nested",
- "once_cell",
- "pathdiff",
- "petgraph",
- "rayon",
- "semver 0.11.0",
"serde",
- "serde_json",
- "supercow",
- "target-spec",
+ "signature",
]
[[package]]
-name = "guppy-summaries"
-version = "0.3.0"
+name = "ed25519-dalek"
+version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4db8242f1f19bfdbb0226cc425bca27cc5f1e029cde7d3145924fe71184dff9f"
+checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d"
dependencies = [
- "diffus",
- "semver 0.11.0",
- "serde",
- "toml",
+ "curve25519-dalek 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ed25519",
+ "rand 0.7.3",
+ "serde",
+ "sha2",
+ "zeroize",
]
[[package]]
-name = "h2"
-version = "0.2.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535"
+name = "ed25519-dalek"
+version = "1.0.1"
+source = "git+https://github.com/novifinancial/ed25519-dalek.git?branch=fiat5#88603ebf0196015e9b4106844f9f47ed6c01e951"
dependencies = [
- "bytes",
- "fnv",
- "futures-core",
- "futures-sink",
- "futures-util",
- "http",
- "indexmap",
- "slab",
- "tokio",
- "tokio-util",
- "tracing",
- "tracing-futures",
+ "curve25519-dalek 3.0.0 (git+https://github.com/novifinancial/curve25519-dalek.git?branch=fiat3)",
+ "ed25519",
+ "rand 0.7.3",
+ "serde",
+ "serde_bytes",
+ "sha2",
+ "zeroize",
]
[[package]]
-name = "half"
-version = "1.6.0"
+name = "either"
+version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d36fab90f82edc3c747f9d438e06cf0a491055896f2a279638bb5beed6c40177"
+checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
[[package]]
-name = "handlebars"
-version = "3.5.1"
+name = "encode_unicode"
+version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2764f9796c0ddca4b82c07f25dd2cb3db30b9a8f47940e78e1c883d9e95c3db9"
-dependencies = [
- "log",
- "pest",
- "pest_derive",
- "quick-error 2.0.0",
- "serde",
- "serde_json",
-]
+checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
[[package]]
-name = "hashbrown"
-version = "0.9.1"
+name = "encoding_rs"
+version = "0.8.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04"
+checksum = "801bbab217d7f79c0062f4f7205b5d4427c6d1a7bd7aafdd1475f7c59d62b283"
+dependencies = [
+ "cfg-if 1.0.0",
+]
[[package]]
-name = "headers"
-version = "0.3.2"
+name = "enum_dispatch"
+version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed18eb2459bf1a09ad2d6b1547840c3e5e62882fa09b9a6a20b1de8e3228848f"
+checksum = "15b748aeb1b8c58d317739aa3171a2752ca3e76b8077c13dc748f327aebc0a72"
dependencies = [
- "base64 0.12.3",
- "bitflags",
- "bytes",
- "headers-core",
- "http",
- "mime",
- "sha-1 0.8.2",
- "time 0.1.44",
+ "once_cell",
+ "proc-macro2 1.0.24",
+ "quote 1.0.7",
+ "syn 1.0.53",
]
[[package]]
-name = "headers-core"
-version = "0.2.0"
+name = "env_logger"
+version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429"
+checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
dependencies = [
- "http",
+ "atty",
+ "humantime 1.3.0",
+ "log",
+ "regex",
+ "termcolor",
]
[[package]]
-name = "heck"
-version = "0.3.1"
+name = "env_logger"
+version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
+checksum = "f26ecb66b4bdca6c1409b40fb255eefc2bd4f6d135dab3c3124f80ffa2a9661e"
dependencies = [
- "unicode-segmentation",
+ "atty",
+ "humantime 2.0.1",
+ "log",
+ "regex",
+ "termcolor",
]
[[package]]
-name = "hermit-abi"
-version = "0.1.17"
+name = "erased-serde"
+version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8"
+checksum = "6ca8b296792113e1500fd935ae487be6e00ce318952a6880555554824d6ebf38"
dependencies = [
- "libc",
+ "serde",
]
[[package]]
-name = "hex"
-version = "0.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35"
+name = "errmapgen"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "codespan-reporting",
+ "datatest-stable",
+ "diem-types",
+ "diem-workspace-hack",
+ "libra-canonical-serialization",
+ "log",
+ "move-core-types",
+ "move-prover",
+ "serde",
+ "spec-lang",
+ "test-utils",
+]
[[package]]
-name = "hkdf"
-version = "0.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "51ab2f639c231793c5f6114bdb9bbe50a7dbbfcd7c7c6bd8475dec2d991e964f"
+name = "execution-correctness"
+version = "0.1.0"
dependencies = [
- "digest 0.9.0",
- "hmac 0.10.1",
+ "anyhow",
+ "consensus-types",
+ "diem-config",
+ "diem-crypto",
+ "diem-genesis-tool",
+ "diem-global-constants",
+ "diem-infallible",
+ "diem-logger",
+ "diem-secure-net",
+ "diem-secure-storage",
+ "diem-temppath",
+ "diem-types",
+ "diem-vm",
+ "diem-workspace-hack",
+ "executor",
+ "executor-test-helpers",
+ "executor-types",
+ "libra-canonical-serialization",
+ "rand 0.7.3",
+ "serde",
+ "storage-client",
+ "thiserror",
+ "transaction-builder",
]
[[package]]
-name = "hmac"
-version = "0.8.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840"
+name = "executor"
+version = "0.1.0"
dependencies = [
- "crypto-mac 0.8.0",
- "digest 0.9.0",
+ "anyhow",
+ "compiled-stdlib",
+ "compiler",
+ "consensus-types",
+ "diem-config",
+ "diem-crypto",
+ "diem-genesis-tool",
+ "diem-infallible",
+ "diem-logger",
+ "diem-metrics",
+ "diem-secure-net",
+ "diem-state-view",
+ "diem-temppath",
+ "diem-trace",
+ "diem-types",
+ "diem-vm",
+ "diem-workspace-hack",
+ "diemdb",
+ "executor-test-helpers",
+ "executor-types",
+ "fail",
+ "itertools 0.9.0",
+ "libra-canonical-serialization",
+ "move-core-types",
+ "once_cell",
+ "proptest",
+ "rand 0.7.3",
+ "scratchpad",
+ "serde",
+ "serde_json",
+ "storage-interface",
+ "transaction-builder",
+ "vm-genesis",
]
[[package]]
-name = "hmac"
-version = "0.10.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15"
+name = "executor-benchmark"
+version = "0.1.0"
dependencies = [
- "crypto-mac 0.10.0",
- "digest 0.9.0",
+ "diem-config",
+ "diem-crypto",
+ "diem-genesis-tool",
+ "diem-infallible",
+ "diem-logger",
+ "diem-types",
+ "diem-vm",
+ "diem-workspace-hack",
+ "diemdb",
+ "executor",
+ "executor-types",
+ "itertools 0.9.0",
+ "rand 0.7.3",
+ "rayon",
+ "storage-client",
+ "storage-interface",
+ "storage-service",
+ "structopt 0.3.21",
+ "transaction-builder",
]
[[package]]
-name = "hostname"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867"
+name = "executor-test-helpers"
+version = "0.1.0"
dependencies = [
- "libc",
- "match_cfg",
- "winapi 0.3.9",
+ "anyhow",
+ "diem-config",
+ "diem-crypto",
+ "diem-genesis-tool",
+ "diem-temppath",
+ "diem-types",
+ "diem-vm",
+ "diem-workspace-hack",
+ "diemdb",
+ "executor",
+ "executor-types",
+ "rand 0.7.3",
+ "storage-interface",
+ "storage-service",
+ "tempfile",
+ "transaction-builder",
+ "vm-genesis",
]
[[package]]
-name = "http"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9"
+name = "executor-types"
+version = "0.1.0"
dependencies = [
- "bytes",
- "fnv",
- "itoa",
+ "anyhow",
+ "diem-crypto",
+ "diem-secure-net",
+ "diem-types",
+ "diem-workspace-hack",
+ "libra-canonical-serialization",
+ "scratchpad",
+ "serde",
+ "storage-interface",
+ "thiserror",
]
[[package]]
-name = "http-body"
-version = "0.3.1"
+name = "fail"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b"
+checksum = "3be3c61c59fdc91f5dbc3ea31ee8623122ce80057058be560654c5d410d181a6"
dependencies = [
- "bytes",
- "http",
+ "lazy_static",
+ "log",
+ "rand 0.7.3",
]
[[package]]
-name = "httparse"
-version = "1.3.4"
+name = "fake-simd"
+version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9"
+checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
[[package]]
-name = "httpdate"
-version = "0.3.2"
+name = "fiat-crypto"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47"
+checksum = "0f6ab97095615857b6ad00a8330fff0e443f1def9fd357cef82d0ca0677b616b"
[[package]]
-name = "humantime"
-version = "1.3.0"
+name = "fixedbitset"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
-dependencies = [
- "quick-error 1.2.3",
-]
-
-[[package]]
-name = "humantime"
-version = "2.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c1ad908cc71012b7bea4d0c53ba96a8cba9962f048fa68d143376143d863b7a"
-
-[[package]]
-name = "hyper"
-version = "0.13.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6ad767baac13b44d4529fcf58ba2cd0995e36e7b435bc5b039de6f47e880dbf"
-dependencies = [
- "bytes",
- "futures-channel",
- "futures-core",
- "futures-util",
- "h2",
- "http",
- "http-body",
- "httparse",
- "httpdate",
- "itoa",
- "pin-project 1.0.2",
- "socket2",
- "tokio",
- "tower-service",
- "tracing",
- "want",
-]
+checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d"
[[package]]
-name = "hyper-tls"
-version = "0.4.3"
+name = "flate2"
+version = "1.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d979acc56dcb5b8dddba3917601745e877576475aa046df3226eabdecef78eed"
+checksum = "7411863d55df97a419aa64cb4d2f167103ea9d767e2c54a1868b7ac3f6b47129"
dependencies = [
- "bytes",
- "hyper",
- "native-tls",
- "tokio",
- "tokio-tls",
+ "cfg-if 1.0.0",
+ "crc32fast",
+ "libc",
+ "miniz_oxide",
]
[[package]]
-name = "idna"
-version = "0.2.0"
+name = "fnv"
+version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9"
-dependencies = [
- "matches",
- "unicode-bidi",
- "unicode-normalization",
-]
+checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
-name = "include_dir"
-version = "0.6.0"
+name = "foreign-types"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23d58bdeb22b1c4691106c084b1063781904c35d0f22eda2a283598968eac61a"
+checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
dependencies = [
- "glob",
- "include_dir_impl",
- "proc-macro-hack",
+ "foreign-types-shared",
]
[[package]]
-name = "include_dir_impl"
-version = "0.6.0"
+name = "foreign-types-shared"
+version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "327869970574819d24d1dca25c891856144d29159ab797fa9dc725c5c3f57215"
-dependencies = [
- "anyhow",
- "proc-macro-hack",
- "proc-macro2 1.0.24",
- "quote 1.0.7",
- "syn 1.0.53",
-]
+checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
[[package]]
-name = "indexmap"
-version = "1.6.0"
+name = "form_urlencoded"
+version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2"
+checksum = "ece68d15c92e84fa4f19d3780f1294e5ca82a78a6d515f1efaabcc144688be00"
dependencies = [
- "autocfg 1.0.1",
- "hashbrown",
+ "matches",
+ "percent-encoding",
]
[[package]]
-name = "indoc"
-version = "1.0.3"
+name = "fs2"
+version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5a75aeaaef0ce18b58056d306c27b07436fbb34b8816c53094b76dd81803136"
+checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213"
dependencies = [
- "unindent",
+ "libc",
+ "winapi 0.3.9",
]
[[package]]
-name = "input_buffer"
-version = "0.3.1"
+name = "fs_extra"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "19a8a95243d5a0398cae618ec29477c6e3cb631152be5c19481f80bc71559754"
-dependencies = [
- "bytes",
-]
+checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394"
[[package]]
-name = "instant"
-version = "0.1.8"
+name = "fuchsia-cprng"
+version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cb1fc4429a33e1f80d41dc9fea4d108a88bec1de8053878898ae448a0b52f613"
-dependencies = [
- "cfg-if 1.0.0",
-]
-
-[[package]]
-name = "invalid-mutations"
-version = "0.1.0"
-dependencies = [
- "libra-proptest-helpers",
- "libra-types",
- "libra-workspace-hack",
- "proptest",
- "vm",
-]
+checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
[[package]]
-name = "iovec"
-version = "0.1.4"
+name = "fuchsia-zircon"
+version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e"
+checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
dependencies = [
- "libc",
+ "bitflags",
+ "fuchsia-zircon-sys",
]
[[package]]
-name = "ipnet"
-version = "2.3.0"
+name = "fuchsia-zircon-sys"
+version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135"
+checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
[[package]]
-name = "ir-testsuite"
+name = "functional-tests"
version = "0.1.0"
dependencies = [
+ "aho-corasick",
"anyhow",
"bytecode-verifier",
"compiled-stdlib",
"datatest-stable",
- "functional-tests",
- "ir-to-bytecode",
- "libra-types",
- "libra-workspace-hack",
- "move-ir-types",
- "vm",
-]
-
-[[package]]
-name = "ir-to-bytecode"
-version = "0.1.0"
-dependencies = [
- "anyhow",
- "bytecode-source-map",
- "codespan",
- "codespan-reporting",
- "ir-to-bytecode-syntax",
- "libra-types",
- "libra-workspace-hack",
- "log",
+ "diem-config",
+ "diem-crypto",
+ "diem-state-view",
+ "diem-types",
+ "diem-vm",
+ "diem-workspace-hack",
+ "difference",
+ "hex",
+ "itertools 0.9.0",
+ "language-e2e-tests",
+ "mirai-annotations",
"move-core-types",
- "move-ir-types",
+ "once_cell",
+ "regex",
+ "term_size",
+ "termcolor",
"thiserror",
"vm",
+ "vm-genesis",
]
[[package]]
-name = "ir-to-bytecode-syntax"
-version = "0.1.0"
-dependencies = [
- "anyhow",
- "codespan",
- "hex",
- "libra-types",
- "libra-workspace-hack",
- "move-core-types",
- "move-ir-types",
-]
+name = "funty"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ba62103ce691c2fd80fbae2213dfdda9ce60804973ac6b6e97de818ea7f52c8"
[[package]]
-name = "itertools"
-version = "0.7.11"
+name = "futures"
+version = "0.1.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0d47946d458e94a1b7bcabbf6521ea7c037062c81f534615abcad76e84d4970d"
-dependencies = [
- "either",
-]
+checksum = "4c7e4c2612746b0df8fed4ce0c69156021b704c9aefa360311c04e6e9e002eed"
[[package]]
-name = "itertools"
-version = "0.8.2"
+name = "futures"
+version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484"
+checksum = "9b3b0c040a1fe6529d30b3c5944b280c7f0dcb2930d2c3062bca967b602583d0"
dependencies = [
- "either",
+ "futures-channel",
+ "futures-core",
+ "futures-executor",
+ "futures-io",
+ "futures-sink",
+ "futures-task",
+ "futures-util",
]
[[package]]
-name = "itertools"
-version = "0.9.0"
+name = "futures-channel"
+version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b"
+checksum = "4b7109687aa4e177ef6fe84553af6280ef2778bdb7783ba44c9dc3399110fe64"
dependencies = [
- "either",
+ "futures-core",
+ "futures-sink",
]
[[package]]
-name = "itoa"
-version = "0.4.6"
+name = "futures-core"
+version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6"
+checksum = "847ce131b72ffb13b6109a221da9ad97a64cbe48feb1028356b836b47b8f1748"
[[package]]
-name = "jemalloc-sys"
-version = "0.3.2"
+name = "futures-executor"
+version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0d3b9f3f5c9b31aa0f5ed3260385ac205db665baa41d49bb8338008ae94ede45"
+checksum = "4caa2b2b68b880003057c1dd49f1ed937e38f22fcf6c212188a121f08cf40a65"
dependencies = [
- "cc",
- "fs_extra",
- "libc",
+ "futures-core",
+ "futures-task",
+ "futures-util",
]
[[package]]
-name = "jemallocator"
-version = "0.3.2"
+name = "futures-io"
+version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43ae63fcfc45e99ab3d1b29a46782ad679e98436c3169d15a167a1108a724b69"
-dependencies = [
- "jemalloc-sys",
- "libc",
-]
+checksum = "611834ce18aaa1bd13c4b374f5d653e1027cf99b6b502584ff8c9a64413b30bb"
[[package]]
-name = "jobserver"
-version = "0.1.21"
+name = "futures-macro"
+version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2"
+checksum = "77408a692f1f97bcc61dc001d752e00643408fbc922e4d634c655df50d595556"
dependencies = [
- "libc",
+ "proc-macro-hack",
+ "proc-macro2 1.0.24",
+ "quote 1.0.7",
+ "syn 1.0.53",
]
[[package]]
-name = "js-sys"
-version = "0.3.46"
+name = "futures-sink"
+version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf3d7383929f7c9c7c2d0fa596f325832df98c3704f2c60553080f7127a58175"
-dependencies = [
- "wasm-bindgen",
-]
+checksum = "f878195a49cee50e006b02b93cf7e0a95a38ac7b776b4c4d9cc1207cd20fcb3d"
[[package]]
-name = "k8s-openapi"
-version = "0.9.0"
+name = "futures-task"
+version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "57f95fd36c08ce592e67400a0f1a66f432196997d5a7e9a97e8743c33d8a9312"
+checksum = "7c554eb5bf48b2426c4771ab68c6b14468b6e76cc90996f528c3338d761a4d0d"
dependencies = [
- "base64 0.12.3",
- "bytes",
- "chrono",
- "serde",
- "serde-value",
- "serde_json",
+ "once_cell",
]
[[package]]
-name = "keccak"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7"
-
-[[package]]
-name = "kernel32-sys"
-version = "0.2.2"
+name = "futures-util"
+version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
+checksum = "d304cff4a7b99cfb7986f7d43fbe93d175e72e704a8860787cc95e9ffd85cbd2"
dependencies = [
- "winapi 0.2.8",
- "winapi-build",
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-macro",
+ "futures-sink",
+ "futures-task",
+ "memchr",
+ "pin-project 1.0.2",
+ "pin-utils",
+ "proc-macro-hack",
+ "proc-macro-nested",
+ "slab",
]
[[package]]
-name = "kube"
-version = "0.42.0"
+name = "gcc"
+version = "0.3.55"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f4f52dbe2c0e7ca54e43f1bc7b77b916750e63d7694e5a18c09b11307acc6b9d"
-dependencies = [
- "Inflector",
- "base64 0.12.3",
- "bytes",
- "chrono",
- "dirs 3.0.1",
- "either",
- "futures 0.3.8",
- "futures-util",
- "http",
- "k8s-openapi",
- "log",
- "openssl",
- "pem",
- "reqwest",
- "serde",
- "serde_json",
- "serde_yaml",
- "static_assertions",
- "thiserror",
- "time 0.2.22",
- "tokio",
- "url",
-]
+checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2"
[[package]]
-name = "language-benchmarks"
+name = "generate-format"
version = "0.1.0"
dependencies = [
- "anyhow",
- "bytecode-verifier",
- "criterion",
- "language-e2e-tests",
- "libra-proptest-helpers",
- "libra-state-view",
- "libra-types",
- "libra-vm",
- "libra-workspace-hack",
+ "consensus",
+ "consensus-types",
+ "diem-config",
+ "diem-crypto",
+ "diem-crypto-derive",
+ "diem-network-address",
+ "diem-types",
+ "diem-workspace-hack",
+ "libra-canonical-serialization",
"move-core-types",
- "move-lang",
- "move-vm-runtime",
- "move-vm-types",
- "proptest",
- "vm",
+ "network",
+ "rand 0.7.3",
+ "serde",
+ "serde-reflection",
+ "serde_yaml",
+ "structopt 0.3.21",
]
[[package]]
-name = "language-e2e-tests"
+name = "generate-key"
version = "0.1.0"
dependencies = [
- "anyhow",
- "compiled-stdlib",
- "compiler",
- "goldenfile",
- "hex",
+ "diem-crypto",
+ "diem-temppath",
+ "diem-workspace-hack",
"libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-proptest-helpers",
- "libra-state-view",
- "libra-types",
- "libra-vm",
- "libra-workspace-hack",
- "move-core-types",
- "move-vm-runtime",
- "move-vm-types",
- "once_cell",
- "proptest",
- "proptest-derive",
"rand 0.7.3",
- "vm",
- "vm-genesis",
]
[[package]]
-name = "language-e2e-testsuite"
+name = "generic-array"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec"
+dependencies = [
+ "typenum",
+]
+
+[[package]]
+name = "generic-array"
+version = "0.14.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817"
+dependencies = [
+ "typenum",
+ "version_check",
+]
+
+[[package]]
+name = "genesis-viewer"
version = "0.1.0"
dependencies = [
- "bytecode-verifier",
"compiled-stdlib",
- "compiler",
- "language-e2e-tests",
+ "diem-types",
+ "diem-workspace-hack",
"libra-canonical-serialization",
- "libra-crypto",
- "libra-logger",
- "libra-types",
- "libra-vm",
- "libra-workspace-hack",
- "libra-writeset-generator",
- "move-core-types",
- "move-vm-runtime",
- "move-vm-types",
- "proptest",
- "serde_json",
- "transaction-builder",
- "transaction-builder-generated",
+ "resource-viewer",
+ "structopt 0.3.21",
"vm",
+ "vm-genesis",
]
[[package]]
-name = "lazy_static"
-version = "1.4.0"
+name = "get_if_addrs"
+version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+checksum = "abddb55a898d32925f3148bd281174a68eeb68bbfd9a5938a57b18f506ee4ef7"
+dependencies = [
+ "c_linked_list",
+ "get_if_addrs-sys",
+ "libc",
+ "winapi 0.2.8",
+]
[[package]]
-name = "lazycell"
-version = "1.3.0"
+name = "get_if_addrs-sys"
+version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
+checksum = "0d04f9fb746cf36b191c00f3ede8bde9c8e64f9f4b05ae2694a9ccf5e3f5ab48"
+dependencies = [
+ "gcc",
+ "libc",
+]
[[package]]
-name = "libc"
-version = "0.2.80"
+name = "getrandom"
+version = "0.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614"
+checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6"
+dependencies = [
+ "cfg-if 0.1.10",
+ "libc",
+ "wasi 0.9.0+wasi-snapshot-preview1",
+]
[[package]]
-name = "libfuzzer-sys"
-version = "0.3.2"
+name = "getrandom"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d718794b8e23533b9069bd2c4597d69e41cc7ab1c02700a502971aca0cdcf24"
+checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4"
dependencies = [
- "arbitrary",
- "cc",
+ "cfg-if 0.1.10",
+ "libc",
+ "wasi 0.9.0+wasi-snapshot-preview1",
]
[[package]]
-name = "libloading"
-version = "0.5.2"
+name = "ghash"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753"
+checksum = "d6e27f0689a6e15944bdce7e45425efb87eaa8ab0c6e87f11d0987a9133e2531"
dependencies = [
- "cc",
- "winapi 0.3.9",
+ "polyval",
]
[[package]]
-name = "libra-bitvec"
-version = "0.1.0"
-dependencies = [
- "libra-canonical-serialization",
- "libra-proptest-helpers",
- "libra-workspace-hack",
- "proptest",
- "proptest-derive",
- "serde",
- "serde_bytes",
-]
+name = "gimli"
+version = "0.23.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce"
[[package]]
-name = "libra-canonical-serialization"
-version = "0.1.0"
+name = "glob"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d8dddda30939e963210412740c920779b3b57d0b8ab58d94d562cc433d621f1"
+checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
+
+[[package]]
+name = "globset"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c152169ef1e421390738366d2f796655fec62621dabbd0fd476f905934061e4a"
dependencies = [
- "serde",
- "thiserror",
+ "aho-corasick",
+ "bstr",
+ "fnv",
+ "log",
+ "regex",
]
[[package]]
-name = "libra-config"
-version = "0.1.0"
+name = "goldenfile"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f46e6a4d70c06f0b9a70d36dd8eef4fdeaa1ab657e4f1eaff290f69e48145f2"
dependencies = [
- "get_if_addrs",
- "libra-canonical-serialization",
- "libra-crypto",
- "libra-crypto-derive",
- "libra-global-constants",
- "libra-logger",
- "libra-network-address",
- "libra-network-address-encryption",
- "libra-secure-storage",
- "libra-temppath",
- "libra-types",
- "libra-workspace-hack",
- "log",
- "mirai-annotations",
- "rand 0.7.3",
- "serde",
- "serde_yaml",
- "thiserror",
+ "difference",
+ "tempfile",
]
[[package]]
-name = "libra-crypto"
-version = "0.1.0"
+name = "guppy"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0658e39db7498a195f3f68c3ecf0ed2bce7f35c580c2ee9dd2c2dc4bbe1e7c4"
dependencies = [
- "aes-gcm",
- "anyhow",
- "bitvec",
- "byteorder",
- "bytes",
- "criterion",
- "curve25519-dalek 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "curve25519-dalek 3.0.0 (git+https://github.com/novifinancial/curve25519-dalek.git?branch=fiat3)",
- "digest 0.9.0",
- "ed25519-dalek 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "ed25519-dalek 1.0.1 (git+https://github.com/novifinancial/ed25519-dalek.git?branch=fiat5)",
- "hex",
- "hkdf",
- "libra-canonical-serialization",
- "libra-crypto-derive",
- "libra-nibble",
- "libra-workspace-hack",
- "mirai-annotations",
+ "cargo_metadata",
+ "fixedbitset",
+ "guppy-summaries",
+ "indexmap",
+ "itertools 0.9.0",
+ "nested",
"once_cell",
- "proptest",
- "proptest-derive",
- "rand 0.7.3",
- "rand_core 0.5.1",
- "ripemd160",
+ "pathdiff",
+ "petgraph",
+ "rayon",
+ "semver 0.11.0",
"serde",
- "serde-name",
- "serde_bytes",
"serde_json",
- "sha2",
- "sha3",
- "short-hex-str",
- "static_assertions",
- "thiserror",
- "tiny-keccak",
- "trybuild",
- "x25519-dalek 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "x25519-dalek 1.1.0 (git+https://github.com/novifinancial/x25519-dalek.git?branch=fiat4)",
+ "supercow",
+ "target-spec",
]
[[package]]
-name = "libra-crypto-derive"
-version = "0.1.0"
+name = "guppy-summaries"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4db8242f1f19bfdbb0226cc425bca27cc5f1e029cde7d3145924fe71184dff9f"
dependencies = [
- "anyhow",
- "libra-workspace-hack",
- "proc-macro2 1.0.24",
- "quote 1.0.7",
- "syn 1.0.53",
+ "diffus",
+ "semver 0.11.0",
+ "serde",
+ "toml",
]
[[package]]
-name = "libra-dev"
-version = "0.1.0"
+name = "h2"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535"
dependencies = [
- "bindgen",
- "libc",
- "libra-canonical-serialization",
- "libra-crypto",
- "libra-types",
- "libra-workspace-hack",
- "move-core-types",
- "rand 0.7.3",
- "static_assertions",
- "transaction-builder",
+ "bytes",
+ "fnv",
+ "futures-core",
+ "futures-sink",
+ "futures-util",
+ "http",
+ "indexmap",
+ "slab",
+ "tokio",
+ "tokio-util",
+ "tracing",
+ "tracing-futures",
]
[[package]]
-name = "libra-documentation-tool"
-version = "0.1.0"
+name = "half"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d36fab90f82edc3c747f9d438e06cf0a491055896f2a279638bb5beed6c40177"
+
+[[package]]
+name = "handlebars"
+version = "3.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2764f9796c0ddca4b82c07f25dd2cb3db30b9a8f47940e78e1c883d9e95c3db9"
dependencies = [
- "anyhow",
- "libra-workspace-hack",
- "once_cell",
- "regex",
+ "log",
+ "pest",
+ "pest_derive",
+ "quick-error 2.0.0",
"serde",
- "serde-generate",
- "serde-reflection",
- "serde_yaml",
- "structopt 0.3.21",
- "tempfile",
+ "serde_json",
]
[[package]]
-name = "libra-events-fetcher"
-version = "0.1.0"
+name = "hashbrown"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04"
+
+[[package]]
+name = "headers"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed18eb2459bf1a09ad2d6b1547840c3e5e62882fa09b9a6a20b1de8e3228848f"
dependencies = [
- "anyhow",
- "futures 0.3.8",
- "hex",
- "libra-canonical-serialization",
- "libra-json-rpc-client",
- "libra-types",
- "libra-workspace-hack",
- "reqwest",
- "structopt 0.3.21",
- "tokio",
+ "base64 0.12.3",
+ "bitflags",
+ "bytes",
+ "headers-core",
+ "http",
+ "mime",
+ "sha-1 0.8.2",
+ "time 0.1.44",
]
[[package]]
-name = "libra-faucet"
-version = "0.1.0"
+name = "headers-core"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429"
dependencies = [
- "anyhow",
- "generate-key",
- "hex",
- "libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-infallible",
- "libra-json-rpc-client",
- "libra-logger",
- "libra-types",
- "libra-workspace-hack",
- "move-core-types",
- "reqwest",
- "serde",
- "serde_derive",
- "serde_json",
- "structopt 0.3.21",
- "tempfile",
- "tokio",
- "transaction-builder-generated",
- "warp",
+ "http",
]
[[package]]
-name = "libra-fuzz"
-version = "0.1.0"
+name = "heck"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
dependencies = [
- "libfuzzer-sys",
- "libra-fuzzer",
- "libra-workspace-hack",
- "once_cell",
+ "unicode-segmentation",
]
[[package]]
-name = "libra-fuzzer"
-version = "0.1.0"
+name = "hermit-abi"
+version = "0.1.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8"
dependencies = [
- "accumulator",
- "anyhow",
- "byteorder",
- "consensus",
- "consensus-types",
- "datatest-stable",
- "executor",
- "executor-types",
- "hex",
- "language-e2e-tests",
- "libra-canonical-serialization",
- "libra-crypto",
- "libra-jellyfish-merkle",
- "libra-json-rpc",
- "libra-mempool",
- "libra-proptest-helpers",
- "libra-secure-json-rpc",
- "libra-types",
- "libra-vault-client",
- "libra-workspace-hack",
- "libradb",
- "move-core-types",
- "move-vm-types",
- "network",
- "once_cell",
- "proptest",
- "proptest-derive",
- "rand 0.7.3",
- "rusty-fork",
- "safety-rules",
- "serde_json",
- "sha-1 0.9.2",
- "state-synchronizer",
- "stats_alloc",
- "storage-interface",
- "structopt 0.3.21",
- "ureq",
- "vm",
+ "libc",
]
[[package]]
-name = "libra-genesis-tool"
-version = "0.1.0"
+name = "hex"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35"
+
+[[package]]
+name = "hkdf"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51ab2f639c231793c5f6114bdb9bbe50a7dbbfcd7c7c6bd8475dec2d991e964f"
dependencies = [
- "anyhow",
- "consensus-types",
- "executor",
- "generate-key",
- "libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-global-constants",
- "libra-management",
- "libra-network-address",
- "libra-network-address-encryption",
- "libra-secure-storage",
- "libra-secure-time",
- "libra-temppath",
- "libra-types",
- "libra-vm",
- "libra-workspace-hack",
- "libradb",
- "rand 0.7.3",
- "serde",
- "storage-interface",
- "structopt 0.3.21",
- "thiserror",
- "toml",
- "transaction-builder",
- "vm-genesis",
+ "digest 0.9.0",
+ "hmac 0.10.1",
]
[[package]]
-name = "libra-github-client"
-version = "0.1.0"
+name = "hmac"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840"
dependencies = [
- "base64 0.13.0",
- "libra-workspace-hack",
- "serde",
- "serde_json",
- "thiserror",
- "ureq",
+ "crypto-mac 0.8.0",
+ "digest 0.9.0",
]
[[package]]
-name = "libra-global-constants"
-version = "0.1.0"
+name = "hmac"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15"
+dependencies = [
+ "crypto-mac 0.10.0",
+ "digest 0.9.0",
+]
[[package]]
-name = "libra-infallible"
-version = "0.1.0"
+name = "hostname"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867"
dependencies = [
- "libra-workspace-hack",
+ "libc",
+ "match_cfg",
+ "winapi 0.3.9",
]
[[package]]
-name = "libra-jellyfish-merkle"
-version = "0.1.0"
+name = "http"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9"
dependencies = [
- "anyhow",
- "byteorder",
- "libra-canonical-serialization",
- "libra-crypto",
- "libra-crypto-derive",
- "libra-infallible",
- "libra-nibble",
- "libra-types",
- "libra-workspace-hack",
- "mirai-annotations",
- "num-derive",
- "num-traits",
- "proptest",
- "proptest-derive",
- "rand 0.7.3",
- "serde",
- "thiserror",
+ "bytes",
+ "fnv",
+ "itoa",
]
[[package]]
-name = "libra-json-rpc"
-version = "0.1.0"
+name = "http-body"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b"
dependencies = [
- "anyhow",
- "compiled-stdlib",
- "executor",
- "executor-types",
- "fail",
- "futures 0.3.8",
- "generate-key",
- "hex",
- "hyper",
- "libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-genesis-tool",
- "libra-json-rpc-client",
- "libra-json-rpc-types",
- "libra-logger",
- "libra-mempool",
- "libra-metrics",
- "libra-node",
- "libra-proptest-helpers",
- "libra-temppath",
- "libra-trace",
- "libra-types",
- "libra-workspace-hack",
- "libradb",
- "move-core-types",
- "move-vm-types",
- "network",
- "once_cell",
- "proptest",
- "rand 0.7.3",
- "reqwest",
- "scratchpad",
- "serde",
- "serde_json",
- "storage-interface",
+ "bytes",
+ "http",
+]
+
+[[package]]
+name = "httparse"
+version = "1.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9"
+
+[[package]]
+name = "httpdate"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47"
+
+[[package]]
+name = "humantime"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
+dependencies = [
+ "quick-error 1.2.3",
+]
+
+[[package]]
+name = "humantime"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c1ad908cc71012b7bea4d0c53ba96a8cba9962f048fa68d143376143d863b7a"
+
+[[package]]
+name = "hyper"
+version = "0.13.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6ad767baac13b44d4529fcf58ba2cd0995e36e7b435bc5b039de6f47e880dbf"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-core",
+ "futures-util",
+ "h2",
+ "http",
+ "http-body",
+ "httparse",
+ "httpdate",
+ "itoa",
+ "pin-project 1.0.2",
+ "socket2",
"tokio",
- "transaction-builder-generated",
- "vm-genesis",
- "vm-validator",
- "warp",
+ "tower-service",
+ "tracing",
+ "want",
]
[[package]]
-name = "libra-json-rpc-client"
-version = "0.1.0"
+name = "hyper-tls"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d979acc56dcb5b8dddba3917601745e877576475aa046df3226eabdecef78eed"
dependencies = [
- "anyhow",
- "hex",
- "libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-json-rpc-types",
- "libra-types",
- "libra-workspace-hack",
- "reqwest",
- "serde",
- "serde_json",
+ "bytes",
+ "hyper",
+ "native-tls",
"tokio",
- "warp",
+ "tokio-tls",
]
[[package]]
-name = "libra-json-rpc-types"
-version = "0.1.0"
+name = "idna"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9"
dependencies = [
- "anyhow",
- "compiled-stdlib",
- "hex",
- "libra-canonical-serialization",
- "libra-crypto",
- "libra-types",
- "libra-workspace-hack",
- "move-core-types",
- "move-explain",
- "prost",
- "prost-build",
- "serde",
- "serde_json",
+ "matches",
+ "unicode-bidi",
+ "unicode-normalization",
]
[[package]]
-name = "libra-key-manager"
-version = "0.1.0"
+name = "include_dir"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "23d58bdeb22b1c4691106c084b1063781904c35d0f22eda2a283598968eac61a"
dependencies = [
- "anyhow",
- "executor",
- "executor-test-helpers",
- "executor-types",
- "futures 0.3.8",
- "libra-config",
- "libra-crypto",
- "libra-genesis-tool",
- "libra-global-constants",
- "libra-json-rpc",
- "libra-logger",
- "libra-network-address",
- "libra-secure-json-rpc",
- "libra-secure-push-metrics",
- "libra-secure-storage",
- "libra-secure-time",
- "libra-types",
- "libra-vm",
- "libra-workspace-hack",
- "libradb",
- "once_cell",
- "rand 0.7.3",
- "serde",
- "storage-interface",
- "thiserror",
- "tokio",
- "transaction-builder-generated",
- "vm-validator",
+ "glob",
+ "include_dir_impl",
+ "proc-macro-hack",
]
[[package]]
-name = "libra-log-derive"
-version = "0.1.0"
+name = "include_dir_impl"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "327869970574819d24d1dca25c891856144d29159ab797fa9dc725c5c3f57215"
dependencies = [
- "libra-workspace-hack",
+ "anyhow",
+ "proc-macro-hack",
"proc-macro2 1.0.24",
"quote 1.0.7",
"syn 1.0.53",
]
[[package]]
-name = "libra-logger"
-version = "0.1.0"
-dependencies = [
- "chrono",
- "erased-serde",
- "hostname",
- "libra-infallible",
- "libra-log-derive",
- "libra-workspace-hack",
- "once_cell",
- "prometheus",
- "serde",
- "serde_json",
-]
-
-[[package]]
-name = "libra-management"
-version = "0.1.0"
+name = "indexmap"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2"
dependencies = [
- "anyhow",
- "hex",
- "libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-global-constants",
- "libra-network-address",
- "libra-network-address-encryption",
- "libra-secure-storage",
- "libra-secure-time",
- "libra-temppath",
- "libra-types",
- "libra-workspace-hack",
- "serde",
- "serde_yaml",
- "structopt 0.3.21",
- "thiserror",
- "toml",
- "transaction-builder",
+ "autocfg 1.0.1",
+ "hashbrown",
]
[[package]]
-name = "libra-mempool"
-version = "0.1.0"
+name = "indoc"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5a75aeaaef0ce18b58056d306c27b07436fbb34b8816c53094b76dd81803136"
dependencies = [
- "anyhow",
- "bounded-executor",
- "channel",
- "fail",
- "futures 0.3.8",
- "itertools 0.9.0",
- "libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-infallible",
- "libra-logger",
- "libra-metrics",
- "libra-network-address",
- "libra-proptest-helpers",
- "libra-trace",
- "libra-types",
- "libra-workspace-hack",
- "mirai-annotations",
- "netcore",
- "network",
- "once_cell",
- "proptest",
- "rand 0.7.3",
- "rayon",
- "serde",
- "serde_json",
- "storage-interface",
- "storage-service",
- "subscription-service",
- "tokio",
- "vm-validator",
+ "unindent",
]
[[package]]
-name = "libra-metrics"
-version = "0.1.0"
+name = "input_buffer"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19a8a95243d5a0398cae618ec29477c6e3cb631152be5c19481f80bc71559754"
dependencies = [
- "anyhow",
- "assert_approx_eq",
- "futures 0.3.8",
- "hyper",
- "libra-logger",
- "libra-metrics-core",
- "libra-workspace-hack",
- "once_cell",
- "prometheus",
- "rusty-fork",
- "serde_json",
- "tokio",
+ "bytes",
]
[[package]]
-name = "libra-metrics-core"
-version = "0.1.0"
+name = "instant"
+version = "0.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb1fc4429a33e1f80d41dc9fea4d108a88bec1de8053878898ae448a0b52f613"
dependencies = [
- "libra-workspace-hack",
- "prometheus",
+ "cfg-if 1.0.0",
]
[[package]]
-name = "libra-network-address"
+name = "invalid-mutations"
version = "0.1.0"
dependencies = [
- "aes-gcm",
- "anyhow",
- "libra-canonical-serialization",
- "libra-crypto",
- "libra-workspace-hack",
- "move-core-types",
+ "diem-proptest-helpers",
+ "diem-types",
+ "diem-workspace-hack",
"proptest",
- "proptest-derive",
- "serde",
- "serde_bytes",
- "static_assertions",
- "thiserror",
+ "vm",
]
[[package]]
-name = "libra-network-address-encryption"
-version = "0.1.0"
+name = "iovec"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e"
dependencies = [
- "base64 0.13.0",
- "libra-canonical-serialization",
- "libra-global-constants",
- "libra-infallible",
- "libra-logger",
- "libra-network-address",
- "libra-secure-storage",
- "libra-workspace-hack",
- "move-core-types",
- "rand 0.7.3",
- "serde",
- "thiserror",
+ "libc",
]
[[package]]
-name = "libra-nibble"
-version = "0.1.0"
-dependencies = [
- "libra-workspace-hack",
- "proptest",
- "serde",
-]
+name = "ipnet"
+version = "2.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135"
[[package]]
-name = "libra-node"
+name = "ir-testsuite"
version = "0.1.0"
dependencies = [
- "backup-service",
- "consensus",
- "crash-handler",
- "debug-interface",
- "executor",
- "executor-types",
- "fail",
- "futures 0.3.8",
- "jemallocator",
- "libra-config",
- "libra-crypto",
- "libra-genesis-tool",
- "libra-json-rpc",
- "libra-logger",
- "libra-mempool",
- "libra-metrics",
- "libra-secure-storage",
- "libra-temppath",
- "libra-trace",
- "libra-types",
- "libra-vm",
- "libra-workspace-hack",
- "libradb",
- "network-builder",
- "state-synchronizer",
- "storage-client",
- "storage-interface",
- "storage-service",
- "structopt 0.3.21",
- "subscription-service",
- "tokio",
+ "anyhow",
+ "bytecode-verifier",
+ "compiled-stdlib",
+ "datatest-stable",
+ "diem-types",
+ "diem-workspace-hack",
+ "functional-tests",
+ "ir-to-bytecode",
+ "move-ir-types",
+ "vm",
]
[[package]]
-name = "libra-operational-tool"
+name = "ir-to-bytecode"
version = "0.1.0"
dependencies = [
"anyhow",
- "hex",
- "libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-global-constants",
- "libra-management",
- "libra-network-address",
- "libra-network-address-encryption",
- "libra-secure-json-rpc",
- "libra-secure-storage",
- "libra-secure-time",
- "libra-temppath",
- "libra-types",
- "libra-workspace-hack",
- "serde",
- "serde_json",
- "structopt 0.3.21",
+ "bytecode-source-map",
+ "codespan",
+ "codespan-reporting",
+ "diem-types",
+ "diem-workspace-hack",
+ "ir-to-bytecode-syntax",
+ "log",
+ "move-core-types",
+ "move-ir-types",
"thiserror",
- "toml",
- "transaction-builder",
+ "vm",
]
[[package]]
-name = "libra-proptest-helpers"
+name = "ir-to-bytecode-syntax"
version = "0.1.0"
dependencies = [
- "crossbeam",
- "libra-workspace-hack",
- "proptest",
- "proptest-derive",
+ "anyhow",
+ "codespan",
+ "diem-types",
+ "diem-workspace-hack",
+ "hex",
+ "move-core-types",
+ "move-ir-types",
]
[[package]]
-name = "libra-retrier"
-version = "0.1.0"
+name = "itertools"
+version = "0.7.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d47946d458e94a1b7bcabbf6521ea7c037062c81f534615abcad76e84d4970d"
dependencies = [
- "libra-logger",
- "libra-workspace-hack",
- "tokio",
+ "either",
]
[[package]]
-name = "libra-secure-json-rpc"
-version = "0.1.0"
+name = "itertools"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484"
dependencies = [
- "anyhow",
- "futures 0.3.8",
- "hex",
- "libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-json-rpc",
- "libra-proptest-helpers",
- "libra-temppath",
- "libra-types",
- "libra-workspace-hack",
- "libradb",
- "proptest",
- "serde",
- "serde_json",
- "storage-interface",
- "thiserror",
- "tokio",
- "ureq",
- "vm-validator",
+ "either",
]
[[package]]
-name = "libra-secure-net"
-version = "0.1.0"
-dependencies = [
- "libra-config",
- "libra-logger",
- "libra-secure-push-metrics",
- "libra-workspace-hack",
- "once_cell",
- "serde",
- "thiserror",
+name = "itertools"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b"
+dependencies = [
+ "either",
]
[[package]]
-name = "libra-secure-push-metrics"
-version = "0.1.0"
-dependencies = [
- "libra-logger",
- "libra-metrics-core",
- "libra-workspace-hack",
- "ureq",
-]
+name = "itoa"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6"
[[package]]
-name = "libra-secure-storage"
-version = "0.1.0"
+name = "jemalloc-sys"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d3b9f3f5c9b31aa0f5ed3260385ac205db665baa41d49bb8338008ae94ede45"
dependencies = [
- "base64 0.13.0",
- "chrono",
- "enum_dispatch",
- "libra-canonical-serialization",
- "libra-crypto",
- "libra-crypto-derive",
- "libra-github-client",
- "libra-infallible",
- "libra-logger",
- "libra-secure-time",
- "libra-temppath",
- "libra-vault-client",
- "libra-workspace-hack",
- "rand 0.7.3",
- "serde",
- "serde_json",
- "thiserror",
+ "cc",
+ "fs_extra",
+ "libc",
]
[[package]]
-name = "libra-secure-time"
-version = "0.1.0"
+name = "jemallocator"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "43ae63fcfc45e99ab3d1b29a46782ad679e98436c3169d15a167a1108a724b69"
dependencies = [
- "libra-infallible",
- "libra-workspace-hack",
+ "jemalloc-sys",
+ "libc",
]
[[package]]
-name = "libra-smoke-test-attribute"
-version = "0.1.0"
+name = "jobserver"
+version = "0.1.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2"
dependencies = [
- "libra-workspace-hack",
- "proc-macro2 1.0.24",
- "quote 1.0.7",
+ "libc",
]
[[package]]
-name = "libra-state-view"
-version = "0.1.0"
+name = "js-sys"
+version = "0.3.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca059e81d9486668f12d455a4ea6daa600bd408134cd17e3d3fb5a32d1f016f8"
dependencies = [
- "anyhow",
- "libra-crypto",
- "libra-types",
- "libra-workspace-hack",
+ "wasm-bindgen",
]
[[package]]
-name = "libra-storage-inspector"
-version = "0.1.0"
+name = "k8s-openapi"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "57f95fd36c08ce592e67400a0f1a66f432196997d5a7e9a97e8743c33d8a9312"
dependencies = [
- "anyhow",
- "libra-config",
- "libra-crypto",
- "libra-logger",
- "libra-types",
- "libra-workspace-hack",
- "libradb",
- "storage-interface",
- "structopt 0.3.21",
- "tempfile",
- "transaction-builder",
+ "base64 0.12.3",
+ "bytes",
+ "chrono",
+ "serde",
+ "serde-value",
+ "serde_json",
]
[[package]]
-name = "libra-swarm"
+name = "keccak"
version = "0.1.0"
-dependencies = [
- "anyhow",
- "ctrlc",
- "debug-interface",
- "libra-config",
- "libra-genesis-tool",
- "libra-logger",
- "libra-temppath",
- "libra-types",
- "libra-workspace-hack",
- "reqwest",
- "structopt 0.3.21",
- "thiserror",
-]
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7"
[[package]]
-name = "libra-temppath"
-version = "0.1.0"
+name = "kernel32-sys"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
dependencies = [
- "hex",
- "libra-workspace-hack",
- "rand 0.7.3",
+ "winapi 0.2.8",
+ "winapi-build",
]
[[package]]
-name = "libra-trace"
-version = "0.1.0"
+name = "kube"
+version = "0.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f4f52dbe2c0e7ca54e43f1bc7b77b916750e63d7694e5a18c09b11307acc6b9d"
dependencies = [
- "anyhow",
+ "Inflector",
+ "base64 0.12.3",
+ "bytes",
"chrono",
- "libra-logger",
- "libra-metrics",
- "libra-workspace-hack",
- "once_cell",
+ "dirs 3.0.1",
+ "either",
+ "futures 0.3.8",
+ "futures-util",
+ "http",
+ "k8s-openapi",
+ "log",
+ "openssl",
+ "pem",
"reqwest",
"serde",
"serde_json",
- "structopt 0.3.21",
+ "serde_yaml",
+ "static_assertions",
+ "thiserror",
+ "time 0.2.22",
"tokio",
+ "url",
]
[[package]]
-name = "libra-transaction-replay"
+name = "language-benchmarks"
version = "0.1.0"
dependencies = [
"anyhow",
- "compiled-stdlib",
- "difference",
- "libra-canonical-serialization",
- "libra-state-view",
- "libra-types",
- "libra-validator-interface",
- "libra-vm",
- "libra-workspace-hack",
- "libradb",
+ "bytecode-verifier",
+ "criterion",
+ "diem-proptest-helpers",
+ "diem-state-view",
+ "diem-types",
+ "diem-vm",
+ "diem-workspace-hack",
+ "language-e2e-tests",
"move-core-types",
"move-lang",
"move-vm-runtime",
- "move-vm-test-utils",
"move-vm-types",
- "resource-viewer",
- "stdlib",
- "structopt 0.3.21",
+ "proptest",
"vm",
- "vm-genesis",
]
[[package]]
-name = "libra-types"
+name = "language-e2e-tests"
version = "0.1.0"
dependencies = [
"anyhow",
- "bytes",
- "chrono",
+ "compiled-stdlib",
+ "compiler",
+ "diem-config",
+ "diem-crypto",
+ "diem-proptest-helpers",
+ "diem-state-view",
+ "diem-types",
+ "diem-vm",
+ "diem-workspace-hack",
+ "goldenfile",
"hex",
- "itertools 0.9.0",
"libra-canonical-serialization",
- "libra-crypto",
- "libra-crypto-derive",
- "libra-infallible",
- "libra-network-address",
- "libra-proptest-helpers",
- "libra-workspace-hack",
- "mirai-annotations",
"move-core-types",
+ "move-vm-runtime",
+ "move-vm-types",
"once_cell",
"proptest",
"proptest-derive",
"rand 0.7.3",
- "regex",
- "serde",
- "serde_bytes",
- "serde_json",
- "thiserror",
- "tiny-keccak",
-]
-
-[[package]]
-name = "libra-validator-interface"
-version = "0.1.0"
-dependencies = [
- "anyhow",
- "libra-canonical-serialization",
- "libra-config",
- "libra-json-rpc-client",
- "libra-state-view",
- "libra-types",
- "libra-workspace-hack",
- "libradb",
- "reqwest",
- "scratchpad",
- "storage-interface",
-]
-
-[[package]]
-name = "libra-vault-client"
-version = "0.1.0"
-dependencies = [
- "base64 0.13.0",
- "chrono",
- "libra-crypto",
- "libra-proptest-helpers",
- "libra-types",
- "libra-workspace-hack",
- "native-tls",
- "once_cell",
- "proptest",
- "serde",
- "serde_json",
- "thiserror",
- "ureq",
+ "vm",
+ "vm-genesis",
]
[[package]]
-name = "libra-vm"
+name = "language-e2e-testsuite"
version = "0.1.0"
dependencies = [
- "anyhow",
- "fail",
+ "bytecode-verifier",
+ "compiled-stdlib",
+ "compiler",
+ "diem-crypto",
+ "diem-logger",
+ "diem-types",
+ "diem-vm",
+ "diem-workspace-hack",
+ "diem-writeset-generator",
+ "language-e2e-tests",
"libra-canonical-serialization",
- "libra-crypto",
- "libra-logger",
- "libra-metrics",
- "libra-state-view",
- "libra-trace",
- "libra-types",
- "libra-workspace-hack",
- "mirai-annotations",
"move-core-types",
"move-vm-runtime",
"move-vm-types",
- "once_cell",
"proptest",
- "rayon",
- "serde",
"serde_json",
+ "transaction-builder",
+ "transaction-builder-generated",
"vm",
]
[[package]]
-name = "libra-wallet"
-version = "0.1.0"
-dependencies = [
- "anyhow",
- "byteorder",
- "ed25519-dalek 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "ed25519-dalek 1.0.1 (git+https://github.com/novifinancial/ed25519-dalek.git?branch=fiat5)",
- "hex",
- "hmac 0.10.1",
- "libra-crypto",
- "libra-temppath",
- "libra-types",
- "libra-workspace-hack",
- "mirai-annotations",
- "pbkdf2",
- "rand 0.7.3",
- "serde",
- "sha2",
- "thiserror",
-]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
-name = "libra-workspace-hack"
-version = "0.1.0"
+name = "lazycell"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
+
+[[package]]
+name = "libc"
+version = "0.2.80"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614"
+
+[[package]]
+name = "libfuzzer-sys"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8d718794b8e23533b9069bd2c4597d69e41cc7ab1c02700a502971aca0cdcf24"
dependencies = [
- "bytes",
+ "arbitrary",
"cc",
- "log",
- "memchr",
- "num-traits",
- "petgraph",
- "serde",
- "sha-1 0.9.2",
- "subtle",
- "syn 1.0.53",
]
[[package]]
-name = "libra-writeset-generator"
-version = "0.1.0"
+name = "libloading"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753"
dependencies = [
- "anyhow",
- "handlebars",
- "libra-canonical-serialization",
- "libra-types",
- "libra-workspace-hack",
- "move-lang",
- "serde",
- "serde_json",
- "stdlib",
- "structopt 0.3.21",
- "tempfile",
+ "cc",
+ "winapi 0.3.9",
]
[[package]]
-name = "libradb"
+name = "libra-canonical-serialization"
version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7d8dddda30939e963210412740c920779b3b57d0b8ab58d94d562cc433d621f1"
dependencies = [
- "accumulator",
- "anyhow",
- "arc-swap",
- "byteorder",
- "itertools 0.9.0",
- "libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-infallible",
- "libra-jellyfish-merkle",
- "libra-logger",
- "libra-metrics",
- "libra-proptest-helpers",
- "libra-temppath",
- "libra-types",
- "libra-workspace-hack",
- "num-derive",
- "num-traits",
- "num-variants",
- "once_cell",
- "proptest",
- "proptest-derive",
- "rand 0.7.3",
- "schemadb",
"serde",
- "storage-interface",
"thiserror",
]
@@ -3771,10 +3771,10 @@ name = "librarian"
version = "0.1.0"
dependencies = [
"anyhow",
- "libra-crypto",
- "libra-types",
- "libra-workspace-hack",
- "libradb",
+ "diem-crypto",
+ "diem-types",
+ "diem-workspace-hack",
+ "diemdb",
"serde",
"serde_json",
"storage-interface",
@@ -3823,8 +3823,8 @@ name = "many-keys-stress-test"
version = "0.1.0"
dependencies = [
"channel",
+ "diem-workspace-hack",
"futures 0.3.8",
- "libra-workspace-hack",
"structopt 0.3.21",
]
@@ -3872,9 +3872,9 @@ name = "memsocket"
version = "0.1.0"
dependencies = [
"bytes",
+ "diem-infallible",
+ "diem-workspace-hack",
"futures 0.3.8",
- "libra-infallible",
- "libra-workspace-hack",
"once_cell",
]
@@ -3979,9 +3979,9 @@ name = "module-generation"
version = "0.1.0"
dependencies = [
"bytecode-verifier",
+ "diem-types",
+ "diem-workspace-hack",
"ir-to-bytecode",
- "libra-types",
- "libra-workspace-hack",
"move-core-types",
"move-ir-types",
"rand 0.7.3",
@@ -3995,15 +3995,15 @@ dependencies = [
"anyhow",
"compiled-stdlib",
"datatest-stable",
+ "diem-state-view",
+ "diem-types",
+ "diem-vm",
+ "diem-workspace-hack",
"difference",
"disassembler",
"errmapgen",
"include_dir",
"libra-canonical-serialization",
- "libra-state-view",
- "libra-types",
- "libra-vm",
- "libra-workspace-hack",
"move-core-types",
"move-coverage",
"move-lang",
@@ -4022,11 +4022,11 @@ name = "move-core-types"
version = "0.1.0"
dependencies = [
"anyhow",
+ "diem-crypto",
+ "diem-crypto-derive",
+ "diem-workspace-hack",
"hex",
"libra-canonical-serialization",
- "libra-crypto",
- "libra-crypto-derive",
- "libra-workspace-hack",
"mirai-annotations",
"once_cell",
"proptest",
@@ -4051,9 +4051,9 @@ dependencies = [
"bytecode-verifier",
"codespan",
"colored",
+ "diem-types",
+ "diem-workspace-hack",
"libra-canonical-serialization",
- "libra-types",
- "libra-workspace-hack",
"move-core-types",
"move-ir-types",
"once_cell",
@@ -4068,9 +4068,9 @@ name = "move-explain"
version = "0.1.0"
dependencies = [
"compiled-stdlib",
+ "diem-workspace-hack",
"errmapgen",
"libra-canonical-serialization",
- "libra-workspace-hack",
"move-core-types",
"structopt 0.3.21",
]
@@ -4081,9 +4081,9 @@ version = "0.1.0"
dependencies = [
"anyhow",
"codespan",
+ "diem-types",
+ "diem-workspace-hack",
"hex",
- "libra-types",
- "libra-workspace-hack",
"move-core-types",
"once_cell",
"serde",
@@ -4100,12 +4100,12 @@ dependencies = [
"codespan",
"codespan-reporting",
"datatest-stable",
+ "diem-types",
+ "diem-workspace-hack",
"difference",
"hex",
"ir-to-bytecode",
"libra-canonical-serialization",
- "libra-types",
- "libra-workspace-hack",
"move-core-types",
"move-ir-types",
"petgraph",
@@ -4122,9 +4122,9 @@ version = "0.1.0"
dependencies = [
"anyhow",
"datatest-stable",
+ "diem-types",
+ "diem-workspace-hack",
"functional-tests",
- "libra-types",
- "libra-workspace-hack",
"move-lang",
"tempfile",
]
@@ -4142,15 +4142,15 @@ dependencies = [
"codespan",
"codespan-reporting",
"datatest-stable",
+ "diem-temppath",
+ "diem-types",
+ "diem-workspace-hack",
"docgen",
"errmapgen",
"futures 0.3.8",
"handlebars",
"hex",
"itertools 0.9.0",
- "libra-temppath",
- "libra-types",
- "libra-workspace-hack",
"log",
"move-ir-types",
"move-lang",
@@ -4175,7 +4175,7 @@ name = "move-vm-integration-tests"
version = "0.1.0"
dependencies = [
"anyhow",
- "libra-workspace-hack",
+ "diem-workspace-hack",
"move-core-types",
"move-lang",
"move-vm-runtime",
@@ -4189,8 +4189,8 @@ dependencies = [
name = "move-vm-natives"
version = "0.1.0"
dependencies = [
- "libra-crypto",
- "libra-workspace-hack",
+ "diem-crypto",
+ "diem-workspace-hack",
"mirai-annotations",
"move-core-types",
"move-vm-types",
@@ -4206,13 +4206,13 @@ dependencies = [
"anyhow",
"bytecode-verifier",
"compiler",
+ "diem-crypto",
+ "diem-infallible",
+ "diem-logger",
+ "diem-state-view",
+ "diem-workspace-hack",
"fail",
"hex",
- "libra-crypto",
- "libra-infallible",
- "libra-logger",
- "libra-state-view",
- "libra-workspace-hack",
"mirai-annotations",
"move-core-types",
"move-lang",
@@ -4228,7 +4228,7 @@ name = "move-vm-test-utils"
version = "0.1.0"
dependencies = [
"anyhow",
- "libra-workspace-hack",
+ "diem-workspace-hack",
"move-core-types",
"move-vm-runtime",
"vm",
@@ -4238,9 +4238,9 @@ dependencies = [
name = "move-vm-types"
version = "0.1.0"
dependencies = [
+ "diem-crypto",
+ "diem-workspace-hack",
"libra-canonical-serialization",
- "libra-crypto",
- "libra-workspace-hack",
"mirai-annotations",
"move-core-types",
"once_cell",
@@ -4314,11 +4314,11 @@ name = "netcore"
version = "0.1.0"
dependencies = [
"bytes",
+ "diem-logger",
+ "diem-network-address",
+ "diem-types",
+ "diem-workspace-hack",
"futures 0.3.8",
- "libra-logger",
- "libra-network-address",
- "libra-types",
- "libra-workspace-hack",
"memsocket",
"pin-project 1.0.2",
"serde",
@@ -4334,21 +4334,21 @@ dependencies = [
"bytes",
"channel",
"criterion",
+ "diem-bitvec",
+ "diem-config",
+ "diem-crypto",
+ "diem-crypto-derive",
+ "diem-infallible",
+ "diem-logger",
+ "diem-metrics",
+ "diem-network-address",
+ "diem-proptest-helpers",
+ "diem-types",
+ "diem-workspace-hack",
"futures 0.3.8",
"futures-util",
"hex",
- "libra-bitvec",
"libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-crypto-derive",
- "libra-infallible",
- "libra-logger",
- "libra-metrics",
- "libra-network-address",
- "libra-proptest-helpers",
- "libra-types",
- "libra-workspace-hack",
"memsocket",
"netcore",
"network-builder",
@@ -4375,18 +4375,18 @@ name = "network-builder"
version = "0.1.0"
dependencies = [
"channel",
+ "diem-config",
+ "diem-crypto",
+ "diem-infallible",
+ "diem-logger",
+ "diem-metrics",
+ "diem-network-address",
+ "diem-network-address-encryption",
+ "diem-secure-storage",
+ "diem-types",
+ "diem-workspace-hack",
"futures 0.3.8",
"libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-infallible",
- "libra-logger",
- "libra-metrics",
- "libra-network-address",
- "libra-network-address-encryption",
- "libra-secure-storage",
- "libra-types",
- "libra-workspace-hack",
"netcore",
"network",
"network-simple-onchain-discovery",
@@ -4403,16 +4403,16 @@ version = "0.1.0"
dependencies = [
"anyhow",
"channel",
+ "diem-config",
+ "diem-crypto",
+ "diem-logger",
+ "diem-metrics",
+ "diem-network-address",
+ "diem-network-address-encryption",
+ "diem-types",
+ "diem-workspace-hack",
"futures 0.3.8",
"libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-logger",
- "libra-metrics",
- "libra-network-address",
- "libra-network-address-encryption",
- "libra-types",
- "libra-workspace-hack",
"move-core-types",
"network",
"once_cell",
@@ -4592,7 +4592,7 @@ dependencies = [
name = "num-variants"
version = "0.1.0"
dependencies = [
- "libra-workspace-hack",
+ "diem-workspace-hack",
"proc-macro2 1.0.24",
"quote 1.0.7",
"syn 1.0.53",
@@ -5490,11 +5490,11 @@ version = "0.1.0"
dependencies = [
"anyhow",
"compiled-stdlib",
+ "diem-state-view",
+ "diem-types",
+ "diem-workspace-hack",
"hex",
"libra-canonical-serialization",
- "libra-state-view",
- "libra-types",
- "libra-workspace-hack",
"move-core-types",
"move-vm-runtime",
"move-vm-types",
@@ -5736,20 +5736,20 @@ dependencies = [
"consensus-types",
"crash-handler",
"criterion",
+ "diem-config",
+ "diem-crypto",
+ "diem-global-constants",
+ "diem-infallible",
+ "diem-logger",
+ "diem-proptest-helpers",
+ "diem-secure-net",
+ "diem-secure-push-metrics",
+ "diem-secure-storage",
+ "diem-temppath",
+ "diem-types",
+ "diem-vault-client",
+ "diem-workspace-hack",
"libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-global-constants",
- "libra-infallible",
- "libra-logger",
- "libra-proptest-helpers",
- "libra-secure-net",
- "libra-secure-push-metrics",
- "libra-secure-storage",
- "libra-temppath",
- "libra-types",
- "libra-vault-client",
- "libra-workspace-hack",
"once_cell",
"proptest",
"rand 0.7.3",
@@ -5784,10 +5784,10 @@ version = "0.1.0"
dependencies = [
"anyhow",
"byteorder",
- "libra-config",
- "libra-metrics",
- "libra-temppath",
- "libra-workspace-hack",
+ "diem-config",
+ "diem-metrics",
+ "diem-temppath",
+ "diem-workspace-hack",
"once_cell",
"proptest",
"rocksdb",
@@ -5810,11 +5810,11 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
name = "scratchpad"
version = "0.1.0"
dependencies = [
+ "diem-crypto",
+ "diem-infallible",
+ "diem-types",
+ "diem-workspace-hack",
"itertools 0.9.0",
- "libra-crypto",
- "libra-infallible",
- "libra-types",
- "libra-workspace-hack",
"proptest",
]
@@ -5846,16 +5846,16 @@ name = "seed-peer-generator"
version = "0.1.0"
dependencies = [
"anyhow",
+ "diem-config",
+ "diem-crypto",
+ "diem-logger",
+ "diem-network-address",
+ "diem-secure-json-rpc",
+ "diem-temppath",
+ "diem-types",
+ "diem-workspace-hack",
"hex",
"libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-logger",
- "libra-network-address",
- "libra-secure-json-rpc",
- "libra-temppath",
- "libra-types",
- "libra-workspace-hack",
"rand 0.7.3",
"serde_yaml",
"structopt 0.3.21",
@@ -6057,7 +6057,7 @@ dependencies = [
name = "serializer-tests"
version = "0.1.0"
dependencies = [
- "libra-workspace-hack",
+ "diem-workspace-hack",
"proptest",
"proptest-derive",
"vm",
@@ -6135,8 +6135,8 @@ checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2"
name = "short-hex-str"
version = "0.1.0"
dependencies = [
+ "diem-workspace-hack",
"hex",
- "libra-workspace-hack",
"mirai-annotations",
"proptest",
"serde",
@@ -6189,32 +6189,32 @@ dependencies = [
"backup-cli",
"cli",
"debug-interface",
+ "diem-config",
+ "diem-crypto",
+ "diem-events-fetcher",
+ "diem-genesis-tool",
+ "diem-global-constants",
+ "diem-infallible",
+ "diem-json-rpc",
+ "diem-key-manager",
+ "diem-logger",
+ "diem-management",
+ "diem-network-address",
+ "diem-operational-tool",
+ "diem-secure-json-rpc",
+ "diem-secure-storage",
+ "diem-secure-time",
+ "diem-smoke-test-attribute",
+ "diem-swarm",
+ "diem-temppath",
+ "diem-trace",
+ "diem-transaction-replay",
+ "diem-types",
+ "diem-vault-client",
+ "diem-workspace-hack",
"generate-key",
"hex",
"libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-events-fetcher",
- "libra-genesis-tool",
- "libra-global-constants",
- "libra-infallible",
- "libra-json-rpc",
- "libra-key-manager",
- "libra-logger",
- "libra-management",
- "libra-network-address",
- "libra-operational-tool",
- "libra-secure-json-rpc",
- "libra-secure-storage",
- "libra-secure-time",
- "libra-smoke-test-attribute",
- "libra-swarm",
- "libra-temppath",
- "libra-trace",
- "libra-transaction-replay",
- "libra-types",
- "libra-vault-client",
- "libra-workspace-hack",
"num 0.3.1",
"num-traits",
"once_cell",
@@ -6231,13 +6231,13 @@ dependencies = [
name = "socket-bench-server"
version = "0.1.0"
dependencies = [
+ "diem-config",
+ "diem-crypto",
+ "diem-logger",
+ "diem-network-address",
+ "diem-types",
+ "diem-workspace-hack",
"futures 0.3.8",
- "libra-config",
- "libra-crypto",
- "libra-logger",
- "libra-network-address",
- "libra-types",
- "libra-workspace-hack",
"memsocket",
"netcore",
"network",
@@ -6269,9 +6269,9 @@ dependencies = [
"codespan",
"codespan-reporting",
"datatest-stable",
+ "diem-types",
+ "diem-workspace-hack",
"itertools 0.9.0",
- "libra-types",
- "libra-workspace-hack",
"log",
"move-core-types",
"move-ir-types",
@@ -6307,6 +6307,20 @@ dependencies = [
"bytes",
"channel",
"compiled-stdlib",
+ "diem-config",
+ "diem-crypto",
+ "diem-genesis-tool",
+ "diem-infallible",
+ "diem-logger",
+ "diem-mempool",
+ "diem-metrics",
+ "diem-network-address",
+ "diem-proptest-helpers",
+ "diem-temppath",
+ "diem-types",
+ "diem-vm",
+ "diem-workspace-hack",
+ "diemdb",
"executor",
"executor-test-helpers",
"executor-types",
@@ -6314,20 +6328,6 @@ dependencies = [
"futures 0.3.8",
"itertools 0.9.0",
"libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-genesis-tool",
- "libra-infallible",
- "libra-logger",
- "libra-mempool",
- "libra-metrics",
- "libra-network-address",
- "libra-proptest-helpers",
- "libra-temppath",
- "libra-types",
- "libra-vm",
- "libra-workspace-hack",
- "libradb",
"memsocket",
"netcore",
"network",
@@ -6374,10 +6374,10 @@ dependencies = [
"bytecode-verifier",
"clap",
"datatest-stable",
+ "diem-crypto",
+ "diem-types",
+ "diem-workspace-hack",
"libra-canonical-serialization",
- "libra-crypto",
- "libra-types",
- "libra-workspace-hack",
"log",
"move-lang",
"move-prover",
@@ -6441,13 +6441,13 @@ name = "storage-client"
version = "0.1.0"
dependencies = [
"anyhow",
+ "diem-crypto",
+ "diem-infallible",
+ "diem-logger",
+ "diem-secure-net",
+ "diem-types",
+ "diem-workspace-hack",
"libra-canonical-serialization",
- "libra-crypto",
- "libra-infallible",
- "libra-logger",
- "libra-secure-net",
- "libra-types",
- "libra-workspace-hack",
"serde",
"storage-interface",
]
@@ -6457,13 +6457,13 @@ name = "storage-interface"
version = "0.1.0"
dependencies = [
"anyhow",
+ "diem-crypto",
+ "diem-secure-net",
+ "diem-state-view",
+ "diem-types",
+ "diem-workspace-hack",
"itertools 0.9.0",
"libra-canonical-serialization",
- "libra-crypto",
- "libra-secure-net",
- "libra-state-view",
- "libra-types",
- "libra-workspace-hack",
"move-core-types",
"scratchpad",
"serde",
@@ -6475,18 +6475,18 @@ name = "storage-service"
version = "0.1.0"
dependencies = [
"anyhow",
+ "diem-config",
+ "diem-crypto",
+ "diem-logger",
+ "diem-metrics",
+ "diem-secure-net",
+ "diem-temppath",
+ "diem-types",
+ "diem-workspace-hack",
+ "diemdb",
"futures 0.3.8",
"itertools 0.9.0",
"libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-logger",
- "libra-metrics",
- "libra-secure-net",
- "libra-temppath",
- "libra-types",
- "libra-workspace-hack",
- "libradb",
"proptest",
"rand 0.7.3",
"storage-client",
@@ -6552,8 +6552,8 @@ version = "0.1.0"
dependencies = [
"anyhow",
"channel",
- "libra-types",
- "libra-workspace-hack",
+ "diem-types",
+ "diem-workspace-hack",
]
[[package]]
@@ -6572,11 +6572,11 @@ checksum = "171758edb47aa306a78dfa4ab9aeb5167405bd4e3dc2b64e88f6a84bbe98bd63"
name = "swiss-knife"
version = "0.1.0"
dependencies = [
+ "diem-crypto",
+ "diem-types",
+ "diem-workspace-hack",
"hex",
"libra-canonical-serialization",
- "libra-crypto",
- "libra-types",
- "libra-workspace-hack",
"move-core-types",
"rand 0.7.3",
"serde",
@@ -6697,16 +6697,16 @@ version = "0.1.0"
dependencies = [
"bytecode-verifier",
"crossbeam-channel",
+ "diem-config",
+ "diem-logger",
+ "diem-state-view",
+ "diem-types",
+ "diem-vm",
+ "diem-workspace-hack",
"getrandom 0.2.0",
"hex",
"itertools 0.9.0",
"language-e2e-tests",
- "libra-config",
- "libra-logger",
- "libra-state-view",
- "libra-types",
- "libra-vm",
- "libra-workspace-hack",
"mirai-annotations",
"module-generation",
"move-core-types",
@@ -6723,7 +6723,7 @@ name = "test-utils"
version = "0.1.0"
dependencies = [
"anyhow",
- "libra-workspace-hack",
+ "diem-workspace-hack",
"prettydiff",
"regex",
]
@@ -7005,7 +7005,7 @@ dependencies = [
name = "transaction-builder"
version = "0.1.0"
dependencies = [
- "libra-workspace-hack",
+ "diem-workspace-hack",
"mirai-annotations",
"transaction-builder-generated",
]
@@ -7015,10 +7015,10 @@ name = "transaction-builder-generated"
version = "0.1.0"
dependencies = [
"compiled-stdlib",
+ "diem-proptest-helpers",
+ "diem-types",
+ "diem-workspace-hack",
"libra-canonical-serialization",
- "libra-proptest-helpers",
- "libra-types",
- "libra-workspace-hack",
"move-core-types",
"once_cell",
"proptest",
@@ -7031,10 +7031,10 @@ name = "transaction-builder-generator"
version = "0.1.0"
dependencies = [
"anyhow",
+ "diem-types",
+ "diem-workspace-hack",
"heck",
"libra-canonical-serialization",
- "libra-types",
- "libra-workspace-hack",
"move-core-types",
"regex",
"serde-generate",
@@ -7249,9 +7249,9 @@ name = "vm"
version = "0.1.0"
dependencies = [
"anyhow",
- "libra-crypto",
- "libra-proptest-helpers",
- "libra-workspace-hack",
+ "diem-crypto",
+ "diem-proptest-helpers",
+ "diem-workspace-hack",
"mirai-annotations",
"move-core-types",
"num-variants",
@@ -7269,15 +7269,15 @@ dependencies = [
"anyhow",
"bytecode-verifier",
"compiled-stdlib",
+ "diem-config",
+ "diem-crypto",
+ "diem-network-address",
+ "diem-proptest-helpers",
+ "diem-state-view",
+ "diem-types",
+ "diem-vm",
+ "diem-workspace-hack",
"libra-canonical-serialization",
- "libra-config",
- "libra-crypto",
- "libra-network-address",
- "libra-proptest-helpers",
- "libra-state-view",
- "libra-types",
- "libra-vm",
- "libra-workspace-hack",
"move-core-types",
"move-vm-runtime",
"move-vm-types",
@@ -7294,16 +7294,16 @@ name = "vm-validator"
version = "0.1.0"
dependencies = [
"anyhow",
+ "diem-crypto",
+ "diem-state-view",
+ "diem-temppath",
+ "diem-types",
+ "diem-vm",
+ "diem-workspace-hack",
+ "diemdb",
"executor",
"executor-test-helpers",
"fail",
- "libra-crypto",
- "libra-state-view",
- "libra-temppath",
- "libra-types",
- "libra-vm",
- "libra-workspace-hack",
- "libradb",
"move-core-types",
"rand 0.7.3",
"scratchpad",
@@ -7580,12 +7580,12 @@ dependencies = [
"chrono",
"colored-diff",
"determinator",
+ "diem-workspace-hack",
"env_logger 0.8.2",
"globset",
"guppy",
"indexmap",
"indoc",
- "libra-workspace-hack",
"log",
"rayon",
"regex",
@@ -7602,10 +7602,10 @@ name = "x-core"
version = "0.1.0"
dependencies = [
"determinator",
+ "diem-workspace-hack",
"guppy",
"hex",
"indoc",
- "libra-workspace-hack",
"log",
"once_cell",
"rental",
@@ -7617,8 +7617,8 @@ dependencies = [
name = "x-lint"
version = "0.1.0"
dependencies = [
+ "diem-workspace-hack",
"guppy",
- "libra-workspace-hack",
"once_cell",
"serde",
"toml",
diff --git a/Cargo.toml b/Cargo.toml
index 0e2a5fd1c3..4d16ef99bf 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,9 +1,9 @@
[workspace]
members = [
+ "client/diem-dev",
"client/faucet",
"client/json-rpc",
- "client/libra-dev",
"client/swiss-knife",
"client/transaction-builder",
"common/bitvec",
@@ -13,8 +13,8 @@ members = [
"common/crash-handler",
"common/datatest-stable",
"common/debug-interface",
+ "common/diemdoc",
"common/infallible",
- "common/libradoc",
"common/logger",
"common/logger/derive",
"common/metrics",
@@ -44,6 +44,7 @@ members = [
"devtools/x",
"devtools/x-core",
"devtools/x-lint",
+ "diem-node",
"execution/db-bootstrapper",
"execution/execution-correctness",
"execution/executor",
@@ -61,13 +62,13 @@ members = [
"language/compiler/bytecode-source-map",
"language/compiler/ir-to-bytecode",
"language/compiler/ir-to-bytecode/syntax",
+ "language/diem-tools/diem-events-fetcher",
+ "language/diem-tools/diem-validator-interface",
+ "language/diem-tools/transaction-replay",
+ "language/diem-tools/writeset-transaction-generator",
+ "language/diem-vm",
"language/e2e-testsuite",
"language/ir-testsuite",
- "language/libra-tools/libra-events-fetcher",
- "language/libra-tools/libra-validator-interface",
- "language/libra-tools/transaction-replay",
- "language/libra-tools/writeset-transaction-generator",
- "language/libra-vm",
"language/move-core/types",
"language/move-ir/types",
"language/move-lang",
@@ -102,7 +103,6 @@ members = [
"language/transaction-builder/generator",
"language/vm",
"language/vm/serializer-tests",
- "libra-node",
"mempool",
"network",
"network/builder",
@@ -123,9 +123,9 @@ members = [
"storage/accumulator",
"storage/backup/backup-cli",
"storage/backup/backup-service",
+ "storage/diemdb",
"storage/inspector",
"storage/jellyfish-merkle",
- "storage/libradb",
"storage/librarian",
"storage/schemadb",
"storage/scratchpad",
@@ -134,19 +134,19 @@ members = [
"storage/storage-interface",
"storage/storage-service",
"testsuite/cli",
- "testsuite/cli/libra-wallet",
+ "testsuite/cli/diem-wallet",
"testsuite/cluster-test",
+ "testsuite/diem-fuzzer",
+ "testsuite/diem-fuzzer/fuzz",
+ "testsuite/diem-swarm",
"testsuite/generate-format",
- "testsuite/libra-fuzzer",
- "testsuite/libra-fuzzer/fuzz",
- "testsuite/libra-swarm",
"testsuite/smoke-test",
"testsuite/smoke-test/attribute",
"types",
"vm-validator",
]
-# NOTE: default-members is the complete list of binaries that form the "production Libra codebase". These members should
+# NOTE: default-members is the complete list of binaries that form the "production Diem codebase". These members should
# never include crates that require fuzzing features or test features. These are the crates we want built with no extra
# test-only code included.
#
@@ -159,7 +159,7 @@ default-members = [
"config/seed-peer-generator",
"consensus/safety-rules",
"client/faucet",
- "client/libra-dev",
+ "client/diem-dev",
"client/swiss-knife",
"execution/db-bootstrapper",
"execution/execution-correctness",
@@ -172,12 +172,12 @@ default-members = [
"language/tools/genesis-viewer",
"language/tools/move-cli",
"language/tools/move-coverage",
- "language/libra-tools/libra-events-fetcher",
- "language/libra-tools/transaction-replay",
- "language/libra-tools/writeset-transaction-generator",
+ "language/diem-tools/diem-events-fetcher",
+ "language/diem-tools/transaction-replay",
+ "language/diem-tools/writeset-transaction-generator",
"language/tools/move-explain",
"language/transaction-builder/generator",
- "libra-node",
+ "diem-node",
"secure/key-manager",
"storage/backup/backup-cli",
"storage/inspector",
diff --git a/README.md b/README.md
index 0010b5d223..4e3c1b5e77 100644
--- a/README.md
+++ b/README.md
@@ -1,70 +1,69 @@
-> **Note to readers:** On December 1, 2020, the Libra Association was renamed to Diem Association. The project repos are in the process of being migrated. All projects will remain available for use here until the migration to a new GitHub Organization is complete.
+> **Note to readers:** On December 1, 2020, the Diem Association was renamed to Diem Association. The project repos are in the process of being migrated. All projects will remain available for use here until the migration to a new GitHub Organization is complete.
-
-
+
+
---
-[](https://developers.libra.org/docs/rustdocs/)
+[](https://developers.diem.com/docs/rustdocs/)
[](https://circleci.com/gh/libra/libra)
[](LICENSE)
-[](https://ci-artifacts.libra.org/coverage/unit-coverage/latest/index.html)
[](https://codecov.io/gh/libra/libra)
-Libra Core implements a decentralized, programmable database which provides a financial infrastructure that can empower billions of people.
+Diem Core implements a decentralized, programmable database which provides a financial infrastructure that can empower billions of people.
## Note to Developers
-* Libra Core is a prototype.
+* Diem Core is a prototype.
* The APIs are constantly evolving and designed to demonstrate types of functionality. Expect substantial changes before the release.
-* We’ve launched a testnet that is a live demonstration of an early prototype of the Libra Blockchain software.
+* We’ve launched a testnet that is a live demonstration of an early prototype of the Diem Blockchain software.
## Contributing
-To begin contributing, [sign the CLA](https://libra.org/en-US/cla-sign/). You can learn more about contributing to the Libra project by reading our [Contribution Guide](https://developers.libra.org/docs/community/contributing) and by viewing our [Code of Conduct](https://developers.libra.org/docs/policies/code-of-conduct).
+To begin contributing, [sign the CLA](https://diem.com/en-US/cla-sign/). You can learn more about contributing to the Diem project by reading our [Contribution Guide](https://developers.diem.com/docs/community/contributing) and by viewing our [Code of Conduct](https://developers.diem.com/docs/policies/code-of-conduct).
## Getting Started
-### Learn About Libra
-* [Welcome](https://developers.libra.org/docs/welcome-to-libra)
-* [Libra Protocol: Key Concepts](https://developers.libra.org/docs/libra-protocol)
-* [Life of a Transaction](https://developers.libra.org/docs/life-of-a-transaction)
+### Learn About Diem
+* [Welcome](https://developers.diem.com/docs/welcome-to-diem)
+* [Diem Protocol: Key Concepts](https://developers.diem.com/docs/diem-protocol)
+* [Life of a Transaction](https://developers.diem.com/docs/life-of-a-transaction)
* [JSON-RPC SPEC](json-rpc/json-rpc-spec.md)
-### Try Libra Core
-* [My First Transaction](https://developers.libra.org/docs/my-first-transaction)
-* [Getting Started With Move](https://developers.libra.org/docs/move-overview)
+### Try Diem Core
+* [My First Transaction](https://developers.diem.com/docs/my-first-transaction)
+* [Getting Started With Move](https://developers.diem.com/docs/move-overview)
### Technical Papers
-* [The Libra Blockchain](https://developers.libra.org/docs/the-libra-blockchain-paper)
-* [Move: A Language With Programmable Resources](https://developers.libra.org/docs/move-paper)
-* [State Machine Replication in the Libra Blockchain](https://developers.libra.org/docs/state-machine-replication-paper)
+* [The Diem Blockchain](https://developers.diem.com/docs/the-diem-blockchain-paper)
+* [Move: A Language With Programmable Resources](https://developers.diem.com/docs/move-paper)
+* [State Machine Replication in the Diem Blockchain](https://developers.diem.com/docs/state-machine-replication-paper)
### Blog
-* [Libra: The Path Forward](https://developers.libra.org/blog/2019/06/18/the-path-forward/)
+* [Diem: The Path Forward](https://developers.diem.com/blog/2019/06/18/the-path-forward/)
-### Libra Codebase
+### Diem Codebase
-* [Libra Core Overview](https://developers.libra.org/docs/libra-core-overview)
-* [Admission Control](https://developers.libra.org/docs/crates/admission-control)
-* [Bytecode Verifier](https://developers.libra.org/docs/crates/bytecode-verifier)
-* [Consensus](https://developers.libra.org/docs/crates/consensus)
-* [Crypto](https://developers.libra.org/docs/crates/crypto)
-* [Execution](https://developers.libra.org/docs/crates/executor)
-* [Mempool](https://developers.libra.org/docs/crates/mempool)
-* [Move IR Compiler](https://developers.libra.org/docs/crates/ir-to-bytecode)
-* [Move Language](https://developers.libra.org/docs/crates/move-language)
-* [Network](https://developers.libra.org/docs/crates/network)
-* [Storage](https://developers.libra.org/docs/crates/storage)
-* [Virtual Machine](https://developers.libra.org/docs/crates/vm)
+* [Diem Core Overview](https://developers.diem.com/docs/diem-core-overview)
+* [Admission Control](https://developers.diem.com/docs/crates/admission-control)
+* [Bytecode Verifier](https://developers.diem.com/docs/crates/bytecode-verifier)
+* [Consensus](https://developers.diem.com/docs/crates/consensus)
+* [Crypto](https://developers.diem.com/docs/crates/crypto)
+* [Execution](https://developers.diem.com/docs/crates/executor)
+* [Mempool](https://developers.diem.com/docs/crates/mempool)
+* [Move IR Compiler](https://developers.diem.com/docs/crates/ir-to-bytecode)
+* [Move Language](https://developers.diem.com/docs/crates/move-language)
+* [Network](https://developers.diem.com/docs/crates/network)
+* [Storage](https://developers.diem.com/docs/crates/storage)
+* [Virtual Machine](https://developers.diem.com/docs/crates/vm)
## Community
-* Join us on the [Libra Discourse](https://community.libra.org).
-* Ask a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/libra).
-* Get the latest updates to our project by signing up for our [newsletter](https://developers.libra.org/newsletter_form).
+* Join us on the [Diem Discourse](https://community.diem.com).
+* Ask a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/diem).
+* Get the latest updates to our project by signing up for our [newsletter](https://developers.diem.com/newsletter_form).
## License
-Libra Core is licensed as [Apache 2.0](https://github.com/libra/libra/blob/master/LICENSE).
+Diem Core is licensed as [Apache 2.0](https://github.com/libra/libra/blob/master/LICENSE).
diff --git a/SECURITY.md b/SECURITY.md
index 98febf1805..fa4f5c7b4c 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -1,5 +1,5 @@
# Security Policies and Procedures
-Please see Libra's
-[security policies](https://developers.libra.org/docs/policies/security) and
+Please see Diem's
+[security policies](https://developers.diem.com/docs/policies/security) and
procedures for reporting vulnerabilities.
diff --git a/client/libra-dev/Cargo.toml b/client/diem-dev/Cargo.toml
similarity index 61%
rename from client/libra-dev/Cargo.toml
rename to client/diem-dev/Cargo.toml
index 26ba58df4d..46adaa3625 100644
--- a/client/libra-dev/Cargo.toml
+++ b/client/diem-dev/Cargo.toml
@@ -1,10 +1,10 @@
[package]
-name = "libra-dev"
+name = "diem-dev"
version = "0.1.0"
-authors = ["Libra Association "]
-description = "Libra client"
+authors = ["Diem Association "]
+description = "Diem client"
repository = "https://github.com/libra/libra"
-homepage = "https://libra.org"
+homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
edition = "2018"
@@ -14,9 +14,9 @@ libc = "0.2.80"
static_assertions = "1.1.0"
lcs = { version = "0.1.0", package = "libra-canonical-serialization" }
-libra-types = { path = "../../types", version = "0.1.0" }
-libra-crypto = { path = "../../crypto/crypto", version = "0.1.0" }
-libra-workspace-hack = { path = "../../common/workspace-hack", version = "0.1.0" }
+diem-types = { path = "../../types", version = "0.1.0" }
+diem-crypto = { path = "../../crypto/crypto", version = "0.1.0" }
+diem-workspace-hack = { path = "../../common/workspace-hack", version = "0.1.0" }
move-core-types = { path = "../../language/move-core/types", version = "0.1.0" }
transaction-builder = { path = "../../language/transaction-builder", version = "0.1.0" }
diff --git a/client/libra-dev/README.md b/client/diem-dev/README.md
similarity index 72%
rename from client/libra-dev/README.md
rename to client/diem-dev/README.md
index 52dea90c73..3440eade39 100644
--- a/client/libra-dev/README.md
+++ b/client/diem-dev/README.md
@@ -1,27 +1,27 @@
-# Exercising New Libra Functionality in Testnet
+# Exercising New Diem Functionality in Testnet
-Libra has changed a lot since 6/18 and the new whitepaper, but I don't think we've written anything comprehensive about how to exercise all of this new functionality. The linked document attempts to explain the state of the world in Libra master at a level of abstraction appropriate for any client that wants to hit testnet, not a specific client (that is, there will be no Libra CLI or json-rpc snippets here).
+Diem has changed a lot since 6/18 and the new whitepaper, but I don't think we've written anything comprehensive about how to exercise all of this new functionality. The linked document attempts to explain the state of the world in Diem master at a level of abstraction appropriate for any client that wants to hit testnet, not a specific client (that is, there will be no Diem CLI or json-rpc snippets here).
## Overview of New Functionality
### VASP Account Roles
-In the original Libra design, all accounts were the same. Now, every account has exactly one *role*. There are seven roles in all (`ParentVASP`, `ChildVASP`, `DesignatedDealer`, `Validator`, `ValidatorOperator`, `TreasuryCompliance`, and `AssocRoot`), but we will focus on the client-relevant `ParentVASP` and `ChildVASP` roles here. A VASP (virtual asset service provider) is a regulated wallet.
+In the original Diem design, all accounts were the same. Now, every account has exactly one *role*. There are seven roles in all (`ParentVASP`, `ChildVASP`, `DesignatedDealer`, `Validator`, `ValidatorOperator`, `TreasuryCompliance`, and `AssocRoot`), but we will focus on the client-relevant `ParentVASP` and `ChildVASP` roles here. A VASP (virtual asset service provider) is a regulated wallet.
* A [ParentVASP](https://github.com/libra/libra/blob/master/language/stdlib/modules/vasp.move#L20;L34) is the unique root account for a particular VASP (i.e., there will be one account of this type per company). A `ParentVASP` carries three key pieces of data: its `human_name`, `base_url` (a URL containing an endpoint to hit for off-chain APIs like exchanging KYC information and the travel rule protocol), and a `compliance_public_key` (ed5519 public key for authenticating signatures on KYC and travel rule payloads).
* A [ChildVASP](https://github.com/libra/libra/blob/master/language/stdlib/modules/vasp.move#L40) is a child account of a particular parent VASP. A VASP need not have any child accounts, but child accounts allow more sophisticated a VASP to maintain a structured on-chain presence (e.g., separate cold/warm/hot accounts). A parent VASP can currently have an unbounded number of children (though we'll need to pick a reasonable [limit](https://github.com/libra/libra/issues/3949)). A child knows the account address of its parent VASP. When transacting with a child account, clients should use this to look up its parent, then use the `base_url` and `compliance_public_key` of the parent for off-chain communication.
### Off-Chain Protocols
-As mentioned above, some transactions between VASPs must use off-chain protocols for exchanging information. These APIs are implemented by VASPs themselves, not by Libra testnet (though there is an in-progress effort to provide a reference endpoint for testing). However, it's easy enough to mimic the relevant aspects of these protocols for testnet purposes (more on this later).
+As mentioned above, some transactions between VASPs must use off-chain protocols for exchanging information. These APIs are implemented by VASPs themselves, not by Diem testnet (though there is an in-progress effort to provide a reference endpoint for testing). However, it's easy enough to mimic the relevant aspects of these protocols for testnet purposes (more on this later).
### Currencies
-There are two currencies in testnet: `Coin1` (stablecoin), and `LBR` (synthetic currency that is currently a stub and will be updated once the final composition is determined). At the Move level, these are different generic instantiation of the same `Libra` type (i.e.`Libra`, `Libra`).
+There are two currencies in testnet: `XUS` (stablecoin), and `XDX` (synthetic currency that is currently a stub and will be updated once the final composition is determined). At the Move level, these are different generic instantiation of the same `Diem` type (i.e.`Diem`, `Diem`).
### Addresses, Authentication Keys, and Cryptographic Keys
-Two major changes in new Libra design are the [shrinking](https://github.com/libra/libra/issues/2764) of account addresses from 32 bytes to 16 bytes and the addition of multisignature authentication keys. A quick primer on how these concepts fit together, since they are very important for clients:
+Two major changes in new Diem design are the [shrinking](https://github.com/libra/libra/issues/2764) of account addresses from 32 bytes to 16 bytes and the addition of multisignature authentication keys. A quick primer on how these concepts fit together, since they are very important for clients:
* To create a fresh account address, generate an ed25519 keypair `(K_pub, K_priv)`.
* Derive a 32 byte authentication key `auth_key = sha3-256(K_pub | 0)`. The `0` is a signature scheme identifier where `0` means single-signature and `1` means multisig.
@@ -29,13 +29,13 @@ Two major changes in new Libra design are the [shrinking](https://github.com/lib
* The account address is the last 16 bytes of `auth_key`
* The first 16 bytes of `auth_key` is the “auth key prefix”. Any transaction that creates an account needs both an account address and an auth key prefix, but a transaction that is sending funds to an existing account needs only the address.
* Creating a `K`-of-`N` [multisig](https://github.com/libra/libra/blob/master/crypto/crypto/src/multi_ed25519.rs) authentication key is similar: generate `N` ed25519 public keys, then compute `auth_key = ( | K | 1)`. Derive an address and an auth key prefix as described above.
-* Libra supports key rotation via changing the `auth_key` stored under an account. The address associated with an account never changes.
+* Diem supports key rotation via changing the `auth_key` stored under an account. The address associated with an account never changes.
## Exercising New Functionality in Testnet
### Creating accounts and minting with the faucet
-As in the original Libra, testnet has a faucet service for creating accounts and giving money to existing accounts. There are three important changes from the original faucet:
+As in the original Diem, testnet has a faucet service for creating accounts and giving money to existing accounts. There are three important changes from the original faucet:
* The faucet now [needs](https://github.com/libra/libra/pull/3972) one of the currency codes above
* The faucet can accept either a 16 byte address (for an existing account), a 32 byte account authentication key (for an account that does not yet exist and should be created by the faucet). Previously, account addresses and authentication keys were both 32 byte values, but account addresses have [shrunk](https://github.com/libra/libra/issues/2764).
@@ -52,7 +52,7 @@ Transactions are mostly unchanged from the original design. Two notable differen
Payments can be sent using [this](https://github.com/libra/libra/blob/master/language/stdlib/transaction_scripts/peer_to_peer_with_metadata.move) transaction script. There are a few changes:
-* The script requires a generic type parameter `Token` specifying the currency to be transferred. The sending and receiving account must both have a balance in this currency. A transaction that attempts to send (e.g.) `LBR` to an account that doesn’t have an `LBR` balance will abort.
+* The script requires a generic type parameter `Token` specifying the currency to be transferred. The sending and receiving account must both have a balance in this currency. A transaction that attempts to send (e.g.) `XDX` to an account that doesn’t have an `XDX` balance will abort.
* The script has a `metadata` parameter that accepts arbitrary binary data. For most transactions, the metadata should be the subaddress of the VASP customer receiving the payment. The contents of `metadata` are emitted in payment events, but are not otherwise inspected on-chain (so using empty or dummy `metadata` is just fine for testing).
* The script has a `metadata_signature` parameter used for dual attestation in the travel rule protocol (see below).
* Sending a payment to an address that does not exist will abort (*not* create a new account at that address).
@@ -67,7 +67,7 @@ Each newly created account accepts at least one currency, which as specified as
### Dual Attestation/Travel Rule Protocol
-In Libra mainnet every payment transaction between two **distinct **VASP accounts (parent <-> child and child <-> child within the same VASP are exempt) over a certain threshold (1000 LBR, for now) must perform dual attestation in order to comply with the travel rule. "Dual attestation" is a fancy way of saying:
+In Diem mainnet every payment transaction between two **distinct **VASP accounts (parent <-> child and child <-> child within the same VASP are exempt) over a certain threshold (1000 XDX, for now) must perform dual attestation in order to comply with the travel rule. "Dual attestation" is a fancy way of saying:
* The payer must send the payee some data
* The payee must sign the data with its `compliance_public_key`
@@ -82,6 +82,6 @@ Every parent VASP created by the faucet has a dummy `base_url` and `compliance_
* `amount`: number of coins to send. Encoding: LCS `u64`
* `reference_id`: an identifier for the payment in the off-chain protocol. This is not inspected on-chain, so dummy value suffices for testing. Encoding: LCS `[u8;12]`
-The payee VASP should sign the [LCS](https://developers.libra.org/docs/rustdocs/libra_canonical_serialization/index.html)-encoded (see types above) message `reference_id | payer_vasp_address | amount | @@$$LIBRA_ATTEST$$@@`. to produce a `payee_signature`. The `@@$$LIBRA_ATTEST$$@@` part is a domain separator intended to prevent misusing a different signature from the same key (e.g., interpreting a KYC signature as a travel rule signature).
+The payee VASP should sign the [LCS](https://developers.diem.com/docs/rustdocs/diem_canonical_serialization/index.html)-encoded (see types above) message `reference_id | payer_vasp_address | amount | @@$$DIEM_ATTEST$$@@`. to produce a `payee_signature`. The `@@$$DIEM_ATTEST$$@@` part is a domain separator intended to prevent misusing a different signature from the same key (e.g., interpreting a KYC signature as a travel rule signature).
Finally, send a transaction from payer_vasp_address using the payment [script](https://github.com/libra/libra/blob/master/language/stdlib/transaction_scripts/peer_to_peer_with_metadata.move) mentioned above with `payee = payee_vasp_address, amount = amount, metadata = reference_id, metadata_signature = payee_signature`.
diff --git a/client/libra-dev/build.rs b/client/diem-dev/build.rs
similarity index 65%
rename from client/libra-dev/build.rs
rename to client/diem-dev/build.rs
index b80f05d781..aa2d500523 100644
--- a/client/libra-dev/build.rs
+++ b/client/diem-dev/build.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use bindgen::EnumVariation;
@@ -20,18 +20,18 @@ fn main() {
.default_enum_style(EnumVariation::Rust {
non_exhaustive: false,
})
- .whitelist_type("LibraStatus")
- .whitelist_type("LibraP2PTransferTransactionArgument")
- .whitelist_type("LibraTransactionPayload")
- .whitelist_type("LibraRawTransaction")
- .whitelist_type("LibraSignedTransaction")
+ .whitelist_type("DiemStatus")
+ .whitelist_type("DiemP2PTransferTransactionArgument")
+ .whitelist_type("DiemTransactionPayload")
+ .whitelist_type("DiemRawTransaction")
+ .whitelist_type("DiemSignedTransaction")
.whitelist_type("TransactionType")
- .whitelist_type("LibraAccountKey")
- .whitelist_var("LIBRA_PUBKEY_SIZE")
- .whitelist_var("LIBRA_PRIVKEY_SIZE")
- .whitelist_var("LIBRA_AUTHKEY_SIZE")
- .whitelist_var("LIBRA_ADDRESS_SIZE")
- .whitelist_var("LIBRA_SIGNATURE_SIZE")
+ .whitelist_type("DiemAccountKey")
+ .whitelist_var("DIEM_PUBKEY_SIZE")
+ .whitelist_var("DIEM_PRIVKEY_SIZE")
+ .whitelist_var("DIEM_AUTHKEY_SIZE")
+ .whitelist_var("DIEM_ADDRESS_SIZE")
+ .whitelist_var("DIEM_SIGNATURE_SIZE")
.generate()
// Unwrap the Result and panic on failure.
.expect("Unable to generate bindings.");
diff --git a/client/libra-dev/include/data.h b/client/diem-dev/include/data.h
similarity index 64%
rename from client/libra-dev/include/data.h
rename to client/diem-dev/include/data.h
index 01b86b91a4..02aaab224c 100644
--- a/client/libra-dev/include/data.h
+++ b/client/diem-dev/include/data.h
@@ -1,5 +1,5 @@
-#ifndef LIBRA_DEV_H
-#define LIBRA_DEV_H
+#ifndef DIEM_DEV_H
+#define DIEM_DEV_H
#ifdef __cplusplus
extern "C" {
@@ -10,21 +10,21 @@ extern "C" {
#include
#include
-#define LIBRA_PUBKEY_SIZE 32
-#define LIBRA_PRIVKEY_SIZE 32
-#define LIBRA_AUTHKEY_SIZE 32
-#define LIBRA_SIGNATURE_SIZE 64
-#define LIBRA_ADDRESS_SIZE 16
+#define DIEM_PUBKEY_SIZE 32
+#define DIEM_PRIVKEY_SIZE 32
+#define DIEM_AUTHKEY_SIZE 32
+#define DIEM_SIGNATURE_SIZE 64
+#define DIEM_ADDRESS_SIZE 16
-enum LibraStatus {
+enum DiemStatus {
Ok = 0,
InvalidArgument = -1,
InternalError = -255,
};
-struct LibraP2PTransferTransactionArgument {
+struct DiemP2PTransferTransactionArgument {
uint64_t value;
- uint8_t address[LIBRA_ADDRESS_SIZE];
+ uint8_t address[DIEM_ADDRESS_SIZE];
const uint8_t* metadata_bytes;
size_t metadata_len;
const uint8_t* metadata_signature_bytes;
@@ -37,38 +37,38 @@ enum TransactionType {
Unknown = -1,
};
-struct LibraTransactionPayload {
+struct DiemTransactionPayload {
enum TransactionType txn_type;
- struct LibraP2PTransferTransactionArgument args;
+ struct DiemP2PTransferTransactionArgument args;
};
-struct LibraRawTransaction {
- uint8_t sender[LIBRA_ADDRESS_SIZE];
+struct DiemRawTransaction {
+ uint8_t sender[DIEM_ADDRESS_SIZE];
uint64_t sequence_number;
- struct LibraTransactionPayload payload;
+ struct DiemTransactionPayload payload;
uint64_t max_gas_amount;
uint64_t gas_unit_price;
uint64_t expiration_timestamp_secs;
uint8_t chain_id;
};
-struct LibraSignedTransaction {
- struct LibraRawTransaction raw_txn;
- uint8_t public_key[LIBRA_PUBKEY_SIZE];
- uint8_t signature[LIBRA_SIGNATURE_SIZE];
+struct DiemSignedTransaction {
+ struct DiemRawTransaction raw_txn;
+ uint8_t public_key[DIEM_PUBKEY_SIZE];
+ uint8_t signature[DIEM_SIGNATURE_SIZE];
};
-struct LibraAccountKey {
- uint8_t address[LIBRA_ADDRESS_SIZE];
- uint8_t private_key[LIBRA_PRIVKEY_SIZE];
- uint8_t public_key[LIBRA_PUBKEY_SIZE];
+struct DiemAccountKey {
+ uint8_t address[DIEM_ADDRESS_SIZE];
+ uint8_t private_key[DIEM_PRIVKEY_SIZE];
+ uint8_t public_key[DIEM_PUBKEY_SIZE];
};
/*!
* Get serialized signed transaction from a list of transaction parameters
*
* To get the serialized transaction in a memory safe manner, the client needs to pass in a pointer to a pointer to the allocated memory in rust
- * and call free on the memory address with `libra_free_bytes_buffer`.
+ * and call free on the memory address with `diem_free_bytes_buffer`.
* @param[in] sender_private_key is sender's private key
* @param[in] sequence is the sequence number of this transaction corresponding to sender's account.
* @param[in] max_gas_amount is the maximal total gas specified by wallet to spend for this transaction.
@@ -78,16 +78,16 @@ struct LibraAccountKey {
* @param[in] chain_id is the chain id for this Transaction.
* @param[in] script_bytes is the script bytes for given transaction.
* @param[in] script_len is the length of script_bytes array.
- * @param[out] ptr_buf is the pointer that will be filled with the memory address of the transaction allocated in rust. User takes ownership of pointer returned by *buf, which needs to be freed using libra_free_bytes_buffer
+ * @param[out] ptr_buf is the pointer that will be filled with the memory address of the transaction allocated in rust. User takes ownership of pointer returned by *buf, which needs to be freed using diem_free_bytes_buffer
* @param[out] ptr_len is the length of the signed transaction memory buffer.
*/
-enum LibraStatus libra_SignedTransactionBytes_from(const uint8_t sender_private_key[LIBRA_PRIVKEY_SIZE], uint64_t sequence, uint64_t max_gas_amount, uint64_t gas_unit_price, const char* gas_identifier, uint64_t expiration_time_secs, uint8_t chain_id, const uint8_t *script_bytes, size_t script_len, uint8_t **ptr_buf, size_t *ptr_len);
+enum DiemStatus diem_SignedTransactionBytes_from(const uint8_t sender_private_key[DIEM_PRIVKEY_SIZE], uint64_t sequence, uint64_t max_gas_amount, uint64_t gas_unit_price, const char* gas_identifier, uint64_t expiration_time_secs, uint8_t chain_id, const uint8_t *script_bytes, size_t script_len, uint8_t **ptr_buf, size_t *ptr_len);
/*!
* Get script bytes for a P2P transaction
*
* To get the serialized script in a memory safe manner, the client needs to pass in a pointer to a pointer to the allocated memory in rust
- * and call free on the memory address with `libra_free_bytes_buffer`.
+ * and call free on the memory address with `diem_free_bytes_buffer`.
* @param[in] receiver is the receiver's address.
* @param[in] identifier is the identifier of the coin to be sent.
* @param[in] num_coins is the amount of money to be sent.
@@ -95,58 +95,58 @@ enum LibraStatus libra_SignedTransactionBytes_from(const uint8_t sender_private_
* @param[in] metadata_len is the length of metadata_bytes array.
* @param[in] metadata_signature_bytes is the metadata signature bytes for given transaction.
* @param[in] metadata_signature_len is the length of metadata_signature_bytes array.
- * @param[out] ptr_buf is the pointer that will be filled with the memory address of the script allocated in rust. User takes ownership of pointer returned by *buf, which needs to be freed using libra_free_bytes_buffer
+ * @param[out] ptr_buf is the pointer that will be filled with the memory address of the script allocated in rust. User takes ownership of pointer returned by *buf, which needs to be freed using diem_free_bytes_buffer
* @param[out] ptr_len is the length of the script memory buffer.
*/
-enum LibraStatus libra_TransactionP2PScript_from(const uint8_t receiver[LIBRA_ADDRESS_SIZE], const char* identifier, uint64_t num_coins, const uint8_t* metadata_bytes, size_t metadata_len, const uint8_t* metadata_signature_bytes, size_t metadata_signature_len, uint8_t **ptr_buf, size_t *ptr_len);
+enum DiemStatus diem_TransactionP2PScript_from(const uint8_t receiver[DIEM_ADDRESS_SIZE], const char* identifier, uint64_t num_coins, const uint8_t* metadata_bytes, size_t metadata_len, const uint8_t* metadata_signature_bytes, size_t metadata_signature_len, uint8_t **ptr_buf, size_t *ptr_len);
/*!
* Get script bytes for add currency to account transaction
*
* To get the serialized script in a memory safe manner, the client needs to pass in a pointer to a pointer to the allocated memory in rust
- * and call free on the memory address with `libra_free_bytes_buffer`.
+ * and call free on the memory address with `diem_free_bytes_buffer`.
* @param[in] identifier is the identifier of the coin to be sent.
- * @param[out] ptr_buf is the pointer that will be filled with the memory address of the script allocated in rust. User takes ownership of pointer returned by *buf, which needs to be freed using libra_free_bytes_buffer
+ * @param[out] ptr_buf is the pointer that will be filled with the memory address of the script allocated in rust. User takes ownership of pointer returned by *buf, which needs to be freed using diem_free_bytes_buffer
* @param[out] ptr_len is the length of the script memory buffer.
*/
-enum LibraStatus libra_TransactionAddCurrencyScript_from(const char* identifier, uint8_t **ptr_buf, size_t *ptr_len);
+enum DiemStatus diem_TransactionAddCurrencyScript_from(const char* identifier, uint8_t **ptr_buf, size_t *ptr_len);
/*!
* Get script bytes for rotating base url of VASP
* Encode a program that rotates `vasp_root_addr`'s base URL to `new_url` and compliance public key to `new_key`.
*
* To get the serialized script in a memory safe manner, the client needs to pass in a pointer to a pointer to the allocated memory in rust
- * and call free on the memory address with `libra_free_bytes_buffer`.
+ * and call free on the memory address with `diem_free_bytes_buffer`.
* @param[in] new_url_bytes is the bytes of new base URL for the VASP.
* @param[in] new_url_len is the length of new_key_bytes array.
* @param[in] new_key_bytes is the array that contains new key for the VASP.
- * @param[out] ptr_buf is the pointer that will be filled with the memory address of the script allocated in rust. User takes ownership of pointer returned by *buf, which needs to be freed using libra_free_bytes_buffer
+ * @param[out] ptr_buf is the pointer that will be filled with the memory address of the script allocated in rust. User takes ownership of pointer returned by *buf, which needs to be freed using diem_free_bytes_buffer
* @param[out] ptr_len is the length of the script memory buffer.
*/
-enum LibraStatus libra_TransactionRotateDualAttestationInfoScript_from(const uint8_t* new_url_bytes, size_t new_url_len, const uint8_t new_key_bytes[LIBRA_PUBKEY_SIZE], uint8_t **ptr_buf, size_t *ptr_len);
+enum DiemStatus diem_TransactionRotateDualAttestationInfoScript_from(const uint8_t* new_url_bytes, size_t new_url_len, const uint8_t new_key_bytes[DIEM_PUBKEY_SIZE], uint8_t **ptr_buf, size_t *ptr_len);
/*!
* Function to free the allocation memory in rust for bytes
* @param buf is the pointer to the bytes allocated in rust, and needs to be freed from client side
*/
-void libra_free_bytes_buffer(const uint8_t* buf);
+void diem_free_bytes_buffer(const uint8_t* buf);
/*!
- * Decode LibraSignedTransaction from bytes in SignedTransaction proto.
+ * Decode DiemSignedTransaction from bytes in SignedTransaction proto.
*
* @param[in] buf contains encoded bytes of txn_bytes
* @param[in] len is the length of the signed transaction memory buffer.
- * @param[out] caller allocated LibraSignedTransaction to write into.
+ * @param[out] caller allocated DiemSignedTransaction to write into.
*
- * @returns status code, one of LibraAPIStatus
+ * @returns status code, one of DiemAPIStatus
*/
-enum LibraStatus libra_LibraSignedTransaction_from(const uint8_t *buf, size_t len, struct LibraSignedTransaction *out);
+enum DiemStatus diem_DiemSignedTransaction_from(const uint8_t *buf, size_t len, struct DiemSignedTransaction *out);
/*!
* Get serialized raw transaction from a list of transaction parameters
*
* To get the serialized raw transaction in a memory safe manner, the client needs to pass in a pointer to a pointer to the allocated memory in rust
- * and call free on the memory address with `libra_free_bytes_buffer`.
+ * and call free on the memory address with `diem_free_bytes_buffer`.
* @param[in] sender is the sender's address
* @param[in] receiver is the receiver's address
* @param[in] sequence is the sequence number of this transaction corresponding to sender's account.
@@ -157,27 +157,27 @@ enum LibraStatus libra_LibraSignedTransaction_from(const uint8_t *buf, size_t le
* @param[in] chain_id is the chain id for this Transaction.
* @param[in] metadata_bytes is the metadata bytes for given transaction.
* @param[in] metadata_len is the length of metadata_bytes array.
- * @param[out] buf is the pointer that will be filled with the memory address of the transaction allocated in rust. User takes ownership of pointer returned by *buf, which needs to be freed using libra_free_bytes_buffer
+ * @param[out] buf is the pointer that will be filled with the memory address of the transaction allocated in rust. User takes ownership of pointer returned by *buf, which needs to be freed using diem_free_bytes_buffer
* @param[out] len is the length of the raw transaction memory buffer.
*/
-enum LibraStatus libra_RawTransactionBytes_from(const uint8_t sender[LIBRA_ADDRESS_SIZE], const uint8_t receiver[LIBRA_ADDRESS_SIZE], uint64_t sequence, uint64_t num_coins, uint64_t max_gas_amount, uint64_t gas_unit_price, uint64_t expiration_time_secs, uint8_t chain_id, const uint8_t* metadata_bytes, size_t metadata_len, const uint8_t* metadata_signature_bytes, size_t metadata_signature_len, uint8_t **buf, size_t *len);
+enum DiemStatus diem_RawTransactionBytes_from(const uint8_t sender[DIEM_ADDRESS_SIZE], const uint8_t receiver[DIEM_ADDRESS_SIZE], uint64_t sequence, uint64_t num_coins, uint64_t max_gas_amount, uint64_t gas_unit_price, uint64_t expiration_time_secs, uint8_t chain_id, const uint8_t* metadata_bytes, size_t metadata_len, const uint8_t* metadata_signature_bytes, size_t metadata_signature_len, uint8_t **buf, size_t *len);
/*!
* This function takes in private key in bytes and return the associated public key and address
* @param[in] private_key_bytes is private key in bytes
- * @param[out] out is a pointer to LibraAccountKey struct client passed in by initializing an empty LibraAccountKey struct
+ * @param[out] out is a pointer to DiemAccountKey struct client passed in by initializing an empty DiemAccountKey struct
*/
-enum LibraStatus libra_LibraAccountKey_from(const uint8_t private_key_bytes[LIBRA_PRIVKEY_SIZE], struct LibraAccountKey *out);
+enum DiemStatus diem_DiemAccountKey_from(const uint8_t private_key_bytes[DIEM_PRIVKEY_SIZE], struct DiemAccountKey *out);
/*!
* This function returns the string message of the most recent error in Rust.
* Error will be in UTF8 string encoding and client does not need to free the string from their side.
* @returns error message string
*/
-const char *libra_strerror();
+const char *diem_strerror();
#ifdef __cplusplus
};
#endif
-#endif // LIBRA_DEV_H
+#endif // DIEM_DEV_H
diff --git a/client/libra-dev/src/crypto.rs b/client/diem-dev/src/crypto.rs
similarity index 56%
rename from client/libra-dev/src/crypto.rs
rename to client/diem-dev/src/crypto.rs
index 34aa432236..487937749c 100644
--- a/client/libra-dev/src/crypto.rs
+++ b/client/diem-dev/src/crypto.rs
@@ -1,27 +1,27 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use crate::{
error::*,
- interface::{LibraAccountKey, LibraStatus},
+ interface::{DiemAccountKey, DiemStatus},
};
-use libra_crypto::{
+use diem_crypto::{
ed25519::{Ed25519PrivateKey, ED25519_PRIVATE_KEY_LENGTH},
PrivateKey,
};
-use libra_types::account_address;
+use diem_types::account_address;
use std::{convert::TryFrom, slice};
/// Takes in private key in bytes and return the associated public key and address
#[no_mangle]
-pub unsafe extern "C" fn libra_LibraAccountKey_from(
+pub unsafe extern "C" fn diem_DiemAccountKey_from(
private_key_bytes: *const u8,
- out: *mut LibraAccountKey,
-) -> LibraStatus {
+ out: *mut DiemAccountKey,
+) -> DiemStatus {
clear_error();
if private_key_bytes.is_null() {
update_last_error("private_key_bytes parameter must not be null.".to_string());
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
let private_key_buf: &[u8] =
@@ -31,37 +31,37 @@ pub unsafe extern "C" fn libra_LibraAccountKey_from(
Ok(result) => result,
Err(e) => {
update_last_error(format!("Invalid private key bytes: {}", e.to_string()));
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
};
let public_key = private_key.public_key();
let address = account_address::from_public_key(&public_key);
- *out = LibraAccountKey {
+ *out = DiemAccountKey {
address: address.into(),
private_key: private_key.to_bytes(),
public_key: public_key.to_bytes(),
};
- LibraStatus::Ok
+ DiemStatus::Ok
}
-/// Generate a private key, then get LibraAccount
+/// Generate a private key, then get DiemAccount
#[test]
-fn test_libra_account_from() {
- use libra_crypto::Uniform;
- use libra_types::account_address::{self, AccountAddress};
+fn test_diem_account_from() {
+ use diem_crypto::Uniform;
+ use diem_types::account_address::{self, AccountAddress};
let private_key = Ed25519PrivateKey::generate_for_testing();
- let mut libra_account = LibraAccountKey::default();
+ let mut diem_account = DiemAccountKey::default();
let result =
- unsafe { libra_LibraAccountKey_from(private_key.to_bytes().as_ptr(), &mut libra_account) };
- assert_eq!(result, LibraStatus::Ok);
+ unsafe { diem_DiemAccountKey_from(private_key.to_bytes().as_ptr(), &mut diem_account) };
+ assert_eq!(result, DiemStatus::Ok);
let public_key = private_key.public_key();
let address = account_address::from_public_key(&public_key);
- assert_eq!(libra_account.public_key, public_key.to_bytes());
- assert_eq!(libra_account.private_key, private_key.to_bytes());
- assert_eq!(AccountAddress::new(libra_account.address), address);
+ assert_eq!(diem_account.public_key, public_key.to_bytes());
+ assert_eq!(diem_account.private_key, private_key.to_bytes());
+ assert_eq!(AccountAddress::new(diem_account.address), address);
}
diff --git a/client/libra-dev/src/error.rs b/client/diem-dev/src/error.rs
similarity index 92%
rename from client/libra-dev/src/error.rs
rename to client/diem-dev/src/error.rs
index 3379af8bae..00d2aba0e7 100644
--- a/client/libra-dev/src/error.rs
+++ b/client/diem-dev/src/error.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use std::{cell::RefCell, cmp::min, os::raw::c_char};
@@ -36,6 +36,6 @@ pub fn clear_error() {
/// thread that called the API function which got an error. The returned
/// string pointer is only valid until the next API call. Callers should not
/// store it or use it past then.
-pub unsafe extern "C" fn libra_strerror() -> *const c_char {
+pub unsafe extern "C" fn diem_strerror() -> *const c_char {
LAST_ERROR.with(|prev| prev.borrow().as_ptr().cast())
}
diff --git a/client/libra-dev/src/interface.rs b/client/diem-dev/src/interface.rs
similarity index 81%
rename from client/libra-dev/src/interface.rs
rename to client/diem-dev/src/interface.rs
index 16634793fc..650b441ae9 100644
--- a/client/libra-dev/src/interface.rs
+++ b/client/diem-dev/src/interface.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
#![allow(non_upper_case_globals)]
diff --git a/client/diem-dev/src/lib.rs b/client/diem-dev/src/lib.rs
new file mode 100644
index 0000000000..faf019725a
--- /dev/null
+++ b/client/diem-dev/src/lib.rs
@@ -0,0 +1,21 @@
+// Copyright (c) The Diem Core Contributors
+// SPDX-License-Identifier: Apache-2.0
+
+#![allow(non_upper_case_globals)]
+#![allow(non_camel_case_types)]
+#![allow(non_snake_case)]
+#![allow(clippy::missing_safety_doc)]
+
+pub mod crypto;
+pub mod error;
+mod interface;
+pub mod transaction;
+
+use crate::interface::{DIEM_ADDRESS_SIZE, DIEM_AUTHKEY_SIZE, DIEM_PRIVKEY_SIZE, DIEM_PUBKEY_SIZE};
+use diem_crypto::ed25519::{ED25519_PRIVATE_KEY_LENGTH, ED25519_PUBLIC_KEY_LENGTH};
+use diem_types::{account_address::AccountAddress, transaction::authenticator::AuthenticationKey};
+
+static_assertions::const_assert_eq!(DIEM_PUBKEY_SIZE, ED25519_PUBLIC_KEY_LENGTH as u32);
+static_assertions::const_assert_eq!(DIEM_PRIVKEY_SIZE, ED25519_PRIVATE_KEY_LENGTH as u32);
+static_assertions::const_assert_eq!(DIEM_AUTHKEY_SIZE, AuthenticationKey::LENGTH as u32);
+static_assertions::const_assert_eq!(DIEM_ADDRESS_SIZE, AccountAddress::LENGTH as u32);
diff --git a/client/libra-dev/src/transaction.rs b/client/diem-dev/src/transaction.rs
similarity index 83%
rename from client/libra-dev/src/transaction.rs
rename to client/diem-dev/src/transaction.rs
index 08dc634eb0..51335c3eb7 100644
--- a/client/libra-dev/src/transaction.rs
+++ b/client/diem-dev/src/transaction.rs
@@ -1,31 +1,28 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use crate::{
error::*,
interface::{
- LibraP2PTransferTransactionArgument, LibraRawTransaction, LibraSignedTransaction,
- LibraStatus, LibraTransactionPayload, TransactionType, LIBRA_PUBKEY_SIZE,
- LIBRA_SIGNATURE_SIZE,
+ DiemP2PTransferTransactionArgument, DiemRawTransaction, DiemSignedTransaction, DiemStatus,
+ DiemTransactionPayload, TransactionType, DIEM_PUBKEY_SIZE, DIEM_SIGNATURE_SIZE,
},
};
-use lcs::{from_bytes, to_bytes};
-use libra_crypto::{
+use diem_crypto::{
ed25519::{Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature, ED25519_PUBLIC_KEY_LENGTH},
test_utils::KeyPair,
PrivateKey,
};
-use libra_types::{
+use diem_types::{
account_address::{self, AccountAddress},
- account_config::{
- coin1_tmp_tag, from_currency_code_string, type_tag_for_currency_code, COIN1_NAME,
- },
+ account_config::{from_currency_code_string, type_tag_for_currency_code, xus_tag, XUS_NAME},
chain_id::ChainId,
transaction::{
authenticator::AuthenticationKey, helpers::TransactionSigner, RawTransaction, Script,
SignedTransaction, TransactionArgument, TransactionPayload,
},
};
+use lcs::{from_bytes, to_bytes};
use std::{convert::TryFrom, ffi::CStr, slice};
use transaction_builder::{
encode_add_currency_to_account_script, encode_peer_to_peer_with_metadata_script,
@@ -33,7 +30,7 @@ use transaction_builder::{
};
#[no_mangle]
-pub unsafe extern "C" fn libra_SignedTransactionBytes_from(
+pub unsafe extern "C" fn diem_SignedTransactionBytes_from(
sender_private_key_bytes: *const u8,
sequence: u64,
max_gas_amount: u64,
@@ -45,12 +42,12 @@ pub unsafe extern "C" fn libra_SignedTransactionBytes_from(
script_len: usize,
ptr_buf: *mut *mut u8,
ptr_len: *mut usize,
-) -> LibraStatus {
+) -> DiemStatus {
clear_error();
if sender_private_key_bytes.is_null() {
update_last_error("sender_private_key_bytes parameter must not be null.".to_string());
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
let private_key_buf: &[u8] =
slice::from_raw_parts(sender_private_key_bytes, Ed25519PrivateKey::LENGTH);
@@ -58,13 +55,13 @@ pub unsafe extern "C" fn libra_SignedTransactionBytes_from(
Ok(result) => result,
Err(e) => {
update_last_error(format!("Invalid private key bytes: {}", e.to_string()));
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
};
if script_bytes.is_null() {
update_last_error("script_bytes parameter must not be null.".to_string());
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
let script_buf: &[u8] = slice::from_raw_parts(script_bytes, script_len);
@@ -72,7 +69,7 @@ pub unsafe extern "C" fn libra_SignedTransactionBytes_from(
Ok(result) => result,
Err(e) => {
update_last_error(format!("Invalid script bytes: {}", e.to_string()));
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
};
@@ -99,7 +96,7 @@ pub unsafe extern "C" fn libra_SignedTransactionBytes_from(
Ok(result) => result,
Err(e) => {
update_last_error(format!("Error signing transaction: {}", e.to_string()));
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
};
@@ -110,7 +107,7 @@ pub unsafe extern "C" fn libra_SignedTransactionBytes_from(
"Error serializing signed transaction: {}",
e.to_string()
));
- return LibraStatus::InternalError;
+ return DiemStatus::InternalError;
}
};
let txn_buf: *mut u8 = libc::malloc(signed_txn_bytes.len()).cast();
@@ -119,11 +116,11 @@ pub unsafe extern "C" fn libra_SignedTransactionBytes_from(
*ptr_buf = txn_buf;
*ptr_len = signed_txn_bytes.len();
- LibraStatus::Ok
+ DiemStatus::Ok
}
#[no_mangle]
-pub unsafe extern "C" fn libra_TransactionP2PScript_from(
+pub unsafe extern "C" fn diem_TransactionP2PScript_from(
receiver: *const u8,
identifier: *const i8,
num_coins: u64,
@@ -133,12 +130,12 @@ pub unsafe extern "C" fn libra_TransactionP2PScript_from(
metadata_signature_len: usize,
ptr_buf: *mut *mut u8,
ptr_len: *mut usize,
-) -> LibraStatus {
+) -> DiemStatus {
clear_error();
if receiver.is_null() {
update_last_error("receiver parameter must not be null.".to_string());
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
let receiver_buf = slice::from_raw_parts(receiver, AccountAddress::LENGTH);
let receiver_address = match AccountAddress::try_from(receiver_buf) {
@@ -148,7 +145,7 @@ pub unsafe extern "C" fn libra_TransactionP2PScript_from(
"Invalid receiver account address: {}",
e.to_string()
));
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
};
@@ -172,7 +169,7 @@ pub unsafe extern "C" fn libra_TransactionP2PScript_from(
Ok(coin_ident) => type_tag_for_currency_code(coin_ident),
Err(e) => {
update_last_error(format!("Invalid coin identifier: {}", e.to_string()));
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
};
@@ -188,7 +185,7 @@ pub unsafe extern "C" fn libra_TransactionP2PScript_from(
Ok(result) => result,
Err(e) => {
update_last_error(format!("Error serializing P2P Script: {}", e.to_string()));
- return LibraStatus::InternalError;
+ return DiemStatus::InternalError;
}
};
@@ -198,15 +195,15 @@ pub unsafe extern "C" fn libra_TransactionP2PScript_from(
*ptr_buf = script_buf;
*ptr_len = script_bytes.len();
- LibraStatus::Ok
+ DiemStatus::Ok
}
#[no_mangle]
-pub unsafe extern "C" fn libra_TransactionAddCurrencyScript_from(
+pub unsafe extern "C" fn diem_TransactionAddCurrencyScript_from(
identifier: *const i8,
ptr_buf: *mut *mut u8,
ptr_len: *mut usize,
-) -> LibraStatus {
+) -> DiemStatus {
clear_error();
let coin_type_tag = match from_currency_code_string(
@@ -218,7 +215,7 @@ pub unsafe extern "C" fn libra_TransactionAddCurrencyScript_from(
Ok(coin_ident) => type_tag_for_currency_code(coin_ident),
Err(e) => {
update_last_error(format!("Invalid coin identifier: {}", e.to_string()));
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
};
@@ -231,7 +228,7 @@ pub unsafe extern "C" fn libra_TransactionAddCurrencyScript_from(
"Error serializing add currency to account Script: {}",
e.to_string()
));
- return LibraStatus::InternalError;
+ return DiemStatus::InternalError;
}
};
@@ -241,17 +238,17 @@ pub unsafe extern "C" fn libra_TransactionAddCurrencyScript_from(
*ptr_buf = script_buf;
*ptr_len = script_bytes.len();
- LibraStatus::Ok
+ DiemStatus::Ok
}
#[no_mangle]
-pub unsafe extern "C" fn libra_TransactionRotateDualAttestationInfoScript_from(
+pub unsafe extern "C" fn diem_TransactionRotateDualAttestationInfoScript_from(
new_url_bytes: *const u8,
new_url_len: usize,
new_key_bytes: *const u8,
ptr_buf: *mut *mut u8,
ptr_len: *mut usize,
-) -> LibraStatus {
+) -> DiemStatus {
clear_error();
let new_url = if new_url_bytes.is_null() {
@@ -262,7 +259,7 @@ pub unsafe extern "C" fn libra_TransactionRotateDualAttestationInfoScript_from(
if new_key_bytes.is_null() {
update_last_error("new_key_bytes parameter must not be null.".to_string());
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
let new_key_buf: &[u8] = slice::from_raw_parts(new_key_bytes, ED25519_PUBLIC_KEY_LENGTH);
let new_compliance_public_key = match Ed25519PublicKey::try_from(new_key_buf) {
@@ -272,7 +269,7 @@ pub unsafe extern "C" fn libra_TransactionRotateDualAttestationInfoScript_from(
"Invalid compliance public key bytes: {}",
e.to_string()
));
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
};
@@ -288,7 +285,7 @@ pub unsafe extern "C" fn libra_TransactionRotateDualAttestationInfoScript_from(
"Error serializing rotate compliance public key Script: {}",
e.to_string()
));
- return LibraStatus::InternalError;
+ return DiemStatus::InternalError;
}
};
@@ -298,17 +295,17 @@ pub unsafe extern "C" fn libra_TransactionRotateDualAttestationInfoScript_from(
*ptr_buf = script_buf;
*ptr_len = script_bytes.len();
- LibraStatus::Ok
+ DiemStatus::Ok
}
#[no_mangle]
-pub unsafe extern "C" fn libra_free_bytes_buffer(buf: *const u8) {
+pub unsafe extern "C" fn diem_free_bytes_buffer(buf: *const u8) {
assert!(!buf.is_null());
libc::free(buf as *mut libc::c_void);
}
#[no_mangle]
-pub unsafe extern "C" fn libra_RawTransactionBytes_from(
+pub unsafe extern "C" fn diem_RawTransactionBytes_from(
sender: *const u8,
receiver: *const u8,
sequence: u64,
@@ -323,32 +320,32 @@ pub unsafe extern "C" fn libra_RawTransactionBytes_from(
metadata_signature_len: usize,
buf: *mut *mut u8,
len: *mut usize,
-) -> LibraStatus {
+) -> DiemStatus {
clear_error();
if sender.is_null() {
update_last_error("sender parameter must not be null.".to_string());
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
let sender_buf = slice::from_raw_parts(sender, AccountAddress::LENGTH);
let sender_address = match AccountAddress::try_from(sender_buf) {
Ok(result) => result,
Err(e) => {
update_last_error(format!("Invalid sender address: {}", e.to_string()));
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
};
if receiver.is_null() {
update_last_error("receiver parameter must not be null.".to_string());
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
let receiver_buf = slice::from_raw_parts(receiver, AccountAddress::LENGTH);
let receiver_address = match AccountAddress::try_from(receiver_buf) {
Ok(result) => result,
Err(e) => {
update_last_error(format!("Invalid receiver address: {}", e.to_string()));
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
};
@@ -364,7 +361,7 @@ pub unsafe extern "C" fn libra_RawTransactionBytes_from(
};
let program = encode_peer_to_peer_with_metadata_script(
- coin1_tmp_tag(),
+ xus_tag(),
receiver_address,
num_coins,
metadata,
@@ -377,7 +374,7 @@ pub unsafe extern "C" fn libra_RawTransactionBytes_from(
payload,
max_gas_amount,
gas_unit_price,
- COIN1_NAME.to_owned(),
+ XUS_NAME.to_owned(),
expiration_timestamp_secs,
ChainId::new(chain_id),
);
@@ -389,7 +386,7 @@ pub unsafe extern "C" fn libra_RawTransactionBytes_from(
"Error serializing raw transaction: {}",
e.to_string()
));
- return LibraStatus::InternalError;
+ return DiemStatus::InternalError;
}
};
@@ -399,11 +396,11 @@ pub unsafe extern "C" fn libra_RawTransactionBytes_from(
*buf = txn_buf;
*len = raw_txn_bytes.len();
- LibraStatus::Ok
+ DiemStatus::Ok
}
#[no_mangle]
-pub unsafe extern "C" fn libra_RawTransaction_sign(
+pub unsafe extern "C" fn diem_RawTransaction_sign(
buf_raw_txn: *const u8,
len_raw_txn: usize,
buf_public_key: *const u8,
@@ -412,11 +409,11 @@ pub unsafe extern "C" fn libra_RawTransaction_sign(
len_signature: usize,
buf_result: *mut *mut u8,
len_result: *mut usize,
-) -> LibraStatus {
+) -> DiemStatus {
clear_error();
if buf_raw_txn.is_null() {
update_last_error("buf_raw_txn parameter must not be null.".to_string());
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
let raw_txn_bytes: &[u8] = slice::from_raw_parts(buf_raw_txn, len_raw_txn);
let raw_txn: RawTransaction = match lcs::from_bytes(&raw_txn_bytes) {
@@ -426,33 +423,33 @@ pub unsafe extern "C" fn libra_RawTransaction_sign(
"Error deserializing raw transaction, invalid raw_txn bytes or length: {}",
e.to_string()
));
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
};
if buf_public_key.is_null() {
update_last_error("buf_public_key parameter must not be null.".to_string());
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
let public_key_bytes: &[u8] = slice::from_raw_parts(buf_public_key, len_public_key);
let public_key = match Ed25519PublicKey::try_from(public_key_bytes) {
Ok(result) => result,
Err(e) => {
update_last_error(format!("Invalid public key bytes: {}", e.to_string()));
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
};
if buf_signature.is_null() {
update_last_error("buf_signature parameter must not be null.".to_string());
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
let signature_bytes: &[u8] = slice::from_raw_parts(buf_signature, len_signature);
let signature = match Ed25519Signature::try_from(signature_bytes) {
Ok(result) => result,
Err(e) => {
update_last_error(format!("Invalid signature bytes: {}", e.to_string()));
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
};
@@ -464,7 +461,7 @@ pub unsafe extern "C" fn libra_RawTransaction_sign(
"Error serializing signed transaction: {}",
e.to_string()
));
- return LibraStatus::InternalError;
+ return DiemStatus::InternalError;
}
};
@@ -474,26 +471,26 @@ pub unsafe extern "C" fn libra_RawTransaction_sign(
*buf_result = txn_buf;
*len_result = signed_txn_bytes.len();
- LibraStatus::Ok
+ DiemStatus::Ok
}
#[no_mangle]
-pub unsafe extern "C" fn libra_LibraSignedTransaction_from(
+pub unsafe extern "C" fn diem_DiemSignedTransaction_from(
buf: *const u8,
len: usize,
- out: *mut LibraSignedTransaction,
-) -> LibraStatus {
+ out: *mut DiemSignedTransaction,
+) -> DiemStatus {
clear_error();
if buf.is_null() {
update_last_error("buf parameter must not be null.".to_string());
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
let buffer = slice::from_raw_parts(buf, len);
let signed_txn: SignedTransaction = match lcs::from_bytes(buffer) {
Ok(result) => result,
Err(e) => {
update_last_error(format!("Error deserializing signed transaction, invalid signed transaction bytes or length: {}", e.to_string()));
- return LibraStatus::InvalidArgument;
+ return DiemStatus::InvalidArgument;
}
};
@@ -505,13 +502,13 @@ pub unsafe extern "C" fn libra_LibraSignedTransaction_from(
let expiration_timestamp_secs = signed_txn.expiration_timestamp_secs();
let chain_id = signed_txn.chain_id().id();
// TODO: this will not work with multisig transactions, where both the pubkey and signature
- // have different sizes than the ones expected here. We will either need LibraSignedTransaction
+ // have different sizes than the ones expected here. We will either need DiemSignedTransaction
// types for single and multisig authenticators or adapt the type to work with both
// authenticators
let public_key_bytes = signed_txn.authenticator().public_key_bytes();
let signature_bytes = signed_txn.authenticator().signature_bytes();
- let mut public_key = [0; LIBRA_PUBKEY_SIZE as usize];
- let mut signature = [0; LIBRA_SIGNATURE_SIZE as usize];
+ let mut public_key = [0; DIEM_PUBKEY_SIZE as usize];
+ let mut signature = [0; DIEM_SIGNATURE_SIZE as usize];
let public_key_bytes = &public_key_bytes[..public_key.len()];
public_key.copy_from_slice(public_key_bytes);
@@ -531,9 +528,9 @@ pub unsafe extern "C" fn libra_LibraSignedTransaction_from(
[0u8; AuthenticationKey::LENGTH - AccountAddress::LENGTH];
auth_key_prefix_buffer.copy_from_slice(auth_key_prefix.as_slice());
- txn_payload = Some(LibraTransactionPayload {
+ txn_payload = Some(DiemTransactionPayload {
txn_type: TransactionType::PeerToPeer,
- args: LibraP2PTransferTransactionArgument {
+ args: DiemP2PTransferTransactionArgument {
value: *amount,
address: addr.into(),
metadata_bytes: vec![].as_ptr(),
@@ -544,7 +541,7 @@ pub unsafe extern "C" fn libra_LibraSignedTransaction_from(
});
} else {
update_last_error("Fail to decode transaction payload".to_string());
- return LibraStatus::InternalError;
+ return DiemStatus::InternalError;
}
}
"peer_to_peer_with_metadata_transaction" => {
@@ -552,9 +549,9 @@ pub unsafe extern "C" fn libra_LibraSignedTransaction_from(
if let [TransactionArgument::Address(addr), TransactionArgument::U64(amount), TransactionArgument::U8Vector(metadata), TransactionArgument::U8Vector(metadata_signature)] =
&args[..]
{
- txn_payload = Some(LibraTransactionPayload {
+ txn_payload = Some(DiemTransactionPayload {
txn_type: TransactionType::PeerToPeer,
- args: LibraP2PTransferTransactionArgument {
+ args: DiemP2PTransferTransactionArgument {
value: *amount,
address: addr.into(),
metadata_bytes: (*Box::into_raw(metadata.clone().into_boxed_slice()))
@@ -569,18 +566,18 @@ pub unsafe extern "C" fn libra_LibraSignedTransaction_from(
});
} else {
update_last_error("Fail to decode transaction payload".to_string());
- return LibraStatus::InternalError;
+ return DiemStatus::InternalError;
}
}
_ => {
update_last_error("Transaction type not supported".to_string());
- return LibraStatus::InternalError;
+ return DiemStatus::InternalError;
}
}
}
let raw_txn = match txn_payload {
- Some(payload) => LibraRawTransaction {
+ Some(payload) => DiemRawTransaction {
sender,
sequence_number,
payload,
@@ -590,45 +587,45 @@ pub unsafe extern "C" fn libra_LibraSignedTransaction_from(
chain_id,
},
None => {
- let raw_txn_other = LibraRawTransaction {
+ let raw_txn_other = DiemRawTransaction {
sender,
sequence_number,
- payload: LibraTransactionPayload {
+ payload: DiemTransactionPayload {
txn_type: TransactionType::Unknown,
- args: LibraP2PTransferTransactionArgument::default(),
+ args: DiemP2PTransferTransactionArgument::default(),
},
max_gas_amount,
gas_unit_price,
expiration_timestamp_secs,
chain_id,
};
- *out = LibraSignedTransaction {
+ *out = DiemSignedTransaction {
raw_txn: raw_txn_other,
public_key,
signature,
};
- return LibraStatus::Ok;
+ return DiemStatus::Ok;
}
};
- *out = LibraSignedTransaction {
+ *out = DiemSignedTransaction {
raw_txn,
public_key,
signature,
};
- LibraStatus::Ok
+ DiemStatus::Ok
}
#[cfg(test)]
mod test {
use super::*;
- use lcs::from_bytes;
- use libra_crypto::{PrivateKey, SigningKey, Uniform};
- use libra_types::{
- account_config::COIN1_NAME,
+ use diem_crypto::{PrivateKey, SigningKey, Uniform};
+ use diem_types::{
+ account_config::XUS_NAME,
transaction::{SignedTransaction, TransactionArgument},
};
+ use lcs::from_bytes;
use move_core_types::language_storage::TypeTag;
use std::ffi::CStr;
@@ -650,14 +647,14 @@ mod test {
let expiration_timestamp_secs = 0;
let metadata = vec![1, 2, 3];
let metadata_signature = [0x1; 64].to_vec();
- let coin_ident = std::ffi::CString::new(COIN1_NAME).expect("Invalid ident");
+ let coin_ident = std::ffi::CString::new(XUS_NAME).expect("Invalid ident");
let mut script_buf: *mut u8 = std::ptr::null_mut();
let script_buf_ptr = &mut script_buf;
let mut script_len: usize = 0;
let script_result = unsafe {
- libra_TransactionP2PScript_from(
+ diem_TransactionP2PScript_from(
receiver_address.as_ref().as_ptr(),
coin_ident.as_ptr(),
amount,
@@ -669,7 +666,7 @@ mod test {
&mut script_len,
)
};
- assert_eq!(script_result, LibraStatus::Ok);
+ assert_eq!(script_result, DiemStatus::Ok);
let script_bytes: &[u8] = unsafe { slice::from_raw_parts(script_buf, script_len) };
let _deserialized_script: Script =
@@ -680,7 +677,7 @@ mod test {
let mut len: usize = 0;
let result = unsafe {
- libra_SignedTransactionBytes_from(
+ diem_SignedTransactionBytes_from(
private_key_bytes.as_ptr(),
sequence,
max_gas_amount,
@@ -695,7 +692,7 @@ mod test {
)
};
- assert_eq!(result, LibraStatus::Ok);
+ assert_eq!(result, DiemStatus::Ok);
let signed_txn_bytes_buf: &[u8] = unsafe { slice::from_raw_parts(buf, len) };
let deserialized_signed_txn: SignedTransaction =
@@ -728,9 +725,9 @@ mod test {
let mut buf2: *mut u8 = std::ptr::null_mut();
let buf_ptr2 = &mut buf2;
let mut len2: usize = 0;
- let coin_idnet = std::ffi::CString::new(COIN1_NAME).expect("Invalid ident");
+ let coin_idnet = std::ffi::CString::new(XUS_NAME).expect("Invalid ident");
let result2 = unsafe {
- libra_SignedTransactionBytes_from(
+ diem_SignedTransactionBytes_from(
private_key_bytes.as_ptr(),
sequence,
max_gas_amount,
@@ -745,7 +742,7 @@ mod test {
)
};
- assert_eq!(result2, LibraStatus::Ok);
+ assert_eq!(result2, DiemStatus::Ok);
assert_ne!(buf, buf2);
assert_eq!(len, len2);
@@ -755,20 +752,20 @@ mod test {
}
// Test creating add currency to account transaction
- let coin_ident_2 = std::ffi::CString::new(COIN1_NAME).expect("Invalid ident");
+ let coin_ident_2 = std::ffi::CString::new(XUS_NAME).expect("Invalid ident");
let mut script_buf: *mut u8 = std::ptr::null_mut();
let script_buf_ptr = &mut script_buf;
let mut script_len: usize = 0;
let script_result = unsafe {
- libra_TransactionAddCurrencyScript_from(
+ diem_TransactionAddCurrencyScript_from(
coin_ident_2.as_ptr(),
script_buf_ptr,
&mut script_len,
)
};
- assert_eq!(script_result, LibraStatus::Ok);
+ assert_eq!(script_result, DiemStatus::Ok);
let script_bytes: &[u8] = unsafe { slice::from_raw_parts(script_buf, script_len) };
let _deserialized_script: Script =
@@ -779,7 +776,7 @@ mod test {
let mut len: usize = 0;
let result = unsafe {
- libra_SignedTransactionBytes_from(
+ diem_SignedTransactionBytes_from(
private_key_bytes.as_ptr(),
sequence,
max_gas_amount,
@@ -794,7 +791,7 @@ mod test {
)
};
- assert_eq!(result, LibraStatus::Ok);
+ assert_eq!(result, DiemStatus::Ok);
let signed_txn_bytes_buf: &[u8] = unsafe { slice::from_raw_parts(buf, len) };
let deserialized_signed_txn: SignedTransaction =
@@ -825,9 +822,9 @@ mod test {
assert!(deserialized_signed_txn.check_signature().is_ok());
unsafe {
- libra_free_bytes_buffer(script_buf);
- libra_free_bytes_buffer(buf);
- libra_free_bytes_buffer(buf2);
+ diem_free_bytes_buffer(script_buf);
+ diem_free_bytes_buffer(buf);
+ diem_free_bytes_buffer(buf2);
};
}
@@ -839,14 +836,14 @@ mod test {
let amount = 100_000_000;
let metadata = vec![1, 2, 3];
let metadata_signature = [0x1; 64].to_vec();
- let coin_ident = std::ffi::CString::new(COIN1_NAME).expect("Invalid ident");
+ let coin_ident = std::ffi::CString::new(XUS_NAME).expect("Invalid ident");
let mut script_buf: *mut u8 = std::ptr::null_mut();
let script_buf_ptr = &mut script_buf;
let mut script_len: usize = 0;
let script_result = unsafe {
- libra_TransactionP2PScript_from(
+ diem_TransactionP2PScript_from(
receiver_address.as_ref().as_ptr(),
coin_ident.as_ptr(),
amount,
@@ -859,7 +856,7 @@ mod test {
)
};
- assert_eq!(script_result, LibraStatus::Ok);
+ assert_eq!(script_result, DiemStatus::Ok);
let script_bytes: &[u8] = unsafe { slice::from_raw_parts(script_buf, script_len) };
let deserialized_script: Script =
@@ -887,28 +884,28 @@ mod test {
}
unsafe {
- libra_free_bytes_buffer(script_buf);
+ diem_free_bytes_buffer(script_buf);
};
}
/// Generate a add currency to account script and deserialize
#[test]
fn test_lcs_add_currency_to_account_transaction_script() {
- let coin_ident = std::ffi::CString::new(COIN1_NAME).expect("Invalid ident");
+ let coin_ident = std::ffi::CString::new(XUS_NAME).expect("Invalid ident");
let mut script_buf: *mut u8 = std::ptr::null_mut();
let script_buf_ptr = &mut script_buf;
let mut script_len: usize = 0;
let script_result = unsafe {
- libra_TransactionAddCurrencyScript_from(
+ diem_TransactionAddCurrencyScript_from(
coin_ident.as_ptr(),
script_buf_ptr,
&mut script_len,
)
};
- assert_eq!(script_result, LibraStatus::Ok);
+ assert_eq!(script_result, DiemStatus::Ok);
let script_bytes: &[u8] = unsafe { slice::from_raw_parts(script_buf, script_len) };
let deserialized_script: Script =
@@ -929,7 +926,7 @@ mod test {
}
unsafe {
- libra_free_bytes_buffer(script_buf);
+ diem_free_bytes_buffer(script_buf);
};
}
@@ -945,7 +942,7 @@ mod test {
let mut script_len: usize = 0;
let script_result = unsafe {
- libra_TransactionRotateDualAttestationInfoScript_from(
+ diem_TransactionRotateDualAttestationInfoScript_from(
new_url.as_ptr(),
new_url.len(),
new_compliance_public_key.to_bytes().as_ptr(),
@@ -954,7 +951,7 @@ mod test {
)
};
- assert_eq!(script_result, LibraStatus::Ok);
+ assert_eq!(script_result, DiemStatus::Ok);
let script_bytes: &[u8] = unsafe { slice::from_raw_parts(script_buf, script_len) };
let deserialized_script: Script = from_bytes(script_bytes)
@@ -972,13 +969,13 @@ mod test {
}
unsafe {
- libra_free_bytes_buffer(script_buf);
+ diem_free_bytes_buffer(script_buf);
};
}
/// Generate a Raw Transaction, sign it, then deserialize
#[test]
- fn test_libra_raw_transaction_bytes_from() {
+ fn test_diem_raw_transaction_bytes_from() {
let private_key = Ed25519PrivateKey::generate_for_testing();
let public_key = private_key.public_key();
@@ -996,7 +993,7 @@ mod test {
let mut buf_ptr: *mut u8 = &mut buf;
let mut len: usize = 0;
unsafe {
- libra_RawTransactionBytes_from(
+ diem_RawTransactionBytes_from(
sender_address.as_ref().as_ptr(),
receiver_address.as_ref().as_ptr(),
sequence,
@@ -1025,7 +1022,7 @@ mod test {
let mut signed_txn_buf_ptr: *mut u8 = &mut signed_txn_buf;
let mut signed_txn_len: usize = 0;
unsafe {
- libra_RawTransaction_sign(
+ diem_RawTransaction_sign(
raw_txn_bytes.as_ptr(),
raw_txn_bytes.len(),
public_key.to_bytes().as_ptr(),
@@ -1059,14 +1056,14 @@ mod test {
// free memory
unsafe {
- libra_free_bytes_buffer(buf_ptr);
- libra_free_bytes_buffer(signed_txn_buf_ptr);
+ diem_free_bytes_buffer(buf_ptr);
+ diem_free_bytes_buffer(signed_txn_buf_ptr);
};
}
/// Generate a Signed Transaction and deserialize
#[test]
- fn test_libra_signed_transaction_deserialize() {
+ fn test_diem_signed_transaction_deserialize() {
let public_key = Ed25519PrivateKey::generate_for_testing().public_key();
let sender = AccountAddress::random();
let receiver = AccountAddress::random();
@@ -1080,7 +1077,7 @@ mod test {
let signature = Ed25519Signature::try_from(&[1u8; Ed25519Signature::LENGTH][..]).unwrap();
let program = encode_peer_to_peer_with_metadata_script(
- coin1_tmp_tag(),
+ xus_tag(),
receiver,
amount,
metadata.clone(),
@@ -1093,7 +1090,7 @@ mod test {
program,
max_gas_amount,
gas_unit_price,
- COIN1_NAME.to_owned(),
+ XUS_NAME.to_owned(),
expiration_timestamp_secs,
ChainId::test(),
),
@@ -1102,34 +1099,34 @@ mod test {
);
let txn_bytes = lcs::to_bytes(&signed_txn).expect("Unable to serialize SignedTransaction");
- let mut libra_signed_txn = LibraSignedTransaction::default();
+ let mut diem_signed_txn = DiemSignedTransaction::default();
let result = unsafe {
- libra_LibraSignedTransaction_from(
+ diem_DiemSignedTransaction_from(
txn_bytes.as_ptr(),
txn_bytes.len() - 1, // pass in wrong length so that SignedTransaction cannot deserialize
- &mut libra_signed_txn,
+ &mut diem_signed_txn,
)
};
- assert_eq!(result, LibraStatus::InvalidArgument);
+ assert_eq!(result, DiemStatus::InvalidArgument);
unsafe {
- let error_msg = libra_strerror();
+ let error_msg = diem_strerror();
let error_string: &CStr = CStr::from_ptr(error_msg);
assert_eq!(error_string.to_str().unwrap(), "Error deserializing signed transaction, invalid signed transaction bytes or length: unexpected end of input");
};
let result = unsafe {
- libra_LibraSignedTransaction_from(
+ diem_DiemSignedTransaction_from(
txn_bytes.as_ptr(),
txn_bytes.len(),
- &mut libra_signed_txn,
+ &mut diem_signed_txn,
)
};
- assert_eq!(result, LibraStatus::Ok);
+ assert_eq!(result, DiemStatus::Ok);
unsafe {
- let error_msg = libra_strerror();
+ let error_msg = diem_strerror();
let error_string: &CStr = CStr::from_ptr(error_msg);
assert_eq!(error_string.to_str().unwrap(), "");
};
@@ -1138,40 +1135,40 @@ mod test {
if let TransactionPayload::Script(_script) = payload {
assert_eq!(
TransactionType::PeerToPeer,
- libra_signed_txn.raw_txn.payload.txn_type
+ diem_signed_txn.raw_txn.payload.txn_type
);
- assert_eq!(amount, libra_signed_txn.raw_txn.payload.args.value);
+ assert_eq!(amount, diem_signed_txn.raw_txn.payload.args.value);
let txn_metadata = unsafe {
slice::from_raw_parts(
- libra_signed_txn.raw_txn.payload.args.metadata_bytes,
- libra_signed_txn.raw_txn.payload.args.metadata_len,
+ diem_signed_txn.raw_txn.payload.args.metadata_bytes,
+ diem_signed_txn.raw_txn.payload.args.metadata_len,
)
};
assert_eq!(metadata, txn_metadata);
let txn_metadata_signature = unsafe {
slice::from_raw_parts(
- libra_signed_txn
+ diem_signed_txn
.raw_txn
.payload
.args
.metadata_signature_bytes,
- libra_signed_txn.raw_txn.payload.args.metadata_signature_len,
+ diem_signed_txn.raw_txn.payload.args.metadata_signature_len,
)
};
assert_eq!(metadata_signature, txn_metadata_signature);
}
- assert_eq!(sender, AccountAddress::new(libra_signed_txn.raw_txn.sender));
- assert_eq!(sequence_number, libra_signed_txn.raw_txn.sequence_number);
- assert_eq!(max_gas_amount, libra_signed_txn.raw_txn.max_gas_amount);
- assert_eq!(gas_unit_price, libra_signed_txn.raw_txn.gas_unit_price);
- assert_eq!(public_key.to_bytes(), libra_signed_txn.public_key);
+ assert_eq!(sender, AccountAddress::new(diem_signed_txn.raw_txn.sender));
+ assert_eq!(sequence_number, diem_signed_txn.raw_txn.sequence_number);
+ assert_eq!(max_gas_amount, diem_signed_txn.raw_txn.max_gas_amount);
+ assert_eq!(gas_unit_price, diem_signed_txn.raw_txn.gas_unit_price);
+ assert_eq!(public_key.to_bytes(), diem_signed_txn.public_key);
assert_eq!(
signature,
- Ed25519Signature::try_from(libra_signed_txn.signature.as_ref()).unwrap()
+ Ed25519Signature::try_from(diem_signed_txn.signature.as_ref()).unwrap()
);
assert_eq!(
expiration_timestamp_secs,
- libra_signed_txn.raw_txn.expiration_timestamp_secs
+ diem_signed_txn.raw_txn.expiration_timestamp_secs
);
}
}
diff --git a/client/faucet/Cargo.toml b/client/faucet/Cargo.toml
index fc95e4e884..a2633ae83b 100644
--- a/client/faucet/Cargo.toml
+++ b/client/faucet/Cargo.toml
@@ -1,10 +1,10 @@
[package]
-name = "libra-faucet"
+name = "diem-faucet"
version = "0.1.0"
-authors = ["Libra Association "]
-description = "Libra Testnet utility services"
+authors = ["Diem Association "]
+description = "Diem Testnet utility services"
repository = "https://github.com/libra/libra"
-homepage = "https://libra.org"
+homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
edition = "2018"
@@ -21,12 +21,12 @@ warp = "0.2.5"
generate-key = { path = "../../config/generate-key", version = "0.1.0" }
lcs = { version = "0.1.0", package = "libra-canonical-serialization" }
-libra-crypto = { path = "../../crypto/crypto/", version = "0.1.0" }
-libra-infallible = { path = "../../common/infallible", version = "0.1.0" }
-libra-json-rpc-client = { path = "../json-rpc", version = "0.1.0" }
-libra-logger = { path = "../../common/logger", version = "0.1.0" }
-libra-types = { path = "../../types", version = "0.1.0" }
-libra-workspace-hack = { path = "../../common/workspace-hack", version = "0.1.0" }
+diem-crypto = { path = "../../crypto/crypto/", version = "0.1.0" }
+diem-infallible = { path = "../../common/infallible", version = "0.1.0" }
+diem-json-rpc-client = { path = "../json-rpc", version = "0.1.0" }
+diem-logger = { path = "../../common/logger", version = "0.1.0" }
+diem-types = { path = "../../types", version = "0.1.0" }
+diem-workspace-hack = { path = "../../common/workspace-hack", version = "0.1.0" }
move-core-types = { path = "../../language/move-core/types", version = "0.1.0" }
transaction-builder-generated = { path = "../transaction-builder", version = "0.1.0" }
@@ -34,4 +34,4 @@ transaction-builder-generated = { path = "../transaction-builder", version = "0.
serde_json = "1.0.60"
tempfile = "3.1.0"
-libra-config = { path = "../../config", version = "0.1.0" }
+diem-config = { path = "../../config", version = "0.1.0" }
diff --git a/client/faucet/src/lib.rs b/client/faucet/src/lib.rs
index 66b88e549b..2facc201db 100644
--- a/client/faucet/src/lib.rs
+++ b/client/faucet/src/lib.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
//! This crates provides Faucet service for creating Testnet with simplified on-chain account creation
@@ -11,22 +11,22 @@
//! Launch faucet service local and connect to Testnet:
//!
//! ```bash
-//! cargo run -p libra-faucet -- -a 127.0.0.1 -p 8080 -c TESTNET \
-//! -m -s https://testnet.libra.org/v1
+//! cargo run -p diem-faucet -- -a 127.0.0.1 -p 8080 -c TESTNET \
+//! -m -s https://testnet.diem.com/v1
//! ```
//!
//! Check help doc for options details:
//!
//! ```bash
-//! cargo run -p libra-faucet -- -h
+//! cargo run -p diem-faucet -- -h
//! ```
//!
//! ## Development
//!
-//! Test with libra-swarm by add -m option:
+//! Test with diem-swarm by add -m option:
//!
//! ```bash
-//! cargo run -p libra-swarm -- -s -l -n 1 -m
+//! cargo run -p diem-swarm -- -s -l -n 1 -m
//! ```
//!
diff --git a/client/faucet/src/main.rs b/client/faucet/src/main.rs
index 6979df0c29..532cf0d130 100644
--- a/client/faucet/src/main.rs
+++ b/client/faucet/src/main.rs
@@ -1,17 +1,17 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
-use libra_faucet::mint;
-use libra_logger::prelude::info;
+use diem_faucet::mint;
+use diem_logger::prelude::info;
use std::fmt;
use structopt::StructOpt;
use warp::Filter;
#[derive(Debug, StructOpt)]
#[structopt(
- name = "Libra Faucet",
- author = "The Libra Association",
- about = "Libra Testnet utitlty service for creating test account and minting test coins"
+ name = "Diem Faucet",
+ author = "The Diem Association",
+ about = "Diem Testnet utitlty service for creating test account and minting test coins"
)]
struct Args {
/// Faucet service listen address
@@ -20,28 +20,28 @@ struct Args {
/// Faucet service listen port
#[structopt(short = "p", long, default_value = "80")]
pub port: u16,
- /// Libra fullnode/validator server URL
- #[structopt(short = "s", long, default_value = "https://testnet.libra.org/v1")]
+ /// Diem fullnode/validator server URL
+ #[structopt(short = "s", long, default_value = "https://testnet.diem.com/v1")]
pub server_url: String,
/// Path to the private key for creating test account and minting coins.
/// To keep Testnet simple, we used one private key for both treasury compliance account and testnet
/// designated dealer account, hence here we only accept one private key.
/// To manually generate a keypair, use generate-key:
/// `cargo run -p generate-keypair -- -o `
- #[structopt(short = "m", long, default_value = "/opt/libra/etc/mint.key")]
+ #[structopt(short = "m", long, default_value = "/opt/diem/etc/mint.key")]
pub mint_key_file_path: String,
/// Chain ID of the network this client is connecting to.
/// For mainnet: \"MAINNET\" or 1, testnet: \"TESTNET\" or 2, devnet: \"DEVNET\" or 3, \
/// local swarm: \"TESTING\" or 4
/// Note: Chain ID of 0 is not allowed; Use number if chain id is not predefined.
#[structopt(short = "c", long, default_value = "2")]
- pub chain_id: libra_types::chain_id::ChainId,
+ pub chain_id: diem_types::chain_id::ChainId,
}
#[tokio::main]
async fn main() {
let args = Args::from_args();
- libra_logger::Logger::new().init();
+ diem_logger::Logger::new().init();
let address: std::net::SocketAddr = format!("{}:{}", args.address, args.port)
.parse()
@@ -90,7 +90,7 @@ fn routes(
// POST /mint?amount=25&auth_key=xxx¤cy_code=XXX
let route_mint = warp::path::path("mint").and(warp::path::end()).and(mint);
- let health = warp::path!("-" / "healthy").map(|| "libra-faucet:ok");
+ let health = warp::path!("-" / "healthy").map(|| "diem-faucet:ok");
health.or(route_mint.or(route_root)).boxed()
}
@@ -124,9 +124,9 @@ impl warp::reject::Reject for ServerInternalError {}
#[cfg(test)]
mod tests {
use crate::routes;
- use libra_faucet::mint;
- use libra_infallible::RwLock;
- use libra_types::{account_address::AccountAddress, transaction::TransactionPayload::Script};
+ use diem_faucet::mint;
+ use diem_infallible::RwLock;
+ use diem_types::{account_address::AccountAddress, transaction::TransactionPayload::Script};
use std::{collections::HashMap, convert::TryFrom, sync::Arc};
use transaction_builder_generated::stdlib::ScriptCall;
use warp::Filter;
@@ -140,7 +140,7 @@ mod tests {
.to_path_buf();
generate_key::generate_and_save_key(&f);
- let chain_id = libra_types::chain_id::ChainId::test();
+ let chain_id = diem_types::chain_id::ChainId::test();
let stub = warp::any()
.and(warp::body::json())
@@ -148,7 +148,7 @@ mod tests {
let resp = handle_request(req, chain_id, Arc::clone(&accounts));
Ok(warp::reply::json(&resp))
});
- let port = libra_config::utils::get_available_port();
+ let port = diem_config::utils::get_available_port();
let future = warp::serve(stub).bind(([127, 0, 0, 1], port));
tokio::task::spawn(async move { future.await });
@@ -171,7 +171,7 @@ mod tests {
.reply(&filter)
.await;
assert_eq!(resp.status(), 200);
- assert_eq!(resp.body(), "libra-faucet:ok");
+ assert_eq!(resp.body(), "diem-faucet:ok");
}
#[tokio::test]
@@ -190,7 +190,7 @@ mod tests {
.method("POST")
.path(
format!(
- "{}?auth_key={}&amount={}¤cy_code=LBR",
+ "{}?auth_key={}&amount={}¤cy_code=XDX",
path, auth_key, amount
)
.as_str(),
@@ -218,7 +218,7 @@ mod tests {
.method("POST")
.path(
format!(
- "/mint?auth_key={}&amount={}¤cy_code=LBR&return_txns=true",
+ "/mint?auth_key={}&amount={}¤cy_code=XDX&return_txns=true",
auth_key, amount
)
.as_str(),
@@ -226,7 +226,7 @@ mod tests {
.reply(&filter)
.await;
let body = resp.body();
- let txns: Vec =
+ let txns: Vec =
lcs::from_bytes(&hex::decode(body).expect("hex encoded response body"))
.expect("valid lcs vec");
assert_eq!(txns.len(), 2);
@@ -249,7 +249,7 @@ mod tests {
.method("POST")
.path(
format!(
- "/mint?auth_key={}&amount={}¤cy_code=LBR&return_txns=true&is_designated_dealer=true",
+ "/mint?auth_key={}&amount={}¤cy_code=XDX&return_txns=true&is_designated_dealer=true",
auth_key, amount
)
.as_str(),
@@ -257,7 +257,7 @@ mod tests {
.reply(&filter)
.await;
let body = resp.body();
- let txns: Vec =
+ let txns: Vec =
lcs::from_bytes(&hex::decode(body).expect("hex encoded response body"))
.expect("valid lcs vec");
assert_eq!(txns.len(), 2);
@@ -279,7 +279,7 @@ mod tests {
.method("POST")
.path(
format!(
- "/mint?auth_key={}&amount=1000000¤cy_code=LBR",
+ "/mint?auth_key={}&amount=1000000¤cy_code=XDX",
auth_key
)
.as_str(),
@@ -300,7 +300,7 @@ mod tests {
.method("POST")
.path(
format!(
- "/mint?auth_key={}&amount=1000000¤cy_code=LBR",
+ "/mint?auth_key={}&amount=1000000¤cy_code=XDX",
auth_key
)
.as_str(),
@@ -315,7 +315,7 @@ mod tests {
fn handle_request(
req: serde_json::Value,
- chain_id: libra_types::chain_id::ChainId,
+ chain_id: diem_types::chain_id::ChainId,
accounts: Arc>>,
) -> serde_json::Value {
if let serde_json::Value::Array(reqs) = req {
@@ -327,7 +327,7 @@ mod tests {
match req["method"].as_str() {
Some("submit") => {
let raw: &str = req["params"][0].as_str().unwrap();
- let txn: libra_types::transaction::SignedTransaction =
+ let txn: diem_types::transaction::SignedTransaction =
lcs::from_bytes(&hex::decode(raw).unwrap()).unwrap();
assert_eq!(txn.chain_id(), chain_id);
if let Script(script) = txn.payload() {
@@ -378,9 +378,9 @@ mod tests {
serde_json::json!({
"id": id,
"jsonrpc": "2.0",
- "libra_chain_id": chain_id,
- "libra_ledger_timestampusec": 1599670083580598u64,
- "libra_ledger_version": 2052770,
+ "diem_chain_id": chain_id,
+ "diem_ledger_timestampusec": 1599670083580598u64,
+ "diem_ledger_version": 2052770,
"result": result
})
}
@@ -411,7 +411,7 @@ mod tests {
address,
serde_json::json!([{
"amount": amount,
- "currency": "LBR"
+ "currency": "XDX"
}]),
serde_json::json!({
"type": "parent_vasp",
@@ -431,7 +431,7 @@ mod tests {
address,
serde_json::json!([{
"amount": amount,
- "currency": "LBR",
+ "currency": "XDX",
}]),
serde_json::json!({
"base_url": "",
@@ -440,7 +440,7 @@ mod tests {
"human_name": "moneybags",
"preburn_balances": [{
"amount": 0,
- "currency": "LBR"
+ "currency": "XDX"
}],
"type": "designated_dealer",
"compliance_key_rotation_events_key": format!("0200000000000000{}", address),
diff --git a/client/faucet/src/mint.rs b/client/faucet/src/mint.rs
index 182ce8a50d..57916fb24b 100644
--- a/client/faucet/src/mint.rs
+++ b/client/faucet/src/mint.rs
@@ -1,18 +1,18 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use anyhow::Result;
-use libra_crypto::traits::SigningKey;
-use libra_types::account_config::{
+use diem_crypto::traits::SigningKey;
+use diem_types::account_config::{
testnet_dd_account_address, treasury_compliance_account_address, type_tag_for_currency_code,
- COIN1_NAME,
+ XUS_NAME,
};
use std::{convert::From, fmt};
#[derive(Debug)]
pub enum Response {
DDAccountNextSeqNum(u64),
- SubmittedTxns(Vec),
+ SubmittedTxns(Vec),
}
impl std::fmt::Display for Response {
@@ -30,7 +30,7 @@ impl std::fmt::Display for Response {
pub struct MintParams {
pub amount: u64,
pub currency_code: move_core_types::identifier::Identifier,
- pub auth_key: libra_types::transaction::authenticator::AuthenticationKey,
+ pub auth_key: diem_types::transaction::authenticator::AuthenticationKey,
pub return_txns: Option,
pub is_designated_dealer: Option,
}
@@ -43,8 +43,8 @@ impl MintParams {
fn create_parent_vasp_account_script(
&self,
seq: u64,
- ) -> libra_types::transaction::TransactionPayload {
- libra_types::transaction::TransactionPayload::Script(
+ ) -> diem_types::transaction::TransactionPayload {
+ diem_types::transaction::TransactionPayload::Script(
transaction_builder_generated::stdlib::encode_create_parent_vasp_account_script(
self.currency_code(),
0, // sliding nonce
@@ -59,8 +59,8 @@ impl MintParams {
fn create_designated_dealer_account_script(
&self,
seq: u64,
- ) -> libra_types::transaction::TransactionPayload {
- libra_types::transaction::TransactionPayload::Script(
+ ) -> diem_types::transaction::TransactionPayload {
+ diem_types::transaction::TransactionPayload::Script(
transaction_builder_generated::stdlib::encode_create_designated_dealer_script(
self.currency_code(),
0, // sliding nonce
@@ -72,8 +72,8 @@ impl MintParams {
)
}
- fn p2p_script(&self) -> libra_types::transaction::TransactionPayload {
- libra_types::transaction::TransactionPayload::Script(
+ fn p2p_script(&self) -> diem_types::transaction::TransactionPayload {
+ diem_types::transaction::TransactionPayload::Script(
transaction_builder_generated::stdlib::encode_peer_to_peer_with_metadata_script(
self.currency_code(),
self.receiver(),
@@ -84,26 +84,26 @@ impl MintParams {
)
}
- fn receiver(&self) -> libra_types::account_address::AccountAddress {
+ fn receiver(&self) -> diem_types::account_address::AccountAddress {
self.auth_key.derived_address()
}
}
pub struct Service {
- chain_id: libra_types::chain_id::ChainId,
- private_key: libra_crypto::ed25519::Ed25519PrivateKey,
- client: libra_json_rpc_client::JsonRpcAsyncClient,
+ chain_id: diem_types::chain_id::ChainId,
+ private_key: diem_crypto::ed25519::Ed25519PrivateKey,
+ client: diem_json_rpc_client::JsonRpcAsyncClient,
}
impl Service {
pub fn new(
server_url: String,
- chain_id: libra_types::chain_id::ChainId,
+ chain_id: diem_types::chain_id::ChainId,
private_key_file: String,
) -> Self {
let url = reqwest::Url::parse(server_url.as_str()).expect("invalid server url");
let private_key = generate_key::load_key(private_key_file);
- let client = libra_json_rpc_client::JsonRpcAsyncClient::new(url);
+ let client = diem_json_rpc_client::JsonRpcAsyncClient::new(url);
Service {
chain_id,
private_key,
@@ -125,7 +125,7 @@ impl Service {
}
txns.push(self.create_txn(params.p2p_script(), testnet_dd_account_address(), dd_seq)?);
- let mut batch = libra_json_rpc_client::JsonRpcBatch::new();
+ let mut batch = diem_json_rpc_client::JsonRpcBatch::new();
for txn in &txns {
batch.add_submit_request(txn.clone())?;
}
@@ -141,18 +141,18 @@ impl Service {
fn create_txn(
&self,
- payload: libra_types::transaction::TransactionPayload,
- sender: libra_types::account_address::AccountAddress,
+ payload: diem_types::transaction::TransactionPayload,
+ sender: diem_types::account_address::AccountAddress,
seq: u64,
- ) -> Result {
- libra_types::transaction::helpers::create_user_txn(
+ ) -> Result {
+ diem_types::transaction::helpers::create_user_txn(
self,
payload,
sender,
seq,
1_000_000,
0,
- COIN1_NAME.to_owned(),
+ XUS_NAME.to_owned(),
30,
self.chain_id,
)
@@ -160,7 +160,7 @@ impl Service {
async fn sequences(
&self,
- receiver: libra_types::account_address::AccountAddress,
+ receiver: diem_types::account_address::AccountAddress,
) -> Result<(u64, u64, Option)> {
let accounts = vec![
treasury_compliance_account_address(),
@@ -199,15 +199,15 @@ impl Service {
}
}
-impl libra_types::transaction::helpers::TransactionSigner for Service {
+impl diem_types::transaction::helpers::TransactionSigner for Service {
fn sign_txn(
&self,
- raw_txn: libra_types::transaction::RawTransaction,
- ) -> Result {
+ raw_txn: diem_types::transaction::RawTransaction,
+ ) -> Result {
let signature = self.private_key.sign(&raw_txn);
- Ok(libra_types::transaction::SignedTransaction::new(
+ Ok(diem_types::transaction::SignedTransaction::new(
raw_txn,
- libra_crypto::ed25519::Ed25519PublicKey::from(&self.private_key),
+ diem_crypto::ed25519::Ed25519PublicKey::from(&self.private_key),
signature,
))
}
diff --git a/client/json-rpc/Cargo.toml b/client/json-rpc/Cargo.toml
index b7616e61c8..5f5fabe9ef 100644
--- a/client/json-rpc/Cargo.toml
+++ b/client/json-rpc/Cargo.toml
@@ -1,10 +1,10 @@
[package]
-name = "libra-json-rpc-client"
+name = "diem-json-rpc-client"
version = "0.1.0"
-authors = ["Libra Association "]
-description = "Libra JSONRPC client"
+authors = ["Diem Association "]
+description = "Diem JSONRPC client"
repository = "https://github.com/libra/libra"
-homepage = "https://libra.org"
+homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
edition = "2018"
@@ -17,16 +17,16 @@ serde = { version = "1.0.117", default-features = false }
serde_json = "1.0.60"
tokio = { version = "0.2.22", features = ["full"] }
-libra-crypto = { path = "../../crypto/crypto", version = "0.1.0" }
+diem-crypto = { path = "../../crypto/crypto", version = "0.1.0" }
lcs = { version = "0.1.0", package = "libra-canonical-serialization" }
-libra-json-rpc-types = { path = "../../json-rpc/types" }
-libra-types = { path = "../../types", version = "0.1.0" }
-libra-workspace-hack = { path = "../../common/workspace-hack", version = "0.1.0" }
+diem-json-rpc-types = { path = "../../json-rpc/types" }
+diem-types = { path = "../../types", version = "0.1.0" }
+diem-workspace-hack = { path = "../../common/workspace-hack", version = "0.1.0" }
[dev-dependencies]
warp = "0.2.5"
-libra-config = { path = "../../config", version = "0.1.0" }
+diem-config = { path = "../../config", version = "0.1.0" }
[features]
diff --git a/client/json-rpc/src/async_client/client.rs b/client/json-rpc/src/async_client/client.rs
index 42f3b4c809..a5ed2038e5 100644
--- a/client/json-rpc/src/async_client/client.rs
+++ b/client/json-rpc/src/async_client/client.rs
@@ -1,12 +1,12 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use crate::async_client::{
defaults, types as jsonrpc, Error, JsonRpcResponse, RetryStrategy, State,
WaitForTransactionError,
};
-use libra_crypto::hash::CryptoHash;
-use libra_types::{
+use diem_crypto::hash::CryptoHash;
+use diem_types::{
account_address::AccountAddress,
transaction::{SignedTransaction, Transaction},
};
@@ -376,13 +376,13 @@ impl Client {
/// in order of given requests:
///
/// ```rust
- /// use libra_json_rpc_client::async_client::{
+ /// use diem_json_rpc_client::async_client::{
/// types as jsonrpc, Client, Error, Request, Response, Retry,
/// };
/// use std::convert::{TryInto};
///
/// # async fn doc() -> Result<(), Error> {
- /// let client = Client::from_url("http://testnet.libra.org/v1", Retry::default()).unwrap();
+ /// let client = Client::from_url("http://testnet.diem.com/v1", Retry::default()).unwrap();
/// let mut res = client
/// .batch_send(vec![Request::get_metadata(), Request::get_currencies()])
/// .await?;
@@ -499,7 +499,7 @@ impl Client {
};
if let Some(state) = self.last_known_state() {
- if resp.libra_chain_id != state.chain_id {
+ if resp.diem_chain_id != state.chain_id {
return Err(Error::ChainIdMismatch(resp.clone()));
}
}
diff --git a/client/json-rpc/src/async_client/defaults.rs b/client/json-rpc/src/async_client/defaults.rs
index 95b3006da1..368adc737b 100644
--- a/client/json-rpc/src/async_client/defaults.rs
+++ b/client/json-rpc/src/async_client/defaults.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use std::time::Duration;
diff --git a/client/json-rpc/src/async_client/error.rs b/client/json-rpc/src/async_client/error.rs
index 841371b9ab..6060865816 100644
--- a/client/json-rpc/src/async_client/error.rs
+++ b/client/json-rpc/src/async_client/error.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use crate::async_client::{types as jsonrpc, JsonRpcError, JsonRpcResponse};
diff --git a/client/json-rpc/src/async_client/mod.rs b/client/json-rpc/src/async_client/mod.rs
index dd8f03076d..f8282d63bc 100644
--- a/client/json-rpc/src/async_client/mod.rs
+++ b/client/json-rpc/src/async_client/mod.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
mod client;
@@ -8,8 +8,8 @@ mod state;
pub mod defaults;
pub use client::{Client, Request, Response};
+pub use diem_json_rpc_types::{errors::JsonRpcError, proto::types, response::JsonRpcResponse};
pub use error::{Error, UnexpectedError, WaitForTransactionError};
-pub use libra_json_rpc_types::{errors::JsonRpcError, proto::types, response::JsonRpcResponse};
pub use retry::{Retry, RetryStrategy};
pub use state::State;
diff --git a/client/json-rpc/src/async_client/retry.rs b/client/json-rpc/src/async_client/retry.rs
index 6b2f57c85a..ed75463391 100644
--- a/client/json-rpc/src/async_client/retry.rs
+++ b/client/json-rpc/src/async_client/retry.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use crate::async_client::{defaults, Error};
diff --git a/client/json-rpc/src/async_client/state.rs b/client/json-rpc/src/async_client/state.rs
index 9c179e5b0b..3a698ecb53 100644
--- a/client/json-rpc/src/async_client/state.rs
+++ b/client/json-rpc/src/async_client/state.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use crate::async_client::JsonRpcResponse;
@@ -13,9 +13,9 @@ pub struct State {
impl State {
pub fn from_response(resp: &JsonRpcResponse) -> Self {
Self {
- chain_id: resp.libra_chain_id,
- version: resp.libra_ledger_version,
- timestamp_usecs: resp.libra_ledger_timestampusec,
+ chain_id: resp.diem_chain_id,
+ version: resp.diem_ledger_version,
+ timestamp_usecs: resp.diem_ledger_timestampusec,
}
}
}
diff --git a/client/json-rpc/src/async_client/tests.rs b/client/json-rpc/src/async_client/tests.rs
index a67b0d8a78..388d22afd9 100644
--- a/client/json-rpc/src/async_client/tests.rs
+++ b/client/json-rpc/src/async_client/tests.rs
@@ -1,11 +1,11 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use crate::async_client::{
types as jsonrpc, Client, Error, JsonRpcResponse, Request, Response, Retry, State,
WaitForTransactionError,
};
-use libra_types::{account_address::AccountAddress, transaction::SignedTransaction};
+use diem_types::{account_address::AccountAddress, transaction::SignedTransaction};
use serde_json::{json, to_value, Value};
use std::{
convert::TryInto,
@@ -65,7 +65,7 @@ fn setup_with_server(inouts: Vec<(Value, Value)>) -> Client {
assert_eq!(request, req);
Ok(warp::reply::json(&response))
});
- let port = libra_config::utils::get_available_port();
+ let port = diem_config::utils::get_available_port();
let future = warp::serve(stub).bind(([127, 0, 0, 1], port));
tokio::task::spawn(async move { future.await });
let server_url = format!("http://localhost:{}", port);
@@ -98,7 +98,7 @@ async fn test_network_error() {
#[tokio::test]
async fn test_invalid_http_status() {
- let client = Client::from_url("https://testnet.libra.org/unknown", Retry::default()).unwrap();
+ let client = Client::from_url("https://testnet.diem.com/unknown", Retry::default()).unwrap();
assert_err!(client.get_metadata().await, Error::InvalidHTTPStatus{..}, false);
}
@@ -116,9 +116,9 @@ async fn test_invalid_rpc_response() {
json!({
"id": 1,
"jsonrpc": "1.0",
- "libra_chain_id": 4,
- "libra_ledger_timestampusec": 12112,
- "libra_ledger_version": 1
+ "diem_chain_id": 4,
+ "diem_ledger_timestampusec": 12112,
+ "diem_ledger_version": 1
}),
);
@@ -135,9 +135,9 @@ async fn test_deserialize_result_error() {
},
"id": 1,
"jsonrpc": "2.0",
- "libra_chain_id": 4,
- "libra_ledger_timestampusec": 12112,
- "libra_ledger_version": 1
+ "diem_chain_id": 4,
+ "diem_ledger_timestampusec": 12112,
+ "diem_ledger_version": 1
}),
);
@@ -154,9 +154,9 @@ async fn test_jsonrpc_error() {
},
"id": 1,
"jsonrpc": "2.0",
- "libra_chain_id": 4,
- "libra_ledger_timestampusec": 12112,
- "libra_ledger_version": 1
+ "diem_chain_id": 4,
+ "diem_ledger_timestampusec": 12112,
+ "diem_ledger_version": 1
}),
);
@@ -170,9 +170,9 @@ async fn test_result_not_found() {
json!({
"id": 1,
"jsonrpc": "2.0",
- "libra_chain_id": 4,
- "libra_ledger_timestampusec": 12112,
- "libra_ledger_version": 1
+ "diem_chain_id": 4,
+ "diem_ledger_timestampusec": 12112,
+ "diem_ledger_version": 1
}),
);
@@ -490,7 +490,7 @@ async fn test_wait_for_transaction() {
]);
let expiration_time_secs = (version_timestamp(10) / 1_000_000) as u64;
- let txn_hash = "0895ced78e9f10c1351f248b9bda40cc9c8e6d4dbba823e08fe1cfacd582f171";
+ let txn_hash = "f55c91fdc36b9246c423258b74eb579a0972a86b3394e2cfdab528a37f18d1f9";
client
.wait_for_transaction(&address, seq, expiration_time_secs, txn_hash, None, None)
.await
@@ -560,7 +560,7 @@ async fn test_wait_for_transaction_error_execution_failed() {
);
let expiration_time_secs = (version_timestamp(10) / 1_000_000) as u64;
- let txn_hash = "0895ced78e9f10c1351f248b9bda40cc9c8e6d4dbba823e08fe1cfacd582f171";
+ let txn_hash = "f55c91fdc36b9246c423258b74eb579a0972a86b3394e2cfdab528a37f18d1f9";
let err = client
.wait_for_transaction(&address, seq, expiration_time_secs, txn_hash, None, None)
.await;
@@ -583,7 +583,7 @@ async fn test_wait_for_transaction_error_txn_expired() {
// expiration timestamp is from version 1, older than respond timestamp for version 2
let expiration_time_secs = (version_timestamp(1) / 1_000_000) as u64;
- let txn_hash = "0895ced78e9f10c1351f248b9bda40cc9c8e6d4dbba823e08fe1cfacd582f171";
+ let txn_hash = "f55c91fdc36b9246c423258b74eb579a0972a86b3394e2cfdab528a37f18d1f9";
let err = client
.wait_for_transaction(&address, seq, expiration_time_secs, txn_hash, None, None)
.await;
@@ -605,7 +605,7 @@ async fn test_wait_for_transaction_error_timeout() {
// expiration timestamp is from version 1, older than respond timestamp for version 2
let expiration_time_secs = (version_timestamp(3) / 1_000_000) as u64;
- let txn_hash = "0895ced78e9f10c1351f248b9bda40cc9c8e6d4dbba823e08fe1cfacd582f171";
+ let txn_hash = "f55c91fdc36b9246c423258b74eb579a0972a86b3394e2cfdab528a37f18d1f9";
let err = client
.wait_for_transaction(
&address,
@@ -635,9 +635,9 @@ async fn test_chain_id_mismatch_error() {
},
"id": 1,
"jsonrpc": "2.0",
- "libra_chain_id": 9,
- "libra_ledger_timestampusec": 12112,
- "libra_ledger_version": 1
+ "diem_chain_id": 9,
+ "diem_ledger_timestampusec": 12112,
+ "diem_ledger_version": 1
}),
),
]);
@@ -694,7 +694,7 @@ async fn test_batch_send_requests_and_response_id_not_matched_error() {
.batch_send(vec![Request::get_metadata(), Request::get_currencies()])
.await;
- assert_eq!("Err(UnexpectedError(InvalidResponseId(JsonRpcResponse { libra_chain_id: 4, libra_ledger_version: 1, libra_ledger_timestampusec: 1602888396000000, jsonrpc: \"2.0\", id: Some(Number(2)), result: Some(Object({\"chain_id\": Number(4), \"timestamp\": Number(234234), \"version\": Number(1)})), error: None })))", format!("{:?}", &err));
+ assert_eq!("Err(UnexpectedError(InvalidResponseId(JsonRpcResponse { diem_chain_id: 4, diem_ledger_version: 1, diem_ledger_timestampusec: 1602888396000000, jsonrpc: \"2.0\", id: Some(Number(2)), result: Some(Object({\"chain_id\": Number(4), \"timestamp\": Number(234234), \"version\": Number(1)})), error: None })))", format!("{:?}", &err));
assert_err!(err, Error::UnexpectedError { .. }, true);
}
@@ -715,7 +715,7 @@ async fn test_batch_send_requests_and_response_id_type_not_matched_error() {
.batch_send(vec![Request::get_metadata(), Request::get_currencies()])
.await;
- assert_eq!("Err(UnexpectedError(InvalidResponseIdType(JsonRpcResponse { libra_chain_id: 4, libra_ledger_version: 1, libra_ledger_timestampusec: 1602888396000000, jsonrpc: \"2.0\", id: Some(String(\"1\")), result: Some(Object({\"chain_id\": Number(4), \"timestamp\": Number(234234), \"version\": Number(1)})), error: None })))", format!("{:?}", &err));
+ assert_eq!("Err(UnexpectedError(InvalidResponseIdType(JsonRpcResponse { diem_chain_id: 4, diem_ledger_version: 1, diem_ledger_timestampusec: 1602888396000000, jsonrpc: \"2.0\", id: Some(String(\"1\")), result: Some(Object({\"chain_id\": Number(4), \"timestamp\": Number(234234), \"version\": Number(1)})), error: None })))", format!("{:?}", &err));
assert_err!(err, Error::UnexpectedError { .. }, true);
}
@@ -736,7 +736,7 @@ async fn test_batch_send_requests_and_response_id_duplicated_error() {
.batch_send(vec![Request::get_metadata(), Request::get_currencies()])
.await;
- assert_eq!("Err(UnexpectedError(DuplicatedResponseId(JsonRpcResponse { libra_chain_id: 4, libra_ledger_version: 1, libra_ledger_timestampusec: 1602888396000000, jsonrpc: \"2.0\", id: Some(Number(0)), result: Some(Object({\"chain_id\": Number(4), \"timestamp\": Number(234234), \"version\": Number(1)})), error: None })))", format!("{:?}", &err));
+ assert_eq!("Err(UnexpectedError(DuplicatedResponseId(JsonRpcResponse { diem_chain_id: 4, diem_ledger_version: 1, diem_ledger_timestampusec: 1602888396000000, jsonrpc: \"2.0\", id: Some(Number(0)), result: Some(Object({\"chain_id\": Number(4), \"timestamp\": Number(234234), \"version\": Number(1)})), error: None })))", format!("{:?}", &err));
assert_err!(err, Error::UnexpectedError { .. }, true);
}
@@ -757,7 +757,7 @@ async fn test_batch_send_requests_and_response_id_not_found_error() {
.batch_send(vec![Request::get_metadata(), Request::get_currencies()])
.await;
- assert_eq!("Err(UnexpectedError(ResponseIdNotFound(JsonRpcResponse { libra_chain_id: 4, libra_ledger_version: 1, libra_ledger_timestampusec: 1602888396000000, jsonrpc: \"2.0\", id: None, result: Some(Object({\"chain_id\": Number(4), \"timestamp\": Number(234234), \"version\": Number(1)})), error: None })))", format!("{:?}", &err));
+ assert_eq!("Err(UnexpectedError(ResponseIdNotFound(JsonRpcResponse { diem_chain_id: 4, diem_ledger_version: 1, diem_ledger_timestampusec: 1602888396000000, jsonrpc: \"2.0\", id: None, result: Some(Object({\"chain_id\": Number(4), \"timestamp\": Number(234234), \"version\": Number(1)})), error: None })))", format!("{:?}", &err));
assert_err!(err, Error::UnexpectedError { .. }, true);
}
@@ -894,24 +894,24 @@ fn currencies_sample() -> Value {
{
"burn_events_key": "06000000000000000000000000000000000000000a550c18",
"cancel_burn_events_key": "08000000000000000000000000000000000000000a550c18",
- "code": "Coin1",
+ "code": "XUS",
"exchange_rate_update_events_key": "09000000000000000000000000000000000000000a550c18",
"fractional_part": 100,
"mint_events_key": "05000000000000000000000000000000000000000a550c18",
"preburn_events_key": "07000000000000000000000000000000000000000a550c18",
"scaling_factor": 1000000,
- "to_lbr_exchange_rate": 1.0,
+ "to_xdx_exchange_rate": 1.0,
},
{
"burn_events_key": "0b000000000000000000000000000000000000000a550c18",
"cancel_burn_events_key": "0d000000000000000000000000000000000000000a550c18",
- "code": "LBR",
+ "code": "XDX",
"exchange_rate_update_events_key": "0e000000000000000000000000000000000000000a550c18",
"fractional_part": 1000,
"mint_events_key": "0a000000000000000000000000000000000000000a550c18",
"preburn_events_key": "0c000000000000000000000000000000000000000a550c18",
"scaling_factor": 1000000,
- "to_lbr_exchange_rate": 1.0
+ "to_xdx_exchange_rate": 1.0
}
])
}
@@ -922,7 +922,7 @@ fn events_sample() -> Value {
"data": {
"amount": {
"amount": 3000000,
- "currency": "LBR"
+ "currency": "XDX"
},
"metadata": "metadata",
"receiver": "762cbea8b99911d49707d2b901e13425",
@@ -937,7 +937,7 @@ fn events_sample() -> Value {
"data": {
"amount": {
"amount": 3000000,
- "currency": "LBR"
+ "currency": "XDX"
},
"metadata": "metadata",
"receiver": "762cbea8b99911d49707d2b901e13425",
@@ -960,17 +960,17 @@ fn custom_transaction_sample(vm_status_type: &str, events: Value) -> Value {
"bytes": format!("00{}", signed_txn_hex_sample()),
"events": events,
"gas_used": 476,
- "hash": "0895ced78e9f10c1351f248b9bda40cc9c8e6d4dbba823e08fe1cfacd582f171",
+ "hash": "f55c91fdc36b9246c423258b74eb579a0972a86b3394e2cfdab528a37f18d1f9",
"transaction": {
"chain_id": 4,
"expiration_timestamp_secs": 1600152999,
- "gas_currency": "LBR",
+ "gas_currency": "XDX",
"gas_unit_price": 10,
"max_gas_amount": 1000000,
"public_key": "f4d854d7719c8ca6b454df278aa513c3e1f17ad6a38579ff0baa2bd50f5dd0e5",
"script": {
"amount": 3000000,
- "currency": "LBR",
+ "currency": "XDX",
"metadata": "metadata",
"metadata_signature": "metadata_signature",
"receiver": "762cbea8b99911d49707d2b901e13425",
@@ -1001,7 +1001,7 @@ fn signed_txn_sample() -> SignedTransaction {
}
fn signed_txn_hex_sample() -> String {
- "876ff1d441cb0b352f438fcfbce8608f010000000000000001e101a11ceb0b010000000701000202020403061004160205181d0735610896011000000001010000020001000003020301010004010300010501060c0108000506080005030a020a020005060c05030a020a020109000c4c696272614163636f756e741257697468647261774361706162696c6974791b657874726163745f77697468647261775f6361706162696c697479087061795f66726f6d1b726573746f72655f77697468647261775f6361706162696c69747900000000000000000000000000000001010104010c0b0011000c050e050a010a020b030b0438000b05110202010700000000000000000000000000000001034c4252034c4252000403762cbea8b99911d49707d2b901e1342501c0c62d00000000000400040040420f00000000000000000000000000034c4252a765605f00000000040020f4d854d7719c8ca6b454df278aa513c3e1f17ad6a38579ff0baa2bd50f5dd0e54079358f2a818adcbfb7e9db3e9a560007881acfe6b62c29f1eedcc76b534024a574fcb95bf4c438da33eba8052b565c8d7e3f507225d2998849d6613f64fa6005".to_string()
+ "d360103577cf88c6a0e98235f7b65fd5000000000000000001e001a11ceb0b010000000701000202020403061004160205181d0735600895011000000001010000020001000003020301010004010300010501060c0108000506080005030a020a020005060c05030a020a020109000b4469656d4163636f756e741257697468647261774361706162696c6974791b657874726163745f77697468647261775f6361706162696c697479087061795f66726f6d1b726573746f72655f77697468647261775f6361706162696c69747900000000000000000000000000000001010104010c0b0011000c050e050a010a020b030b0438000b0511020201070000000000000000000000000000000105436f696e3105436f696e31000403bd51533250d3427ef3d1b1028c7b6efe01400d0300000000000400040040420f0000000000000000000000000005436f696e317371ca5f000000000400200b8ba5181a1838016877e636788f2e83b4177bfa59018548abe19131cc4f0e4a4020d6785e98e4a5994caa8fba6a2cd58188784bea242ea51ffe21849d87c5425a61efbb07922ee4ff5833f9554cf8f514a1d02e98ef0f2bef281ae2a4709c5400".to_string()
}
fn invalid_request_response() -> Value {
@@ -1016,9 +1016,9 @@ fn invalid_request_response_with_id(id: u64) -> Value {
},
"id": id,
"jsonrpc": "2.0",
- "libra_chain_id": 4,
- "libra_ledger_timestampusec": version_timestamp(version),
- "libra_ledger_version": version
+ "diem_chain_id": 4,
+ "diem_ledger_timestampusec": version_timestamp(version),
+ "diem_ledger_version": version
})
}
@@ -1036,9 +1036,9 @@ fn new_response_with_version_and_id(result: Value, version: u64, id: i32) -> Val
fn new_response_with_version_and_json_id(result: Value, version: u64, id: Value) -> Value {
to_value(JsonRpcResponse {
- libra_chain_id: 4,
- libra_ledger_version: version,
- libra_ledger_timestampusec: version_timestamp(version),
+ diem_chain_id: 4,
+ diem_ledger_version: version,
+ diem_ledger_timestampusec: version_timestamp(version),
jsonrpc: "2.0".to_string(),
id: Some(id),
result: Some(result),
diff --git a/client/json-rpc/src/blocking.rs b/client/json-rpc/src/blocking.rs
index 3177ecdc95..0573f1d80e 100644
--- a/client/json-rpc/src/blocking.rs
+++ b/client/json-rpc/src/blocking.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use crate::{process_batch_response, JsonRpcBatch, JsonRpcResponse};
diff --git a/client/json-rpc/src/client.rs b/client/json-rpc/src/client.rs
index 810f2c3632..083e43478a 100644
--- a/client/json-rpc/src/client.rs
+++ b/client/json-rpc/src/client.rs
@@ -1,9 +1,9 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use crate::{errors::JsonRpcError, views::AccountView, JsonRpcResponse};
use anyhow::{ensure, format_err, Error, Result};
-use libra_types::{account_address::AccountAddress, transaction::SignedTransaction};
+use diem_types::{account_address::AccountAddress, transaction::SignedTransaction};
use reqwest::{Client, ClientBuilder, StatusCode, Url};
use serde_json::{json, Value};
use std::{collections::HashSet, convert::TryFrom, fmt, time::Duration};
diff --git a/client/json-rpc/src/lib.rs b/client/json-rpc/src/lib.rs
index c15086449f..a8af9b66a9 100644
--- a/client/json-rpc/src/lib.rs
+++ b/client/json-rpc/src/lib.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
mod blocking;
@@ -10,8 +10,8 @@ pub use client::{
get_response_from_batch, process_batch_response, JsonRpcAsyncClient, JsonRpcAsyncClientError,
JsonRpcBatch,
};
-pub use libra_json_rpc_types::{errors, views};
-pub use libra_types::{account_address::AccountAddress, transaction::SignedTransaction};
+pub use diem_json_rpc_types::{errors, views};
+pub use diem_types::{account_address::AccountAddress, transaction::SignedTransaction};
pub use response::{JsonRpcResponse, ResponseAsView};
// new implementation module
diff --git a/client/json-rpc/src/response.rs b/client/json-rpc/src/response.rs
index 49803f0a65..86c41bc8c8 100644
--- a/client/json-rpc/src/response.rs
+++ b/client/json-rpc/src/response.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use crate::views::{
diff --git a/client/libra-dev/src/lib.rs b/client/libra-dev/src/lib.rs
deleted file mode 100644
index 3227d9f4d2..0000000000
--- a/client/libra-dev/src/lib.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) The Libra Core Contributors
-// SPDX-License-Identifier: Apache-2.0
-
-#![allow(non_upper_case_globals)]
-#![allow(non_camel_case_types)]
-#![allow(non_snake_case)]
-#![allow(clippy::missing_safety_doc)]
-
-pub mod crypto;
-pub mod error;
-mod interface;
-pub mod transaction;
-
-use crate::interface::{
- LIBRA_ADDRESS_SIZE, LIBRA_AUTHKEY_SIZE, LIBRA_PRIVKEY_SIZE, LIBRA_PUBKEY_SIZE,
-};
-use libra_crypto::ed25519::{ED25519_PRIVATE_KEY_LENGTH, ED25519_PUBLIC_KEY_LENGTH};
-use libra_types::{account_address::AccountAddress, transaction::authenticator::AuthenticationKey};
-
-static_assertions::const_assert_eq!(LIBRA_PUBKEY_SIZE, ED25519_PUBLIC_KEY_LENGTH as u32);
-static_assertions::const_assert_eq!(LIBRA_PRIVKEY_SIZE, ED25519_PRIVATE_KEY_LENGTH as u32);
-static_assertions::const_assert_eq!(LIBRA_AUTHKEY_SIZE, AuthenticationKey::LENGTH as u32);
-static_assertions::const_assert_eq!(LIBRA_ADDRESS_SIZE, AccountAddress::LENGTH as u32);
diff --git a/client/swiss-knife/Cargo.toml b/client/swiss-knife/Cargo.toml
index df36440cdd..38ae624feb 100644
--- a/client/swiss-knife/Cargo.toml
+++ b/client/swiss-knife/Cargo.toml
@@ -1,10 +1,10 @@
[package]
name = "swiss-knife"
version = "0.1.0"
-authors = ["Libra Association "]
-description = "Tool for generating, serializing (LCS), hashing and signing Libra transactions. Additionally, contains tools for testing"
+authors = ["Diem Association "]
+description = "Tool for generating, serializing (LCS), hashing and signing Diem transactions. Additionally, contains tools for testing"
repository = "https://github.com/libra/libra"
-homepage = "https://libra.org"
+homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
edition = "2018"
@@ -17,8 +17,8 @@ serde_json = "1.0.60"
serde = { version = "1.0.117", features = ["derive"] }
lcs = { version = "0.1.0", package = "libra-canonical-serialization" }
-libra-types = { path = "../../types", version = "0.1.0" }
-libra-crypto = { path = "../../crypto/crypto", version = "0.1.0" }
-libra-workspace-hack = { path = "../../common/workspace-hack", version = "0.1.0" }
+diem-types = { path = "../../types", version = "0.1.0" }
+diem-crypto = { path = "../../crypto/crypto", version = "0.1.0" }
+diem-workspace-hack = { path = "../../common/workspace-hack", version = "0.1.0" }
move-core-types = { path = "../../language/move-core/types", version = "0.1.0" }
transaction-builder = { path = "../../language/transaction-builder", version = "0.1.0" }
diff --git a/client/swiss-knife/README.md b/client/swiss-knife/README.md
index c37ecebcb8..3b263e76ee 100644
--- a/client/swiss-knife/README.md
+++ b/client/swiss-knife/README.md
@@ -1,6 +1,6 @@
-# Libra Swiss Knife
+# Diem Swiss Knife
-`swiss-knife` can be used to generate and serialize (LCS) raw and signed Libra transactions for a supported set of move scripts (See the `MoveScriptParams` enum for a list of supported MoveScripts). This binary is intended for use both by humans (interactive use) and to be called by automation (programs in any language which support json).
+`swiss-knife` can be used to generate and serialize (LCS) raw and signed Diem transactions for a supported set of move scripts (See the `MoveScriptParams` enum for a list of supported MoveScripts). This binary is intended for use both by humans (interactive use) and to be called by automation (programs in any language which support json).
`swiss-knife` expects json input from stdin (wherever applicable) and writes json output to stdout. The output json object will always have two fields: `error_message` and `data`. If the operation succeeds, then `data` is set, otherwise `error_message` is set. Only one of them will be set and the other one will be an empty string.
@@ -68,7 +68,7 @@ $ cargo run -p swiss-knife -- generate-raw-txn < sample_inputs/generate_raw_txn_
## Generate a Ed25519 Keypair
-Generate a Ed25519 Keypair and corresponding libra account address and auth key associated with this keypair.
+Generate a Ed25519 Keypair and corresponding diem account address and auth key associated with this keypair.
Optionally provide a seed to deterministically generate a Ed25519 Keypair
@@ -79,8 +79,8 @@ $ cargo run -p swiss-knife -- generate-test-ed25519-keypair
{
"error_message": "",
"data": {
- "libra_account_address": "e1b3d22871989e9fd9dc6814b2f4fc41",
- "libra_auth_key": "5a06116a9801533249b06eeef54db2f1e1b3d22871989e9fd9dc6814b2f4fc41",
+ "diem_account_address": "e1b3d22871989e9fd9dc6814b2f4fc41",
+ "diem_auth_key": "5a06116a9801533249b06eeef54db2f1e1b3d22871989e9fd9dc6814b2f4fc41",
"private_key": "b2f7f581d6de3c06a822fd6e7e8265fbc00f8401696a5bdc34f5a6d2ff3f922f",
"public_key": "edd0f6de342a1e6a7236d6244f23d83eedfcecd059a386c85055701498e77033"
}
@@ -92,8 +92,8 @@ $ cargo run -p swiss-knife -- generate-test-ed25519-keypair --seed 0
{
"error_message": "",
"data": {
- "libra_account_address": "e1b3d22871989e9fd9dc6814b2f4fc41",
- "libra_auth_key": "5a06116a9801533249b06eeef54db2f1e1b3d22871989e9fd9dc6814b2f4fc41",
+ "diem_account_address": "e1b3d22871989e9fd9dc6814b2f4fc41",
+ "diem_auth_key": "5a06116a9801533249b06eeef54db2f1e1b3d22871989e9fd9dc6814b2f4fc41",
"private_key": "b2f7f581d6de3c06a822fd6e7e8265fbc00f8401696a5bdc34f5a6d2ff3f922f",
"public_key": "edd0f6de342a1e6a7236d6244f23d83eedfcecd059a386c85055701498e77033"
}
@@ -141,6 +141,6 @@ $ cargo run -p swiss-knife -- verify-ed25519-signature < sample_inputs/verify_si
```
(Note that this is not a test of a transaction signature. This only tests the
-"raw" internal Ed255519 library used in Libra, and will only allow you to
+"raw" internal Ed255519 library used in Diem, and will only allow you to
e.g. get certainty that we use Ed25519 variant 'pure' as opposed to
'pre-hashed'. For testing a transaction signature, see the previous example)
diff --git a/client/swiss-knife/sample_inputs/generate_raw_txn_peer_to_peer_transfer.json b/client/swiss-knife/sample_inputs/generate_raw_txn_peer_to_peer_transfer.json
index 2e80b7e5ef..4ab558e0a2 100644
--- a/client/swiss-knife/sample_inputs/generate_raw_txn_peer_to_peer_transfer.json
+++ b/client/swiss-knife/sample_inputs/generate_raw_txn_peer_to_peer_transfer.json
@@ -4,13 +4,13 @@
"sequence_number": 42,
"max_gas_amount": 1000000,
"gas_unit_price": 0,
- "gas_currency_code": "LBR",
+ "gas_currency_code": "XDX",
"chain_id": "TESTING",
"expiration_timestamp_secs": 1593189628
},
"script_params": {
"peer_to_peer_transfer": {
- "coin_tag": "LBR",
+ "coin_tag": "XDX",
"recipient_address": "0x71e931795d23e9634fd24a5992065f6b",
"amount": 100,
"metadata_hex_encoded": "",
diff --git a/client/swiss-knife/sample_inputs/generate_raw_txn_preburn.json b/client/swiss-knife/sample_inputs/generate_raw_txn_preburn.json
index b4155190c1..06b4f37de1 100644
--- a/client/swiss-knife/sample_inputs/generate_raw_txn_preburn.json
+++ b/client/swiss-knife/sample_inputs/generate_raw_txn_preburn.json
@@ -4,13 +4,13 @@
"sequence_number": 42,
"max_gas_amount": 1000000,
"gas_unit_price": 0,
- "gas_currency_code": "LBR",
+ "gas_currency_code": "XDX",
"chain_id": "TESTING",
"expiration_timestamp_secs": 1593189628
},
"script_params": {
"preburn": {
- "coin_tag": "LBR",
+ "coin_tag": "XDX",
"amount": 100
}
}
diff --git a/client/swiss-knife/sample_inputs/generate_raw_txn_rotate_dual_attestation_info.json b/client/swiss-knife/sample_inputs/generate_raw_txn_rotate_dual_attestation_info.json
index b763a90c88..d250ce641a 100644
--- a/client/swiss-knife/sample_inputs/generate_raw_txn_rotate_dual_attestation_info.json
+++ b/client/swiss-knife/sample_inputs/generate_raw_txn_rotate_dual_attestation_info.json
@@ -4,7 +4,7 @@
"sequence_number": 42,
"max_gas_amount": 1000000,
"gas_unit_price": 0,
- "gas_currency_code": "LBR",
+ "gas_currency_code": "XDX",
"chain_id": "TESTING",
"expiration_timestamp_secs": 1593189628
},
diff --git a/client/swiss-knife/src/helpers.rs b/client/swiss-knife/src/helpers.rs
index 245b07edbe..d0ef14a102 100644
--- a/client/swiss-knife/src/helpers.rs
+++ b/client/swiss-knife/src/helpers.rs
@@ -1,7 +1,7 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
-use libra_types::{
+use diem_types::{
account_address::AccountAddress,
account_config::{from_currency_code_string, type_tag_for_currency_code},
};
diff --git a/client/swiss-knife/src/lib.rs b/client/swiss-knife/src/lib.rs
index db9e3052a1..1edf37c6ed 100644
--- a/client/swiss-knife/src/lib.rs
+++ b/client/swiss-knife/src/lib.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
pub mod helpers;
diff --git a/client/swiss-knife/src/main.rs b/client/swiss-knife/src/main.rs
index f9d476e721..b3cb5a70c4 100644
--- a/client/swiss-knife/src/main.rs
+++ b/client/swiss-knife/src/main.rs
@@ -1,13 +1,13 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
-use libra_crypto::{
+use diem_crypto::{
ed25519::{Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature},
hash::CryptoHash,
test_utils::KeyPair,
Signature, SigningKey, Uniform, ValidCryptoMaterialStringExt,
};
-use libra_types::{
+use diem_types::{
chain_id::ChainId,
transaction::{
authenticator::AuthenticationKey, RawTransaction, SignedTransaction, Transaction,
@@ -53,7 +53,7 @@ enum Command {
#[derive(Debug, StructOpt)]
#[structopt(
name = "swiss-knife",
- about = "Tool for generating, serializing (LCS), hashing and signing Libra transactions. Additionally, contains tools for testing. Please refer to README.md for examples."
+ about = "Tool for generating, serializing (LCS), hashing and signing Diem transactions. Additionally, contains tools for testing. Please refer to README.md for examples."
)]
struct Opt {
#[structopt(subcommand)]
@@ -121,7 +121,7 @@ struct TxnParams {
pub sender_address: String,
// Sequence number of this transaction corresponding to sender's account.
pub sequence_number: u64,
- // Chain ID of the Libra network this transaction is intended for
+ // Chain ID of the Diem network this transaction is intended for
pub chain_id: String,
// Maximal total gas specified by wallet to spend for this transaction.
pub max_gas_amount: u64,
@@ -300,17 +300,17 @@ fn generate_signed_txn(request: GenerateSignedTxnRequest) -> GenerateSignedTxnRe
struct GenerateKeypairResponse {
pub private_key: String,
pub public_key: String,
- pub libra_auth_key: String,
- pub libra_account_address: String,
+ pub diem_auth_key: String,
+ pub diem_account_address: String,
}
fn generate_key_pair(seed: Option) -> GenerateKeypairResponse {
let mut rng = StdRng::seed_from_u64(seed.unwrap_or_else(rand::random));
let keypair: KeyPair =
Ed25519PrivateKey::generate(&mut rng).into();
- let libra_auth_key = AuthenticationKey::ed25519(&keypair.public_key);
- let libra_account_address: String = libra_auth_key.derived_address().to_string();
- let libra_auth_key: String = libra_auth_key.to_string();
+ let diem_auth_key = AuthenticationKey::ed25519(&keypair.public_key);
+ let diem_account_address: String = diem_auth_key.derived_address().to_string();
+ let diem_auth_key: String = diem_auth_key.to_string();
GenerateKeypairResponse {
private_key: keypair
.private_key
@@ -326,8 +326,8 @@ fn generate_key_pair(seed: Option) -> GenerateKeypairResponse {
helpers::exit_with_error(format!("Failed to encode public key : {}", err))
})
.unwrap(),
- libra_auth_key,
- libra_account_address,
+ diem_auth_key,
+ diem_account_address,
}
}
diff --git a/client/transaction-builder/Cargo.toml b/client/transaction-builder/Cargo.toml
index 5485cefe68..b3e7929807 100644
--- a/client/transaction-builder/Cargo.toml
+++ b/client/transaction-builder/Cargo.toml
@@ -1,10 +1,10 @@
[package]
name = "transaction-builder-generated"
version = "0.1.0"
-authors = ["Libra Association "]
+authors = ["Diem Association "]
description = "Generated transaction builders"
repository = "https://github.com/libra/libra"
-homepage = "https://libra.org"
+homepage = "https://diem.com"
license = "Apache-2.0"
edition = "2018"
@@ -15,13 +15,13 @@ serde = { version = "1.0.117", features = ["derive"] }
compiled-stdlib = { path = "../../language/stdlib/compiled", version = "0.1.0" }
lcs = { version = "0.1.0", package = "libra-canonical-serialization" }
move-core-types = { path = "../../language/move-core/types", version = "0.1.0" }
-libra-types = { path = "../../types", version = "0.1.0" }
-libra-workspace-hack = { path = "../../common/workspace-hack", version = "0.1.0" }
+diem-types = { path = "../../types", version = "0.1.0" }
+diem-workspace-hack = { path = "../../common/workspace-hack", version = "0.1.0" }
proptest = { version = "0.10.1", optional = true }
proptest-derive = { version = "0.2.0", optional = true }
-libra-proptest-helpers = { path = "../../common/proptest-helpers", version = "0.1.0", optional = true }
+diem-proptest-helpers = { path = "../../common/proptest-helpers", version = "0.1.0", optional = true }
[features]
default = []
-fuzzing = ["proptest", "proptest-derive", "libra-proptest-helpers", "move-core-types/fuzzing"]
+fuzzing = ["proptest", "proptest-derive", "diem-proptest-helpers", "move-core-types/fuzzing"]
diff --git a/client/transaction-builder/src/lib.rs b/client/transaction-builder/src/lib.rs
index cac4f1118d..4c299e04a6 100644
--- a/client/transaction-builder/src/lib.rs
+++ b/client/transaction-builder/src/lib.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
#![forbid(unsafe_code)]
diff --git a/client/transaction-builder/src/misc.rs b/client/transaction-builder/src/misc.rs
index 4c039a3e9b..5d0e0365f0 100644
--- a/client/transaction-builder/src/misc.rs
+++ b/client/transaction-builder/src/misc.rs
@@ -1,10 +1,10 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
#![forbid(unsafe_code)]
use compiled_stdlib::{transaction_scripts::StdlibScript, StdLibOptions};
-use libra_types::{
+use diem_types::{
access_path::AccessPath,
block_metadata::BlockMetadata,
transaction::{ChangeSet, Transaction},
diff --git a/client/transaction-builder/src/stdlib.rs b/client/transaction-builder/src/stdlib.rs
index 6a5c4fd635..347e86d57c 100644
--- a/client/transaction-builder/src/stdlib.rs
+++ b/client/transaction-builder/src/stdlib.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
// This file was generated. Do not modify!
@@ -6,12 +6,12 @@
// To re-generate this code, run: `cargo run --release -p stdlib`
//! Conversion library between a structured representation of a Move script call (`ScriptCall`) and the
-//! standard LCS-compatible representation used in Libra transactions (`Script`).
+//! standard LCS-compatible representation used in Diem transactions (`Script`).
//!
//! This code was generated by compiling known Script interfaces ("ABIs") with the tool `transaction-builder-generator`.
#![allow(unused_imports)]
-use libra_types::{
+use diem_types::{
account_address::AccountAddress,
transaction::{Script, TransactionArgument},
};
@@ -33,15 +33,15 @@ type Bytes = Vec;
pub enum ScriptCall {
/// # Summary
/// Adds a zero `Currency` balance to the sending `account`. This will enable `account` to
- /// send, receive, and hold `Libra::Libra` coins. This transaction can be
+ /// send, receive, and hold `Diem::Diem` coins. This transaction can be
/// successfully sent by any account that is allowed to hold balances
/// (e.g., VASP, Designated Dealer).
///
/// # Technical Description
/// After the successful execution of this transaction the sending account will have a
- /// `LibraAccount::Balance` resource with zero balance published under it. Only
+ /// `DiemAccount::Balance` resource with zero balance published under it. Only
/// accounts that can hold balances can send this transaction, the sending account cannot
- /// already have a `LibraAccount::Balance` published under it.
+ /// already have a `DiemAccount::Balance` published under it.
///
/// # Parameters
/// | Name | Type | Description |
@@ -52,9 +52,9 @@ pub enum ScriptCall {
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
- /// | `Errors::NOT_PUBLISHED` | `Libra::ECURRENCY_INFO` | The `Currency` is not a registered currency on-chain. |
- /// | `Errors::INVALID_ARGUMENT` | `LibraAccount::EROLE_CANT_STORE_BALANCE` | The sending `account`'s role does not permit balances. |
- /// | `Errors::ALREADY_PUBLISHED` | `LibraAccount::EADD_EXISTING_CURRENCY` | A balance for `Currency` is already published under the sending `account`. |
+ /// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `Currency` is not a registered currency on-chain. |
+ /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EROLE_CANT_STORE_BALANCE` | The sending `account`'s role does not permit balances. |
+ /// | `Errors::ALREADY_PUBLISHED` | `DiemAccount::EADD_EXISTING_CURRENCY` | A balance for `Currency` is already published under the sending `account`. |
///
/// # Related Scripts
/// * `Script::create_child_vasp_account`
@@ -69,7 +69,7 @@ pub enum ScriptCall {
/// specified recovery account can rotate the sender account's authentication key.
///
/// # Technical Description
- /// Adds the `LibraAccount::KeyRotationCapability` for the sending account
+ /// Adds the `DiemAccount::KeyRotationCapability` for the sending account
/// (`to_recover_account`) to the `RecoveryAddress::RecoveryAddress` resource under
/// `recovery_address`. After this transaction has been executed successfully the account at
/// `recovery_address` and the `to_recover_account` may rotate the authentication key of
@@ -89,12 +89,12 @@ pub enum ScriptCall {
/// | Name | Type | Description |
/// | ------ | ------ | ------------- |
/// | `to_recover_account` | `&signer` | The signer reference of the sending account of this transaction. |
- /// | `recovery_address` | `address` | The account address where the `to_recover_account`'s `LibraAccount::KeyRotationCapability` will be stored. |
+ /// | `recovery_address` | `address` | The account address where the `to_recover_account`'s `DiemAccount::KeyRotationCapability` will be stored. |
///
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
- /// | `Errors::INVALID_STATE` | `LibraAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `to_recover_account` has already delegated/extracted its `LibraAccount::KeyRotationCapability`. |
+ /// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `to_recover_account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. |
/// | `Errors::NOT_PUBLISHED` | `RecoveryAddress::ERECOVERY_ADDRESS` | `recovery_address` does not have a `RecoveryAddress` resource published under it. |
/// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::EINVALID_KEY_ROTATION_DELEGATION` | `to_recover_account` and `recovery_address` do not belong to the same VASP. |
///
@@ -105,47 +105,47 @@ pub enum ScriptCall {
/// # Summary
/// Adds a script hash to the transaction allowlist. This transaction
- /// can only be sent by the Libra Root account. Scripts with this hash can be
+ /// can only be sent by the Diem Root account. Scripts with this hash can be
/// sent afterward the successful execution of this script.
///
/// # Technical Description
///
- /// The sending account (`lr_account`) must be the Libra Root account. The script allow
+ /// The sending account (`dr_account`) must be the Diem Root account. The script allow
/// list must not already hold the script `hash` being added. The `sliding_nonce` must be
- /// a valid nonce for the Libra Root account. After this transaction has executed
+ /// a valid nonce for the Diem Root account. After this transaction has executed
/// successfully a reconfiguration will be initiated, and the on-chain config
- /// `LibraTransactionPublishingOption::LibraTransactionPublishingOption`'s
+ /// `DiemTransactionPublishingOption::DiemTransactionPublishingOption`'s
/// `script_allow_list` field will contain the new script `hash` and transactions
/// with this `hash` can be successfully sent to the network.
///
/// # Parameters
/// | Name | Type | Description |
/// | ------ | ------ | ------------- |
- /// | `lr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Libra Root signer. |
+ /// | `dr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Diem Root signer. |
/// | `hash` | `vector` | The hash of the script to be added to the script allowlist. |
/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. |
///
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
- /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `lr_account`. |
+ /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. |
- /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ELIBRA_ROOT` | The sending account is not the Libra Root account. |
- /// | `Errors::REQUIRES_ROLE` | `Roles::ELIBRA_ROOT` | The sending account is not the Libra Root account. |
- /// | `Errors::INVALID_ARGUMENT` | `LibraTransactionPublishingOption::EINVALID_SCRIPT_HASH` | The script `hash` is an invalid length. |
- /// | `Errors::INVALID_ARGUMENT` | `LibraTransactionPublishingOption::EALLOWLIST_ALREADY_CONTAINS_SCRIPT` | The on-chain allowlist already contains the script `hash`. |
+ /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. |
+ /// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. |
+ /// | `Errors::INVALID_ARGUMENT` | `DiemTransactionPublishingOption::EINVALID_SCRIPT_HASH` | The script `hash` is an invalid length. |
+ /// | `Errors::INVALID_ARGUMENT` | `DiemTransactionPublishingOption::EALLOWLIST_ALREADY_CONTAINS_SCRIPT` | The on-chain allowlist already contains the script `hash`. |
AddToScriptAllowList { hash: Bytes, sliding_nonce: u64 },
/// # Summary
/// Adds a validator account to the validator set, and triggers a
/// reconfiguration of the system to admit the account to the validator set for the system. This
- /// transaction can only be successfully called by the Libra Root account.
+ /// transaction can only be successfully called by the Diem Root account.
///
/// # Technical Description
/// This script adds the account at `validator_address` to the validator set.
- /// This transaction emits a `LibraConfig::NewEpochEvent` event and triggers a
+ /// This transaction emits a `DiemConfig::NewEpochEvent` event and triggers a
/// reconfiguration. Once the reconfiguration triggered by this script's
/// execution has been performed, the account at the `validator_address` is
/// considered to be a validator in the network.
@@ -156,7 +156,7 @@ pub enum ScriptCall {
/// # Parameters
/// | Name | Type | Description |
/// | ------ | ------ | ------------- |
- /// | `lr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Libra Root signer. |
+ /// | `dr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Diem Root signer. |
/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. |
/// | `validator_name` | `vector` | ASCII-encoded human name for the validator. Must match the human name in the `ValidatorConfig::ValidatorConfig` for the validator. |
/// | `validator_address` | `address` | The validator account address to be added to the validator set. |
@@ -164,16 +164,16 @@ pub enum ScriptCall {
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
- /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `lr_account`. |
+ /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. |
- /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ELIBRA_ROOT` | The sending account is not the Libra Root account. |
- /// | `Errors::REQUIRES_ROLE` | `Roles::ELIBRA_ROOT` | The sending account is not the Libra Root account. |
+ /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. |
+ /// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. |
/// | 0 | 0 | The provided `validator_name` does not match the already-recorded human name for the validator. |
- /// | `Errors::INVALID_ARGUMENT` | `LibraSystem::EINVALID_PROSPECTIVE_VALIDATOR` | The validator to be added does not have a `ValidatorConfig::ValidatorConfig` resource published under it, or its `config` field is empty. |
- /// | `Errors::INVALID_ARGUMENT` | `LibraSystem::EALREADY_A_VALIDATOR` | The `validator_address` account is already a registered validator. |
- /// | `Errors::INVALID_STATE` | `LibraConfig::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. |
+ /// | `Errors::INVALID_ARGUMENT` | `DiemSystem::EINVALID_PROSPECTIVE_VALIDATOR` | The validator to be added does not have a `ValidatorConfig::ValidatorConfig` resource published under it, or its `config` field is empty. |
+ /// | `Errors::INVALID_ARGUMENT` | `DiemSystem::EALREADY_A_VALIDATOR` | The `validator_address` account is already a registered validator. |
+ /// | `Errors::INVALID_STATE` | `DiemConfig::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. |
///
/// # Related Scripts
/// * `Script::create_validator_account`
@@ -198,21 +198,21 @@ pub enum ScriptCall {
///
/// # Technical Description
/// This transaction permanently destroys all the coins of `Token` type
- /// stored in the `Libra::Preburn` resource published under the
+ /// stored in the `Diem::Preburn` resource published under the
/// `preburn_address` account address.
///
/// This transaction will only succeed if the sending `account` has a
- /// `Libra::BurnCapability`, and a `Libra::Preburn` resource
+ /// `Diem::BurnCapability`, and a `Diem::Preburn` resource
/// exists under `preburn_address`, with a non-zero `to_burn` field. After the successful execution
/// of this transaction the `total_value` field in the
- /// `Libra::CurrencyInfo` resource published under `0xA550C18` will be
+ /// `Diem::CurrencyInfo` resource published under `0xA550C18` will be
/// decremented by the value of the `to_burn` field of the preburn resource
/// under `preburn_address` immediately before this transaction, and the
/// `to_burn` field of the preburn resource will have a zero value.
///
/// ## Events
- /// The successful execution of this transaction will emit a `Libra::BurnEvent` on the event handle
- /// held in the `Libra::CurrencyInfo` resource's `burn_events` published under
+ /// The successful execution of this transaction will emit a `Diem::BurnEvent` on the event handle
+ /// held in the `Diem::CurrencyInfo` resource's `burn_events` published under
/// `0xA550C18`.
///
/// # Parameters
@@ -230,10 +230,10 @@ pub enum ScriptCall {
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. |
- /// | `Errors::REQUIRES_CAPABILITY` | `Libra::EBURN_CAPABILITY` | The sending `account` does not have a `Libra::BurnCapability` published under it. |
- /// | `Errors::NOT_PUBLISHED` | `Libra::EPREBURN` | The account at `preburn_address` does not have a `Libra::Preburn` resource published under it. |
- /// | `Errors::INVALID_STATE` | `Libra::EPREBURN_EMPTY` | The `Libra::Preburn` resource is empty (has a value of 0). |
- /// | `Errors::NOT_PUBLISHED` | `Libra::ECURRENCY_INFO` | The specified `Token` is not a registered currency on-chain. |
+ /// | `Errors::REQUIRES_CAPABILITY` | `Diem::EBURN_CAPABILITY` | The sending `account` does not have a `Diem::BurnCapability` published under it. |
+ /// | `Errors::NOT_PUBLISHED` | `Diem::EPREBURN` | The account at `preburn_address` does not have a `Diem::Preburn` resource published under it. |
+ /// | `Errors::INVALID_STATE` | `Diem::EPREBURN_EMPTY` | The `Diem::Preburn` resource is empty (has a value of 0). |
+ /// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The specified `Token` is not a registered currency on-chain. |
///
/// # Related Scripts
/// * `Script::burn_txn_fees`
@@ -247,7 +247,7 @@ pub enum ScriptCall {
/// # Summary
/// Burns the transaction fees collected in the `CoinType` currency so that the
- /// Libra association may reclaim the backing coins off-chain. May only be sent
+ /// Diem association may reclaim the backing coins off-chain. May only be sent
/// by the Treasury Compliance account.
///
/// # Technical Description
@@ -260,8 +260,8 @@ pub enum ScriptCall {
/// account address will have a value of 0 after the successful execution of this script.
///
/// ## Events
- /// The successful execution of this transaction will emit a `Libra::BurnEvent` on the event handle
- /// held in the `Libra::CurrencyInfo` resource's `burn_events` published under
+ /// The successful execution of this transaction will emit a `Diem::BurnEvent` on the event handle
+ /// held in the `Diem::CurrencyInfo` resource's `burn_events` published under
/// `0xA550C18`.
///
/// # Parameters
@@ -275,7 +275,7 @@ pub enum ScriptCall {
/// | ---------------- | -------------- | ------------- |
/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. |
/// | `Errors::NOT_PUBLISHED` | `TransactionFee::ETRANSACTION_FEE` | `CoinType` is not an accepted transaction fee currency. |
- /// | `Errors::INVALID_ARGUMENT` | `Libra::ECOIN` | The collected fees in `CoinType` are zero. |
+ /// | `Errors::INVALID_ARGUMENT` | `Diem::ECOIN` | The collected fees in `CoinType` are zero. |
///
/// # Related Scripts
/// * `Script::burn`
@@ -288,22 +288,22 @@ pub enum ScriptCall {
/// Can only be successfully sent by an account with Treasury Compliance role.
///
/// # Technical Description
- /// Cancels and returns all coins held in the `Libra::Preburn` resource under the `preburn_address` and
- /// return the funds to the `preburn_address` account's `LibraAccount::Balance`.
- /// The transaction must be sent by an `account` with a `Libra::BurnCapability`
+ /// Cancels and returns all coins held in the `Diem::Preburn` resource under the `preburn_address` and
+ /// return the funds to the `preburn_address` account's `DiemAccount::Balance`.
+ /// The transaction must be sent by an `account` with a `Diem::BurnCapability`
/// resource published under it. The account at `preburn_address` must have a
- /// `Libra::Preburn` resource published under it, and its value must be nonzero. The transaction removes
- /// the entire balance held in the `Libra::Preburn` resource, and returns it back to the account's
- /// `LibraAccount::Balance` under `preburn_address`. Due to this, the account at
+ /// `Diem::Preburn` resource published under it, and its value must be nonzero. The transaction removes
+ /// the entire balance held in the `Diem::Preburn` resource, and returns it back to the account's
+ /// `DiemAccount::Balance` under `preburn_address`. Due to this, the account at
/// `preburn_address` must already have a balance in the `Token` currency published
/// before this script is called otherwise the transaction will fail.
///
/// ## Events
/// The successful execution of this transaction will emit:
- /// * A `Libra::CancelBurnEvent` on the event handle held in the `Libra::CurrencyInfo`
+ /// * A `Diem::CancelBurnEvent` on the event handle held in the `Diem::CurrencyInfo`
/// resource's `burn_events` published under `0xA550C18`.
- /// * A `LibraAccount::ReceivedPaymentEvent` on the `preburn_address`'s
- /// `LibraAccount::LibraAccount` `received_events` event handle with both the `payer` and `payee`
+ /// * A `DiemAccount::ReceivedPaymentEvent` on the `preburn_address`'s
+ /// `DiemAccount::DiemAccount` `received_events` event handle with both the `payer` and `payee`
/// being `preburn_address`.
///
/// # Parameters
@@ -316,12 +316,12 @@ pub enum ScriptCall {
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
- /// | `Errors::REQUIRES_CAPABILITY` | `Libra::EBURN_CAPABILITY` | The sending `account` does not have a `Libra::BurnCapability` published under it. |
- /// | `Errors::NOT_PUBLISHED` | `Libra::EPREBURN` | The account at `preburn_address` does not have a `Libra::Preburn` resource published under it. |
- /// | `Errors::NOT_PUBLISHED` | `Libra::ECURRENCY_INFO` | The specified `Token` is not a registered currency on-chain. |
- /// | `Errors::INVALID_ARGUMENT` | `LibraAccount::ECOIN_DEPOSIT_IS_ZERO` | The value held in the preburn resource was zero. |
- /// | `Errors::INVALID_ARGUMENT` | `LibraAccount::EPAYEE_CANT_ACCEPT_CURRENCY_TYPE` | The account at `preburn_address` doesn't have a balance resource for `Token`. |
- /// | `Errors::LIMIT_EXCEEDED` | `LibraAccount::EDEPOSIT_EXCEEDS_LIMITS` | The depositing of the funds held in the prebun area would exceed the `account`'s account limits. |
+ /// | `Errors::REQUIRES_CAPABILITY` | `Diem::EBURN_CAPABILITY` | The sending `account` does not have a `Diem::BurnCapability` published under it. |
+ /// | `Errors::NOT_PUBLISHED` | `Diem::EPREBURN` | The account at `preburn_address` does not have a `Diem::Preburn` resource published under it. |
+ /// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The specified `Token` is not a registered currency on-chain. |
+ /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::ECOIN_DEPOSIT_IS_ZERO` | The value held in the preburn resource was zero. |
+ /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EPAYEE_CANT_ACCEPT_CURRENCY_TYPE` | The account at `preburn_address` doesn't have a balance resource for `Token`. |
+ /// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EDEPOSIT_EXCEEDS_LIMITS` | The depositing of the funds held in the prebun area would exceed the `account`'s account limits. |
/// | `Errors::INVALID_STATE` | `DualAttestation::EPAYEE_COMPLIANCE_KEY_NOT_SET` | The `account` does not have a compliance key set on it but dual attestion checking was performed. |
///
/// # Related Scripts
@@ -351,12 +351,12 @@ pub enum ScriptCall {
///
/// ## Events
/// Successful execution with a `child_initial_balance` greater than zero will emit:
- /// * A `LibraAccount::SentPaymentEvent` with the `payer` field being the Parent VASP's address,
+ /// * A `DiemAccount::SentPaymentEvent` with the `payer` field being the Parent VASP's address,
/// and payee field being `child_address`. This is emitted on the Parent VASP's
- /// `LibraAccount::LibraAccount` `sent_events` handle.
- /// * A `LibraAccount::ReceivedPaymentEvent` with the `payer` field being the Parent VASP's address,
+ /// `DiemAccount::DiemAccount` `sent_events` handle.
+ /// * A `DiemAccount::ReceivedPaymentEvent` with the `payer` field being the Parent VASP's address,
/// and payee field being `child_address`. This is emitted on the new Child VASPS's
- /// `LibraAccount::LibraAccount` `received_events` handle.
+ /// `DiemAccount::DiemAccount` `received_events` handle.
///
/// # Parameters
/// | Name | Type | Description |
@@ -371,15 +371,15 @@ pub enum ScriptCall {
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
- /// | `Errors::INVALID_ARGUMENT` | `LibraAccount::EMALFORMED_AUTHENTICATION_KEY` | The `auth_key_prefix` was not of length 32. |
+ /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | The `auth_key_prefix` was not of length 32. |
/// | `Errors::REQUIRES_ROLE` | `Roles::EPARENT_VASP` | The sending account wasn't a Parent VASP account. |
/// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `child_address` address is already taken. |
/// | `Errors::LIMIT_EXCEEDED` | `VASP::ETOO_MANY_CHILDREN` | The sending account has reached the maximum number of allowed child accounts. |
- /// | `Errors::NOT_PUBLISHED` | `Libra::ECURRENCY_INFO` | The `CoinType` is not a registered currency on-chain. |
- /// | `Errors::INVALID_STATE` | `LibraAccount::EWITHDRAWAL_CAPABILITY_ALREADY_EXTRACTED` | The withdrawal capability for the sending account has already been extracted. |
- /// | `Errors::NOT_PUBLISHED` | `LibraAccount::EPAYER_DOESNT_HOLD_CURRENCY` | The sending account doesn't have a balance in `CoinType`. |
- /// | `Errors::LIMIT_EXCEEDED` | `LibraAccount::EINSUFFICIENT_BALANCE` | The sending account doesn't have at least `child_initial_balance` of `CoinType` balance. |
- /// | `Errors::INVALID_ARGUMENT` | `LibraAccount::ECANNOT_CREATE_AT_VM_RESERVED` | The `child_address` is the reserved address 0x0. |
+ /// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `CoinType` is not a registered currency on-chain. |
+ /// | `Errors::INVALID_STATE` | `DiemAccount::EWITHDRAWAL_CAPABILITY_ALREADY_EXTRACTED` | The withdrawal capability for the sending account has already been extracted. |
+ /// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYER_DOESNT_HOLD_CURRENCY` | The sending account doesn't have a balance in `CoinType`. |
+ /// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EINSUFFICIENT_BALANCE` | The sending account doesn't have at least `child_initial_balance` of `CoinType` balance. |
+ /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::ECANNOT_CREATE_AT_VM_RESERVED` | The `child_address` is the reserved address 0x0. |
///
/// # Related Scripts
/// * `Script::create_parent_vasp_account`
@@ -430,7 +430,7 @@ pub enum ScriptCall {
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. |
/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. |
/// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. |
- /// | `Errors::NOT_PUBLISHED` | `Libra::ECURRENCY_INFO` | The `Currency` is not a registered currency on-chain. |
+ /// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `Currency` is not a registered currency on-chain. |
/// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `addr` address is already taken. |
///
/// # Related Scripts
@@ -476,7 +476,7 @@ pub enum ScriptCall {
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. |
/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. |
/// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. |
- /// | `Errors::NOT_PUBLISHED` | `Libra::ECURRENCY_INFO` | The `CoinType` is not a registered currency on-chain. |
+ /// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `CoinType` is not a registered currency on-chain. |
/// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `new_account_address` address is already taken. |
///
/// # Related Scripts
@@ -503,7 +503,7 @@ pub enum ScriptCall {
///
/// # Technical Description
/// Publishes a `RecoveryAddress::RecoveryAddress` resource under `account`. It then
- /// extracts the `LibraAccount::KeyRotationCapability` for `account` and adds
+ /// extracts the `DiemAccount::KeyRotationCapability` for `account` and adds
/// it to the resource. After the successful execution of this transaction
/// other accounts may add their key rotation to this resource so that `account`
/// may be used as a recovery account for those accounts.
@@ -516,7 +516,7 @@ pub enum ScriptCall {
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
- /// | `Errors::INVALID_STATE` | `LibraAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `LibraAccount::KeyRotationCapability`. |
+ /// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. |
/// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::ENOT_A_VASP` | `account` is not a VASP account. |
/// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::EKEY_ROTATION_DEPENDENCY_CYCLE` | A key rotation recovery cycle would be created by adding `account`'s key rotation capability. |
/// | `Errors::ALREADY_PUBLISHED` | `RecoveryAddress::ERECOVERY_ADDRESS` | A `RecoveryAddress::RecoveryAddress` resource has already been published under `account`. |
@@ -527,7 +527,7 @@ pub enum ScriptCall {
CreateRecoveryAddress {},
/// # Summary
- /// Creates a Validator account. This transaction can only be sent by the Libra
+ /// Creates a Validator account. This transaction can only be sent by the Diem
/// Root account.
///
/// # Technical Description
@@ -542,7 +542,7 @@ pub enum ScriptCall {
/// # Parameters
/// | Name | Type | Description |
/// | ------ | ------ | ------------- |
- /// | `lr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Libra Root signer. |
+ /// | `dr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Diem Root signer. |
/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. |
/// | `new_account_address` | `address` | Address of the to-be-created Validator account. |
/// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. |
@@ -551,12 +551,12 @@ pub enum ScriptCall {
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
- /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `lr_account`. |
+ /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. |
- /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ELIBRA_ROOT` | The sending account is not the Libra Root account. |
- /// | `Errors::REQUIRES_ROLE` | `Roles::ELIBRA_ROOT` | The sending account is not the Libra Root account. |
+ /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. |
+ /// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. |
/// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `new_account_address` address is already taken. |
///
/// # Related Scripts
@@ -575,7 +575,7 @@ pub enum ScriptCall {
},
/// # Summary
- /// Creates a Validator Operator account. This transaction can only be sent by the Libra
+ /// Creates a Validator Operator account. This transaction can only be sent by the Diem
/// Root account.
///
/// # Technical Description
@@ -587,7 +587,7 @@ pub enum ScriptCall {
/// # Parameters
/// | Name | Type | Description |
/// | ------ | ------ | ------------- |
- /// | `lr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Libra Root signer. |
+ /// | `dr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Diem Root signer. |
/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. |
/// | `new_account_address` | `address` | Address of the to-be-created Validator account. |
/// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. |
@@ -596,12 +596,12 @@ pub enum ScriptCall {
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
- /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `lr_account`. |
+ /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. |
- /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ELIBRA_ROOT` | The sending account is not the Libra Root account. |
- /// | `Errors::REQUIRES_ROLE` | `Roles::ELIBRA_ROOT` | The sending account is not the Libra Root account. |
+ /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. |
+ /// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. |
/// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `new_account_address` address is already taken. |
///
/// # Related Scripts
@@ -622,7 +622,7 @@ pub enum ScriptCall {
/// # Summary
/// Freezes the account at `address`. The sending account of this transaction
/// must be the Treasury Compliance account. The account being frozen cannot be
- /// the Libra Root or Treasury Compliance account. After the successful
+ /// the Diem Root or Treasury Compliance account. After the successful
/// execution of this transaction no transactions may be sent from the frozen
/// account, and the frozen account may not send or receive coins.
///
@@ -630,7 +630,7 @@ pub enum ScriptCall {
/// Sets the `AccountFreezing::FreezingBit` to `true` and emits a
/// `AccountFreezing::FreezeAccountEvent`. The transaction sender must be the
/// Treasury Compliance account, but the account at `to_freeze_account` must
- /// not be either `0xA550C18` (the Libra Root address), or `0xB1E55ED` (the
+ /// not be either `0xA550C18` (the Diem Root address), or `0xB1E55ED` (the
/// Treasury Compliance address). Note that this is a per-account property
/// e.g., freezing a Parent VASP will not effect the status any of its child
/// accounts and vice versa.
@@ -658,7 +658,7 @@ pub enum ScriptCall {
/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. |
/// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. |
/// | `Errors::INVALID_ARGUMENT` | `AccountFreezing::ECANNOT_FREEZE_TC` | `to_freeze_account` was the Treasury Compliance account (`0xB1E55ED`). |
- /// | `Errors::INVALID_ARGUMENT` | `AccountFreezing::ECANNOT_FREEZE_LIBRA_ROOT` | `to_freeze_account` was the Libra Root account (`0xA550C18`). |
+ /// | `Errors::INVALID_ARGUMENT` | `AccountFreezing::ECANNOT_FREEZE_DIEM_ROOT` | `to_freeze_account` was the Diem Root account (`0xA550C18`). |
///
/// # Related Scripts
/// * `Script::unfreeze_account`
@@ -681,15 +681,15 @@ pub enum ScriptCall {
/// `metadata` and an (optional) `metadata_signature` on the message
/// `metadata` | `Signer::address_of(payer)` | `amount` | `DualAttestation::DOMAIN_SEPARATOR`.
/// The `metadata` and `metadata_signature` parameters are only required if `amount` >=
- /// `DualAttestation::get_cur_microlibra_limit` LBR and `payer` and `payee` are distinct VASPs.
+ /// `DualAttestation::get_cur_microdiem_limit` XDX and `payer` and `payee` are distinct VASPs.
/// However, a transaction sender can opt in to dual attestation even when it is not required
/// (e.g., a DesignatedDealer -> VASP payment) by providing a non-empty `metadata_signature`.
- /// Standardized `metadata` LCS format can be found in `libra_types::transaction::metadata::Metadata`.
+ /// Standardized `metadata` LCS format can be found in `diem_types::transaction::metadata::Metadata`.
///
/// ## Events
/// Successful execution of this script emits two events:
- /// * A `LibraAccount::SentPaymentEvent` on `payer`'s `LibraAccount::LibraAccount` `sent_events` handle; and
- /// * A `LibraAccount::ReceivedPaymentEvent` on `payee`'s `LibraAccount::LibraAccount` `received_events` handle.
+ /// * A `DiemAccount::SentPaymentEvent` on `payer`'s `DiemAccount::DiemAccount` `sent_events` handle; and
+ /// * A `DiemAccount::ReceivedPaymentEvent` on `payee`'s `DiemAccount::DiemAccount` `received_events` handle.
///
/// # Parameters
/// | Name | Type | Description |
@@ -703,16 +703,16 @@ pub enum ScriptCall {
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
- /// | `Errors::NOT_PUBLISHED` | `LibraAccount::EPAYER_DOESNT_HOLD_CURRENCY` | `payer` doesn't hold a balance in `Currency`. |
- /// | `Errors::LIMIT_EXCEEDED` | `LibraAccount::EINSUFFICIENT_BALANCE` | `amount` is greater than `payer`'s balance in `Currency`. |
- /// | `Errors::INVALID_ARGUMENT` | `LibraAccount::ECOIN_DEPOSIT_IS_ZERO` | `amount` is zero. |
- /// | `Errors::NOT_PUBLISHED` | `LibraAccount::EPAYEE_DOES_NOT_EXIST` | No account exists at the `payee` address. |
- /// | `Errors::INVALID_ARGUMENT` | `LibraAccount::EPAYEE_CANT_ACCEPT_CURRENCY_TYPE` | An account exists at `payee`, but it does not accept payments in `Currency`. |
+ /// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYER_DOESNT_HOLD_CURRENCY` | `payer` doesn't hold a balance in `Currency`. |
+ /// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EINSUFFICIENT_BALANCE` | `amount` is greater than `payer`'s balance in `Currency`. |
+ /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::ECOIN_DEPOSIT_IS_ZERO` | `amount` is zero. |
+ /// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYEE_DOES_NOT_EXIST` | No account exists at the `payee` address. |
+ /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EPAYEE_CANT_ACCEPT_CURRENCY_TYPE` | An account exists at `payee`, but it does not accept payments in `Currency`. |
/// | `Errors::INVALID_STATE` | `AccountFreezing::EACCOUNT_FROZEN` | The `payee` account is frozen. |
/// | `Errors::INVALID_ARGUMENT` | `DualAttestation::EMALFORMED_METADATA_SIGNATURE` | `metadata_signature` is not 64 bytes. |
/// | `Errors::INVALID_ARGUMENT` | `DualAttestation::EINVALID_METADATA_SIGNATURE` | `metadata_signature` does not verify on the against the `payee'`s `DualAttestation::Credential` `compliance_public_key` public key. |
- /// | `Errors::LIMIT_EXCEEDED` | `LibraAccount::EWITHDRAWAL_EXCEEDS_LIMITS` | `payer` has exceeded its daily withdrawal limits for the backing coins of LBR. |
- /// | `Errors::LIMIT_EXCEEDED` | `LibraAccount::EDEPOSIT_EXCEEDS_LIMITS` | `payee` has exceeded its daily deposit limits for LBR. |
+ /// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EWITHDRAWAL_EXCEEDS_LIMITS` | `payer` has exceeded its daily withdrawal limits for the backing coins of XDX. |
+ /// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EDEPOSIT_EXCEEDS_LIMITS` | `payee` has exceeded its daily deposit limits for XDX. |
///
/// # Related Scripts
/// * `Script::create_child_vasp_account`
@@ -734,16 +734,16 @@ pub enum ScriptCall {
///
/// # Technical Description
/// Moves the specified `amount` of coins in `Token` currency from the sending `account`'s
- /// `LibraAccount::Balance` to the `Libra::Preburn` published under the same
+ /// `DiemAccount::Balance` to the `Diem::Preburn` published under the same
/// `account`. `account` must have both of these resources published under it at the start of this
/// transaction in order for it to execute successfully.
///
/// ## Events
/// Successful execution of this script emits two events:
- /// * `LibraAccount::SentPaymentEvent ` on `account`'s `LibraAccount::LibraAccount` `sent_events`
+ /// * `DiemAccount::SentPaymentEvent ` on `account`'s `DiemAccount::DiemAccount` `sent_events`
/// handle with the `payee` and `payer` fields being `account`'s address; and
- /// * A `Libra::PreburnEvent` with `Token`'s currency code on the
- /// `Libra::CurrencyInfo` resource published under it. |
- /// | `Errors::INVALID_STATE` | `Libra::EPREBURN_OCCUPIED` | The `value` field in the `Libra::Preburn` resource under the sender is non-zero. |
+ /// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `Token` is not a registered currency on-chain. |
+ /// | `Errors::INVALID_STATE` | `DiemAccount::EWITHDRAWAL_CAPABILITY_ALREADY_EXTRACTED` | The withdrawal capability for `account` has already been extracted. |
+ /// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EINSUFFICIENT_BALANCE` | `amount` is greater than `payer`'s balance in `Token`. |
+ /// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYER_DOESNT_HOLD_CURRENCY` | `account` doesn't hold a balance in `Token`. |
+ /// | `Errors::NOT_PUBLISHED` | `Diem::EPREBURN` | `account` doesn't have a `Diem::Preburn` resource published under it. |
+ /// | `Errors::INVALID_STATE` | `Diem::EPREBURN_OCCUPIED` | The `value` field in the `Diem::Preburn` resource under the sender is non-zero. |
/// | `Errors::NOT_PUBLISHED` | `Roles::EROLE_ID` | The `account` did not have a role assigned to it. |
/// | `Errors::REQUIRES_ROLE` | `Roles::EDESIGNATED_DEALER` | The `account` did not have the role of DesignatedDealer. |
///
@@ -779,7 +779,7 @@ pub enum ScriptCall {
/// # Technical Description
/// Rotates the authentication key of the sending account to `public_key`,
/// and publishes a `SharedEd25519PublicKey::SharedEd25519PublicKey` resource
- /// containing the 32-byte ed25519 `public_key` and the `LibraAccount::KeyRotationCapability` for
+ /// containing the 32-byte ed25519 `public_key` and the `DiemAccount::KeyRotationCapability` for
/// `account` under `account`.
///
/// # Parameters
@@ -791,7 +791,7 @@ pub enum ScriptCall {
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
- /// | `Errors::INVALID_STATE` | `LibraAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `LibraAccount::KeyRotationCapability` resource. |
+ /// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability` resource. |
/// | `Errors::ALREADY_PUBLISHED` | `SharedEd25519PublicKey::ESHARED_KEY` | The `SharedEd25519PublicKey::SharedEd25519PublicKey` resource is already published under `account`. |
/// | `Errors::INVALID_ARGUMENT` | `SharedEd25519PublicKey::EMALFORMED_PUBLIC_KEY` | `public_key` is an invalid ed25519 public key. |
///
@@ -807,7 +807,7 @@ pub enum ScriptCall {
///
/// # Technical Description
/// This updates the fields with corresponding names held in the `ValidatorConfig::ValidatorConfig`
- /// config resource held under `validator_account`. It does not emit a `LibraConfig::NewEpochEvent`
+ /// config resource held under `validator_account`. It does not emit a `DiemConfig::NewEpochEvent`
/// so the copy of this config held in the validator set will not be updated, and the changes are
/// only "locally" under the `validator_account` account address.
///
@@ -845,11 +845,11 @@ pub enum ScriptCall {
/// # Summary
/// This script removes a validator account from the validator set, and triggers a reconfiguration
/// of the system to remove the validator from the system. This transaction can only be
- /// successfully called by the Libra Root account.
+ /// successfully called by the Diem Root account.
///
/// # Technical Description
/// This script removes the account at `validator_address` from the validator set. This transaction
- /// emits a `LibraConfig::NewEpochEvent` event. Once the reconfiguration triggered by this event
+ /// emits a `DiemConfig::NewEpochEvent` event. Once the reconfiguration triggered by this event
/// has been performed, the account at `validator_address` is no longer considered to be a
/// validator in the network. This transaction will fail if the validator at `validator_address`
/// is not in the validator set.
@@ -857,7 +857,7 @@ pub enum ScriptCall {
/// # Parameters
/// | Name | Type | Description |
/// | ------ | ------ | ------------- |
- /// | `lr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Libra Root signer. |
+ /// | `dr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Diem Root signer. |
/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. |
/// | `validator_name` | `vector` | ASCII-encoded human name for the validator. Must match the human name in the `ValidatorConfig::ValidatorConfig` for the validator. |
/// | `validator_address` | `address` | The validator account address to be removed from the validator set. |
@@ -865,16 +865,16 @@ pub enum ScriptCall {
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
- /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `lr_account`. |
+ /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. |
- /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | The sending account is not the Libra Root account or Treasury Compliance account |
+ /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | The sending account is not the Diem Root account or Treasury Compliance account |
/// | 0 | 0 | The provided `validator_name` does not match the already-recorded human name for the validator. |
- /// | `Errors::INVALID_ARGUMENT` | `LibraSystem::ENOT_AN_ACTIVE_VALIDATOR` | The validator to be removed is not in the validator set. |
- /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ELIBRA_ROOT` | The sending account is not the Libra Root account. |
- /// | `Errors::REQUIRES_ROLE` | `Roles::ELIBRA_ROOT` | The sending account is not the Libra Root account. |
- /// | `Errors::INVALID_STATE` | `LibraConfig::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. |
+ /// | `Errors::INVALID_ARGUMENT` | `DiemSystem::ENOT_AN_ACTIVE_VALIDATOR` | The validator to be removed is not in the validator set. |
+ /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. |
+ /// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. |
+ /// | `Errors::INVALID_STATE` | `DiemConfig::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. |
///
/// # Related Scripts
/// * `Script::create_validator_account`
@@ -895,9 +895,9 @@ pub enum ScriptCall {
/// be sent by any account.
///
/// # Technical Description
- /// Rotate the `account`'s `LibraAccount::LibraAccount` `authentication_key` field to `new_key`.
+ /// Rotate the `account`'s `DiemAccount::DiemAccount` `authentication_key` field to `new_key`.
/// `new_key` must be a valid ed25519 public key, and `account` must not have previously delegated
- /// its `LibraAccount::KeyRotationCapability`.
+ /// its `DiemAccount::KeyRotationCapability`.
///
/// # Parameters
/// | Name | Type | Description |
@@ -908,8 +908,8 @@ pub enum ScriptCall {
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
- /// | `Errors::INVALID_STATE` | `LibraAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `LibraAccount::KeyRotationCapability`. |
- /// | `Errors::INVALID_ARGUMENT` | `LibraAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. |
+ /// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. |
+ /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. |
///
/// # Related Scripts
/// * `Script::rotate_authentication_key_with_nonce`
@@ -920,12 +920,12 @@ pub enum ScriptCall {
/// # Summary
/// Rotates the sender's authentication key to the supplied new authentication key. May be sent by
/// any account that has a sliding nonce resource published under it (usually this is Treasury
- /// Compliance or Libra Root accounts).
+ /// Compliance or Diem Root accounts).
///
/// # Technical Description
- /// Rotates the `account`'s `LibraAccount::LibraAccount` `authentication_key` field to `new_key`.
+ /// Rotates the `account`'s `DiemAccount::DiemAccount` `authentication_key` field to `new_key`.
/// `new_key` must be a valid ed25519 public key, and `account` must not have previously delegated
- /// its `LibraAccount::KeyRotationCapability`.
+ /// its `DiemAccount::KeyRotationCapability`.
///
/// # Parameters
/// | Name | Type | Description |
@@ -941,8 +941,8 @@ pub enum ScriptCall {
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. |
- /// | `Errors::INVALID_STATE` | `LibraAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `LibraAccount::KeyRotationCapability`. |
- /// | `Errors::INVALID_ARGUMENT` | `LibraAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. |
+ /// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. |
+ /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. |
///
/// # Related Scripts
/// * `Script::rotate_authentication_key`
@@ -952,30 +952,30 @@ pub enum ScriptCall {
/// # Summary
/// Rotates the specified account's authentication key to the supplied new authentication key. May
- /// only be sent by the Libra Root account as a write set transaction.
+ /// only be sent by the Diem Root account as a write set transaction.
///
/// # Technical Description
- /// Rotate the `account`'s `LibraAccount::LibraAccount` `authentication_key` field to `new_key`.
+ /// Rotate the `account`'s `DiemAccount::DiemAccount` `authentication_key` field to `new_key`.
/// `new_key` must be a valid ed25519 public key, and `account` must not have previously delegated
- /// its `LibraAccount::KeyRotationCapability`.
+ /// its `DiemAccount::KeyRotationCapability`.
///
/// # Parameters
/// | Name | Type | Description |
/// | ------ | ------ | ------------- |
- /// | `lr_account` | `&signer` | The signer reference of the sending account of the write set transaction. May only be the Libra Root signer. |
+ /// | `dr_account` | `&signer` | The signer reference of the sending account of the write set transaction. May only be the Diem Root signer. |
/// | `account` | `&signer` | Signer reference of account specified in the `execute_as` field of the write set transaction. |
- /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction for Libra Root. |
+ /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction for Diem Root. |
/// | `new_key` | `vector` | New ed25519 public key to be used for `account`. |
///
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
- /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `lr_account`. |
- /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` in `lr_account` is too old and it's impossible to determine if it's duplicated or not. |
- /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` in `lr_account` is too far in the future. |
- /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` in` lr_account` has been previously recorded. |
- /// | `Errors::INVALID_STATE` | `LibraAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `LibraAccount::KeyRotationCapability`. |
- /// | `Errors::INVALID_ARGUMENT` | `LibraAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. |
+ /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. |
+ /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` in `dr_account` is too old and it's impossible to determine if it's duplicated or not. |
+ /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` in `dr_account` is too far in the future. |
+ /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` in` dr_account` has been previously recorded. |
+ /// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. |
+ /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. |
///
/// # Related Scripts
/// * `Script::rotate_authentication_key`
@@ -990,16 +990,16 @@ pub enum ScriptCall {
///
/// # Technical Description
/// Rotates the authentication key of the `to_recover` account to `new_key` using the
- /// `LibraAccount::KeyRotationCapability` stored in the `RecoveryAddress::RecoveryAddress` resource
+ /// `DiemAccount::KeyRotationCapability` stored in the `RecoveryAddress::RecoveryAddress` resource
/// published under `recovery_address`. This transaction can be sent either by the `to_recover`
/// account, or by the account where the `RecoveryAddress::RecoveryAddress` resource is published
- /// that contains `to_recover`'s `LibraAccount::KeyRotationCapability`.
+ /// that contains `to_recover`'s `DiemAccount::KeyRotationCapability`.
///
/// # Parameters
/// | Name | Type | Description |
/// | ------ | ------ | ------------- |
/// | `account` | `&signer` | Signer reference of the sending account of the transaction. |
- /// | `recovery_address` | `address` | Address where `RecoveryAddress::RecoveryAddress` that holds `to_recover`'s `LibraAccount::KeyRotationCapability` is published. |
+ /// | `recovery_address` | `address` | Address where `RecoveryAddress::RecoveryAddress` that holds `to_recover`'s `DiemAccount::KeyRotationCapability` is published. |
/// | `to_recover` | `address` | The address of the account whose authentication key will be updated. |
/// | `new_key` | `vector` | New ed25519 public key to be used for the account at the `to_recover` address. |
///
@@ -1008,8 +1008,8 @@ pub enum ScriptCall {
/// | ---------------- | -------------- | ------------- |
/// | `Errors::NOT_PUBLISHED` | `RecoveryAddress::ERECOVERY_ADDRESS` | `recovery_address` does not have a `RecoveryAddress::RecoveryAddress` resource published under it. |
/// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::ECANNOT_ROTATE_KEY` | The address of `account` is not `recovery_address` or `to_recover`. |
- /// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::EACCOUNT_NOT_RECOVERABLE` | `to_recover`'s `LibraAccount::KeyRotationCapability` is not in the `RecoveryAddress::RecoveryAddress` resource published under `recovery_address`. |
- /// | `Errors::INVALID_ARGUMENT` | `LibraAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. |
+ /// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::EACCOUNT_NOT_RECOVERABLE` | `to_recover`'s `DiemAccount::KeyRotationCapability` is not in the `RecoveryAddress::RecoveryAddress` resource published under `recovery_address`. |
+ /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. |
///
/// # Related Scripts
/// * `Script::rotate_authentication_key`
@@ -1093,7 +1093,7 @@ pub enum ScriptCall {
///
/// # Technical Description
/// This updates the fields with corresponding names held in the `ValidatorConfig::ValidatorConfig`
- /// config resource held under `validator_account`. It then emits a `LibraConfig::NewEpochEvent` to
+ /// config resource held under `validator_account`. It then emits a `DiemConfig::NewEpochEvent` to
/// trigger a reconfiguration of the system. This reconfiguration will update the validator set
/// on-chain with the updated `ValidatorConfig::ValidatorConfig`.
///
@@ -1113,7 +1113,7 @@ pub enum ScriptCall {
/// | `Errors::REQUIRES_ROLE` | `Roles::EVALIDATOR_OPERATOR` | `validator_operator_account` does not have a Validator Operator role. |
/// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::EINVALID_TRANSACTION_SENDER` | `validator_operator_account` is not the registered operator for the validator at `validator_address`. |
/// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::EINVALID_CONSENSUS_KEY` | `consensus_pubkey` is not a valid ed25519 public key. |
- /// | `Errors::INVALID_STATE` | `LibraConfig::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. |
+ /// | `Errors::INVALID_STATE` | `DiemConfig::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. |
///
/// # Related Scripts
/// * `Script::create_validator_account`
@@ -1142,7 +1142,7 @@ pub enum ScriptCall {
/// a Validator Operator role and have a `ValidatorOperatorConfig::ValidatorOperatorConfig`
/// resource published under it. The sending `account` must be a Validator and have a
/// `ValidatorConfig::ValidatorConfig` resource published under it. This script does not emit a
- /// `LibraConfig::NewEpochEvent` and no reconfiguration of the system is initiated by this script.
+ /// `DiemConfig::NewEpochEvent` and no reconfiguration of the system is initiated by this script.
///
/// # Parameters
/// | Name | Type | Description |
@@ -1176,7 +1176,7 @@ pub enum ScriptCall {
/// # Summary
/// Sets the validator operator for a validator in the validator's configuration resource "locally"
/// and does not reconfigure the system. Changes from this transaction will not picked up by the
- /// system until a reconfiguration of the system is triggered. May only be sent by the Libra Root
+ /// system until a reconfiguration of the system is triggered. May only be sent by the Diem Root
/// account as a write set transaction.
///
/// # Technical Description
@@ -1190,20 +1190,20 @@ pub enum ScriptCall {
/// # Parameters
/// | Name | Type | Description |
/// | ------ | ------ | ------------- |
- /// | `lr_account` | `&signer` | The signer reference of the sending account of the write set transaction. May only be the Libra Root signer. |
+ /// | `dr_account` | `&signer` | The signer reference of the sending account of the write set transaction. May only be the Diem Root signer. |
/// | `account` | `&signer` | Signer reference of account specified in the `execute_as` field of the write set transaction. |
- /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction for Libra Root. |
+ /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction for Diem Root. |
/// | `operator_name` | `vector` | Validator operator's human name. |
/// | `operator_account` | `address` | Address of the validator operator account to be added as the `account` validator's operator. |
///
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
- /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `lr_account`. |
- /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` in `lr_account` is too old and it's impossible to determine if it's duplicated or not. |
- /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` in `lr_account` is too far in the future. |
- /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` in` lr_account` has been previously recorded. |
- /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | The sending account is not the Libra Root account or Treasury Compliance account |
+ /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. |
+ /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` in `dr_account` is too old and it's impossible to determine if it's duplicated or not. |
+ /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` in `dr_account` is too far in the future. |
+ /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` in` dr_account` has been previously recorded. |
+ /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | The sending account is not the Diem Root account or Treasury Compliance account |
/// | `Errors::NOT_PUBLISHED` | `ValidatorOperatorConfig::EVALIDATOR_OPERATOR_CONFIG` | The `ValidatorOperatorConfig::ValidatorOperatorConfig` resource is not published under `operator_account`. |
/// | 0 | 0 | The `human_name` field of the `ValidatorOperatorConfig::ValidatorOperatorConfig` resource under `operator_account` does not match the provided `human_name`. |
/// | `Errors::REQUIRES_ROLE` | `Roles::EVALIDATOR` | `account` does not have a Validator account role. |
@@ -1240,8 +1240,8 @@ pub enum ScriptCall {
///
/// ## Events
/// Successful execution of the transaction will emit two events:
- /// * A `Libra::MintEvent` with the amount and currency code minted is emitted on the
- /// `mint_event_handle` in the stored `Libra::CurrencyInfo` resource stored under
+ /// * A `Diem::MintEvent` with the amount and currency code minted is emitted on the
+ /// `mint_event_handle` in the stored `Diem::CurrencyInfo` resource stored under
/// `0xA550C18`; and
/// * A `DesignatedDealer::ReceivedMintEvent` with the amount, currency code, and Designated
/// Dealer's address is emitted on the `mint_event_handle` in the stored `DesignatedDealer::Dealer`
@@ -1270,9 +1270,9 @@ pub enum ScriptCall {
/// | `Errors::NOT_PUBLISHED` | `DesignatedDealer::EDEALER` | `DesignatedDealer::Dealer` or `DesignatedDealer::TierInfo` resource does not exist at `designated_dealer_address`. |
/// | `Errors::INVALID_ARGUMENT` | `DesignatedDealer::EINVALID_TIER_INDEX` | The `tier_index` is out of bounds. |
/// | `Errors::INVALID_ARGUMENT` | `DesignatedDealer::EINVALID_AMOUNT_FOR_TIER` | `mint_amount` exceeds the maximum allowed amount for `tier_index`. |
- /// | `Errors::REQUIRES_CAPABILITY` | `Libra::EMINT_CAPABILITY` | `tc_account` does not have a `Libra::MintCapability` resource published under it. |
- /// | `Errors::INVALID_STATE` | `Libra::EMINTING_NOT_ALLOWED` | Minting is not currently allowed for `CoinType` coins. |
- /// | `Errors::LIMIT_EXCEEDED` | `LibraAccount::EDEPOSIT_EXCEEDS_LIMITS` | The depositing of the funds would exceed the `account`'s account limits. |
+ /// | `Errors::REQUIRES_CAPABILITY` | `Diem::EMINT_CAPABILITY` | `tc_account` does not have a `Diem::MintCapability` resource published under it. |
+ /// | `Errors::INVALID_STATE` | `Diem::EMINTING_NOT_ALLOWED` | Minting is not currently allowed for `CoinType` coins. |
+ /// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EDEPOSIT_EXCEEDS_LIMITS` | The depositing of the funds would exceed the `account`'s account limits. |
///
/// # Related Scripts
/// * `Script::create_designated_dealer`
@@ -1325,20 +1325,48 @@ pub enum ScriptCall {
},
/// # Summary
- /// Update the dual attestation limit on-chain. Defined in terms of micro-LBR. The transaction can
+ /// Updates the Diem major version that is stored on-chain and is used by the VM. This
+ /// transaction can only be sent from the Diem Root account.
+ ///
+ /// # Technical Description
+ /// Updates the `DiemVersion` on-chain config and emits a `DiemConfig::NewEpochEvent` to trigger
+ /// a reconfiguration of the system. The `major` version that is passed in must be strictly greater
+ /// than the current major version held on-chain. The VM reads this information and can use it to
+ /// preserve backwards compatibility with previous major versions of the VM.
+ ///
+ /// # Parameters
+ /// | Name | Type | Description |
+ /// | ------ | ------ | ------------- |
+ /// | `account` | `&signer` | Signer reference of the sending account. Must be the Diem Root account. |
+ /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. |
+ /// | `major` | `u64` | The `major` version of the VM to be used from this transaction on. |
+ ///
+ /// # Common Abort Conditions
+ /// | Error Category | Error Reason | Description |
+ /// | ---------------- | -------------- | ------------- |
+ /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. |
+ /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. |
+ /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. |
+ /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. |
+ /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | `account` is not the Diem Root account. |
+ /// | `Errors::INVALID_ARGUMENT` | `DiemVersion::EINVALID_MAJOR_VERSION_NUMBER` | `major` is less-than or equal to the current major version stored on-chain. |
+ UpdateDiemVersion { sliding_nonce: u64, major: u64 },
+
+ /// # Summary
+ /// Update the dual attestation limit on-chain. Defined in terms of micro-XDX. The transaction can
/// only be sent by the Treasury Compliance account. After this transaction all inter-VASP
/// payments over this limit must be checked for dual attestation.
///
/// # Technical Description
- /// Updates the `micro_lbr_limit` field of the `DualAttestation::Limit` resource published under
- /// `0xA550C18`. The amount is set in micro-LBR.
+ /// Updates the `micro_xdx_limit` field of the `DualAttestation::Limit` resource published under
+ /// `0xA550C18`. The amount is set in micro-XDX.
///
/// # Parameters
/// | Name | Type | Description |
/// | ------ | ------ | ------------- |
/// | `tc_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Treasury Compliance account. |
/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. |
- /// | `new_micro_lbr_limit` | `u64` | The new dual attestation limit to be used on-chain. |
+ /// | `new_micro_xdx_limit` | `u64` | The new dual attestation limit to be used on-chain. |
///
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
@@ -1354,17 +1382,17 @@ pub enum ScriptCall {
/// * `Script::update_minting_ability`
UpdateDualAttestationLimit {
sliding_nonce: u64,
- new_micro_lbr_limit: u64,
+ new_micro_xdx_limit: u64,
},
/// # Summary
- /// Update the rough on-chain exchange rate between a specified currency and LBR (as a conversion
- /// to micro-LBR). The transaction can only be sent by the Treasury Compliance account. After this
+ /// Update the rough on-chain exchange rate between a specified currency and XDX (as a conversion
+ /// to micro-XDX). The transaction can only be sent by the Treasury Compliance account. After this
/// transaction the updated exchange rate will be used for normalization of gas prices, and for
/// dual attestation checking.
///
/// # Technical Description
- /// Updates the on-chain exchange rate from the given `Currency` to micro-LBR. The exchange rate
+ /// Updates the on-chain exchange rate from the given `Currency` to micro-XDX. The exchange rate
/// is given by `new_exchange_rate_numerator/new_exchange_rate_denominator`.
///
/// # Parameters
@@ -1373,8 +1401,8 @@ pub enum ScriptCall {
/// | `Currency` | Type | The Move type for the `Currency` whose exchange rate is being updated. `Currency` must be an already-registered currency on-chain. |
/// | `tc_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Treasury Compliance account. |
/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for the transaction. |
- /// | `new_exchange_rate_numerator` | `u64` | The numerator for the new to micro-LBR exchange rate for `Currency`. |
- /// | `new_exchange_rate_denominator` | `u64` | The denominator for the new to micro-LBR exchange rate for `Currency`. |
+ /// | `new_exchange_rate_numerator` | `u64` | The numerator for the new to micro-XDX exchange rate for `Currency`. |
+ /// | `new_exchange_rate_denominator` | `u64` | The denominator for the new to micro-XDX exchange rate for `Currency`. |
///
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
@@ -1399,41 +1427,13 @@ pub enum ScriptCall {
new_exchange_rate_denominator: u64,
},
- /// # Summary
- /// Updates the Libra major version that is stored on-chain and is used by the VM. This
- /// transaction can only be sent from the Libra Root account.
- ///
- /// # Technical Description
- /// Updates the `LibraVersion` on-chain config and emits a `LibraConfig::NewEpochEvent` to trigger
- /// a reconfiguration of the system. The `major` version that is passed in must be strictly greater
- /// than the current major version held on-chain. The VM reads this information and can use it to
- /// preserve backwards compatibility with previous major versions of the VM.
- ///
- /// # Parameters
- /// | Name | Type | Description |
- /// | ------ | ------ | ------------- |
- /// | `account` | `&signer` | Signer reference of the sending account. Must be the Libra Root account. |
- /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. |
- /// | `major` | `u64` | The `major` version of the VM to be used from this transaction on. |
- ///
- /// # Common Abort Conditions
- /// | Error Category | Error Reason | Description |
- /// | ---------------- | -------------- | ------------- |
- /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. |
- /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. |
- /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. |
- /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. |
- /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ELIBRA_ROOT` | `account` is not the Libra Root account. |
- /// | `Errors::INVALID_ARGUMENT` | `LibraVersion::EINVALID_MAJOR_VERSION_NUMBER` | `major` is less-than or equal to the current major version stored on-chain. |
- UpdateLibraVersion { sliding_nonce: u64, major: u64 },
-
/// # Summary
/// Script to allow or disallow minting of new coins in a specified currency. This transaction can
/// only be sent by the Treasury Compliance account. Turning minting off for a currency will have
/// no effect on coins already in circulation, and coins may still be removed from the system.
///
/// # Technical Description
- /// This transaction sets the `can_mint` field of the `Libra::CurrencyInfo` resource
+ /// This transaction sets the `can_mint` field of the `Diem::CurrencyInfo` resource
/// published under `0xA550C18` to the value of `allow_minting`. Minting of coins if allowed if
/// this field is set to `true` and minting of new coins in `Currency` is disallowed otherwise.
/// This transaction needs to be sent by the Treasury Compliance account.
@@ -1442,14 +1442,14 @@ pub enum ScriptCall {
/// | Name | Type | Description |
/// | ------ | ------ | ------------- |
/// | `Currency` | Type | The Move type for the `Currency` whose minting ability is being updated. `Currency` must be an already-registered currency on-chain. |
- /// | `account` | `&signer` | Signer reference of the sending account. Must be the Libra Root account. |
+ /// | `account` | `&signer` | Signer reference of the sending account. Must be the Diem Root account. |
/// | `allow_minting` | `bool` | Whether to allow minting of new coins in `Currency`. |
///
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. |
- /// | `Errors::NOT_PUBLISHED` | `Libra::ECURRENCY_INFO` | `Currency` is not a registered currency on-chain. |
+ /// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | `Currency` is not a registered currency on-chain. |
///
/// # Related Scripts
/// * `Script::update_dual_attestation_limit`
@@ -1461,7 +1461,7 @@ pub enum ScriptCall {
}
impl ScriptCall {
- /// Build a Libra `Script` from a structured object `ScriptCall`.
+ /// Build a Diem `Script` from a structured object `ScriptCall`.
pub fn encode(self) -> Script {
use ScriptCall::*;
match self {
@@ -1664,10 +1664,14 @@ impl ScriptCall {
sliding_nonce,
to_unfreeze_account,
} => encode_unfreeze_account_script(sliding_nonce, to_unfreeze_account),
+ UpdateDiemVersion {
+ sliding_nonce,
+ major,
+ } => encode_update_diem_version_script(sliding_nonce, major),
UpdateDualAttestationLimit {
sliding_nonce,
- new_micro_lbr_limit,
- } => encode_update_dual_attestation_limit_script(sliding_nonce, new_micro_lbr_limit),
+ new_micro_xdx_limit,
+ } => encode_update_dual_attestation_limit_script(sliding_nonce, new_micro_xdx_limit),
UpdateExchangeRate {
currency,
sliding_nonce,
@@ -1679,10 +1683,6 @@ impl ScriptCall {
new_exchange_rate_numerator,
new_exchange_rate_denominator,
),
- UpdateLibraVersion {
- sliding_nonce,
- major,
- } => encode_update_libra_version_script(sliding_nonce, major),
UpdateMintingAbility {
currency,
allow_minting,
@@ -1690,7 +1690,7 @@ impl ScriptCall {
}
}
- /// Try to recognize a Libra `Script` and convert it into a structured object `ScriptCall`.
+ /// Try to recognize a Diem `Script` and convert it into a structured object `ScriptCall`.
pub fn decode(script: &Script) -> Option {
match SCRIPT_DECODER_MAP.get(script.code()) {
Some(decoder) => decoder(script),
@@ -1701,15 +1701,15 @@ impl ScriptCall {
/// # Summary
/// Adds a zero `Currency` balance to the sending `account`. This will enable `account` to
-/// send, receive, and hold `Libra::Libra` coins. This transaction can be
+/// send, receive, and hold `Diem::Diem` coins. This transaction can be
/// successfully sent by any account that is allowed to hold balances
/// (e.g., VASP, Designated Dealer).
///
/// # Technical Description
/// After the successful execution of this transaction the sending account will have a
-/// `LibraAccount::Balance` resource with zero balance published under it. Only
+/// `DiemAccount::Balance` resource with zero balance published under it. Only
/// accounts that can hold balances can send this transaction, the sending account cannot
-/// already have a `LibraAccount::Balance` published under it.
+/// already have a `DiemAccount::Balance` published under it.
///
/// # Parameters
/// | Name | Type | Description |
@@ -1720,9 +1720,9 @@ impl ScriptCall {
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
-/// | `Errors::NOT_PUBLISHED` | `Libra::ECURRENCY_INFO` | The `Currency` is not a registered currency on-chain. |
-/// | `Errors::INVALID_ARGUMENT` | `LibraAccount::EROLE_CANT_STORE_BALANCE` | The sending `account`'s role does not permit balances. |
-/// | `Errors::ALREADY_PUBLISHED` | `LibraAccount::EADD_EXISTING_CURRENCY` | A balance for `Currency` is already published under the sending `account`. |
+/// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `Currency` is not a registered currency on-chain. |
+/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EROLE_CANT_STORE_BALANCE` | The sending `account`'s role does not permit balances. |
+/// | `Errors::ALREADY_PUBLISHED` | `DiemAccount::EADD_EXISTING_CURRENCY` | A balance for `Currency` is already published under the sending `account`. |
///
/// # Related Scripts
/// * `Script::create_child_vasp_account`
@@ -1743,7 +1743,7 @@ pub fn encode_add_currency_to_account_script(currency: TypeTag) -> Script {
/// specified recovery account can rotate the sender account's authentication key.
///
/// # Technical Description
-/// Adds the `LibraAccount::KeyRotationCapability` for the sending account
+/// Adds the `DiemAccount::KeyRotationCapability` for the sending account
/// (`to_recover_account`) to the `RecoveryAddress::RecoveryAddress` resource under
/// `recovery_address`. After this transaction has been executed successfully the account at
/// `recovery_address` and the `to_recover_account` may rotate the authentication key of
@@ -1763,12 +1763,12 @@ pub fn encode_add_currency_to_account_script(currency: TypeTag) -> Script {
/// | Name | Type | Description |
/// | ------ | ------ | ------------- |
/// | `to_recover_account` | `&signer` | The signer reference of the sending account of this transaction. |
-/// | `recovery_address` | `address` | The account address where the `to_recover_account`'s `LibraAccount::KeyRotationCapability` will be stored. |
+/// | `recovery_address` | `address` | The account address where the `to_recover_account`'s `DiemAccount::KeyRotationCapability` will be stored. |
///
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
-/// | `Errors::INVALID_STATE` | `LibraAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `to_recover_account` has already delegated/extracted its `LibraAccount::KeyRotationCapability`. |
+/// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `to_recover_account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. |
/// | `Errors::NOT_PUBLISHED` | `RecoveryAddress::ERECOVERY_ADDRESS` | `recovery_address` does not have a `RecoveryAddress` resource published under it. |
/// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::EINVALID_KEY_ROTATION_DELEGATION` | `to_recover_account` and `recovery_address` do not belong to the same VASP. |
///
@@ -1785,37 +1785,37 @@ pub fn encode_add_recovery_rotation_capability_script(recovery_address: AccountA
/// # Summary
/// Adds a script hash to the transaction allowlist. This transaction
-/// can only be sent by the Libra Root account. Scripts with this hash can be
+/// can only be sent by the Diem Root account. Scripts with this hash can be
/// sent afterward the successful execution of this script.
///
/// # Technical Description
///
-/// The sending account (`lr_account`) must be the Libra Root account. The script allow
+/// The sending account (`dr_account`) must be the Diem Root account. The script allow
/// list must not already hold the script `hash` being added. The `sliding_nonce` must be
-/// a valid nonce for the Libra Root account. After this transaction has executed
+/// a valid nonce for the Diem Root account. After this transaction has executed
/// successfully a reconfiguration will be initiated, and the on-chain config
-/// `LibraTransactionPublishingOption::LibraTransactionPublishingOption`'s
+/// `DiemTransactionPublishingOption::DiemTransactionPublishingOption`'s
/// `script_allow_list` field will contain the new script `hash` and transactions
/// with this `hash` can be successfully sent to the network.
///
/// # Parameters
/// | Name | Type | Description |
/// | ------ | ------ | ------------- |
-/// | `lr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Libra Root signer. |
+/// | `dr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Diem Root signer. |
/// | `hash` | `vector` | The hash of the script to be added to the script allowlist. |
/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. |
///
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
-/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `lr_account`. |
+/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. |
-/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ELIBRA_ROOT` | The sending account is not the Libra Root account. |
-/// | `Errors::REQUIRES_ROLE` | `Roles::ELIBRA_ROOT` | The sending account is not the Libra Root account. |
-/// | `Errors::INVALID_ARGUMENT` | `LibraTransactionPublishingOption::EINVALID_SCRIPT_HASH` | The script `hash` is an invalid length. |
-/// | `Errors::INVALID_ARGUMENT` | `LibraTransactionPublishingOption::EALLOWLIST_ALREADY_CONTAINS_SCRIPT` | The on-chain allowlist already contains the script `hash`. |
+/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. |
+/// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. |
+/// | `Errors::INVALID_ARGUMENT` | `DiemTransactionPublishingOption::EINVALID_SCRIPT_HASH` | The script `hash` is an invalid length. |
+/// | `Errors::INVALID_ARGUMENT` | `DiemTransactionPublishingOption::EALLOWLIST_ALREADY_CONTAINS_SCRIPT` | The on-chain allowlist already contains the script `hash`. |
pub fn encode_add_to_script_allow_list_script(hash: Vec, sliding_nonce: u64) -> Script {
Script::new(
ADD_TO_SCRIPT_ALLOW_LIST_CODE.to_vec(),
@@ -1830,11 +1830,11 @@ pub fn encode_add_to_script_allow_list_script(hash: Vec, sliding_nonce: u64)
/// # Summary
/// Adds a validator account to the validator set, and triggers a
/// reconfiguration of the system to admit the account to the validator set for the system. This
-/// transaction can only be successfully called by the Libra Root account.
+/// transaction can only be successfully called by the Diem Root account.
///
/// # Technical Description
/// This script adds the account at `validator_address` to the validator set.
-/// This transaction emits a `LibraConfig::NewEpochEvent` event and triggers a
+/// This transaction emits a `DiemConfig::NewEpochEvent` event and triggers a
/// reconfiguration. Once the reconfiguration triggered by this script's
/// execution has been performed, the account at the `validator_address` is
/// considered to be a validator in the network.
@@ -1845,7 +1845,7 @@ pub fn encode_add_to_script_allow_list_script(hash: Vec, sliding_nonce: u64)
/// # Parameters
/// | Name | Type | Description |
/// | ------ | ------ | ------------- |
-/// | `lr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Libra Root signer. |
+/// | `dr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Diem Root signer. |
/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. |
/// | `validator_name` | `vector` | ASCII-encoded human name for the validator. Must match the human name in the `ValidatorConfig::ValidatorConfig` for the validator. |
/// | `validator_address` | `address` | The validator account address to be added to the validator set. |
@@ -1853,16 +1853,16 @@ pub fn encode_add_to_script_allow_list_script(hash: Vec, sliding_nonce: u64)
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
-/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `lr_account`. |
+/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. |
-/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ELIBRA_ROOT` | The sending account is not the Libra Root account. |
-/// | `Errors::REQUIRES_ROLE` | `Roles::ELIBRA_ROOT` | The sending account is not the Libra Root account. |
+/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. |
+/// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. |
/// | 0 | 0 | The provided `validator_name` does not match the already-recorded human name for the validator. |
-/// | `Errors::INVALID_ARGUMENT` | `LibraSystem::EINVALID_PROSPECTIVE_VALIDATOR` | The validator to be added does not have a `ValidatorConfig::ValidatorConfig` resource published under it, or its `config` field is empty. |
-/// | `Errors::INVALID_ARGUMENT` | `LibraSystem::EALREADY_A_VALIDATOR` | The `validator_address` account is already a registered validator. |
-/// | `Errors::INVALID_STATE` | `LibraConfig::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. |
+/// | `Errors::INVALID_ARGUMENT` | `DiemSystem::EINVALID_PROSPECTIVE_VALIDATOR` | The validator to be added does not have a `ValidatorConfig::ValidatorConfig` resource published under it, or its `config` field is empty. |
+/// | `Errors::INVALID_ARGUMENT` | `DiemSystem::EALREADY_A_VALIDATOR` | The `validator_address` account is already a registered validator. |
+/// | `Errors::INVALID_STATE` | `DiemConfig::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. |
///
/// # Related Scripts
/// * `Script::create_validator_account`
@@ -1897,21 +1897,21 @@ pub fn encode_add_validator_and_reconfigure_script(
///
/// # Technical Description
/// This transaction permanently destroys all the coins of `Token` type
-/// stored in the `Libra::Preburn` resource published under the
+/// stored in the `Diem::Preburn` resource published under the
/// `preburn_address` account address.
///
/// This transaction will only succeed if the sending `account` has a
-/// `Libra::BurnCapability`, and a `Libra::Preburn` resource
+/// `Diem::BurnCapability`, and a `Diem::Preburn` resource
/// exists under `preburn_address`, with a non-zero `to_burn` field. After the successful execution
/// of this transaction the `total_value` field in the
-/// `Libra::CurrencyInfo` resource published under `0xA550C18` will be
+/// `Diem::CurrencyInfo` resource published under `0xA550C18` will be
/// decremented by the value of the `to_burn` field of the preburn resource
/// under `preburn_address` immediately before this transaction, and the
/// `to_burn` field of the preburn resource will have a zero value.
///
/// ## Events
-/// The successful execution of this transaction will emit a `Libra::BurnEvent` on the event handle
-/// held in the `Libra::CurrencyInfo` resource's `burn_events` published under
+/// The successful execution of this transaction will emit a `Diem::BurnEvent` on the event handle
+/// held in the `Diem::CurrencyInfo` resource's `burn_events` published under
/// `0xA550C18`.
///
/// # Parameters
@@ -1929,10 +1929,10 @@ pub fn encode_add_validator_and_reconfigure_script(
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. |
-/// | `Errors::REQUIRES_CAPABILITY` | `Libra::EBURN_CAPABILITY` | The sending `account` does not have a `Libra::BurnCapability` published under it. |
-/// | `Errors::NOT_PUBLISHED` | `Libra::EPREBURN` | The account at `preburn_address` does not have a `Libra::Preburn` resource published under it. |
-/// | `Errors::INVALID_STATE` | `Libra::EPREBURN_EMPTY` | The `Libra::Preburn` resource is empty (has a value of 0). |
-/// | `Errors::NOT_PUBLISHED` | `Libra::ECURRENCY_INFO` | The specified `Token` is not a registered currency on-chain. |
+/// | `Errors::REQUIRES_CAPABILITY` | `Diem::EBURN_CAPABILITY` | The sending `account` does not have a `Diem::BurnCapability` published under it. |
+/// | `Errors::NOT_PUBLISHED` | `Diem::EPREBURN` | The account at `preburn_address` does not have a `Diem::Preburn` resource published under it. |
+/// | `Errors::INVALID_STATE` | `Diem::EPREBURN_EMPTY` | The `Diem::Preburn` resource is empty (has a value of 0). |
+/// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The specified `Token` is not a registered currency on-chain. |
///
/// # Related Scripts
/// * `Script::burn_txn_fees`
@@ -1955,7 +1955,7 @@ pub fn encode_burn_script(
/// # Summary
/// Burns the transaction fees collected in the `CoinType` currency so that the
-/// Libra association may reclaim the backing coins off-chain. May only be sent
+/// Diem association may reclaim the backing coins off-chain. May only be sent
/// by the Treasury Compliance account.
///
/// # Technical Description
@@ -1968,8 +1968,8 @@ pub fn encode_burn_script(
/// account address will have a value of 0 after the successful execution of this script.
///
/// ## Events
-/// The successful execution of this transaction will emit a `Libra::BurnEvent` on the event handle
-/// held in the `Libra::CurrencyInfo` resource's `burn_events` published under
+/// The successful execution of this transaction will emit a `Diem::BurnEvent` on the event handle
+/// held in the `Diem::CurrencyInfo` resource's `burn_events` published under
/// `0xA550C18`.
///
/// # Parameters
@@ -1983,7 +1983,7 @@ pub fn encode_burn_script(
/// | ---------------- | -------------- | ------------- |
/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. |
/// | `Errors::NOT_PUBLISHED` | `TransactionFee::ETRANSACTION_FEE` | `CoinType` is not an accepted transaction fee currency. |
-/// | `Errors::INVALID_ARGUMENT` | `Libra::ECOIN` | The collected fees in `CoinType` are zero. |
+/// | `Errors::INVALID_ARGUMENT` | `Diem::ECOIN` | The collected fees in `CoinType` are zero. |
///
/// # Related Scripts
/// * `Script::burn`
@@ -1998,22 +1998,22 @@ pub fn encode_burn_txn_fees_script(coin_type: TypeTag) -> Script {
/// Can only be successfully sent by an account with Treasury Compliance role.
///
/// # Technical Description
-/// Cancels and returns all coins held in the `Libra::Preburn` resource under the `preburn_address` and
-/// return the funds to the `preburn_address` account's `LibraAccount::Balance`.
-/// The transaction must be sent by an `account` with a `Libra::BurnCapability`
+/// Cancels and returns all coins held in the `Diem::Preburn` resource under the `preburn_address` and
+/// return the funds to the `preburn_address` account's `DiemAccount::Balance`.
+/// The transaction must be sent by an `account` with a `Diem::BurnCapability`
/// resource published under it. The account at `preburn_address` must have a
-/// `Libra::Preburn` resource published under it, and its value must be nonzero. The transaction removes
-/// the entire balance held in the `Libra::Preburn` resource, and returns it back to the account's
-/// `LibraAccount::Balance` under `preburn_address`. Due to this, the account at
+/// `Diem::Preburn` resource published under it, and its value must be nonzero. The transaction removes
+/// the entire balance held in the `Diem::Preburn` resource, and returns it back to the account's
+/// `DiemAccount::Balance` under `preburn_address`. Due to this, the account at
/// `preburn_address` must already have a balance in the `Token` currency published
/// before this script is called otherwise the transaction will fail.
///
/// ## Events
/// The successful execution of this transaction will emit:
-/// * A `Libra::CancelBurnEvent` on the event handle held in the `Libra::CurrencyInfo`
+/// * A `Diem::CancelBurnEvent` on the event handle held in the `Diem::CurrencyInfo`
/// resource's `burn_events` published under `0xA550C18`.
-/// * A `LibraAccount::ReceivedPaymentEvent` on the `preburn_address`'s
-/// `LibraAccount::LibraAccount` `received_events` event handle with both the `payer` and `payee`
+/// * A `DiemAccount::ReceivedPaymentEvent` on the `preburn_address`'s
+/// `DiemAccount::DiemAccount` `received_events` event handle with both the `payer` and `payee`
/// being `preburn_address`.
///
/// # Parameters
@@ -2026,12 +2026,12 @@ pub fn encode_burn_txn_fees_script(coin_type: TypeTag) -> Script {
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
-/// | `Errors::REQUIRES_CAPABILITY` | `Libra::EBURN_CAPABILITY` | The sending `account` does not have a `Libra::BurnCapability` published under it. |
-/// | `Errors::NOT_PUBLISHED` | `Libra::EPREBURN` | The account at `preburn_address` does not have a `Libra::Preburn` resource published under it. |
-/// | `Errors::NOT_PUBLISHED` | `Libra::ECURRENCY_INFO` | The specified `Token` is not a registered currency on-chain. |
-/// | `Errors::INVALID_ARGUMENT` | `LibraAccount::ECOIN_DEPOSIT_IS_ZERO` | The value held in the preburn resource was zero. |
-/// | `Errors::INVALID_ARGUMENT` | `LibraAccount::EPAYEE_CANT_ACCEPT_CURRENCY_TYPE` | The account at `preburn_address` doesn't have a balance resource for `Token`. |
-/// | `Errors::LIMIT_EXCEEDED` | `LibraAccount::EDEPOSIT_EXCEEDS_LIMITS` | The depositing of the funds held in the prebun area would exceed the `account`'s account limits. |
+/// | `Errors::REQUIRES_CAPABILITY` | `Diem::EBURN_CAPABILITY` | The sending `account` does not have a `Diem::BurnCapability` published under it. |
+/// | `Errors::NOT_PUBLISHED` | `Diem::EPREBURN` | The account at `preburn_address` does not have a `Diem::Preburn` resource published under it. |
+/// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The specified `Token` is not a registered currency on-chain. |
+/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::ECOIN_DEPOSIT_IS_ZERO` | The value held in the preburn resource was zero. |
+/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EPAYEE_CANT_ACCEPT_CURRENCY_TYPE` | The account at `preburn_address` doesn't have a balance resource for `Token`. |
+/// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EDEPOSIT_EXCEEDS_LIMITS` | The depositing of the funds held in the prebun area would exceed the `account`'s account limits. |
/// | `Errors::INVALID_STATE` | `DualAttestation::EPAYEE_COMPLIANCE_KEY_NOT_SET` | The `account` does not have a compliance key set on it but dual attestion checking was performed. |
///
/// # Related Scripts
@@ -2064,12 +2064,12 @@ pub fn encode_cancel_burn_script(token: TypeTag, preburn_address: AccountAddress
///
/// ## Events
/// Successful execution with a `child_initial_balance` greater than zero will emit:
-/// * A `LibraAccount::SentPaymentEvent` with the `payer` field being the Parent VASP's address,
+/// * A `DiemAccount::SentPaymentEvent` with the `payer` field being the Parent VASP's address,
/// and payee field being `child_address`. This is emitted on the Parent VASP's
-/// `LibraAccount::LibraAccount` `sent_events` handle.
-/// * A `LibraAccount::ReceivedPaymentEvent` with the `payer` field being the Parent VASP's address,
+/// `DiemAccount::DiemAccount` `sent_events` handle.
+/// * A `DiemAccount::ReceivedPaymentEvent` with the `payer` field being the Parent VASP's address,
/// and payee field being `child_address`. This is emitted on the new Child VASPS's
-/// `LibraAccount::LibraAccount` `received_events` handle.
+/// `DiemAccount::DiemAccount` `received_events` handle.
///
/// # Parameters
/// | Name | Type | Description |
@@ -2084,15 +2084,15 @@ pub fn encode_cancel_burn_script(token: TypeTag, preburn_address: AccountAddress
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
-/// | `Errors::INVALID_ARGUMENT` | `LibraAccount::EMALFORMED_AUTHENTICATION_KEY` | The `auth_key_prefix` was not of length 32. |
+/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | The `auth_key_prefix` was not of length 32. |
/// | `Errors::REQUIRES_ROLE` | `Roles::EPARENT_VASP` | The sending account wasn't a Parent VASP account. |
/// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `child_address` address is already taken. |
/// | `Errors::LIMIT_EXCEEDED` | `VASP::ETOO_MANY_CHILDREN` | The sending account has reached the maximum number of allowed child accounts. |
-/// | `Errors::NOT_PUBLISHED` | `Libra::ECURRENCY_INFO` | The `CoinType` is not a registered currency on-chain. |
-/// | `Errors::INVALID_STATE` | `LibraAccount::EWITHDRAWAL_CAPABILITY_ALREADY_EXTRACTED` | The withdrawal capability for the sending account has already been extracted. |
-/// | `Errors::NOT_PUBLISHED` | `LibraAccount::EPAYER_DOESNT_HOLD_CURRENCY` | The sending account doesn't have a balance in `CoinType`. |
-/// | `Errors::LIMIT_EXCEEDED` | `LibraAccount::EINSUFFICIENT_BALANCE` | The sending account doesn't have at least `child_initial_balance` of `CoinType` balance. |
-/// | `Errors::INVALID_ARGUMENT` | `LibraAccount::ECANNOT_CREATE_AT_VM_RESERVED` | The `child_address` is the reserved address 0x0. |
+/// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `CoinType` is not a registered currency on-chain. |
+/// | `Errors::INVALID_STATE` | `DiemAccount::EWITHDRAWAL_CAPABILITY_ALREADY_EXTRACTED` | The withdrawal capability for the sending account has already been extracted. |
+/// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYER_DOESNT_HOLD_CURRENCY` | The sending account doesn't have a balance in `CoinType`. |
+/// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EINSUFFICIENT_BALANCE` | The sending account doesn't have at least `child_initial_balance` of `CoinType` balance. |
+/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::ECANNOT_CREATE_AT_VM_RESERVED` | The `child_address` is the reserved address 0x0. |
///
/// # Related Scripts
/// * `Script::create_parent_vasp_account`
@@ -2154,7 +2154,7 @@ pub fn encode_create_child_vasp_account_script(
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. |
/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. |
/// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. |
-/// | `Errors::NOT_PUBLISHED` | `Libra::ECURRENCY_INFO` | The `Currency` is not a registered currency on-chain. |
+/// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `Currency` is not a registered currency on-chain. |
/// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `addr` address is already taken. |
///
/// # Related Scripts
@@ -2212,7 +2212,7 @@ pub fn encode_create_designated_dealer_script(
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. |
/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. |
/// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. |
-/// | `Errors::NOT_PUBLISHED` | `Libra::ECURRENCY_INFO` | The `CoinType` is not a registered currency on-chain. |
+/// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `CoinType` is not a registered currency on-chain. |
/// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `new_account_address` address is already taken. |
///
/// # Related Scripts
@@ -2251,7 +2251,7 @@ pub fn encode_create_parent_vasp_account_script(
///
/// # Technical Description
/// Publishes a `RecoveryAddress::RecoveryAddress` resource under `account`. It then
-/// extracts the `LibraAccount::KeyRotationCapability` for `account` and adds
+/// extracts the `DiemAccount::KeyRotationCapability` for `account` and adds
/// it to the resource. After the successful execution of this transaction
/// other accounts may add their key rotation to this resource so that `account`
/// may be used as a recovery account for those accounts.
@@ -2264,7 +2264,7 @@ pub fn encode_create_parent_vasp_account_script(
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
-/// | `Errors::INVALID_STATE` | `LibraAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `LibraAccount::KeyRotationCapability`. |
+/// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. |
/// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::ENOT_A_VASP` | `account` is not a VASP account. |
/// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::EKEY_ROTATION_DEPENDENCY_CYCLE` | A key rotation recovery cycle would be created by adding `account`'s key rotation capability. |
/// | `Errors::ALREADY_PUBLISHED` | `RecoveryAddress::ERECOVERY_ADDRESS` | A `RecoveryAddress::RecoveryAddress` resource has already been published under `account`. |
@@ -2277,7 +2277,7 @@ pub fn encode_create_recovery_address_script() -> Script {
}
/// # Summary
-/// Creates a Validator account. This transaction can only be sent by the Libra
+/// Creates a Validator account. This transaction can only be sent by the Diem
/// Root account.
///
/// # Technical Description
@@ -2292,7 +2292,7 @@ pub fn encode_create_recovery_address_script() -> Script {
/// # Parameters
/// | Name | Type | Description |
/// | ------ | ------ | ------------- |
-/// | `lr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Libra Root signer. |
+/// | `dr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Diem Root signer. |
/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. |
/// | `new_account_address` | `address` | Address of the to-be-created Validator account. |
/// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. |
@@ -2301,12 +2301,12 @@ pub fn encode_create_recovery_address_script() -> Script {
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
-/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `lr_account`. |
+/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. |
-/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ELIBRA_ROOT` | The sending account is not the Libra Root account. |
-/// | `Errors::REQUIRES_ROLE` | `Roles::ELIBRA_ROOT` | The sending account is not the Libra Root account. |
+/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. |
+/// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. |
/// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `new_account_address` address is already taken. |
///
/// # Related Scripts
@@ -2336,7 +2336,7 @@ pub fn encode_create_validator_account_script(
}
/// # Summary
-/// Creates a Validator Operator account. This transaction can only be sent by the Libra
+/// Creates a Validator Operator account. This transaction can only be sent by the Diem
/// Root account.
///
/// # Technical Description
@@ -2348,7 +2348,7 @@ pub fn encode_create_validator_account_script(
/// # Parameters
/// | Name | Type | Description |
/// | ------ | ------ | ------------- |
-/// | `lr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Libra Root signer. |
+/// | `dr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Diem Root signer. |
/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. |
/// | `new_account_address` | `address` | Address of the to-be-created Validator account. |
/// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. |
@@ -2357,12 +2357,12 @@ pub fn encode_create_validator_account_script(
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
-/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `lr_account`. |
+/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. |
-/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ELIBRA_ROOT` | The sending account is not the Libra Root account. |
-/// | `Errors::REQUIRES_ROLE` | `Roles::ELIBRA_ROOT` | The sending account is not the Libra Root account. |
+/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. |
+/// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. |
/// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `new_account_address` address is already taken. |
///
/// # Related Scripts
@@ -2394,7 +2394,7 @@ pub fn encode_create_validator_operator_account_script(
/// # Summary
/// Freezes the account at `address`. The sending account of this transaction
/// must be the Treasury Compliance account. The account being frozen cannot be
-/// the Libra Root or Treasury Compliance account. After the successful
+/// the Diem Root or Treasury Compliance account. After the successful
/// execution of this transaction no transactions may be sent from the frozen
/// account, and the frozen account may not send or receive coins.
///
@@ -2402,7 +2402,7 @@ pub fn encode_create_validator_operator_account_script(
/// Sets the `AccountFreezing::FreezingBit` to `true` and emits a
/// `AccountFreezing::FreezeAccountEvent`. The transaction sender must be the
/// Treasury Compliance account, but the account at `to_freeze_account` must
-/// not be either `0xA550C18` (the Libra Root address), or `0xB1E55ED` (the
+/// not be either `0xA550C18` (the Diem Root address), or `0xB1E55ED` (the
/// Treasury Compliance address). Note that this is a per-account property
/// e.g., freezing a Parent VASP will not effect the status any of its child
/// accounts and vice versa.
@@ -2430,7 +2430,7 @@ pub fn encode_create_validator_operator_account_script(
/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. |
/// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. |
/// | `Errors::INVALID_ARGUMENT` | `AccountFreezing::ECANNOT_FREEZE_TC` | `to_freeze_account` was the Treasury Compliance account (`0xB1E55ED`). |
-/// | `Errors::INVALID_ARGUMENT` | `AccountFreezing::ECANNOT_FREEZE_LIBRA_ROOT` | `to_freeze_account` was the Libra Root account (`0xA550C18`). |
+/// | `Errors::INVALID_ARGUMENT` | `AccountFreezing::ECANNOT_FREEZE_DIEM_ROOT` | `to_freeze_account` was the Diem Root account (`0xA550C18`). |
///
/// # Related Scripts
/// * `Script::unfreeze_account`
@@ -2462,15 +2462,15 @@ pub fn encode_freeze_account_script(
/// `metadata` and an (optional) `metadata_signature` on the message
/// `metadata` | `Signer::address_of(payer)` | `amount` | `DualAttestation::DOMAIN_SEPARATOR`.
/// The `metadata` and `metadata_signature` parameters are only required if `amount` >=
-/// `DualAttestation::get_cur_microlibra_limit` LBR and `payer` and `payee` are distinct VASPs.
+/// `DualAttestation::get_cur_microdiem_limit` XDX and `payer` and `payee` are distinct VASPs.
/// However, a transaction sender can opt in to dual attestation even when it is not required
/// (e.g., a DesignatedDealer -> VASP payment) by providing a non-empty `metadata_signature`.
-/// Standardized `metadata` LCS format can be found in `libra_types::transaction::metadata::Metadata`.
+/// Standardized `metadata` LCS format can be found in `diem_types::transaction::metadata::Metadata`.
///
/// ## Events
/// Successful execution of this script emits two events:
-/// * A `LibraAccount::SentPaymentEvent` on `payer`'s `LibraAccount::LibraAccount` `sent_events` handle; and
-/// * A `LibraAccount::ReceivedPaymentEvent` on `payee`'s `LibraAccount::LibraAccount` `received_events` handle.
+/// * A `DiemAccount::SentPaymentEvent` on `payer`'s `DiemAccount::DiemAccount` `sent_events` handle; and
+/// * A `DiemAccount::ReceivedPaymentEvent` on `payee`'s `DiemAccount::DiemAccount` `received_events` handle.
///
/// # Parameters
/// | Name | Type | Description |
@@ -2484,16 +2484,16 @@ pub fn encode_freeze_account_script(
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
-/// | `Errors::NOT_PUBLISHED` | `LibraAccount::EPAYER_DOESNT_HOLD_CURRENCY` | `payer` doesn't hold a balance in `Currency`. |
-/// | `Errors::LIMIT_EXCEEDED` | `LibraAccount::EINSUFFICIENT_BALANCE` | `amount` is greater than `payer`'s balance in `Currency`. |
-/// | `Errors::INVALID_ARGUMENT` | `LibraAccount::ECOIN_DEPOSIT_IS_ZERO` | `amount` is zero. |
-/// | `Errors::NOT_PUBLISHED` | `LibraAccount::EPAYEE_DOES_NOT_EXIST` | No account exists at the `payee` address. |
-/// | `Errors::INVALID_ARGUMENT` | `LibraAccount::EPAYEE_CANT_ACCEPT_CURRENCY_TYPE` | An account exists at `payee`, but it does not accept payments in `Currency`. |
+/// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYER_DOESNT_HOLD_CURRENCY` | `payer` doesn't hold a balance in `Currency`. |
+/// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EINSUFFICIENT_BALANCE` | `amount` is greater than `payer`'s balance in `Currency`. |
+/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::ECOIN_DEPOSIT_IS_ZERO` | `amount` is zero. |
+/// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYEE_DOES_NOT_EXIST` | No account exists at the `payee` address. |
+/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EPAYEE_CANT_ACCEPT_CURRENCY_TYPE` | An account exists at `payee`, but it does not accept payments in `Currency`. |
/// | `Errors::INVALID_STATE` | `AccountFreezing::EACCOUNT_FROZEN` | The `payee` account is frozen. |
/// | `Errors::INVALID_ARGUMENT` | `DualAttestation::EMALFORMED_METADATA_SIGNATURE` | `metadata_signature` is not 64 bytes. |
/// | `Errors::INVALID_ARGUMENT` | `DualAttestation::EINVALID_METADATA_SIGNATURE` | `metadata_signature` does not verify on the against the `payee'`s `DualAttestation::Credential` `compliance_public_key` public key. |
-/// | `Errors::LIMIT_EXCEEDED` | `LibraAccount::EWITHDRAWAL_EXCEEDS_LIMITS` | `payer` has exceeded its daily withdrawal limits for the backing coins of LBR. |
-/// | `Errors::LIMIT_EXCEEDED` | `LibraAccount::EDEPOSIT_EXCEEDS_LIMITS` | `payee` has exceeded its daily deposit limits for LBR. |
+/// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EWITHDRAWAL_EXCEEDS_LIMITS` | `payer` has exceeded its daily withdrawal limits for the backing coins of XDX. |
+/// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EDEPOSIT_EXCEEDS_LIMITS` | `payee` has exceeded its daily deposit limits for XDX. |
///
/// # Related Scripts
/// * `Script::create_child_vasp_account`
@@ -2526,16 +2526,16 @@ pub fn encode_peer_to_peer_with_metadata_script(
///
/// # Technical Description
/// Moves the specified `amount` of coins in `Token` currency from the sending `account`'s
-/// `LibraAccount::Balance` to the `Libra::Preburn` published under the same
+/// `DiemAccount::Balance` to the `Diem::Preburn` published under the same
/// `account`. `account` must have both of these resources published under it at the start of this
/// transaction in order for it to execute successfully.
///
/// ## Events
/// Successful execution of this script emits two events:
-/// * `LibraAccount::SentPaymentEvent ` on `account`'s `LibraAccount::LibraAccount` `sent_events`
+/// * `DiemAccount::SentPaymentEvent ` on `account`'s `DiemAccount::DiemAccount` `sent_events`
/// handle with the `payee` and `payer` fields being `account`'s address; and
-/// * A `Libra::PreburnEvent` with `Token`'s currency code on the
-/// `Libra::CurrencyInfo` resource published under it. |
-/// | `Errors::INVALID_STATE` | `Libra::EPREBURN_OCCUPIED` | The `value` field in the `Libra::Preburn` resource under the sender is non-zero. |
+/// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `Token` is not a registered currency on-chain. |
+/// | `Errors::INVALID_STATE` | `DiemAccount::EWITHDRAWAL_CAPABILITY_ALREADY_EXTRACTED` | The withdrawal capability for `account` has already been extracted. |
+/// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EINSUFFICIENT_BALANCE` | `amount` is greater than `payer`'s balance in `Token`. |
+/// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYER_DOESNT_HOLD_CURRENCY` | `account` doesn't hold a balance in `Token`. |
+/// | `Errors::NOT_PUBLISHED` | `Diem::EPREBURN` | `account` doesn't have a `Diem::Preburn` resource published under it. |
+/// | `Errors::INVALID_STATE` | `Diem::EPREBURN_OCCUPIED` | The `value` field in the `Diem::Preburn` resource under the sender is non-zero. |
/// | `Errors::NOT_PUBLISHED` | `Roles::EROLE_ID` | The `account` did not have a role assigned to it. |
/// | `Errors::REQUIRES_ROLE` | `Roles::EDESIGNATED_DEALER` | The `account` did not have the role of DesignatedDealer. |
///
@@ -2577,7 +2577,7 @@ pub fn encode_preburn_script(token: TypeTag, amount: u64) -> Script {
/// # Technical Description
/// Rotates the authentication key of the sending account to `public_key`,
/// and publishes a `SharedEd25519PublicKey::SharedEd25519PublicKey` resource
-/// containing the 32-byte ed25519 `public_key` and the `LibraAccount::KeyRotationCapability` for
+/// containing the 32-byte ed25519 `public_key` and the `DiemAccount::KeyRotationCapability` for
/// `account` under `account`.
///
/// # Parameters
@@ -2589,7 +2589,7 @@ pub fn encode_preburn_script(token: TypeTag, amount: u64) -> Script {
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
-/// | `Errors::INVALID_STATE` | `LibraAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `LibraAccount::KeyRotationCapability` resource. |
+/// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability` resource. |
/// | `Errors::ALREADY_PUBLISHED` | `SharedEd25519PublicKey::ESHARED_KEY` | The `SharedEd25519PublicKey::SharedEd25519PublicKey` resource is already published under `account`. |
/// | `Errors::INVALID_ARGUMENT` | `SharedEd25519PublicKey::EMALFORMED_PUBLIC_KEY` | `public_key` is an invalid ed25519 public key. |
///
@@ -2611,7 +2611,7 @@ pub fn encode_publish_shared_ed25519_public_key_script(public_key: Vec) -> S
///
/// # Technical Description
/// This updates the fields with corresponding names held in the `ValidatorConfig::ValidatorConfig`
-/// config resource held under `validator_account`. It does not emit a `LibraConfig::NewEpochEvent`
+/// config resource held under `validator_account`. It does not emit a `DiemConfig::NewEpochEvent`
/// so the copy of this config held in the validator set will not be updated, and the changes are
/// only "locally" under the `validator_account` account address.
///
@@ -2660,11 +2660,11 @@ pub fn encode_register_validator_config_script(
/// # Summary
/// This script removes a validator account from the validator set, and triggers a reconfiguration
/// of the system to remove the validator from the system. This transaction can only be
-/// successfully called by the Libra Root account.
+/// successfully called by the Diem Root account.
///
/// # Technical Description
/// This script removes the account at `validator_address` from the validator set. This transaction
-/// emits a `LibraConfig::NewEpochEvent` event. Once the reconfiguration triggered by this event
+/// emits a `DiemConfig::NewEpochEvent` event. Once the reconfiguration triggered by this event
/// has been performed, the account at `validator_address` is no longer considered to be a
/// validator in the network. This transaction will fail if the validator at `validator_address`
/// is not in the validator set.
@@ -2672,7 +2672,7 @@ pub fn encode_register_validator_config_script(
/// # Parameters
/// | Name | Type | Description |
/// | ------ | ------ | ------------- |
-/// | `lr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Libra Root signer. |
+/// | `dr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Diem Root signer. |
/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. |
/// | `validator_name` | `vector` | ASCII-encoded human name for the validator. Must match the human name in the `ValidatorConfig::ValidatorConfig` for the validator. |
/// | `validator_address` | `address` | The validator account address to be removed from the validator set. |
@@ -2680,16 +2680,16 @@ pub fn encode_register_validator_config_script(
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
-/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `lr_account`. |
+/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. |
-/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | The sending account is not the Libra Root account or Treasury Compliance account |
+/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | The sending account is not the Diem Root account or Treasury Compliance account |
/// | 0 | 0 | The provided `validator_name` does not match the already-recorded human name for the validator. |
-/// | `Errors::INVALID_ARGUMENT` | `LibraSystem::ENOT_AN_ACTIVE_VALIDATOR` | The validator to be removed is not in the validator set. |
-/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ELIBRA_ROOT` | The sending account is not the Libra Root account. |
-/// | `Errors::REQUIRES_ROLE` | `Roles::ELIBRA_ROOT` | The sending account is not the Libra Root account. |
-/// | `Errors::INVALID_STATE` | `LibraConfig::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. |
+/// | `Errors::INVALID_ARGUMENT` | `DiemSystem::ENOT_AN_ACTIVE_VALIDATOR` | The validator to be removed is not in the validator set. |
+/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. |
+/// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. |
+/// | `Errors::INVALID_STATE` | `DiemConfig::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. |
///
/// # Related Scripts
/// * `Script::create_validator_account`
@@ -2720,9 +2720,9 @@ pub fn encode_remove_validator_and_reconfigure_script(
/// be sent by any account.
///
/// # Technical Description
-/// Rotate the `account`'s `LibraAccount::LibraAccount` `authentication_key` field to `new_key`.
+/// Rotate the `account`'s `DiemAccount::DiemAccount` `authentication_key` field to `new_key`.
/// `new_key` must be a valid ed25519 public key, and `account` must not have previously delegated
-/// its `LibraAccount::KeyRotationCapability`.
+/// its `DiemAccount::KeyRotationCapability`.
///
/// # Parameters
/// | Name | Type | Description |
@@ -2733,8 +2733,8 @@ pub fn encode_remove_validator_and_reconfigure_script(
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
-/// | `Errors::INVALID_STATE` | `LibraAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `LibraAccount::KeyRotationCapability`. |
-/// | `Errors::INVALID_ARGUMENT` | `LibraAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. |
+/// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. |
+/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. |
///
/// # Related Scripts
/// * `Script::rotate_authentication_key_with_nonce`
@@ -2751,12 +2751,12 @@ pub fn encode_rotate_authentication_key_script(new_key: Vec) -> Script {
/// # Summary
/// Rotates the sender's authentication key to the supplied new authentication key. May be sent by
/// any account that has a sliding nonce resource published under it (usually this is Treasury
-/// Compliance or Libra Root accounts).
+/// Compliance or Diem Root accounts).
///
/// # Technical Description
-/// Rotates the `account`'s `LibraAccount::LibraAccount` `authentication_key` field to `new_key`.
+/// Rotates the `account`'s `DiemAccount::DiemAccount` `authentication_key` field to `new_key`.
/// `new_key` must be a valid ed25519 public key, and `account` must not have previously delegated
-/// its `LibraAccount::KeyRotationCapability`.
+/// its `DiemAccount::KeyRotationCapability`.
///
/// # Parameters
/// | Name | Type | Description |
@@ -2772,8 +2772,8 @@ pub fn encode_rotate_authentication_key_script(new_key: Vec) -> Script {
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. |
/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. |
-/// | `Errors::INVALID_STATE` | `LibraAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `LibraAccount::KeyRotationCapability`. |
-/// | `Errors::INVALID_ARGUMENT` | `LibraAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. |
+/// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. |
+/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. |
///
/// # Related Scripts
/// * `Script::rotate_authentication_key`
@@ -2795,30 +2795,30 @@ pub fn encode_rotate_authentication_key_with_nonce_script(
/// # Summary
/// Rotates the specified account's authentication key to the supplied new authentication key. May
-/// only be sent by the Libra Root account as a write set transaction.
+/// only be sent by the Diem Root account as a write set transaction.
///
/// # Technical Description
-/// Rotate the `account`'s `LibraAccount::LibraAccount` `authentication_key` field to `new_key`.
+/// Rotate the `account`'s `DiemAccount::DiemAccount` `authentication_key` field to `new_key`.
/// `new_key` must be a valid ed25519 public key, and `account` must not have previously delegated
-/// its `LibraAccount::KeyRotationCapability`.
+/// its `DiemAccount::KeyRotationCapability`.
///
/// # Parameters
/// | Name | Type | Description |
/// | ------ | ------ | ------------- |
-/// | `lr_account` | `&signer` | The signer reference of the sending account of the write set transaction. May only be the Libra Root signer. |
+/// | `dr_account` | `&signer` | The signer reference of the sending account of the write set transaction. May only be the Diem Root signer. |
/// | `account` | `&signer` | Signer reference of account specified in the `execute_as` field of the write set transaction. |
-/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction for Libra Root. |
+/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction for Diem Root. |
/// | `new_key` | `vector` | New ed25519 public key to be used for `account`. |
///
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
-/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `lr_account`. |
-/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` in `lr_account` is too old and it's impossible to determine if it's duplicated or not. |
-/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` in `lr_account` is too far in the future. |
-/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` in` lr_account` has been previously recorded. |
-/// | `Errors::INVALID_STATE` | `LibraAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `LibraAccount::KeyRotationCapability`. |
-/// | `Errors::INVALID_ARGUMENT` | `LibraAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. |
+/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. |
+/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` in `dr_account` is too old and it's impossible to determine if it's duplicated or not. |
+/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` in `dr_account` is too far in the future. |
+/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` in` dr_account` has been previously recorded. |
+/// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. |
+/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. |
///
/// # Related Scripts
/// * `Script::rotate_authentication_key`
@@ -2845,16 +2845,16 @@ pub fn encode_rotate_authentication_key_with_nonce_admin_script(
///
/// # Technical Description
/// Rotates the authentication key of the `to_recover` account to `new_key` using the
-/// `LibraAccount::KeyRotationCapability` stored in the `RecoveryAddress::RecoveryAddress` resource
+/// `DiemAccount::KeyRotationCapability` stored in the `RecoveryAddress::RecoveryAddress` resource
/// published under `recovery_address`. This transaction can be sent either by the `to_recover`
/// account, or by the account where the `RecoveryAddress::RecoveryAddress` resource is published
-/// that contains `to_recover`'s `LibraAccount::KeyRotationCapability`.
+/// that contains `to_recover`'s `DiemAccount::KeyRotationCapability`.
///
/// # Parameters
/// | Name | Type | Description |
/// | ------ | ------ | ------------- |
/// | `account` | `&signer` | Signer reference of the sending account of the transaction. |
-/// | `recovery_address` | `address` | Address where `RecoveryAddress::RecoveryAddress` that holds `to_recover`'s `LibraAccount::KeyRotationCapability` is published. |
+/// | `recovery_address` | `address` | Address where `RecoveryAddress::RecoveryAddress` that holds `to_recover`'s `DiemAccount::KeyRotationCapability` is published. |
/// | `to_recover` | `address` | The address of the account whose authentication key will be updated. |
/// | `new_key` | `vector` | New ed25519 public key to be used for the account at the `to_recover` address. |
///
@@ -2863,8 +2863,8 @@ pub fn encode_rotate_authentication_key_with_nonce_admin_script(
/// | ---------------- | -------------- | ------------- |
/// | `Errors::NOT_PUBLISHED` | `RecoveryAddress::ERECOVERY_ADDRESS` | `recovery_address` does not have a `RecoveryAddress::RecoveryAddress` resource published under it. |
/// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::ECANNOT_ROTATE_KEY` | The address of `account` is not `recovery_address` or `to_recover`. |
-/// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::EACCOUNT_NOT_RECOVERABLE` | `to_recover`'s `LibraAccount::KeyRotationCapability` is not in the `RecoveryAddress::RecoveryAddress` resource published under `recovery_address`. |
-/// | `Errors::INVALID_ARGUMENT` | `LibraAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. |
+/// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::EACCOUNT_NOT_RECOVERABLE` | `to_recover`'s `DiemAccount::KeyRotationCapability` is not in the `RecoveryAddress::RecoveryAddress` resource published under `recovery_address`. |
+/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. |
///
/// # Related Scripts
/// * `Script::rotate_authentication_key`
@@ -2973,7 +2973,7 @@ pub fn encode_rotate_shared_ed25519_public_key_script(public_key: Vec) -> Sc
///
/// # Technical Description
/// This updates the fields with corresponding names held in the `ValidatorConfig::ValidatorConfig`
-/// config resource held under `validator_account`. It then emits a `LibraConfig::NewEpochEvent` to
+/// config resource held under `validator_account`. It then emits a `DiemConfig::NewEpochEvent` to
/// trigger a reconfiguration of the system. This reconfiguration will update the validator set
/// on-chain with the updated `ValidatorConfig::ValidatorConfig`.
///
@@ -2993,7 +2993,7 @@ pub fn encode_rotate_shared_ed25519_public_key_script(public_key: Vec) -> Sc
/// | `Errors::REQUIRES_ROLE` | `Roles::EVALIDATOR_OPERATOR` | `validator_operator_account` does not have a Validator Operator role. |
/// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::EINVALID_TRANSACTION_SENDER` | `validator_operator_account` is not the registered operator for the validator at `validator_address`. |
/// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::EINVALID_CONSENSUS_KEY` | `consensus_pubkey` is not a valid ed25519 public key. |
-/// | `Errors::INVALID_STATE` | `LibraConfig::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. |
+/// | `Errors::INVALID_STATE` | `DiemConfig::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. |
///
/// # Related Scripts
/// * `Script::create_validator_account`
@@ -3033,7 +3033,7 @@ pub fn encode_set_validator_config_and_reconfigure_script(
/// a Validator Operator role and have a `ValidatorOperatorConfig::ValidatorOperatorConfig`
/// resource published under it. The sending `account` must be a Validator and have a
/// `ValidatorConfig::ValidatorConfig` resource published under it. This script does not emit a
-/// `LibraConfig::NewEpochEvent` and no reconfiguration of the system is initiated by this script.
+/// `DiemConfig::NewEpochEvent` and no reconfiguration of the system is initiated by this script.
///
/// # Parameters
/// | Name | Type | Description |
@@ -3076,7 +3076,7 @@ pub fn encode_set_validator_operator_script(
/// # Summary
/// Sets the validator operator for a validator in the validator's configuration resource "locally"
/// and does not reconfigure the system. Changes from this transaction will not picked up by the
-/// system until a reconfiguration of the system is triggered. May only be sent by the Libra Root
+/// system until a reconfiguration of the system is triggered. May only be sent by the Diem Root
/// account as a write set transaction.
///
/// # Technical Description
@@ -3090,20 +3090,20 @@ pub fn encode_set_validator_operator_script(
/// # Parameters
/// | Name | Type | Description |
/// | ------ | ------ | ------------- |
-/// | `lr_account` | `&signer` | The signer reference of the sending account of the write set transaction. May only be the Libra Root signer. |
+/// | `dr_account` | `&signer` | The signer reference of the sending account of the write set transaction. May only be the Diem Root signer. |
/// | `account` | `&signer` | Signer reference of account specified in the `execute_as` field of the write set transaction. |
-/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction for Libra Root. |
+/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction for Diem Root. |
/// | `operator_name` | `vector` | Validator operator's human name. |
/// | `operator_account` | `address` | Address of the validator operator account to be added as the `account` validator's operator. |
///
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
-/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `lr_account`. |
-/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` in `lr_account` is too old and it's impossible to determine if it's duplicated or not. |
-/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` in `lr_account` is too far in the future. |
-/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` in` lr_account` has been previously recorded. |
-/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | The sending account is not the Libra Root account or Treasury Compliance account |
+/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. |
+/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` in `dr_account` is too old and it's impossible to determine if it's duplicated or not. |
+/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` in `dr_account` is too far in the future. |
+/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` in` dr_account` has been previously recorded. |
+/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | The sending account is not the Diem Root account or Treasury Compliance account |
/// | `Errors::NOT_PUBLISHED` | `ValidatorOperatorConfig::EVALIDATOR_OPERATOR_CONFIG` | The `ValidatorOperatorConfig::ValidatorOperatorConfig` resource is not published under `operator_account`. |
/// | 0 | 0 | The `human_name` field of the `ValidatorOperatorConfig::ValidatorOperatorConfig` resource under `operator_account` does not match the provided `human_name`. |
/// | `Errors::REQUIRES_ROLE` | `Roles::EVALIDATOR` | `account` does not have a Validator account role. |
@@ -3150,8 +3150,8 @@ pub fn encode_set_validator_operator_with_nonce_admin_script(
///
/// ## Events
/// Successful execution of the transaction will emit two events:
-/// * A `Libra::MintEvent` with the amount and currency code minted is emitted on the
-/// `mint_event_handle` in the stored `Libra::CurrencyInfo` resource stored under
+/// * A `Diem::MintEvent` with the amount and currency code minted is emitted on the
+/// `mint_event_handle` in the stored `Diem::CurrencyInfo` resource stored under
/// `0xA550C18`; and
/// * A `DesignatedDealer::ReceivedMintEvent` with the amount, currency code, and Designated
/// Dealer's address is emitted on the `mint_event_handle` in the stored `DesignatedDealer::Dealer`
@@ -3180,9 +3180,9 @@ pub fn encode_set_validator_operator_with_nonce_admin_script(
/// | `Errors::NOT_PUBLISHED` | `DesignatedDealer::EDEALER` | `DesignatedDealer::Dealer` or `DesignatedDealer::TierInfo` resource does not exist at `designated_dealer_address`. |
/// | `Errors::INVALID_ARGUMENT` | `DesignatedDealer::EINVALID_TIER_INDEX` | The `tier_index` is out of bounds. |
/// | `Errors::INVALID_ARGUMENT` | `DesignatedDealer::EINVALID_AMOUNT_FOR_TIER` | `mint_amount` exceeds the maximum allowed amount for `tier_index`. |
-/// | `Errors::REQUIRES_CAPABILITY` | `Libra::EMINT_CAPABILITY` | `tc_account` does not have a `Libra::MintCapability` resource published under it. |
-/// | `Errors::INVALID_STATE` | `Libra::EMINTING_NOT_ALLOWED` | Minting is not currently allowed for `CoinType` coins. |
-/// | `Errors::LIMIT_EXCEEDED` | `LibraAccount::EDEPOSIT_EXCEEDS_LIMITS` | The depositing of the funds would exceed the `account`'s account limits. |
+/// | `Errors::REQUIRES_CAPABILITY` | `Diem::EMINT_CAPABILITY` | `tc_account` does not have a `Diem::MintCapability` resource published under it. |
+/// | `Errors::INVALID_STATE` | `Diem::EMINTING_NOT_ALLOWED` | Minting is not currently allowed for `CoinType` coins. |
+/// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EDEPOSIT_EXCEEDS_LIMITS` | The depositing of the funds would exceed the `account`'s account limits. |
///
/// # Related Scripts
/// * `Script::create_designated_dealer`
@@ -3255,20 +3255,57 @@ pub fn encode_unfreeze_account_script(
}
/// # Summary
-/// Update the dual attestation limit on-chain. Defined in terms of micro-LBR. The transaction can
+/// Updates the Diem major version that is stored on-chain and is used by the VM. This
+/// transaction can only be sent from the Diem Root account.
+///
+/// # Technical Description
+/// Updates the `DiemVersion` on-chain config and emits a `DiemConfig::NewEpochEvent` to trigger
+/// a reconfiguration of the system. The `major` version that is passed in must be strictly greater
+/// than the current major version held on-chain. The VM reads this information and can use it to
+/// preserve backwards compatibility with previous major versions of the VM.
+///
+/// # Parameters
+/// | Name | Type | Description |
+/// | ------ | ------ | ------------- |
+/// | `account` | `&signer` | Signer reference of the sending account. Must be the Diem Root account. |
+/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. |
+/// | `major` | `u64` | The `major` version of the VM to be used from this transaction on. |
+///
+/// # Common Abort Conditions
+/// | Error Category | Error Reason | Description |
+/// | ---------------- | -------------- | ------------- |
+/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. |
+/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. |
+/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. |
+/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. |
+/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | `account` is not the Diem Root account. |
+/// | `Errors::INVALID_ARGUMENT` | `DiemVersion::EINVALID_MAJOR_VERSION_NUMBER` | `major` is less-than or equal to the current major version stored on-chain. |
+pub fn encode_update_diem_version_script(sliding_nonce: u64, major: u64) -> Script {
+ Script::new(
+ UPDATE_DIEM_VERSION_CODE.to_vec(),
+ vec![],
+ vec![
+ TransactionArgument::U64(sliding_nonce),
+ TransactionArgument::U64(major),
+ ],
+ )
+}
+
+/// # Summary
+/// Update the dual attestation limit on-chain. Defined in terms of micro-XDX. The transaction can
/// only be sent by the Treasury Compliance account. After this transaction all inter-VASP
/// payments over this limit must be checked for dual attestation.
///
/// # Technical Description
-/// Updates the `micro_lbr_limit` field of the `DualAttestation::Limit` resource published under
-/// `0xA550C18`. The amount is set in micro-LBR.
+/// Updates the `micro_xdx_limit` field of the `DualAttestation::Limit` resource published under
+/// `0xA550C18`. The amount is set in micro-XDX.
///
/// # Parameters
/// | Name | Type | Description |
/// | ------ | ------ | ------------- |
/// | `tc_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Treasury Compliance account. |
/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. |
-/// | `new_micro_lbr_limit` | `u64` | The new dual attestation limit to be used on-chain. |
+/// | `new_micro_xdx_limit` | `u64` | The new dual attestation limit to be used on-chain. |
///
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
@@ -3284,26 +3321,26 @@ pub fn encode_unfreeze_account_script(
/// * `Script::update_minting_ability`
pub fn encode_update_dual_attestation_limit_script(
sliding_nonce: u64,
- new_micro_lbr_limit: u64,
+ new_micro_xdx_limit: u64,
) -> Script {
Script::new(
UPDATE_DUAL_ATTESTATION_LIMIT_CODE.to_vec(),
vec![],
vec![
TransactionArgument::U64(sliding_nonce),
- TransactionArgument::U64(new_micro_lbr_limit),
+ TransactionArgument::U64(new_micro_xdx_limit),
],
)
}
/// # Summary
-/// Update the rough on-chain exchange rate between a specified currency and LBR (as a conversion
-/// to micro-LBR). The transaction can only be sent by the Treasury Compliance account. After this
+/// Update the rough on-chain exchange rate between a specified currency and XDX (as a conversion
+/// to micro-XDX). The transaction can only be sent by the Treasury Compliance account. After this
/// transaction the updated exchange rate will be used for normalization of gas prices, and for
/// dual attestation checking.
///
/// # Technical Description
-/// Updates the on-chain exchange rate from the given `Currency` to micro-LBR. The exchange rate
+/// Updates the on-chain exchange rate from the given `Currency` to micro-XDX. The exchange rate
/// is given by `new_exchange_rate_numerator/new_exchange_rate_denominator`.
///
/// # Parameters
@@ -3312,8 +3349,8 @@ pub fn encode_update_dual_attestation_limit_script(
/// | `Currency` | Type | The Move type for the `Currency` whose exchange rate is being updated. `Currency` must be an already-registered currency on-chain. |
/// | `tc_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Treasury Compliance account. |
/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for the transaction. |
-/// | `new_exchange_rate_numerator` | `u64` | The numerator for the new to micro-LBR exchange rate for `Currency`. |
-/// | `new_exchange_rate_denominator` | `u64` | The denominator for the new to micro-LBR exchange rate for `Currency`. |
+/// | `new_exchange_rate_numerator` | `u64` | The numerator for the new to micro-XDX exchange rate for `Currency`. |
+/// | `new_exchange_rate_denominator` | `u64` | The denominator for the new to micro-XDX exchange rate for `Currency`. |
///
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
@@ -3348,50 +3385,13 @@ pub fn encode_update_exchange_rate_script(
)
}
-/// # Summary
-/// Updates the Libra major version that is stored on-chain and is used by the VM. This
-/// transaction can only be sent from the Libra Root account.
-///
-/// # Technical Description
-/// Updates the `LibraVersion` on-chain config and emits a `LibraConfig::NewEpochEvent` to trigger
-/// a reconfiguration of the system. The `major` version that is passed in must be strictly greater
-/// than the current major version held on-chain. The VM reads this information and can use it to
-/// preserve backwards compatibility with previous major versions of the VM.
-///
-/// # Parameters
-/// | Name | Type | Description |
-/// | ------ | ------ | ------------- |
-/// | `account` | `&signer` | Signer reference of the sending account. Must be the Libra Root account. |
-/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. |
-/// | `major` | `u64` | The `major` version of the VM to be used from this transaction on. |
-///
-/// # Common Abort Conditions
-/// | Error Category | Error Reason | Description |
-/// | ---------------- | -------------- | ------------- |
-/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. |
-/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. |
-/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. |
-/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. |
-/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ELIBRA_ROOT` | `account` is not the Libra Root account. |
-/// | `Errors::INVALID_ARGUMENT` | `LibraVersion::EINVALID_MAJOR_VERSION_NUMBER` | `major` is less-than or equal to the current major version stored on-chain. |
-pub fn encode_update_libra_version_script(sliding_nonce: u64, major: u64) -> Script {
- Script::new(
- UPDATE_LIBRA_VERSION_CODE.to_vec(),
- vec![],
- vec![
- TransactionArgument::U64(sliding_nonce),
- TransactionArgument::U64(major),
- ],
- )
-}
-
/// # Summary
/// Script to allow or disallow minting of new coins in a specified currency. This transaction can
/// only be sent by the Treasury Compliance account. Turning minting off for a currency will have
/// no effect on coins already in circulation, and coins may still be removed from the system.
///
/// # Technical Description
-/// This transaction sets the `can_mint` field of the `Libra::CurrencyInfo` resource
+/// This transaction sets the `can_mint` field of the `Diem::CurrencyInfo` resource
/// published under `0xA550C18` to the value of `allow_minting`. Minting of coins if allowed if
/// this field is set to `true` and minting of new coins in `Currency` is disallowed otherwise.
/// This transaction needs to be sent by the Treasury Compliance account.
@@ -3400,14 +3400,14 @@ pub fn encode_update_libra_version_script(sliding_nonce: u64, major: u64) -> Scr
/// | Name | Type | Description |
/// | ------ | ------ | ------------- |
/// | `Currency` | Type | The Move type for the `Currency` whose minting ability is being updated. `Currency` must be an already-registered currency on-chain. |
-/// | `account` | `&signer` | Signer reference of the sending account. Must be the Libra Root account. |
+/// | `account` | `&signer` | Signer reference of the sending account. Must be the Diem Root account. |
/// | `allow_minting` | `bool` | Whether to allow minting of new coins in `Currency`. |
///
/// # Common Abort Conditions
/// | Error Category | Error Reason | Description |
/// | ---------------- | -------------- | ------------- |
/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. |
-/// | `Errors::NOT_PUBLISHED` | `Libra::ECURRENCY_INFO` | `Currency` is not a registered currency on-chain. |
+/// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | `Currency` is not a registered currency on-chain. |
///
/// # Related Scripts
/// * `Script::update_dual_attestation_limit`
@@ -3653,10 +3653,17 @@ fn decode_unfreeze_account_script(script: &Script) -> Option {
})
}
+fn decode_update_diem_version_script(script: &Script) -> Option {
+ Some(ScriptCall::UpdateDiemVersion {
+ sliding_nonce: decode_u64_argument(script.args().get(0)?.clone())?,
+ major: decode_u64_argument(script.args().get(1)?.clone())?,
+ })
+}
+
fn decode_update_dual_attestation_limit_script(script: &Script) -> Option {
Some(ScriptCall::UpdateDualAttestationLimit {
sliding_nonce: decode_u64_argument(script.args().get(0)?.clone())?,
- new_micro_lbr_limit: decode_u64_argument(script.args().get(1)?.clone())?,
+ new_micro_xdx_limit: decode_u64_argument(script.args().get(1)?.clone())?,
})
}
@@ -3669,13 +3676,6 @@ fn decode_update_exchange_rate_script(script: &Script) -> Option {
})
}
-fn decode_update_libra_version_script(script: &Script) -> Option {
- Some(ScriptCall::UpdateLibraVersion {
- sliding_nonce: decode_u64_argument(script.args().get(0)?.clone())?,
- major: decode_u64_argument(script.args().get(1)?.clone())?,
- })
-}
-
fn decode_update_minting_ability_script(script: &Script) -> Option {
Some(ScriptCall::UpdateMintingAbility {
currency: script.ty_args().get(0)?.clone(),
@@ -3804,6 +3804,10 @@ static SCRIPT_DECODER_MAP: once_cell::sync::Lazy = once_cell::sync::
UNFREEZE_ACCOUNT_CODE.to_vec(),
Box::new(decode_unfreeze_account_script),
);
+ map.insert(
+ UPDATE_DIEM_VERSION_CODE.to_vec(),
+ Box::new(decode_update_diem_version_script),
+ );
map.insert(
UPDATE_DUAL_ATTESTATION_LIMIT_CODE.to_vec(),
Box::new(decode_update_dual_attestation_limit_script),
@@ -3812,10 +3816,6 @@ static SCRIPT_DECODER_MAP: once_cell::sync::Lazy = once_cell::sync::
UPDATE_EXCHANGE_RATE_CODE.to_vec(),
Box::new(decode_update_exchange_rate_script),
);
- map.insert(
- UPDATE_LIBRA_VERSION_CODE.to_vec(),
- Box::new(decode_update_libra_version_script),
- );
map.insert(
UPDATE_MINTING_ABILITY_CODE.to_vec(),
Box::new(decode_update_minting_ability_script),
@@ -3852,16 +3852,16 @@ fn decode_u8vector_argument(arg: TransactionArgument) -> Option> {
}
const ADD_CURRENCY_TO_ACCOUNT_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 2, 3, 2, 6, 4, 8, 2, 5, 10, 7, 7, 17, 26, 8, 43, 16, 0,
- 0, 0, 1, 0, 1, 1, 1, 0, 2, 1, 6, 12, 0, 1, 9, 0, 12, 76, 105, 98, 114, 97, 65, 99, 99, 111,
- 117, 110, 116, 12, 97, 100, 100, 95, 99, 117, 114, 114, 101, 110, 99, 121, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 3, 11, 0, 56, 0, 2,
+ 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 2, 3, 2, 6, 4, 8, 2, 5, 10, 7, 7, 17, 25, 8, 42, 16, 0,
+ 0, 0, 1, 0, 1, 1, 1, 0, 2, 1, 6, 12, 0, 1, 9, 0, 11, 68, 105, 101, 109, 65, 99, 99, 111, 117,
+ 110, 116, 12, 97, 100, 100, 95, 99, 117, 114, 114, 101, 110, 99, 121, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 3, 11, 0, 56, 0, 2,
];
const ADD_RECOVERY_ROTATION_CAPABILITY_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 2, 4, 4, 3, 8, 10, 5, 18, 15, 7, 33, 107, 8, 140, 1,
+ 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 2, 4, 4, 3, 8, 10, 5, 18, 15, 7, 33, 106, 8, 139, 1,
16, 0, 0, 0, 1, 0, 2, 1, 0, 0, 3, 0, 1, 0, 1, 4, 2, 3, 0, 1, 6, 12, 1, 8, 0, 2, 8, 0, 5, 0, 2,
- 6, 12, 5, 12, 76, 105, 98, 114, 97, 65, 99, 99, 111, 117, 110, 116, 15, 82, 101, 99, 111, 118,
+ 6, 12, 5, 11, 68, 105, 101, 109, 65, 99, 99, 111, 117, 110, 116, 15, 82, 101, 99, 111, 118,
101, 114, 121, 65, 100, 100, 114, 101, 115, 115, 21, 75, 101, 121, 82, 111, 116, 97, 116, 105,
111, 110, 67, 97, 112, 97, 98, 105, 108, 105, 116, 121, 31, 101, 120, 116, 114, 97, 99, 116,
95, 107, 101, 121, 95, 114, 111, 116, 97, 116, 105, 111, 110, 95, 99, 97, 112, 97, 98, 105,
@@ -3871,36 +3871,35 @@ const ADD_RECOVERY_ROTATION_CAPABILITY_CODE: &[u8] = &[
];
const ADD_TO_SCRIPT_ALLOW_LIST_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 4, 3, 4, 10, 5, 14, 16, 7, 30, 93, 8, 123, 16, 0, 0, 0,
- 1, 0, 2, 0, 1, 0, 1, 3, 2, 1, 0, 2, 6, 12, 10, 2, 0, 2, 6, 12, 3, 3, 6, 12, 10, 2, 3, 32, 76,
- 105, 98, 114, 97, 84, 114, 97, 110, 115, 97, 99, 116, 105, 111, 110, 80, 117, 98, 108, 105,
- 115, 104, 105, 110, 103, 79, 112, 116, 105, 111, 110, 12, 83, 108, 105, 100, 105, 110, 103, 78,
- 111, 110, 99, 101, 24, 97, 100, 100, 95, 116, 111, 95, 115, 99, 114, 105, 112, 116, 95, 97,
- 108, 108, 111, 119, 95, 108, 105, 115, 116, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110,
- 99, 101, 95, 111, 114, 95, 97, 98, 111, 114, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 3, 1, 7, 10, 0, 10, 2, 17, 1, 11, 0, 11, 1, 17, 0, 2,
+ 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 4, 3, 4, 10, 5, 14, 16, 7, 30, 92, 8, 122, 16, 0, 0, 0,
+ 1, 0, 2, 0, 1, 0, 1, 3, 2, 1, 0, 2, 6, 12, 10, 2, 0, 2, 6, 12, 3, 3, 6, 12, 10, 2, 3, 31, 68,
+ 105, 101, 109, 84, 114, 97, 110, 115, 97, 99, 116, 105, 111, 110, 80, 117, 98, 108, 105, 115,
+ 104, 105, 110, 103, 79, 112, 116, 105, 111, 110, 12, 83, 108, 105, 100, 105, 110, 103, 78, 111,
+ 110, 99, 101, 24, 97, 100, 100, 95, 116, 111, 95, 115, 99, 114, 105, 112, 116, 95, 97, 108,
+ 108, 111, 119, 95, 108, 105, 115, 116, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99,
+ 101, 95, 111, 114, 95, 97, 98, 111, 114, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
+ 0, 3, 1, 7, 10, 0, 10, 2, 17, 1, 11, 0, 11, 1, 17, 0, 2,
];
const ADD_VALIDATOR_AND_RECONFIGURE_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 6, 3, 6, 15, 5, 21, 24, 7, 45, 92, 8, 137, 1, 16, 0, 0,
+ 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 6, 3, 6, 15, 5, 21, 24, 7, 45, 91, 8, 136, 1, 16, 0, 0,
0, 1, 0, 2, 1, 3, 0, 1, 0, 2, 4, 2, 3, 0, 0, 5, 4, 1, 0, 2, 6, 12, 3, 0, 1, 5, 1, 10, 2, 2, 6,
- 12, 5, 4, 6, 12, 3, 10, 2, 5, 2, 1, 3, 11, 76, 105, 98, 114, 97, 83, 121, 115, 116, 101, 109,
- 12, 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, 99, 101, 15, 86, 97, 108, 105, 100, 97,
- 116, 111, 114, 67, 111, 110, 102, 105, 103, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110,
- 99, 101, 95, 111, 114, 95, 97, 98, 111, 114, 116, 14, 103, 101, 116, 95, 104, 117, 109, 97,
- 110, 95, 110, 97, 109, 101, 13, 97, 100, 100, 95, 118, 97, 108, 105, 100, 97, 116, 111, 114, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 5, 6, 18, 10, 0, 10, 1, 17, 0, 10, 3, 17, 1,
- 11, 2, 33, 12, 4, 11, 4, 3, 14, 11, 0, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 39, 11, 0, 10, 3, 17, 2,
- 2,
+ 12, 5, 4, 6, 12, 3, 10, 2, 5, 2, 1, 3, 10, 68, 105, 101, 109, 83, 121, 115, 116, 101, 109, 12,
+ 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, 99, 101, 15, 86, 97, 108, 105, 100, 97, 116,
+ 111, 114, 67, 111, 110, 102, 105, 103, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99,
+ 101, 95, 111, 114, 95, 97, 98, 111, 114, 116, 14, 103, 101, 116, 95, 104, 117, 109, 97, 110,
+ 95, 110, 97, 109, 101, 13, 97, 100, 100, 95, 118, 97, 108, 105, 100, 97, 116, 111, 114, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 5, 6, 18, 10, 0, 10, 1, 17, 0, 10, 3, 17, 1, 11,
+ 2, 33, 12, 4, 11, 4, 3, 14, 11, 0, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 39, 11, 0, 10, 3, 17, 2, 2,
];
const BURN_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 3, 4, 11, 4, 15, 2, 5, 17, 17, 7, 34, 46, 8, 80, 16,
+ 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 3, 4, 11, 4, 15, 2, 5, 17, 17, 7, 34, 45, 8, 79, 16,
0, 0, 0, 1, 1, 2, 0, 1, 0, 0, 3, 2, 1, 1, 1, 1, 4, 2, 6, 12, 3, 0, 2, 6, 12, 5, 3, 6, 12, 3, 5,
- 1, 9, 0, 5, 76, 105, 98, 114, 97, 12, 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, 99, 101,
- 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95, 97, 98, 111,
- 114, 116, 4, 98, 117, 114, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 1, 7,
- 10, 0, 10, 1, 17, 0, 11, 0, 10, 2, 56, 0, 2,
+ 1, 9, 0, 4, 68, 105, 101, 109, 12, 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, 99, 101, 21,
+ 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95, 97, 98, 111, 114,
+ 116, 4, 98, 117, 114, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 1, 7, 10,
+ 0, 10, 1, 17, 0, 11, 0, 10, 2, 56, 0, 2,
];
const BURN_TXN_FEES_CODE: &[u8] = &[
@@ -3911,54 +3910,54 @@ const BURN_TXN_FEES_CODE: &[u8] = &[
];
const CANCEL_BURN_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 2, 3, 2, 6, 4, 8, 2, 5, 10, 8, 7, 18, 25, 8, 43, 16, 0,
- 0, 0, 1, 0, 1, 1, 1, 0, 2, 2, 6, 12, 5, 0, 1, 9, 0, 12, 76, 105, 98, 114, 97, 65, 99, 99, 111,
+ 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 2, 3, 2, 6, 4, 8, 2, 5, 10, 8, 7, 18, 24, 8, 42, 16, 0,
+ 0, 0, 1, 0, 1, 1, 1, 0, 2, 2, 6, 12, 5, 0, 1, 9, 0, 11, 68, 105, 101, 109, 65, 99, 99, 111,
117, 110, 116, 11, 99, 97, 110, 99, 101, 108, 95, 98, 117, 114, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 4, 11, 0, 10, 1, 56, 0, 2,
];
const CREATE_CHILD_VASP_ACCOUNT_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 8, 1, 0, 2, 2, 2, 4, 3, 6, 22, 4, 28, 4, 5, 32, 35, 7, 67, 123,
- 8, 190, 1, 16, 6, 206, 1, 4, 0, 0, 0, 1, 1, 0, 0, 2, 0, 1, 1, 1, 0, 3, 2, 3, 0, 0, 4, 4, 1, 1,
+ 161, 28, 235, 11, 1, 0, 0, 0, 8, 1, 0, 2, 2, 2, 4, 3, 6, 22, 4, 28, 4, 5, 32, 35, 7, 67, 122,
+ 8, 189, 1, 16, 6, 205, 1, 4, 0, 0, 0, 1, 1, 0, 0, 2, 0, 1, 1, 1, 0, 3, 2, 3, 0, 0, 4, 4, 1, 1,
1, 0, 5, 3, 1, 0, 0, 6, 2, 6, 4, 6, 12, 5, 10, 2, 1, 0, 1, 6, 12, 1, 8, 0, 5, 6, 8, 0, 5, 3,
- 10, 2, 10, 2, 5, 6, 12, 5, 10, 2, 1, 3, 1, 9, 0, 12, 76, 105, 98, 114, 97, 65, 99, 99, 111,
- 117, 110, 116, 18, 87, 105, 116, 104, 100, 114, 97, 119, 67, 97, 112, 97, 98, 105, 108, 105,
- 116, 121, 25, 99, 114, 101, 97, 116, 101, 95, 99, 104, 105, 108, 100, 95, 118, 97, 115, 112,
- 95, 97, 99, 99, 111, 117, 110, 116, 27, 101, 120, 116, 114, 97, 99, 116, 95, 119, 105, 116,
- 104, 100, 114, 97, 119, 95, 99, 97, 112, 97, 98, 105, 108, 105, 116, 121, 8, 112, 97, 121, 95,
- 102, 114, 111, 109, 27, 114, 101, 115, 116, 111, 114, 101, 95, 119, 105, 116, 104, 100, 114,
- 97, 119, 95, 99, 97, 112, 97, 98, 105, 108, 105, 116, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 10, 2, 1, 0, 1, 1, 5, 3, 25, 10, 0, 10, 1, 11, 2, 10, 3, 56, 0, 10, 4, 6, 0, 0, 0,
- 0, 0, 0, 0, 0, 36, 3, 10, 5, 22, 11, 0, 17, 1, 12, 5, 14, 5, 10, 1, 10, 4, 7, 0, 7, 0, 56, 1,
- 11, 5, 17, 3, 5, 24, 11, 0, 1, 2,
+ 10, 2, 10, 2, 5, 6, 12, 5, 10, 2, 1, 3, 1, 9, 0, 11, 68, 105, 101, 109, 65, 99, 99, 111, 117,
+ 110, 116, 18, 87, 105, 116, 104, 100, 114, 97, 119, 67, 97, 112, 97, 98, 105, 108, 105, 116,
+ 121, 25, 99, 114, 101, 97, 116, 101, 95, 99, 104, 105, 108, 100, 95, 118, 97, 115, 112, 95, 97,
+ 99, 99, 111, 117, 110, 116, 27, 101, 120, 116, 114, 97, 99, 116, 95, 119, 105, 116, 104, 100,
+ 114, 97, 119, 95, 99, 97, 112, 97, 98, 105, 108, 105, 116, 121, 8, 112, 97, 121, 95, 102, 114,
+ 111, 109, 27, 114, 101, 115, 116, 111, 114, 101, 95, 119, 105, 116, 104, 100, 114, 97, 119, 95,
+ 99, 97, 112, 97, 98, 105, 108, 105, 116, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
+ 10, 2, 1, 0, 1, 1, 5, 3, 25, 10, 0, 10, 1, 11, 2, 10, 3, 56, 0, 10, 4, 6, 0, 0, 0, 0, 0, 0, 0,
+ 0, 36, 3, 10, 5, 22, 11, 0, 17, 1, 12, 5, 14, 5, 10, 1, 10, 4, 7, 0, 7, 0, 56, 1, 11, 5, 17, 3,
+ 5, 24, 11, 0, 1, 2,
];
const CREATE_DESIGNATED_DEALER_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 3, 4, 11, 4, 15, 2, 5, 17, 27, 7, 44, 73, 8, 117, 16,
+ 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 3, 4, 11, 4, 15, 2, 5, 17, 27, 7, 44, 72, 8, 116, 16,
0, 0, 0, 1, 1, 2, 0, 1, 0, 0, 3, 2, 1, 1, 1, 1, 4, 2, 6, 12, 3, 0, 5, 6, 12, 5, 10, 2, 10, 2,
- 1, 6, 6, 12, 3, 5, 10, 2, 10, 2, 1, 1, 9, 0, 12, 76, 105, 98, 114, 97, 65, 99, 99, 111, 117,
- 110, 116, 12, 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, 99, 101, 21, 114, 101, 99, 111,
- 114, 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95, 97, 98, 111, 114, 116, 24, 99, 114,
- 101, 97, 116, 101, 95, 100, 101, 115, 105, 103, 110, 97, 116, 101, 100, 95, 100, 101, 97, 108,
- 101, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 1, 10, 10, 0, 10, 1, 17, 0,
- 11, 0, 10, 2, 11, 3, 11, 4, 10, 5, 56, 0, 2,
+ 1, 6, 6, 12, 3, 5, 10, 2, 10, 2, 1, 1, 9, 0, 11, 68, 105, 101, 109, 65, 99, 99, 111, 117, 110,
+ 116, 12, 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, 99, 101, 21, 114, 101, 99, 111, 114,
+ 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95, 97, 98, 111, 114, 116, 24, 99, 114, 101, 97,
+ 116, 101, 95, 100, 101, 115, 105, 103, 110, 97, 116, 101, 100, 95, 100, 101, 97, 108, 101, 114,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 1, 10, 10, 0, 10, 1, 17, 0, 11, 0, 10,
+ 2, 11, 3, 11, 4, 10, 5, 56, 0, 2,
];
const CREATE_PARENT_VASP_ACCOUNT_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 3, 4, 11, 4, 15, 2, 5, 17, 27, 7, 44, 75, 8, 119, 16,
+ 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 3, 4, 11, 4, 15, 2, 5, 17, 27, 7, 44, 74, 8, 118, 16,
0, 0, 0, 1, 1, 2, 0, 1, 0, 0, 3, 2, 1, 1, 1, 1, 4, 2, 6, 12, 3, 0, 5, 6, 12, 5, 10, 2, 10, 2,
- 1, 6, 6, 12, 3, 5, 10, 2, 10, 2, 1, 1, 9, 0, 12, 76, 105, 98, 114, 97, 65, 99, 99, 111, 117,
- 110, 116, 12, 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, 99, 101, 21, 114, 101, 99, 111,
- 114, 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95, 97, 98, 111, 114, 116, 26, 99, 114,
- 101, 97, 116, 101, 95, 112, 97, 114, 101, 110, 116, 95, 118, 97, 115, 112, 95, 97, 99, 99, 111,
- 117, 110, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 1, 10, 10, 0, 10, 1,
- 17, 0, 11, 0, 10, 2, 11, 3, 11, 4, 10, 5, 56, 0, 2,
+ 1, 6, 6, 12, 3, 5, 10, 2, 10, 2, 1, 1, 9, 0, 11, 68, 105, 101, 109, 65, 99, 99, 111, 117, 110,
+ 116, 12, 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, 99, 101, 21, 114, 101, 99, 111, 114,
+ 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95, 97, 98, 111, 114, 116, 26, 99, 114, 101, 97,
+ 116, 101, 95, 112, 97, 114, 101, 110, 116, 95, 118, 97, 115, 112, 95, 97, 99, 99, 111, 117,
+ 110, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 1, 10, 10, 0, 10, 1, 17, 0,
+ 11, 0, 10, 2, 11, 3, 11, 4, 10, 5, 56, 0, 2,
];
const CREATE_RECOVERY_ADDRESS_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 2, 4, 4, 3, 8, 10, 5, 18, 12, 7, 30, 91, 8, 121, 16,
- 0, 0, 0, 1, 0, 2, 1, 0, 0, 3, 0, 1, 0, 1, 4, 2, 3, 0, 1, 6, 12, 1, 8, 0, 2, 6, 12, 8, 0, 0, 12,
- 76, 105, 98, 114, 97, 65, 99, 99, 111, 117, 110, 116, 15, 82, 101, 99, 111, 118, 101, 114, 121,
+ 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 2, 4, 4, 3, 8, 10, 5, 18, 12, 7, 30, 90, 8, 120, 16,
+ 0, 0, 0, 1, 0, 2, 1, 0, 0, 3, 0, 1, 0, 1, 4, 2, 3, 0, 1, 6, 12, 1, 8, 0, 2, 6, 12, 8, 0, 0, 11,
+ 68, 105, 101, 109, 65, 99, 99, 111, 117, 110, 116, 15, 82, 101, 99, 111, 118, 101, 114, 121,
65, 100, 100, 114, 101, 115, 115, 21, 75, 101, 121, 82, 111, 116, 97, 116, 105, 111, 110, 67,
97, 112, 97, 98, 105, 108, 105, 116, 121, 31, 101, 120, 116, 114, 97, 99, 116, 95, 107, 101,
121, 95, 114, 111, 116, 97, 116, 105, 111, 110, 95, 99, 97, 112, 97, 98, 105, 108, 105, 116,
@@ -3967,9 +3966,9 @@ const CREATE_RECOVERY_ADDRESS_CODE: &[u8] = &[
];
const CREATE_VALIDATOR_ACCOUNT_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 4, 3, 4, 10, 5, 14, 22, 7, 36, 73, 8, 109, 16, 0, 0, 0,
+ 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 4, 3, 4, 10, 5, 14, 22, 7, 36, 72, 8, 108, 16, 0, 0, 0,
1, 1, 2, 0, 1, 0, 0, 3, 2, 1, 0, 2, 6, 12, 3, 0, 4, 6, 12, 5, 10, 2, 10, 2, 5, 6, 12, 3, 5, 10,
- 2, 10, 2, 12, 76, 105, 98, 114, 97, 65, 99, 99, 111, 117, 110, 116, 12, 83, 108, 105, 100, 105,
+ 2, 10, 2, 11, 68, 105, 101, 109, 65, 99, 99, 111, 117, 110, 116, 12, 83, 108, 105, 100, 105,
110, 103, 78, 111, 110, 99, 101, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, 101,
95, 111, 114, 95, 97, 98, 111, 114, 116, 24, 99, 114, 101, 97, 116, 101, 95, 118, 97, 108, 105,
100, 97, 116, 111, 114, 95, 97, 99, 99, 111, 117, 110, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -3977,9 +3976,9 @@ const CREATE_VALIDATOR_ACCOUNT_CODE: &[u8] = &[
];
const CREATE_VALIDATOR_OPERATOR_ACCOUNT_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 4, 3, 4, 10, 5, 14, 22, 7, 36, 82, 8, 118, 16, 0, 0, 0,
+ 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 4, 3, 4, 10, 5, 14, 22, 7, 36, 81, 8, 117, 16, 0, 0, 0,
1, 1, 2, 0, 1, 0, 0, 3, 2, 1, 0, 2, 6, 12, 3, 0, 4, 6, 12, 5, 10, 2, 10, 2, 5, 6, 12, 3, 5, 10,
- 2, 10, 2, 12, 76, 105, 98, 114, 97, 65, 99, 99, 111, 117, 110, 116, 12, 83, 108, 105, 100, 105,
+ 2, 10, 2, 11, 68, 105, 101, 109, 65, 99, 99, 111, 117, 110, 116, 12, 83, 108, 105, 100, 105,
110, 103, 78, 111, 110, 99, 101, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, 101,
95, 111, 114, 95, 97, 98, 111, 114, 116, 33, 99, 114, 101, 97, 116, 101, 95, 118, 97, 108, 105,
100, 97, 116, 111, 114, 95, 111, 112, 101, 114, 97, 116, 111, 114, 95, 97, 99, 99, 111, 117,
@@ -3998,10 +3997,10 @@ const FREEZE_ACCOUNT_CODE: &[u8] = &[
];
const PEER_TO_PEER_WITH_METADATA_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 7, 1, 0, 2, 2, 2, 4, 3, 6, 16, 4, 22, 2, 5, 24, 29, 7, 53, 97, 8,
- 150, 1, 16, 0, 0, 0, 1, 1, 0, 0, 2, 0, 1, 0, 0, 3, 2, 3, 1, 1, 0, 4, 1, 3, 0, 1, 5, 1, 6, 12,
- 1, 8, 0, 5, 6, 8, 0, 5, 3, 10, 2, 10, 2, 0, 5, 6, 12, 5, 3, 10, 2, 10, 2, 1, 9, 0, 12, 76, 105,
- 98, 114, 97, 65, 99, 99, 111, 117, 110, 116, 18, 87, 105, 116, 104, 100, 114, 97, 119, 67, 97,
+ 161, 28, 235, 11, 1, 0, 0, 0, 7, 1, 0, 2, 2, 2, 4, 3, 6, 16, 4, 22, 2, 5, 24, 29, 7, 53, 96, 8,
+ 149, 1, 16, 0, 0, 0, 1, 1, 0, 0, 2, 0, 1, 0, 0, 3, 2, 3, 1, 1, 0, 4, 1, 3, 0, 1, 5, 1, 6, 12,
+ 1, 8, 0, 5, 6, 8, 0, 5, 3, 10, 2, 10, 2, 0, 5, 6, 12, 5, 3, 10, 2, 10, 2, 1, 9, 0, 11, 68, 105,
+ 101, 109, 65, 99, 99, 111, 117, 110, 116, 18, 87, 105, 116, 104, 100, 114, 97, 119, 67, 97,
112, 97, 98, 105, 108, 105, 116, 121, 27, 101, 120, 116, 114, 97, 99, 116, 95, 119, 105, 116,
104, 100, 114, 97, 119, 95, 99, 97, 112, 97, 98, 105, 108, 105, 116, 121, 8, 112, 97, 121, 95,
102, 114, 111, 109, 27, 114, 101, 115, 116, 111, 114, 101, 95, 119, 105, 116, 104, 100, 114,
@@ -4011,12 +4010,12 @@ const PEER_TO_PEER_WITH_METADATA_CODE: &[u8] = &[
];
const PREBURN_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 7, 1, 0, 2, 2, 2, 4, 3, 6, 16, 4, 22, 2, 5, 24, 21, 7, 45, 96, 8,
- 141, 1, 16, 0, 0, 0, 1, 1, 0, 0, 2, 0, 1, 0, 0, 3, 2, 3, 1, 1, 0, 4, 1, 3, 0, 1, 5, 1, 6, 12,
- 1, 8, 0, 3, 6, 12, 6, 8, 0, 3, 0, 2, 6, 12, 3, 1, 9, 0, 12, 76, 105, 98, 114, 97, 65, 99, 99,
- 111, 117, 110, 116, 18, 87, 105, 116, 104, 100, 114, 97, 119, 67, 97, 112, 97, 98, 105, 108,
- 105, 116, 121, 27, 101, 120, 116, 114, 97, 99, 116, 95, 119, 105, 116, 104, 100, 114, 97, 119,
- 95, 99, 97, 112, 97, 98, 105, 108, 105, 116, 121, 7, 112, 114, 101, 98, 117, 114, 110, 27, 114,
+ 161, 28, 235, 11, 1, 0, 0, 0, 7, 1, 0, 2, 2, 2, 4, 3, 6, 16, 4, 22, 2, 5, 24, 21, 7, 45, 95, 8,
+ 140, 1, 16, 0, 0, 0, 1, 1, 0, 0, 2, 0, 1, 0, 0, 3, 2, 3, 1, 1, 0, 4, 1, 3, 0, 1, 5, 1, 6, 12,
+ 1, 8, 0, 3, 6, 12, 6, 8, 0, 3, 0, 2, 6, 12, 3, 1, 9, 0, 11, 68, 105, 101, 109, 65, 99, 99, 111,
+ 117, 110, 116, 18, 87, 105, 116, 104, 100, 114, 97, 119, 67, 97, 112, 97, 98, 105, 108, 105,
+ 116, 121, 27, 101, 120, 116, 114, 97, 99, 116, 95, 119, 105, 116, 104, 100, 114, 97, 119, 95,
+ 99, 97, 112, 97, 98, 105, 108, 105, 116, 121, 7, 112, 114, 101, 98, 117, 114, 110, 27, 114,
101, 115, 116, 111, 114, 101, 95, 119, 105, 116, 104, 100, 114, 97, 119, 95, 99, 97, 112, 97,
98, 105, 108, 105, 116, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 4, 1, 10,
10, 0, 17, 0, 12, 2, 11, 0, 14, 2, 10, 1, 56, 0, 11, 2, 17, 2, 2,
@@ -4037,22 +4036,22 @@ const REGISTER_VALIDATOR_CONFIG_CODE: &[u8] = &[
];
const REMOVE_VALIDATOR_AND_RECONFIGURE_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 6, 3, 6, 15, 5, 21, 24, 7, 45, 95, 8, 140, 1, 16, 0, 0,
+ 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 6, 3, 6, 15, 5, 21, 24, 7, 45, 94, 8, 139, 1, 16, 0, 0,
0, 1, 0, 2, 1, 3, 0, 1, 0, 2, 4, 2, 3, 0, 0, 5, 4, 1, 0, 2, 6, 12, 3, 0, 1, 5, 1, 10, 2, 2, 6,
- 12, 5, 4, 6, 12, 3, 10, 2, 5, 2, 1, 3, 11, 76, 105, 98, 114, 97, 83, 121, 115, 116, 101, 109,
- 12, 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, 99, 101, 15, 86, 97, 108, 105, 100, 97,
- 116, 111, 114, 67, 111, 110, 102, 105, 103, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110,
- 99, 101, 95, 111, 114, 95, 97, 98, 111, 114, 116, 14, 103, 101, 116, 95, 104, 117, 109, 97,
- 110, 95, 110, 97, 109, 101, 16, 114, 101, 109, 111, 118, 101, 95, 118, 97, 108, 105, 100, 97,
- 116, 111, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 5, 6, 18, 10, 0, 10, 1, 17,
- 0, 10, 3, 17, 1, 11, 2, 33, 12, 4, 11, 4, 3, 14, 11, 0, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 39, 11,
- 0, 10, 3, 17, 2, 2,
+ 12, 5, 4, 6, 12, 3, 10, 2, 5, 2, 1, 3, 10, 68, 105, 101, 109, 83, 121, 115, 116, 101, 109, 12,
+ 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, 99, 101, 15, 86, 97, 108, 105, 100, 97, 116,
+ 111, 114, 67, 111, 110, 102, 105, 103, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99,
+ 101, 95, 111, 114, 95, 97, 98, 111, 114, 116, 14, 103, 101, 116, 95, 104, 117, 109, 97, 110,
+ 95, 110, 97, 109, 101, 16, 114, 101, 109, 111, 118, 101, 95, 118, 97, 108, 105, 100, 97, 116,
+ 111, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 5, 6, 18, 10, 0, 10, 1, 17, 0, 10,
+ 3, 17, 1, 11, 2, 33, 12, 4, 11, 4, 3, 14, 11, 0, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 39, 11, 0, 10,
+ 3, 17, 2, 2,
];
const ROTATE_AUTHENTICATION_KEY_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 2, 2, 2, 4, 3, 6, 15, 5, 21, 18, 7, 39, 125, 8, 164, 1,
+ 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 2, 2, 2, 4, 3, 6, 15, 5, 21, 18, 7, 39, 124, 8, 163, 1,
16, 0, 0, 0, 1, 1, 0, 0, 2, 0, 1, 0, 0, 3, 1, 2, 0, 0, 4, 3, 2, 0, 1, 6, 12, 1, 8, 0, 0, 2, 6,
- 8, 0, 10, 2, 2, 6, 12, 10, 2, 12, 76, 105, 98, 114, 97, 65, 99, 99, 111, 117, 110, 116, 21, 75,
+ 8, 0, 10, 2, 2, 6, 12, 10, 2, 11, 68, 105, 101, 109, 65, 99, 99, 111, 117, 110, 116, 21, 75,
101, 121, 82, 111, 116, 97, 116, 105, 111, 110, 67, 97, 112, 97, 98, 105, 108, 105, 116, 121,
31, 101, 120, 116, 114, 97, 99, 116, 95, 107, 101, 121, 95, 114, 111, 116, 97, 116, 105, 111,
110, 95, 99, 97, 112, 97, 98, 105, 108, 105, 116, 121, 31, 114, 101, 115, 116, 111, 114, 101,
@@ -4063,27 +4062,27 @@ const ROTATE_AUTHENTICATION_KEY_CODE: &[u8] = &[
];
const ROTATE_AUTHENTICATION_KEY_WITH_NONCE_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 2, 4, 4, 3, 8, 20, 5, 28, 23, 7, 51, 160, 1, 8, 211,
+ 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 2, 4, 4, 3, 8, 20, 5, 28, 23, 7, 51, 159, 1, 8, 210,
1, 16, 0, 0, 0, 1, 0, 3, 1, 0, 1, 2, 0, 1, 0, 0, 4, 2, 3, 0, 0, 5, 3, 1, 0, 0, 6, 4, 1, 0, 2,
- 6, 12, 3, 0, 1, 6, 12, 1, 8, 0, 2, 6, 8, 0, 10, 2, 3, 6, 12, 3, 10, 2, 12, 76, 105, 98, 114,
- 97, 65, 99, 99, 111, 117, 110, 116, 12, 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, 99,
- 101, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95, 97, 98,
- 111, 114, 116, 21, 75, 101, 121, 82, 111, 116, 97, 116, 105, 111, 110, 67, 97, 112, 97, 98,
- 105, 108, 105, 116, 121, 31, 101, 120, 116, 114, 97, 99, 116, 95, 107, 101, 121, 95, 114, 111,
- 116, 97, 116, 105, 111, 110, 95, 99, 97, 112, 97, 98, 105, 108, 105, 116, 121, 31, 114, 101,
- 115, 116, 111, 114, 101, 95, 107, 101, 121, 95, 114, 111, 116, 97, 116, 105, 111, 110, 95, 99,
- 97, 112, 97, 98, 105, 108, 105, 116, 121, 25, 114, 111, 116, 97, 116, 101, 95, 97, 117, 116,
- 104, 101, 110, 116, 105, 99, 97, 116, 105, 111, 110, 95, 107, 101, 121, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 1, 0, 5, 3, 12, 10, 0, 10, 1, 17, 0, 11, 0, 17, 1, 12, 3, 14, 3, 11, 2,
- 17, 3, 11, 3, 17, 2, 2,
+ 6, 12, 3, 0, 1, 6, 12, 1, 8, 0, 2, 6, 8, 0, 10, 2, 3, 6, 12, 3, 10, 2, 11, 68, 105, 101, 109,
+ 65, 99, 99, 111, 117, 110, 116, 12, 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, 99, 101,
+ 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95, 97, 98, 111,
+ 114, 116, 21, 75, 101, 121, 82, 111, 116, 97, 116, 105, 111, 110, 67, 97, 112, 97, 98, 105,
+ 108, 105, 116, 121, 31, 101, 120, 116, 114, 97, 99, 116, 95, 107, 101, 121, 95, 114, 111, 116,
+ 97, 116, 105, 111, 110, 95, 99, 97, 112, 97, 98, 105, 108, 105, 116, 121, 31, 114, 101, 115,
+ 116, 111, 114, 101, 95, 107, 101, 121, 95, 114, 111, 116, 97, 116, 105, 111, 110, 95, 99, 97,
+ 112, 97, 98, 105, 108, 105, 116, 121, 25, 114, 111, 116, 97, 116, 101, 95, 97, 117, 116, 104,
+ 101, 110, 116, 105, 99, 97, 116, 105, 111, 110, 95, 107, 101, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1, 0, 5, 3, 12, 10, 0, 10, 1, 17, 0, 11, 0, 17, 1, 12, 3, 14, 3, 11, 2, 17,
+ 3, 11, 3, 17, 2, 2,
];
const ROTATE_AUTHENTICATION_KEY_WITH_NONCE_ADMIN_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 2, 4, 4, 3, 8, 20, 5, 28, 25, 7, 53, 160, 1, 8, 213,
+ 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 2, 4, 4, 3, 8, 20, 5, 28, 25, 7, 53, 159, 1, 8, 212,
1, 16, 0, 0, 0, 1, 0, 3, 1, 0, 1, 2, 0, 1, 0, 0, 4, 2, 3, 0, 0, 5, 3, 1, 0, 0, 6, 4, 1, 0, 2,
- 6, 12, 3, 0, 1, 6, 12, 1, 8, 0, 2, 6, 8, 0, 10, 2, 4, 6, 12, 6, 12, 3, 10, 2, 12, 76, 105, 98,
- 114, 97, 65, 99, 99, 111, 117, 110, 116, 12, 83, 108, 105, 100, 105, 110, 103, 78, 111, 110,
- 99, 101, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95, 97, 98,
+ 6, 12, 3, 0, 1, 6, 12, 1, 8, 0, 2, 6, 8, 0, 10, 2, 4, 6, 12, 6, 12, 3, 10, 2, 11, 68, 105, 101,
+ 109, 65, 99, 99, 111, 117, 110, 116, 12, 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, 99,
+ 101, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95, 97, 98,
111, 114, 116, 21, 75, 101, 121, 82, 111, 116, 97, 116, 105, 111, 110, 67, 97, 112, 97, 98,
105, 108, 105, 116, 121, 31, 101, 120, 116, 114, 97, 99, 116, 95, 107, 101, 121, 95, 114, 111,
116, 97, 116, 105, 111, 110, 95, 99, 97, 112, 97, 98, 105, 108, 105, 116, 121, 31, 114, 101,
@@ -4119,13 +4118,13 @@ const ROTATE_SHARED_ED25519_PUBLIC_KEY_CODE: &[u8] = &[
];
const SET_VALIDATOR_CONFIG_AND_RECONFIGURE_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 4, 3, 4, 10, 5, 14, 15, 7, 29, 69, 8, 98, 16, 0, 0, 0,
- 1, 1, 2, 0, 1, 0, 0, 3, 2, 1, 0, 5, 6, 12, 5, 10, 2, 10, 2, 10, 2, 0, 2, 6, 12, 5, 11, 76, 105,
- 98, 114, 97, 83, 121, 115, 116, 101, 109, 15, 86, 97, 108, 105, 100, 97, 116, 111, 114, 67,
- 111, 110, 102, 105, 103, 10, 115, 101, 116, 95, 99, 111, 110, 102, 105, 103, 29, 117, 112, 100,
- 97, 116, 101, 95, 99, 111, 110, 102, 105, 103, 95, 97, 110, 100, 95, 114, 101, 99, 111, 110,
- 102, 105, 103, 117, 114, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 10, 10,
- 0, 10, 1, 11, 2, 11, 3, 11, 4, 17, 0, 11, 0, 10, 1, 17, 1, 2,
+ 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 4, 3, 4, 10, 5, 14, 15, 7, 29, 68, 8, 97, 16, 0, 0, 0,
+ 1, 1, 2, 0, 1, 0, 0, 3, 2, 1, 0, 5, 6, 12, 5, 10, 2, 10, 2, 10, 2, 0, 2, 6, 12, 5, 10, 68, 105,
+ 101, 109, 83, 121, 115, 116, 101, 109, 15, 86, 97, 108, 105, 100, 97, 116, 111, 114, 67, 111,
+ 110, 102, 105, 103, 10, 115, 101, 116, 95, 99, 111, 110, 102, 105, 103, 29, 117, 112, 100, 97,
+ 116, 101, 95, 99, 111, 110, 102, 105, 103, 95, 97, 110, 100, 95, 114, 101, 99, 111, 110, 102,
+ 105, 103, 117, 114, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 10, 10, 0,
+ 10, 1, 11, 2, 11, 3, 11, 4, 17, 0, 11, 0, 10, 1, 17, 1, 2,
];
const SET_VALIDATOR_OPERATOR_CODE: &[u8] = &[
@@ -4153,13 +4152,13 @@ const SET_VALIDATOR_OPERATOR_WITH_NONCE_ADMIN_CODE: &[u8] = &[
];
const TIERED_MINT_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 3, 4, 11, 4, 15, 2, 5, 17, 21, 7, 38, 60, 8, 98, 16,
+ 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 3, 4, 11, 4, 15, 2, 5, 17, 21, 7, 38, 59, 8, 97, 16,
0, 0, 0, 1, 1, 2, 0, 1, 0, 0, 3, 2, 1, 1, 1, 1, 4, 2, 6, 12, 3, 0, 4, 6, 12, 5, 3, 3, 5, 6, 12,
- 3, 5, 3, 3, 1, 9, 0, 12, 76, 105, 98, 114, 97, 65, 99, 99, 111, 117, 110, 116, 12, 83, 108,
- 105, 100, 105, 110, 103, 78, 111, 110, 99, 101, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111,
- 110, 99, 101, 95, 111, 114, 95, 97, 98, 111, 114, 116, 11, 116, 105, 101, 114, 101, 100, 95,
- 109, 105, 110, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 1, 9, 10, 0, 10,
- 1, 17, 0, 11, 0, 10, 2, 10, 3, 10, 4, 56, 0, 2,
+ 3, 5, 3, 3, 1, 9, 0, 11, 68, 105, 101, 109, 65, 99, 99, 111, 117, 110, 116, 12, 83, 108, 105,
+ 100, 105, 110, 103, 78, 111, 110, 99, 101, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110,
+ 99, 101, 95, 111, 114, 95, 97, 98, 111, 114, 116, 11, 116, 105, 101, 114, 101, 100, 95, 109,
+ 105, 110, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 1, 9, 10, 0, 10, 1, 17,
+ 0, 11, 0, 10, 2, 10, 3, 10, 4, 56, 0, 2,
];
const UNFREEZE_ACCOUNT_CODE: &[u8] = &[
@@ -4172,41 +4171,41 @@ const UNFREEZE_ACCOUNT_CODE: &[u8] = &[
1, 17, 1, 11, 0, 10, 2, 17, 0, 2,
];
+const UPDATE_DIEM_VERSION_CODE: &[u8] = &[
+ 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 4, 3, 4, 10, 5, 14, 10, 7, 24, 51, 8, 75, 16, 0, 0, 0,
+ 1, 0, 2, 0, 1, 0, 1, 3, 0, 1, 0, 2, 6, 12, 3, 0, 3, 6, 12, 3, 3, 11, 68, 105, 101, 109, 86,
+ 101, 114, 115, 105, 111, 110, 12, 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, 99, 101, 3,
+ 115, 101, 116, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95,
+ 97, 98, 111, 114, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 1, 7, 10, 0, 10,
+ 1, 17, 1, 11, 0, 10, 2, 17, 0, 2,
+];
+
const UPDATE_DUAL_ATTESTATION_LIMIT_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 4, 3, 4, 10, 5, 14, 10, 7, 24, 72, 8, 96, 16, 0, 0, 0,
+ 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 4, 3, 4, 10, 5, 14, 10, 7, 24, 71, 8, 95, 16, 0, 0, 0,
1, 0, 2, 0, 1, 0, 1, 3, 0, 1, 0, 2, 6, 12, 3, 0, 3, 6, 12, 3, 3, 15, 68, 117, 97, 108, 65, 116,
116, 101, 115, 116, 97, 116, 105, 111, 110, 12, 83, 108, 105, 100, 105, 110, 103, 78, 111, 110,
- 99, 101, 20, 115, 101, 116, 95, 109, 105, 99, 114, 111, 108, 105, 98, 114, 97, 95, 108, 105,
- 109, 105, 116, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95,
- 97, 98, 111, 114, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 1, 7, 10, 0, 10,
- 1, 17, 1, 11, 0, 10, 2, 17, 0, 2,
+ 99, 101, 19, 115, 101, 116, 95, 109, 105, 99, 114, 111, 100, 105, 101, 109, 95, 108, 105, 109,
+ 105, 116, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95, 97,
+ 98, 111, 114, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 1, 7, 10, 0, 10, 1,
+ 17, 1, 11, 0, 10, 2, 17, 0, 2,
];
const UPDATE_EXCHANGE_RATE_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 7, 1, 0, 6, 2, 6, 4, 3, 10, 16, 4, 26, 2, 5, 28, 25, 7, 53, 100,
- 8, 153, 1, 16, 0, 0, 0, 1, 0, 2, 0, 0, 2, 0, 0, 3, 0, 1, 0, 2, 4, 2, 3, 0, 1, 5, 4, 3, 1, 1, 2,
- 6, 2, 3, 3, 1, 8, 0, 2, 6, 12, 3, 0, 2, 6, 12, 8, 0, 4, 6, 12, 3, 3, 3, 1, 9, 0, 12, 70, 105,
- 120, 101, 100, 80, 111, 105, 110, 116, 51, 50, 5, 76, 105, 98, 114, 97, 12, 83, 108, 105, 100,
+ 161, 28, 235, 11, 1, 0, 0, 0, 7, 1, 0, 6, 2, 6, 4, 3, 10, 16, 4, 26, 2, 5, 28, 25, 7, 53, 99,
+ 8, 152, 1, 16, 0, 0, 0, 1, 0, 2, 1, 1, 2, 0, 1, 3, 0, 1, 0, 2, 4, 2, 3, 0, 0, 5, 4, 3, 1, 1, 2,
+ 6, 2, 3, 3, 1, 8, 0, 2, 6, 12, 3, 0, 2, 6, 12, 8, 0, 4, 6, 12, 3, 3, 3, 1, 9, 0, 4, 68, 105,
+ 101, 109, 12, 70, 105, 120, 101, 100, 80, 111, 105, 110, 116, 51, 50, 12, 83, 108, 105, 100,
105, 110, 103, 78, 111, 110, 99, 101, 20, 99, 114, 101, 97, 116, 101, 95, 102, 114, 111, 109,
95, 114, 97, 116, 105, 111, 110, 97, 108, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110,
- 99, 101, 95, 111, 114, 95, 97, 98, 111, 114, 116, 24, 117, 112, 100, 97, 116, 101, 95, 108, 98,
- 114, 95, 101, 120, 99, 104, 97, 110, 103, 101, 95, 114, 97, 116, 101, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 5, 1, 11, 10, 0, 10, 1, 17, 1, 10, 2, 10, 3, 17, 0, 12, 4, 11, 0,
- 11, 4, 56, 0, 2,
-];
-
-const UPDATE_LIBRA_VERSION_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 4, 3, 4, 10, 5, 14, 10, 7, 24, 52, 8, 76, 16, 0, 0, 0,
- 1, 0, 2, 0, 1, 0, 1, 3, 0, 1, 0, 2, 6, 12, 3, 0, 3, 6, 12, 3, 3, 12, 76, 105, 98, 114, 97, 86,
- 101, 114, 115, 105, 111, 110, 12, 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, 99, 101, 3,
- 115, 101, 116, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95,
- 97, 98, 111, 114, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 1, 7, 10, 0, 10,
- 1, 17, 1, 11, 0, 10, 2, 17, 0, 2,
+ 99, 101, 95, 111, 114, 95, 97, 98, 111, 114, 116, 24, 117, 112, 100, 97, 116, 101, 95, 120,
+ 100, 120, 95, 101, 120, 99, 104, 97, 110, 103, 101, 95, 114, 97, 116, 101, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 5, 1, 11, 10, 0, 10, 1, 17, 1, 10, 2, 10, 3, 17, 0, 12, 4, 11,
+ 0, 11, 4, 56, 0, 2,
];
const UPDATE_MINTING_ABILITY_CODE: &[u8] = &[
- 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 2, 3, 2, 6, 4, 8, 2, 5, 10, 8, 7, 18, 29, 8, 47, 16, 0,
- 0, 0, 1, 0, 1, 1, 1, 0, 2, 2, 6, 12, 1, 0, 1, 9, 0, 5, 76, 105, 98, 114, 97, 22, 117, 112, 100,
+ 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 2, 3, 2, 6, 4, 8, 2, 5, 10, 8, 7, 18, 28, 8, 46, 16, 0,
+ 0, 0, 1, 0, 1, 1, 1, 0, 2, 2, 6, 12, 1, 0, 1, 9, 0, 4, 68, 105, 101, 109, 22, 117, 112, 100,
97, 116, 101, 95, 109, 105, 110, 116, 105, 110, 103, 95, 97, 98, 105, 108, 105, 116, 121, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 4, 11, 0, 10, 1, 56, 0, 2,
];
diff --git a/common/bitvec/Cargo.toml b/common/bitvec/Cargo.toml
index b91dc33443..7b70ff375f 100644
--- a/common/bitvec/Cargo.toml
+++ b/common/bitvec/Cargo.toml
@@ -1,16 +1,16 @@
[package]
-name = "libra-bitvec"
+name = "diem-bitvec"
version = "0.1.0"
-authors = ["Libra Association "]
-description = "Libra safe bitvec implementation"
+authors = ["Diem Association "]
+description = "Diem safe bitvec implementation"
repository = "https://github.com/libra/libra"
-homepage = "https://libra.org"
+homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
edition = "2018"
[dependencies]
-libra-workspace-hack = { path = "../workspace-hack", version = "0.1.0" }
+diem-workspace-hack = { path = "../workspace-hack", version = "0.1.0" }
proptest = { version = "0.10.1", default-features = true, optional = true }
proptest-derive = { version = "0.2.0", optional = true }
serde = { version = "1.0.117", features = ["derive"] }
@@ -18,7 +18,7 @@ serde_bytes = "0.11.5"
[dev-dependencies]
lcs = { version = "0.1.0", package = "libra-canonical-serialization" }
-libra-proptest-helpers = { path = "../proptest-helpers", version = "0.1.0"}
+diem-proptest-helpers = { path = "../proptest-helpers", version = "0.1.0"}
proptest = { version = "0.10.1", default-features = true }
proptest-derive = { version = "0.2.0" }
diff --git a/common/bitvec/src/lib.rs b/common/bitvec/src/lib.rs
index 86dad8a386..7818dfb4ec 100644
--- a/common/bitvec/src/lib.rs
+++ b/common/bitvec/src/lib.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
//! This library defines a BitVec struct that represents a bit vector.
diff --git a/common/bounded-executor/Cargo.toml b/common/bounded-executor/Cargo.toml
index e66bbbb714..61aef57744 100644
--- a/common/bounded-executor/Cargo.toml
+++ b/common/bounded-executor/Cargo.toml
@@ -1,17 +1,17 @@
[package]
name = "bounded-executor"
version = "0.1.0"
-authors = ["Libra Association "]
-description = "Libra bounded executor"
+authors = ["Diem Association "]
+description = "Diem bounded executor"
repository = "https://github.com/libra/libra"
-homepage = "https://libra.org"
+homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
edition = "2018"
[dependencies]
futures = "0.3.8"
-libra-workspace-hack = { path = "../workspace-hack", version = "0.1.0" }
+diem-workspace-hack = { path = "../workspace-hack", version = "0.1.0" }
tokio = { version = "0.2.22", features = ["sync"] }
[dev-dependencies]
diff --git a/common/bounded-executor/src/lib.rs b/common/bounded-executor/src/lib.rs
index 01357cd9ad..7814d8a7e6 100644
--- a/common/bounded-executor/src/lib.rs
+++ b/common/bounded-executor/src/lib.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
#![forbid(unsafe_code)]
diff --git a/common/channel/Cargo.toml b/common/channel/Cargo.toml
index 27917ea2f8..36f7d7b368 100644
--- a/common/channel/Cargo.toml
+++ b/common/channel/Cargo.toml
@@ -1,10 +1,10 @@
[package]
name = "channel"
version = "0.1.0"
-authors = ["Libra Association "]
-description = "Libra channel"
+authors = ["Diem Association "]
+description = "Diem channel"
repository = "https://github.com/libra/libra"
-homepage = "https://libra.org"
+homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
edition = "2018"
@@ -12,10 +12,10 @@ edition = "2018"
[dependencies]
anyhow = "1.0.34"
futures = "0.3.8"
-libra-metrics = { path = "../metrics", version = "0.1.0" }
-libra-infallible = { path = "../infallible", version = "0.1.0" }
-libra-workspace-hack = { path = "../workspace-hack", version = "0.1.0" }
+diem-metrics = { path = "../metrics", version = "0.1.0" }
+diem-infallible = { path = "../infallible", version = "0.1.0" }
+diem-workspace-hack = { path = "../workspace-hack", version = "0.1.0" }
[dev-dependencies]
-libra-types = { path = "../../types", version = "0.1.0" }
+diem-types = { path = "../../types", version = "0.1.0" }
tokio = { version = "0.2.22", features = ["full"] }
diff --git a/common/channel/many-keys-stress-test/Cargo.toml b/common/channel/many-keys-stress-test/Cargo.toml
index e7baa323e4..86f6e777ae 100644
--- a/common/channel/many-keys-stress-test/Cargo.toml
+++ b/common/channel/many-keys-stress-test/Cargo.toml
@@ -1,10 +1,10 @@
[package]
name = "many-keys-stress-test"
version = "0.1.0"
-authors = ["Libra Association "]
-description = "Libra channel"
+authors = ["Diem Association "]
+description = "Diem channel"
repository = "https://github.com/libra/libra"
-homepage = "https://libra.org"
+homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
edition = "2018"
@@ -12,5 +12,5 @@ edition = "2018"
[dependencies]
futures = "0.3.8"
channel = { path = "../", version = "0.1.0" }
-libra-workspace-hack = { path = "../../workspace-hack", version = "0.1.0" }
+diem-workspace-hack = { path = "../../workspace-hack", version = "0.1.0" }
structopt = "0.3.21"
diff --git a/common/channel/many-keys-stress-test/src/main.rs b/common/channel/many-keys-stress-test/src/main.rs
index 90ac001bb2..8a193ccace 100644
--- a/common/channel/many-keys-stress-test/src/main.rs
+++ b/common/channel/many-keys-stress-test/src/main.rs
@@ -1,7 +1,7 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
-use channel::{libra_channel, message_queues::QueueStyle};
+use channel::{diem_channel, message_queues::QueueStyle};
use futures::{executor::block_on, stream::StreamExt};
use std::{
io::{Cursor, Write},
@@ -44,7 +44,7 @@ pub fn run(args: Args) {
static NUM_POP: AtomicUsize = AtomicUsize::new(0);
static IS_DONE: AtomicBool = AtomicBool::new(false);
- let (mut sender, mut receiver) = libra_channel::new::<[u8; KEY_SIZE_BYTES], [u8; MSG_SIZE_BYTES]>(
+ let (mut sender, mut receiver) = diem_channel::new::<[u8; KEY_SIZE_BYTES], [u8; MSG_SIZE_BYTES]>(
QueueStyle::FIFO,
NonZeroUsize::new(args.max_queue_size).unwrap(),
None,
diff --git a/common/channel/src/libra_channel.rs b/common/channel/src/diem_channel.rs
similarity index 93%
rename from common/channel/src/libra_channel.rs
rename to common/channel/src/diem_channel.rs
index bdf6af0934..c64ebbff8b 100644
--- a/common/channel/src/libra_channel.rs
+++ b/common/channel/src/diem_channel.rs
@@ -1,20 +1,20 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
-//! libra_channel provides an mpsc channel which has two ends `libra_channel::Receiver`
-//! and `libra_channel::Sender` similar to existing mpsc data structures.
+//! diem_channel provides an mpsc channel which has two ends `diem_channel::Receiver`
+//! and `diem_channel::Sender` similar to existing mpsc data structures.
//! What makes it different from existing mpsc channels is that we have full control
//! over how the internal queueing in the channel happens and how we schedule messages
//! to be sent out from this channel.
//! Internally, it uses the `PerKeyQueue` to store messages
use crate::message_queues::{PerKeyQueue, QueueStyle};
use anyhow::{ensure, Result};
+use diem_infallible::Mutex;
+use diem_metrics::IntCounterVec;
use futures::{
channel::oneshot,
stream::{FusedStream, Stream},
};
-use libra_infallible::Mutex;
-use libra_metrics::IntCounterVec;
use std::{
fmt::{Debug, Formatter},
hash::Hash,
@@ -47,13 +47,13 @@ struct SharedState {
stream_terminated: bool,
}
-/// The sending end of the libra_channel.
+/// The sending end of the diem_channel.
#[derive(Debug)]
pub struct Sender {
shared_state: Arc>>,
}
-/// The status of an element inserted into a libra_channel. If the element is successfully
+/// The status of an element inserted into a diem_channel. If the element is successfully
/// dequeued, ElementStatus::Dequeued is sent to the sender. If it is dropped
/// ElementStatus::Dropped is sent to the sender along with the dropped element.
pub enum ElementStatus {
@@ -140,7 +140,7 @@ impl Drop for Sender {
}
}
-/// The receiving end of the libra_channel.
+/// The receiving end of the diem_channel.
pub struct Receiver {
shared_state: Arc>>,
}
@@ -191,7 +191,7 @@ impl FusedStream for Receiver {
}
}
-/// Create a new Libra Channel and returns the two ends of the channel.
+/// Create a new Diem Channel and returns the two ends of the channel.
pub fn new(
queue_style: QueueStyle,
max_queue_size_per_key: NonZeroUsize,
diff --git a/common/channel/src/libra_channel_test.rs b/common/channel/src/diem_channel_test.rs
similarity index 88%
rename from common/channel/src/libra_channel_test.rs
rename to common/channel/src/diem_channel_test.rs
index ae69ba64a1..5a0bed179c 100644
--- a/common/channel/src/libra_channel_test.rs
+++ b/common/channel/src/diem_channel_test.rs
@@ -1,21 +1,21 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
-use crate::{libra_channel, libra_channel::ElementStatus, message_queues::QueueStyle};
+use crate::{diem_channel, diem_channel::ElementStatus, message_queues::QueueStyle};
+use diem_types::account_address::AccountAddress;
use futures::{
channel::oneshot,
executor::block_on,
future::{join, FutureExt},
stream::{FusedStream, StreamExt},
};
-use libra_types::account_address::AccountAddress;
use std::{num::NonZeroUsize, time::Duration};
use tokio::{runtime::Runtime, time::delay_for};
#[test]
fn test_send_recv_order() {
let (mut sender, mut receiver) =
- libra_channel::new(QueueStyle::FIFO, NonZeroUsize::new(10).unwrap(), None);
+ diem_channel::new(QueueStyle::FIFO, NonZeroUsize::new(10).unwrap(), None);
sender.push(0, 0).unwrap();
sender.push(0, 1).unwrap();
sender.push(0, 2).unwrap();
@@ -35,7 +35,7 @@ fn test_send_recv_order() {
#[test]
fn test_empty() {
let (_, mut receiver) =
- libra_channel::new::(QueueStyle::FIFO, NonZeroUsize::new(10).unwrap(), None);
+ diem_channel::new::(QueueStyle::FIFO, NonZeroUsize::new(10).unwrap(), None);
// Ensures that there is no other value which is ready
assert_eq!(receiver.select_next_some().now_or_never(), None);
}
@@ -43,7 +43,7 @@ fn test_empty() {
#[test]
fn test_waker() {
let (mut sender, mut receiver) =
- libra_channel::new(QueueStyle::FIFO, NonZeroUsize::new(10).unwrap(), None);
+ diem_channel::new(QueueStyle::FIFO, NonZeroUsize::new(10).unwrap(), None);
// Ensures that there is no other value which is ready
assert_eq!(receiver.select_next_some().now_or_never(), None);
let f1 = async move {
@@ -66,7 +66,7 @@ fn test_waker() {
#[test]
fn test_sender_clone() {
let (mut sender, mut receiver) =
- libra_channel::new(QueueStyle::FIFO, NonZeroUsize::new(5).unwrap(), None);
+ diem_channel::new(QueueStyle::FIFO, NonZeroUsize::new(5).unwrap(), None);
// Ensures that there is no other value which is ready
assert_eq!(receiver.select_next_some().now_or_never(), None);
@@ -97,7 +97,7 @@ fn test_multiple_validators_helper(
expected_last_message: usize,
) {
let (mut sender, mut receiver) =
- libra_channel::new(queue_style, NonZeroUsize::new(1).unwrap(), None);
+ diem_channel::new(queue_style, NonZeroUsize::new(1).unwrap(), None);
let num_validators = 128;
for message in 0..num_messages_per_validator {
for validator in 0..num_validators {
@@ -133,7 +133,7 @@ fn test_multiple_validators_lifo() {
#[test]
fn test_feedback_on_drop() {
let (mut sender, mut receiver) =
- libra_channel::new(QueueStyle::FIFO, NonZeroUsize::new(3).unwrap(), None);
+ diem_channel::new(QueueStyle::FIFO, NonZeroUsize::new(3).unwrap(), None);
sender.push(0, 'a').unwrap();
sender.push(0, 'b').unwrap();
let (c_status_tx, c_status_rx) = oneshot::channel();
diff --git a/common/channel/src/lib.rs b/common/channel/src/lib.rs
index 65aa449454..c7872cd4a8 100644
--- a/common/channel/src/lib.rs
+++ b/common/channel/src/lib.rs
@@ -1,33 +1,33 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
#![forbid(unsafe_code)]
//! Provides an mpsc (multi-producer single-consumer) channel wrapped in an
-//! [`IntGauge`](libra_metrics::IntGauge) that counts the number of currently
+//! [`IntGauge`](diem_metrics::IntGauge) that counts the number of currently
//! queued items. While there is only one [`channel::Receiver`], there can be
//! many [`channel::Sender`]s, which are also cheap to clone.
//!
-//! This channel differs from our other channel implementation, [`channel::libra_channel`],
+//! This channel differs from our other channel implementation, [`channel::diem_channel`],
//! in that it is just a single queue (vs. different queues for different keys)
//! with backpressure (senders will block if the queue is full instead of evicting
//! another item in the queue) that only implements FIFO (vs. LIFO or KLAST).
+use diem_metrics::IntGauge;
use futures::{
channel::mpsc,
sink::Sink,
stream::{FusedStream, Stream},
task::{Context, Poll},
};
-use libra_metrics::IntGauge;
use std::pin::Pin;
#[cfg(test)]
mod test;
-pub mod libra_channel;
+pub mod diem_channel;
#[cfg(test)]
-mod libra_channel_test;
+mod diem_channel_test;
pub mod message_queues;
#[cfg(test)]
diff --git a/common/channel/src/message_queues.rs b/common/channel/src/message_queues.rs
index 848730fc47..cd21b617c0 100644
--- a/common/channel/src/message_queues.rs
+++ b/common/channel/src/message_queues.rs
@@ -1,7 +1,7 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
-use libra_metrics::IntCounterVec;
+use diem_metrics::IntCounterVec;
use std::{
collections::{HashMap, VecDeque},
fmt::{Debug, Formatter, Result},
@@ -168,7 +168,7 @@ impl PerKeyQueue {
// Remove empty per-key-queues every `POPS_PER_GC` successful dequeue
// operations.
//
- // libra-channel never removes keys from its PerKeyQueue (without
+ // diem-channel never removes keys from its PerKeyQueue (without
// this logic). This works fine for the validator network, where we
// have a bounded set of peers that almost never changes; however,
// this does not work for servicing public clients, where we can have
diff --git a/common/channel/src/message_queues_test.rs b/common/channel/src/message_queues_test.rs
index fd395be83f..723c6de155 100644
--- a/common/channel/src/message_queues_test.rs
+++ b/common/channel/src/message_queues_test.rs
@@ -1,8 +1,8 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use crate::message_queues::{PerKeyQueue, QueueStyle};
-use libra_types::account_address::AccountAddress;
+use diem_types::account_address::AccountAddress;
use std::num::NonZeroUsize;
/// This represents a proposal message from a validator
diff --git a/common/channel/src/test.rs b/common/channel/src/test.rs
index 2fab743b55..b2df4494e0 100644
--- a/common/channel/src/test.rs
+++ b/common/channel/src/test.rs
@@ -1,13 +1,13 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use crate as channel;
+use diem_metrics::IntGauge;
use futures::{
executor::block_on,
task::{noop_waker, Context, Poll},
FutureExt, SinkExt, StreamExt,
};
-use libra_metrics::IntGauge;
#[test]
fn test_send() {
diff --git a/common/crash-handler/Cargo.toml b/common/crash-handler/Cargo.toml
index f5cded284f..27adee71bc 100644
--- a/common/crash-handler/Cargo.toml
+++ b/common/crash-handler/Cargo.toml
@@ -1,10 +1,10 @@
[package]
name = "crash-handler"
version = "0.1.0"
-authors = ["Libra Association "]
-description = "Libra crash handler"
+authors = ["Diem Association "]
+description = "Diem crash handler"
repository = "https://github.com/libra/libra"
-homepage = "https://libra.org"
+homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
edition = "2018"
@@ -13,6 +13,6 @@ edition = "2018"
backtrace = "0.3.55"
toml = "0.5.7"
-libra-logger = { path = "../logger", version = "0.1.0" }
-libra-workspace-hack = { path = "../workspace-hack", version = "0.1.0" }
+diem-logger = { path = "../logger", version = "0.1.0" }
+diem-workspace-hack = { path = "../workspace-hack", version = "0.1.0" }
serde = { version = "1.0.117", features = ["derive"] }
diff --git a/common/crash-handler/src/lib.rs b/common/crash-handler/src/lib.rs
index 0f4286cb31..c7afff0993 100644
--- a/common/crash-handler/src/lib.rs
+++ b/common/crash-handler/src/lib.rs
@@ -1,10 +1,10 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
#![forbid(unsafe_code)]
use backtrace::Backtrace;
-use libra_logger::prelude::*;
+use diem_logger::prelude::*;
use serde::Serialize;
use std::{
panic::{self, PanicInfo},
diff --git a/common/datatest-stable/Cargo.toml b/common/datatest-stable/Cargo.toml
index 11126d8bc6..bc15a02d22 100644
--- a/common/datatest-stable/Cargo.toml
+++ b/common/datatest-stable/Cargo.toml
@@ -1,10 +1,10 @@
[package]
name = "datatest-stable"
version = "0.1.0"
-authors = ["Libra Association "]
-description = "Libra datatest stable"
+authors = ["Diem Association "]
+description = "Diem datatest stable"
repository = "https://github.com/libra/libra"
-homepage = "https://libra.org"
+homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
edition = "2018"
@@ -16,7 +16,7 @@ regex = "1.4.2"
walkdir = "2.3.1"
structopt = "0.3.21"
termcolor = "1.1.2"
-libra-workspace-hack = { path = "../workspace-hack", version = "0.1.0" }
+diem-workspace-hack = { path = "../workspace-hack", version = "0.1.0" }
[[test]]
name = "example"
diff --git a/common/datatest-stable/src/lib.rs b/common/datatest-stable/src/lib.rs
index cf7615ff57..608458a771 100644
--- a/common/datatest-stable/src/lib.rs
+++ b/common/datatest-stable/src/lib.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
#![forbid(unsafe_code)]
diff --git a/common/datatest-stable/src/macros.rs b/common/datatest-stable/src/macros.rs
index be9b9c5c8c..1b0d580fd3 100644
--- a/common/datatest-stable/src/macros.rs
+++ b/common/datatest-stable/src/macros.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
/// `datatest-stable` test harness entry point. Should be declared in the test module.
diff --git a/common/datatest-stable/src/runner.rs b/common/datatest-stable/src/runner.rs
index f74f544268..73ba1d9840 100644
--- a/common/datatest-stable/src/runner.rs
+++ b/common/datatest-stable/src/runner.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
#![allow(clippy::integer_arithmetic)]
diff --git a/common/datatest-stable/src/utils.rs b/common/datatest-stable/src/utils.rs
index a76932c341..5b2405b422 100644
--- a/common/datatest-stable/src/utils.rs
+++ b/common/datatest-stable/src/utils.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use std::path::{Path, PathBuf};
diff --git a/common/datatest-stable/tests/example.rs b/common/datatest-stable/tests/example.rs
index 1d3c11ed0e..19b2c2ef7e 100644
--- a/common/datatest-stable/tests/example.rs
+++ b/common/datatest-stable/tests/example.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use datatest_stable::Result;
diff --git a/common/debug-interface/Cargo.toml b/common/debug-interface/Cargo.toml
index 50ae1959ca..d47a42638b 100644
--- a/common/debug-interface/Cargo.toml
+++ b/common/debug-interface/Cargo.toml
@@ -1,10 +1,10 @@
[package]
name = "debug-interface"
version = "0.1.0"
-authors = ["Libra Association "]
-description = "Libra debug interface"
+authors = ["Diem Association "]
+description = "Diem debug interface"
repository = "https://github.com/libra/libra"
-homepage = "https://libra.org"
+homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
edition = "2018"
@@ -16,6 +16,6 @@ tokio = { version = "0.2.22", features = ["full"] }
reqwest = { version = "0.10.9", features = ["blocking", "json"], default_features = false }
warp = "0.2.5"
-libra-logger = { path = "../logger", version = "0.1.0" }
-libra-metrics = { path = "../metrics", version = "0.1.0" }
-libra-workspace-hack = { path = "../workspace-hack", version = "0.1.0" }
+diem-logger = { path = "../logger", version = "0.1.0" }
+diem-metrics = { path = "../metrics", version = "0.1.0" }
+diem-workspace-hack = { path = "../workspace-hack", version = "0.1.0" }
diff --git a/common/debug-interface/src/lib.rs b/common/debug-interface/src/lib.rs
index 2fd3c91ef7..e7e8871811 100644
--- a/common/debug-interface/src/lib.rs
+++ b/common/debug-interface/src/lib.rs
@@ -1,8 +1,8 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use anyhow::Result;
-use libra_logger::json_log::JsonLogEntry;
+use diem_logger::json_log::JsonLogEntry;
use reqwest::blocking;
use std::collections::HashMap;
diff --git a/common/debug-interface/src/node_debug_service.rs b/common/debug-interface/src/node_debug_service.rs
index b53c8a7187..e324f1139f 100644
--- a/common/debug-interface/src/node_debug_service.rs
+++ b/common/debug-interface/src/node_debug_service.rs
@@ -1,9 +1,9 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
//! Debug interface to access information in a specific node.
-use libra_logger::{info, json_log, Filter, Logger};
+use diem_logger::{info, json_log, Filter, Logger};
use std::{net::SocketAddr, sync::Arc};
use tokio::runtime::{Builder, Runtime};
use warp::Filter as _;
@@ -24,7 +24,7 @@ impl NodeDebugService {
// GET /metrics
let metrics =
- warp::path("metrics").map(|| warp::reply::json(&libra_metrics::get_all_metrics()));
+ warp::path("metrics").map(|| warp::reply::json(&diem_metrics::get_all_metrics()));
// GET /events
let events = warp::path("events").map(|| warp::reply::json(&json_log::pop_last_entries()));
diff --git a/common/libradoc/Cargo.toml b/common/diemdoc/Cargo.toml
similarity index 62%
rename from common/libradoc/Cargo.toml
rename to common/diemdoc/Cargo.toml
index ac6a598eda..35cc65cacd 100644
--- a/common/libradoc/Cargo.toml
+++ b/common/diemdoc/Cargo.toml
@@ -1,10 +1,10 @@
[package]
-name = "libra-documentation-tool"
+name = "diem-documentation-tool"
version = "0.1.0"
-authors = ["Libra Association "]
-description = "Libra transaction-builder"
+authors = ["Diem Association "]
+description = "Diem transaction-builder"
repository = "https://github.com/libra/libra"
-homepage = "https://libra.org"
+homepage = "https://diem.com"
license = "Apache-2.0"
edition = "2018"
@@ -17,7 +17,7 @@ regex = "1.4.2"
structopt = "0.3.21"
once_cell = "1.4.1"
-libra-workspace-hack = { path = "../../common/workspace-hack", version = "0.1.0" }
+diem-workspace-hack = { path = "../../common/workspace-hack", version = "0.1.0" }
[dev-dependencies]
serde = { version = "1.0.117", features = ["derive"] }
@@ -27,6 +27,6 @@ tempfile = "3.1.0"
default = []
[[bin]]
-name = "libradoc"
+name = "diemdoc"
path = "src/main.rs"
test = false
diff --git a/common/libradoc/src/lib.rs b/common/diemdoc/src/lib.rs
similarity index 93%
rename from common/libradoc/src/lib.rs
rename to common/diemdoc/src/lib.rs
index 9310809c1f..6abd60ef13 100644
--- a/common/libradoc/src/lib.rs
+++ b/common/diemdoc/src/lib.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use once_cell::sync::Lazy;
@@ -68,7 +68,7 @@ where
}
static BEGIN_RE: Lazy =
- Lazy::new(|| Regex::new(r"").unwrap());
+ Lazy::new(|| Regex::new(r"").unwrap());
fn match_begin_command(line: &str) -> Option {
match BEGIN_RE.captures(line) {
@@ -78,5 +78,5 @@ fn match_begin_command(line: &str) -> Option {
}
fn match_end_command(line: &str) -> bool {
- line.contains("")
+ line.contains("")
}
diff --git a/common/libradoc/src/main.rs b/common/diemdoc/src/main.rs
similarity index 72%
rename from common/libradoc/src/main.rs
rename to common/diemdoc/src/main.rs
index 0e2fab705f..d041fe1d17 100644
--- a/common/libradoc/src/main.rs
+++ b/common/diemdoc/src/main.rs
@@ -1,21 +1,21 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
-//! # Tool to help maintaining libra specifications.
+//! # Tool to help maintaining diem specifications.
//!
//! '''bash
-//! cargo run -p libra-documentation-tool -- --help
+//! cargo run -p diem-documentation-tool -- --help
//! '''
-use libra_documentation_tool as libra_doc;
+use diem_documentation_tool as diem_doc;
use serde_reflection::Registry;
use std::{collections::BTreeMap, path::PathBuf};
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
#[structopt(
- name = "libra documentation tool",
- about = "Tool to help maintaining libra specifications"
+ name = "diem documentation tool",
+ about = "Tool to help maintaining diem specifications"
)]
struct Options {
/// Path to the YAML-encoded Serde formats.
@@ -24,7 +24,7 @@ struct Options {
/// Directory where to update markdown files in place (otherwise print sample code on stdout).
#[structopt(long)]
- update_libra_specs_dir: Option,
+ update_diem_specs_dir: Option,
}
fn process_specs(dir: PathBuf, definitions: &BTreeMap) -> std::io::Result<()> {
@@ -35,7 +35,7 @@ fn process_specs(dir: PathBuf, definitions: &BTreeMap) -> std::i
continue;
}
let file = std::io::BufReader::new(std::fs::File::open(path.clone())?);
- let output = libra_doc::update_rust_quotes(file, definitions)?;
+ let output = diem_doc::update_rust_quotes(file, definitions)?;
std::fs::write(path, &output)?;
}
Ok(())
@@ -47,10 +47,10 @@ fn main() {
let registry = serde_yaml::from_str::(content.as_str())
.expect("input file should be correct YAML for a Serde registry");
- let definitions = libra_doc::quote_container_definitions(®istry)
+ let definitions = diem_doc::quote_container_definitions(®istry)
.expect("generating definitions should not fail");
- match options.update_libra_specs_dir {
+ match options.update_diem_specs_dir {
None => println!("{:#?}", definitions),
Some(dir) => process_specs(dir, &definitions).expect("failed to process specifications"),
}
diff --git a/common/libradoc/tests/update.rs b/common/diemdoc/tests/update.rs
similarity index 62%
rename from common/libradoc/tests/update.rs
rename to common/diemdoc/tests/update.rs
index 075bc6122b..7d4d14fede 100644
--- a/common/libradoc/tests/update.rs
+++ b/common/diemdoc/tests/update.rs
@@ -1,7 +1,7 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
-use libra_documentation_tool as libra_doc;
+use diem_documentation_tool as diem_doc;
use serde::Deserialize;
use serde_reflection::{Samples, Tracer, TracerConfig};
@@ -24,31 +24,31 @@ fn test_doctool() {
let samples = Samples::new();
tracer.trace_type::(&samples).unwrap();
let registry = tracer.registry().unwrap();
- let definitions = libra_doc::quote_container_definitions(®istry).unwrap();
+ let definitions = diem_doc::quote_container_definitions(®istry).unwrap();
let input = r#"
-
-
+
+
111111
-
+
222222
-
-
-
+
+
+
33333333
"#
.to_string();
let expected_output = r#"
-
-
+
+
111111
-
+
```rust
struct MyStruct(u64);
```
-
-
+
+
```rust
enum MyEnum {
Unit,
@@ -60,14 +60,14 @@ enum MyEnum {
NewTupleArray([u16; 3]),
}
```
-
+
33333333
"#
.to_string();
let reader = std::io::BufReader::new(input.as_bytes());
assert_eq!(
- libra_doc::update_rust_quotes(reader, &definitions).unwrap(),
+ diem_doc::update_rust_quotes(reader, &definitions).unwrap(),
expected_output
);
}
diff --git a/common/infallible/Cargo.toml b/common/infallible/Cargo.toml
index 6286d85ff0..c484ba1e66 100644
--- a/common/infallible/Cargo.toml
+++ b/common/infallible/Cargo.toml
@@ -1,13 +1,13 @@
[package]
-name = "libra-infallible"
+name = "diem-infallible"
version = "0.1.0"
-authors = ["Libra Association "]
-description = "Libra libra-infallible"
+authors = ["Diem Association "]
+description = "Diem diem-infallible"
repository = "https://github.com/libra/libra"
-homepage = "https://libra.org"
+homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
edition = "2018"
[dependencies]
-libra-workspace-hack = { path = "../workspace-hack", version = "0.1.0" }
+diem-workspace-hack = { path = "../workspace-hack", version = "0.1.0" }
diff --git a/common/infallible/src/lib.rs b/common/infallible/src/lib.rs
index 73293e8870..8368fcd11b 100644
--- a/common/infallible/src/lib.rs
+++ b/common/infallible/src/lib.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
mod mutex;
diff --git a/common/infallible/src/mutex.rs b/common/infallible/src/mutex.rs
index 511674bd3d..381e91fc40 100644
--- a/common/infallible/src/mutex.rs
+++ b/common/infallible/src/mutex.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use std::sync::{Mutex as StdMutex, MutexGuard};
@@ -18,7 +18,7 @@ impl Mutex {
pub fn lock(&self) -> MutexGuard<'_, T> {
self.0
.lock()
- .expect("libra cannot currently handle a poisoned lock")
+ .expect("diem cannot currently handle a poisoned lock")
}
}
@@ -29,7 +29,7 @@ mod tests {
use std::{sync::Arc, thread};
#[test]
- fn test_libra_mutex() {
+ fn test_diem_mutex() {
let a = 7u8;
let mutex = Arc::new(Mutex::new(a));
let mutex2 = mutex.clone();
diff --git a/common/infallible/src/rwlock.rs b/common/infallible/src/rwlock.rs
index ecbfa9b76a..fef8b63581 100644
--- a/common/infallible/src/rwlock.rs
+++ b/common/infallible/src/rwlock.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use std::sync::{RwLock as RwLockImpl, RwLockReadGuard, RwLockWriteGuard};
@@ -18,21 +18,21 @@ impl RwLock {
pub fn read(&self) -> RwLockReadGuard<'_, T> {
self.0
.read()
- .expect("libra cannot currently handle a poisoned lock")
+ .expect("diem cannot currently handle a poisoned lock")
}
/// lock the rwlock in write mode
pub fn write(&self) -> RwLockWriteGuard<'_, T> {
self.0
.write()
- .expect("libra cannot currently handle a poisoned lock")
+ .expect("diem cannot currently handle a poisoned lock")
}
/// return the owned type consuming the lock
pub fn into_inner(self) -> T {
self.0
.into_inner()
- .expect("libra cannot currently handle a poisoned lock")
+ .expect("diem cannot currently handle a poisoned lock")
}
}
@@ -43,7 +43,7 @@ mod tests {
use std::{sync::Arc, thread};
#[test]
- fn test_libra_rwlock() {
+ fn test_diem_rwlock() {
let a = 7u8;
let rwlock = Arc::new(RwLock::new(a));
let rwlock2 = rwlock.clone();
diff --git a/common/infallible/src/time.rs b/common/infallible/src/time.rs
index b8c18aee27..727273c442 100644
--- a/common/infallible/src/time.rs
+++ b/common/infallible/src/time.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
#![forbid(unsafe_code)]
diff --git a/common/logger/Cargo.toml b/common/logger/Cargo.toml
index d408aa411c..ee84ac272e 100644
--- a/common/logger/Cargo.toml
+++ b/common/logger/Cargo.toml
@@ -1,23 +1,23 @@
[package]
-name = "libra-logger"
+name = "diem-logger"
version = "0.1.0"
-authors = ["Libra Association "]
-description = "Libra libra-logger"
+authors = ["Diem Association "]
+description = "Diem diem-logger"
repository = "https://github.com/libra/libra"
-homepage = "https://libra.org"
+homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
edition = "2018"
# Do NOT add any inter-project dependencies.
-# This is to avoid ever having a circular dependency with the libra-logger crate.
+# This is to avoid ever having a circular dependency with the diem-logger crate.
[dependencies]
chrono = "0.4.19"
erased-serde = "0.3.12"
hostname = "0.3.1"
-libra-log-derive = { path = "derive", version = "0.1.0" }
-libra-infallible = { path = "../infallible", version = "0.1.0" }
-libra-workspace-hack = { path = "../workspace-hack", version = "0.1.0" }
+diem-log-derive = { path = "derive", version = "0.1.0" }
+diem-infallible = { path = "../infallible", version = "0.1.0" }
+diem-workspace-hack = { path = "../workspace-hack", version = "0.1.0" }
once_cell = "1.4.1"
serde = { version = "1.0.117", features = ["derive"] }
serde_json = "1.0.60"
diff --git a/common/logger/derive/Cargo.toml b/common/logger/derive/Cargo.toml
index 347e8584d4..a837f3c7ce 100644
--- a/common/logger/derive/Cargo.toml
+++ b/common/logger/derive/Cargo.toml
@@ -1,9 +1,9 @@
[package]
-name = "libra-log-derive"
+name = "diem-log-derive"
version = "0.1.0"
-authors = ["Libra Association "]
+authors = ["Diem Association "]
repository = "https://github.com/libra/libra"
-homepage = "https://libra.org"
+homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
edition = "2018"
@@ -12,7 +12,7 @@ edition = "2018"
proc-macro = true
[dependencies]
-libra-workspace-hack = { path = "../../workspace-hack", version = "0.1.0" }
+diem-workspace-hack = { path = "../../workspace-hack", version = "0.1.0" }
syn = { version = "1.0.53", features = ["extra-traits"] }
quote = "1.0.7"
proc-macro2 = "1.0.24"
diff --git a/common/logger/derive/src/lib.rs b/common/logger/derive/src/lib.rs
index ca8b5b6118..4568cf2d20 100644
--- a/common/logger/derive/src/lib.rs
+++ b/common/logger/derive/src/lib.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use proc_macro::TokenStream;
@@ -63,10 +63,10 @@ pub fn derive(input: TokenStream) -> TokenStream {
// Calls to visit_pair
let visitor = format_ident!("visitor");
- let from_serde = quote! { ::libra_logger::Value::from_serde };
- let from_display = quote! { ::libra_logger::Value::from_display };
- let from_debug = quote! { ::libra_logger::Value::from_debug };
- let key_new = quote! { ::libra_logger::Key::new };
+ let from_serde = quote! { ::diem_logger::Value::from_serde };
+ let from_display = quote! { ::diem_logger::Value::from_display };
+ let from_debug = quote! { ::diem_logger::Value::from_debug };
+ let key_new = quote! { ::diem_logger::Key::new };
let visits = fields.iter().map(|f| {
let ident = f.ident.as_ref().unwrap();
let ident_str = ident.to_string();
@@ -95,8 +95,8 @@ pub fn derive(input: TokenStream) -> TokenStream {
#(#setters)*
}
- impl #impl_generics ::libra_logger::Schema for #name #ty_generics #where_clause {
- fn visit(&self, visitor: &mut dyn ::libra_logger::Visitor) {
+ impl #impl_generics ::diem_logger::Schema for #name #ty_generics #where_clause {
+ fn visit(&self, visitor: &mut dyn ::diem_logger::Visitor) {
#(#visits)*
}
}
diff --git a/common/logger/src/counters.rs b/common/logger/src/counters.rs
index d03117521d..8a936206f4 100644
--- a/common/logger/src/counters.rs
+++ b/common/logger/src/counters.rs
@@ -1,4 +1,4 @@
-// Copyright (c) The Libra Core Contributors
+// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use once_cell::sync::Lazy;
@@ -6,13 +6,13 @@ use prometheus::{register_int_counter, IntCounter};
/// Count of the struct logs submitted by macro
pub static STRUCT_LOG_COUNT: Lazy = Lazy::new(|| {
- register_int_counter!("libra_struct_log_count", "Count of the struct logs.").unwrap()
+ register_int_counter!("diem_struct_log_count", "Count of the struct logs.").unwrap()
});
/// Count of struct logs processed, but not necessarily sent
pub static PROCESSED_STRUCT_LOG_COUNT: Lazy = Lazy::new(|| {
register_int_counter!(
- "libra_struct_log_processed_count",
+ "diem_struct_log_processed_count",
"Count of the struct logs received by the sender."
)
.unwrap()
@@ -21,7 +21,7 @@ pub static PROCESSED_STRUCT_LOG_COUNT: Lazy = Lazy::new(|| {
/// Count of struct logs submitted through TCP
pub static SENT_STRUCT_LOG_COUNT: Lazy = Lazy::new(|| {
register_int_counter!(
- "libra_struct_log_tcp_submit_count",
+ "diem_struct_log_tcp_submit_count",
"Count of the struct logs submitted by TCP."
)
.unwrap()
@@ -30,7 +30,7 @@ pub static SENT_STRUCT_LOG_COUNT: Lazy = Lazy::new(|| {
/// Number of bytes of struct logs submitted through TCP
pub static SENT_STRUCT_LOG_BYTES: Lazy = Lazy::new(|| {
register_int_counter!(
- "libra_struct_log_tcp_submit_bytes",
+ "diem_struct_log_tcp_submit_bytes",
"Number of bytes of the struct logs submitted by TCP."
)
.unwrap()
@@ -39,7 +39,7 @@ pub static SENT_STRUCT_LOG_BYTES: Lazy = Lazy::new(|| {
/// Metric for when we connect the outbound TCP
pub static STRUCT_LOG_TCP_CONNECT_COUNT: Lazy = Lazy::new(|| {
register_int_counter!(
- "libra_struct_log_tcp_connect_count",
+ "diem_struct_log_tcp_connect_count",
"Count of the tcp connections made for struct logs."
)
.unwrap()
@@ -48,7 +48,7 @@ pub static STRUCT_LOG_TCP_CONNECT_COUNT: Lazy = Lazy::new(|| {
/// Metric for when we fail to log during sending to the queue
pub static STRUCT_LOG_QUEUE_ERROR_COUNT: Lazy = Lazy::new(|| {
register_int_counter!(
- "libra_struct_log_queue_error_count",
+ "diem_struct_log_queue_error_count",
"Count of all errors during queuing struct logs."
)
.unwrap()
@@ -57,7 +57,7 @@ pub static STRUCT_LOG_QUEUE_ERROR_COUNT: Lazy = Lazy::new(|| {
/// Metric for when we fail to log during sending
pub static STRUCT_LOG_SEND_ERROR_COUNT: Lazy = Lazy::new(|| {
register_int_counter!(
- "libra_struct_log_send_error_count",
+ "diem_struct_log_send_error_count",
"Count of all errors during sending struct logs."
)
.unwrap()
@@ -65,7 +65,7 @@ pub static STRUCT_LOG_SEND_ERROR_COUNT: Lazy