Compare commits
24 Commits
Author | SHA1 | Date | |
---|---|---|---|
ca35841cb1 | |||
33d77357bf | |||
22e84abe5a | |||
9b532b16a9 | |||
c5a98a5b57 | |||
22d60d496b | |||
8243792430 | |||
1d1d85e0c5 | |||
9b0e40d1dc | |||
a231fbe978 | |||
cd2c09c473 | |||
774cd48cb1 | |||
d580603cd4 | |||
f0c931ea84 | |||
74b2eb4328 | |||
f1e9a944ef | |||
4cb38ddf01 | |||
593fde628c | |||
34fa025b17 | |||
33843f824a | |||
542bda0a6f | |||
d8bdbbf291 | |||
168b0f71f5 | |||
be79d97dde |
1532
Cargo.lock
generated
1532
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-archiver"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
@ -10,9 +10,9 @@ homepage = "https://solana.com/"
|
||||
[dependencies]
|
||||
clap = "2.33.0"
|
||||
console = "0.9.0"
|
||||
solana-core = { path = "../core", version = "0.20.0" }
|
||||
solana-logger = { path = "../logger", version = "0.20.0" }
|
||||
solana-metrics = { path = "../metrics", version = "0.20.0" }
|
||||
solana-netutil = { path = "../netutil", version = "0.20.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.0" }
|
||||
solana-core = { path = "../core", version = "0.20.1" }
|
||||
solana-logger = { path = "../logger", version = "0.20.1" }
|
||||
solana-metrics = { path = "../metrics", version = "0.20.1" }
|
||||
solana-netutil = { path = "../netutil", version = "0.20.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.1" }
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-banking-bench"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
@ -10,11 +10,11 @@ homepage = "https://solana.com/"
|
||||
[dependencies]
|
||||
log = "0.4.6"
|
||||
rayon = "1.2.0"
|
||||
solana-core = { path = "../core", version = "0.20.0" }
|
||||
solana-ledger = { path = "../ledger", version = "0.20.0" }
|
||||
solana-logger = { path = "../logger", version = "0.20.0" }
|
||||
solana-runtime = { path = "../runtime", version = "0.20.0" }
|
||||
solana-measure = { path = "../measure", version = "0.20.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.0" }
|
||||
solana-core = { path = "../core", version = "0.20.1" }
|
||||
solana-ledger = { path = "../ledger", version = "0.20.1" }
|
||||
solana-logger = { path = "../logger", version = "0.20.1" }
|
||||
solana-runtime = { path = "../runtime", version = "0.20.1" }
|
||||
solana-measure = { path = "../measure", version = "0.20.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.1" }
|
||||
rand = "0.6.5"
|
||||
crossbeam-channel = "0.3"
|
||||
|
@ -2,7 +2,7 @@
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-bench-exchange"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
@ -24,16 +24,16 @@ serde_derive = "1.0.101"
|
||||
serde_json = "1.0.41"
|
||||
serde_yaml = "0.8.11"
|
||||
# solana-runtime = { path = "../solana/runtime"}
|
||||
solana-core = { path = "../core", version = "0.20.0" }
|
||||
solana-genesis = { path = "../genesis", version = "0.20.0" }
|
||||
solana-client = { path = "../client", version = "0.20.0" }
|
||||
solana-drone = { path = "../drone", version = "0.20.0" }
|
||||
solana-exchange-api = { path = "../programs/exchange_api", version = "0.20.0" }
|
||||
solana-exchange-program = { path = "../programs/exchange_program", version = "0.20.0" }
|
||||
solana-logger = { path = "../logger", version = "0.20.0" }
|
||||
solana-metrics = { path = "../metrics", version = "0.20.0" }
|
||||
solana-netutil = { path = "../netutil", version = "0.20.0" }
|
||||
solana-runtime = { path = "../runtime", version = "0.20.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.0" }
|
||||
solana-core = { path = "../core", version = "0.20.1" }
|
||||
solana-genesis = { path = "../genesis", version = "0.20.1" }
|
||||
solana-client = { path = "../client", version = "0.20.1" }
|
||||
solana-drone = { path = "../drone", version = "0.20.1" }
|
||||
solana-exchange-api = { path = "../programs/exchange_api", version = "0.20.1" }
|
||||
solana-exchange-program = { path = "../programs/exchange_program", version = "0.20.1" }
|
||||
solana-logger = { path = "../logger", version = "0.20.1" }
|
||||
solana-metrics = { path = "../metrics", version = "0.20.1" }
|
||||
solana-netutil = { path = "../netutil", version = "0.20.1" }
|
||||
solana-runtime = { path = "../runtime", version = "0.20.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.1" }
|
||||
untrusted = "0.7.0"
|
||||
ws = "0.9.1"
|
||||
|
@ -2,13 +2,13 @@
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-bench-streamer"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
|
||||
[dependencies]
|
||||
clap = "2.33.0"
|
||||
solana-core = { path = "../core", version = "0.20.0" }
|
||||
solana-logger = { path = "../logger", version = "0.20.0" }
|
||||
solana-netutil = { path = "../netutil", version = "0.20.0" }
|
||||
solana-core = { path = "../core", version = "0.20.1" }
|
||||
solana-logger = { path = "../logger", version = "0.20.1" }
|
||||
solana-netutil = { path = "../netutil", version = "0.20.1" }
|
||||
|
@ -2,7 +2,7 @@
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-bench-tps"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
@ -16,19 +16,19 @@ serde = "1.0.101"
|
||||
serde_derive = "1.0.101"
|
||||
serde_json = "1.0.41"
|
||||
serde_yaml = "0.8.11"
|
||||
solana-core = { path = "../core", version = "0.20.0" }
|
||||
solana-genesis = { path = "../genesis", version = "0.20.0" }
|
||||
solana-client = { path = "../client", version = "0.20.0" }
|
||||
solana-drone = { path = "../drone", version = "0.20.0" }
|
||||
solana-librapay-api = { path = "../programs/librapay_api", version = "0.20.0", optional = true }
|
||||
solana-logger = { path = "../logger", version = "0.20.0" }
|
||||
solana-metrics = { path = "../metrics", version = "0.20.0" }
|
||||
solana-measure = { path = "../measure", version = "0.20.0" }
|
||||
solana-netutil = { path = "../netutil", version = "0.20.0" }
|
||||
solana-runtime = { path = "../runtime", version = "0.20.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.0" }
|
||||
solana-move-loader-program = { path = "../programs/move_loader_program", version = "0.20.0", optional = true }
|
||||
solana-move-loader-api = { path = "../programs/move_loader_api", version = "0.20.0", optional = true }
|
||||
solana-core = { path = "../core", version = "0.20.1" }
|
||||
solana-genesis = { path = "../genesis", version = "0.20.1" }
|
||||
solana-client = { path = "../client", version = "0.20.1" }
|
||||
solana-drone = { path = "../drone", version = "0.20.1" }
|
||||
solana-librapay-api = { path = "../programs/librapay_api", version = "0.20.1", optional = true }
|
||||
solana-logger = { path = "../logger", version = "0.20.1" }
|
||||
solana-metrics = { path = "../metrics", version = "0.20.1" }
|
||||
solana-measure = { path = "../measure", version = "0.20.1" }
|
||||
solana-netutil = { path = "../netutil", version = "0.20.1" }
|
||||
solana-runtime = { path = "../runtime", version = "0.20.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.1" }
|
||||
solana-move-loader-program = { path = "../programs/move_loader_program", version = "0.20.1", optional = true }
|
||||
solana-move-loader-api = { path = "../programs/move_loader_api", version = "0.20.1", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
serial_test = "0.2.0"
|
||||
|
@ -177,7 +177,7 @@ $ solana send-timestamp <PUBKEY> <PROCESS_ID> --date 2018-12-24T23:59:00
|
||||
## Usage
|
||||
### solana-cli
|
||||
```text
|
||||
solana-cli 0.20.0
|
||||
solana-cli 0.20.1
|
||||
Blockchain, Rebuilt for Scale
|
||||
|
||||
USAGE:
|
||||
|
@ -126,7 +126,7 @@ The result field will be a JSON object with the following sub fields:
|
||||
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"getAccountInfo", "params":["2gVkYWexTHR5Hb2aLeQN3tnngvWzisFKXDUPrgMHpdST"]}' http://localhost:8899
|
||||
|
||||
// Result
|
||||
{"jsonrpc":"2.0","result":{"executable":false,"owner":[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"lamports":1,"data":[3,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,20,0,0,0,0,0,0,0,50,48,53,48,45,48,49,45,48,49,84,48,48,58,48,48,58,48,48,90,252,10,7,28,246,140,88,177,98,82,10,227,89,81,18,30,194,101,199,16,11,73,133,20,246,62,114,39,20,113,189,32,50,0,0,0,0,0,0,0,247,15,36,102,167,83,225,42,133,127,82,34,36,224,207,130,109,230,224,188,163,33,213,13,5,117,211,251,65,159,197,51,0,0,0,0,0,0]},"id":1}
|
||||
{"jsonrpc":"2.0","result":{"executable":false,"owner":[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"lamports":1,"data":[3,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0.20.1,0,0,0,0,0,0,50,48,53,48,45,48,49,45,48,49,84,48,48,58,48,48,58,48,48,90,252,10,7,28,246,140,88,177,98,82,10,227,89,81,18,30,194,101,199,16,11,73,133,20,246,62,114,39,20,113,189,32,50,0,0,0,0,0,0,0,247,15,36,102,167,83,225,42,133,127,82,34,36,224,207,130,109,230,224,188,163,33,213,13,5,117,211,251,65,159,197,51,0,0,0,0,0,0]},"id":1}
|
||||
```
|
||||
|
||||
### getBalance
|
||||
@ -729,7 +729,7 @@ Subscribe to an account to receive notifications when the lamports or data for a
|
||||
#### Notification Format:
|
||||
|
||||
```bash
|
||||
{"jsonrpc": "2.0","method": "accountNotification", "params": {"result": {"executable":false,"owner":[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"lamports":1,"data":[3,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,20,0,0,0,0,0,0,0,50,48,53,48,45,48,49,45,48,49,84,48,48,58,48,48,58,48,48,90,252,10,7,28,246,140,88,177,98,82,10,227,89,81,18,30,194,101,199,16,11,73,133,20,246,62,114,39,20,113,189,32,50,0,0,0,0,0,0,0,247,15,36,102,167,83,225,42,133,127,82,34,36,224,207,130,109,230,224,188,163,33,213,13,5,117,211,251,65,159,197,51,0,0,0,0,0,0]},"subscription":0}}
|
||||
{"jsonrpc": "2.0","method": "accountNotification", "params": {"result": {"executable":false,"owner":[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"lamports":1,"data":[3,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0.20.1,0,0,0,0,0,0,50,48,53,48,45,48,49,45,48,49,84,48,48,58,48,48,58,48,48,90,252,10,7,28,246,140,88,177,98,82,10,227,89,81,18,30,194,101,199,16,11,73,133,20,246,62,114,39,20,113,189,32,50,0,0,0,0,0,0,0,247,15,36,102,167,83,225,42,133,127,82,34,36,224,207,130,109,230,224,188,163,33,213,13,5,117,211,251,65,159,197,51,0,0,0,0,0,0]},"subscription":0}}
|
||||
```
|
||||
|
||||
### accountUnsubscribe
|
||||
@ -787,7 +787,7 @@ Subscribe to a program to receive notifications when the lamports or data for a
|
||||
* `object` - account info JSON object \(see [getAccountInfo](jsonrpc-api.md#getaccountinfo) for field details\)
|
||||
|
||||
```bash
|
||||
{"jsonrpc":"2.0","method":"programNotification","params":{{"result":["8Rshv2oMkPu5E4opXTRyuyBeZBqQ4S477VG26wUTFxUM",{"executable":false,"lamports":1,"owner":[129,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"data":[1,1,1,0,0,0,0,0,0,0,20,0,0,0,0,0,0,0,50,48,49,56,45,49,50,45,50,52,84,50,51,58,53,57,58,48,48,90,235,233,39,152,15,44,117,176,41,89,100,86,45,61,2,44,251,46,212,37,35,118,163,189,247,84,27,235,178,62,55,89,0,0,0,0,50,0,0,0,0,0,0,0,235,233,39,152,15,44,117,176,41,89,100,86,45,61,2,44,251,46,212,37,35,118,163,189,247,84,27,235,178,62,45,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}],"subscription":0}}
|
||||
{"jsonrpc":"2.0","method":"programNotification","params":{{"result":["8Rshv2oMkPu5E4opXTRyuyBeZBqQ4S477VG26wUTFxUM",{"executable":false,"lamports":1,"owner":[129,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"data":[1,1,1,0,0,0,0,0,0,0.20.1,0,0,0,0,0,0,50,48,49,56,45,49,50,45,50,52,84,50,51,58,53,57,58,48,48,90,235,233,39,152,15,44,117,176,41,89,100,86,45,61,2,44,251,46,212,37,35,118,163,189,247,84,27,235,178,62,55,89,0,0,0,0,50,0,0,0,0,0,0,0,235,233,39,152,15,44,117,176,41,89,100,86,45,61,2,44,251,46,212,37,35,118,163,189,247,84,27,235,178,62,45,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}],"subscription":0}}
|
||||
```
|
||||
|
||||
### programUnsubscribe
|
||||
|
@ -11,7 +11,7 @@ This document proposes an easy to use software install and updater that can be u
|
||||
The easiest install method for supported platforms:
|
||||
|
||||
```bash
|
||||
$ curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.18.0/install/solana-install-init.sh | sh
|
||||
$ curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.20.1/install/solana-install-init.sh | sh
|
||||
```
|
||||
|
||||
This script will check github for the latest tagged release and download and run the `solana-install-init` binary from there.
|
||||
@ -20,7 +20,7 @@ If additional arguments need to be specified during the installation, the follow
|
||||
|
||||
```bash
|
||||
$ init_args=.... # arguments for `solana-install-init ...`
|
||||
$ curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.18.0/install/solana-install-init.sh | sh -s - ${init_args}
|
||||
$ curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.20.1/install/solana-install-init.sh | sh -s - ${init_args}
|
||||
```
|
||||
|
||||
### Fetch and run a pre-built installer from a Github release
|
||||
@ -28,7 +28,7 @@ $ curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.18.0/install
|
||||
With a well-known release URL, a pre-built binary can be obtained for supported platforms:
|
||||
|
||||
```bash
|
||||
$ curl -o solana-install-init https://github.com/solana-labs/solana/releases/download/v0.18.0/solana-install-init-x86_64-apple-darwin
|
||||
$ curl -o solana-install-init https://github.com/solana-labs/solana/releases/download/v0.20.1/solana-install-init-x86_64-apple-darwin
|
||||
$ chmod +x ./solana-install-init
|
||||
$ ./solana-install-init --help
|
||||
```
|
||||
|
@ -29,7 +29,7 @@ Before starting an archiver node, sanity check that the cluster is accessible to
|
||||
Fetch the current transaction count over JSON RPC:
|
||||
|
||||
```bash
|
||||
$ curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1, "method":"getTransactionCount"}' http://testnet.solana.com:8899
|
||||
curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1, "method":"getTransactionCount"}' http://testnet.solana.com:8899
|
||||
```
|
||||
|
||||
Inspect the blockexplorer at [http://testnet.solana.com/](http://testnet.solana.com/) for activity.
|
||||
@ -47,13 +47,13 @@ The `solana-install` tool can be used to easily install and upgrade the cluster
|
||||
#### Linux and mac OS
|
||||
|
||||
```bash
|
||||
$ curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.18.0/install/solana-install-init.sh | sh -s
|
||||
curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.20.1/install/solana-install-init.sh | sh -s
|
||||
```
|
||||
|
||||
Alternatively build the `solana-install` program from source and run the following command to obtain the same result:
|
||||
|
||||
```bash
|
||||
$ solana-install init
|
||||
solana-install init
|
||||
```
|
||||
|
||||
#### Windows
|
||||
@ -71,9 +71,9 @@ If you would rather not use `solana-install` to manage the install, you can manu
|
||||
Download the binaries by navigating to [https://github.com/solana-labs/solana/releases/latest](https://github.com/solana-labs/solana/releases/latest), download **solana-release-x86\_64-unknown-linux-gnu.tar.bz2**, then extract the archive:
|
||||
|
||||
```bash
|
||||
$ tar jxf solana-release-x86_64-unknown-linux-gnu.tar.bz2
|
||||
$ cd solana-release/
|
||||
$ export PATH=$PWD/bin:$PATH
|
||||
tar jxf solana-release-x86_64-unknown-linux-gnu.tar.bz2
|
||||
cd solana-release/
|
||||
export PATH=$PWD/bin:$PATH
|
||||
```
|
||||
|
||||
#### mac OS
|
||||
@ -81,9 +81,9 @@ $ export PATH=$PWD/bin:$PATH
|
||||
Download the binaries by navigating to [https://github.com/solana-labs/solana/releases/latest](https://github.com/solana-labs/solana/releases/latest), download **solana-release-x86\_64-apple-darwin.tar.bz2**, then extract the archive:
|
||||
|
||||
```bash
|
||||
$ tar jxf solana-release-x86_64-apple-darwin.tar.bz2
|
||||
$ cd solana-release/
|
||||
$ export PATH=$PWD/bin:$PATH
|
||||
tar jxf solana-release-x86_64-apple-darwin.tar.bz2
|
||||
cd solana-release/
|
||||
export PATH=$PWD/bin:$PATH
|
||||
```
|
||||
|
||||
#### Windows
|
||||
@ -95,7 +95,7 @@ Download the binaries by navigating to [https://github.com/solana-labs/solana/re
|
||||
Try running following command to join the gossip network and view all the other nodes in the cluster:
|
||||
|
||||
```bash
|
||||
$ solana-gossip --entrypoint testnet.solana.com:8001 spy
|
||||
solana-gossip --entrypoint testnet.solana.com:8001 spy
|
||||
# Press ^C to exit
|
||||
```
|
||||
|
||||
@ -104,8 +104,8 @@ Now configure the keypairs for your archiver by running:
|
||||
Navigate to the solana install location and open a cmd prompt
|
||||
|
||||
```bash
|
||||
$ solana-keygen new -o archiver-keypair.json
|
||||
$ solana-keygen new -o storage-keypair.json
|
||||
solana-keygen new -o archiver-keypair.json
|
||||
solana-keygen new -o storage-keypair.json
|
||||
```
|
||||
|
||||
Use solana-keygen to show the public keys for each of the keypairs, they will be needed in the next step:
|
||||
@ -114,23 +114,23 @@ Use solana-keygen to show the public keys for each of the keypairs, they will be
|
||||
|
||||
```bash
|
||||
# The archiver's identity
|
||||
$ solana-keygen pubkey archiver-keypair.json
|
||||
$ solana-keygen pubkey storage-keypair.json
|
||||
solana-keygen pubkey archiver-keypair.json
|
||||
solana-keygen pubkey storage-keypair.json
|
||||
```
|
||||
|
||||
* Linux and mac OS
|
||||
|
||||
\`\`\`bash
|
||||
|
||||
$ export ARCHIVER\_IDENTITY=$\(solana-keygen pubkey archiver-keypair.json\)
|
||||
export ARCHIVER\_IDENTITY=$\(solana-keygen pubkey archiver-keypair.json\)
|
||||
|
||||
$ export STORAGE\_IDENTITY=$\(solana-keygen pubkey storage-keypair.json\)
|
||||
export STORAGE\_IDENTITY=$\(solana-keygen pubkey storage-keypair.json\)
|
||||
|
||||
```text
|
||||
Then set up the storage accounts for your archiver by running:
|
||||
```bash
|
||||
$ solana --keypair archiver-keypair.json airdrop 100000 lamports
|
||||
$ solana --keypair archiver-keypair.json create-archiver-storage-account $ARCHIVER_IDENTITY $STORAGE_IDENTITY
|
||||
solana --keypair archiver-keypair.json airdrop 100000 lamports
|
||||
solana --keypair archiver-keypair.json create-archiver-storage-account $ARCHIVER_IDENTITY $STORAGE_IDENTITY
|
||||
```
|
||||
|
||||
Note: Every time the testnet restarts, run the steps to setup the archiver accounts again.
|
||||
@ -138,7 +138,7 @@ Note: Every time the testnet restarts, run the steps to setup the archiver accou
|
||||
To start the archiver:
|
||||
|
||||
```bash
|
||||
$ solana-archiver --entrypoint testnet.solana.com:8001 --identity archiver-keypair.json --storage-keypair storage-keypair.json --ledger archiver-ledger
|
||||
solana-archiver --entrypoint testnet.solana.com:8001 --identity archiver-keypair.json --storage-keypair storage-keypair.json --ledger archiver-ledger
|
||||
```
|
||||
|
||||
## Verify Archiver Setup
|
||||
@ -146,12 +146,11 @@ $ solana-archiver --entrypoint testnet.solana.com:8001 --identity archiver-keypa
|
||||
From another console, confirm the IP address and **identity pubkey** of your archiver is visible in the gossip network by running:
|
||||
|
||||
```bash
|
||||
$ solana-gossip --entrypoint testnet.solana.com:8001 spy
|
||||
solana-gossip --entrypoint testnet.solana.com:8001 spy
|
||||
```
|
||||
|
||||
Provide the **storage account pubkey** to the `solana show-storage-account` command to view the recent mining activity from your archiver:
|
||||
|
||||
```bash
|
||||
$ solana --keypair storage-keypair.json show-storage-account $STORAGE_IDENTITY
|
||||
solana --keypair storage-keypair.json show-storage-account $STORAGE_IDENTITY
|
||||
```
|
||||
|
||||
|
@ -7,13 +7,13 @@ You can publish your validator information to the chain to be publicly visible t
|
||||
Run the solana CLI to populate a validator info account:
|
||||
|
||||
```bash
|
||||
$ solana validator-info publish --keypair ~/validator-keypair.json <VALIDATOR_INFO_ARGS> <VALIDATOR_NAME>
|
||||
solana validator-info publish --keypair ~/validator-keypair.json <VALIDATOR_INFO_ARGS> <VALIDATOR_NAME>
|
||||
```
|
||||
|
||||
For details about optional fields for VALIDATOR\_INFO\_ARGS:
|
||||
|
||||
```bash
|
||||
$ solana validator-info publish --help
|
||||
solana validator-info publish --help
|
||||
```
|
||||
|
||||
## Keybase
|
||||
@ -33,4 +33,3 @@ Including a Keybase username allows client applications \(like the Solana Networ
|
||||
3. Add or update your `solana validator-info` with your Keybase username. The
|
||||
|
||||
CLI will verify the `validator-<PUBKEY>` file
|
||||
|
||||
|
@ -5,13 +5,13 @@
|
||||
The **identity pubkey** for your validator can also be found by running:
|
||||
|
||||
```bash
|
||||
$ solana-keygen pubkey ~/validator-keypair.json
|
||||
solana-keygen pubkey ~/validator-keypair.json
|
||||
```
|
||||
|
||||
From another console, confirm the IP address and **identity pubkey** of your validator is visible in the gossip network by running:
|
||||
|
||||
```bash
|
||||
$ solana-gossip --entrypoint testnet.solana.com:8001 spy
|
||||
solana-gossip --entrypoint testnet.solana.com:8001 spy
|
||||
```
|
||||
|
||||
## Check Vote Activity
|
||||
@ -19,13 +19,13 @@ $ solana-gossip --entrypoint testnet.solana.com:8001 spy
|
||||
The vote pubkey for the validator can be found by running:
|
||||
|
||||
```bash
|
||||
$ solana-keygen pubkey ~/validator-vote-keypair.json
|
||||
solana-keygen pubkey ~/validator-vote-keypair.json
|
||||
```
|
||||
|
||||
Provide the **vote pubkey** to the `solana show-vote-account` command to view the recent voting activity from your validator:
|
||||
|
||||
```bash
|
||||
$ solana show-vote-account 2ozWvfaXQd1X6uKh8jERoRGApDqSqcEy6fF1oN13LL2G
|
||||
solana show-vote-account 2ozWvfaXQd1X6uKh8jERoRGApDqSqcEy6fF1oN13LL2G
|
||||
```
|
||||
|
||||
## Check Your Balance
|
||||
@ -33,7 +33,7 @@ $ solana show-vote-account 2ozWvfaXQd1X6uKh8jERoRGApDqSqcEy6fF1oN13LL2G
|
||||
Your account balance should decrease by the transaction fee amount as your validator submits votes, and increase after serving as the leader. Pass the `--lamports` are to observe in finer detail:
|
||||
|
||||
```bash
|
||||
$ solana balance --lamports
|
||||
solana balance --lamports
|
||||
```
|
||||
|
||||
## Check Slot Number
|
||||
@ -41,13 +41,13 @@ $ solana balance --lamports
|
||||
After your validator boots, it may take some time to catch up with the cluster. Use the `get-slot` command to view the current slot that the cluster is processing:
|
||||
|
||||
```bash
|
||||
$ solana get-slot
|
||||
solana get-slot
|
||||
```
|
||||
|
||||
The current slot that your validator is processing can then been seen with:
|
||||
|
||||
```bash
|
||||
$ solana --url http://127.0.0.1:8899 get-slot
|
||||
solana --url http://127.0.0.1:8899 get-slot
|
||||
```
|
||||
|
||||
Until your validator has caught up, it will not be able to vote successfully and stake cannot be delegated to it.
|
||||
@ -60,11 +60,11 @@ There are several useful JSON-RPC endpoints for monitoring your validator on the
|
||||
|
||||
```bash
|
||||
# Similar to solana-gossip, you should see your validator in the list of cluster nodes
|
||||
$ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getClusterNodes"}' http://testnet.solana.com:8899
|
||||
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getClusterNodes"}' http://testnet.solana.com:8899
|
||||
# If your validator is properly voting, it should appear in the list of `current` vote accounts. If staked, `stake` should be > 0
|
||||
$ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getVoteAccounts"}' http://testnet.solana.com:8899
|
||||
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getVoteAccounts"}' http://testnet.solana.com:8899
|
||||
# Returns the current leader schedule
|
||||
$ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getLeaderSchedule"}' http://testnet.solana.com:8899
|
||||
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getLeaderSchedule"}' http://testnet.solana.com:8899
|
||||
# Returns info about the current epoch. slotIndex should progress on subsequent calls.
|
||||
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getEpochInfo"}' http://testnet.solana.com:8899
|
||||
```
|
||||
@ -76,9 +76,9 @@ Metrics are available for local monitoring of your validator.
|
||||
Docker must be installed and the current user added to the docker group. Then download `solana-metrics.tar.bz2` from the Github Release and run
|
||||
|
||||
```bash
|
||||
$ tar jxf solana-metrics.tar.bz2
|
||||
$ cd solana-metrics/
|
||||
$ ./start.sh
|
||||
tar jxf solana-metrics.tar.bz2
|
||||
cd solana-metrics/
|
||||
./start.sh
|
||||
```
|
||||
|
||||
A local InfluxDB and Grafana instance is now running on your machine. Define `SOLANA_METRICS_CONFIG` in your environment as described at the end of the `start.sh` output and restart your validator.
|
||||
@ -92,6 +92,5 @@ Log messages emitted by your validator include a timestamp. When sharing logs wi
|
||||
To make it easier to compare logs between different sources we request that everybody use Pacific Time on their validator nodes. In Linux this can be accomplished by running:
|
||||
|
||||
```bash
|
||||
$ sudo ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
|
||||
sudo ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
|
||||
```
|
||||
|
||||
|
@ -5,13 +5,13 @@
|
||||
The `solana-install` tool can be used to easily install and upgrade the validator software on Linux x86\_64 and mac OS systems.
|
||||
|
||||
```bash
|
||||
$ curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.18.0/install/solana-install-init.sh | sh -s
|
||||
curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.20.1/install/solana-install-init.sh | sh -s
|
||||
```
|
||||
|
||||
Alternatively build the `solana-install` program from source and run the following command to obtain the same result:
|
||||
|
||||
```bash
|
||||
$ solana-install init
|
||||
solana-install init
|
||||
```
|
||||
|
||||
After a successful install, `solana-install update` may be used to easily update the cluster software to a newer version at any time.
|
||||
@ -25,9 +25,9 @@ If you would rather not use `solana-install` to manage the install, you can manu
|
||||
Download the binaries by navigating to [https://github.com/solana-labs/solana/releases/latest](https://github.com/solana-labs/solana/releases/latest), download **solana-release-x86\_64-unknown-linux-gnu.tar.bz2**, then extract the archive:
|
||||
|
||||
```bash
|
||||
$ tar jxf solana-release-x86_64-unknown-linux-gnu.tar.bz2
|
||||
$ cd solana-release/
|
||||
$ export PATH=$PWD/bin:$PATH
|
||||
tar jxf solana-release-x86_64-unknown-linux-gnu.tar.bz2
|
||||
cd solana-release/
|
||||
export PATH=$PWD/bin:$PATH
|
||||
```
|
||||
|
||||
### mac OS
|
||||
@ -35,9 +35,9 @@ $ export PATH=$PWD/bin:$PATH
|
||||
Download the binaries by navigating to [https://github.com/solana-labs/solana/releases/latest](https://github.com/solana-labs/solana/releases/latest), download **solana-release-x86\_64-apple-darwin.tar.bz2**, then extract the archive:
|
||||
|
||||
```bash
|
||||
$ tar jxf solana-release-x86_64-apple-darwin.tar.bz2
|
||||
$ cd solana-release/
|
||||
$ export PATH=$PWD/bin:$PATH
|
||||
tar jxf solana-release-x86_64-apple-darwin.tar.bz2
|
||||
cd solana-release/
|
||||
export PATH=$PWD/bin:$PATH
|
||||
```
|
||||
|
||||
## Build From Source
|
||||
@ -45,7 +45,6 @@ $ export PATH=$PWD/bin:$PATH
|
||||
If you are unable to use the prebuilt binaries or prefer to build it yourself from source, navigate to [https://github.com/solana-labs/solana/releases/latest](https://github.com/solana-labs/solana/releases/latest), and download the **Source Code** archive. Extract the code and build the binaries with:
|
||||
|
||||
```bash
|
||||
$ ./scripts/cargo-install-all.sh .
|
||||
$ export PATH=$PWD/bin:$PATH
|
||||
./scripts/cargo-install-all.sh .
|
||||
export PATH=$PWD/bin:$PATH
|
||||
```
|
||||
|
||||
|
@ -7,14 +7,14 @@ Adding stake can be accomplished by using the `solana` CLI
|
||||
First create a stake account keypair with `solana-keygen`:
|
||||
|
||||
```bash
|
||||
$ solana-keygen new -o ~/validator-config/stake-keypair.json
|
||||
solana-keygen new -o ~/validator-stake-keypair.json
|
||||
```
|
||||
|
||||
and use the cli's `create-stake-account` and `delegate-stake` commands to stake your validator with 42 lamports:
|
||||
and use the cli's `create-stake-account` and `delegate-stake` commands to stake your validator with 4242 lamports:
|
||||
|
||||
```bash
|
||||
$ solana create-stake-account ~/validator-config/stake-keypair.json 42 lamports
|
||||
$ solana delegate-stake ~/validator-config/stake-keypair.json ~/validator-vote-keypair.json
|
||||
solana create-stake-account ~/validator-stake-keypair.json 4242 lamports
|
||||
solana delegate-stake ~/validator-stake-keypair.json ~/validator-vote-keypair.json
|
||||
```
|
||||
|
||||
Note that stakes need to warm up, and warmup increments are applied at Epoch boundaries, so it can take an hour or more for the change to fully take effect.
|
||||
@ -22,13 +22,13 @@ Note that stakes need to warm up, and warmup increments are applied at Epoch bou
|
||||
Stakes can be re-delegated to another node at any time with the same command:
|
||||
|
||||
```bash
|
||||
$ solana delegate-stake ~/validator-config/stake-keypair.json ~/some-other-validator-vote-keypair.json
|
||||
solana delegate-stake ~/validator-stake-keypair.json ~/some-other-validator-vote-keypair.json
|
||||
```
|
||||
|
||||
Assuming the node is voting, now you're up and running and generating validator rewards. You'll want to periodically redeem/claim your rewards:
|
||||
|
||||
```bash
|
||||
$ solana redeem-vote-credits ~/validator-config/stake-keypair.json ~/validator-vote-keypair.json
|
||||
solana redeem-vote-credits ~/validator-stake-keypair.json ~/validator-vote-keypair.json
|
||||
```
|
||||
|
||||
The rewards lamports earned are split between your stake account and the vote account according to the commission rate set in the vote account. Rewards can only be earned while the validator is up and running. Further, once staked, the validator becomes an important part of the network. In order to safely remove a validator from the network, first deactivate its stake.
|
||||
@ -36,7 +36,7 @@ The rewards lamports earned are split between your stake account and the vote ac
|
||||
Stake can be deactivated by running:
|
||||
|
||||
```bash
|
||||
$ solana deactivate-stake ~/validator-config/stake-keypair.json
|
||||
solana deactivate-stake ~/validator-stake-keypair.json
|
||||
```
|
||||
|
||||
The stake will cool down, deactivate over time. While cooling down, your stake will continue to earn rewards. Only after stake cooldown is it safe to turn off your validator or withdraw it from the network. Cooldown may take several epochs to complete, depending on active stake and the size of your stake.
|
||||
|
@ -7,7 +7,7 @@ Before attaching a validator node, sanity check that the cluster is accessible t
|
||||
Fetch the current transaction count over JSON RPC:
|
||||
|
||||
```bash
|
||||
$ curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1, "method":"getTransactionCount"}' http://testnet.solana.com:8899
|
||||
curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1, "method":"getTransactionCount"}' http://testnet.solana.com:8899
|
||||
```
|
||||
|
||||
Inspect the network explorer at [https://explorer.solana.com/](https://explorer.solana.com/) for activity.
|
||||
@ -19,16 +19,16 @@ View the [metrics dashboard](https://metrics.solana.com:3000/d/testnet-beta/test
|
||||
Sanity check that you are able to interact with the cluster by receiving a small airdrop of lamports from the testnet drone:
|
||||
|
||||
```bash
|
||||
$ solana set --url http://testnet.solana.com:8899
|
||||
$ solana get
|
||||
$ solana airdrop 123 lamports
|
||||
$ solana balance --lamports
|
||||
solana set --url http://testnet.solana.com:8899
|
||||
solana get
|
||||
solana airdrop 123 lamports
|
||||
solana balance --lamports
|
||||
```
|
||||
|
||||
Also try running following command to join the gossip network and view all the other nodes in the cluster:
|
||||
|
||||
```bash
|
||||
$ solana-gossip --entrypoint testnet.solana.com:8001 spy
|
||||
solana-gossip --entrypoint testnet.solana.com:8001 spy
|
||||
# Press ^C to exit
|
||||
```
|
||||
|
||||
@ -37,7 +37,7 @@ $ solana-gossip --entrypoint testnet.solana.com:8001 spy
|
||||
Create an identity keypair for your validator by running:
|
||||
|
||||
```bash
|
||||
$ solana-keygen new -o ~/validator-keypair.json
|
||||
solana-keygen new -o ~/validator-keypair.json
|
||||
```
|
||||
|
||||
### Wallet Configuration
|
||||
@ -45,30 +45,30 @@ $ solana-keygen new -o ~/validator-keypair.json
|
||||
You can set solana configuration to use your validator keypair for all following commands:
|
||||
|
||||
```bash
|
||||
$ solana set --keypair ~/validator-keypair.json
|
||||
solana set --keypair ~/validator-keypair.json
|
||||
```
|
||||
|
||||
**All following solana commands assume you have set `--keypair` config to** your validator identity keypair.\*\* If you haven't, you will need to add the `--keypair` argument to each command, like:
|
||||
|
||||
```bash
|
||||
$ solana --keypair ~/validator-keypair.json airdrop 1000 lamports
|
||||
solana --keypair ~/validator-keypair.json airdrop 10
|
||||
```
|
||||
|
||||
\(You can always override the set configuration by explicitly passing the `--keypair` argument with a command.\)
|
||||
|
||||
### Validator Start
|
||||
|
||||
Airdrop yourself some lamports to get started:
|
||||
Airdrop yourself some SOL to get started:
|
||||
|
||||
```bash
|
||||
$ solana airdrop 1000 lamports
|
||||
solana airdrop 10
|
||||
```
|
||||
|
||||
Your validator will need a vote account. Create it now with the following commands:
|
||||
|
||||
```bash
|
||||
$ solana-keygen new -o ~/validator-vote-keypair.json
|
||||
$ solana create-vote-account ~/validator-vote-keypair.json ~/validator-keypair.json 1 lamports
|
||||
solana-keygen new -o ~/validator-vote-keypair.json
|
||||
solana create-vote-account ~/validator-vote-keypair.json ~/validator-keypair.json
|
||||
```
|
||||
|
||||
Then use one of the following commands, depending on your installation choice, to start the node:
|
||||
@ -76,19 +76,19 @@ Then use one of the following commands, depending on your installation choice, t
|
||||
If this is a `solana-install`-installation:
|
||||
|
||||
```bash
|
||||
$ solana-validator --identity ~/validator-keypair.json --voting-keypair ~/validator-vote-keypair.json --ledger ~/validator-config --rpc-port 8899 --entrypoint testnet.solana.com:8001
|
||||
solana-validator --identity ~/validator-keypair.json --voting-keypair ~/validator-vote-keypair.json --ledger ~/validator-config --rpc-port 8899 --entrypoint testnet.solana.com:8001
|
||||
```
|
||||
|
||||
Alternatively, the `solana-install run` command can be used to run the validator node while periodically checking for and applying software updates:
|
||||
|
||||
```bash
|
||||
$ solana-install run solana-validator -- --identity ~/validator-keypair.json --voting-keypair ~/validator-vote-keypair.json --ledger ~/validator-config --rpc-port 8899 --entrypoint testnet.solana.com:8001
|
||||
solana-install run solana-validator -- --identity ~/validator-keypair.json --voting-keypair ~/validator-vote-keypair.json --ledger ~/validator-config --rpc-port 8899 --entrypoint testnet.solana.com:8001
|
||||
```
|
||||
|
||||
If you built from source:
|
||||
|
||||
```bash
|
||||
$ NDEBUG=1 USE_INSTALL=1 ./multinode-demo/validator.sh --identity ~/validator-keypair.json --voting-keypair ~/validator-vote-keypair.json --rpc-port 8899 --entrypoint testnet.solana.com:8001
|
||||
NDEBUG=1 USE_INSTALL=1 ./multinode-demo/validator.sh --identity ~/validator-keypair.json --voting-keypair ~/validator-vote-keypair.json --rpc-port 8899 --entrypoint testnet.solana.com:8001
|
||||
```
|
||||
|
||||
### Enabling CUDA
|
||||
@ -98,7 +98,7 @@ If your machine has a GPU with CUDA installed \(Linux-only currently\), include
|
||||
Or if you built from source, define the SOLANA\_CUDA flag in your environment _before_ running any of the previously mentioned commands
|
||||
|
||||
```bash
|
||||
$ export SOLANA_CUDA=1
|
||||
export SOLANA_CUDA=1
|
||||
```
|
||||
|
||||
When your validator is started look for the following log message to indicate that CUDA is enabled: `"[<timestamp> solana::validator] CUDA is enabled"`
|
||||
@ -110,4 +110,3 @@ By default the validator will dynamically select available network ports in the
|
||||
### Limiting ledger size to conserve disk space
|
||||
|
||||
By default the validator will retain the full ledger. To conserve disk space start the validator with the `--limit-ledger-size`, which will instruct the validator to only retain the last couple hours of ledger.
|
||||
|
||||
|
@ -15,8 +15,8 @@ Prior to mainnet, the testnets may be running different versions of solana softw
|
||||
You can submit a JSON-RPC request to see the specific version of the cluster.
|
||||
|
||||
```bash
|
||||
$ curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1, "method":"getVersion"}' edge.testnet.solana.com:8899
|
||||
{"jsonrpc":"2.0","result":{"solana-core":"0.18.0-pre1"},"id":1}
|
||||
curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1, "method":"getVersion"}' edge.testnet.solana.com:8899
|
||||
{"jsonrpc":"2.0","result":{"solana-core":"0.20.1"},"id":1}
|
||||
```
|
||||
|
||||
## Using a Different Testnet
|
||||
@ -28,17 +28,17 @@ This guide is written in the context of testnet.solana.com, our most stable clus
|
||||
If you are bootstrapping with `solana-install`, you can specify the release tag or named channel to install to match your desired testnet.
|
||||
|
||||
```bash
|
||||
$ curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.18.0/install/solana-install-init.sh | sh -s - 0.18.0
|
||||
curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.20.1/install/solana-install-init.sh | sh -s - 0.20.1
|
||||
```
|
||||
|
||||
```bash
|
||||
$ curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.18.0/install/solana-install-init.sh | sh -s - beta
|
||||
curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.20.1/install/solana-install-init.sh | sh -s - beta
|
||||
```
|
||||
|
||||
Similarly, you can add this argument to the `solana-install` command if you've built the program from source:
|
||||
|
||||
```bash
|
||||
$ solana-install init 0.18.0
|
||||
solana-install init 0.20.1
|
||||
```
|
||||
|
||||
If you are downloading pre-compiled binaries or building from source, simply choose the release matching your desired testnet.
|
||||
@ -48,14 +48,14 @@ If you are downloading pre-compiled binaries or building from source, simply cho
|
||||
The Solana CLI tool points at testnet.solana.com by default. Include a `--url` argument to point at a different testnet. For instance:
|
||||
|
||||
```bash
|
||||
$ solana --url http://beta.testnet.solana.com:8899 balance
|
||||
solana --url http://beta.testnet.solana.com:8899 balance
|
||||
```
|
||||
|
||||
The solana cli includes `get` and `set` configuration commands to automatically set the `--url` argument for future cli commands. For example:
|
||||
|
||||
```bash
|
||||
$ solana set --url http://beta.testnet.solana.com:8899
|
||||
$ solana balance # Same result as command above
|
||||
solana set --url http://beta.testnet.solana.com:8899
|
||||
solana balance # Same result as command above
|
||||
```
|
||||
|
||||
\(You can always override the set configuration by explicitly passing the `--url` argument with a command.\)
|
||||
@ -63,12 +63,11 @@ $ solana balance # Same result as command above
|
||||
Solana-gossip and solana-validator commands already require an explicit `--entrypoint` argument. Simply replace testnet.solana.com in the examples with an alternate url to interact with a different testnet. For example:
|
||||
|
||||
```bash
|
||||
$ solana-validator --identity ~/validator-keypair.json --voting-keypair ~/validator-vote-keypair.json --ledger ~/validator-config --rpc-port 8899 beta.testnet.solana.com
|
||||
solana-validator --identity ~/validator-keypair.json --voting-keypair ~/validator-vote-keypair.json --ledger ~/validator-config --rpc-port 8899 beta.testnet.solana.com
|
||||
```
|
||||
|
||||
You can also submit JSON-RPC requests to a different testnet, like:
|
||||
|
||||
```bash
|
||||
$ curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1, "method":"getTransactionCount"}' http://beta.testnet.solana.com:8899
|
||||
curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1, "method":"getTransactionCount"}' http://beta.testnet.solana.com:8899
|
||||
```
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-chacha-sys"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana chacha-sys"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
|
@ -288,11 +288,15 @@ if ! $skipCreate; then
|
||||
echo "--- $cloudProvider.sh create"
|
||||
create_args=(
|
||||
-p "$netName"
|
||||
-a "$bootstrapValidatorAddress"
|
||||
-c "$clientNodeCount"
|
||||
-n "$additionalValidatorCount"
|
||||
--dedicated
|
||||
)
|
||||
|
||||
if [[ -n $bootstrapValidatorAddress ]]; then
|
||||
create_args+=(-a "$bootstrapValidatorAddress")
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2206
|
||||
create_args+=(${zone_args[@]})
|
||||
|
||||
|
@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-cli"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
@ -26,23 +26,23 @@ serde = "1.0.101"
|
||||
serde_derive = "1.0.101"
|
||||
serde_json = "1.0.41"
|
||||
serde_yaml = "0.8.11"
|
||||
solana-budget-api = { path = "../programs/budget_api", version = "0.20.0" }
|
||||
solana-client = { path = "../client", version = "0.20.0" }
|
||||
solana-config-api = { path = "../programs/config_api", version = "0.20.0" }
|
||||
solana-drone = { path = "../drone", version = "0.20.0" }
|
||||
solana-logger = { path = "../logger", version = "0.20.0" }
|
||||
solana-netutil = { path = "../netutil", version = "0.20.0" }
|
||||
solana-runtime = { path = "../runtime", version = "0.20.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.0" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.20.0" }
|
||||
solana-storage-api = { path = "../programs/storage_api", version = "0.20.0" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.20.0" }
|
||||
solana-vote-signer = { path = "../vote-signer", version = "0.20.0" }
|
||||
solana-budget-api = { path = "../programs/budget_api", version = "0.20.1" }
|
||||
solana-client = { path = "../client", version = "0.20.1" }
|
||||
solana-config-api = { path = "../programs/config_api", version = "0.20.1" }
|
||||
solana-drone = { path = "../drone", version = "0.20.1" }
|
||||
solana-logger = { path = "../logger", version = "0.20.1" }
|
||||
solana-netutil = { path = "../netutil", version = "0.20.1" }
|
||||
solana-runtime = { path = "../runtime", version = "0.20.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.1" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.20.1" }
|
||||
solana-storage-api = { path = "../programs/storage_api", version = "0.20.1" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.20.1" }
|
||||
solana-vote-signer = { path = "../vote-signer", version = "0.20.1" }
|
||||
url = "2.1.0"
|
||||
|
||||
[dev-dependencies]
|
||||
solana-core = { path = "../core", version = "0.20.0" }
|
||||
solana-budget-program = { path = "../programs/budget_program", version = "0.20.0" }
|
||||
solana-core = { path = "../core", version = "0.20.1" }
|
||||
solana-budget-program = { path = "../programs/budget_program", version = "0.20.1" }
|
||||
|
||||
[[bin]]
|
||||
name = "solana"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-client"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana Client"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -19,10 +19,10 @@ reqwest = { version = "0.9.22", default-features = false, features = ["rustls-tl
|
||||
serde = "1.0.101"
|
||||
serde_derive = "1.0.101"
|
||||
serde_json = "1.0.41"
|
||||
solana-netutil = { path = "../netutil", version = "0.20.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.0" }
|
||||
solana-netutil = { path = "../netutil", version = "0.20.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.1" }
|
||||
|
||||
[dev-dependencies]
|
||||
jsonrpc-core = "14.0.3"
|
||||
jsonrpc-http-server = "14.0.1"
|
||||
solana-logger = { path = "../logger", version = "0.20.0" }
|
||||
solana-logger = { path = "../logger", version = "0.20.1" }
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "solana-core"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
documentation = "https://docs.rs/solana"
|
||||
homepage = "https://solana.com/"
|
||||
readme = "../README.md"
|
||||
@ -45,25 +45,25 @@ rayon = "1.2.0"
|
||||
serde = "1.0.101"
|
||||
serde_derive = "1.0.101"
|
||||
serde_json = "1.0.41"
|
||||
solana-budget-api = { path = "../programs/budget_api", version = "0.20.0" }
|
||||
solana-budget-program = { path = "../programs/budget_program", version = "0.20.0" }
|
||||
solana-chacha-sys = { path = "../chacha-sys", version = "0.20.0" }
|
||||
solana-client = { path = "../client", version = "0.20.0" }
|
||||
solana-drone = { path = "../drone", version = "0.20.0" }
|
||||
solana-budget-api = { path = "../programs/budget_api", version = "0.20.1" }
|
||||
solana-budget-program = { path = "../programs/budget_program", version = "0.20.1" }
|
||||
solana-chacha-sys = { path = "../chacha-sys", version = "0.20.1" }
|
||||
solana-client = { path = "../client", version = "0.20.1" }
|
||||
solana-drone = { path = "../drone", version = "0.20.1" }
|
||||
solana-ed25519-dalek = "0.2.0"
|
||||
solana-ledger = { path = "../ledger", version = "0.20.0" }
|
||||
solana-logger = { path = "../logger", version = "0.20.0" }
|
||||
solana-merkle-tree = { path = "../merkle-tree", version = "0.20.0" }
|
||||
solana-metrics = { path = "../metrics", version = "0.20.0" }
|
||||
solana-measure = { path = "../measure", version = "0.20.0" }
|
||||
solana-netutil = { path = "../netutil", version = "0.20.0" }
|
||||
solana-runtime = { path = "../runtime", version = "0.20.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.0" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.20.0" }
|
||||
solana-storage-api = { path = "../programs/storage_api", version = "0.20.0" }
|
||||
solana-storage-program = { path = "../programs/storage_program", version = "0.20.0" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.20.0" }
|
||||
solana-vote-signer = { path = "../vote-signer", version = "0.20.0" }
|
||||
solana-ledger = { path = "../ledger", version = "0.20.1" }
|
||||
solana-logger = { path = "../logger", version = "0.20.1" }
|
||||
solana-merkle-tree = { path = "../merkle-tree", version = "0.20.1" }
|
||||
solana-metrics = { path = "../metrics", version = "0.20.1" }
|
||||
solana-measure = { path = "../measure", version = "0.20.1" }
|
||||
solana-netutil = { path = "../netutil", version = "0.20.1" }
|
||||
solana-runtime = { path = "../runtime", version = "0.20.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.1" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.20.1" }
|
||||
solana-storage-api = { path = "../programs/storage_api", version = "0.20.1" }
|
||||
solana-storage-program = { path = "../programs/storage_program", version = "0.20.1" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.20.1" }
|
||||
solana-vote-signer = { path = "../vote-signer", version = "0.20.1" }
|
||||
symlink = "0.1.0"
|
||||
sys-info = "0.5.8"
|
||||
tempfile = "3.1.0"
|
||||
@ -72,7 +72,7 @@ tokio-codec = "0.1"
|
||||
tokio-fs = "0.1"
|
||||
tokio-io = "0.1"
|
||||
untrusted = "0.7.0"
|
||||
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "0.20.0" }
|
||||
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "0.20.1" }
|
||||
reed-solomon-erasure = { package = "solana-reed-solomon-erasure", version = "4.0.1-3", features = ["simd-accel"] }
|
||||
|
||||
[dev-dependencies]
|
||||
|
@ -9,25 +9,26 @@ use std::ops::Div;
|
||||
|
||||
/// Returns a list of indexes shuffled based on the input weights
|
||||
/// Note - The sum of all weights must not exceed `u64::MAX`
|
||||
pub fn weighted_shuffle<T>(weights: Vec<T>, rng: ChaChaRng) -> Vec<usize>
|
||||
pub fn weighted_shuffle<T>(weights: Vec<T>, mut rng: ChaChaRng) -> Vec<usize>
|
||||
where
|
||||
T: Copy + PartialOrd + iter::Sum + Div<T, Output = T> + FromPrimitive + ToPrimitive,
|
||||
{
|
||||
let mut rng = rng;
|
||||
let total_weight: T = weights.clone().into_iter().sum();
|
||||
weights
|
||||
.into_iter()
|
||||
.enumerate()
|
||||
.map(|(i, v)| {
|
||||
// This generates an "inverse" weight but it avoids floating point math
|
||||
let x = (total_weight / v)
|
||||
.to_u64()
|
||||
.expect("values > u64::max are not supported");
|
||||
(
|
||||
i,
|
||||
// capture the u64 into u128s to prevent overflow
|
||||
(&mut rng).gen_range(1, u128::from(std::u16::MAX)) * u128::from(x),
|
||||
rng.gen_range(1, u128::from(std::u16::MAX)) * u128::from(x),
|
||||
)
|
||||
})
|
||||
// sort in ascending order
|
||||
.sorted_by(|(_, l_val), (_, r_val)| l_val.cmp(r_val))
|
||||
.map(|x| x.0)
|
||||
.collect()
|
||||
@ -35,22 +36,23 @@ where
|
||||
|
||||
/// Returns the highest index after computing a weighted shuffle.
|
||||
/// Saves doing any sorting for O(n) max calculation.
|
||||
pub fn weighted_best(weights_and_indicies: &[(u64, usize)], rng: ChaChaRng) -> usize {
|
||||
let mut rng = rng;
|
||||
if weights_and_indicies.is_empty() {
|
||||
pub fn weighted_best(weights_and_indexes: &[(u64, usize)], mut rng: ChaChaRng) -> usize {
|
||||
if weights_and_indexes.is_empty() {
|
||||
return 0;
|
||||
}
|
||||
let total_weight: u64 = weights_and_indicies.iter().map(|x| x.0).sum();
|
||||
let mut best_weight = 0;
|
||||
let total_weight: u64 = weights_and_indexes.iter().map(|x| x.0).sum();
|
||||
let mut lowest_weight = std::u128::MAX;
|
||||
let mut best_index = 0;
|
||||
for v in weights_and_indicies {
|
||||
for v in weights_and_indexes {
|
||||
// This generates an "inverse" weight but it avoids floating point math
|
||||
let x = (total_weight / v.0)
|
||||
.to_u64()
|
||||
.expect("values > u64::max are not supported");
|
||||
// capture the u64 into u128s to prevent overflow
|
||||
let weight = (&mut rng).gen_range(1, u128::from(std::u16::MAX)) * u128::from(x);
|
||||
if weight > best_weight {
|
||||
best_weight = weight;
|
||||
let computed_weight = rng.gen_range(1, u128::from(std::u16::MAX)) * u128::from(x);
|
||||
// The highest input weight maps to the lowest computed weight
|
||||
if computed_weight < lowest_weight {
|
||||
lowest_weight = computed_weight;
|
||||
best_index = v.1;
|
||||
}
|
||||
}
|
||||
@ -120,9 +122,12 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_weighted_best() {
|
||||
let mut weights = vec![(std::u32::MAX as u64, 0); 3];
|
||||
weights.push((1, 5));
|
||||
let best = weighted_best(&weights, ChaChaRng::from_seed([0x5b; 32]));
|
||||
assert_eq!(best, 5);
|
||||
let weights_and_indexes: Vec<_> = vec![100u64, 1000, 10_000, 10]
|
||||
.into_iter()
|
||||
.enumerate()
|
||||
.map(|(i, weight)| (weight, i))
|
||||
.collect();
|
||||
let best_index = weighted_best(&weights_and_indexes, ChaChaRng::from_seed([0x5b; 32]));
|
||||
assert_eq!(best_index, 2);
|
||||
}
|
||||
}
|
||||
|
@ -85,6 +85,7 @@ where
|
||||
total_packets += more_packets.packets.len();
|
||||
packets.push(more_packets)
|
||||
}
|
||||
|
||||
let now = Instant::now();
|
||||
inc_new_counter_debug!("streamer-recv_window-recv", total_packets);
|
||||
|
||||
@ -127,7 +128,8 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
blocktree.insert_shreds(shreds, Some(leader_schedule_cache))?;
|
||||
let blocktree_insert_metrics = blocktree.insert_shreds(shreds, Some(leader_schedule_cache))?;
|
||||
blocktree_insert_metrics.report_metrics("recv-window-insert-shreds");
|
||||
|
||||
trace!(
|
||||
"Elapsed processing time in recv_window(): {}",
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-crate-features"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana Crate Features"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-drone"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana Drone"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -19,9 +19,9 @@ clap = "2.33"
|
||||
log = "0.4.8"
|
||||
serde = "1.0.101"
|
||||
serde_derive = "1.0.101"
|
||||
solana-logger = { path = "../logger", version = "0.20.0" }
|
||||
solana-metrics = { path = "../metrics", version = "0.20.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.0" }
|
||||
solana-logger = { path = "../logger", version = "0.20.1" }
|
||||
solana-metrics = { path = "../metrics", version = "0.20.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.1" }
|
||||
tokio = "0.1"
|
||||
tokio-codec = "0.1"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-fixed-buf"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "A fixed-size byte array that supports bincode serde"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
|
@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-genesis"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
@ -15,10 +15,10 @@ serde = "1.0.101"
|
||||
serde_derive = "1.0.101"
|
||||
serde_json = "1.0.41"
|
||||
serde_yaml = "0.8.11"
|
||||
solana-genesis-programs = { path = "../genesis_programs", version = "0.20.0" }
|
||||
solana-ledger = { path = "../ledger", version = "0.20.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.0" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.20.0" }
|
||||
solana-storage-api = { path = "../programs/storage_api", version = "0.20.0" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.20.0" }
|
||||
solana-genesis-programs = { path = "../genesis_programs", version = "0.20.1" }
|
||||
solana-ledger = { path = "../ledger", version = "0.20.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.1" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.20.1" }
|
||||
solana-storage-api = { path = "../programs/storage_api", version = "0.20.1" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.20.1" }
|
||||
tempfile = "3.1.0"
|
||||
|
@ -310,16 +310,16 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
let bootstrap_storage_keypair = read_keypair_file(bootstrap_storage_keypair_file)?;
|
||||
let mint_keypair = read_keypair_file(mint_keypair_file)?;
|
||||
|
||||
let vote_account = vote_state::create_account(
|
||||
let bootstrap_leader_vote_account = vote_state::create_account(
|
||||
&bootstrap_vote_keypair.pubkey(),
|
||||
&bootstrap_leader_keypair.pubkey(),
|
||||
0,
|
||||
1,
|
||||
);
|
||||
let stake_account = stake_state::create_account(
|
||||
&bootstrap_stake_keypair.pubkey(),
|
||||
let bootstrap_leader_stake_account = stake_state::create_account(
|
||||
&bootstrap_leader_keypair.pubkey(),
|
||||
&bootstrap_vote_keypair.pubkey(),
|
||||
&vote_account,
|
||||
&bootstrap_leader_vote_account,
|
||||
bootstrap_leader_stake_lamports,
|
||||
);
|
||||
|
||||
@ -335,9 +335,15 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
Account::new(bootstrap_leader_lamports, 0, &system_program::id()),
|
||||
),
|
||||
// where votes go to
|
||||
(bootstrap_vote_keypair.pubkey(), vote_account),
|
||||
(
|
||||
bootstrap_vote_keypair.pubkey(),
|
||||
bootstrap_leader_vote_account,
|
||||
),
|
||||
// passive bootstrap leader stake
|
||||
(bootstrap_stake_keypair.pubkey(), stake_account),
|
||||
(
|
||||
bootstrap_stake_keypair.pubkey(),
|
||||
bootstrap_leader_stake_account,
|
||||
),
|
||||
(
|
||||
bootstrap_storage_keypair.pubkey(),
|
||||
storage_contract::create_validator_storage_account(
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-genesis-programs"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana genesis programs"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,26 +10,26 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = { version = "0.4.8" }
|
||||
solana-bpf-loader-api = { path = "../programs/bpf_loader_api", version = "0.20.0" }
|
||||
solana-bpf-loader-program = { path = "../programs/bpf_loader_program", version = "0.20.0" }
|
||||
solana-budget-api = { path = "../programs/budget_api", version = "0.20.0" }
|
||||
solana-budget-program = { path = "../programs/budget_program", version = "0.20.0" }
|
||||
solana-config-api = { path = "../programs/config_api", version = "0.20.0" }
|
||||
solana-config-program = { path = "../programs/config_program", version = "0.20.0" }
|
||||
solana-exchange-api = { path = "../programs/exchange_api", version = "0.20.0" }
|
||||
solana-exchange-program = { path = "../programs/exchange_program", version = "0.20.0" }
|
||||
solana-move-loader-program = { path = "../programs/move_loader_program", version = "0.20.0", optional = true }
|
||||
solana-move-loader-api = { path = "../programs/move_loader_api", version = "0.20.0", optional = true }
|
||||
solana-runtime = { path = "../runtime", version = "0.20.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.0" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.20.0" }
|
||||
solana-stake-program = { path = "../programs/stake_program", version = "0.20.0" }
|
||||
solana-storage-api = { path = "../programs/storage_api", version = "0.20.0" }
|
||||
solana-storage-program = { path = "../programs/storage_program", version = "0.20.0" }
|
||||
solana-vest-api = { path = "../programs/vest_api", version = "0.20.0" }
|
||||
solana-vest-program = { path = "../programs/vest_program", version = "0.20.0" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.20.0" }
|
||||
solana-vote-program = { path = "../programs/vote_program", version = "0.20.0" }
|
||||
solana-bpf-loader-api = { path = "../programs/bpf_loader_api", version = "0.20.1" }
|
||||
solana-bpf-loader-program = { path = "../programs/bpf_loader_program", version = "0.20.1" }
|
||||
solana-budget-api = { path = "../programs/budget_api", version = "0.20.1" }
|
||||
solana-budget-program = { path = "../programs/budget_program", version = "0.20.1" }
|
||||
solana-config-api = { path = "../programs/config_api", version = "0.20.1" }
|
||||
solana-config-program = { path = "../programs/config_program", version = "0.20.1" }
|
||||
solana-exchange-api = { path = "../programs/exchange_api", version = "0.20.1" }
|
||||
solana-exchange-program = { path = "../programs/exchange_program", version = "0.20.1" }
|
||||
solana-move-loader-program = { path = "../programs/move_loader_program", version = "0.20.1", optional = true }
|
||||
solana-move-loader-api = { path = "../programs/move_loader_api", version = "0.20.1", optional = true }
|
||||
solana-runtime = { path = "../runtime", version = "0.20.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.1" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.20.1" }
|
||||
solana-stake-program = { path = "../programs/stake_program", version = "0.20.1" }
|
||||
solana-storage-api = { path = "../programs/storage_api", version = "0.20.1" }
|
||||
solana-storage-program = { path = "../programs/storage_program", version = "0.20.1" }
|
||||
solana-vest-api = { path = "../programs/vest_api", version = "0.20.1" }
|
||||
solana-vest-program = { path = "../programs/vest_program", version = "0.20.1" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.20.1" }
|
||||
solana-vote-program = { path = "../programs/vote_program", version = "0.20.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib"]
|
||||
|
@ -3,18 +3,18 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-gossip"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
|
||||
[dependencies]
|
||||
clap = "2.33.0"
|
||||
solana-core = { path = "../core", version = "0.20.0" }
|
||||
solana-client = { path = "../client", version = "0.20.0" }
|
||||
solana-logger = { path = "../logger", version = "0.20.0" }
|
||||
solana-netutil = { path = "../netutil", version = "0.20.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.0" }
|
||||
solana-core = { path = "../core", version = "0.20.1" }
|
||||
solana-client = { path = "../client", version = "0.20.1" }
|
||||
solana-logger = { path = "../logger", version = "0.20.1" }
|
||||
solana-netutil = { path = "../netutil", version = "0.20.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.1" }
|
||||
|
||||
|
||||
|
||||
|
@ -3,11 +3,10 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-install"
|
||||
description = "The solana cluster software installer"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
default-run = "solana-install"
|
||||
|
||||
[dependencies]
|
||||
atty = "0.2.11"
|
||||
@ -29,10 +28,10 @@ serde = "1.0.101"
|
||||
serde_derive = "1.0.101"
|
||||
serde_yaml = "0.8.11"
|
||||
sha2 = "0.8.0"
|
||||
solana-client = { path = "../client", version = "0.20.0" }
|
||||
solana-config-api = { path = "../programs/config_api", version = "0.20.0" }
|
||||
solana-logger = { path = "../logger", version = "0.20.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.0" }
|
||||
solana-client = { path = "../client", version = "0.20.1" }
|
||||
solana-config-api = { path = "../programs/config_api", version = "0.20.1" }
|
||||
solana-logger = { path = "../logger", version = "0.20.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.1" }
|
||||
tar = "0.4.26"
|
||||
tempdir = "0.3.7"
|
||||
url = "2.1.0"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-keygen"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana key generation utility"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -15,7 +15,7 @@ edition = "2018"
|
||||
clap = "2.33"
|
||||
dirs = "2.0.2"
|
||||
rpassword = "4.0"
|
||||
solana-sdk = { path = "../sdk", version = "0.20.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.1" }
|
||||
tiny-bip39 = "0.6.2"
|
||||
|
||||
[[bin]]
|
||||
|
@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-ledger-tool"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
@ -15,10 +15,10 @@ serde = "1.0.101"
|
||||
serde_derive = "1.0.101"
|
||||
serde_json = "1.0.41"
|
||||
serde_yaml = "0.8.11"
|
||||
solana-ledger = { path = "../ledger", version = "0.20.0" }
|
||||
solana-logger = { path = "../logger", version = "0.20.0" }
|
||||
solana-runtime = { path = "../runtime", version = "0.20.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.0" }
|
||||
solana-ledger = { path = "../ledger", version = "0.20.1" }
|
||||
solana-logger = { path = "../logger", version = "0.20.1" }
|
||||
solana-runtime = { path = "../runtime", version = "0.20.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.1" }
|
||||
|
||||
[dev-dependencies]
|
||||
assert_cmd = "0.11"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-ledger"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana ledger"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -26,16 +26,16 @@ rayon = "1.2.0"
|
||||
reed-solomon-erasure = { package = "solana-reed-solomon-erasure", version = "4.0.1-3", features = ["simd-accel"] }
|
||||
serde = "1.0.101"
|
||||
serde_derive = "1.0.101"
|
||||
solana-genesis-programs = { path = "../genesis_programs", version = "0.20.0" }
|
||||
solana-logger = { path = "../logger", version = "0.20.0" }
|
||||
solana-measure = { path = "../measure", version = "0.20.0" }
|
||||
solana-merkle-tree = { path = "../merkle-tree", version = "0.20.0" }
|
||||
solana-metrics = { path = "../metrics", version = "0.20.0" }
|
||||
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "0.20.0" }
|
||||
solana-runtime = { path = "../runtime", version = "0.20.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.0" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.20.0" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.20.0" }
|
||||
solana-genesis-programs = { path = "../genesis_programs", version = "0.20.1" }
|
||||
solana-logger = { path = "../logger", version = "0.20.1" }
|
||||
solana-measure = { path = "../measure", version = "0.20.1" }
|
||||
solana-merkle-tree = { path = "../merkle-tree", version = "0.20.1" }
|
||||
solana-metrics = { path = "../metrics", version = "0.20.1" }
|
||||
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "0.20.1" }
|
||||
solana-runtime = { path = "../runtime", version = "0.20.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.1" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.20.1" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.20.1" }
|
||||
sys-info = "0.5.8"
|
||||
tar = "0.4.26"
|
||||
tempfile = "3.1.0"
|
||||
@ -49,7 +49,7 @@ features = ["lz4"]
|
||||
|
||||
[dev-dependencies]
|
||||
matches = "0.1.6"
|
||||
solana-budget-api = { path = "../programs/budget_api", version = "0.20.0" }
|
||||
solana-budget-api = { path = "../programs/budget_api", version = "0.20.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib"]
|
||||
|
@ -17,6 +17,7 @@ use rayon::iter::IntoParallelRefIterator;
|
||||
use rayon::iter::ParallelIterator;
|
||||
use rayon::ThreadPool;
|
||||
use rocksdb::DBRawIterator;
|
||||
use solana_measure::measure::Measure;
|
||||
use solana_metrics::{datapoint_debug, datapoint_error};
|
||||
use solana_rayon_threadlimit::get_thread_count;
|
||||
use solana_sdk::clock::Slot;
|
||||
@ -30,7 +31,7 @@ use std::fs;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::rc::Rc;
|
||||
use std::sync::mpsc::{sync_channel, Receiver, SyncSender, TrySendError};
|
||||
use std::sync::{Arc, RwLock};
|
||||
use std::sync::{Arc, Mutex, RwLock};
|
||||
|
||||
pub const BLOCKTREE_DIRECTORY: &str = "rocksdb";
|
||||
|
||||
@ -55,10 +56,54 @@ pub struct Blocktree {
|
||||
data_shred_cf: LedgerColumn<cf::ShredData>,
|
||||
code_shred_cf: LedgerColumn<cf::ShredCode>,
|
||||
last_root: Arc<RwLock<u64>>,
|
||||
insert_shreds_lock: Arc<Mutex<()>>,
|
||||
pub new_shreds_signals: Vec<SyncSender<bool>>,
|
||||
pub completed_slots_senders: Vec<SyncSender<Vec<u64>>>,
|
||||
}
|
||||
|
||||
pub struct BlocktreeInsertionMetrics {
|
||||
pub num_shreds: usize,
|
||||
pub insert_lock_elapsed: u64,
|
||||
pub insert_shreds_elapsed: u64,
|
||||
pub shred_recovery_elapsed: u64,
|
||||
pub chaining_elapsed: u64,
|
||||
pub commit_working_sets_elapsed: u64,
|
||||
pub write_batch_elapsed: u64,
|
||||
pub total_elapsed: u64,
|
||||
pub num_inserted: u64,
|
||||
pub num_recovered: usize,
|
||||
}
|
||||
|
||||
impl BlocktreeInsertionMetrics {
|
||||
pub fn report_metrics(&self, metric_name: &'static str) {
|
||||
datapoint_debug!(
|
||||
metric_name,
|
||||
("num_shreds", self.num_shreds as i64, i64),
|
||||
("total_elapsed", self.total_elapsed as i64, i64),
|
||||
("insert_lock_elapsed", self.insert_lock_elapsed as i64, i64),
|
||||
(
|
||||
"insert_shreds_elapsed",
|
||||
self.insert_shreds_elapsed as i64,
|
||||
i64
|
||||
),
|
||||
(
|
||||
"shred_recovery_elapsed",
|
||||
self.shred_recovery_elapsed as i64,
|
||||
i64
|
||||
),
|
||||
("chaining_elapsed", self.chaining_elapsed as i64, i64),
|
||||
(
|
||||
"commit_working_sets_elapsed",
|
||||
self.commit_working_sets_elapsed as i64,
|
||||
i64
|
||||
),
|
||||
("write_batch_elapsed", self.write_batch_elapsed as i64, i64),
|
||||
("num_inserted", self.num_inserted as i64, i64),
|
||||
("num_recovered", self.num_recovered as i64, i64),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
impl Blocktree {
|
||||
/// Opens a Ledger in directory, provides "infinite" window of shreds
|
||||
pub fn open(ledger_path: &Path) -> Result<Blocktree> {
|
||||
@ -106,6 +151,7 @@ impl Blocktree {
|
||||
code_shred_cf,
|
||||
new_shreds_signals: vec![],
|
||||
completed_slots_senders: vec![],
|
||||
insert_shreds_lock: Arc::new(Mutex::new(())),
|
||||
last_root,
|
||||
})
|
||||
}
|
||||
@ -358,7 +404,13 @@ impl Blocktree {
|
||||
&self,
|
||||
shreds: Vec<Shred>,
|
||||
leader_schedule: Option<&Arc<LeaderScheduleCache>>,
|
||||
) -> Result<()> {
|
||||
) -> Result<BlocktreeInsertionMetrics> {
|
||||
let mut total_start = Measure::start("Total elapsed");
|
||||
let mut start = Measure::start("Blocktree lock");
|
||||
let _lock = self.insert_shreds_lock.lock().unwrap();
|
||||
start.stop();
|
||||
let insert_lock_elapsed = start.as_us();
|
||||
|
||||
let db = &*self.db;
|
||||
let mut write_batch = db.batch()?;
|
||||
|
||||
@ -368,26 +420,40 @@ impl Blocktree {
|
||||
let mut slot_meta_working_set = HashMap::new();
|
||||
let mut index_working_set = HashMap::new();
|
||||
|
||||
let num_shreds = shreds.len();
|
||||
let mut start = Measure::start("Shred insertion");
|
||||
let mut num_inserted = 0;
|
||||
shreds.into_iter().for_each(|shred| {
|
||||
if shred.is_data() {
|
||||
self.check_insert_data_shred(
|
||||
shred,
|
||||
&mut index_working_set,
|
||||
&mut slot_meta_working_set,
|
||||
&mut write_batch,
|
||||
&mut just_inserted_data_shreds,
|
||||
);
|
||||
} else if shred.is_code() {
|
||||
self.check_insert_coding_shred(
|
||||
shred,
|
||||
&mut erasure_metas,
|
||||
&mut index_working_set,
|
||||
&mut write_batch,
|
||||
&mut just_inserted_coding_shreds,
|
||||
);
|
||||
let insert_success = {
|
||||
if shred.is_data() {
|
||||
self.check_insert_data_shred(
|
||||
shred,
|
||||
&mut index_working_set,
|
||||
&mut slot_meta_working_set,
|
||||
&mut write_batch,
|
||||
&mut just_inserted_data_shreds,
|
||||
)
|
||||
} else if shred.is_code() {
|
||||
self.check_insert_coding_shred(
|
||||
shred,
|
||||
&mut erasure_metas,
|
||||
&mut index_working_set,
|
||||
&mut write_batch,
|
||||
&mut just_inserted_coding_shreds,
|
||||
)
|
||||
} else {
|
||||
panic!("There should be no other case");
|
||||
}
|
||||
};
|
||||
if insert_success {
|
||||
num_inserted += 1;
|
||||
}
|
||||
});
|
||||
start.stop();
|
||||
let insert_shreds_elapsed = start.as_us();
|
||||
|
||||
let mut start = Measure::start("Shred recovery");
|
||||
let mut num_recovered = 0;
|
||||
if let Some(leader_schedule_cache) = leader_schedule {
|
||||
let recovered_data = Self::try_shred_recovery(
|
||||
&db,
|
||||
@ -397,6 +463,7 @@ impl Blocktree {
|
||||
&mut just_inserted_coding_shreds,
|
||||
);
|
||||
|
||||
num_recovered = recovered_data.len();
|
||||
recovered_data.into_iter().for_each(|shred| {
|
||||
if let Some(leader) = leader_schedule_cache.slot_leader_at(shred.slot(), None) {
|
||||
if shred.verify(&leader) {
|
||||
@ -406,15 +473,21 @@ impl Blocktree {
|
||||
&mut slot_meta_working_set,
|
||||
&mut write_batch,
|
||||
&mut just_inserted_coding_shreds,
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
start.stop();
|
||||
let shred_recovery_elapsed = start.as_us();
|
||||
|
||||
let mut start = Measure::start("Shred recovery");
|
||||
// Handle chaining for the working set
|
||||
handle_chaining(&self.db, &mut write_batch, &slot_meta_working_set)?;
|
||||
start.stop();
|
||||
let chaining_elapsed = start.as_us();
|
||||
|
||||
let mut start = Measure::start("Commit Worknig Sets");
|
||||
let (should_signal, newly_completed_slots) = commit_slot_meta_working_set(
|
||||
&slot_meta_working_set,
|
||||
&self.completed_slots_senders,
|
||||
@ -428,8 +501,13 @@ impl Blocktree {
|
||||
for (&slot, index) in index_working_set.iter() {
|
||||
write_batch.put::<cf::Index>(slot, index)?;
|
||||
}
|
||||
start.stop();
|
||||
let commit_working_sets_elapsed = start.as_us();
|
||||
|
||||
let mut start = Measure::start("Write Batch");
|
||||
self.db.write(write_batch)?;
|
||||
start.stop();
|
||||
let write_batch_elapsed = start.as_us();
|
||||
|
||||
if should_signal {
|
||||
for signal in &self.new_shreds_signals {
|
||||
@ -444,7 +522,20 @@ impl Blocktree {
|
||||
newly_completed_slots,
|
||||
)?;
|
||||
|
||||
Ok(())
|
||||
total_start.stop();
|
||||
|
||||
Ok(BlocktreeInsertionMetrics {
|
||||
num_shreds,
|
||||
total_elapsed: total_start.as_us(),
|
||||
insert_lock_elapsed,
|
||||
insert_shreds_elapsed,
|
||||
shred_recovery_elapsed,
|
||||
chaining_elapsed,
|
||||
commit_working_sets_elapsed,
|
||||
write_batch_elapsed,
|
||||
num_inserted,
|
||||
num_recovered,
|
||||
})
|
||||
}
|
||||
|
||||
fn check_insert_coding_shred(
|
||||
@ -454,7 +545,7 @@ impl Blocktree {
|
||||
index_working_set: &mut HashMap<u64, Index>,
|
||||
write_batch: &mut WriteBatch,
|
||||
just_inserted_coding_shreds: &mut HashMap<(u64, u64), Shred>,
|
||||
) {
|
||||
) -> bool {
|
||||
let slot = shred.slot();
|
||||
let shred_index = u64::from(shred.index());
|
||||
|
||||
@ -465,13 +556,16 @@ impl Blocktree {
|
||||
// This gives the index of first coding shred in this FEC block
|
||||
// So, all coding shreds in a given FEC block will have the same set index
|
||||
if Blocktree::should_insert_coding_shred(&shred, index_meta.coding(), &self.last_root) {
|
||||
if let Ok(()) = self.insert_coding_shred(erasure_metas, index_meta, &shred, write_batch)
|
||||
{
|
||||
just_inserted_coding_shreds
|
||||
.entry((slot, shred_index))
|
||||
.or_insert_with(|| shred);
|
||||
new_index_meta.map(|n| index_working_set.insert(slot, n));
|
||||
}
|
||||
self.insert_coding_shred(erasure_metas, index_meta, &shred, write_batch)
|
||||
.map(|_| {
|
||||
just_inserted_coding_shreds
|
||||
.entry((slot, shred_index))
|
||||
.or_insert_with(|| shred);
|
||||
new_index_meta.map(|n| index_working_set.insert(slot, n))
|
||||
})
|
||||
.is_ok()
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
@ -482,7 +576,7 @@ impl Blocktree {
|
||||
slot_meta_working_set: &mut HashMap<u64, SlotMetaWorkingSetEntry>,
|
||||
write_batch: &mut WriteBatch,
|
||||
just_inserted_data_shreds: &mut HashMap<(u64, u64), Shred>,
|
||||
) {
|
||||
) -> bool {
|
||||
let slot = shred.slot();
|
||||
let shred_index = u64::from(shred.index());
|
||||
let (index_meta, mut new_index_meta) =
|
||||
@ -521,6 +615,8 @@ impl Blocktree {
|
||||
if insert_success {
|
||||
new_slot_meta_entry.map(|n| slot_meta_working_set.insert(slot, n));
|
||||
}
|
||||
|
||||
insert_success
|
||||
}
|
||||
|
||||
fn should_insert_coding_shred(
|
||||
|
@ -19,7 +19,6 @@ use std::sync::Arc;
|
||||
// A good value for this is the number of cores on the machine
|
||||
const TOTAL_THREADS: i32 = 8;
|
||||
const MAX_WRITE_BUFFER_SIZE: u64 = 256 * 1024 * 1024; // 256MB
|
||||
const MIN_WRITE_BUFFER_SIZE: u64 = 64 * 1024; // 64KB
|
||||
|
||||
// Column family for metadata about a leader slot
|
||||
const META_CF: &str = "meta";
|
||||
@ -129,22 +128,18 @@ impl Rocks {
|
||||
let db_options = get_db_options();
|
||||
|
||||
// Column family names
|
||||
let meta_cf_descriptor =
|
||||
ColumnFamilyDescriptor::new(SlotMeta::NAME, get_cf_options(SlotMeta::NAME));
|
||||
let meta_cf_descriptor = ColumnFamilyDescriptor::new(SlotMeta::NAME, get_cf_options());
|
||||
let dead_slots_cf_descriptor =
|
||||
ColumnFamilyDescriptor::new(DeadSlots::NAME, get_cf_options(DeadSlots::NAME));
|
||||
ColumnFamilyDescriptor::new(DeadSlots::NAME, get_cf_options());
|
||||
let erasure_meta_cf_descriptor =
|
||||
ColumnFamilyDescriptor::new(ErasureMeta::NAME, get_cf_options(ErasureMeta::NAME));
|
||||
let orphans_cf_descriptor =
|
||||
ColumnFamilyDescriptor::new(Orphans::NAME, get_cf_options(Orphans::NAME));
|
||||
let root_cf_descriptor =
|
||||
ColumnFamilyDescriptor::new(Root::NAME, get_cf_options(Root::NAME));
|
||||
let index_cf_descriptor =
|
||||
ColumnFamilyDescriptor::new(Index::NAME, get_cf_options(Index::NAME));
|
||||
ColumnFamilyDescriptor::new(ErasureMeta::NAME, get_cf_options());
|
||||
let orphans_cf_descriptor = ColumnFamilyDescriptor::new(Orphans::NAME, get_cf_options());
|
||||
let root_cf_descriptor = ColumnFamilyDescriptor::new(Root::NAME, get_cf_options());
|
||||
let index_cf_descriptor = ColumnFamilyDescriptor::new(Index::NAME, get_cf_options());
|
||||
let shred_data_cf_descriptor =
|
||||
ColumnFamilyDescriptor::new(ShredData::NAME, get_cf_options(ShredData::NAME));
|
||||
ColumnFamilyDescriptor::new(ShredData::NAME, get_cf_options());
|
||||
let shred_code_cf_descriptor =
|
||||
ColumnFamilyDescriptor::new(ShredCode::NAME, get_cf_options(ShredCode::NAME));
|
||||
ColumnFamilyDescriptor::new(ShredCode::NAME, get_cf_options());
|
||||
|
||||
let cfs = vec![
|
||||
meta_cf_descriptor,
|
||||
@ -679,27 +674,13 @@ impl<'a> WriteBatch<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
fn get_cf_options(name: &'static str) -> Options {
|
||||
use columns::{ErasureMeta, Index, ShredCode, ShredData};
|
||||
|
||||
fn get_cf_options() -> Options {
|
||||
let mut options = Options::default();
|
||||
match name {
|
||||
ShredCode::NAME | ShredData::NAME | Index::NAME | ErasureMeta::NAME => {
|
||||
// 512MB * 8 = 4GB. 2 of these columns should take no more than 8GB of RAM
|
||||
options.set_max_write_buffer_number(8);
|
||||
options.set_write_buffer_size(MAX_WRITE_BUFFER_SIZE as usize);
|
||||
options.set_target_file_size_base(MAX_WRITE_BUFFER_SIZE / 10);
|
||||
options.set_max_bytes_for_level_base(MAX_WRITE_BUFFER_SIZE);
|
||||
}
|
||||
_ => {
|
||||
// We want smaller CFs to flush faster. This results in more WAL files but lowers
|
||||
// overall WAL space utilization and increases flush frequency
|
||||
options.set_write_buffer_size(MIN_WRITE_BUFFER_SIZE as usize);
|
||||
options.set_target_file_size_base(MIN_WRITE_BUFFER_SIZE);
|
||||
options.set_max_bytes_for_level_base(MIN_WRITE_BUFFER_SIZE);
|
||||
options.set_level_zero_file_num_compaction_trigger(1);
|
||||
}
|
||||
}
|
||||
// 256 * 8 = 2GB. 6 of these columns should take at most 12GB of RAM
|
||||
options.set_max_write_buffer_number(8);
|
||||
options.set_write_buffer_size(MAX_WRITE_BUFFER_SIZE as usize);
|
||||
options.set_target_file_size_base(MAX_WRITE_BUFFER_SIZE / 10);
|
||||
options.set_max_bytes_for_level_base(MAX_WRITE_BUFFER_SIZE);
|
||||
options
|
||||
}
|
||||
|
||||
|
51
ledger/tests/blocktree.rs
Normal file
51
ledger/tests/blocktree.rs
Normal file
@ -0,0 +1,51 @@
|
||||
#[macro_use]
|
||||
extern crate solana_ledger;
|
||||
|
||||
use solana_ledger::blocktree::{self, get_tmp_ledger_path, Blocktree};
|
||||
use solana_ledger::entry;
|
||||
use solana_sdk::hash::Hash;
|
||||
use std::sync::Arc;
|
||||
use std::thread::Builder;
|
||||
|
||||
#[test]
|
||||
fn test_multiple_threads_insert_shred() {
|
||||
let blocktree_path = get_tmp_ledger_path!();
|
||||
let blocktree = Arc::new(Blocktree::open(&blocktree_path).unwrap());
|
||||
|
||||
for _ in 0..100 {
|
||||
let num_threads = 10;
|
||||
|
||||
// Create `num_threads` different ticks in slots 1..num_therads + 1, all
|
||||
// with parent = slot 0
|
||||
let threads: Vec<_> = (0..num_threads)
|
||||
.map(|i| {
|
||||
let entries = entry::create_ticks(1, Hash::default());
|
||||
let shreds = blocktree::entries_to_test_shreds(entries, i + 1, 0, false);
|
||||
let blocktree_ = blocktree.clone();
|
||||
Builder::new()
|
||||
.name("blocktree-writer".to_string())
|
||||
.spawn(move || {
|
||||
blocktree_.insert_shreds(shreds, None).unwrap();
|
||||
})
|
||||
.unwrap()
|
||||
})
|
||||
.collect();
|
||||
|
||||
for t in threads {
|
||||
t.join().unwrap()
|
||||
}
|
||||
|
||||
// Check slot 0 has the correct children
|
||||
let mut meta0 = blocktree.meta(0).unwrap().unwrap();
|
||||
meta0.next_slots.sort();
|
||||
let expected_next_slots: Vec<_> = (1..num_threads + 1).collect();
|
||||
assert_eq!(meta0.next_slots, expected_next_slots);
|
||||
|
||||
// Delete slots for next iteration
|
||||
blocktree.purge_slots(0, None);
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
drop(blocktree);
|
||||
Blocktree::destroy(&blocktree_path).expect("Expected successful database destruction");
|
||||
}
|
@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-local-cluster"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
@ -11,29 +11,29 @@ homepage = "https://solana.com/"
|
||||
[dependencies]
|
||||
log = "0.4.8"
|
||||
rand = "0.6.5"
|
||||
solana-bench-exchange = { path = "../bench-exchange", version = "0.20.0" }
|
||||
solana-bench-tps = { path = "../bench-tps", version = "0.20.0" }
|
||||
solana-config-api = { path = "../programs/config_api", version = "0.20.0" }
|
||||
solana-core = { path = "../core", version = "0.20.0" }
|
||||
solana-client = { path = "../client", version = "0.20.0" }
|
||||
solana-drone = { path = "../drone", version = "0.20.0" }
|
||||
solana-exchange-api = { path = "../programs/exchange_api", version = "0.20.0" }
|
||||
solana-exchange-program = { path = "../programs/exchange_program", version = "0.20.0" }
|
||||
solana-genesis-programs = { path = "../genesis_programs", version = "0.20.0" }
|
||||
solana-ledger = { path = "../ledger", version = "0.20.0" }
|
||||
solana-logger = { path = "../logger", version = "0.20.0" }
|
||||
solana-move-loader-api = { path = "../programs/move_loader_api", version = "0.20.0", optional = true }
|
||||
solana-move-loader-program = { path = "../programs/move_loader_program", version = "0.20.0", optional = true }
|
||||
solana-runtime = { path = "../runtime", version = "0.20.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.0" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.20.0" }
|
||||
solana-storage-api = { path = "../programs/storage_api", version = "0.20.0" }
|
||||
solana-storage-program = { path = "../programs/storage_program", version = "0.20.0" }
|
||||
solana-vest-api = { path = "../programs/vest_api", version = "0.20.0" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.20.0" }
|
||||
solana-bench-exchange = { path = "../bench-exchange", version = "0.20.1" }
|
||||
solana-bench-tps = { path = "../bench-tps", version = "0.20.1" }
|
||||
solana-config-api = { path = "../programs/config_api", version = "0.20.1" }
|
||||
solana-core = { path = "../core", version = "0.20.1" }
|
||||
solana-client = { path = "../client", version = "0.20.1" }
|
||||
solana-drone = { path = "../drone", version = "0.20.1" }
|
||||
solana-exchange-api = { path = "../programs/exchange_api", version = "0.20.1" }
|
||||
solana-exchange-program = { path = "../programs/exchange_program", version = "0.20.1" }
|
||||
solana-genesis-programs = { path = "../genesis_programs", version = "0.20.1" }
|
||||
solana-ledger = { path = "../ledger", version = "0.20.1" }
|
||||
solana-logger = { path = "../logger", version = "0.20.1" }
|
||||
solana-move-loader-api = { path = "../programs/move_loader_api", version = "0.20.1", optional = true }
|
||||
solana-move-loader-program = { path = "../programs/move_loader_program", version = "0.20.1", optional = true }
|
||||
solana-runtime = { path = "../runtime", version = "0.20.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.1" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.20.1" }
|
||||
solana-storage-api = { path = "../programs/storage_api", version = "0.20.1" }
|
||||
solana-storage-program = { path = "../programs/storage_program", version = "0.20.1" }
|
||||
solana-vest-api = { path = "../programs/vest_api", version = "0.20.1" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.20.1" }
|
||||
symlink = "0.1.0"
|
||||
tempfile = "3.1.0"
|
||||
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "0.20.0" }
|
||||
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "0.20.1" }
|
||||
|
||||
[dev-dependencies]
|
||||
serial_test = "0.2.0"
|
||||
|
@ -76,7 +76,7 @@ fn test_bench_tps_local_cluster_solana() {
|
||||
fn test_bench_tps_local_cluster_move() {
|
||||
let mut config = Config::default();
|
||||
config.tx_count = 100;
|
||||
config.duration = Duration::from_secs(20);
|
||||
config.duration = Duration::from_secs(30);
|
||||
config.use_move = true;
|
||||
|
||||
test_bench_tps_local_cluster(config);
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-logger"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana Logger"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "solana-measure"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
documentation = "https://docs.rs/solana"
|
||||
homepage = "https://solana.com/"
|
||||
readme = "../README.md"
|
||||
@ -11,4 +11,4 @@ license = "Apache-2.0"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk = { path = "../sdk", version = "0.20.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.1" }
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-merkle-tree"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana Merkle Tree"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -9,7 +9,7 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk = { path = "../sdk", version = "0.20.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.1" }
|
||||
|
||||
[dev-dependencies]
|
||||
hex = "0.4.0"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-metrics"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana Metrics"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -13,7 +13,7 @@ env_logger = "0.7.1"
|
||||
lazy_static = "1.4.0"
|
||||
log = "0.4.8"
|
||||
reqwest = { version = "0.9.22", default-features = false, features = ["rustls-tls"] }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.1" }
|
||||
sys-info = "0.5.8"
|
||||
|
||||
[dev-dependencies]
|
||||
|
@ -15,8 +15,8 @@
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"id": 1038,
|
||||
"iteration": 1571342384471,
|
||||
"id": 1069,
|
||||
"iteration": 1572390574899,
|
||||
"links": [
|
||||
{
|
||||
"asDropdown": true,
|
||||
@ -4453,13 +4453,98 @@
|
||||
"alignLevel": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"columns": [],
|
||||
"datasource": "$datasource",
|
||||
"fontSize": "100%",
|
||||
"gridPos": {
|
||||
"h": 5,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 50
|
||||
},
|
||||
"id": 68,
|
||||
"links": [],
|
||||
"pageSize": null,
|
||||
"scroll": true,
|
||||
"showHeader": true,
|
||||
"sort": {
|
||||
"col": null,
|
||||
"desc": false
|
||||
},
|
||||
"styles": [
|
||||
{
|
||||
"alias": "Time",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"pattern": "Time",
|
||||
"type": "date"
|
||||
},
|
||||
{
|
||||
"alias": "",
|
||||
"colorMode": null,
|
||||
"colors": [
|
||||
"rgba(245, 54, 54, 0.9)",
|
||||
"rgba(237, 129, 40, 0.89)",
|
||||
"rgba(50, 172, 45, 0.97)"
|
||||
],
|
||||
"decimals": 2,
|
||||
"pattern": "/.*/",
|
||||
"thresholds": [],
|
||||
"type": "number",
|
||||
"unit": "short"
|
||||
}
|
||||
],
|
||||
"targets": [
|
||||
{
|
||||
"groupBy": [
|
||||
{
|
||||
"params": [
|
||||
"$__interval"
|
||||
],
|
||||
"type": "time"
|
||||
},
|
||||
{
|
||||
"params": [
|
||||
"null"
|
||||
],
|
||||
"type": "fill"
|
||||
}
|
||||
],
|
||||
"hide": false,
|
||||
"orderByTime": "ASC",
|
||||
"policy": "default",
|
||||
"query": "SELECT * FROM \"$testnet\".\"autogen\".\"ramp-tps\" WHERE $timeFilter ORDER BY time DESC ",
|
||||
"rawQuery": true,
|
||||
"refId": "A",
|
||||
"resultFormat": "table",
|
||||
"select": [
|
||||
[
|
||||
{
|
||||
"params": [
|
||||
"value"
|
||||
],
|
||||
"type": "field"
|
||||
},
|
||||
{
|
||||
"params": [],
|
||||
"type": "mean"
|
||||
}
|
||||
]
|
||||
],
|
||||
"tags": []
|
||||
}
|
||||
],
|
||||
"title": "Ramp TPS Events",
|
||||
"transform": "table",
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"collapsed": false,
|
||||
"gridPos": {
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 50
|
||||
"y": 55
|
||||
},
|
||||
"id": 38,
|
||||
"panels": [],
|
||||
@ -4477,7 +4562,7 @@
|
||||
"h": 5,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 51
|
||||
"y": 56
|
||||
},
|
||||
"id": 39,
|
||||
"legend": {
|
||||
@ -4628,7 +4713,7 @@
|
||||
"h": 5,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 51
|
||||
"y": 56
|
||||
},
|
||||
"id": 40,
|
||||
"legend": {
|
||||
@ -4811,7 +4896,7 @@
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 56
|
||||
"y": 61
|
||||
},
|
||||
"id": 41,
|
||||
"panels": [],
|
||||
@ -4829,9 +4914,9 @@
|
||||
"h": 6,
|
||||
"w": 8,
|
||||
"x": 0,
|
||||
"y": 57
|
||||
"y": 62
|
||||
},
|
||||
"id": 50,
|
||||
"id": 42,
|
||||
"legend": {
|
||||
"alignAsTable": false,
|
||||
"avg": false,
|
||||
@ -5148,9 +5233,9 @@
|
||||
"h": 6,
|
||||
"w": 8,
|
||||
"x": 8,
|
||||
"y": 57
|
||||
"y": 62
|
||||
},
|
||||
"id": 47,
|
||||
"id": 43,
|
||||
"legend": {
|
||||
"alignAsTable": false,
|
||||
"avg": false,
|
||||
@ -5506,7 +5591,7 @@
|
||||
"h": 6,
|
||||
"w": 8,
|
||||
"x": 16,
|
||||
"y": 57
|
||||
"y": 62
|
||||
},
|
||||
"id": 44,
|
||||
"legend": {
|
||||
@ -5818,9 +5903,9 @@
|
||||
"h": 6,
|
||||
"w": 8,
|
||||
"x": 0,
|
||||
"y": 63
|
||||
"y": 68
|
||||
},
|
||||
"id": 42,
|
||||
"id": 45,
|
||||
"legend": {
|
||||
"alignAsTable": false,
|
||||
"avg": false,
|
||||
@ -6248,7 +6333,7 @@
|
||||
"h": 6,
|
||||
"w": 8,
|
||||
"x": 8,
|
||||
"y": 63
|
||||
"y": 68
|
||||
},
|
||||
"id": 46,
|
||||
"legend": {
|
||||
@ -6437,9 +6522,9 @@
|
||||
"h": 5,
|
||||
"w": 8,
|
||||
"x": 16,
|
||||
"y": 63
|
||||
"y": 68
|
||||
},
|
||||
"id": 56,
|
||||
"id": 47,
|
||||
"legend": {
|
||||
"alignAsTable": false,
|
||||
"avg": false,
|
||||
@ -6558,9 +6643,9 @@
|
||||
"h": 5,
|
||||
"w": 8,
|
||||
"x": 16,
|
||||
"y": 68
|
||||
"y": 73
|
||||
},
|
||||
"id": 55,
|
||||
"id": 48,
|
||||
"legend": {
|
||||
"alignAsTable": false,
|
||||
"avg": false,
|
||||
@ -6714,9 +6799,9 @@
|
||||
"h": 5,
|
||||
"w": 8,
|
||||
"x": 0,
|
||||
"y": 69
|
||||
"y": 74
|
||||
},
|
||||
"id": 48,
|
||||
"id": 49,
|
||||
"legend": {
|
||||
"alignAsTable": false,
|
||||
"avg": false,
|
||||
@ -6870,9 +6955,9 @@
|
||||
"h": 5,
|
||||
"w": 8,
|
||||
"x": 8,
|
||||
"y": 69
|
||||
"y": 74
|
||||
},
|
||||
"id": 49,
|
||||
"id": 50,
|
||||
"legend": {
|
||||
"alignAsTable": false,
|
||||
"avg": false,
|
||||
@ -6985,9 +7070,9 @@
|
||||
"h": 6,
|
||||
"w": 8,
|
||||
"x": 16,
|
||||
"y": 73
|
||||
"y": 78
|
||||
},
|
||||
"id": 53,
|
||||
"id": 51,
|
||||
"legend": {
|
||||
"alignAsTable": false,
|
||||
"avg": false,
|
||||
@ -7189,9 +7274,9 @@
|
||||
"h": 5,
|
||||
"w": 8,
|
||||
"x": 0,
|
||||
"y": 74
|
||||
"y": 79
|
||||
},
|
||||
"id": 45,
|
||||
"id": 52,
|
||||
"legend": {
|
||||
"alignAsTable": false,
|
||||
"avg": false,
|
||||
@ -7491,9 +7576,9 @@
|
||||
"h": 5,
|
||||
"w": 8,
|
||||
"x": 8,
|
||||
"y": 74
|
||||
"y": 79
|
||||
},
|
||||
"id": 51,
|
||||
"id": 53,
|
||||
"legend": {
|
||||
"alignAsTable": false,
|
||||
"avg": false,
|
||||
@ -7639,9 +7724,9 @@
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 79
|
||||
"y": 84
|
||||
},
|
||||
"id": 57,
|
||||
"id": 54,
|
||||
"panels": [],
|
||||
"title": "Tower Consensus",
|
||||
"type": "row"
|
||||
@ -7662,9 +7747,9 @@
|
||||
"h": 5,
|
||||
"w": 8,
|
||||
"x": 0,
|
||||
"y": 80
|
||||
"y": 85
|
||||
},
|
||||
"id": 58,
|
||||
"id": 55,
|
||||
"legend": {
|
||||
"alignAsTable": false,
|
||||
"avg": false,
|
||||
@ -7822,9 +7907,9 @@
|
||||
"h": 5,
|
||||
"w": 8,
|
||||
"x": 8,
|
||||
"y": 80
|
||||
"y": 85
|
||||
},
|
||||
"id": 54,
|
||||
"id": 56,
|
||||
"legend": {
|
||||
"alignAsTable": false,
|
||||
"avg": false,
|
||||
@ -7982,9 +8067,9 @@
|
||||
"h": 5,
|
||||
"w": 8,
|
||||
"x": 16,
|
||||
"y": 80
|
||||
"y": 85
|
||||
},
|
||||
"id": 59,
|
||||
"id": 57,
|
||||
"legend": {
|
||||
"alignAsTable": false,
|
||||
"avg": false,
|
||||
@ -8167,9 +8252,9 @@
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 85
|
||||
"y": 90
|
||||
},
|
||||
"id": 60,
|
||||
"id": 58,
|
||||
"panels": [],
|
||||
"repeat": null,
|
||||
"title": "IP Network",
|
||||
@ -8186,9 +8271,9 @@
|
||||
"h": 5,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 86
|
||||
"y": 91
|
||||
},
|
||||
"id": 61,
|
||||
"id": 59,
|
||||
"legend": {
|
||||
"alignAsTable": false,
|
||||
"avg": false,
|
||||
@ -8419,9 +8504,9 @@
|
||||
"h": 5,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 86
|
||||
"y": 91
|
||||
},
|
||||
"id": 62,
|
||||
"id": 60,
|
||||
"legend": {
|
||||
"alignAsTable": false,
|
||||
"avg": false,
|
||||
@ -8572,9 +8657,9 @@
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 91
|
||||
"y": 96
|
||||
},
|
||||
"id": 63,
|
||||
"id": 61,
|
||||
"panels": [],
|
||||
"title": "Signature Verification",
|
||||
"type": "row"
|
||||
@ -8590,9 +8675,9 @@
|
||||
"h": 5,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 92
|
||||
"y": 97
|
||||
},
|
||||
"id": 64,
|
||||
"id": 62,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
@ -8711,9 +8796,9 @@
|
||||
"h": 5,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 92
|
||||
"y": 97
|
||||
},
|
||||
"id": 65,
|
||||
"id": 63,
|
||||
"legend": {
|
||||
"alignAsTable": false,
|
||||
"avg": false,
|
||||
@ -8860,9 +8945,9 @@
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 97
|
||||
"y": 102
|
||||
},
|
||||
"id": 66,
|
||||
"id": 64,
|
||||
"panels": [],
|
||||
"title": "Snapshots",
|
||||
"type": "row"
|
||||
@ -8878,9 +8963,9 @@
|
||||
"h": 6,
|
||||
"w": 8,
|
||||
"x": 0,
|
||||
"y": 98
|
||||
"y": 103
|
||||
},
|
||||
"id": 67,
|
||||
"id": 65,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
@ -9070,9 +9155,9 @@
|
||||
"h": 6,
|
||||
"w": 8,
|
||||
"x": 8,
|
||||
"y": 98
|
||||
"y": 103
|
||||
},
|
||||
"id": 68,
|
||||
"id": 66,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
@ -9262,9 +9347,9 @@
|
||||
"h": 6,
|
||||
"w": 8,
|
||||
"x": 16,
|
||||
"y": 98
|
||||
"y": 103
|
||||
},
|
||||
"id": 69,
|
||||
"id": 67,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
@ -9543,5 +9628,5 @@
|
||||
"timezone": "",
|
||||
"title": "Testnet Monitor (edge)",
|
||||
"uid": "testnet-edge",
|
||||
"version": 6
|
||||
}
|
||||
"version": 2
|
||||
}
|
||||
|
15
net/gce.sh
15
net/gce.sh
@ -662,6 +662,7 @@ EOF
|
||||
set -ex
|
||||
|
||||
if [[ -f /solana-scratch/.instance-startup-complete ]]; then
|
||||
echo reboot
|
||||
$(
|
||||
cd "$here"/scripts/
|
||||
if "$enableGpu"; then
|
||||
@ -671,7 +672,12 @@ if [[ -f /solana-scratch/.instance-startup-complete ]]; then
|
||||
if [[ -n $validatorAdditionalDiskSizeInGb ]]; then
|
||||
cat mount-additional-disk.sh
|
||||
fi
|
||||
|
||||
cat ../../scripts/ulimit-n.sh
|
||||
)
|
||||
if [[ -x ~solana/solana/on-reboot ]]; then
|
||||
sudo -u solana ~solana/solana/on-reboot
|
||||
fi
|
||||
|
||||
# Skip most setup on instance reboot
|
||||
exit 0
|
||||
@ -732,6 +738,8 @@ $(
|
||||
)
|
||||
|
||||
cat > /etc/motd <<EOM
|
||||
See startup script log messages in /var/log/syslog for status:
|
||||
$ sudo cat /var/log/syslog | egrep \\(startup-script\\|cloud-init\)
|
||||
$(printNetworkInfo)
|
||||
$(creationInfo)
|
||||
EOM
|
||||
@ -819,7 +827,12 @@ info)
|
||||
printf " %-16s | %-15s | %-15s | %s\n" "$nodeType" "$ip" "$ipPrivate" "$zone"
|
||||
}
|
||||
|
||||
if ! $evalInfo; then
|
||||
if $evalInfo; then
|
||||
echo "NET_NUM_VALIDATORS=${#validatorIpList[@]}"
|
||||
echo "NET_NUM_CLIENTS=${#clientIpList[@]}"
|
||||
echo "NET_NUM_BLOCKSTREAMERS=${#blockstreamerIpList[@]}"
|
||||
echo "NET_NUM_ARCHIVERS=${#archiverIpList[@]}"
|
||||
else
|
||||
printNode "Node Type" "Public IP" "Private IP" "Zone"
|
||||
echo "-------------------+-----------------+-----------------+--------------"
|
||||
fi
|
||||
|
@ -722,9 +722,7 @@ deploy() {
|
||||
# Stagger additional node start time. If too many nodes start simultaneously
|
||||
# the bootstrap node gets more rsync requests from the additional nodes than
|
||||
# it can handle.
|
||||
if ((nodeIndex % 2 == 0)); then
|
||||
sleep 2
|
||||
fi
|
||||
sleep 2
|
||||
fi
|
||||
done
|
||||
|
||||
|
@ -76,7 +76,6 @@ now=\$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
||||
ln -sfT validator.log.\$now validator.log
|
||||
EOF
|
||||
chmod +x ~/solana/on-reboot
|
||||
echo "@reboot ~/solana/on-reboot" | crontab -
|
||||
|
||||
GPU_CUDA_OK=false
|
||||
GPU_FAIL_IF_NONE=false
|
||||
@ -105,7 +104,7 @@ waitForNodeToInit() {
|
||||
echo "--- waiting for $hostname to boot up"
|
||||
SECONDS=
|
||||
while [[ ! -r $initCompleteFile ]]; do
|
||||
if [[ $SECONDS -ge 120 ]]; then
|
||||
if [[ $SECONDS -ge 240 ]]; then
|
||||
echo "^^^ +++"
|
||||
echo "Error: $initCompleteFile not found in $SECONDS seconds"
|
||||
exit 1
|
||||
@ -262,6 +261,7 @@ EOF
|
||||
args+=(
|
||||
--blockstream /tmp/solana-blockstream.sock
|
||||
--no-voting
|
||||
--dev-no-sigverify
|
||||
)
|
||||
else
|
||||
args+=(--enable-rpc-exit)
|
||||
|
@ -6,3 +6,5 @@ set -ex
|
||||
|
||||
add-apt-repository -y ppa:chris-lea/redis-server
|
||||
apt-get --assume-yes install redis
|
||||
|
||||
systemctl enable redis-server.service
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-netutil"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana Network Utilities"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -18,7 +18,7 @@ rand = "0.6.1"
|
||||
serde = "1.0.101"
|
||||
serde_derive = "1.0.101"
|
||||
socket2 = "0.3.11"
|
||||
solana-logger = { path = "../logger", version = "0.20.0" }
|
||||
solana-logger = { path = "../logger", version = "0.20.1" }
|
||||
tokio = "0.1"
|
||||
tokio-codec = "0.1"
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "solana-bpf-programs"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
documentation = "https://docs.rs/solana"
|
||||
homepage = "https://solana.com/"
|
||||
readme = "README.md"
|
||||
@ -22,10 +22,10 @@ walkdir = "2"
|
||||
bincode = "1.1.4"
|
||||
byteorder = "1.3.2"
|
||||
elf = "0.0.10"
|
||||
solana-bpf-loader-api = { path = "../bpf_loader_api", version = "0.20.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.0" }
|
||||
solana-runtime = { path = "../../runtime", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0" }
|
||||
solana-bpf-loader-api = { path = "../bpf_loader_api", version = "0.20.1" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.1" }
|
||||
solana-runtime = { path = "../../runtime", version = "0.20.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
solana_rbpf = "=0.1.19"
|
||||
|
||||
[[bench]]
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-128bit"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana BPF test program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,11 +12,11 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.0", default-features = false }
|
||||
solana-bpf-rust-128bit-dep = { path = "../128bit_dep", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.1", default-features = false }
|
||||
solana-bpf-rust-128bit-dep = { path = "../128bit_dep", version = "0.20.1" }
|
||||
|
||||
[dev_dependencies]
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.0" }
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.1" }
|
||||
|
||||
[features]
|
||||
program = ["solana-sdk/program"]
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-128bit-dep"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana BPF test program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,10 +12,10 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.0", default-features = false }
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.1", default-features = false }
|
||||
|
||||
[dev_dependencies]
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.0" }
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.1" }
|
||||
|
||||
[features]
|
||||
program = ["solana-sdk/program"]
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-alloc"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana BPF test program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,10 +12,10 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.0", default-features = false }
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.1", default-features = false }
|
||||
|
||||
[dev_dependencies]
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.0" }
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.1" }
|
||||
|
||||
[features]
|
||||
program = ["solana-sdk/program"]
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-dep-crate"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana BPF test program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -13,10 +13,10 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
byteorder = { version = "1", default-features = false }
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.0", default-features = false }
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.1", default-features = false }
|
||||
|
||||
[dev_dependencies]
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.0" }
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.1" }
|
||||
|
||||
[features]
|
||||
program = ["solana-sdk/program"]
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-external-spend"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana BPF test program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,10 +12,10 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.0", default-features = false }
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.1", default-features = false }
|
||||
|
||||
[dev_dependencies]
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.0" }
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.1" }
|
||||
|
||||
[features]
|
||||
program = ["solana-sdk/program"]
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-iter"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana BPF test program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,10 +12,10 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.0", default-features = false }
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.1", default-features = false }
|
||||
|
||||
[dev_dependencies]
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.0" }
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.1" }
|
||||
|
||||
[features]
|
||||
program = ["solana-sdk/program"]
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-many-args"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana BPF test program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,11 +12,11 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.0", default-features = false }
|
||||
solana-bpf-rust-many-args-dep = { path = "../many_args_dep", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.1", default-features = false }
|
||||
solana-bpf-rust-many-args-dep = { path = "../many_args_dep", version = "0.20.1" }
|
||||
|
||||
[dev_dependencies]
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.0" }
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.1" }
|
||||
|
||||
[features]
|
||||
program = ["solana-sdk/program"]
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-many-args-dep"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana BPF test program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,10 +12,10 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.0", default-features = false }
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.1", default-features = false }
|
||||
|
||||
[dev_dependencies]
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.0" }
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.1" }
|
||||
|
||||
[features]
|
||||
program = ["solana-sdk/program"]
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-noop"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana BPF test program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,10 +12,10 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.0", default-features = false }
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.1", default-features = false }
|
||||
|
||||
[dev_dependencies]
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.0" }
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.1" }
|
||||
|
||||
[features]
|
||||
program = ["solana-sdk/program"]
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-panic"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana BPF test program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,10 +12,10 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.0", default-features = false }
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.1", default-features = false }
|
||||
|
||||
[dev_dependencies]
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.0" }
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.1" }
|
||||
|
||||
[features]
|
||||
program = ["solana-sdk/program"]
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-param-passing"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana BPF test program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,11 +12,11 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.0", default-features = false }
|
||||
solana-bpf-rust-param-passing-dep = { path = "../param_passing_dep", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.1", default-features = false }
|
||||
solana-bpf-rust-param-passing-dep = { path = "../param_passing_dep", version = "0.20.1" }
|
||||
|
||||
[dev_dependencies]
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.0" }
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.1" }
|
||||
|
||||
[features]
|
||||
program = ["solana-sdk/program"]
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-param-passing-dep"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana BPF program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,10 +12,10 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.0", default-features = false }
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.1", default-features = false }
|
||||
|
||||
[dev_dependencies]
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.0" }
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.1" }
|
||||
|
||||
[features]
|
||||
program = ["solana-sdk/program"]
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "solana-bpf-rust-sysval"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana BPF test program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,10 +12,10 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.0", default-features = false }
|
||||
solana-sdk = { path = "../../../../sdk/", version = "0.20.1", default-features = false }
|
||||
|
||||
[dev_dependencies]
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.0" }
|
||||
solana-sdk-bpf-test = { path = "../../../../sdk/bpf/rust/test", version = "0.20.1" }
|
||||
|
||||
[features]
|
||||
program = ["solana-sdk/program"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-bpf-loader-api"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana BPF Loader"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -14,8 +14,8 @@ byteorder = "1.3.2"
|
||||
libc = "0.2.65"
|
||||
log = "0.4.8"
|
||||
serde = "1.0.101"
|
||||
solana-logger = { path = "../../logger", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
solana_rbpf = "=0.1.19"
|
||||
|
||||
[lib]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-bpf-loader-program"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana BPF Loader"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,9 +10,9 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.8"
|
||||
solana-logger = { path = "../../logger", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0" }
|
||||
solana-bpf-loader-api = { path = "../bpf_loader_api", version = "0.20.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
solana-bpf-loader-api = { path = "../bpf_loader_api", version = "0.20.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib", "cdylib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-btc-spv-api"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana Bitcoin spv parsing program api"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -16,7 +16,7 @@ num-derive = "0.3"
|
||||
num-traits = "0.2"
|
||||
serde = "1.0.101"
|
||||
serde_derive = "1.0.101"
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0"}
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1"}
|
||||
hex = "0.3.2"
|
||||
|
||||
[lib]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "btc_spv_bin"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana Bitcoin spv parsing program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-bitcoin-spv-program"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana Bitcoin spv parsing program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -16,8 +16,8 @@ num-derive = "0.3"
|
||||
num-traits = "0.2"
|
||||
serde = "1.0.101"
|
||||
serde_derive = "1.0.101"
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0"}
|
||||
solana-btc-spv-api = { path = "../btc_spv_api", version = "0.20.0"}
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1"}
|
||||
solana-btc-spv-api = { path = "../btc_spv_api", version = "0.20.1"}
|
||||
|
||||
|
||||
[lib]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-budget-api"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana Budget program API"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -16,10 +16,10 @@ num-derive = "0.3"
|
||||
num-traits = "0.2"
|
||||
serde = "1.0.101"
|
||||
serde_derive = "1.0.101"
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
|
||||
[dev-dependencies]
|
||||
solana-runtime = { path = "../../runtime", version = "0.20.0" }
|
||||
solana-runtime = { path = "../../runtime", version = "0.20.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-budget-program"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana budget program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,9 +10,9 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.8"
|
||||
solana-budget-api = { path = "../budget_api", version = "0.20.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0" }
|
||||
solana-budget-api = { path = "../budget_api", version = "0.20.1" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib", "cdylib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-config-api"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "config program API"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -13,7 +13,7 @@ bincode = "1.2.0"
|
||||
log = "0.4.8"
|
||||
serde = "1.0.101"
|
||||
serde_derive = "1.0.101"
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
|
||||
|
||||
[lib]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-config-program"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "config program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,9 +10,9 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.8"
|
||||
solana-config-api = { path = "../config_api", version = "0.20.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0" }
|
||||
solana-config-api = { path = "../config_api", version = "0.20.1" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib", "cdylib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-config-tests"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana config api tests"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -13,12 +13,12 @@ bincode = "1.2.0"
|
||||
log = "0.4.8"
|
||||
serde = "1.0.101"
|
||||
serde_derive = "1.0.101"
|
||||
solana-logger = { path = "../../logger", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0" }
|
||||
solana-config-api = { path = "../config_api", version = "0.20.0" }
|
||||
solana-config-program = { path = "../config_program", version = "0.20.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
solana-config-api = { path = "../config_api", version = "0.20.1" }
|
||||
solana-config-program = { path = "../config_program", version = "0.20.1" }
|
||||
|
||||
|
||||
[dev-dependencies]
|
||||
solana-runtime = { path = "../../runtime", version = "0.20.0" }
|
||||
solana-runtime = { path = "../../runtime", version = "0.20.1" }
|
||||
assert_matches = "1.3.0"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-exchange-api"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana Exchange program API"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -13,12 +13,12 @@ bincode = "1.2.0"
|
||||
log = "0.4.8"
|
||||
serde = "1.0.101"
|
||||
serde_derive = "1.0.101"
|
||||
solana-logger = { path = "../../logger", version = "0.20.0" }
|
||||
solana-metrics = { path = "../../metrics", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.1" }
|
||||
solana-metrics = { path = "../../metrics", version = "0.20.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
|
||||
[dev-dependencies]
|
||||
solana-runtime = { path = "../../runtime", version = "0.20.0" }
|
||||
solana-runtime = { path = "../../runtime", version = "0.20.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-exchange-program"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana exchange program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,9 +10,9 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.8"
|
||||
solana-exchange-api = { path = "../exchange_api", version = "0.20.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0" }
|
||||
solana-exchange-api = { path = "../exchange_api", version = "0.20.1" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib", "cdylib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-failure-program"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana failure program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,10 +10,10 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.8"
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
|
||||
[dev-dependencies]
|
||||
solana-runtime = { path = "../../runtime", version = "0.20.0" }
|
||||
solana-runtime = { path = "../../runtime", version = "0.20.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-librapay-api"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana Libra Payment"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -11,12 +11,12 @@ edition = "2018"
|
||||
[dependencies]
|
||||
bincode = "1.2.0"
|
||||
log = "0.4.8"
|
||||
solana-logger = { path = "../../logger", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0" }
|
||||
solana-runtime = { path = "../../runtime", version = "0.20.0" }
|
||||
types = { version = "0.0.0", package = "solana_libra_types" }
|
||||
language_e2e_tests = { version = "0.0.0", package = "solana_libra_language_e2e_tests" }
|
||||
solana-move-loader-api = { path = "../move_loader_api", version = "0.20.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
solana-runtime = { path = "../../runtime", version = "0.20.1" }
|
||||
types = { version = "0.0.1-sol4", package = "solana_libra_types" }
|
||||
language_e2e_tests = { version = "0.0.1-sol4", package = "solana_libra_language_e2e_tests" }
|
||||
solana-move-loader-api = { path = "../move_loader_api", version = "0.20.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib"]
|
||||
|
@ -23,7 +23,7 @@ use solana_sdk::pubkey::Pubkey;
|
||||
use solana_sdk::signature::{Keypair, KeypairUtil};
|
||||
use solana_sdk::system_instruction;
|
||||
|
||||
use types::account_address::AccountAddress;
|
||||
use types::account_config;
|
||||
|
||||
pub fn create_genesis<T: Client>(from_key: &Keypair, client: &T, amount: u64) -> Keypair {
|
||||
let libra_genesis_key = Keypair::new();
|
||||
@ -48,7 +48,7 @@ pub fn create_genesis<T: Client>(from_key: &Keypair, client: &T, amount: u64) ->
|
||||
}
|
||||
|
||||
pub fn upload_move_program<T: Client>(from: &Keypair, client: &T, code: &str) -> Pubkey {
|
||||
let address = AccountAddress::default();
|
||||
let address = account_config::association_address();
|
||||
let account_state = LibraAccountState::create_program(&address, code, vec![]);
|
||||
let program_bytes = bincode::serialize(&account_state).unwrap();
|
||||
|
||||
|
@ -4,7 +4,7 @@ use solana_move_loader_api::processor::InvokeCommand;
|
||||
use solana_sdk::instruction::{AccountMeta, Instruction};
|
||||
use solana_sdk::loader_instruction::LoaderInstruction;
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
use types::account_address::AccountAddress;
|
||||
use types::account_config;
|
||||
use types::transaction::TransactionArgument;
|
||||
|
||||
pub fn genesis(genesis_pubkey: &Pubkey, microlibras: u64) -> Instruction {
|
||||
@ -28,7 +28,7 @@ pub fn mint(
|
||||
];
|
||||
|
||||
let data = bincode::serialize(&InvokeCommand::RunProgram {
|
||||
sender_address: AccountAddress::default(),
|
||||
sender_address: account_config::association_address(),
|
||||
function_name: "main".to_string(),
|
||||
args,
|
||||
})
|
||||
|
@ -1,5 +1,4 @@
|
||||
use crate::librapay_instruction;
|
||||
use language_e2e_tests::account::AccountResource;
|
||||
use log::*;
|
||||
use solana_move_loader_api::account_state::{pubkey_to_address, LibraAccountState};
|
||||
use solana_move_loader_api::data_store::DataStore;
|
||||
@ -75,7 +74,7 @@ pub fn create_accounts(
|
||||
&from.pubkey(),
|
||||
to,
|
||||
lamports,
|
||||
200,
|
||||
400,
|
||||
&solana_move_loader_api::id(),
|
||||
)
|
||||
})
|
||||
@ -128,7 +127,7 @@ pub fn get_libra_balance<T: Client>(
|
||||
.read_account_resource(&pubkey_to_address(account_address))
|
||||
.unwrap();
|
||||
|
||||
let res = AccountResource::read_balance(&resource);
|
||||
let res = resource.balance();
|
||||
Ok(res)
|
||||
} else {
|
||||
Ok(0)
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-move-loader-api"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana Move Loader"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -18,19 +18,21 @@ serde = "1.0.101"
|
||||
serde_bytes = "0.11"
|
||||
serde_derive = "1.0.101"
|
||||
serde_json = "1.0.41"
|
||||
solana-logger = { path = "../../logger", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
|
||||
bytecode_verifier = { version = "0.0.0", package = "solana_libra_bytecode_verifier" }
|
||||
compiler = { version = "0.0.0", package = "solana_libra_compiler" }
|
||||
failure = { version = "0.0.0", package = "solana_libra_failure_ext" }
|
||||
language_e2e_tests = { version = "0.0.0", package = "solana_libra_language_e2e_tests" }
|
||||
state_view = { version = "0.0.0", package = "solana_libra_state_view" }
|
||||
stdlib = { version = "0.0.0", package = "solana_libra_stdlib" }
|
||||
types = { version = "0.0.0", package = "solana_libra_types" }
|
||||
vm = { version = "0.0.0", package = "solana_libra_vm" }
|
||||
vm_cache_map = { version = "0.0.0", package = "solana_libra_vm_cache_map" }
|
||||
vm_runtime = { version = "0.0.0", package = "solana_libra_vm_runtime" }
|
||||
bytecode_verifier = { version = "0.0.1-sol4", package = "solana_libra_bytecode_verifier" }
|
||||
canonical_serialization = { version = "0.0.1-sol4", package = "solana_libra_canonical_serialization" }
|
||||
compiler = { version = "0.0.1-sol4", package = "solana_libra_compiler" }
|
||||
failure = { version = "0.0.1-sol4", package = "solana_libra_failure_ext" }
|
||||
language_e2e_tests = { version = "0.0.1-sol4", package = "solana_libra_language_e2e_tests" }
|
||||
state_view = { version = "0.0.1-sol4", package = "solana_libra_state_view" }
|
||||
stdlib = { version = "0.0.1-sol4", package = "solana_libra_stdlib" }
|
||||
types = { version = "0.0.1-sol4", package = "solana_libra_types" }
|
||||
vm = { version = "0.0.1-sol4", package = "solana_libra_vm" }
|
||||
vm_cache_map = { version = "0.0.1-sol4", package = "solana_libra_vm_cache_map" }
|
||||
vm_runtime = { version = "0.0.1-sol4", package = "solana_libra_vm_runtime" }
|
||||
vm_runtime_types = { version = "0.0.1-sol4", package = "solana_libra_vm_runtime_types" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib"]
|
||||
|
@ -8,7 +8,9 @@ use std::convert::TryInto;
|
||||
use stdlib::stdlib_modules;
|
||||
use types::{
|
||||
account_address::AccountAddress,
|
||||
account_config,
|
||||
byte_array::ByteArray,
|
||||
identifier::Identifier,
|
||||
transaction::Program,
|
||||
write_set::{WriteOp, WriteSet},
|
||||
};
|
||||
@ -22,9 +24,9 @@ use vm_runtime::{
|
||||
module_cache::{BlockModuleCache, VMModuleCache},
|
||||
},
|
||||
data_cache::BlockDataCache,
|
||||
txn_executor::{TransactionExecutor, ACCOUNT_MODULE, COIN_MODULE},
|
||||
value::Local,
|
||||
txn_executor::{TransactionExecutor, ACCOUNT_MODULE, BLOCK_MODULE, COIN_MODULE},
|
||||
};
|
||||
use vm_runtime_types::value::Value;
|
||||
|
||||
// Helper function that converts a Solana Pubkey to a Libra AccountAddress (WIP)
|
||||
pub fn pubkey_to_address(key: &Pubkey) -> AccountAddress {
|
||||
@ -87,11 +89,12 @@ impl LibraAccountState {
|
||||
|
||||
let compiler = Compiler {
|
||||
address: *sender_address,
|
||||
code,
|
||||
extra_deps,
|
||||
..Compiler::default()
|
||||
};
|
||||
let compiled_program = compiler.into_compiled_program().expect("Failed to compile");
|
||||
let compiled_program = compiler
|
||||
.into_compiled_program(code)
|
||||
.expect("Failed to compile");
|
||||
|
||||
let mut script_bytes = vec![];
|
||||
compiled_program
|
||||
@ -120,10 +123,9 @@ impl LibraAccountState {
|
||||
let arena = Arena::new();
|
||||
let state_view = DataStore::default();
|
||||
let vm_cache = VMModuleCache::new(&arena);
|
||||
// Libra enforces the mint address to be 0x0 (see Libra's `mint_to_address` function)
|
||||
let mint_address = AccountAddress::default();
|
||||
let genesis_addr = account_config::association_address();
|
||||
// TODO: Need this?
|
||||
let genesis_auth_key = ByteArray::new(mint_address.to_vec());
|
||||
let genesis_auth_key = ByteArray::new(genesis_addr.to_vec());
|
||||
|
||||
let write_set = {
|
||||
let fake_fetcher =
|
||||
@ -132,35 +134,55 @@ impl LibraAccountState {
|
||||
let block_cache = BlockModuleCache::new(&vm_cache, fake_fetcher);
|
||||
|
||||
let mut txn_data = TransactionMetadata::default();
|
||||
txn_data.sender = mint_address;
|
||||
txn_data.sender = genesis_addr;
|
||||
|
||||
let mut txn_executor = TransactionExecutor::new(&block_cache, &data_cache, txn_data);
|
||||
txn_executor.create_account(genesis_addr).unwrap();
|
||||
txn_executor
|
||||
.create_account(mint_address)
|
||||
.map_err(map_vm_invariant_violation_error)?
|
||||
.map_err(map_vm_runtime_error)?;
|
||||
.create_account(account_config::core_code_address())
|
||||
.map_err(map_err_vm_status)?;
|
||||
txn_executor
|
||||
.execute_function(&COIN_MODULE, "initialize", vec![])
|
||||
.map_err(map_vm_invariant_violation_error)?
|
||||
.map_err(map_vm_runtime_error)?;
|
||||
.execute_function(
|
||||
&BLOCK_MODULE,
|
||||
&Identifier::new("initialize").unwrap(),
|
||||
vec![],
|
||||
)
|
||||
.map_err(map_err_vm_status)?;
|
||||
txn_executor
|
||||
.execute_function(
|
||||
&COIN_MODULE,
|
||||
&Identifier::new("initialize").unwrap(),
|
||||
vec![],
|
||||
)
|
||||
.map_err(map_err_vm_status)?;
|
||||
|
||||
txn_executor
|
||||
.execute_function(
|
||||
&ACCOUNT_MODULE,
|
||||
"mint_to_address",
|
||||
vec![Local::address(mint_address), Local::u64(mint_balance)],
|
||||
&Identifier::new("mint_to_address").unwrap(),
|
||||
vec![Value::address(genesis_addr), Value::u64(mint_balance)],
|
||||
)
|
||||
.map_err(map_vm_invariant_violation_error)?
|
||||
.map_err(map_vm_runtime_error)?;
|
||||
.map_err(map_err_vm_status)?;
|
||||
|
||||
txn_executor
|
||||
.execute_function(
|
||||
&ACCOUNT_MODULE,
|
||||
"rotate_authentication_key",
|
||||
vec![Local::bytearray(genesis_auth_key)],
|
||||
&Identifier::new("rotate_authentication_key").unwrap(),
|
||||
vec![Value::byte_array(genesis_auth_key)],
|
||||
)
|
||||
.map_err(map_vm_invariant_violation_error)?
|
||||
.map_err(map_vm_runtime_error)?;
|
||||
.map_err(map_err_vm_status)?;
|
||||
|
||||
// Bump the sequence number for the Association account. If we don't do this and a
|
||||
// subsequent transaction (e.g., minting) is sent from the Association account, a problem
|
||||
// arises: both the genesis transaction and the subsequent transaction have sequence
|
||||
// number 0
|
||||
txn_executor
|
||||
.execute_function(
|
||||
&ACCOUNT_MODULE,
|
||||
&Identifier::new("epilogue").unwrap(),
|
||||
vec![],
|
||||
)
|
||||
.map_err(map_err_vm_status)?;
|
||||
|
||||
let mut stdlib_modules = vec![];
|
||||
for module in modules.iter() {
|
||||
@ -170,8 +192,8 @@ impl LibraAccountState {
|
||||
}
|
||||
|
||||
txn_executor
|
||||
.make_write_set(stdlib_modules, Ok(Ok(())))
|
||||
.map_err(map_vm_runtime_error)?
|
||||
.make_write_set(stdlib_modules, Ok(()))
|
||||
.map_err(map_err_vm_status)?
|
||||
.write_set()
|
||||
.clone()
|
||||
.into_mut()
|
||||
|
@ -1,3 +1,4 @@
|
||||
use canonical_serialization::SimpleDeserializer;
|
||||
use failure::prelude::*;
|
||||
use indexmap::IndexMap;
|
||||
use log::*;
|
||||
@ -5,17 +6,12 @@ use state_view::StateView;
|
||||
use types::{
|
||||
access_path::AccessPath,
|
||||
account_address::AccountAddress,
|
||||
account_config,
|
||||
account_config::{self, AccountResource},
|
||||
language_storage::ModuleId,
|
||||
write_set::{WriteOp, WriteSet, WriteSetMut},
|
||||
};
|
||||
use vm::{errors::VMInvariantViolation, CompiledModule};
|
||||
use vm_runtime::{
|
||||
data_cache::RemoteCache,
|
||||
identifier::create_access_path,
|
||||
loaded_data::{struct_def::StructDef, types::Type},
|
||||
value::Value,
|
||||
};
|
||||
use vm::{errors::VMResult, CompiledModule};
|
||||
use vm_runtime::{data_cache::RemoteCache, identifier::create_access_path};
|
||||
|
||||
/// An in-memory implementation of [`StateView`] and [`RemoteCache`] for the VM.
|
||||
#[derive(Debug, Default)]
|
||||
@ -66,17 +62,11 @@ impl DataStore {
|
||||
}
|
||||
|
||||
/// Read an account's resource
|
||||
pub fn read_account_resource(&self, addr: &AccountAddress) -> Option<Value> {
|
||||
pub fn read_account_resource(&self, addr: &AccountAddress) -> Option<AccountResource> {
|
||||
let access_path = create_access_path(&addr, account_config::account_struct_tag());
|
||||
match self.data.get(&access_path) {
|
||||
None => None,
|
||||
Some(blob) => {
|
||||
let account_type = get_account_struct_def();
|
||||
match Value::simple_deserialize(blob, account_type) {
|
||||
Ok(account) => Some(account),
|
||||
Err(_) => None,
|
||||
}
|
||||
}
|
||||
Some(blob) => SimpleDeserializer::deserialize(blob).ok(),
|
||||
}
|
||||
}
|
||||
|
||||
@ -134,32 +124,11 @@ impl StateView for DataStore {
|
||||
}
|
||||
|
||||
impl RemoteCache for DataStore {
|
||||
fn get(
|
||||
&self,
|
||||
access_path: &AccessPath,
|
||||
) -> ::std::result::Result<Option<Vec<u8>>, VMInvariantViolation> {
|
||||
fn get(&self, access_path: &AccessPath) -> VMResult<Option<Vec<u8>>> {
|
||||
Ok(StateView::get(self, access_path).expect("it should not error"))
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: internal Libra function and very likely to break soon, need something better
|
||||
fn get_account_struct_def() -> StructDef {
|
||||
// STRUCT DEF StructDef(StructDefInner { field_definitions: [ByteArray,
|
||||
// Struct(StructDef(StructDefInner { field_definitions: [U64] })), U64, U64,
|
||||
// U64] }) let coin = StructDef(StructDefInner { field_definitions:
|
||||
// [Type::U64] })
|
||||
let int_type = Type::U64;
|
||||
let byte_array_type = Type::ByteArray;
|
||||
let coin = Type::Struct(StructDef::new(vec![int_type.clone()]));
|
||||
StructDef::new(vec![
|
||||
byte_array_type,
|
||||
coin,
|
||||
int_type.clone(),
|
||||
int_type.clone(),
|
||||
int_type.clone(),
|
||||
])
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
@ -2,24 +2,10 @@
|
||||
|
||||
use log::*;
|
||||
use solana_sdk::instruction::InstructionError;
|
||||
use std::convert::TryInto;
|
||||
use types::vm_error::{StatusCode, VMStatus};
|
||||
use vm::file_format::CompiledModule;
|
||||
|
||||
#[allow(clippy::needless_pass_by_value)]
|
||||
pub fn map_vm_runtime_error(err: vm::errors::VMRuntimeError) -> InstructionError {
|
||||
debug!("Execution failed: {:?}", err);
|
||||
match err.err {
|
||||
vm::errors::VMErrorKind::OutOfGasError => InstructionError::InsufficientFunds,
|
||||
_ => InstructionError::GenericError,
|
||||
}
|
||||
}
|
||||
pub fn map_vm_invariant_violation_error(err: vm::errors::VMInvariantViolation) -> InstructionError {
|
||||
debug!("Error: Execution failed: {:?}", err);
|
||||
InstructionError::GenericError
|
||||
}
|
||||
pub fn map_vm_binary_error(err: vm::errors::BinaryError) -> InstructionError {
|
||||
debug!("Error: Script deserialize failed: {:?}", err);
|
||||
InstructionError::InvalidInstructionData
|
||||
}
|
||||
#[allow(clippy::needless_pass_by_value)]
|
||||
pub fn map_data_error(err: std::boxed::Box<bincode::ErrorKind>) -> InstructionError {
|
||||
debug!("Error: Account data: {:?}", err);
|
||||
@ -28,23 +14,34 @@ pub fn map_data_error(err: std::boxed::Box<bincode::ErrorKind>) -> InstructionEr
|
||||
_ => InstructionError::InvalidAccountData,
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::needless_pass_by_value)]
|
||||
pub fn map_json_error(err: serde_json::error::Error) -> InstructionError {
|
||||
debug!("Error: serde_json: {:?}", err);
|
||||
InstructionError::InvalidAccountData
|
||||
}
|
||||
pub fn map_vm_verification_error(
|
||||
err: (CompiledModule, Vec<vm::errors::VerificationError>),
|
||||
) -> InstructionError {
|
||||
|
||||
pub fn map_vm_verification_error(err: (CompiledModule, Vec<VMStatus>)) -> InstructionError {
|
||||
debug!("Error: Script verification failed: {:?}", err.1);
|
||||
InstructionError::InvalidInstructionData
|
||||
}
|
||||
pub fn map_failure_error(err: failure::Error) -> InstructionError {
|
||||
debug!("Error: Script verification failed: {:?}", err);
|
||||
InstructionError::InvalidInstructionData
|
||||
}
|
||||
|
||||
#[allow(clippy::needless_pass_by_value)]
|
||||
pub fn missing_account() -> InstructionError {
|
||||
debug!("Error: Missing account");
|
||||
InstructionError::InvalidAccountData
|
||||
}
|
||||
|
||||
pub fn map_failure_error(err: failure::Error) -> InstructionError {
|
||||
debug!("Error: Script verification failed: {:?}", err);
|
||||
InstructionError::InvalidInstructionData
|
||||
}
|
||||
|
||||
pub fn map_err_vm_status(status: VMStatus) -> InstructionError {
|
||||
// Attempt to map the StatusCode (repr(u64)) to a u32 for CustomError.
|
||||
// The only defined StatusCode that fails is StatusCode::UNKNOWN_ERROR
|
||||
match <StatusCode as Into<u64>>::into(status.major_status).try_into() {
|
||||
Ok(u) => InstructionError::CustomError(u),
|
||||
Err(_) => InstructionError::GenericError,
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ use crate::account_state::{pubkey_to_address, LibraAccountState, ModuleBytes};
|
||||
use crate::data_store::DataStore;
|
||||
use crate::error_mappers::*;
|
||||
use crate::id;
|
||||
use bytecode_verifier::{VerifiedModule, VerifiedScript};
|
||||
use bytecode_verifier::verifier::{VerifiedModule, VerifiedScript};
|
||||
use log::*;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use solana_sdk::{
|
||||
@ -12,6 +12,8 @@ use solana_sdk::{
|
||||
};
|
||||
use types::{
|
||||
account_address::AccountAddress,
|
||||
account_config,
|
||||
identifier::Identifier,
|
||||
transaction::{Program, TransactionArgument, TransactionOutput},
|
||||
};
|
||||
use vm::{
|
||||
@ -19,6 +21,7 @@ use vm::{
|
||||
file_format::{CompiledModule, CompiledScript},
|
||||
gas_schedule::{MAXIMUM_NUMBER_OF_GAS_UNITS, MAX_PRICE_PER_GAS_UNIT},
|
||||
transaction_metadata::TransactionMetadata,
|
||||
vm_string::VMString,
|
||||
};
|
||||
use vm_cache_map::Arena;
|
||||
use vm_runtime::{
|
||||
@ -27,8 +30,8 @@ use vm_runtime::{
|
||||
module_cache::{BlockModuleCache, ModuleCache, VMModuleCache},
|
||||
},
|
||||
txn_executor::TransactionExecutor,
|
||||
value::Local,
|
||||
};
|
||||
use vm_runtime_types::value::Value;
|
||||
|
||||
pub fn process_instruction(
|
||||
_program_id: &Pubkey,
|
||||
@ -76,14 +79,14 @@ impl MoveProcessor {
|
||||
InstructionError::InvalidAccountData
|
||||
}
|
||||
|
||||
fn arguments_to_locals(args: Vec<TransactionArgument>) -> Vec<Local> {
|
||||
fn arguments_to_values(args: Vec<TransactionArgument>) -> Vec<Value> {
|
||||
let mut locals = vec![];
|
||||
for arg in args {
|
||||
locals.push(match arg {
|
||||
TransactionArgument::U64(i) => Local::u64(i),
|
||||
TransactionArgument::Address(a) => Local::address(a),
|
||||
TransactionArgument::ByteArray(b) => Local::bytearray(b),
|
||||
TransactionArgument::String(s) => Local::string(s),
|
||||
TransactionArgument::U64(i) => Value::u64(i),
|
||||
TransactionArgument::Address(a) => Value::address(a),
|
||||
TransactionArgument::ByteArray(b) => Value::byte_array(b),
|
||||
TransactionArgument::String(s) => Value::string(VMString::new(s)),
|
||||
});
|
||||
}
|
||||
locals
|
||||
@ -137,13 +140,13 @@ impl MoveProcessor {
|
||||
let program: Program = serde_json::from_str(&string).map_err(map_json_error)?;
|
||||
|
||||
let script =
|
||||
CompiledScript::deserialize(&program.code()).map_err(map_vm_binary_error)?;
|
||||
CompiledScript::deserialize(&program.code()).map_err(map_err_vm_status)?;
|
||||
let modules = program
|
||||
.modules()
|
||||
.iter()
|
||||
.map(|bytes| CompiledModule::deserialize(&bytes))
|
||||
.collect::<Result<Vec<_>, _>>()
|
||||
.map_err(map_vm_binary_error)?;
|
||||
.map_err(map_err_vm_status)?;
|
||||
|
||||
Ok((script, modules))
|
||||
}
|
||||
@ -163,12 +166,12 @@ impl MoveProcessor {
|
||||
modules_bytes,
|
||||
} => {
|
||||
let script =
|
||||
VerifiedScript::deserialize(&script_bytes).map_err(map_vm_binary_error)?;
|
||||
VerifiedScript::deserialize(&script_bytes).map_err(map_err_vm_status)?;
|
||||
let modules = modules_bytes
|
||||
.iter()
|
||||
.map(|module_bytes| VerifiedModule::deserialize(&module_bytes.bytes))
|
||||
.collect::<Result<Vec<_>, _>>()
|
||||
.map_err(map_vm_binary_error)?;
|
||||
.map_err(map_err_vm_status)?;
|
||||
|
||||
Ok((script, modules))
|
||||
}
|
||||
@ -213,13 +216,16 @@ impl MoveProcessor {
|
||||
txn_metadata.gas_unit_price = *MAX_PRICE_PER_GAS_UNIT;
|
||||
|
||||
let mut vm = TransactionExecutor::new(&module_cache, data_store, txn_metadata);
|
||||
vm.execute_function(&module_id, &function_name, Self::arguments_to_locals(args))
|
||||
.map_err(map_vm_invariant_violation_error)?
|
||||
.map_err(map_vm_runtime_error)?;
|
||||
vm.execute_function(
|
||||
&module_id,
|
||||
&Identifier::new(function_name).unwrap(),
|
||||
Self::arguments_to_values(args),
|
||||
)
|
||||
.map_err(map_err_vm_status)?;
|
||||
|
||||
Ok(vm
|
||||
.make_write_set(modules_to_publish, Ok(Ok(())))
|
||||
.map_err(map_vm_runtime_error)?)
|
||||
.make_write_set(modules_to_publish, Ok(()))
|
||||
.map_err(map_err_vm_status)?)
|
||||
}
|
||||
|
||||
fn keyed_accounts_to_data_store(
|
||||
@ -251,11 +257,20 @@ impl MoveProcessor {
|
||||
.into_write_sets()
|
||||
.map_err(|_| InstructionError::GenericError)?;
|
||||
|
||||
// Genesis account holds both mint and stdlib under address 0x0
|
||||
// Genesis account holds both mint and stdlib
|
||||
let genesis_key = *keyed_accounts[GENESIS_INDEX].unsigned_key();
|
||||
let write_set = write_sets
|
||||
.remove(&AccountAddress::default())
|
||||
.ok_or_else(Self::missing_account)?;
|
||||
let mut write_set = write_sets
|
||||
.remove(&account_config::association_address())
|
||||
.ok_or_else(Self::missing_account)?
|
||||
.into_mut();
|
||||
for (access_path, write_op) in write_sets
|
||||
.remove(&account_config::core_code_address())
|
||||
.ok_or_else(Self::missing_account)?
|
||||
.into_iter()
|
||||
{
|
||||
write_set.push((access_path, write_op));
|
||||
}
|
||||
let write_set = write_set.freeze().unwrap();
|
||||
Self::serialize_and_enforce_length(
|
||||
&LibraAccountState::Genesis(write_set),
|
||||
&mut keyed_accounts[GENESIS_INDEX].account.data,
|
||||
@ -413,12 +428,11 @@ impl MoveProcessor {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use language_e2e_tests::account::AccountResource;
|
||||
use solana_sdk::account::Account;
|
||||
use solana_sdk::rent_calculator::RentCalculator;
|
||||
use solana_sdk::sysvar::rent;
|
||||
|
||||
const BIG_ENOUGH: usize = 6_000;
|
||||
const BIG_ENOUGH: usize = 10_000;
|
||||
|
||||
#[test]
|
||||
fn test_account_size() {
|
||||
@ -564,7 +578,7 @@ mod tests {
|
||||
})
|
||||
.unwrap(),
|
||||
),
|
||||
Err(InstructionError::InsufficientFunds)
|
||||
Err(InstructionError::CustomError(4002))
|
||||
);
|
||||
}
|
||||
|
||||
@ -589,8 +603,8 @@ mod tests {
|
||||
.read_account_resource(&accounts[GENESIS_INDEX + 1].address)
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(amount, AccountResource::read_balance(&payee_resource));
|
||||
assert_eq!(0, AccountResource::read_sequence_number(&payee_resource));
|
||||
assert_eq!(amount, payee_resource.balance());
|
||||
assert_eq!(0, payee_resource.sequence_number());
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -655,13 +669,10 @@ mod tests {
|
||||
let sender_resource = data_store.read_account_resource(&sender.address).unwrap();
|
||||
let payee_resource = data_store.read_account_resource(&payee.address).unwrap();
|
||||
|
||||
assert_eq!(
|
||||
amount_to_mint - amount,
|
||||
AccountResource::read_balance(&sender_resource)
|
||||
);
|
||||
assert_eq!(0, AccountResource::read_sequence_number(&sender_resource));
|
||||
assert_eq!(amount, AccountResource::read_balance(&payee_resource));
|
||||
assert_eq!(0, AccountResource::read_sequence_number(&payee_resource));
|
||||
assert_eq!(amount_to_mint - amount, sender_resource.balance());
|
||||
assert_eq!(0, sender_resource.sequence_number());
|
||||
assert_eq!(amount, payee_resource.balance());
|
||||
assert_eq!(0, payee_resource.sequence_number());
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -893,9 +904,13 @@ mod tests {
|
||||
owner: id(),
|
||||
..Account::default()
|
||||
};
|
||||
let mut genesis = Self::new(Pubkey::default(), account);
|
||||
genesis.account.data =
|
||||
bincode::serialize(&LibraAccountState::create_genesis(amount).unwrap()).unwrap();
|
||||
let mut genesis = Self::new(
|
||||
Pubkey::new(&account_config::association_address().to_vec()),
|
||||
account,
|
||||
);
|
||||
let pre_data = LibraAccountState::create_genesis(amount).unwrap();
|
||||
let _hi = "hello";
|
||||
genesis.account.data = bincode::serialize(&pre_data).unwrap();
|
||||
genesis
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-move-loader-program"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana Move Loader"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,9 +10,9 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.8"
|
||||
solana-logger = { path = "../../logger", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0" }
|
||||
solana-move-loader-api = { path = "../move_loader_api", version = "0.20.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
solana-move-loader-api = { path = "../move_loader_api", version = "0.20.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib", "cdylib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-noop-program"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana noop program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,8 +10,8 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.8"
|
||||
solana-logger = { path = "../../logger", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-stake-api"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana Stake program API"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -16,11 +16,11 @@ num-traits = "0.2"
|
||||
rand = "0.6.5"
|
||||
serde = "1.0.101"
|
||||
serde_derive = "1.0.101"
|
||||
solana-logger = { path = "../../logger", version = "0.20.0" }
|
||||
solana-metrics = { path = "../../metrics", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0" }
|
||||
solana-vote-api = { path = "../vote_api", version = "0.20.0" }
|
||||
solana-config-api = { path = "../config_api", version = "0.20.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.1" }
|
||||
solana-metrics = { path = "../../metrics", version = "0.20.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
solana-vote-api = { path = "../vote_api", version = "0.20.1" }
|
||||
solana-config-api = { path = "../config_api", version = "0.20.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-stake-program"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana stake program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,9 +10,9 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.8"
|
||||
solana-logger = { path = "../../logger", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0" }
|
||||
solana-stake-api = { path = "../stake_api", version = "0.20.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
solana-stake-api = { path = "../stake_api", version = "0.20.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib", "cdylib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-stake-tests"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana stake api tests"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,12 +10,12 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.8"
|
||||
solana-logger = { path = "../../logger", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0" }
|
||||
solana-stake-api = { path = "../stake_api", version = "0.20.0" }
|
||||
solana-stake-program = { path = "../stake_program", version = "0.20.0" }
|
||||
solana-vote-api = { path = "../vote_api", version = "0.20.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
solana-stake-api = { path = "../stake_api", version = "0.20.1" }
|
||||
solana-stake-program = { path = "../stake_program", version = "0.20.1" }
|
||||
solana-vote-api = { path = "../vote_api", version = "0.20.1" }
|
||||
|
||||
[dev-dependencies]
|
||||
solana-runtime = { path = "../../runtime", version = "0.20.0" }
|
||||
solana-runtime = { path = "../../runtime", version = "0.20.1" }
|
||||
assert_matches = "1.3.0"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-storage-api"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana Storage program API"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -17,8 +17,8 @@ num-derive = "0.3"
|
||||
num-traits = "0.2"
|
||||
serde = "1.0.101"
|
||||
serde_derive = "1.0.101"
|
||||
solana-logger = { path = "../../logger", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-storage-program"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana storage program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,12 +10,12 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.8"
|
||||
solana-logger = { path = "../../logger", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0" }
|
||||
solana-storage-api = { path = "../storage_api", version = "0.20.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
solana-storage-api = { path = "../storage_api", version = "0.20.1" }
|
||||
|
||||
[dev-dependencies]
|
||||
solana-runtime = { path = "../../runtime", version = "0.20.0" }
|
||||
solana-runtime = { path = "../../runtime", version = "0.20.1" }
|
||||
assert_matches = "1.3.0"
|
||||
bincode = "1.2.0"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-vest-api"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana Vest program API"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -16,11 +16,11 @@ num-derive = "0.2"
|
||||
num-traits = "0.2"
|
||||
serde = "1.0.100"
|
||||
serde_derive = "1.0.100"
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0-pre0" }
|
||||
solana-config-api = { path = "../config_api", version = "0.20.0-pre0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
solana-config-api = { path = "../config_api", version = "0.20.1" }
|
||||
|
||||
[dev-dependencies]
|
||||
solana-runtime = { path = "../../runtime", version = "0.20.0-pre0" }
|
||||
solana-runtime = { path = "../../runtime", version = "0.20.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-vest-program"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana Vest program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,9 +10,9 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.8"
|
||||
solana-logger = { path = "../../logger", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0" }
|
||||
solana-vest-api = { path = "../vest_api", version = "0.20.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
solana-vest-api = { path = "../vest_api", version = "0.20.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib", "cdylib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-vote-api"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana Vote program API"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -15,9 +15,9 @@ num-derive = "0.3"
|
||||
num-traits = "0.2"
|
||||
serde = "1.0.101"
|
||||
serde_derive = "1.0.101"
|
||||
solana-logger = { path = "../../logger", version = "0.20.0" }
|
||||
solana-metrics = { path = "../../metrics", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.1" }
|
||||
solana-metrics = { path = "../../metrics", version = "0.20.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-vote-program"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana Vote program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,9 +10,9 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.8"
|
||||
solana-logger = { path = "../../logger", version = "0.20.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.0" }
|
||||
solana-vote-api = { path = "../vote_api", version = "0.20.0" }
|
||||
solana-logger = { path = "../../logger", version = "0.20.1" }
|
||||
solana-sdk = { path = "../../sdk", version = "0.20.1" }
|
||||
solana-vote-api = { path = "../vote_api", version = "0.20.1" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["lib", "cdylib"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-rayon-threadlimit"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "solana-rayon-threadlimit"
|
||||
homepage = "https://solana.com/"
|
||||
readme = "../README.md"
|
||||
|
3
run.sh
3
run.sh
@ -69,7 +69,8 @@ solana-genesis \
|
||||
--bootstrap-vote-keypair "$dataDir"/leader-vote-account-keypair.json \
|
||||
--bootstrap-stake-keypair "$dataDir"/leader-stake-account-keypair.json \
|
||||
--bootstrap-storage-keypair "$dataDir"/leader-storage-account-keypair.json \
|
||||
--ledger "$ledgerDir"
|
||||
--ledger "$ledgerDir" \
|
||||
--dev
|
||||
|
||||
abort() {
|
||||
set +e
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-runtime"
|
||||
version = "0.20.0"
|
||||
version = "0.20.1"
|
||||
description = "Solana runtime"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -24,20 +24,20 @@ rayon = "1.2.0"
|
||||
serde = { version = "1.0.101", features = ["rc"] }
|
||||
serde_derive = "1.0.101"
|
||||
serde_json = "1.0.41"
|
||||
solana-logger = { path = "../logger", version = "0.20.0" }
|
||||
solana-measure = { path = "../measure", version = "0.20.0" }
|
||||
solana-metrics = { path = "../metrics", version = "0.20.0" }
|
||||
solana-bpf-loader-api = { path = "../programs/bpf_loader_api", version = "0.20.0" }
|
||||
solana-bpf-loader-program = { path = "../programs/bpf_loader_program", version = "0.20.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.0" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.20.0" }
|
||||
solana-stake-program = { path = "../programs/stake_program", version = "0.20.0" }
|
||||
solana-storage-api = { path = "../programs/storage_api", version = "0.20.0" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.20.0" }
|
||||
solana-vote-program = { path = "../programs/vote_program", version = "0.20.0" }
|
||||
solana-logger = { path = "../logger", version = "0.20.1" }
|
||||
solana-measure = { path = "../measure", version = "0.20.1" }
|
||||
solana-metrics = { path = "../metrics", version = "0.20.1" }
|
||||
solana-bpf-loader-api = { path = "../programs/bpf_loader_api", version = "0.20.1" }
|
||||
solana-bpf-loader-program = { path = "../programs/bpf_loader_program", version = "0.20.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.20.1" }
|
||||
solana-stake-api = { path = "../programs/stake_api", version = "0.20.1" }
|
||||
solana-stake-program = { path = "../programs/stake_program", version = "0.20.1" }
|
||||
solana-storage-api = { path = "../programs/storage_api", version = "0.20.1" }
|
||||
solana-vote-api = { path = "../programs/vote_api", version = "0.20.1" }
|
||||
solana-vote-program = { path = "../programs/vote_program", version = "0.20.1" }
|
||||
sys-info = "0.5.8"
|
||||
tempfile = "3.1.0"
|
||||
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "0.20.0" }
|
||||
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "0.20.1" }
|
||||
itertools = "0.8.0"
|
||||
|
||||
[lib]
|
||||
@ -45,4 +45,4 @@ crate-type = ["lib"]
|
||||
name = "solana_runtime"
|
||||
|
||||
[dev-dependencies]
|
||||
solana-noop-program = { path = "../programs/noop_program", version = "0.20.0" }
|
||||
solana-noop-program = { path = "../programs/noop_program", version = "0.20.1" }
|
||||
|
@ -1,34 +0,0 @@
|
||||
#![feature(test)]
|
||||
|
||||
extern crate test;
|
||||
|
||||
use solana_runtime::message_processor::is_zeroed;
|
||||
use test::Bencher;
|
||||
|
||||
const BUFSIZE: usize = 1024 * 1024 + 127;
|
||||
static BUF0: [u8; BUFSIZE] = [0; BUFSIZE];
|
||||
static BUF1: [u8; BUFSIZE] = [1; BUFSIZE];
|
||||
|
||||
#[bench]
|
||||
fn bench_is_zeroed(bencher: &mut Bencher) {
|
||||
bencher.iter(|| {
|
||||
is_zeroed(&BUF0);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_is_zeroed_not(bencher: &mut Bencher) {
|
||||
bencher.iter(|| {
|
||||
is_zeroed(&BUF1);
|
||||
});
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_is_zeroed_by_iter(bencher: &mut Bencher) {
|
||||
bencher.iter(|| BUF0.iter().all(|item| *item == 0));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_is_zeroed_not_by_iter(bencher: &mut Bencher) {
|
||||
bencher.iter(|| BUF1.iter().all(|item| *item == 0));
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user