Skip to content

Commit

Permalink
github url update, ignoring developers.libra.org
Browse files Browse the repository at this point in the history
  • Loading branch information
rexhoffman authored and bors-libra committed Dec 9, 2020
1 parent 774b051 commit d58bdd6
Show file tree
Hide file tree
Showing 170 changed files with 221 additions and 221 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/documentation_bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ assignees: ''

# 🐛 Bug

If you're looking to report an issue with the Diem 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/diem/diem

<!-- A clear and concise description of what the bug is.
Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The project is undergoing daily changes. Pull Requests will be reviewed and resp

(Write your motivation for proposed changes here.)

### Have you read the [Contributing Guidelines on pull requests](https://github.com/libra/libra/blob/master/CONTRIBUTING.md#pull-requests)?
### Have you read the [Contributing Guidelines on pull requests](https://github.com/diem/diem/blob/master/CONTRIBUTING.md#pull-requests)?

(Write your answer here.)

Expand All @@ -18,4 +18,4 @@ The project is undergoing daily changes. Pull Requests will be reviewed and resp

## Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/libra/libra/developers.libra.org, and link to your PR here.)
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/diem/diem/developers.libra.org, and link to your PR here.)
2 changes: 1 addition & 1 deletion .github/workflows/land-blocking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ jobs:
body = "Cluster Test runner failed.";
console.error(err);
}
body += " See https://github.com/libra/libra/actions/runs/${{github.run_id}}";
body += " See https://github.com/diem/diem/actions/runs/${{github.run_id}}";
// Post comment on PR then fail this workflow
should_fail = true;
}
Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ development copy.
To get the development installation with all the necessary dependencies for
linting, testing, and building the documentation, run the following:
```bash
git clone https://github.com/libra/libra.git
git clone https://github.com/diem/diem.git
cd libra
./scripts/dev_setup.sh
cargo build
Expand All @@ -38,7 +38,7 @@ detailed guidance about how to contribute to the project.
#### Documentation

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
[repository](https://github.com/diem/diem/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
Expand Down Expand Up @@ -170,13 +170,13 @@ able to be built and passes all checks performed by CI.
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).
CLA](https://github.com/diem/diem/blob/master/documentation/contributing/individual-cla.pdf).
If you are contributing on behalf of your employer, please ask them to sign the
[Corporate
CLA](https://github.com/libra/libra/blob/master/documentation/contributing/corporate-cla.pdf).
CLA](https://github.com/diem/diem/blob/master/documentation/contributing/corporate-cla.pdf).

## Issues

Diem uses [GitHub issues](https://github.com/libra/libra/issues) to track
Diem uses [GitHub issues](https://github.com/diem/diem/issues) to track
bugs. Please include necessary information and instructions to reproduce your
issue.
2 changes: 1 addition & 1 deletion client/diem-dev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "diem-dev"
version = "0.1.0"
authors = ["Diem Association <[email protected]>"]
description = "Diem client"
repository = "https://github.com/libra/libra"
repository = "https://github.com/diem/diem"
homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
Expand Down
26 changes: 13 additions & 13 deletions client/diem-dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Diem has changed a lot since 6/18 and the new whitepaper, but I don't think we'v

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.
* A [ParentVASP](https://github.com/diem/diem/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/diem/diem/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/diem/diem/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

Expand All @@ -21,14 +21,14 @@ There are two currencies in testnet: `XUS` (stablecoin), and `XDX` (synthetic cu

### Addresses, Authentication Keys, and Cryptographic Keys

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:
Two major changes in new Diem design are the [shrinking](https://github.com/diem/diem/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.
* Each account has an `auth_key` that is checked against the public key included in the transaction in order to authenticate the sender.
* 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 = (<concatenated_keys> | K | 1)`. Derive an address and an auth key prefix as described above.
* Creating a `K`-of-`N` [multisig](https://github.com/diem/diem/blob/master/crypto/crypto/src/multi_ed25519.rs) authentication key is similar: generate `N` ed25519 public keys, then compute `auth_key = (<concatenated_keys> | K | 1)`. Derive an address and an auth key prefix as described above.
* 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
Expand All @@ -37,20 +37,20 @@ Two major changes in new Diem design are the [shrinking](https://github.com/libr

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).
* The faucet now [needs](https://github.com/diem/diem/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/diem/diem/issues/2764).
* An account created by the faucet has the `ParentVASP` role. Note that in mainnet, only the Association will have the privilege to create `ParentVASP`s, and will do so only for entities that meet appropriate standards.

### Transactions

Transactions are mostly unchanged from the original design. Two notable differences are:

* Transactions now require a [`gas_currency_code`](https://github.com/libra/libra/blob/master/types/src/transaction/mod.rs#L72) specifying which currency should be used to pay for gas. The account must have a balance in this currency.
* The signature scheme for a transaction can be either be single-signature ed25519 (as the original design) or multi-ed25519, a new [multisig](https://github.com/libra/libra/issues/2431) format
* Transactions now require a [`gas_currency_code`](https://github.com/diem/diem/blob/master/types/src/transaction/mod.rs#L72) specifying which currency should be used to pay for gas. The account must have a balance in this currency.
* The signature scheme for a transaction can be either be single-signature ed25519 (as the original design) or multi-ed25519, a new [multisig](https://github.com/diem/diem/issues/2431) format

### Payments

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:
Payments can be sent using [this](https://github.com/diem/diem/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.) `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).
Expand All @@ -59,11 +59,11 @@ Payments can be sent using [this](https://github.com/libra/libra/blob/master/lan

### Creating Child VASP Accounts

As mentioned above, any account created by the faucet has the `ParentVASP` role. You can create a child VASP account from a parent VASP using the [`create_child_vasp_account`](https://github.com/libra/libra/blob/master/language/stdlib/transaction_scripts/create_child_vasp_account.move) transaction script. Attempting to create a child VASP account from another child VASP will abort.
As mentioned above, any account created by the faucet has the `ParentVASP` role. You can create a child VASP account from a parent VASP using the [`create_child_vasp_account`](https://github.com/diem/diem/blob/master/language/stdlib/transaction_scripts/create_child_vasp_account.move) transaction script. Attempting to create a child VASP account from another child VASP will abort.

### Adding Currencies to Accounts

Each newly created account accepts at least one currency, which as specified as a currency code type parameter to the account creation script. New currencies can be added to an existing account via the `add_currency_to_account` [script](https://github.com/libra/libra/blob/master/language/stdlib/transaction_scripts/add_currency_to_account.move). In addition, a child VASP account can be prepopulated with all currencies in the system by using the `add_all_currencies` flag in the script above.
Each newly created account accepts at least one currency, which as specified as a currency code type parameter to the account creation script. New currencies can be added to an existing account via the `add_currency_to_account` [script](https://github.com/diem/diem/blob/master/language/stdlib/transaction_scripts/add_currency_to_account.move). In addition, a child VASP account can be prepopulated with all currencies in the system by using the `add_all_currencies` flag in the script above.

### Dual Attestation/Travel Rule Protocol

Expand All @@ -75,7 +75,7 @@ In Diem mainnet every payment transaction between two **distinct **VASP accounts

Details of doing this exchange in production will be published soon, but we will explain how to mock the protocol locally for testing purposes.

Every parent VASP created by the faucet has a dummy `base_url` and `compliance_public_key`. However, you can use [these](https://github.com/libra/libra/blob/master/language/stdlib/transaction_scripts/rotate_base_url.move) [scripts](https://github.com/libra/libra/blob/master/language/stdlib/transaction_scripts/rotate_compliance_public_key.move) to send a transaction from the parent VASP that sets the URL/key to meaningful values. Once this is done, you can construct the message to be signed and craft a dual attestation transaction with the following ingredients:
Every parent VASP created by the faucet has a dummy `base_url` and `compliance_public_key`. However, you can use [these](https://github.com/diem/diem/blob/master/language/stdlib/transaction_scripts/rotate_base_url.move) [scripts](https://github.com/diem/diem/blob/master/language/stdlib/transaction_scripts/rotate_compliance_public_key.move) to send a transaction from the parent VASP that sets the URL/key to meaningful values. Once this is done, you can construct the message to be signed and craft a dual attestation transaction with the following ingredients:

* `payer_vasp_address`: the address of the payer (can be either a parent or child VASP)
* `payee_vasp_address`: the address of the payee (can be either a parent or child VASP). Encoding: LCS `[u8; 16]`
Expand All @@ -84,4 +84,4 @@ Every parent VASP created by the faucet has a dummy `base_url` and `compliance_

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`.
Finally, send a transaction from payer_vasp_address using the payment [script](https://github.com/diem/diem/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`.
2 changes: 1 addition & 1 deletion client/faucet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "diem-faucet"
version = "0.1.0"
authors = ["Diem Association <[email protected]>"]
description = "Diem Testnet utility services"
repository = "https://github.com/libra/libra"
repository = "https://github.com/diem/diem"
homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
Expand Down
2 changes: 1 addition & 1 deletion client/json-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "diem-json-rpc-client"
version = "0.1.0"
authors = ["Diem Association <[email protected]>"]
description = "Diem JSONRPC client"
repository = "https://github.com/libra/libra"
repository = "https://github.com/diem/diem"
homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
Expand Down
2 changes: 1 addition & 1 deletion client/swiss-knife/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "swiss-knife"
version = "0.1.0"
authors = ["Diem Association <[email protected]>"]
description = "Tool for generating, serializing (LCS), hashing and signing Diem transactions. Additionally, contains tools for testing"
repository = "https://github.com/libra/libra"
repository = "https://github.com/diem/diem"
homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
Expand Down
4 changes: 2 additions & 2 deletions client/swiss-knife/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The `sample_inputs` folder contains a list of sample json inputs for various ope
## Examples for generate-raw-txn and generate-signed-txn operations

```
# Generate a peer_to_peer_transafer raw transaction (https://github.com/libra/libra/blob/1f86705b/language/transaction-builder/src/generated.rs#L447)
# Generate a peer_to_peer_transafer raw transaction (https://github.com/diem/diem/blob/1f86705b/language/transaction-builder/src/generated.rs#L447)
# For the txn_params json schema, look at the `struct TxnParams`
# For the script_params json schema, look at the `struct MoveScriptParams`
# Note about chain_id: For chain_id parameter, refer to the `enum NamedChain` in `chain_id.rs`. Also, please note that the numeric representation of the chain id ("0", "1", "2", etc.) can also be passed to the chain_id
Expand All @@ -42,7 +42,7 @@ $ cargo run -p swiss-knife -- generate-signed-txn < sample_inputs/generate_signe
}
}
# Generate a preburn raw transaction (https://github.com/libra/libra/blob/1f86705b/language/transaction-builder/src/generated.rs#L480)
# Generate a preburn raw transaction (https://github.com/diem/diem/blob/1f86705b/language/transaction-builder/src/generated.rs#L480)
$ cargo run -p swiss-knife -- generate-raw-txn < sample_inputs/generate_raw_txn_preburn.json
{
Expand Down
2 changes: 1 addition & 1 deletion client/transaction-builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "transaction-builder-generated"
version = "0.1.0"
authors = ["Diem Association <[email protected]>"]
description = "Generated transaction builders"
repository = "https://github.com/libra/libra"
repository = "https://github.com/diem/diem"
homepage = "https://diem.com"
license = "Apache-2.0"
edition = "2018"
Expand Down
2 changes: 1 addition & 1 deletion common/bitvec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "diem-bitvec"
version = "0.1.0"
authors = ["Diem Association <[email protected]>"]
description = "Diem safe bitvec implementation"
repository = "https://github.com/libra/libra"
repository = "https://github.com/diem/diem"
homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
Expand Down
Loading

0 comments on commit d58bdd6

Please sign in to comment.