Compare commits
34 Commits
Author | SHA1 | Date | |
---|---|---|---|
c53f163ef5 | |||
ca35854417 | |||
ab1fda2a54 | |||
a6ec77c230 | |||
1d7894f1be | |||
4866a1fc39 | |||
60c5e59a5e | |||
fd93bdadf6 | |||
6089db2a07 | |||
462d0cfc6c | |||
e6d6fc4391 | |||
092556ae5e | |||
ad9fa54a47 | |||
2d68170747 | |||
20f3d18458 | |||
be79efe9b7 | |||
5db377f743 | |||
9c2f45a1e0 | |||
8646918d00 | |||
7c44fc3561 | |||
686403eb1d | |||
6cf9b60a9c | |||
aca142df16 | |||
b2582196db | |||
85a77bec5f | |||
e781cbf4ba | |||
59956e4543 | |||
303417f981 | |||
fea03fdf33 | |||
e8160efc46 | |||
e0ba0d581c | |||
36eda29fc9 | |||
2ec73db6bd | |||
ef6ce2765e |
@ -4,7 +4,7 @@ version: '{build}'
|
|||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
- /v[0-9.]+/
|
- /^v[0-9.]+/
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
- '%USERPROFILE%\.cargo'
|
- '%USERPROFILE%\.cargo'
|
||||||
|
@ -17,7 +17,7 @@ script:
|
|||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
- /v.*/
|
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
slack:
|
slack:
|
||||||
|
469
Cargo.lock
generated
469
Cargo.lock
generated
@ -42,6 +42,11 @@ dependencies = [
|
|||||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "arc-swap"
|
||||||
|
version = "0.3.11"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "argon2rs"
|
name = "argon2rs"
|
||||||
version = "0.2.5"
|
version = "0.2.5"
|
||||||
@ -2131,6 +2136,24 @@ dependencies = [
|
|||||||
"opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "signal-hook"
|
||||||
|
version = "0.1.9"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"signal-hook-registry 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "signal-hook-registry"
|
||||||
|
version = "1.0.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"arc-swap 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "siphasher"
|
name = "siphasher"
|
||||||
version = "0.2.3"
|
version = "0.2.3"
|
||||||
@ -2159,7 +2182,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana"
|
name = "solana"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -2191,28 +2214,27 @@ dependencies = [
|
|||||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-budget-api 0.16.0",
|
"solana-budget-api 0.16.2",
|
||||||
"solana-budget-program 0.16.0",
|
"solana-budget-program 0.16.2",
|
||||||
"solana-chacha-sys 0.16.0",
|
"solana-chacha-sys 0.16.2",
|
||||||
"solana-client 0.16.0",
|
"solana-client 0.16.2",
|
||||||
"solana-config-program 0.16.0",
|
"solana-config-program 0.16.2",
|
||||||
"solana-drone 0.16.0",
|
"solana-drone 0.16.2",
|
||||||
"solana-ed25519-dalek 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"solana-ed25519-dalek 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-exchange-program 0.16.0",
|
"solana-exchange-program 0.16.2",
|
||||||
"solana-kvstore 0.16.0",
|
"solana-kvstore 0.16.2",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-merkle-tree 0.16.0",
|
"solana-metrics 0.16.2",
|
||||||
"solana-metrics 0.16.0",
|
"solana-netutil 0.16.2",
|
||||||
"solana-netutil 0.16.0",
|
"solana-runtime 0.16.2",
|
||||||
"solana-runtime 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-stake-api 0.16.2",
|
||||||
"solana-stake-api 0.16.0",
|
"solana-stake-program 0.16.2",
|
||||||
"solana-stake-program 0.16.0",
|
"solana-storage-api 0.16.2",
|
||||||
"solana-storage-api 0.16.0",
|
"solana-storage-program 0.16.2",
|
||||||
"solana-storage-program 0.16.0",
|
"solana-vote-api 0.16.2",
|
||||||
"solana-vote-api 0.16.0",
|
"solana-vote-program 0.16.2",
|
||||||
"solana-vote-program 0.16.0",
|
"solana-vote-signer 0.16.2",
|
||||||
"solana-vote-signer 0.16.0",
|
|
||||||
"sys-info 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"sys-info 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tokio 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tokio 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -2221,7 +2243,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-bench-exchange"
|
name = "solana-bench-exchange"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -2237,33 +2259,33 @@ dependencies = [
|
|||||||
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_yaml 0.8.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_yaml 0.8.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana 0.16.0",
|
"solana 0.16.2",
|
||||||
"solana-client 0.16.0",
|
"solana-client 0.16.2",
|
||||||
"solana-drone 0.16.0",
|
"solana-drone 0.16.2",
|
||||||
"solana-exchange-api 0.16.0",
|
"solana-exchange-api 0.16.2",
|
||||||
"solana-exchange-program 0.16.0",
|
"solana-exchange-program 0.16.2",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-metrics 0.16.0",
|
"solana-metrics 0.16.2",
|
||||||
"solana-netutil 0.16.0",
|
"solana-netutil 0.16.2",
|
||||||
"solana-runtime 0.16.0",
|
"solana-runtime 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
"untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ws 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ws 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-bench-streamer"
|
name = "solana-bench-streamer"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana 0.16.0",
|
"solana 0.16.2",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-netutil 0.16.0",
|
"solana-netutil 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-bench-tps"
|
name = "solana-bench-tps"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -2272,58 +2294,58 @@ dependencies = [
|
|||||||
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_yaml 0.8.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_yaml 0.8.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana 0.16.0",
|
"solana 0.16.2",
|
||||||
"solana-client 0.16.0",
|
"solana-client 0.16.2",
|
||||||
"solana-drone 0.16.0",
|
"solana-drone 0.16.2",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-metrics 0.16.0",
|
"solana-metrics 0.16.2",
|
||||||
"solana-netutil 0.16.0",
|
"solana-netutil 0.16.2",
|
||||||
"solana-runtime 0.16.0",
|
"solana-runtime 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-bpf-loader-api"
|
name = "solana-bpf-loader-api"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
"solana_rbpf 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
"solana_rbpf 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-bpf-loader-program"
|
name = "solana-bpf-loader-program"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-bpf-loader-api 0.16.0",
|
"solana-bpf-loader-api 0.16.2",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-bpf-programs"
|
name = "solana-bpf-programs"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"elf 0.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"elf 0.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-bpf-loader-api 0.16.0",
|
"solana-bpf-loader-api 0.16.2",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-runtime 0.16.0",
|
"solana-runtime 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
"solana_rbpf 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
"solana_rbpf 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"walkdir 2.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"walkdir 2.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-budget-api"
|
name = "solana-budget-api"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -2332,30 +2354,30 @@ dependencies = [
|
|||||||
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-runtime 0.16.0",
|
"solana-runtime 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-budget-program"
|
name = "solana-budget-program"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-budget-api 0.16.0",
|
"solana-budget-api 0.16.2",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-chacha-sys"
|
name = "solana-chacha-sys"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-client"
|
name = "solana-client"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -2368,37 +2390,37 @@ dependencies = [
|
|||||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-netutil 0.16.0",
|
"solana-netutil 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-config-api"
|
name = "solana-config-api"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-runtime 0.16.0",
|
"solana-runtime 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-config-program"
|
name = "solana-config-program"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-config-api 0.16.0",
|
"solana-config-api 0.16.2",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-drone"
|
name = "solana-drone"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -2407,9 +2429,9 @@ dependencies = [
|
|||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-metrics 0.16.0",
|
"solana-metrics 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
"tokio 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tokio 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
@ -2428,40 +2450,40 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-exchange-api"
|
name = "solana-exchange-api"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-metrics 0.16.0",
|
"solana-metrics 0.16.2",
|
||||||
"solana-runtime 0.16.0",
|
"solana-runtime 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-exchange-program"
|
name = "solana-exchange-program"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-exchange-api 0.16.0",
|
"solana-exchange-api 0.16.2",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-failure-program"
|
name = "solana-failure-program"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-runtime 0.16.0",
|
"solana-runtime 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-genesis"
|
name = "solana-genesis"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -2470,42 +2492,43 @@ dependencies = [
|
|||||||
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_yaml 0.8.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_yaml 0.8.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana 0.16.0",
|
"solana 0.16.2",
|
||||||
"solana-bpf-loader-api 0.16.0",
|
"solana-bpf-loader-api 0.16.2",
|
||||||
"solana-bpf-loader-program 0.16.0",
|
"solana-bpf-loader-program 0.16.2",
|
||||||
"solana-budget-api 0.16.0",
|
"solana-budget-api 0.16.2",
|
||||||
"solana-budget-program 0.16.0",
|
"solana-budget-program 0.16.2",
|
||||||
"solana-config-api 0.16.0",
|
"solana-config-api 0.16.2",
|
||||||
"solana-config-program 0.16.0",
|
"solana-config-program 0.16.2",
|
||||||
"solana-exchange-api 0.16.0",
|
"solana-exchange-api 0.16.2",
|
||||||
"solana-exchange-program 0.16.0",
|
"solana-exchange-program 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
"solana-stake-api 0.16.0",
|
"solana-stake-api 0.16.2",
|
||||||
"solana-stake-program 0.16.0",
|
"solana-stake-program 0.16.2",
|
||||||
"solana-storage-api 0.16.0",
|
"solana-storage-api 0.16.2",
|
||||||
"solana-storage-program 0.16.0",
|
"solana-storage-program 0.16.2",
|
||||||
"solana-token-api 0.16.0",
|
"solana-token-api 0.16.2",
|
||||||
"solana-token-program 0.16.0",
|
"solana-token-program 0.16.2",
|
||||||
"solana-vote-api 0.16.0",
|
"solana-vote-api 0.16.2",
|
||||||
"solana-vote-program 0.16.0",
|
"solana-vote-program 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-gossip"
|
name = "solana-gossip"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana 0.16.0",
|
"solana 0.16.2",
|
||||||
"solana-client 0.16.0",
|
"solana-client 0.16.2",
|
||||||
"solana-netutil 0.16.0",
|
"solana-netutil 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-install"
|
name = "solana-install"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -2516,15 +2539,17 @@ dependencies = [
|
|||||||
"indicatif 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"indicatif 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"reqwest 0.9.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
"reqwest 0.9.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_yaml 0.8.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_yaml 0.8.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-client 0.16.0",
|
"signal-hook 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-config-api 0.16.0",
|
"solana-client 0.16.2",
|
||||||
"solana-logger 0.16.0",
|
"solana-config-api 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
|
"solana-sdk 0.16.2",
|
||||||
"tar 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tar 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -2534,16 +2559,16 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-keygen"
|
name = "solana-keygen"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"dirs 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"dirs 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-kvstore"
|
name = "solana-kvstore"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -2558,35 +2583,35 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-ledger-tool"
|
name = "solana-ledger-tool"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"assert_cmd 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"assert_cmd 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana 0.16.0",
|
"solana 0.16.2",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-runtime 0.16.0",
|
"solana-runtime 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-logger"
|
name = "solana-logger"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-merkle-tree"
|
name = "solana-merkle-tree"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-metrics"
|
name = "solana-metrics"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"influx_db_client 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"influx_db_client 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -2594,13 +2619,13 @@ dependencies = [
|
|||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"reqwest 0.9.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
"reqwest 0.9.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
"sys-info 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"sys-info 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-netutil"
|
name = "solana-netutil"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -2608,33 +2633,33 @@ dependencies = [
|
|||||||
"nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"socket2 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
"socket2 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"tokio 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tokio 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-noop-program"
|
name = "solana-noop-program"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-replicator"
|
name = "solana-replicator"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana 0.16.0",
|
"solana 0.16.2",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-netutil 0.16.0",
|
"solana-netutil 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-runtime"
|
name = "solana-runtime"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bv 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bv 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -2652,23 +2677,23 @@ dependencies = [
|
|||||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-bpf-loader-api 0.16.0",
|
"solana-bpf-loader-api 0.16.2",
|
||||||
"solana-bpf-loader-program 0.16.0",
|
"solana-bpf-loader-program 0.16.2",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-metrics 0.16.0",
|
"solana-metrics 0.16.2",
|
||||||
"solana-noop-program 0.16.0",
|
"solana-noop-program 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
"solana-stake-api 0.16.0",
|
"solana-stake-api 0.16.2",
|
||||||
"solana-stake-program 0.16.0",
|
"solana-stake-program 0.16.2",
|
||||||
"solana-storage-api 0.16.0",
|
"solana-storage-api 0.16.2",
|
||||||
"solana-vote-api 0.16.0",
|
"solana-vote-api 0.16.2",
|
||||||
"solana-vote-program 0.16.0",
|
"solana-vote-program 0.16.2",
|
||||||
"sys-info 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"sys-info 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-sdk"
|
name = "solana-sdk"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -2689,66 +2714,67 @@ dependencies = [
|
|||||||
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-ed25519-dalek 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"solana-ed25519-dalek 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-stake-api"
|
name = "solana-stake-api"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-metrics 0.16.0",
|
"solana-metrics 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
"solana-vote-api 0.16.0",
|
"solana-vote-api 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-stake-program"
|
name = "solana-stake-program"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
"solana-stake-api 0.16.0",
|
"solana-stake-api 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-storage-api"
|
name = "solana-storage-api"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"num-derive 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num-derive 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-storage-program"
|
name = "solana-storage-program"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-runtime 0.16.0",
|
"solana-runtime 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
"solana-storage-api 0.16.0",
|
"solana-storage-api 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-token-api"
|
name = "solana-token-api"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -2756,73 +2782,73 @@ dependencies = [
|
|||||||
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-token-program"
|
name = "solana-token-program"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
"solana-token-api 0.16.0",
|
"solana-token-api 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-upload-perf"
|
name = "solana-upload-perf"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-metrics 0.16.0",
|
"solana-metrics 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-validator"
|
name = "solana-validator"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana 0.16.0",
|
"solana 0.16.2",
|
||||||
"solana-drone 0.16.0",
|
"solana-drone 0.16.2",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-metrics 0.16.0",
|
"solana-metrics 0.16.2",
|
||||||
"solana-netutil 0.16.0",
|
"solana-netutil 0.16.2",
|
||||||
"solana-runtime 0.16.0",
|
"solana-runtime 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
"solana-vote-api 0.16.0",
|
"solana-vote-api 0.16.2",
|
||||||
"solana-vote-signer 0.16.0",
|
"solana-vote-signer 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-vote-api"
|
name = "solana-vote-api"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-metrics 0.16.0",
|
"solana-metrics 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-vote-program"
|
name = "solana-vote-program"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
"solana-vote-api 0.16.0",
|
"solana-vote-api 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-vote-signer"
|
name = "solana-vote-signer"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -2832,13 +2858,13 @@ dependencies = [
|
|||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana-metrics 0.16.0",
|
"solana-metrics 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-wallet"
|
name = "solana-wallet"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -2848,18 +2874,18 @@ dependencies = [
|
|||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"solana 0.16.0",
|
"solana 0.16.2",
|
||||||
"solana-budget-api 0.16.0",
|
"solana-budget-api 0.16.2",
|
||||||
"solana-budget-program 0.16.0",
|
"solana-budget-program 0.16.2",
|
||||||
"solana-client 0.16.0",
|
"solana-client 0.16.2",
|
||||||
"solana-drone 0.16.0",
|
"solana-drone 0.16.2",
|
||||||
"solana-logger 0.16.0",
|
"solana-logger 0.16.2",
|
||||||
"solana-netutil 0.16.0",
|
"solana-netutil 0.16.2",
|
||||||
"solana-sdk 0.16.0",
|
"solana-sdk 0.16.2",
|
||||||
"solana-stake-api 0.16.0",
|
"solana-stake-api 0.16.2",
|
||||||
"solana-storage-api 0.16.0",
|
"solana-storage-api 0.16.2",
|
||||||
"solana-vote-api 0.16.0",
|
"solana-vote-api 0.16.2",
|
||||||
"solana-vote-signer 0.16.0",
|
"solana-vote-signer 0.16.2",
|
||||||
"url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -3482,6 +3508,7 @@ dependencies = [
|
|||||||
"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
|
"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
|
||||||
"checksum antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5"
|
"checksum antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5"
|
||||||
"checksum ar 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "579681b3fecd1e9d6b5ce6969e05f9feb913f296eddaf595be1166a5ca597bc4"
|
"checksum ar 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "579681b3fecd1e9d6b5ce6969e05f9feb913f296eddaf595be1166a5ca597bc4"
|
||||||
|
"checksum arc-swap 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "bc4662175ead9cd84451d5c35070517777949a2ed84551764129cedb88384841"
|
||||||
"checksum argon2rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3f67b0b6a86dae6e67ff4ca2b6201396074996379fba2b92ff649126f37cb392"
|
"checksum argon2rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3f67b0b6a86dae6e67ff4ca2b6201396074996379fba2b92ff649126f37cb392"
|
||||||
"checksum arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee"
|
"checksum arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee"
|
||||||
"checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71"
|
"checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71"
|
||||||
@ -3715,6 +3742,8 @@ dependencies = [
|
|||||||
"checksum sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "23962131a91661d643c98940b20fcaffe62d776a823247be80a48fcb8b6fce68"
|
"checksum sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "23962131a91661d643c98940b20fcaffe62d776a823247be80a48fcb8b6fce68"
|
||||||
"checksum sha2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9eb6be24e4c23a84d7184280d2722f7f2731fcdd4a9d886efbfe4413e4847ea0"
|
"checksum sha2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9eb6be24e4c23a84d7184280d2722f7f2731fcdd4a9d886efbfe4413e4847ea0"
|
||||||
"checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d"
|
"checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d"
|
||||||
|
"checksum signal-hook 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "72ab58f1fda436857e6337dcb6a5aaa34f16c5ddc87b3a8b6ef7a212f90b9c5a"
|
||||||
|
"checksum signal-hook-registry 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cded4ffa32146722ec54ab1f16320568465aa922aa9ab4708129599740da85d7"
|
||||||
"checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac"
|
"checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac"
|
||||||
"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
|
"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
|
||||||
"checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be"
|
"checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
name = "solana-bench-exchange"
|
name = "solana-bench-exchange"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
homepage = "https://solana.com/"
|
homepage = "https://solana.com/"
|
||||||
@ -24,16 +24,16 @@ serde_derive = "1.0.92"
|
|||||||
serde_json = "1.0.39"
|
serde_json = "1.0.39"
|
||||||
serde_yaml = "0.8.9"
|
serde_yaml = "0.8.9"
|
||||||
# solana-runtime = { path = "../solana/runtime"}
|
# solana-runtime = { path = "../solana/runtime"}
|
||||||
solana = { path = "../core", version = "0.16.0" }
|
solana = { path = "../core", version = "0.16.2" }
|
||||||
solana-client = { path = "../client", version = "0.16.0" }
|
solana-client = { path = "../client", version = "0.16.2" }
|
||||||
solana-drone = { path = "../drone", version = "0.16.0" }
|
solana-drone = { path = "../drone", version = "0.16.2" }
|
||||||
solana-exchange-api = { path = "../programs/exchange_api", version = "0.16.0" }
|
solana-exchange-api = { path = "../programs/exchange_api", version = "0.16.2" }
|
||||||
solana-exchange-program = { path = "../programs/exchange_program", version = "0.16.0" }
|
solana-exchange-program = { path = "../programs/exchange_program", version = "0.16.2" }
|
||||||
solana-logger = { path = "../logger", version = "0.16.0" }
|
solana-logger = { path = "../logger", version = "0.16.2" }
|
||||||
solana-metrics = { path = "../metrics", version = "0.16.0" }
|
solana-metrics = { path = "../metrics", version = "0.16.2" }
|
||||||
solana-netutil = { path = "../netutil", version = "0.16.0" }
|
solana-netutil = { path = "../netutil", version = "0.16.2" }
|
||||||
solana-runtime = { path = "../runtime", version = "0.16.0" }
|
solana-runtime = { path = "../runtime", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../sdk", version = "0.16.2" }
|
||||||
untrusted = "0.6.2"
|
untrusted = "0.6.2"
|
||||||
ws = "0.8.1"
|
ws = "0.8.1"
|
||||||
|
|
||||||
|
@ -2,16 +2,16 @@
|
|||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
name = "solana-bench-streamer"
|
name = "solana-bench-streamer"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
homepage = "https://solana.com/"
|
homepage = "https://solana.com/"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = "2.33.0"
|
clap = "2.33.0"
|
||||||
solana = { path = "../core", version = "0.16.0" }
|
solana = { path = "../core", version = "0.16.2" }
|
||||||
solana-logger = { path = "../logger", version = "0.16.0" }
|
solana-logger = { path = "../logger", version = "0.16.2" }
|
||||||
solana-netutil = { path = "../netutil", version = "0.16.0" }
|
solana-netutil = { path = "../netutil", version = "0.16.2" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
cuda = ["solana/cuda"]
|
cuda = ["solana/cuda"]
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
name = "solana-bench-tps"
|
name = "solana-bench-tps"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
homepage = "https://solana.com/"
|
homepage = "https://solana.com/"
|
||||||
@ -15,14 +15,14 @@ serde = "1.0.92"
|
|||||||
serde_derive = "1.0.92"
|
serde_derive = "1.0.92"
|
||||||
serde_json = "1.0.39"
|
serde_json = "1.0.39"
|
||||||
serde_yaml = "0.8.9"
|
serde_yaml = "0.8.9"
|
||||||
solana = { path = "../core", version = "0.16.0" }
|
solana = { path = "../core", version = "0.16.2" }
|
||||||
solana-client = { path = "../client", version = "0.16.0" }
|
solana-client = { path = "../client", version = "0.16.2" }
|
||||||
solana-drone = { path = "../drone", version = "0.16.0" }
|
solana-drone = { path = "../drone", version = "0.16.2" }
|
||||||
solana-logger = { path = "../logger", version = "0.16.0" }
|
solana-logger = { path = "../logger", version = "0.16.2" }
|
||||||
solana-metrics = { path = "../metrics", version = "0.16.0" }
|
solana-metrics = { path = "../metrics", version = "0.16.2" }
|
||||||
solana-netutil = { path = "../netutil", version = "0.16.0" }
|
solana-netutil = { path = "../netutil", version = "0.16.2" }
|
||||||
solana-runtime = { path = "../runtime", version = "0.16.0" }
|
solana-runtime = { path = "../runtime", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../sdk", version = "0.16.2" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
cuda = ["solana/cuda"]
|
cuda = ["solana/cuda"]
|
||||||
|
@ -25,6 +25,7 @@ Methods
|
|||||||
* [getAccountInfo](#getaccountinfo)
|
* [getAccountInfo](#getaccountinfo)
|
||||||
* [getBalance](#getbalance)
|
* [getBalance](#getbalance)
|
||||||
* [getClusterNodes](#getclusternodes)
|
* [getClusterNodes](#getclusternodes)
|
||||||
|
* [getProgramAccounts](#getprogramaccounts)
|
||||||
* [getRecentBlockhash](#getrecentblockhash)
|
* [getRecentBlockhash](#getrecentblockhash)
|
||||||
* [getSignatureStatus](#getsignaturestatus)
|
* [getSignatureStatus](#getsignaturestatus)
|
||||||
* [getSlotLeader](#getslotleader)
|
* [getSlotLeader](#getslotleader)
|
||||||
@ -96,6 +97,32 @@ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "
|
|||||||
{"jsonrpc":"2.0","result":true,"id":1}
|
{"jsonrpc":"2.0","result":true,"id":1}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### getAccountInfo
|
||||||
|
Returns all information associated with the account of provided Pubkey
|
||||||
|
|
||||||
|
##### Parameters:
|
||||||
|
* `string` - Pubkey of account to query, as base-58 encoded string
|
||||||
|
|
||||||
|
##### Results:
|
||||||
|
The result field will be a JSON object with the following sub fields:
|
||||||
|
|
||||||
|
* `lamports`, number of lamports assigned to this account, as a signed 64-bit integer
|
||||||
|
* `owner`, array of 32 bytes representing the program this account has been assigned to
|
||||||
|
* `data`, array of bytes representing any data associated with the account
|
||||||
|
* `executable`, boolean indicating if the account contains a program (and is strictly read-only)
|
||||||
|
|
||||||
|
##### Example:
|
||||||
|
```bash
|
||||||
|
// Request
|
||||||
|
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}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### getBalance
|
### getBalance
|
||||||
@ -142,28 +169,29 @@ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### getAccountInfo
|
### getProgramAccounts
|
||||||
Returns all information associated with the account of provided Pubkey
|
Returns all accounts owned by the provided program Pubkey
|
||||||
|
|
||||||
##### Parameters:
|
##### Parameters:
|
||||||
* `string` - Pubkey of account to query, as base-58 encoded string
|
* `string` - Pubkey of program, as base-58 encoded string
|
||||||
|
|
||||||
##### Results:
|
##### Results:
|
||||||
The result field will be a JSON object with the following sub fields:
|
The result field will be an array of arrays. Each sub array will contain:
|
||||||
|
* `string` - a the account Pubkey as base-58 encoded string
|
||||||
|
and a JSON object, with the following sub fields:
|
||||||
|
|
||||||
* `lamports`, number of lamports assigned to this account, as a signed 64-bit integer
|
* `lamports`, number of lamports assigned to this account, as a signed 64-bit integer
|
||||||
* `owner`, array of 32 bytes representing the program this account has been assigned to
|
* `owner`, array of 32 bytes representing the program this account has been assigned to
|
||||||
* `data`, array of bytes representing any data associated with the account
|
* `data`, array of bytes representing any data associated with the account
|
||||||
* `executable`, boolean indicating if the account contains a program (and is strictly read-only)
|
* `executable`, boolean indicating if the account contains a program (and is strictly read-only)
|
||||||
* `loader`, array of 32 bytes representing the loader for this program (if `executable`), otherwise all
|
|
||||||
|
|
||||||
##### Example:
|
##### Example:
|
||||||
```bash
|
```bash
|
||||||
// Request
|
// Request
|
||||||
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"getAccountInfo", "params":["2gVkYWexTHR5Hb2aLeQN3tnngvWzisFKXDUPrgMHpdST"]}' http://localhost:8899
|
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"getProgramAccounts", "params":["8nQwAgzN2yyUzrukXsCa3JELBYqDQrqJ3UyHiWazWxHR"]}' http://localhost:8899
|
||||||
|
|
||||||
// Result
|
// Result
|
||||||
{"jsonrpc":"2.0","result":{"executable":false,"loader":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"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":[["BqGKYtAKu69ZdWEBtZHh4xgJY1BYa2YBiBReQE3pe383", {"executable":false,"owner":[50,28,250,90,221,24,94,136,147,165,253,136,1,62,196,215,225,34,222,212,99,84,202,223,245,13,149,99,149,231,91,96],"lamports":1,"data":[]], ["4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T", {"executable":false,"owner":[50,28,250,90,221,24,94,136,147,165,253,136,1,62,196,215,225,34,222,212,99,84,202,223,245,13,149,99,149,231,91,96],"lamports":10,"data":[]]]},"id":1}
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -402,7 +430,7 @@ for a given account public key changes
|
|||||||
|
|
||||||
##### Notification Format:
|
##### Notification Format:
|
||||||
```bash
|
```bash
|
||||||
{"jsonrpc": "2.0","method": "accountNotification", "params": {"result": {"executable":false,"loader":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"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,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}}
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-chacha-sys"
|
name = "solana-chacha-sys"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana chacha-sys"
|
description = "Solana chacha-sys"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
|
10
ci/env.sh
10
ci/env.sh
@ -33,9 +33,15 @@ if [[ -n $CI ]]; then
|
|||||||
export CI_PULL_REQUEST=
|
export CI_PULL_REQUEST=
|
||||||
fi
|
fi
|
||||||
export CI_OS_NAME=linux
|
export CI_OS_NAME=linux
|
||||||
export CI_REPO_SLUG=$BUILDKITE_ORGANIZATION_SLUG/$BUILDKITE_PIPELINE_SLUG
|
if [[ -n $BUILDKITE_TRIGGERED_FROM_BUILD_PIPELINE_SLUG ]]; then
|
||||||
|
# The solana-secondary pipeline should use the slug of the pipeline that
|
||||||
|
# triggered it
|
||||||
|
export CI_REPO_SLUG=$BUILDKITE_ORGANIZATION_SLUG/$BUILDKITE_TRIGGERED_FROM_BUILD_PIPELINE_SLUG
|
||||||
|
else
|
||||||
|
export CI_REPO_SLUG=$BUILDKITE_ORGANIZATION_SLUG/$BUILDKITE_PIPELINE_SLUG
|
||||||
|
fi
|
||||||
# TRIGGERED_BUILDKITE_TAG is a workaround to propagate BUILDKITE_TAG into
|
# TRIGGERED_BUILDKITE_TAG is a workaround to propagate BUILDKITE_TAG into
|
||||||
# the solana-secondary builder
|
# the solana-secondary pipeline
|
||||||
if [[ -n $TRIGGERED_BUILDKITE_TAG ]]; then
|
if [[ -n $TRIGGERED_BUILDKITE_TAG ]]; then
|
||||||
export CI_TAG=$TRIGGERED_BUILDKITE_TAG
|
export CI_TAG=$TRIGGERED_BUILDKITE_TAG
|
||||||
else
|
else
|
||||||
|
@ -120,16 +120,16 @@ if [[ "$CI_OS_NAME" = linux ]]; then
|
|||||||
MAYBE_METRICS_TARBALL=solana-metrics.tar.bz2
|
MAYBE_METRICS_TARBALL=solana-metrics.tar.bz2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo --- Saving build artifacts
|
|
||||||
source ci/upload-ci-artifact.sh
|
source ci/upload-ci-artifact.sh
|
||||||
upload-ci-artifact solana-release-$TARGET.tar.bz2
|
|
||||||
|
|
||||||
if [[ -n $DO_NOT_PUBLISH_TAR ]]; then
|
|
||||||
echo Skipped due to DO_NOT_PUBLISH_TAR
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
for file in solana-release-$TARGET.tar.bz2 solana-install-init-"$TARGET"* $MAYBE_METRICS_TARBALL; do
|
for file in solana-release-$TARGET.tar.bz2 solana-install-init-"$TARGET"* $MAYBE_METRICS_TARBALL; do
|
||||||
|
upload-ci-artifact "$file"
|
||||||
|
|
||||||
|
if [[ -n $DO_NOT_PUBLISH_TAR ]]; then
|
||||||
|
echo "Skipped $file due to DO_NOT_PUBLISH_TAR"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -n $BUILDKITE ]]; then
|
if [[ -n $BUILDKITE ]]; then
|
||||||
echo --- AWS S3 Store: "$file"
|
echo --- AWS S3 Store: "$file"
|
||||||
(
|
(
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-client"
|
name = "solana-client"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana Client"
|
description = "Solana Client"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -19,10 +19,10 @@ reqwest = "0.9.18"
|
|||||||
serde = "1.0.92"
|
serde = "1.0.92"
|
||||||
serde_derive = "1.0.92"
|
serde_derive = "1.0.92"
|
||||||
serde_json = "1.0.39"
|
serde_json = "1.0.39"
|
||||||
solana-netutil = { path = "../netutil", version = "0.16.0" }
|
solana-netutil = { path = "../netutil", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../sdk", version = "0.16.2" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
jsonrpc-core = "12.0.0"
|
jsonrpc-core = "12.0.0"
|
||||||
jsonrpc-http-server = "12.0.0"
|
jsonrpc-http-server = "12.0.0"
|
||||||
solana-logger = { path = "../logger", version = "0.16.0" }
|
solana-logger = { path = "../logger", version = "0.16.2" }
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana"
|
name = "solana"
|
||||||
description = "Blockchain, Rebuilt for Scale"
|
description = "Blockchain, Rebuilt for Scale"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
documentation = "https://docs.rs/solana"
|
documentation = "https://docs.rs/solana"
|
||||||
homepage = "https://solana.com/"
|
homepage = "https://solana.com/"
|
||||||
readme = "../README.md"
|
readme = "../README.md"
|
||||||
@ -45,27 +45,27 @@ rocksdb = "0.11.0"
|
|||||||
serde = "1.0.92"
|
serde = "1.0.92"
|
||||||
serde_derive = "1.0.92"
|
serde_derive = "1.0.92"
|
||||||
serde_json = "1.0.39"
|
serde_json = "1.0.39"
|
||||||
solana-budget-api = { path = "../programs/budget_api", version = "0.16.0" }
|
solana-budget-api = { path = "../programs/budget_api", version = "0.16.2" }
|
||||||
solana-budget-program = { path = "../programs/budget_program", version = "0.16.0" }
|
solana-budget-program = { path = "../programs/budget_program", version = "0.16.2" }
|
||||||
solana-chacha-sys = { path = "../chacha-sys", version = "0.16.0" }
|
solana-chacha-sys = { path = "../chacha-sys", version = "0.16.2" }
|
||||||
solana-client = { path = "../client", version = "0.16.0" }
|
solana-client = { path = "../client", version = "0.16.2" }
|
||||||
solana-config-program = { path = "../programs/config_program", version = "0.16.0" }
|
solana-config-program = { path = "../programs/config_program", version = "0.16.2" }
|
||||||
solana-drone = { path = "../drone", version = "0.16.0" }
|
solana-drone = { path = "../drone", version = "0.16.2" }
|
||||||
solana-ed25519-dalek = "0.2.0"
|
solana-ed25519-dalek = "0.2.0"
|
||||||
solana-exchange-program = { path = "../programs/exchange_program", version = "0.16.0" }
|
solana-exchange-program = { path = "../programs/exchange_program", version = "0.16.2" }
|
||||||
solana-kvstore = { path = "../kvstore", version = "0.16.0", optional = true }
|
solana-kvstore = { path = "../kvstore", version = "0.16.2", optional = true }
|
||||||
solana-logger = { path = "../logger", version = "0.16.0" }
|
solana-logger = { path = "../logger", version = "0.16.2" }
|
||||||
solana-metrics = { path = "../metrics", version = "0.16.0" }
|
solana-metrics = { path = "../metrics", version = "0.16.2" }
|
||||||
solana-netutil = { path = "../netutil", version = "0.16.0" }
|
solana-netutil = { path = "../netutil", version = "0.16.2" }
|
||||||
solana-runtime = { path = "../runtime", version = "0.16.0" }
|
solana-runtime = { path = "../runtime", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../sdk", version = "0.16.2" }
|
||||||
solana-stake-api = { path = "../programs/stake_api", version = "0.16.0" }
|
solana-stake-api = { path = "../programs/stake_api", version = "0.16.2" }
|
||||||
solana-stake-program = { path = "../programs/stake_program", version = "0.16.0" }
|
solana-stake-program = { path = "../programs/stake_program", version = "0.16.2" }
|
||||||
solana-storage-api = { path = "../programs/storage_api", version = "0.16.0" }
|
solana-storage-api = { path = "../programs/storage_api", version = "0.16.2" }
|
||||||
solana-storage-program = { path = "../programs/storage_program", version = "0.16.0" }
|
solana-storage-program = { path = "../programs/storage_program", version = "0.16.2" }
|
||||||
solana-vote-api = { path = "../programs/vote_api", version = "0.16.0" }
|
solana-vote-api = { path = "../programs/vote_api", version = "0.16.2" }
|
||||||
solana-vote-program = { path = "../programs/vote_program", version = "0.16.0" }
|
solana-vote-program = { path = "../programs/vote_program", version = "0.16.2" }
|
||||||
solana-vote-signer = { path = "../vote-signer", version = "0.16.0" }
|
solana-vote-signer = { path = "../vote-signer", version = "0.16.2" }
|
||||||
sys-info = "0.5.7"
|
sys-info = "0.5.7"
|
||||||
tokio = "0.1"
|
tokio = "0.1"
|
||||||
tokio-codec = "0.1"
|
tokio-codec = "0.1"
|
||||||
|
@ -329,8 +329,9 @@ impl BankForks {
|
|||||||
names.sort();
|
names.sort();
|
||||||
let mut bank_maps = vec![];
|
let mut bank_maps = vec![];
|
||||||
let status_cache_rc = StatusCacheRc::default();
|
let status_cache_rc = StatusCacheRc::default();
|
||||||
|
let id = (names[names.len() - 1] + 1) as usize;
|
||||||
let mut bank0 =
|
let mut bank0 =
|
||||||
Bank::create_with_genesis(&genesis_block, account_paths.clone(), &status_cache_rc);
|
Bank::create_with_genesis(&genesis_block, account_paths.clone(), &status_cache_rc, id);
|
||||||
bank0.freeze();
|
bank0.freeze();
|
||||||
let bank_root = BankForks::load_snapshots(
|
let bank_root = BankForks::load_snapshots(
|
||||||
&names,
|
&names,
|
||||||
|
@ -748,7 +748,7 @@ impl ClusterInfo {
|
|||||||
|
|
||||||
/// retransmit messages to a list of nodes
|
/// retransmit messages to a list of nodes
|
||||||
/// # Remarks
|
/// # Remarks
|
||||||
/// We need to avoid having obj locked while doing any io, such as the `send_to`
|
/// We need to avoid having obj locked while doing a io, such as the `send_to`
|
||||||
pub fn retransmit_to(
|
pub fn retransmit_to(
|
||||||
obj: &Arc<RwLock<Self>>,
|
obj: &Arc<RwLock<Self>>,
|
||||||
peers: &[ContactInfo],
|
peers: &[ContactInfo],
|
||||||
@ -1092,7 +1092,7 @@ impl ClusterInfo {
|
|||||||
if caller.contact_info().is_none() {
|
if caller.contact_info().is_none() {
|
||||||
return vec![];
|
return vec![];
|
||||||
}
|
}
|
||||||
let mut from = caller.contact_info().cloned().unwrap();
|
let from = caller.contact_info().unwrap();
|
||||||
if from.id == self_id {
|
if from.id == self_id {
|
||||||
warn!(
|
warn!(
|
||||||
"PullRequest ignored, I'm talking to myself: me={} remoteme={}",
|
"PullRequest ignored, I'm talking to myself: me={} remoteme={}",
|
||||||
@ -1110,15 +1110,10 @@ impl ClusterInfo {
|
|||||||
let len = data.len();
|
let len = data.len();
|
||||||
trace!("get updates since response {}", len);
|
trace!("get updates since response {}", len);
|
||||||
let rsp = Protocol::PullResponse(self_id, data);
|
let rsp = Protocol::PullResponse(self_id, data);
|
||||||
// The remote node may not know its public IP:PORT. Record what it looks like to us.
|
// The remote node may not know its public IP:PORT. Instead of responding to the caller's
|
||||||
// This may or may not be correct for everybody, but it's better than leaving the remote with
|
// gossip addr, respond to the origin addr.
|
||||||
// an unspecified address in our table
|
|
||||||
if from.gossip.ip().is_unspecified() {
|
|
||||||
inc_new_counter_debug!("cluster_info-window-request-updates-unspec-gossip", 1);
|
|
||||||
from.gossip = *from_addr;
|
|
||||||
}
|
|
||||||
inc_new_counter_debug!("cluster_info-pull_request-rsp", len);
|
inc_new_counter_debug!("cluster_info-pull_request-rsp", len);
|
||||||
to_shared_blob(rsp, from.gossip).ok().into_iter().collect()
|
to_shared_blob(rsp, *from_addr).ok().into_iter().collect()
|
||||||
}
|
}
|
||||||
fn handle_pull_response(me: &Arc<RwLock<Self>>, from: &Pubkey, data: Vec<CrdsValue>) {
|
fn handle_pull_response(me: &Arc<RwLock<Self>>, from: &Pubkey, data: Vec<CrdsValue>) {
|
||||||
let len = data.len();
|
let len = data.len();
|
||||||
|
@ -260,14 +260,16 @@ impl ClusterInfoRepairListener {
|
|||||||
num_slots_to_repair: usize,
|
num_slots_to_repair: usize,
|
||||||
epoch_schedule: &EpochSchedule,
|
epoch_schedule: &EpochSchedule,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
let slot_iter = blocktree.rooted_slot_iterator(repairee_epoch_slots.root + 1);
|
let slot_iter = blocktree.rooted_slot_iterator(repairee_epoch_slots.root);
|
||||||
|
|
||||||
if slot_iter.is_err() {
|
if slot_iter.is_err() {
|
||||||
warn!("Root for repairee is on different fork OR replay_stage hasn't marked this slot as root yet");
|
info!(
|
||||||
|
"Root for repairee is on different fork. My root: {}, repairee_root: {}",
|
||||||
|
my_root, repairee_epoch_slots.root
|
||||||
|
);
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
let slot_iter = slot_iter?;
|
let mut slot_iter = slot_iter?;
|
||||||
|
|
||||||
let mut total_data_blobs_sent = 0;
|
let mut total_data_blobs_sent = 0;
|
||||||
let mut total_coding_blobs_sent = 0;
|
let mut total_coding_blobs_sent = 0;
|
||||||
@ -276,6 +278,10 @@ impl ClusterInfoRepairListener {
|
|||||||
epoch_schedule.get_stakers_epoch(repairee_epoch_slots.root);
|
epoch_schedule.get_stakers_epoch(repairee_epoch_slots.root);
|
||||||
let max_confirmed_repairee_slot =
|
let max_confirmed_repairee_slot =
|
||||||
epoch_schedule.get_last_slot_in_epoch(max_confirmed_repairee_epoch);
|
epoch_schedule.get_last_slot_in_epoch(max_confirmed_repairee_epoch);
|
||||||
|
|
||||||
|
// Skip the first slot in the iterator because we know it's the root slot which the repairee
|
||||||
|
// already has
|
||||||
|
slot_iter.next();
|
||||||
for (slot, slot_meta) in slot_iter {
|
for (slot, slot_meta) in slot_iter {
|
||||||
if slot > my_root
|
if slot > my_root
|
||||||
|| num_slots_repaired >= num_slots_to_repair
|
|| num_slots_repaired >= num_slots_to_repair
|
||||||
|
@ -23,7 +23,6 @@ use solana_sdk::account_utils::State;
|
|||||||
use solana_sdk::client::{AsyncClient, SyncClient};
|
use solana_sdk::client::{AsyncClient, SyncClient};
|
||||||
use solana_sdk::hash::{Hash, Hasher};
|
use solana_sdk::hash::{Hash, Hasher};
|
||||||
use solana_sdk::message::Message;
|
use solana_sdk::message::Message;
|
||||||
use solana_sdk::pubkey::Pubkey;
|
|
||||||
use solana_sdk::signature::{Keypair, KeypairUtil, Signature};
|
use solana_sdk::signature::{Keypair, KeypairUtil, Signature};
|
||||||
use solana_sdk::timing::timestamp;
|
use solana_sdk::timing::timestamp;
|
||||||
use solana_sdk::transaction::Transaction;
|
use solana_sdk::transaction::Transaction;
|
||||||
@ -303,7 +302,7 @@ impl Replicator {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn run(&mut self, mining_pool_pubkey: Pubkey) {
|
pub fn run(&mut self) {
|
||||||
info!("waiting for ledger download");
|
info!("waiting for ledger download");
|
||||||
self.thread_handles.pop().unwrap().join().unwrap();
|
self.thread_handles.pop().unwrap().join().unwrap();
|
||||||
self.encrypt_ledger()
|
self.encrypt_ledger()
|
||||||
@ -330,11 +329,11 @@ impl Replicator {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
self.blockhash = storage_blockhash;
|
self.blockhash = storage_blockhash;
|
||||||
self.redeem_rewards(&mining_pool_pubkey);
|
self.redeem_rewards();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn redeem_rewards(&self, mining_pool_pubkey: &Pubkey) {
|
fn redeem_rewards(&self) {
|
||||||
let nodes = self.cluster_info.read().unwrap().tvu_peers();
|
let nodes = self.cluster_info.read().unwrap().tvu_peers();
|
||||||
let client = crate::gossip_service::get_client(&nodes);
|
let client = crate::gossip_service::get_client(&nodes);
|
||||||
|
|
||||||
@ -347,7 +346,6 @@ impl Replicator {
|
|||||||
let ix = storage_instruction::claim_reward(
|
let ix = storage_instruction::claim_reward(
|
||||||
&self.keypair.pubkey(),
|
&self.keypair.pubkey(),
|
||||||
&self.storage_keypair.pubkey(),
|
&self.storage_keypair.pubkey(),
|
||||||
mining_pool_pubkey,
|
|
||||||
);
|
);
|
||||||
let message = Message::new_with_payer(vec![ix], Some(&self.keypair.pubkey()));
|
let message = Message::new_with_payer(vec![ix], Some(&self.keypair.pubkey()));
|
||||||
if let Err(e) = client.send_message(&[&self.keypair], message) {
|
if let Err(e) = client.send_message(&[&self.keypair], message) {
|
||||||
|
@ -70,6 +70,15 @@ impl JsonRpcRequestProcessor {
|
|||||||
.ok_or_else(Error::invalid_request)
|
.ok_or_else(Error::invalid_request)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn get_program_accounts(&self, program_id: &Pubkey) -> Result<Vec<(String, Account)>> {
|
||||||
|
Ok(self
|
||||||
|
.bank()
|
||||||
|
.get_program_accounts_modified_since_parent(&program_id)
|
||||||
|
.into_iter()
|
||||||
|
.map(|(pubkey, account)| (pubkey.to_string(), account))
|
||||||
|
.collect())
|
||||||
|
}
|
||||||
|
|
||||||
pub fn get_balance(&self, pubkey: &Pubkey) -> u64 {
|
pub fn get_balance(&self, pubkey: &Pubkey) -> u64 {
|
||||||
self.bank().get_balance(&pubkey)
|
self.bank().get_balance(&pubkey)
|
||||||
}
|
}
|
||||||
@ -210,6 +219,9 @@ pub trait RpcSol {
|
|||||||
#[rpc(meta, name = "getAccountInfo")]
|
#[rpc(meta, name = "getAccountInfo")]
|
||||||
fn get_account_info(&self, _: Self::Metadata, _: String) -> Result<Account>;
|
fn get_account_info(&self, _: Self::Metadata, _: String) -> Result<Account>;
|
||||||
|
|
||||||
|
#[rpc(meta, name = "getProgramAccounts")]
|
||||||
|
fn get_program_accounts(&self, _: Self::Metadata, _: String) -> Result<Vec<(String, Account)>>;
|
||||||
|
|
||||||
#[rpc(meta, name = "getBalance")]
|
#[rpc(meta, name = "getBalance")]
|
||||||
fn get_balance(&self, _: Self::Metadata, _: String) -> Result<u64>;
|
fn get_balance(&self, _: Self::Metadata, _: String) -> Result<u64>;
|
||||||
|
|
||||||
@ -297,6 +309,19 @@ impl RpcSol for RpcSolImpl {
|
|||||||
.get_account_info(&pubkey)
|
.get_account_info(&pubkey)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn get_program_accounts(
|
||||||
|
&self,
|
||||||
|
meta: Self::Metadata,
|
||||||
|
id: String,
|
||||||
|
) -> Result<Vec<(String, Account)>> {
|
||||||
|
debug!("get_program_accounts rpc request received: {:?}", id);
|
||||||
|
let program_id = verify_pubkey(id)?;
|
||||||
|
meta.request_processor
|
||||||
|
.read()
|
||||||
|
.unwrap()
|
||||||
|
.get_program_accounts(&program_id)
|
||||||
|
}
|
||||||
|
|
||||||
fn get_balance(&self, meta: Self::Metadata, id: String) -> Result<u64> {
|
fn get_balance(&self, meta: Self::Metadata, id: String) -> Result<u64> {
|
||||||
debug!("get_balance rpc request received: {:?}", id);
|
debug!("get_balance rpc request received: {:?}", id);
|
||||||
let pubkey = verify_pubkey(id)?;
|
let pubkey = verify_pubkey(id)?;
|
||||||
@ -535,7 +560,7 @@ mod tests {
|
|||||||
|
|
||||||
fn start_rpc_handler_with_tx(
|
fn start_rpc_handler_with_tx(
|
||||||
pubkey: &Pubkey,
|
pubkey: &Pubkey,
|
||||||
) -> (MetaIoHandler<Meta>, Meta, Hash, Keypair, Pubkey) {
|
) -> (MetaIoHandler<Meta>, Meta, Arc<Bank>, Hash, Keypair, Pubkey) {
|
||||||
let (bank_forks, alice) = new_bank_forks();
|
let (bank_forks, alice) = new_bank_forks();
|
||||||
let bank = bank_forks.read().unwrap().working_bank();
|
let bank = bank_forks.read().unwrap().working_bank();
|
||||||
let exit = Arc::new(AtomicBool::new(false));
|
let exit = Arc::new(AtomicBool::new(false));
|
||||||
@ -567,7 +592,7 @@ mod tests {
|
|||||||
request_processor,
|
request_processor,
|
||||||
cluster_info,
|
cluster_info,
|
||||||
};
|
};
|
||||||
(io, meta, blockhash, alice, leader.id)
|
(io, meta, bank, blockhash, alice, leader.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@ -595,7 +620,8 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_rpc_get_balance() {
|
fn test_rpc_get_balance() {
|
||||||
let bob_pubkey = Pubkey::new_rand();
|
let bob_pubkey = Pubkey::new_rand();
|
||||||
let (io, meta, _blockhash, _alice, _leader_pubkey) = start_rpc_handler_with_tx(&bob_pubkey);
|
let (io, meta, _bank, _blockhash, _alice, _leader_pubkey) =
|
||||||
|
start_rpc_handler_with_tx(&bob_pubkey);
|
||||||
|
|
||||||
let req = format!(
|
let req = format!(
|
||||||
r#"{{"jsonrpc":"2.0","id":1,"method":"getBalance","params":["{}"]}}"#,
|
r#"{{"jsonrpc":"2.0","id":1,"method":"getBalance","params":["{}"]}}"#,
|
||||||
@ -613,7 +639,8 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_rpc_get_cluster_nodes() {
|
fn test_rpc_get_cluster_nodes() {
|
||||||
let bob_pubkey = Pubkey::new_rand();
|
let bob_pubkey = Pubkey::new_rand();
|
||||||
let (io, meta, _blockhash, _alice, leader_pubkey) = start_rpc_handler_with_tx(&bob_pubkey);
|
let (io, meta, _bank, _blockhash, _alice, leader_pubkey) =
|
||||||
|
start_rpc_handler_with_tx(&bob_pubkey);
|
||||||
|
|
||||||
let req = format!(r#"{{"jsonrpc":"2.0","id":1,"method":"getClusterNodes"}}"#);
|
let req = format!(r#"{{"jsonrpc":"2.0","id":1,"method":"getClusterNodes"}}"#);
|
||||||
let res = io.handle_request_sync(&req, meta);
|
let res = io.handle_request_sync(&req, meta);
|
||||||
@ -633,7 +660,8 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_rpc_get_slot_leader() {
|
fn test_rpc_get_slot_leader() {
|
||||||
let bob_pubkey = Pubkey::new_rand();
|
let bob_pubkey = Pubkey::new_rand();
|
||||||
let (io, meta, _blockhash, _alice, _leader_pubkey) = start_rpc_handler_with_tx(&bob_pubkey);
|
let (io, meta, _bank, _blockhash, _alice, _leader_pubkey) =
|
||||||
|
start_rpc_handler_with_tx(&bob_pubkey);
|
||||||
|
|
||||||
let req = format!(r#"{{"jsonrpc":"2.0","id":1,"method":"getSlotLeader"}}"#);
|
let req = format!(r#"{{"jsonrpc":"2.0","id":1,"method":"getSlotLeader"}}"#);
|
||||||
let res = io.handle_request_sync(&req, meta);
|
let res = io.handle_request_sync(&req, meta);
|
||||||
@ -649,7 +677,8 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_rpc_get_tx_count() {
|
fn test_rpc_get_tx_count() {
|
||||||
let bob_pubkey = Pubkey::new_rand();
|
let bob_pubkey = Pubkey::new_rand();
|
||||||
let (io, meta, _blockhash, _alice, _leader_pubkey) = start_rpc_handler_with_tx(&bob_pubkey);
|
let (io, meta, _bank, _blockhash, _alice, _leader_pubkey) =
|
||||||
|
start_rpc_handler_with_tx(&bob_pubkey);
|
||||||
|
|
||||||
let req = format!(r#"{{"jsonrpc":"2.0","id":1,"method":"getTransactionCount"}}"#);
|
let req = format!(r#"{{"jsonrpc":"2.0","id":1,"method":"getTransactionCount"}}"#);
|
||||||
let res = io.handle_request_sync(&req, meta);
|
let res = io.handle_request_sync(&req, meta);
|
||||||
@ -664,7 +693,8 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_rpc_get_total_supply() {
|
fn test_rpc_get_total_supply() {
|
||||||
let bob_pubkey = Pubkey::new_rand();
|
let bob_pubkey = Pubkey::new_rand();
|
||||||
let (io, meta, _blockhash, _alice, _leader_pubkey) = start_rpc_handler_with_tx(&bob_pubkey);
|
let (io, meta, _bank, _blockhash, _alice, _leader_pubkey) =
|
||||||
|
start_rpc_handler_with_tx(&bob_pubkey);
|
||||||
|
|
||||||
let req = format!(r#"{{"jsonrpc":"2.0","id":1,"method":"getTotalSupply"}}"#);
|
let req = format!(r#"{{"jsonrpc":"2.0","id":1,"method":"getTotalSupply"}}"#);
|
||||||
let rep = io.handle_request_sync(&req, meta);
|
let rep = io.handle_request_sync(&req, meta);
|
||||||
@ -689,7 +719,8 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_rpc_get_account_info() {
|
fn test_rpc_get_account_info() {
|
||||||
let bob_pubkey = Pubkey::new_rand();
|
let bob_pubkey = Pubkey::new_rand();
|
||||||
let (io, meta, _blockhash, _alice, _leader_pubkey) = start_rpc_handler_with_tx(&bob_pubkey);
|
let (io, meta, _bank, _blockhash, _alice, _leader_pubkey) =
|
||||||
|
start_rpc_handler_with_tx(&bob_pubkey);
|
||||||
|
|
||||||
let req = format!(
|
let req = format!(
|
||||||
r#"{{"jsonrpc":"2.0","id":1,"method":"getAccountInfo","params":["{}"]}}"#,
|
r#"{{"jsonrpc":"2.0","id":1,"method":"getAccountInfo","params":["{}"]}}"#,
|
||||||
@ -713,10 +744,46 @@ mod tests {
|
|||||||
assert_eq!(expected, result);
|
assert_eq!(expected, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_rpc_get_program_accounts() {
|
||||||
|
let bob = Keypair::new();
|
||||||
|
let (io, meta, bank, blockhash, _alice, _leader_pubkey) =
|
||||||
|
start_rpc_handler_with_tx(&bob.pubkey());
|
||||||
|
|
||||||
|
let new_program_id = Pubkey::new_rand();
|
||||||
|
let tx = system_transaction::assign(&bob, blockhash, &new_program_id);
|
||||||
|
bank.process_transaction(&tx).unwrap();
|
||||||
|
let req = format!(
|
||||||
|
r#"{{"jsonrpc":"2.0","id":1,"method":"getProgramAccounts","params":["{}"]}}"#,
|
||||||
|
new_program_id
|
||||||
|
);
|
||||||
|
let res = io.handle_request_sync(&req, meta);
|
||||||
|
let expected = format!(
|
||||||
|
r#"{{
|
||||||
|
"jsonrpc":"2.0",
|
||||||
|
"result":[["{}", {{
|
||||||
|
"owner": {:?},
|
||||||
|
"lamports": 20,
|
||||||
|
"data": [],
|
||||||
|
"executable": false
|
||||||
|
}}]],
|
||||||
|
"id":1}}
|
||||||
|
"#,
|
||||||
|
bob.pubkey(),
|
||||||
|
new_program_id.as_ref()
|
||||||
|
);
|
||||||
|
let expected: Response =
|
||||||
|
serde_json::from_str(&expected).expect("expected response deserialization");
|
||||||
|
let result: Response = serde_json::from_str(&res.expect("actual response"))
|
||||||
|
.expect("actual response deserialization");
|
||||||
|
assert_eq!(expected, result);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_rpc_confirm_tx() {
|
fn test_rpc_confirm_tx() {
|
||||||
let bob_pubkey = Pubkey::new_rand();
|
let bob_pubkey = Pubkey::new_rand();
|
||||||
let (io, meta, blockhash, alice, _leader_pubkey) = start_rpc_handler_with_tx(&bob_pubkey);
|
let (io, meta, _bank, blockhash, alice, _leader_pubkey) =
|
||||||
|
start_rpc_handler_with_tx(&bob_pubkey);
|
||||||
let tx = system_transaction::transfer(&alice, &bob_pubkey, 20, blockhash);
|
let tx = system_transaction::transfer(&alice, &bob_pubkey, 20, blockhash);
|
||||||
|
|
||||||
let req = format!(
|
let req = format!(
|
||||||
@ -735,7 +802,8 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_rpc_get_signature_status() {
|
fn test_rpc_get_signature_status() {
|
||||||
let bob_pubkey = Pubkey::new_rand();
|
let bob_pubkey = Pubkey::new_rand();
|
||||||
let (io, meta, blockhash, alice, _leader_pubkey) = start_rpc_handler_with_tx(&bob_pubkey);
|
let (io, meta, _bank, blockhash, alice, _leader_pubkey) =
|
||||||
|
start_rpc_handler_with_tx(&bob_pubkey);
|
||||||
let tx = system_transaction::transfer(&alice, &bob_pubkey, 20, blockhash);
|
let tx = system_transaction::transfer(&alice, &bob_pubkey, 20, blockhash);
|
||||||
|
|
||||||
let req = format!(
|
let req = format!(
|
||||||
@ -799,7 +867,8 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_rpc_get_recent_blockhash() {
|
fn test_rpc_get_recent_blockhash() {
|
||||||
let bob_pubkey = Pubkey::new_rand();
|
let bob_pubkey = Pubkey::new_rand();
|
||||||
let (io, meta, blockhash, _alice, _leader_pubkey) = start_rpc_handler_with_tx(&bob_pubkey);
|
let (io, meta, _bank, blockhash, _alice, _leader_pubkey) =
|
||||||
|
start_rpc_handler_with_tx(&bob_pubkey);
|
||||||
|
|
||||||
let req = format!(r#"{{"jsonrpc":"2.0","id":1,"method":"getRecentBlockhash"}}"#);
|
let req = format!(r#"{{"jsonrpc":"2.0","id":1,"method":"getRecentBlockhash"}}"#);
|
||||||
let res = io.handle_request_sync(&req, meta);
|
let res = io.handle_request_sync(&req, meta);
|
||||||
@ -824,7 +893,8 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_rpc_fail_request_airdrop() {
|
fn test_rpc_fail_request_airdrop() {
|
||||||
let bob_pubkey = Pubkey::new_rand();
|
let bob_pubkey = Pubkey::new_rand();
|
||||||
let (io, meta, _blockhash, _alice, _leader_pubkey) = start_rpc_handler_with_tx(&bob_pubkey);
|
let (io, meta, _bank, _blockhash, _alice, _leader_pubkey) =
|
||||||
|
start_rpc_handler_with_tx(&bob_pubkey);
|
||||||
|
|
||||||
// Expect internal error because no drone is available
|
// Expect internal error because no drone is available
|
||||||
let req = format!(
|
let req = format!(
|
||||||
|
@ -118,6 +118,7 @@ fn test_leader_failure_4() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
#[test]
|
#[test]
|
||||||
|
#[ignore]
|
||||||
fn test_two_unbalanced_stakes() {
|
fn test_two_unbalanced_stakes() {
|
||||||
solana_logger::setup();
|
solana_logger::setup();
|
||||||
let mut validator_config = ValidatorConfig::default();
|
let mut validator_config = ValidatorConfig::default();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-drone"
|
name = "solana-drone"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana Drone"
|
description = "Solana Drone"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -20,9 +20,9 @@ clap = "2.33"
|
|||||||
log = "0.4.2"
|
log = "0.4.2"
|
||||||
serde = "1.0.92"
|
serde = "1.0.92"
|
||||||
serde_derive = "1.0.92"
|
serde_derive = "1.0.92"
|
||||||
solana-logger = { path = "../logger", version = "0.16.0" }
|
solana-logger = { path = "../logger", version = "0.16.2" }
|
||||||
solana-metrics = { path = "../metrics", version = "0.16.0" }
|
solana-metrics = { path = "../metrics", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../sdk", version = "0.16.2" }
|
||||||
tokio = "0.1"
|
tokio = "0.1"
|
||||||
tokio-codec = "0.1"
|
tokio-codec = "0.1"
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
name = "solana-genesis"
|
name = "solana-genesis"
|
||||||
description = "Blockchain, Rebuilt for Scale"
|
description = "Blockchain, Rebuilt for Scale"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
homepage = "https://solana.com/"
|
homepage = "https://solana.com/"
|
||||||
@ -15,24 +15,24 @@ serde = "1.0.92"
|
|||||||
serde_derive = "1.0.92"
|
serde_derive = "1.0.92"
|
||||||
serde_json = "1.0.39"
|
serde_json = "1.0.39"
|
||||||
serde_yaml = "0.8.9"
|
serde_yaml = "0.8.9"
|
||||||
solana = { path = "../core", version = "0.16.0" }
|
solana = { path = "../core", version = "0.16.2" }
|
||||||
solana-bpf-loader-api = { path = "../programs/bpf_loader_api", version = "0.16.0" }
|
solana-bpf-loader-api = { path = "../programs/bpf_loader_api", version = "0.16.2" }
|
||||||
solana-bpf-loader-program = { path = "../programs/bpf_loader_program", version = "0.16.0" }
|
solana-bpf-loader-program = { path = "../programs/bpf_loader_program", version = "0.16.2" }
|
||||||
solana-budget-api = { path = "../programs/budget_api", version = "0.16.0" }
|
solana-budget-api = { path = "../programs/budget_api", version = "0.16.2" }
|
||||||
solana-budget-program = { path = "../programs/budget_program", version = "0.16.0" }
|
solana-budget-program = { path = "../programs/budget_program", version = "0.16.2" }
|
||||||
solana-config-api = { path = "../programs/config_api", version = "0.16.0" }
|
solana-config-api = { path = "../programs/config_api", version = "0.16.2" }
|
||||||
solana-config-program = { path = "../programs/config_program", version = "0.16.0" }
|
solana-config-program = { path = "../programs/config_program", version = "0.16.2" }
|
||||||
solana-exchange-api = { path = "../programs/exchange_api", version = "0.16.0" }
|
solana-exchange-api = { path = "../programs/exchange_api", version = "0.16.2" }
|
||||||
solana-exchange-program = { path = "../programs/exchange_program", version = "0.16.0" }
|
solana-exchange-program = { path = "../programs/exchange_program", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../sdk", version = "0.16.2" }
|
||||||
solana-stake-api = { path = "../programs/stake_api", version = "0.16.0" }
|
solana-stake-api = { path = "../programs/stake_api", version = "0.16.2" }
|
||||||
solana-stake-program = { path = "../programs/stake_program", version = "0.16.0" }
|
solana-stake-program = { path = "../programs/stake_program", version = "0.16.2" }
|
||||||
solana-storage-api = { path = "../programs/storage_api", version = "0.16.0" }
|
solana-storage-api = { path = "../programs/storage_api", version = "0.16.2" }
|
||||||
solana-storage-program = { path = "../programs/storage_program", version = "0.16.0" }
|
solana-storage-program = { path = "../programs/storage_program", version = "0.16.2" }
|
||||||
solana-token-api = { path = "../programs/token_api", version = "0.16.0" }
|
solana-token-api = { path = "../programs/token_api", version = "0.16.2" }
|
||||||
solana-token-program = { path = "../programs/token_program", version = "0.16.0" }
|
solana-token-program = { path = "../programs/token_program", version = "0.16.2" }
|
||||||
solana-vote-api = { path = "../programs/vote_api", version = "0.16.0" }
|
solana-vote-api = { path = "../programs/vote_api", version = "0.16.2" }
|
||||||
solana-vote-program = { path = "../programs/vote_program", version = "0.16.0" }
|
solana-vote-program = { path = "../programs/vote_program", version = "0.16.2" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
hashbrown = "0.3.0"
|
hashbrown = "0.3.0"
|
||||||
|
@ -147,14 +147,6 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
|||||||
.required(true)
|
.required(true)
|
||||||
.help("Path to file containing the bootstrap leader's storage keypair"),
|
.help("Path to file containing the bootstrap leader's storage keypair"),
|
||||||
)
|
)
|
||||||
.arg(
|
|
||||||
Arg::with_name("storage_mining_pool_lamports")
|
|
||||||
.long("storage-mining-pool-lamports")
|
|
||||||
.value_name("LAMPORTS")
|
|
||||||
.takes_value(true)
|
|
||||||
.required(true)
|
|
||||||
.help("Number of lamports to assign to the storage mining pool"),
|
|
||||||
)
|
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("bootstrap_leader_lamports")
|
Arg::with_name("bootstrap_leader_lamports")
|
||||||
.long("bootstrap-leader-lamports")
|
.long("bootstrap-leader-lamports")
|
||||||
@ -261,7 +253,6 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
|||||||
let bootstrap_leader_lamports = value_t_or_exit!(matches, "bootstrap_leader_lamports", u64);
|
let bootstrap_leader_lamports = value_t_or_exit!(matches, "bootstrap_leader_lamports", u64);
|
||||||
let bootstrap_leader_stake_lamports =
|
let bootstrap_leader_stake_lamports =
|
||||||
value_t_or_exit!(matches, "bootstrap_leader_stake_lamports", u64);
|
value_t_or_exit!(matches, "bootstrap_leader_stake_lamports", u64);
|
||||||
let storage_pool_lamports = value_t_or_exit!(matches, "storage_mining_pool_lamports", u64);
|
|
||||||
|
|
||||||
let bootstrap_leader_keypair = read_keypair(bootstrap_leader_keypair_file)?;
|
let bootstrap_leader_keypair = read_keypair(bootstrap_leader_keypair_file)?;
|
||||||
let bootstrap_vote_keypair = read_keypair(bootstrap_vote_keypair_file)?;
|
let bootstrap_vote_keypair = read_keypair(bootstrap_vote_keypair_file)?;
|
||||||
@ -306,12 +297,6 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
|||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
(
|
|
||||||
"StorageMiningPoo111111111111111111111111111"
|
|
||||||
.parse()
|
|
||||||
.unwrap(),
|
|
||||||
storage_contract::create_mining_pool_account(storage_pool_lamports),
|
|
||||||
),
|
|
||||||
])
|
])
|
||||||
.native_instruction_processors(&[
|
.native_instruction_processors(&[
|
||||||
solana_bpf_loader_program!(),
|
solana_bpf_loader_program!(),
|
||||||
@ -370,6 +355,10 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
|||||||
builder = append_primordial_accounts(file, AccountFileFormat::Keypair, builder)?;
|
builder = append_primordial_accounts(file, AccountFileFormat::Keypair, builder)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// add the reward pools
|
||||||
|
builder = solana_storage_api::rewards_pools::genesis(builder);
|
||||||
|
builder = solana_stake_api::rewards_pools::genesis(builder);
|
||||||
|
|
||||||
create_new_ledger(ledger_path, &builder.build())?;
|
create_new_ledger(ledger_path, &builder.build())?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
@ -524,6 +513,8 @@ mod tests {
|
|||||||
)
|
)
|
||||||
.expect("builder");
|
.expect("builder");
|
||||||
|
|
||||||
|
builder = solana_storage_api::rewards_pools::genesis(builder);
|
||||||
|
|
||||||
remove_file(path).unwrap();
|
remove_file(path).unwrap();
|
||||||
|
|
||||||
let genesis_block = builder.clone().build();
|
let genesis_block = builder.clone().build();
|
||||||
|
@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
name = "solana-gossip"
|
name = "solana-gossip"
|
||||||
description = "Blockchain, Rebuilt for Scale"
|
description = "Blockchain, Rebuilt for Scale"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
homepage = "https://solana.com/"
|
homepage = "https://solana.com/"
|
||||||
@ -11,10 +11,10 @@ homepage = "https://solana.com/"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
clap = "2.33.0"
|
clap = "2.33.0"
|
||||||
env_logger = "0.6.1"
|
env_logger = "0.6.1"
|
||||||
solana = { path = "../core", version = "0.16.0" }
|
solana = { path = "../core", version = "0.16.2" }
|
||||||
solana-client = { path = "../client", version = "0.16.0" }
|
solana-client = { path = "../client", version = "0.16.2" }
|
||||||
solana-netutil = { path = "../netutil", version = "0.16.0" }
|
solana-netutil = { path = "../netutil", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../sdk", version = "0.16.2" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
cuda = []
|
cuda = []
|
||||||
|
@ -41,12 +41,6 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
|||||||
SubCommand::with_name("spy")
|
SubCommand::with_name("spy")
|
||||||
.about("Monitor the gossip entrypoint")
|
.about("Monitor the gossip entrypoint")
|
||||||
.setting(AppSettings::DisableVersion)
|
.setting(AppSettings::DisableVersion)
|
||||||
.arg(
|
|
||||||
clap::Arg::with_name("pull_only")
|
|
||||||
.long("pull-only")
|
|
||||||
.takes_value(false)
|
|
||||||
.help("Use a partial gossip node (Pulls only) to spy on the cluster. By default it will use a full fledged gossip node (Pushes and Pulls). Useful when behind a NAT"),
|
|
||||||
)
|
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("num_nodes")
|
Arg::with_name("num_nodes")
|
||||||
.short("N")
|
.short("N")
|
||||||
@ -120,9 +114,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
|||||||
.value_of("node_pubkey")
|
.value_of("node_pubkey")
|
||||||
.map(|pubkey_str| pubkey_str.parse::<Pubkey>().unwrap());
|
.map(|pubkey_str| pubkey_str.parse::<Pubkey>().unwrap());
|
||||||
|
|
||||||
let gossip_addr = if matches.is_present("pull_only") {
|
let gossip_addr = {
|
||||||
None
|
|
||||||
} else {
|
|
||||||
let mut addr = socketaddr_any!();
|
let mut addr = socketaddr_any!();
|
||||||
addr.set_ip(
|
addr.set_ip(
|
||||||
solana_netutil::get_public_ip_addr(&entrypoint_addr).unwrap_or_else(|err| {
|
solana_netutil::get_public_ip_addr(&entrypoint_addr).unwrap_or_else(|err| {
|
||||||
|
@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
name = "solana-install"
|
name = "solana-install"
|
||||||
description = "The solana cluster software installer"
|
description = "The solana cluster software installer"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
homepage = "https://solana.com/"
|
homepage = "https://solana.com/"
|
||||||
@ -13,6 +13,7 @@ cuda = []
|
|||||||
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
atty = "0.2.11"
|
||||||
bincode = "1.1.4"
|
bincode = "1.1.4"
|
||||||
bs58 = "0.2.0"
|
bs58 = "0.2.0"
|
||||||
bzip2 = "0.3.3"
|
bzip2 = "0.3.3"
|
||||||
@ -23,19 +24,23 @@ dirs = "2.0.1"
|
|||||||
indicatif = "0.11.0"
|
indicatif = "0.11.0"
|
||||||
lazy_static = "1.3.0"
|
lazy_static = "1.3.0"
|
||||||
log = "0.4.2"
|
log = "0.4.2"
|
||||||
|
nix = "0.14.1"
|
||||||
reqwest = "0.9.18"
|
reqwest = "0.9.18"
|
||||||
ring = "0.13.2"
|
ring = "0.13.2"
|
||||||
serde = "1.0.92"
|
serde = "1.0.92"
|
||||||
serde_derive = "1.0.92"
|
serde_derive = "1.0.92"
|
||||||
serde_yaml = "0.8.9"
|
serde_yaml = "0.8.9"
|
||||||
solana-client = { path = "../client", version = "0.16.0" }
|
solana-client = { path = "../client", version = "0.16.2" }
|
||||||
solana-config-api = { path = "../programs/config_api", version = "0.16.0" }
|
solana-config-api = { path = "../programs/config_api", version = "0.16.2" }
|
||||||
solana-logger = { path = "../logger", version = "0.16.0" }
|
solana-logger = { path = "../logger", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../sdk", version = "0.16.2" }
|
||||||
tar = "0.4.26"
|
tar = "0.4.26"
|
||||||
tempdir = "0.3.7"
|
tempdir = "0.3.7"
|
||||||
url = "1.7.2"
|
url = "1.7.2"
|
||||||
|
|
||||||
|
[target."cfg(not(windows))".dependencies]
|
||||||
|
signal-hook = "0.1.9"
|
||||||
|
|
||||||
[target."cfg(windows)".dependencies]
|
[target."cfg(windows)".dependencies]
|
||||||
winapi = "0.3.7"
|
winapi = "0.3.7"
|
||||||
winreg = "0.6"
|
winreg = "0.6"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
use crate::config::Config;
|
use crate::config::Config;
|
||||||
|
use crate::stop_process::stop_process;
|
||||||
use crate::update_manifest::{SignedUpdateManifest, UpdateManifest};
|
use crate::update_manifest::{SignedUpdateManifest, UpdateManifest};
|
||||||
use chrono::{Local, TimeZone};
|
use chrono::{Local, TimeZone};
|
||||||
use console::{style, Emoji};
|
use console::{style, Emoji};
|
||||||
@ -13,7 +14,7 @@ use solana_sdk::transaction::Transaction;
|
|||||||
use std::fs::{self, File};
|
use std::fs::{self, File};
|
||||||
use std::io::{self, BufReader, Read};
|
use std::io::{self, BufReader, Read};
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::thread::sleep;
|
use std::sync::mpsc;
|
||||||
use std::time::SystemTime;
|
use std::time::SystemTime;
|
||||||
use std::time::{Duration, Instant};
|
use std::time::{Duration, Instant};
|
||||||
use tempdir::TempDir;
|
use tempdir::TempDir;
|
||||||
@ -514,7 +515,7 @@ pub fn init(
|
|||||||
false
|
false
|
||||||
};
|
};
|
||||||
|
|
||||||
if !path_modified {
|
if !path_modified && !no_modify_path {
|
||||||
check_env_path_for_bin_dir(&config);
|
check_env_path_for_bin_dir(&config);
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
@ -748,7 +749,11 @@ pub fn run(
|
|||||||
) -> Result<(), String> {
|
) -> Result<(), String> {
|
||||||
let config = Config::load(config_file)?;
|
let config = Config::load(config_file)?;
|
||||||
|
|
||||||
let full_program_path = config.active_release_bin_dir().join(program_name);
|
let mut full_program_path = config.active_release_bin_dir().join(program_name);
|
||||||
|
if cfg!(windows) {
|
||||||
|
full_program_path.set_extension("exe");
|
||||||
|
}
|
||||||
|
|
||||||
if !full_program_path.exists() {
|
if !full_program_path.exists() {
|
||||||
Err(format!(
|
Err(format!(
|
||||||
"{} does not exist",
|
"{} does not exist",
|
||||||
@ -758,6 +763,20 @@ pub fn run(
|
|||||||
|
|
||||||
let mut child_option: Option<std::process::Child> = None;
|
let mut child_option: Option<std::process::Child> = None;
|
||||||
let mut now = Instant::now();
|
let mut now = Instant::now();
|
||||||
|
|
||||||
|
let (_signal_sender, signal_receiver) = mpsc::channel();
|
||||||
|
#[cfg(not(windows))]
|
||||||
|
{
|
||||||
|
use signal_hook::{iterator::Signals, SIGTERM};
|
||||||
|
let signals = Signals::new(&[SIGTERM]).unwrap();
|
||||||
|
std::thread::spawn(move || {
|
||||||
|
for sig in signals.forever() {
|
||||||
|
eprintln!("run: received signal {:?}", sig);
|
||||||
|
let _ = _signal_sender.send(());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
child_option = match child_option {
|
child_option = match child_option {
|
||||||
Some(mut child) => match child.try_wait() {
|
Some(mut child) => match child.try_wait() {
|
||||||
@ -793,7 +812,9 @@ pub fn run(
|
|||||||
Ok(true) => {
|
Ok(true) => {
|
||||||
// Update successful, kill current process so it will be restart
|
// Update successful, kill current process so it will be restart
|
||||||
if let Some(ref mut child) = child_option {
|
if let Some(ref mut child) = child_option {
|
||||||
println!("Killing program: {:?}", child.kill());
|
stop_process(child).unwrap_or_else(|err| {
|
||||||
|
eprintln!("Failed to stop child: {:?}", err);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(false) => {} // No update available
|
Ok(false) => {} // No update available
|
||||||
@ -803,6 +824,15 @@ pub fn run(
|
|||||||
};
|
};
|
||||||
now = Instant::now();
|
now = Instant::now();
|
||||||
}
|
}
|
||||||
sleep(Duration::from_secs(1));
|
|
||||||
|
if let Ok(()) = signal_receiver.recv_timeout(Duration::from_secs(1)) {
|
||||||
|
// Handle SIGTERM...
|
||||||
|
if let Some(ref mut child) = child_option {
|
||||||
|
stop_process(child).unwrap_or_else(|err| {
|
||||||
|
eprintln!("Failed to stop child: {:?}", err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
std::process::exit(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ mod build_env;
|
|||||||
mod command;
|
mod command;
|
||||||
mod config;
|
mod config;
|
||||||
mod defaults;
|
mod defaults;
|
||||||
|
mod stop_process;
|
||||||
mod update_manifest;
|
mod update_manifest;
|
||||||
|
|
||||||
// Return an error if a url cannot be parsed.
|
// Return an error if a url cannot be parsed.
|
||||||
|
@ -1,22 +1,21 @@
|
|||||||
|
use atty;
|
||||||
use std::process::exit;
|
use std::process::exit;
|
||||||
|
|
||||||
#[cfg(windows)]
|
|
||||||
fn press_enter() {
|
fn press_enter() {
|
||||||
// On windows, where installation happens in a console that may have opened just for this
|
// On windows, where installation happens in a console that may have opened just for this
|
||||||
// purpose, give the user an opportunity to see the error before the window closes.
|
// purpose, give the user an opportunity to see the error before the window closes.
|
||||||
println!();
|
if cfg!(windows) && atty::is(atty::Stream::Stdin) {
|
||||||
println!("Press the Enter key to continue.");
|
println!();
|
||||||
|
println!("Press the Enter key to continue.");
|
||||||
|
|
||||||
use std::io::BufRead;
|
use std::io::BufRead;
|
||||||
let stdin = std::io::stdin();
|
let stdin = std::io::stdin();
|
||||||
let stdin = stdin.lock();
|
let stdin = stdin.lock();
|
||||||
let mut lines = stdin.lines();
|
let mut lines = stdin.lines();
|
||||||
lines.next();
|
lines.next();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(windows))]
|
|
||||||
fn press_enter() {}
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
solana_install::main_init().unwrap_or_else(|err| {
|
solana_install::main_init().unwrap_or_else(|err| {
|
||||||
println!("Error: {}", err);
|
println!("Error: {}", err);
|
||||||
|
67
install/src/stop_process.rs
Normal file
67
install/src/stop_process.rs
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
use std::io;
|
||||||
|
use std::process::Child;
|
||||||
|
|
||||||
|
fn kill_process(process: &mut Child) -> Result<(), io::Error> {
|
||||||
|
if let Ok(()) = process.kill() {
|
||||||
|
process.wait()?;
|
||||||
|
} else {
|
||||||
|
println!("Process {} has already exited", process.id());
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(windows)]
|
||||||
|
pub fn stop_process(process: &mut Child) -> Result<(), io::Error> {
|
||||||
|
kill_process(process)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(not(windows))]
|
||||||
|
pub fn stop_process(process: &mut Child) -> Result<(), io::Error> {
|
||||||
|
use nix::errno::Errno::{EINVAL, EPERM, ESRCH};
|
||||||
|
use nix::sys::signal::{kill, Signal};
|
||||||
|
use nix::unistd::Pid;
|
||||||
|
use nix::Error::Sys;
|
||||||
|
use std::io::ErrorKind;
|
||||||
|
use std::thread;
|
||||||
|
use std::time::{Duration, Instant};
|
||||||
|
|
||||||
|
let nice_wait = Duration::from_secs(5);
|
||||||
|
let pid = Pid::from_raw(process.id() as i32);
|
||||||
|
match kill(pid, Signal::SIGINT) {
|
||||||
|
Ok(()) => {
|
||||||
|
let expire = Instant::now() + nice_wait;
|
||||||
|
while let Ok(None) = process.try_wait() {
|
||||||
|
if Instant::now() > expire {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
thread::sleep(nice_wait / 10);
|
||||||
|
}
|
||||||
|
if let Ok(None) = process.try_wait() {
|
||||||
|
kill_process(process)?;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Err(Sys(EINVAL)) => {
|
||||||
|
println!("Invalid signal. Killing process {}", pid);
|
||||||
|
kill_process(process)?;
|
||||||
|
}
|
||||||
|
Err(Sys(EPERM)) => {
|
||||||
|
return Err(io::Error::new(
|
||||||
|
ErrorKind::InvalidInput,
|
||||||
|
format!("Insufficient permissions to signal process {}", pid),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
Err(Sys(ESRCH)) => {
|
||||||
|
return Err(io::Error::new(
|
||||||
|
ErrorKind::InvalidInput,
|
||||||
|
format!("Process {} does not exist", pid),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
Err(e) => {
|
||||||
|
return Err(io::Error::new(
|
||||||
|
ErrorKind::InvalidInput,
|
||||||
|
format!("Unexpected error {}", e),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Ok(())
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-keygen"
|
name = "solana-keygen"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana key generation utility"
|
description = "Solana key generation utility"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -15,7 +15,7 @@ cuda = []
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
clap = "2.33"
|
clap = "2.33"
|
||||||
dirs = "2.0.1"
|
dirs = "2.0.1"
|
||||||
solana-sdk = { path = "../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../sdk", version = "0.16.2" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "solana-keygen"
|
name = "solana-keygen"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-kvstore"
|
name = "solana-kvstore"
|
||||||
description = "Embedded Key-Value store for solana"
|
description = "Embedded Key-Value store for solana"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
homepage = "https://solana.com/"
|
homepage = "https://solana.com/"
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
|
@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
name = "solana-ledger-tool"
|
name = "solana-ledger-tool"
|
||||||
description = "Blockchain, Rebuilt for Scale"
|
description = "Blockchain, Rebuilt for Scale"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
homepage = "https://solana.com/"
|
homepage = "https://solana.com/"
|
||||||
@ -11,10 +11,10 @@ homepage = "https://solana.com/"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
clap = "2.33.0"
|
clap = "2.33.0"
|
||||||
serde_json = "1.0.39"
|
serde_json = "1.0.39"
|
||||||
solana = { path = "../core", version = "0.16.0" }
|
solana = { path = "../core", version = "0.16.2" }
|
||||||
solana-logger = { path = "../logger", version = "0.16.0" }
|
solana-logger = { path = "../logger", version = "0.16.2" }
|
||||||
solana-runtime = { path = "../runtime", version = "0.16.0" }
|
solana-runtime = { path = "../runtime", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../sdk", version = "0.16.2" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
assert_cmd = "0.11"
|
assert_cmd = "0.11"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-logger"
|
name = "solana-logger"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana Logger"
|
description = "Solana Logger"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-merkle-tree"
|
name = "solana-merkle-tree"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana Merkle Tree"
|
description = "Solana Merkle Tree"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -9,7 +9,7 @@ homepage = "https://solana.com/"
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
solana-sdk = { path = "../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../sdk", version = "0.16.2" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
hex = "0.3.2"
|
hex = "0.3.2"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-metrics"
|
name = "solana-metrics"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana Metrics"
|
description = "Solana Metrics"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -14,7 +14,7 @@ influx_db_client = "0.3.6"
|
|||||||
lazy_static = "1.3.0"
|
lazy_static = "1.3.0"
|
||||||
log = "0.4.2"
|
log = "0.4.2"
|
||||||
reqwest = "0.9.18"
|
reqwest = "0.9.18"
|
||||||
solana-sdk = { path = "../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../sdk", version = "0.16.2" }
|
||||||
sys-info = "0.5.7"
|
sys-info = "0.5.7"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
@ -88,3 +88,18 @@ default_arg() {
|
|||||||
args+=("$name")
|
args+=("$name")
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
replace_arg() {
|
||||||
|
declare name=$1
|
||||||
|
declare value=$2
|
||||||
|
|
||||||
|
default_arg "$name" "$value"
|
||||||
|
|
||||||
|
declare index=0
|
||||||
|
for arg in "${args[@]}"; do
|
||||||
|
index=$((index + 1))
|
||||||
|
if [[ $arg = "$name" ]]; then
|
||||||
|
args[$index]="$value"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
@ -9,6 +9,7 @@ source "$here"/common.sh
|
|||||||
# shellcheck source=scripts/oom-score-adj.sh
|
# shellcheck source=scripts/oom-score-adj.sh
|
||||||
source "$here"/../scripts/oom-score-adj.sh
|
source "$here"/../scripts/oom-score-adj.sh
|
||||||
|
|
||||||
|
|
||||||
fullnode_usage() {
|
fullnode_usage() {
|
||||||
if [[ -n $1 ]]; then
|
if [[ -n $1 ]]; then
|
||||||
echo "$*"
|
echo "$*"
|
||||||
@ -76,24 +77,8 @@ rsync_url() { # adds the 'rsync://` prefix to URLs that need it
|
|||||||
|
|
||||||
setup_validator_accounts() {
|
setup_validator_accounts() {
|
||||||
declare entrypoint_ip=$1
|
declare entrypoint_ip=$1
|
||||||
declare node_keypair_path=$2
|
declare node_lamports=$2
|
||||||
declare vote_keypair_path=$3
|
declare stake_lamports=$3
|
||||||
declare stake_keypair_path=$4
|
|
||||||
declare storage_keypair_path=$5
|
|
||||||
declare node_lamports=$6
|
|
||||||
declare stake_lamports=$7
|
|
||||||
|
|
||||||
declare node_pubkey
|
|
||||||
node_pubkey=$($solana_keygen pubkey "$node_keypair_path")
|
|
||||||
|
|
||||||
declare vote_pubkey
|
|
||||||
vote_pubkey=$($solana_keygen pubkey "$vote_keypair_path")
|
|
||||||
|
|
||||||
declare stake_pubkey
|
|
||||||
stake_pubkey=$($solana_keygen pubkey "$stake_keypair_path")
|
|
||||||
|
|
||||||
declare storage_pubkey
|
|
||||||
storage_pubkey=$($solana_keygen pubkey "$storage_keypair_path")
|
|
||||||
|
|
||||||
if [[ -f $configured_flag ]]; then
|
if [[ -f $configured_flag ]]; then
|
||||||
echo "Vote and stake accounts have already been configured"
|
echo "Vote and stake accounts have already been configured"
|
||||||
@ -101,75 +86,66 @@ setup_validator_accounts() {
|
|||||||
if ((airdrops_enabled)); then
|
if ((airdrops_enabled)); then
|
||||||
# Fund the node with enough tokens to fund its Vote, Staking, and Storage accounts
|
# Fund the node with enough tokens to fund its Vote, Staking, and Storage accounts
|
||||||
declare fees=100 # TODO: No hardcoded transaction fees, fetch the current cluster fees
|
declare fees=100 # TODO: No hardcoded transaction fees, fetch the current cluster fees
|
||||||
$solana_wallet --keypair "$node_keypair_path" --url "http://$entrypoint_ip:8899" airdrop $((node_lamports+stake_lamports+fees)) || return $?
|
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" airdrop $((node_lamports+stake_lamports+fees)) || return $?
|
||||||
else
|
else
|
||||||
echo "current account balance is "
|
echo "current account balance is "
|
||||||
$solana_wallet --keypair "$node_keypair_path" --url "http://$entrypoint_ip:8899" balance || return $?
|
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" balance || return $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Fund the vote account from the node, with the node as the node_pubkey
|
# Fund the vote account from the node, with the node as the identity_pubkey
|
||||||
$solana_wallet --keypair "$node_keypair_path" --url "http://$entrypoint_ip:8899" \
|
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" \
|
||||||
create-vote-account "$vote_pubkey" "$node_pubkey" 1 --commission 65535 || return $?
|
create-vote-account "$vote_pubkey" "$identity_pubkey" 1 --commission 65535 || return $?
|
||||||
|
|
||||||
# Fund the stake account from the node, with the node as the node_pubkey
|
# Fund the stake account from the node, with the node as the identity_pubkey
|
||||||
$solana_wallet --keypair "$node_keypair_path" --url "http://$entrypoint_ip:8899" \
|
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" \
|
||||||
create-stake-account "$stake_pubkey" "$stake_lamports" || return $?
|
create-stake-account "$stake_pubkey" "$stake_lamports" || return $?
|
||||||
|
|
||||||
# Delegate the stake. The transaction fee is paid by the node but the
|
# Delegate the stake. The transaction fee is paid by the node but the
|
||||||
# transaction must be signed by the stake_keypair
|
# transaction must be signed by the stake_keypair
|
||||||
$solana_wallet --keypair "$node_keypair_path" --url "http://$entrypoint_ip:8899" \
|
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" \
|
||||||
delegate-stake "$stake_keypair_path" "$vote_pubkey" "$stake_lamports" || return $?
|
delegate-stake "$stake_keypair_path" "$vote_pubkey" "$stake_lamports" || return $?
|
||||||
|
|
||||||
# Setup validator storage account
|
# Setup validator storage account
|
||||||
$solana_wallet --keypair "$node_keypair_path" --url "http://$entrypoint_ip:8899" \
|
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" \
|
||||||
create-validator-storage-account "$node_pubkey" "$storage_pubkey" || return $?
|
create-validator-storage-account "$identity_pubkey" "$storage_pubkey" || return $?
|
||||||
|
|
||||||
touch "$configured_flag"
|
touch "$configured_flag"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$solana_wallet --keypair "$node_keypair_path" --url "http://$entrypoint_ip:8899" \
|
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" \
|
||||||
show-vote-account "$vote_pubkey"
|
show-vote-account "$vote_pubkey"
|
||||||
$solana_wallet --keypair "$node_keypair_path" --url "http://$entrypoint_ip:8899" \
|
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" \
|
||||||
show-stake-account "$stake_pubkey"
|
show-stake-account "$stake_pubkey"
|
||||||
$solana_wallet --keypair "$node_keypair_path" --url "http://$entrypoint_ip:8899" \
|
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" \
|
||||||
show-storage-account "$storage_pubkey"
|
show-storage-account "$storage_pubkey"
|
||||||
|
|
||||||
echo "Identity account balance:"
|
echo "Identity account balance:"
|
||||||
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" balance
|
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" balance
|
||||||
echo "========================================================================"
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_replicator_account() {
|
setup_replicator_account() {
|
||||||
declare entrypoint_ip=$1
|
declare entrypoint_ip=$1
|
||||||
declare node_keypair_path=$2
|
declare node_lamports=$2
|
||||||
declare storage_keypair_path=$3
|
|
||||||
declare node_lamports=$4
|
|
||||||
|
|
||||||
declare node_pubkey
|
|
||||||
node_pubkey=$($solana_keygen pubkey "$node_keypair_path")
|
|
||||||
|
|
||||||
declare storage_pubkey
|
|
||||||
storage_pubkey=$($solana_keygen pubkey "$storage_keypair_path")
|
|
||||||
|
|
||||||
if [[ -f $configured_flag ]]; then
|
if [[ -f $configured_flag ]]; then
|
||||||
echo "Replicator account has already been configured"
|
echo "Replicator account has already been configured"
|
||||||
else
|
else
|
||||||
if ((airdrops_enabled)); then
|
if ((airdrops_enabled)); then
|
||||||
$solana_wallet --keypair "$node_keypair_path" --url "http://$entrypoint_ip:8899" airdrop "$node_lamports" || return $?
|
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" airdrop "$node_lamports" || return $?
|
||||||
else
|
else
|
||||||
echo "current account balance is "
|
echo "current account balance is "
|
||||||
$solana_wallet --keypair "$node_keypair_path" --url "http://$entrypoint_ip:8899" balance || return $?
|
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" balance || return $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Setup replicator storage account
|
# Setup replicator storage account
|
||||||
$solana_wallet --keypair "$node_keypair_path" --url "http://$entrypoint_ip:8899" \
|
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" \
|
||||||
create-replicator-storage-account "$node_pubkey" "$storage_pubkey" || return $?
|
create-replicator-storage-account "$identity_pubkey" "$storage_pubkey" || return $?
|
||||||
|
|
||||||
touch "$configured_flag"
|
touch "$configured_flag"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$solana_wallet --keypair "$node_keypair_path" --url "http://$entrypoint_ip:8899" \
|
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" \
|
||||||
show-storage-account "$storage_pubkey"
|
show-storage-account "$storage_pubkey"
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
@ -275,24 +251,13 @@ if [[ $node_type = replicator ]]; then
|
|||||||
shift "$shift"
|
shift "$shift"
|
||||||
|
|
||||||
: "${identity_keypair_path:=$SOLANA_CONFIG_DIR/replicator-keypair$label.json}"
|
: "${identity_keypair_path:=$SOLANA_CONFIG_DIR/replicator-keypair$label.json}"
|
||||||
|
mkdir -p "$SOLANA_CONFIG_DIR"
|
||||||
|
[[ -r "$identity_keypair_path" ]] || $solana_keygen new -o "$identity_keypair_path"
|
||||||
|
|
||||||
storage_keypair_path="$SOLANA_CONFIG_DIR"/replicator-storage-keypair$label.json
|
storage_keypair_path="$SOLANA_CONFIG_DIR"/replicator-storage-keypair$label.json
|
||||||
ledger_config_dir=$SOLANA_CONFIG_DIR/replicator-ledger$label
|
ledger_config_dir=$SOLANA_CONFIG_DIR/replicator-ledger$label
|
||||||
configured_flag=$SOLANA_CONFIG_DIR/replicator$label.configured
|
configured_flag=$SOLANA_CONFIG_DIR/replicator$label.configured
|
||||||
|
|
||||||
mkdir -p "$SOLANA_CONFIG_DIR"
|
|
||||||
[[ -r "$identity_keypair_path" ]] || $solana_keygen new -o "$identity_keypair_path"
|
|
||||||
[[ -r "$storage_keypair_path" ]] || $solana_keygen new -o "$storage_keypair_path"
|
|
||||||
|
|
||||||
identity_pubkey=$($solana_keygen pubkey "$identity_keypair_path")
|
|
||||||
storage_pubkey=$($solana_keygen pubkey "$storage_keypair_path")
|
|
||||||
|
|
||||||
cat <<EOF
|
|
||||||
======================[ $node_type configuration ]======================
|
|
||||||
replicator pubkey: $identity_pubkey
|
|
||||||
storage pubkey: $storage_pubkey
|
|
||||||
ledger: $ledger_config_dir
|
|
||||||
======================================================================
|
|
||||||
EOF
|
|
||||||
program=$solana_replicator
|
program=$solana_replicator
|
||||||
default_arg --entrypoint "$entrypoint_address"
|
default_arg --entrypoint "$entrypoint_address"
|
||||||
default_arg --identity "$identity_keypair_path"
|
default_arg --identity "$identity_keypair_path"
|
||||||
@ -300,6 +265,7 @@ EOF
|
|||||||
default_arg --ledger "$ledger_config_dir"
|
default_arg --ledger "$ledger_config_dir"
|
||||||
|
|
||||||
rsync_entrypoint_url=$(rsync_url "$entrypoint")
|
rsync_entrypoint_url=$(rsync_url "$entrypoint")
|
||||||
|
|
||||||
elif [[ $node_type = bootstrap_leader ]]; then
|
elif [[ $node_type = bootstrap_leader ]]; then
|
||||||
if [[ ${#positional_args[@]} -ne 0 ]]; then
|
if [[ ${#positional_args[@]} -ne 0 ]]; then
|
||||||
fullnode_usage "Unknown argument: ${positional_args[0]}"
|
fullnode_usage "Unknown argument: ${positional_args[0]}"
|
||||||
@ -311,9 +277,11 @@ elif [[ $node_type = bootstrap_leader ]]; then
|
|||||||
$solana_ledger_tool --ledger "$SOLANA_CONFIG_DIR"/bootstrap-leader-ledger verify
|
$solana_ledger_tool --ledger "$SOLANA_CONFIG_DIR"/bootstrap-leader-ledger verify
|
||||||
|
|
||||||
: "${identity_keypair_path:=$SOLANA_CONFIG_DIR/bootstrap-leader-keypair.json}"
|
: "${identity_keypair_path:=$SOLANA_CONFIG_DIR/bootstrap-leader-keypair.json}"
|
||||||
|
|
||||||
vote_keypair_path="$SOLANA_CONFIG_DIR"/bootstrap-leader-vote-keypair.json
|
vote_keypair_path="$SOLANA_CONFIG_DIR"/bootstrap-leader-vote-keypair.json
|
||||||
ledger_config_dir="$SOLANA_CONFIG_DIR"/bootstrap-leader-ledger
|
ledger_config_dir="$SOLANA_CONFIG_DIR"/bootstrap-leader-ledger
|
||||||
state_dir="$SOLANA_CONFIG_DIR"/bootstrap-leader-state
|
state_dir="$SOLANA_CONFIG_DIR"/bootstrap-leader-state
|
||||||
|
stake_keypair_path=$SOLANA_CONFIG_DIR/bootstrap-leader-stake-keypair.json
|
||||||
storage_keypair_path=$SOLANA_CONFIG_DIR/bootstrap-leader-storage-keypair.json
|
storage_keypair_path=$SOLANA_CONFIG_DIR/bootstrap-leader-storage-keypair.json
|
||||||
configured_flag=$SOLANA_CONFIG_DIR/bootstrap-leader.configured
|
configured_flag=$SOLANA_CONFIG_DIR/bootstrap-leader.configured
|
||||||
|
|
||||||
@ -332,19 +300,16 @@ elif [[ $node_type = validator ]]; then
|
|||||||
shift "$shift"
|
shift "$shift"
|
||||||
|
|
||||||
: "${identity_keypair_path:=$SOLANA_CONFIG_DIR/validator-keypair$label.json}"
|
: "${identity_keypair_path:=$SOLANA_CONFIG_DIR/validator-keypair$label.json}"
|
||||||
|
mkdir -p "$SOLANA_CONFIG_DIR"
|
||||||
|
[[ -r "$identity_keypair_path" ]] || $solana_keygen new -o "$identity_keypair_path"
|
||||||
|
|
||||||
vote_keypair_path=$SOLANA_CONFIG_DIR/validator-vote-keypair$label.json
|
vote_keypair_path=$SOLANA_CONFIG_DIR/validator-vote-keypair$label.json
|
||||||
ledger_config_dir=$SOLANA_CONFIG_DIR/validator-ledger$label
|
ledger_config_dir=$SOLANA_CONFIG_DIR/validator-ledger$label
|
||||||
state_dir="$SOLANA_CONFIG_DIR"/validator-state$label
|
state_dir="$SOLANA_CONFIG_DIR"/validator-state$label
|
||||||
storage_keypair_path=$SOLANA_CONFIG_DIR/validator-storage-keypair$label.json
|
|
||||||
stake_keypair_path=$SOLANA_CONFIG_DIR/validator-stake-keypair$label.json
|
stake_keypair_path=$SOLANA_CONFIG_DIR/validator-stake-keypair$label.json
|
||||||
|
storage_keypair_path=$SOLANA_CONFIG_DIR/validator-storage-keypair$label.json
|
||||||
configured_flag=$SOLANA_CONFIG_DIR/validator$label.configured
|
configured_flag=$SOLANA_CONFIG_DIR/validator$label.configured
|
||||||
|
|
||||||
mkdir -p "$SOLANA_CONFIG_DIR"
|
|
||||||
[[ -r "$identity_keypair_path" ]] || $solana_keygen new -o "$identity_keypair_path"
|
|
||||||
[[ -r "$vote_keypair_path" ]] || $solana_keygen new -o "$vote_keypair_path"
|
|
||||||
[[ -r "$stake_keypair_path" ]] || $solana_keygen new -o "$stake_keypair_path"
|
|
||||||
[[ -r "$storage_keypair_path" ]] || $solana_keygen new -o "$storage_keypair_path"
|
|
||||||
|
|
||||||
default_arg --entrypoint "$entrypoint_address"
|
default_arg --entrypoint "$entrypoint_address"
|
||||||
if ((airdrops_enabled)); then
|
if ((airdrops_enabled)); then
|
||||||
default_arg --rpc-drone-address "${entrypoint_address%:*}:9900"
|
default_arg --rpc-drone-address "${entrypoint_address%:*}:9900"
|
||||||
@ -356,29 +321,14 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
identity_pubkey=$($solana_keygen pubkey "$identity_keypair_path")
|
||||||
|
|
||||||
if [[ $node_type != replicator ]]; then
|
if [[ $node_type != replicator ]]; then
|
||||||
accounts_config_dir="$state_dir"/accounts
|
accounts_config_dir="$state_dir"/accounts
|
||||||
snapshot_config_dir="$state_dir"/snapshots
|
snapshot_config_dir="$state_dir"/snapshots
|
||||||
|
|
||||||
identity_pubkey=$($solana_keygen pubkey "$identity_keypair_path")
|
|
||||||
vote_pubkey=$($solana_keygen pubkey "$vote_keypair_path")
|
|
||||||
storage_pubkey=$($solana_keygen pubkey "$storage_keypair_path")
|
|
||||||
|
|
||||||
cat <<EOF
|
|
||||||
======================[ $node_type configuration ]======================
|
|
||||||
identity pubkey: $identity_pubkey
|
|
||||||
vote pubkey: $vote_pubkey
|
|
||||||
storage pubkey: $storage_pubkey
|
|
||||||
ledger: $ledger_config_dir
|
|
||||||
accounts: $accounts_config_dir
|
|
||||||
snapshots: $snapshot_config_dir
|
|
||||||
========================================================================
|
|
||||||
EOF
|
|
||||||
|
|
||||||
default_arg --identity "$identity_keypair_path"
|
default_arg --identity "$identity_keypair_path"
|
||||||
default_arg --voting-keypair "$vote_keypair_path"
|
default_arg --voting-keypair "$vote_keypair_path"
|
||||||
default_arg --vote-account "$vote_pubkey"
|
|
||||||
default_arg --storage-keypair "$storage_keypair_path"
|
default_arg --storage-keypair "$storage_keypair_path"
|
||||||
default_arg --ledger "$ledger_config_dir"
|
default_arg --ledger "$ledger_config_dir"
|
||||||
default_arg --accounts "$accounts_config_dir"
|
default_arg --accounts "$accounts_config_dir"
|
||||||
@ -397,72 +347,134 @@ if [[ -z $CI ]]; then # Skip in CI
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
new_gensis_block() {
|
new_gensis_block() {
|
||||||
|
(
|
||||||
|
set -x
|
||||||
|
$rsync -r "${rsync_entrypoint_url:?}"/config/ledger "$SOLANA_RSYNC_CONFIG_DIR"
|
||||||
|
) || (
|
||||||
|
echo "Error: failed to rsync genesis ledger"
|
||||||
|
)
|
||||||
|
|
||||||
! diff -q "$SOLANA_RSYNC_CONFIG_DIR"/ledger/genesis.bin "$ledger_config_dir"/genesis.bin >/dev/null 2>&1
|
! diff -q "$SOLANA_RSYNC_CONFIG_DIR"/ledger/genesis.bin "$ledger_config_dir"/genesis.bin >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
PS4="$(basename "$0"): "
|
PS4="$(basename "$0"): "
|
||||||
|
|
||||||
pid=
|
pid=
|
||||||
trap '[[ -n $pid ]] && kill "$pid" >/dev/null 2>&1 && wait "$pid"' INT TERM ERR
|
kill_fullnode() {
|
||||||
|
if [[ -n $pid ]]; then
|
||||||
|
declare _pid=$pid
|
||||||
|
pid=
|
||||||
|
echo "killing pid $_pid"
|
||||||
|
kill "$_pid" || true
|
||||||
|
wait "$_pid" || true
|
||||||
|
echo "$_pid killed"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
trap 'kill_fullnode' INT TERM ERR
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
if new_gensis_block; then
|
if [[ $node_type != bootstrap_leader ]] && new_gensis_block; then
|
||||||
# If the genesis block has changed remove the now stale ledger and vote
|
# If the genesis block has changed remove the now stale ledger and
|
||||||
# keypair for the node and start all over again
|
# vote/stake/storage keypairs for the node and start all over again
|
||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
rm -rf "$ledger_config_dir" "$state_dir" "$configured_flag"
|
rm -rf "$ledger_config_dir" "$state_dir" "$configured_flag"
|
||||||
)
|
)
|
||||||
|
if [[ $node_type = validator ]]; then
|
||||||
|
$solana_keygen new -f -o "$vote_keypair_path"
|
||||||
|
$solana_keygen new -f -o "$stake_keypair_path"
|
||||||
|
$solana_keygen new -f -o "$storage_keypair_path"
|
||||||
|
fi
|
||||||
|
if [[ $node_type = replicator ]]; then
|
||||||
|
$solana_keygen new -f -o "$storage_keypair_path"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -d "$SOLANA_RSYNC_CONFIG_DIR"/ledger ]]; then
|
if [[ $node_type = replicator ]]; then
|
||||||
if [[ $node_type = bootstrap_leader ]]; then
|
storage_pubkey=$($solana_keygen pubkey "$storage_keypair_path")
|
||||||
|
setup_replicator_account "${entrypoint_address%:*}" \
|
||||||
|
"$node_lamports"
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
======================[ $node_type configuration ]======================
|
||||||
|
replicator pubkey: $identity_pubkey
|
||||||
|
storage pubkey: $storage_pubkey
|
||||||
|
ledger: $ledger_config_dir
|
||||||
|
======================================================================
|
||||||
|
EOF
|
||||||
|
|
||||||
|
else
|
||||||
|
if [[ $node_type = bootstrap_leader && ! -d "$SOLANA_RSYNC_CONFIG_DIR"/ledger ]]; then
|
||||||
ledger_not_setup "$SOLANA_RSYNC_CONFIG_DIR/ledger does not exist"
|
ledger_not_setup "$SOLANA_RSYNC_CONFIG_DIR/ledger does not exist"
|
||||||
elif [[ $node_type = validator ]]; then
|
|
||||||
(
|
|
||||||
SECONDS=0
|
|
||||||
set -x
|
|
||||||
cd "$SOLANA_RSYNC_CONFIG_DIR"
|
|
||||||
$rsync -qPr "${rsync_entrypoint_url:?}"/config/{ledger,state.tgz} .
|
|
||||||
echo "Fetched snapshot in $SECONDS seconds"
|
|
||||||
) || true
|
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
(
|
|
||||||
set -x
|
|
||||||
if [[ $node_type = validator ]]; then
|
|
||||||
if [[ -f "$SOLANA_RSYNC_CONFIG_DIR"/state.tgz ]]; then
|
|
||||||
mkdir -p "$state_dir"
|
|
||||||
SECONDS=
|
|
||||||
tar -C "$state_dir" -zxf "$SOLANA_RSYNC_CONFIG_DIR"/state.tgz
|
|
||||||
echo "Extracted snapshot in $SECONDS seconds"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if [[ ! -d "$ledger_config_dir" ]]; then
|
if [[ ! -d "$ledger_config_dir" ]]; then
|
||||||
cp -a "$SOLANA_RSYNC_CONFIG_DIR"/ledger/ "$ledger_config_dir"
|
if [[ $node_type = validator ]]; then
|
||||||
fi
|
(
|
||||||
)
|
cd "$SOLANA_RSYNC_CONFIG_DIR"
|
||||||
|
|
||||||
if ((stake_lamports)); then
|
echo "Rsyncing genesis ledger from ${rsync_entrypoint_url:?}..."
|
||||||
if [[ $node_type = validator ]]; then
|
SECONDS=
|
||||||
|
while ! $rsync -Pr "${rsync_entrypoint_url:?}"/config/ledger .; do
|
||||||
|
echo "Genesis ledger rsync failed"
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
echo "Fetched genesis ledger in $SECONDS seconds"
|
||||||
|
|
||||||
|
SECONDS=
|
||||||
|
echo "Rsyncing state snapshot ${rsync_entrypoint_url:?}..."
|
||||||
|
if ! $rsync -P "${rsync_entrypoint_url:?}"/config/state.tgz .; then
|
||||||
|
echo "State snapshot rsync failed"
|
||||||
|
rm -f "$SOLANA_RSYNC_CONFIG_DIR"/state.tgz
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
echo "Fetched snapshot in $SECONDS seconds"
|
||||||
|
|
||||||
|
SECONDS=
|
||||||
|
mkdir -p "$state_dir"
|
||||||
|
(
|
||||||
|
set -x
|
||||||
|
tar -C "$state_dir" -zxf "$SOLANA_RSYNC_CONFIG_DIR"/state.tgz
|
||||||
|
)
|
||||||
|
echo "Extracted snapshot in $SECONDS seconds"
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
(
|
||||||
|
set -x
|
||||||
|
cp -a "$SOLANA_RSYNC_CONFIG_DIR"/ledger/ "$ledger_config_dir"
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
vote_pubkey=$($solana_keygen pubkey "$vote_keypair_path")
|
||||||
|
stake_pubkey=$($solana_keygen pubkey "$stake_keypair_path")
|
||||||
|
storage_pubkey=$($solana_keygen pubkey "$storage_keypair_path")
|
||||||
|
replace_arg --vote-account "$vote_pubkey"
|
||||||
|
|
||||||
|
if [[ $node_type = validator ]] && ((stake_lamports)); then
|
||||||
setup_validator_accounts "${entrypoint_address%:*}" \
|
setup_validator_accounts "${entrypoint_address%:*}" \
|
||||||
"$identity_keypair_path" \
|
|
||||||
"$vote_keypair_path" \
|
|
||||||
"$stake_keypair_path" \
|
|
||||||
"$storage_keypair_path" \
|
|
||||||
"$node_lamports" \
|
"$node_lamports" \
|
||||||
"$stake_lamports"
|
"$stake_lamports"
|
||||||
elif [[ $node_type = replicator ]]; then
|
|
||||||
setup_replicator_account "${entrypoint_address%:*}" \
|
|
||||||
"$identity_keypair_path" \
|
|
||||||
"$storage_keypair_path" \
|
|
||||||
"$node_lamports"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
======================[ $node_type configuration ]======================
|
||||||
|
identity pubkey: $identity_pubkey
|
||||||
|
vote pubkey: $vote_pubkey
|
||||||
|
storage pubkey: $storage_pubkey
|
||||||
|
ledger: $ledger_config_dir
|
||||||
|
accounts: $accounts_config_dir
|
||||||
|
snapshots: $snapshot_config_dir
|
||||||
|
========================================================================
|
||||||
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$PS4$program ${args[*]}"
|
echo "$PS4$program ${args[*]}"
|
||||||
|
|
||||||
$program "${args[@]}" &
|
$program "${args[@]}" &
|
||||||
pid=$!
|
pid=$!
|
||||||
|
echo "pid: $pid"
|
||||||
oom_score_adj "$pid" 1000
|
oom_score_adj "$pid" 1000
|
||||||
|
|
||||||
if ((no_restart)); then
|
if ((no_restart)); then
|
||||||
@ -488,9 +500,15 @@ while true; do
|
|||||||
new_state_archive="$SOLANA_RSYNC_CONFIG_DIR"/new_state.tgz
|
new_state_archive="$SOLANA_RSYNC_CONFIG_DIR"/new_state.tgz
|
||||||
(
|
(
|
||||||
rm -rf "$new_state_dir" "$new_state_archive"
|
rm -rf "$new_state_dir" "$new_state_archive"
|
||||||
cp -a "$state_dir" "$new_state_dir"
|
mkdir -p "$new_state_dir"
|
||||||
|
# When saving the state, its necessary to have the snapshots be saved first
|
||||||
|
# followed by the accounts folder. This would avoid conditions where incomplete
|
||||||
|
# accounts gets picked while its still in the process of being updated and are
|
||||||
|
# not frozen yet.
|
||||||
|
cp -a "$state_dir"/snapshots "$new_state_dir"
|
||||||
|
cp -a "$state_dir"/accounts "$new_state_dir"
|
||||||
cd "$new_state_dir"
|
cd "$new_state_dir"
|
||||||
tar zcf "$new_state_archive" ./*
|
tar zcfS "$new_state_archive" ./*
|
||||||
)
|
)
|
||||||
ln -f "$new_state_archive" "$SOLANA_RSYNC_CONFIG_DIR"/state.tgz
|
ln -f "$new_state_archive" "$SOLANA_RSYNC_CONFIG_DIR"/state.tgz
|
||||||
rm -rf "$new_state_dir" "$new_state_archive"
|
rm -rf "$new_state_dir" "$new_state_archive"
|
||||||
@ -504,21 +522,16 @@ while true; do
|
|||||||
|
|
||||||
if ((poll_for_new_genesis_block && --secs_to_next_genesis_poll == 0)); then
|
if ((poll_for_new_genesis_block && --secs_to_next_genesis_poll == 0)); then
|
||||||
echo "Polling for new genesis block..."
|
echo "Polling for new genesis block..."
|
||||||
(
|
if new_gensis_block; then
|
||||||
set -x
|
echo "############## New genesis detected, restarting $node_type ##############"
|
||||||
$rsync -r "${rsync_entrypoint_url:?}"/config/ledger "$SOLANA_RSYNC_CONFIG_DIR"
|
break
|
||||||
) || (
|
fi
|
||||||
echo "Error: failed to rsync ledger"
|
|
||||||
)
|
|
||||||
new_gensis_block && break
|
|
||||||
secs_to_next_genesis_poll=60
|
secs_to_next_genesis_poll=60
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "############## New genesis detected, restarting $node_type ##############"
|
kill_fullnode
|
||||||
kill "$pid" || true
|
|
||||||
wait "$pid" || true
|
|
||||||
# give the cluster time to come back up
|
# give the cluster time to come back up
|
||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
|
@ -23,7 +23,6 @@ default_arg --ledger "$SOLANA_RSYNC_CONFIG_DIR"/ledger
|
|||||||
default_arg --mint "$SOLANA_CONFIG_DIR"/mint-keypair.json
|
default_arg --mint "$SOLANA_CONFIG_DIR"/mint-keypair.json
|
||||||
default_arg --lamports 100000000000000
|
default_arg --lamports 100000000000000
|
||||||
default_arg --bootstrap-leader-lamports 424242
|
default_arg --bootstrap-leader-lamports 424242
|
||||||
default_arg --storage-mining-pool-lamports 100000000
|
|
||||||
default_arg --target-lamports-per-signature 42
|
default_arg --target-lamports-per-signature 42
|
||||||
default_arg --target-signatures-per-slot 42
|
default_arg --target-signatures-per-slot 42
|
||||||
default_arg --hashes-per-tick auto
|
default_arg --hashes-per-tick auto
|
||||||
|
@ -477,7 +477,8 @@ start() {
|
|||||||
declare updateDownloadUrl=http://release.solana.com/"$releaseChannel"/solana-release-x86_64-unknown-linux-gnu.tar.bz2
|
declare updateDownloadUrl=http://release.solana.com/"$releaseChannel"/solana-release-x86_64-unknown-linux-gnu.tar.bz2
|
||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
curl -o "$SOLANA_ROOT"/solana-release.tar.bz2 "$updateDownloadUrl"
|
curl --retry 5 --retry-delay 2 --retry-connrefused \
|
||||||
|
-o "$SOLANA_ROOT"/solana-release.tar.bz2 "$updateDownloadUrl"
|
||||||
)
|
)
|
||||||
tarballFilename="$SOLANA_ROOT"/solana-release.tar.bz2
|
tarballFilename="$SOLANA_ROOT"/solana-release.tar.bz2
|
||||||
else
|
else
|
||||||
|
@ -224,7 +224,7 @@ local|tar)
|
|||||||
./multinode-demo/drone.sh > drone.log 2>&1 &
|
./multinode-demo/drone.sh > drone.log 2>&1 &
|
||||||
fi
|
fi
|
||||||
export BLOCKEXPLORER_GEOIP_WHITELIST=$PWD/net/config/geoip.yml
|
export BLOCKEXPLORER_GEOIP_WHITELIST=$PWD/net/config/geoip.yml
|
||||||
npm install @solana/blockexplorer@1
|
npm install @solana/blockexplorer@1.10.3
|
||||||
npx solana-blockexplorer > blockexplorer.log 2>&1 &
|
npx solana-blockexplorer > blockexplorer.log 2>&1 &
|
||||||
|
|
||||||
# Confirm the blockexplorer is accessible
|
# Confirm the blockexplorer is accessible
|
||||||
|
@ -183,13 +183,11 @@ if $installCheck && [[ -r update_manifest_keypair.json ]]; then
|
|||||||
|
|
||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
update_manifest_pubkey=$($solana_keygen pubkey update_manifest_keypair.json)
|
|
||||||
rm -rf install-data-dir
|
rm -rf install-data-dir
|
||||||
$solana_install init \
|
$solana_install init \
|
||||||
--no-modify-path \
|
--no-modify-path \
|
||||||
--data-dir install-data-dir \
|
--data-dir install-data-dir \
|
||||||
--url http://"$sanityTargetIp":8899 \
|
--url http://"$sanityTargetIp":8899 \
|
||||||
--pubkey "$update_manifest_pubkey"
|
|
||||||
|
|
||||||
$solana_install info
|
$solana_install info
|
||||||
)
|
)
|
||||||
|
@ -14,6 +14,7 @@ set -ex
|
|||||||
# 2. Inline ~/.ssh/id-solana-testnet.pub below
|
# 2. Inline ~/.ssh/id-solana-testnet.pub below
|
||||||
cat > /solana-authorized_keys <<EOF
|
cat > /solana-authorized_keys <<EOF
|
||||||
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFBNwLw0i+rI312gWshojFlNw9NV7WfaKeeUsYADqOvM2o4yrO2pPw+sgW8W+/rPpVyH7zU9WVRgTME8NgFV1Vc=
|
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFBNwLw0i+rI312gWshojFlNw9NV7WfaKeeUsYADqOvM2o4yrO2pPw+sgW8W+/rPpVyH7zU9WVRgTME8NgFV1Vc=
|
||||||
|
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGqZAwAZeBl0buOMz4FpUYrtpwk1L5aGKlbd7lI8dpbSx5WVRPWCVKhWzsGMtDUIfmozdzJouk1LPyihghTDgsE=
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
sudo -u solana bash -c "
|
sudo -u solana bash -c "
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-netutil"
|
name = "solana-netutil"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana Network Utilities"
|
description = "Solana Network Utilities"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -15,7 +15,7 @@ log = "0.4.2"
|
|||||||
nix = "0.14.1"
|
nix = "0.14.1"
|
||||||
rand = "0.6.1"
|
rand = "0.6.1"
|
||||||
socket2 = "0.3.9"
|
socket2 = "0.3.9"
|
||||||
solana-logger = { path = "../logger", version = "0.16.0" }
|
solana-logger = { path = "../logger", version = "0.16.2" }
|
||||||
tokio = "0.1"
|
tokio = "0.1"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-bpf-programs"
|
name = "solana-bpf-programs"
|
||||||
description = "Blockchain, Rebuilt for Scale"
|
description = "Blockchain, Rebuilt for Scale"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
documentation = "https://docs.rs/solana"
|
documentation = "https://docs.rs/solana"
|
||||||
homepage = "https://solana.com/"
|
homepage = "https://solana.com/"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
@ -21,10 +21,10 @@ walkdir = "2"
|
|||||||
bincode = "1.1.4"
|
bincode = "1.1.4"
|
||||||
byteorder = "1.3.2"
|
byteorder = "1.3.2"
|
||||||
elf = "0.0.10"
|
elf = "0.0.10"
|
||||||
solana-bpf-loader-api = { path = "../bpf_loader_api", version = "0.16.0" }
|
solana-bpf-loader-api = { path = "../bpf_loader_api", version = "0.16.2" }
|
||||||
solana-logger = { path = "../../logger", version = "0.16.0" }
|
solana-logger = { path = "../../logger", version = "0.16.2" }
|
||||||
solana-runtime = { path = "../../runtime", version = "0.16.0" }
|
solana-runtime = { path = "../../runtime", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../../sdk", version = "0.16.2" }
|
||||||
solana_rbpf = "=0.1.13"
|
solana_rbpf = "=0.1.13"
|
||||||
|
|
||||||
[[bench]]
|
[[bench]]
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "solana-bpf-rust-128bit"
|
name = "solana-bpf-rust-128bit"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana BPF iter program written in Rust"
|
description = "Solana BPF iter program written in Rust"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -12,8 +12,8 @@ homepage = "https://solana.com/"
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.0" }
|
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.2" }
|
||||||
solana-bpf-rust-128bit-dep = { path = "../128bit_dep", version = "0.16.0" }
|
solana-bpf-rust-128bit-dep = { path = "../128bit_dep", version = "0.16.2" }
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = []
|
members = []
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "solana-bpf-rust-128bit-dep"
|
name = "solana-bpf-rust-128bit-dep"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana BPF many-args-dep program written in Rust"
|
description = "Solana BPF many-args-dep program written in Rust"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -12,7 +12,7 @@ homepage = "https://solana.com/"
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.0" }
|
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.2" }
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = []
|
members = []
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "solana-bpf-rust-alloc"
|
name = "solana-bpf-rust-alloc"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana BPF alloc program written in Rust"
|
description = "Solana BPF alloc program written in Rust"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -12,7 +12,7 @@ homepage = "https://solana.com/"
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.0" }
|
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.2" }
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = []
|
members = []
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "solana-bpf-rust-dep-crate"
|
name = "solana-bpf-rust-dep-crate"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana BPF dep-crate program written in Rust"
|
description = "Solana BPF dep-crate program written in Rust"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -13,7 +13,7 @@ edition = "2018"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
byteorder = { version = "1", default-features = false }
|
byteorder = { version = "1", default-features = false }
|
||||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.0" }
|
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.2" }
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = []
|
members = []
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "solana-bpf-rust-iter"
|
name = "solana-bpf-rust-iter"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana BPF iter program written in Rust"
|
description = "Solana BPF iter program written in Rust"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -12,7 +12,7 @@ homepage = "https://solana.com/"
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.0" }
|
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.2" }
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = []
|
members = []
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "solana-bpf-rust-many-args"
|
name = "solana-bpf-rust-many-args"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana BPF many-args program written in Rust"
|
description = "Solana BPF many-args program written in Rust"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -12,8 +12,8 @@ homepage = "https://solana.com/"
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.0" }
|
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.2" }
|
||||||
solana-bpf-rust-many-args-dep = { path = "../many_args_dep", version = "0.16.0" }
|
solana-bpf-rust-many-args-dep = { path = "../many_args_dep", version = "0.16.2" }
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = []
|
members = []
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "solana-bpf-rust-many-args-dep"
|
name = "solana-bpf-rust-many-args-dep"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana BPF many-args-dep program written in Rust"
|
description = "Solana BPF many-args-dep program written in Rust"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -12,7 +12,7 @@ homepage = "https://solana.com/"
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.0" }
|
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.2" }
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = []
|
members = []
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "solana-bpf-rust-noop"
|
name = "solana-bpf-rust-noop"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana BPF noop program written in Rust"
|
description = "Solana BPF noop program written in Rust"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -12,7 +12,7 @@ homepage = "https://solana.com/"
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.0" }
|
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.2" }
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = []
|
members = []
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "solana-bpf-rust-panic"
|
name = "solana-bpf-rust-panic"
|
||||||
version = "0.15.0"
|
version = "0.16.2"
|
||||||
description = "Solana BPF iter program written in Rust"
|
description = "Solana BPF iter program written in Rust"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -12,7 +12,7 @@ homepage = "https://solana.com/"
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.0" }
|
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.2" }
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = []
|
members = []
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "solana-bpf-rust-tick-height"
|
name = "solana-bpf-rust-tick-height"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana BPF noop program written in Rust"
|
description = "Solana BPF noop program written in Rust"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -14,7 +14,7 @@ edition = "2018"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
byteorder = { version = "1", default-features = false }
|
byteorder = { version = "1", default-features = false }
|
||||||
|
|
||||||
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.0" }
|
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.2" }
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = []
|
members = []
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-bpf-loader-api"
|
name = "solana-bpf-loader-api"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana BPF Loader"
|
description = "Solana BPF Loader"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -14,8 +14,8 @@ byteorder = "1.3.2"
|
|||||||
libc = "0.2.58"
|
libc = "0.2.58"
|
||||||
log = "0.4.2"
|
log = "0.4.2"
|
||||||
serde = "1.0.92"
|
serde = "1.0.92"
|
||||||
solana-logger = { path = "../../logger", version = "0.16.0" }
|
solana-logger = { path = "../../logger", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../../sdk", version = "0.16.2" }
|
||||||
solana_rbpf = "=0.1.13"
|
solana_rbpf = "=0.1.13"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-bpf-loader-program"
|
name = "solana-bpf-loader-program"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana BPF Loader"
|
description = "Solana BPF Loader"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -10,9 +10,9 @@ edition = "2018"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = "0.4.2"
|
log = "0.4.2"
|
||||||
solana-logger = { path = "../../logger", version = "0.16.0" }
|
solana-logger = { path = "../../logger", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../../sdk", version = "0.16.2" }
|
||||||
solana-bpf-loader-api = { path = "../bpf_loader_api", version = "0.16.0" }
|
solana-bpf-loader-api = { path = "../bpf_loader_api", version = "0.16.2" }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["lib", "cdylib"]
|
crate-type = ["lib", "cdylib"]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-budget-api"
|
name = "solana-budget-api"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana Budget program API"
|
description = "Solana Budget program API"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -16,10 +16,10 @@ num-derive = "0.2"
|
|||||||
num-traits = "0.2"
|
num-traits = "0.2"
|
||||||
serde = "1.0.92"
|
serde = "1.0.92"
|
||||||
serde_derive = "1.0.92"
|
serde_derive = "1.0.92"
|
||||||
solana-sdk = { path = "../../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../../sdk", version = "0.16.2" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
solana-runtime = { path = "../../runtime", version = "0.16.0" }
|
solana-runtime = { path = "../../runtime", version = "0.16.2" }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["lib"]
|
crate-type = ["lib"]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-budget-program"
|
name = "solana-budget-program"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana budget program"
|
description = "Solana budget program"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -10,9 +10,9 @@ edition = "2018"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = "0.4.2"
|
log = "0.4.2"
|
||||||
solana-budget-api = { path = "../budget_api", version = "0.16.0" }
|
solana-budget-api = { path = "../budget_api", version = "0.16.2" }
|
||||||
solana-logger = { path = "../../logger", version = "0.16.0" }
|
solana-logger = { path = "../../logger", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../../sdk", version = "0.16.2" }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["lib", "cdylib"]
|
crate-type = ["lib", "cdylib"]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-config-api"
|
name = "solana-config-api"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "config program API"
|
description = "config program API"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -13,11 +13,11 @@ bincode = "1.1.4"
|
|||||||
log = "0.4.2"
|
log = "0.4.2"
|
||||||
serde = "1.0.92"
|
serde = "1.0.92"
|
||||||
serde_derive = "1.0.92"
|
serde_derive = "1.0.92"
|
||||||
solana-logger = { path = "../../logger", version = "0.16.0" }
|
solana-logger = { path = "../../logger", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../../sdk", version = "0.16.2" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
solana-runtime = { path = "../../runtime", version = "0.16.0" }
|
solana-runtime = { path = "../../runtime", version = "0.16.2" }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["lib"]
|
crate-type = ["lib"]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-config-program"
|
name = "solana-config-program"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "config program"
|
description = "config program"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -10,9 +10,9 @@ edition = "2018"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = "0.4.2"
|
log = "0.4.2"
|
||||||
solana-config-api = { path = "../config_api", version = "0.16.0" }
|
solana-config-api = { path = "../config_api", version = "0.16.2" }
|
||||||
solana-logger = { path = "../../logger", version = "0.16.0" }
|
solana-logger = { path = "../../logger", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../../sdk", version = "0.16.2" }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["lib", "cdylib"]
|
crate-type = ["lib", "cdylib"]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-exchange-api"
|
name = "solana-exchange-api"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana Exchange program API"
|
description = "Solana Exchange program API"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -13,12 +13,12 @@ bincode = "1.1.4"
|
|||||||
log = "0.4.2"
|
log = "0.4.2"
|
||||||
serde = "1.0.92"
|
serde = "1.0.92"
|
||||||
serde_derive = "1.0.92"
|
serde_derive = "1.0.92"
|
||||||
solana-logger = { path = "../../logger", version = "0.16.0" }
|
solana-logger = { path = "../../logger", version = "0.16.2" }
|
||||||
solana-metrics = { path = "../../metrics", version = "0.16.0" }
|
solana-metrics = { path = "../../metrics", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../../sdk", version = "0.16.2" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
solana-runtime = { path = "../../runtime", version = "0.16.0" }
|
solana-runtime = { path = "../../runtime", version = "0.16.2" }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["lib"]
|
crate-type = ["lib"]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-exchange-program"
|
name = "solana-exchange-program"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana exchange program"
|
description = "Solana exchange program"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -10,9 +10,9 @@ edition = "2018"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = "0.4.2"
|
log = "0.4.2"
|
||||||
solana-exchange-api = { path = "../exchange_api", version = "0.16.0" }
|
solana-exchange-api = { path = "../exchange_api", version = "0.16.2" }
|
||||||
solana-logger = { path = "../../logger", version = "0.16.0" }
|
solana-logger = { path = "../../logger", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../../sdk", version = "0.16.2" }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["lib", "cdylib"]
|
crate-type = ["lib", "cdylib"]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-failure-program"
|
name = "solana-failure-program"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana failure program"
|
description = "Solana failure program"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -10,10 +10,10 @@ edition = "2018"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = "0.4.2"
|
log = "0.4.2"
|
||||||
solana-sdk = { path = "../../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../../sdk", version = "0.16.2" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
solana-runtime = { path = "../../runtime", version = "0.16.0" }
|
solana-runtime = { path = "../../runtime", version = "0.16.2" }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["cdylib"]
|
crate-type = ["cdylib"]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-noop-program"
|
name = "solana-noop-program"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana noop program"
|
description = "Solana noop program"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -10,8 +10,8 @@ edition = "2018"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = "0.4.2"
|
log = "0.4.2"
|
||||||
solana-logger = { path = "../../logger", version = "0.16.0" }
|
solana-logger = { path = "../../logger", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../../sdk", version = "0.16.2" }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["cdylib"]
|
crate-type = ["cdylib"]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-stake-api"
|
name = "solana-stake-api"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana Stake program API"
|
description = "Solana Stake program API"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -14,10 +14,10 @@ log = "0.4.2"
|
|||||||
rand = "0.6.5"
|
rand = "0.6.5"
|
||||||
serde = "1.0.92"
|
serde = "1.0.92"
|
||||||
serde_derive = "1.0.92"
|
serde_derive = "1.0.92"
|
||||||
solana-logger = { path = "../../logger", version = "0.16.0" }
|
solana-logger = { path = "../../logger", version = "0.16.2" }
|
||||||
solana-metrics = { path = "../../metrics", version = "0.16.0" }
|
solana-metrics = { path = "../../metrics", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../../sdk", version = "0.16.2" }
|
||||||
solana-vote-api = { path = "../vote_api", version = "0.16.0" }
|
solana-vote-api = { path = "../vote_api", version = "0.16.2" }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["lib"]
|
crate-type = ["lib"]
|
||||||
|
@ -31,6 +31,24 @@ pub enum StakeInstruction {
|
|||||||
/// 2 - RewardsPool Stake Account from which to redeem credits
|
/// 2 - RewardsPool Stake Account from which to redeem credits
|
||||||
/// 3 - Rewards syscall Account that carries points values
|
/// 3 - Rewards syscall Account that carries points values
|
||||||
RedeemVoteCredits,
|
RedeemVoteCredits,
|
||||||
|
|
||||||
|
/// Withdraw unstaked lamports from the stake account
|
||||||
|
///
|
||||||
|
/// Expects 3 Accounts:
|
||||||
|
/// 0 - Delegate StakeAccount
|
||||||
|
/// 1 - System account to which the lamports will be transferred,
|
||||||
|
/// 2 - Syscall Account that carries epoch
|
||||||
|
///
|
||||||
|
/// The u64 is the portion of the Stake account balance to be withdrawn,
|
||||||
|
/// must be <= StakeAccount.lamports - staked lamports
|
||||||
|
Withdraw(u64),
|
||||||
|
|
||||||
|
/// Deactivates the stake in the account
|
||||||
|
///
|
||||||
|
/// Expects 2 Accounts:
|
||||||
|
/// 0 - Delegate StakeAccount
|
||||||
|
/// 1 - Syscall Account that carries epoch
|
||||||
|
Deactivate,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn create_stake_account(
|
pub fn create_stake_account(
|
||||||
@ -77,6 +95,23 @@ pub fn delegate_stake(stake_pubkey: &Pubkey, vote_pubkey: &Pubkey, stake: u64) -
|
|||||||
Instruction::new(id(), &StakeInstruction::DelegateStake(stake), account_metas)
|
Instruction::new(id(), &StakeInstruction::DelegateStake(stake), account_metas)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn withdraw(stake_pubkey: &Pubkey, to_pubkey: &Pubkey, lamports: u64) -> Instruction {
|
||||||
|
let account_metas = vec![
|
||||||
|
AccountMeta::new(*stake_pubkey, true),
|
||||||
|
AccountMeta::new(*to_pubkey, false),
|
||||||
|
AccountMeta::new(syscall::current::id(), false),
|
||||||
|
];
|
||||||
|
Instruction::new(id(), &StakeInstruction::Withdraw(lamports), account_metas)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn deactivate_stake(stake_pubkey: &Pubkey) -> Instruction {
|
||||||
|
let account_metas = vec![
|
||||||
|
AccountMeta::new(*stake_pubkey, true),
|
||||||
|
AccountMeta::new(syscall::current::id(), false),
|
||||||
|
];
|
||||||
|
Instruction::new(id(), &StakeInstruction::Deactivate, account_metas)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn process_instruction(
|
pub fn process_instruction(
|
||||||
_program_id: &Pubkey,
|
_program_id: &Pubkey,
|
||||||
keyed_accounts: &mut [KeyedAccount],
|
keyed_accounts: &mut [KeyedAccount],
|
||||||
@ -123,6 +158,27 @@ pub fn process_instruction(
|
|||||||
&syscall::rewards::from_keyed_account(&rest[0])?,
|
&syscall::rewards::from_keyed_account(&rest[0])?,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
StakeInstruction::Withdraw(lamports) => {
|
||||||
|
if rest.len() != 2 {
|
||||||
|
Err(InstructionError::InvalidInstructionData)?;
|
||||||
|
}
|
||||||
|
let (to, syscall) = &mut rest.split_at_mut(1);
|
||||||
|
let mut to = &mut to[0];
|
||||||
|
|
||||||
|
me.withdraw(
|
||||||
|
lamports,
|
||||||
|
&mut to,
|
||||||
|
&syscall::current::from_keyed_account(&syscall[0])?,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
StakeInstruction::Deactivate => {
|
||||||
|
if rest.len() != 1 {
|
||||||
|
Err(InstructionError::InvalidInstructionData)?;
|
||||||
|
}
|
||||||
|
let syscall = &rest[0];
|
||||||
|
|
||||||
|
me.deactivate_stake(&syscall::current::from_keyed_account(&syscall)?)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,6 +224,14 @@ mod tests {
|
|||||||
process_instruction(&delegate_stake(&Pubkey::default(), &Pubkey::default(), 0)),
|
process_instruction(&delegate_stake(&Pubkey::default(), &Pubkey::default(), 0)),
|
||||||
Err(InstructionError::InvalidAccountData),
|
Err(InstructionError::InvalidAccountData),
|
||||||
);
|
);
|
||||||
|
assert_eq!(
|
||||||
|
process_instruction(&withdraw(&Pubkey::default(), &Pubkey::new_rand(), 100)),
|
||||||
|
Err(InstructionError::InvalidAccountData),
|
||||||
|
);
|
||||||
|
assert_eq!(
|
||||||
|
process_instruction(&deactivate_stake(&Pubkey::default())),
|
||||||
|
Err(InstructionError::InvalidAccountData),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@ -250,6 +314,76 @@ mod tests {
|
|||||||
),
|
),
|
||||||
Err(InstructionError::InvalidAccountData),
|
Err(InstructionError::InvalidAccountData),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Tests 3rd keyed account is of correct type (Current instead of rewards) in withdraw
|
||||||
|
assert_eq!(
|
||||||
|
super::process_instruction(
|
||||||
|
&Pubkey::default(),
|
||||||
|
&mut [
|
||||||
|
KeyedAccount::new(&Pubkey::default(), false, &mut Account::default()),
|
||||||
|
KeyedAccount::new(&Pubkey::default(), false, &mut Account::default()),
|
||||||
|
KeyedAccount::new(
|
||||||
|
&syscall::rewards::id(),
|
||||||
|
false,
|
||||||
|
&mut syscall::rewards::create_account(1, 0.0, 0.0)
|
||||||
|
),
|
||||||
|
],
|
||||||
|
&serialize(&StakeInstruction::Withdraw(42)).unwrap(),
|
||||||
|
),
|
||||||
|
Err(InstructionError::InvalidArgument),
|
||||||
|
);
|
||||||
|
|
||||||
|
// Tests correct number of accounts are provided in withdraw
|
||||||
|
assert_eq!(
|
||||||
|
super::process_instruction(
|
||||||
|
&Pubkey::default(),
|
||||||
|
&mut [
|
||||||
|
KeyedAccount::new(&Pubkey::default(), false, &mut Account::default()),
|
||||||
|
KeyedAccount::new(
|
||||||
|
&syscall::current::id(),
|
||||||
|
false,
|
||||||
|
&mut syscall::rewards::create_account(1, 0.0, 0.0)
|
||||||
|
),
|
||||||
|
],
|
||||||
|
&serialize(&StakeInstruction::Withdraw(42)).unwrap(),
|
||||||
|
),
|
||||||
|
Err(InstructionError::InvalidInstructionData),
|
||||||
|
);
|
||||||
|
|
||||||
|
// Tests 2nd keyed account is of correct type (Current instead of rewards) in deactivate
|
||||||
|
assert_eq!(
|
||||||
|
super::process_instruction(
|
||||||
|
&Pubkey::default(),
|
||||||
|
&mut [
|
||||||
|
KeyedAccount::new(&Pubkey::default(), false, &mut Account::default()),
|
||||||
|
KeyedAccount::new(
|
||||||
|
&syscall::rewards::id(),
|
||||||
|
false,
|
||||||
|
&mut syscall::rewards::create_account(1, 0.0, 0.0)
|
||||||
|
),
|
||||||
|
],
|
||||||
|
&serialize(&StakeInstruction::Deactivate).unwrap(),
|
||||||
|
),
|
||||||
|
Err(InstructionError::InvalidArgument),
|
||||||
|
);
|
||||||
|
|
||||||
|
// Tests correct number of accounts are provided in deactivate
|
||||||
|
assert_eq!(
|
||||||
|
super::process_instruction(
|
||||||
|
&Pubkey::default(),
|
||||||
|
&mut [
|
||||||
|
KeyedAccount::new(&Pubkey::default(), false, &mut Account::default()),
|
||||||
|
KeyedAccount::new(&Pubkey::default(), false, &mut Account::default()),
|
||||||
|
KeyedAccount::new(
|
||||||
|
&syscall::current::id(),
|
||||||
|
false,
|
||||||
|
&mut syscall::rewards::create_account(1, 0.0, 0.0)
|
||||||
|
),
|
||||||
|
],
|
||||||
|
&serialize(&StakeInstruction::Deactivate).unwrap(),
|
||||||
|
),
|
||||||
|
Err(InstructionError::InvalidInstructionData),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ use solana_sdk::pubkey::Pubkey;
|
|||||||
use solana_sdk::syscall;
|
use solana_sdk::syscall;
|
||||||
use solana_sdk::timing::Epoch;
|
use solana_sdk::timing::Epoch;
|
||||||
use solana_vote_api::vote_state::VoteState;
|
use solana_vote_api::vote_state::VoteState;
|
||||||
|
use std::cmp;
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
|
#[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
|
||||||
pub enum StakeState {
|
pub enum StakeState {
|
||||||
@ -196,6 +197,12 @@ pub trait StakeAccount {
|
|||||||
rewards_account: &mut KeyedAccount,
|
rewards_account: &mut KeyedAccount,
|
||||||
rewards: &syscall::rewards::Rewards,
|
rewards: &syscall::rewards::Rewards,
|
||||||
) -> Result<(), InstructionError>;
|
) -> Result<(), InstructionError>;
|
||||||
|
fn withdraw(
|
||||||
|
&mut self,
|
||||||
|
lamports: u64,
|
||||||
|
to: &mut KeyedAccount,
|
||||||
|
current: &syscall::current::Current,
|
||||||
|
) -> Result<(), InstructionError>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> StakeAccount for KeyedAccount<'a> {
|
impl<'a> StakeAccount for KeyedAccount<'a> {
|
||||||
@ -281,6 +288,44 @@ impl<'a> StakeAccount for KeyedAccount<'a> {
|
|||||||
Err(InstructionError::InvalidAccountData)
|
Err(InstructionError::InvalidAccountData)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
fn withdraw(
|
||||||
|
&mut self,
|
||||||
|
lamports: u64,
|
||||||
|
to: &mut KeyedAccount,
|
||||||
|
current: &syscall::current::Current,
|
||||||
|
) -> Result<(), InstructionError> {
|
||||||
|
if self.signer_key().is_none() {
|
||||||
|
return Err(InstructionError::MissingRequiredSignature);
|
||||||
|
}
|
||||||
|
|
||||||
|
match self.state()? {
|
||||||
|
StakeState::Stake(mut stake) => {
|
||||||
|
let staked = if stake.stake(current.epoch) == 0 {
|
||||||
|
0
|
||||||
|
} else {
|
||||||
|
// Assume full stake if the stake is under warmup/cooldown
|
||||||
|
stake.stake
|
||||||
|
};
|
||||||
|
if lamports > self.account.lamports.saturating_sub(staked) {
|
||||||
|
return Err(InstructionError::InsufficientFunds);
|
||||||
|
}
|
||||||
|
self.account.lamports -= lamports;
|
||||||
|
// Adjust the stake (in case balance dropped below stake)
|
||||||
|
stake.stake = cmp::min(stake.stake, self.account.lamports);
|
||||||
|
to.account.lamports += lamports;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
StakeState::Uninitialized => {
|
||||||
|
if lamports > self.account.lamports {
|
||||||
|
return Err(InstructionError::InsufficientFunds);
|
||||||
|
}
|
||||||
|
self.account.lamports -= lamports;
|
||||||
|
to.account.lamports += lamports;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
_ => Err(InstructionError::InvalidAccountData),
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// utility function, used by Bank, tests, genesis
|
// utility function, used by Bank, tests, genesis
|
||||||
@ -316,6 +361,7 @@ mod tests {
|
|||||||
use solana_sdk::account::Account;
|
use solana_sdk::account::Account;
|
||||||
use solana_sdk::pubkey::Pubkey;
|
use solana_sdk::pubkey::Pubkey;
|
||||||
use solana_sdk::signature::{Keypair, KeypairUtil};
|
use solana_sdk::signature::{Keypair, KeypairUtil};
|
||||||
|
use solana_sdk::system_program;
|
||||||
use solana_vote_api::vote_state;
|
use solana_vote_api::vote_state;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@ -418,6 +464,181 @@ mod tests {
|
|||||||
assert_eq!(stake.stake(STAKE_WARMUP_EPOCHS * 42), 0);
|
assert_eq!(stake.stake(STAKE_WARMUP_EPOCHS * 42), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_deactivate_stake() {
|
||||||
|
let stake_pubkey = Pubkey::new_rand();
|
||||||
|
let stake_lamports = 42;
|
||||||
|
let mut stake_account =
|
||||||
|
Account::new(stake_lamports, std::mem::size_of::<StakeState>(), &id());
|
||||||
|
|
||||||
|
let current = syscall::current::Current::default();
|
||||||
|
|
||||||
|
// unsigned keyed account
|
||||||
|
let mut stake_keyed_account = KeyedAccount::new(&stake_pubkey, false, &mut stake_account);
|
||||||
|
assert_eq!(
|
||||||
|
stake_keyed_account.deactivate_stake(¤t),
|
||||||
|
Err(InstructionError::MissingRequiredSignature)
|
||||||
|
);
|
||||||
|
|
||||||
|
// signed keyed account but not staked yet
|
||||||
|
let mut stake_keyed_account = KeyedAccount::new(&stake_pubkey, true, &mut stake_account);
|
||||||
|
assert_eq!(
|
||||||
|
stake_keyed_account.deactivate_stake(¤t),
|
||||||
|
Err(InstructionError::InvalidAccountData)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Staking
|
||||||
|
let vote_pubkey = Pubkey::new_rand();
|
||||||
|
let mut vote_account =
|
||||||
|
vote_state::create_account(&vote_pubkey, &Pubkey::new_rand(), 0, 100);
|
||||||
|
let mut vote_keyed_account = KeyedAccount::new(&vote_pubkey, false, &mut vote_account);
|
||||||
|
vote_keyed_account.set_state(&VoteState::default()).unwrap();
|
||||||
|
assert_eq!(
|
||||||
|
stake_keyed_account.delegate_stake(&vote_keyed_account, stake_lamports, ¤t),
|
||||||
|
Ok(())
|
||||||
|
);
|
||||||
|
|
||||||
|
// Deactivate after staking
|
||||||
|
assert_eq!(stake_keyed_account.deactivate_stake(¤t), Ok(()));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_withdraw_stake() {
|
||||||
|
let stake_pubkey = Pubkey::new_rand();
|
||||||
|
let mut total_lamports = 100;
|
||||||
|
let stake_lamports = 42;
|
||||||
|
let mut stake_account =
|
||||||
|
Account::new(total_lamports, std::mem::size_of::<StakeState>(), &id());
|
||||||
|
|
||||||
|
let current = syscall::current::Current::default();
|
||||||
|
|
||||||
|
let to = Pubkey::new_rand();
|
||||||
|
let mut to_account = Account::new(1, 0, &system_program::id());
|
||||||
|
let mut to_keyed_account = KeyedAccount::new(&to, false, &mut to_account);
|
||||||
|
|
||||||
|
// unsigned keyed account
|
||||||
|
let mut stake_keyed_account = KeyedAccount::new(&stake_pubkey, false, &mut stake_account);
|
||||||
|
assert_eq!(
|
||||||
|
stake_keyed_account.withdraw(total_lamports, &mut to_keyed_account, ¤t),
|
||||||
|
Err(InstructionError::MissingRequiredSignature)
|
||||||
|
);
|
||||||
|
|
||||||
|
// signed keyed account but uninitialized
|
||||||
|
// try withdrawing more than balance
|
||||||
|
let mut stake_keyed_account = KeyedAccount::new(&stake_pubkey, true, &mut stake_account);
|
||||||
|
assert_eq!(
|
||||||
|
stake_keyed_account.withdraw(total_lamports + 1, &mut to_keyed_account, ¤t),
|
||||||
|
Err(InstructionError::InsufficientFunds)
|
||||||
|
);
|
||||||
|
|
||||||
|
// try withdrawing some (enough for rest of the test to carry forward)
|
||||||
|
let mut stake_keyed_account = KeyedAccount::new(&stake_pubkey, true, &mut stake_account);
|
||||||
|
assert_eq!(
|
||||||
|
stake_keyed_account.withdraw(5, &mut to_keyed_account, ¤t),
|
||||||
|
Ok(())
|
||||||
|
);
|
||||||
|
total_lamports -= 5;
|
||||||
|
|
||||||
|
// Stake some lamports (available lampoorts for withdrawls will reduce)
|
||||||
|
let vote_pubkey = Pubkey::new_rand();
|
||||||
|
let mut vote_account =
|
||||||
|
vote_state::create_account(&vote_pubkey, &Pubkey::new_rand(), 0, 100);
|
||||||
|
let mut vote_keyed_account = KeyedAccount::new(&vote_pubkey, false, &mut vote_account);
|
||||||
|
vote_keyed_account.set_state(&VoteState::default()).unwrap();
|
||||||
|
assert_eq!(
|
||||||
|
stake_keyed_account.delegate_stake(&vote_keyed_account, stake_lamports, ¤t),
|
||||||
|
Ok(())
|
||||||
|
);
|
||||||
|
|
||||||
|
// Try to withdraw more than what's available
|
||||||
|
assert_eq!(
|
||||||
|
stake_keyed_account.withdraw(
|
||||||
|
total_lamports - stake_lamports + 1,
|
||||||
|
&mut to_keyed_account,
|
||||||
|
¤t
|
||||||
|
),
|
||||||
|
Err(InstructionError::InsufficientFunds)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Try to withdraw all unstaked lamports
|
||||||
|
assert_eq!(
|
||||||
|
stake_keyed_account.withdraw(
|
||||||
|
total_lamports - stake_lamports,
|
||||||
|
&mut to_keyed_account,
|
||||||
|
¤t
|
||||||
|
),
|
||||||
|
Ok(())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_withdraw_stake_before_warmup() {
|
||||||
|
let stake_pubkey = Pubkey::new_rand();
|
||||||
|
let total_lamports = 100;
|
||||||
|
let stake_lamports = 42;
|
||||||
|
let mut stake_account =
|
||||||
|
Account::new(total_lamports, std::mem::size_of::<StakeState>(), &id());
|
||||||
|
|
||||||
|
let current = syscall::current::Current::default();
|
||||||
|
let mut future = syscall::current::Current::default();
|
||||||
|
future.epoch += 16;
|
||||||
|
|
||||||
|
let to = Pubkey::new_rand();
|
||||||
|
let mut to_account = Account::new(1, 0, &system_program::id());
|
||||||
|
let mut to_keyed_account = KeyedAccount::new(&to, false, &mut to_account);
|
||||||
|
|
||||||
|
let mut stake_keyed_account = KeyedAccount::new(&stake_pubkey, true, &mut stake_account);
|
||||||
|
|
||||||
|
// Stake some lamports (available lampoorts for withdrawls will reduce)
|
||||||
|
let vote_pubkey = Pubkey::new_rand();
|
||||||
|
let mut vote_account =
|
||||||
|
vote_state::create_account(&vote_pubkey, &Pubkey::new_rand(), 0, 100);
|
||||||
|
let mut vote_keyed_account = KeyedAccount::new(&vote_pubkey, false, &mut vote_account);
|
||||||
|
vote_keyed_account.set_state(&VoteState::default()).unwrap();
|
||||||
|
assert_eq!(
|
||||||
|
stake_keyed_account.delegate_stake(&vote_keyed_account, stake_lamports, &future),
|
||||||
|
Ok(())
|
||||||
|
);
|
||||||
|
|
||||||
|
// Try to withdraw including staked
|
||||||
|
assert_eq!(
|
||||||
|
stake_keyed_account.withdraw(
|
||||||
|
total_lamports - stake_lamports + 1,
|
||||||
|
&mut to_keyed_account,
|
||||||
|
¤t
|
||||||
|
),
|
||||||
|
Ok(())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_withdraw_stake_invalid_state() {
|
||||||
|
let stake_pubkey = Pubkey::new_rand();
|
||||||
|
let total_lamports = 100;
|
||||||
|
let mut stake_account =
|
||||||
|
Account::new(total_lamports, std::mem::size_of::<StakeState>(), &id());
|
||||||
|
|
||||||
|
let current = syscall::current::Current::default();
|
||||||
|
let mut future = syscall::current::Current::default();
|
||||||
|
future.epoch += 16;
|
||||||
|
|
||||||
|
let to = Pubkey::new_rand();
|
||||||
|
let mut to_account = Account::new(1, 0, &system_program::id());
|
||||||
|
let mut to_keyed_account = KeyedAccount::new(&to, false, &mut to_account);
|
||||||
|
|
||||||
|
let mut stake_keyed_account = KeyedAccount::new(&stake_pubkey, true, &mut stake_account);
|
||||||
|
let stake_state = StakeState::MiningPool {
|
||||||
|
epoch: 0,
|
||||||
|
point_value: 0.0,
|
||||||
|
};
|
||||||
|
stake_keyed_account.set_state(&stake_state).unwrap();
|
||||||
|
|
||||||
|
assert_eq!(
|
||||||
|
stake_keyed_account.withdraw(total_lamports, &mut to_keyed_account, ¤t),
|
||||||
|
Err(InstructionError::InvalidAccountData)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_stake_state_calculate_rewards() {
|
fn test_stake_state_calculate_rewards() {
|
||||||
let mut vote_state = VoteState::default();
|
let mut vote_state = VoteState::default();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-stake-program"
|
name = "solana-stake-program"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana stake program"
|
description = "Solana stake program"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -10,9 +10,9 @@ edition = "2018"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = "0.4.2"
|
log = "0.4.2"
|
||||||
solana-logger = { path = "../../logger", version = "0.16.0" }
|
solana-logger = { path = "../../logger", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../../sdk", version = "0.16.2" }
|
||||||
solana-stake-api = { path = "../stake_api", version = "0.16.0" }
|
solana-stake-api = { path = "../stake_api", version = "0.16.2" }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["lib", "cdylib"]
|
crate-type = ["lib", "cdylib"]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-storage-api"
|
name = "solana-storage-api"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana Storage program API"
|
description = "Solana Storage program API"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -12,12 +12,13 @@ edition = "2018"
|
|||||||
assert_matches = "1.3.0"
|
assert_matches = "1.3.0"
|
||||||
bincode = "1.1.4"
|
bincode = "1.1.4"
|
||||||
log = "0.4.2"
|
log = "0.4.2"
|
||||||
|
rand = "0.6.5"
|
||||||
num-derive = "0.2"
|
num-derive = "0.2"
|
||||||
num-traits = "0.2"
|
num-traits = "0.2"
|
||||||
serde = "1.0.92"
|
serde = "1.0.92"
|
||||||
serde_derive = "1.0.92"
|
serde_derive = "1.0.92"
|
||||||
solana-logger = { path = "../../logger", version = "0.16.0" }
|
solana-logger = { path = "../../logger", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../../sdk", version = "0.16.2" }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["lib"]
|
crate-type = ["lib"]
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
pub mod rewards_pools;
|
||||||
pub mod storage_contract;
|
pub mod storage_contract;
|
||||||
pub mod storage_instruction;
|
pub mod storage_instruction;
|
||||||
pub mod storage_processor;
|
pub mod storage_processor;
|
||||||
|
63
programs/storage_api/src/rewards_pools.rs
Normal file
63
programs/storage_api/src/rewards_pools.rs
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
//! rewards_pools
|
||||||
|
//! * initialize genesis with rewards pools
|
||||||
|
//! * keep track of rewards
|
||||||
|
//! * own mining pools
|
||||||
|
|
||||||
|
use crate::storage_contract::create_rewards_pool;
|
||||||
|
use rand::{thread_rng, Rng};
|
||||||
|
use solana_sdk::genesis_block::Builder;
|
||||||
|
use solana_sdk::hash::{hash, Hash};
|
||||||
|
use solana_sdk::pubkey::Pubkey;
|
||||||
|
|
||||||
|
// base rewards pool ID
|
||||||
|
const ID: [u8; 32] = [
|
||||||
|
6, 162, 25, 123, 127, 71, 141, 232, 129, 171, 58, 183, 79, 88, 181, 17, 163, 11, 51, 111, 22,
|
||||||
|
123, 67, 115, 5, 131, 109, 161, 16, 0, 0, 0,
|
||||||
|
];
|
||||||
|
|
||||||
|
solana_sdk::solana_name_id!(ID, "StorageMiningPoo111111111111111111111111111");
|
||||||
|
|
||||||
|
// to cut down on collisions for redemptions, we make multiple accounts
|
||||||
|
pub const NUM_REWARDS_POOLS: usize = 32;
|
||||||
|
|
||||||
|
pub fn genesis(mut builder: Builder) -> Builder {
|
||||||
|
let mut pubkey = id();
|
||||||
|
|
||||||
|
for _i in 0..NUM_REWARDS_POOLS {
|
||||||
|
builder = builder.rewards_pool(pubkey, create_rewards_pool());
|
||||||
|
pubkey = Pubkey::new(hash(pubkey.as_ref()).as_ref());
|
||||||
|
}
|
||||||
|
builder
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn random_id() -> Pubkey {
|
||||||
|
let mut id = Hash::new(&ID);
|
||||||
|
|
||||||
|
for _i in 0..thread_rng().gen_range(0, NUM_REWARDS_POOLS) {
|
||||||
|
id = hash(id.as_ref());
|
||||||
|
}
|
||||||
|
|
||||||
|
Pubkey::new(id.as_ref())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::*;
|
||||||
|
use solana_sdk::genesis_block::Builder;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test() {
|
||||||
|
let builder = Builder::new();
|
||||||
|
|
||||||
|
let genesis_block = genesis(builder).build();
|
||||||
|
|
||||||
|
for _i in 0..NUM_REWARDS_POOLS {
|
||||||
|
let id = random_id();
|
||||||
|
assert!(genesis_block
|
||||||
|
.rewards_pools
|
||||||
|
.iter()
|
||||||
|
.position(|x| x.0 == id)
|
||||||
|
.is_some());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -79,7 +79,7 @@ pub enum StorageContract {
|
|||||||
reward_validations: BTreeMap<usize, BTreeMap<Pubkey, Vec<ProofStatus>>>,
|
reward_validations: BTreeMap<usize, BTreeMap<Pubkey, Vec<ProofStatus>>>,
|
||||||
},
|
},
|
||||||
|
|
||||||
MiningPool,
|
RewardsPool,
|
||||||
}
|
}
|
||||||
|
|
||||||
// utility function, used by Bank, tests, genesis
|
// utility function, used by Bank, tests, genesis
|
||||||
@ -99,17 +99,6 @@ pub fn create_validator_storage_account(owner: Pubkey, lamports: u64) -> Account
|
|||||||
storage_account
|
storage_account
|
||||||
}
|
}
|
||||||
|
|
||||||
// utility function, used by genesis
|
|
||||||
pub fn create_mining_pool_account(lamports: u64) -> Account {
|
|
||||||
let mut storage_account = Account::new(lamports, STORAGE_ACCOUNT_SPACE as usize, &crate::id());
|
|
||||||
|
|
||||||
storage_account
|
|
||||||
.set_state(&StorageContract::MiningPool)
|
|
||||||
.expect("set_state");
|
|
||||||
|
|
||||||
storage_account
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct StorageAccount<'a> {
|
pub struct StorageAccount<'a> {
|
||||||
pub(crate) id: Pubkey,
|
pub(crate) id: Pubkey,
|
||||||
account: &'a mut Account,
|
account: &'a mut Account,
|
||||||
@ -120,16 +109,6 @@ impl<'a> StorageAccount<'a> {
|
|||||||
Self { id, account }
|
Self { id, account }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn initialize_mining_pool(&mut self) -> Result<(), InstructionError> {
|
|
||||||
let storage_contract = &mut self.account.state()?;
|
|
||||||
if let StorageContract::Uninitialized = storage_contract {
|
|
||||||
*storage_contract = StorageContract::MiningPool;
|
|
||||||
self.account.set_state(storage_contract)
|
|
||||||
} else {
|
|
||||||
Err(InstructionError::AccountAlreadyInitialized)?
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn initialize_replicator_storage(&mut self, owner: Pubkey) -> Result<(), InstructionError> {
|
pub fn initialize_replicator_storage(&mut self, owner: Pubkey) -> Result<(), InstructionError> {
|
||||||
let storage_contract = &mut self.account.state()?;
|
let storage_contract = &mut self.account.state()?;
|
||||||
if let StorageContract::Uninitialized = storage_contract {
|
if let StorageContract::Uninitialized = storage_contract {
|
||||||
@ -379,7 +358,7 @@ impl<'a> StorageAccount<'a> {
|
|||||||
|
|
||||||
pub fn claim_storage_reward(
|
pub fn claim_storage_reward(
|
||||||
&mut self,
|
&mut self,
|
||||||
mining_pool: &mut KeyedAccount,
|
rewards_pool: &mut KeyedAccount,
|
||||||
owner: &mut StorageAccount,
|
owner: &mut StorageAccount,
|
||||||
) -> Result<(), InstructionError> {
|
) -> Result<(), InstructionError> {
|
||||||
let mut storage_contract = &mut self.account.state()?;
|
let mut storage_contract = &mut self.account.state()?;
|
||||||
@ -395,17 +374,10 @@ impl<'a> StorageAccount<'a> {
|
|||||||
StorageError::InvalidOwner as u32,
|
StorageError::InvalidOwner as u32,
|
||||||
))?
|
))?
|
||||||
}
|
}
|
||||||
|
redeem(*pending_lamports, rewards_pool, owner)?;
|
||||||
let pending = *pending_lamports;
|
|
||||||
if mining_pool.account.lamports < pending {
|
|
||||||
Err(InstructionError::CustomError(
|
|
||||||
StorageError::RewardPoolDepleted as u32,
|
|
||||||
))?
|
|
||||||
}
|
|
||||||
mining_pool.account.lamports -= pending;
|
|
||||||
owner.account.lamports += pending;
|
|
||||||
//clear pending_lamports
|
//clear pending_lamports
|
||||||
*pending_lamports = 0;
|
*pending_lamports = 0;
|
||||||
|
|
||||||
self.account.set_state(storage_contract)
|
self.account.set_state(storage_contract)
|
||||||
} else if let StorageContract::ReplicatorStorage {
|
} else if let StorageContract::ReplicatorStorage {
|
||||||
owner: account_owner,
|
owner: account_owner,
|
||||||
@ -429,11 +401,10 @@ impl<'a> StorageAccount<'a> {
|
|||||||
})
|
})
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
reward_validations.clear();
|
reward_validations.clear();
|
||||||
let total_proofs = checked_proofs.len() as u64;
|
|
||||||
let num_validations = count_valid_proofs(&checked_proofs);
|
let num_validations = count_valid_proofs(&checked_proofs);
|
||||||
let reward = num_validations * REPLICATOR_REWARD * (num_validations / total_proofs);
|
let reward = num_validations * REPLICATOR_REWARD;
|
||||||
mining_pool.account.lamports -= reward;
|
redeem(reward, rewards_pool, owner)?;
|
||||||
owner.account.lamports += reward;
|
|
||||||
self.account.set_state(storage_contract)
|
self.account.set_state(storage_contract)
|
||||||
} else {
|
} else {
|
||||||
Err(InstructionError::InvalidArgument)?
|
Err(InstructionError::InvalidArgument)?
|
||||||
@ -441,6 +412,25 @@ impl<'a> StorageAccount<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn redeem(
|
||||||
|
rewards: u64,
|
||||||
|
rewards_pool: &mut KeyedAccount,
|
||||||
|
owner: &mut StorageAccount,
|
||||||
|
) -> Result<(), InstructionError> {
|
||||||
|
if rewards_pool.account.lamports < rewards {
|
||||||
|
Err(InstructionError::CustomError(
|
||||||
|
StorageError::RewardPoolDepleted as u32,
|
||||||
|
))?
|
||||||
|
}
|
||||||
|
rewards_pool.account.lamports -= rewards;
|
||||||
|
owner.account.lamports += rewards;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn create_rewards_pool() -> Account {
|
||||||
|
Account::new_data(std::u64::MAX, &StorageContract::RewardsPool, &crate::id()).unwrap()
|
||||||
|
}
|
||||||
|
|
||||||
/// Store the result of a proof validation into the replicator account
|
/// Store the result of a proof validation into the replicator account
|
||||||
fn store_validation_result(
|
fn store_validation_result(
|
||||||
me: &Pubkey,
|
me: &Pubkey,
|
||||||
@ -486,7 +476,7 @@ fn count_valid_proofs(proofs: &[ProofStatus]) -> u64 {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::id;
|
use crate::{id, rewards_pools};
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@ -586,4 +576,35 @@ mod tests {
|
|||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_redeem() {
|
||||||
|
let reward = 100;
|
||||||
|
let mut owner_account = Account {
|
||||||
|
lamports: 1,
|
||||||
|
..Account::default()
|
||||||
|
};
|
||||||
|
let mut rewards_pool = create_rewards_pool();
|
||||||
|
let pool_id = rewards_pools::id();
|
||||||
|
let mut keyed_pool_account = KeyedAccount::new(&pool_id, false, &mut rewards_pool);
|
||||||
|
let mut owner = StorageAccount {
|
||||||
|
id: Pubkey::default(),
|
||||||
|
account: &mut owner_account,
|
||||||
|
};
|
||||||
|
|
||||||
|
// check that redeeming from depleted pools fails
|
||||||
|
keyed_pool_account.account.lamports = 0;
|
||||||
|
assert_eq!(
|
||||||
|
redeem(reward, &mut keyed_pool_account, &mut owner),
|
||||||
|
Err(InstructionError::CustomError(
|
||||||
|
StorageError::RewardPoolDepleted as u32,
|
||||||
|
))
|
||||||
|
);
|
||||||
|
assert_eq!(owner.account.lamports, 1);
|
||||||
|
|
||||||
|
keyed_pool_account.account.lamports = 200;
|
||||||
|
assert_eq!(redeem(reward, &mut keyed_pool_account, &mut owner), Ok(()));
|
||||||
|
// check that the owner's balance increases
|
||||||
|
assert_eq!(owner.account.lamports, 101);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
use crate::id;
|
|
||||||
use crate::storage_contract::{ProofStatus, STORAGE_ACCOUNT_SPACE};
|
use crate::storage_contract::{ProofStatus, STORAGE_ACCOUNT_SPACE};
|
||||||
|
use crate::{id, rewards_pools};
|
||||||
use serde_derive::{Deserialize, Serialize};
|
use serde_derive::{Deserialize, Serialize};
|
||||||
use solana_sdk::hash::Hash;
|
use solana_sdk::hash::Hash;
|
||||||
use solana_sdk::instruction::{AccountMeta, Instruction};
|
use solana_sdk::instruction::{AccountMeta, Instruction};
|
||||||
@ -10,11 +10,10 @@ use solana_sdk::system_instruction;
|
|||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||||
pub enum StorageInstruction {
|
pub enum StorageInstruction {
|
||||||
/// Initialize the account as a mining pool, validator or replicator
|
/// Initialize the account as a validator or replicator
|
||||||
///
|
///
|
||||||
/// Expects 1 Account:
|
/// Expects 1 Account:
|
||||||
/// 0 - Account to be initialized
|
/// 0 - Account to be initialized
|
||||||
InitializeMiningPool,
|
|
||||||
InitializeValidatorStorage {
|
InitializeValidatorStorage {
|
||||||
owner: Pubkey,
|
owner: Pubkey,
|
||||||
},
|
},
|
||||||
@ -128,27 +127,6 @@ pub fn create_replicator_storage_account(
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn create_mining_pool_account(
|
|
||||||
from_pubkey: &Pubkey,
|
|
||||||
storage_pubkey: &Pubkey,
|
|
||||||
lamports: u64,
|
|
||||||
) -> Vec<Instruction> {
|
|
||||||
vec![
|
|
||||||
system_instruction::create_account(
|
|
||||||
from_pubkey,
|
|
||||||
storage_pubkey,
|
|
||||||
lamports,
|
|
||||||
STORAGE_ACCOUNT_SPACE,
|
|
||||||
&id(),
|
|
||||||
),
|
|
||||||
Instruction::new(
|
|
||||||
id(),
|
|
||||||
&StorageInstruction::InitializeMiningPool,
|
|
||||||
vec![AccountMeta::new(*storage_pubkey, false)],
|
|
||||||
),
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn mining_proof(
|
pub fn mining_proof(
|
||||||
storage_pubkey: &Pubkey,
|
storage_pubkey: &Pubkey,
|
||||||
sha_state: Hash,
|
sha_state: Hash,
|
||||||
@ -200,15 +178,11 @@ pub fn proof_validation(
|
|||||||
Instruction::new(id(), &storage_instruction, account_metas)
|
Instruction::new(id(), &storage_instruction, account_metas)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn claim_reward(
|
pub fn claim_reward(owner_pubkey: &Pubkey, storage_pubkey: &Pubkey) -> Instruction {
|
||||||
owner_pubkey: &Pubkey,
|
|
||||||
storage_pubkey: &Pubkey,
|
|
||||||
mining_pool_pubkey: &Pubkey,
|
|
||||||
) -> Instruction {
|
|
||||||
let storage_instruction = StorageInstruction::ClaimStorageReward;
|
let storage_instruction = StorageInstruction::ClaimStorageReward;
|
||||||
let account_metas = vec![
|
let account_metas = vec![
|
||||||
AccountMeta::new(*storage_pubkey, false),
|
AccountMeta::new(*storage_pubkey, false),
|
||||||
AccountMeta::new(*mining_pool_pubkey, false),
|
AccountMeta::new(rewards_pools::random_id(), false),
|
||||||
AccountMeta::new(*owner_pubkey, false),
|
AccountMeta::new(*owner_pubkey, false),
|
||||||
];
|
];
|
||||||
Instruction::new(id(), &storage_instruction, account_metas)
|
Instruction::new(id(), &storage_instruction, account_metas)
|
||||||
|
@ -20,12 +20,6 @@ pub fn process_instruction(
|
|||||||
let mut storage_account = StorageAccount::new(*me[0].unsigned_key(), &mut me[0].account);
|
let mut storage_account = StorageAccount::new(*me[0].unsigned_key(), &mut me[0].account);
|
||||||
|
|
||||||
match bincode::deserialize(data).map_err(|_| InstructionError::InvalidInstructionData)? {
|
match bincode::deserialize(data).map_err(|_| InstructionError::InvalidInstructionData)? {
|
||||||
StorageInstruction::InitializeMiningPool => {
|
|
||||||
if !rest.is_empty() {
|
|
||||||
Err(InstructionError::InvalidArgument)?;
|
|
||||||
}
|
|
||||||
storage_account.initialize_mining_pool()
|
|
||||||
}
|
|
||||||
StorageInstruction::InitializeReplicatorStorage { owner } => {
|
StorageInstruction::InitializeReplicatorStorage { owner } => {
|
||||||
if !rest.is_empty() {
|
if !rest.is_empty() {
|
||||||
Err(InstructionError::InvalidArgument)?;
|
Err(InstructionError::InvalidArgument)?;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-storage-program"
|
name = "solana-storage-program"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana storage program"
|
description = "Solana storage program"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -10,12 +10,12 @@ edition = "2018"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = "0.4.2"
|
log = "0.4.2"
|
||||||
solana-logger = { path = "../../logger", version = "0.16.0" }
|
solana-logger = { path = "../../logger", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../../sdk", version = "0.16.2" }
|
||||||
solana-storage-api = { path = "../storage_api", version = "0.16.0" }
|
solana-storage-api = { path = "../storage_api", version = "0.16.2" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
solana-runtime = { path = "../../runtime", version = "0.16.0" }
|
solana-runtime = { path = "../../runtime", version = "0.16.2" }
|
||||||
assert_matches = "1.3.0"
|
assert_matches = "1.3.0"
|
||||||
bincode = "1.1.4"
|
bincode = "1.1.4"
|
||||||
|
|
||||||
|
@ -3,10 +3,10 @@ use bincode::deserialize;
|
|||||||
use log::*;
|
use log::*;
|
||||||
use solana_runtime::bank::Bank;
|
use solana_runtime::bank::Bank;
|
||||||
use solana_runtime::bank_client::BankClient;
|
use solana_runtime::bank_client::BankClient;
|
||||||
|
use solana_runtime::genesis_utils::{create_genesis_block, GenesisBlockInfo};
|
||||||
use solana_sdk::account::{create_keyed_accounts, Account, KeyedAccount};
|
use solana_sdk::account::{create_keyed_accounts, Account, KeyedAccount};
|
||||||
use solana_sdk::account_utils::State;
|
use solana_sdk::account_utils::State;
|
||||||
use solana_sdk::client::SyncClient;
|
use solana_sdk::client::SyncClient;
|
||||||
use solana_sdk::genesis_block::create_genesis_block;
|
|
||||||
use solana_sdk::hash::{hash, Hash};
|
use solana_sdk::hash::{hash, Hash};
|
||||||
use solana_sdk::instruction::{Instruction, InstructionError};
|
use solana_sdk::instruction::{Instruction, InstructionError};
|
||||||
use solana_sdk::message::Message;
|
use solana_sdk::message::Message;
|
||||||
@ -53,7 +53,11 @@ fn test_account_owner() {
|
|||||||
let validator_storage_pubkey = Pubkey::new_rand();
|
let validator_storage_pubkey = Pubkey::new_rand();
|
||||||
let replicator_storage_pubkey = Pubkey::new_rand();
|
let replicator_storage_pubkey = Pubkey::new_rand();
|
||||||
|
|
||||||
let (genesis_block, mint_keypair) = create_genesis_block(1000);
|
let GenesisBlockInfo {
|
||||||
|
genesis_block,
|
||||||
|
mint_keypair,
|
||||||
|
..
|
||||||
|
} = create_genesis_block(1000);
|
||||||
let mut bank = Bank::new(&genesis_block);
|
let mut bank = Bank::new(&genesis_block);
|
||||||
let mint_pubkey = mint_keypair.pubkey();
|
let mint_pubkey = mint_keypair.pubkey();
|
||||||
bank.add_instruction_processor(id(), process_instruction);
|
bank.add_instruction_processor(id(), process_instruction);
|
||||||
@ -259,7 +263,11 @@ fn test_submit_mining_ok() {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_validate_mining() {
|
fn test_validate_mining() {
|
||||||
solana_logger::setup();
|
solana_logger::setup();
|
||||||
let (mut genesis_block, mint_keypair) = create_genesis_block(100_000);
|
let GenesisBlockInfo {
|
||||||
|
mut genesis_block,
|
||||||
|
mint_keypair,
|
||||||
|
..
|
||||||
|
} = create_genesis_block(100_000);
|
||||||
genesis_block
|
genesis_block
|
||||||
.native_instruction_processors
|
.native_instruction_processors
|
||||||
.push(solana_storage_program::solana_storage_program!());
|
.push(solana_storage_program::solana_storage_program!());
|
||||||
@ -276,9 +284,6 @@ fn test_validate_mining() {
|
|||||||
let validator_storage_keypair = Keypair::new();
|
let validator_storage_keypair = Keypair::new();
|
||||||
let validator_storage_id = validator_storage_keypair.pubkey();
|
let validator_storage_id = validator_storage_keypair.pubkey();
|
||||||
|
|
||||||
let mining_pool_keypair = Keypair::new();
|
|
||||||
let mining_pool_pubkey = mining_pool_keypair.pubkey();
|
|
||||||
|
|
||||||
let bank = Bank::new(&genesis_block);
|
let bank = Bank::new(&genesis_block);
|
||||||
let bank = Arc::new(bank);
|
let bank = Arc::new(bank);
|
||||||
let bank_client = BankClient::new_shared(&bank);
|
let bank_client = BankClient::new_shared(&bank);
|
||||||
@ -291,12 +296,6 @@ fn test_validate_mining() {
|
|||||||
&[&replicator_1_storage_id, &replicator_2_storage_id],
|
&[&replicator_1_storage_id, &replicator_2_storage_id],
|
||||||
10,
|
10,
|
||||||
);
|
);
|
||||||
let message = Message::new(storage_instruction::create_mining_pool_account(
|
|
||||||
&mint_pubkey,
|
|
||||||
&mining_pool_pubkey,
|
|
||||||
10_000,
|
|
||||||
));
|
|
||||||
bank_client.send_message(&[&mint_keypair], message).unwrap();
|
|
||||||
|
|
||||||
// create a new bank in segment 2
|
// create a new bank in segment 2
|
||||||
let bank = Arc::new(Bank::new_from_parent(
|
let bank = Arc::new(Bank::new_from_parent(
|
||||||
@ -407,7 +406,6 @@ fn test_validate_mining() {
|
|||||||
vec![storage_instruction::claim_reward(
|
vec![storage_instruction::claim_reward(
|
||||||
&owner_pubkey,
|
&owner_pubkey,
|
||||||
&validator_storage_id,
|
&validator_storage_id,
|
||||||
&mining_pool_pubkey,
|
|
||||||
)],
|
)],
|
||||||
Some(&mint_pubkey),
|
Some(&mint_pubkey),
|
||||||
);
|
);
|
||||||
@ -431,7 +429,6 @@ fn test_validate_mining() {
|
|||||||
vec![storage_instruction::claim_reward(
|
vec![storage_instruction::claim_reward(
|
||||||
&owner_pubkey,
|
&owner_pubkey,
|
||||||
&replicator_1_storage_id,
|
&replicator_1_storage_id,
|
||||||
&mining_pool_pubkey,
|
|
||||||
)],
|
)],
|
||||||
Some(&mint_pubkey),
|
Some(&mint_pubkey),
|
||||||
);
|
);
|
||||||
@ -447,7 +444,6 @@ fn test_validate_mining() {
|
|||||||
vec![storage_instruction::claim_reward(
|
vec![storage_instruction::claim_reward(
|
||||||
&owner_pubkey,
|
&owner_pubkey,
|
||||||
&replicator_2_storage_id,
|
&replicator_2_storage_id,
|
||||||
&mining_pool_pubkey,
|
|
||||||
)],
|
)],
|
||||||
Some(&mint_pubkey),
|
Some(&mint_pubkey),
|
||||||
);
|
);
|
||||||
@ -561,7 +557,11 @@ fn get_storage_blockhash<C: SyncClient>(client: &C, account: &Pubkey) -> Hash {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_bank_storage() {
|
fn test_bank_storage() {
|
||||||
let (mut genesis_block, mint_keypair) = create_genesis_block(1000);
|
let GenesisBlockInfo {
|
||||||
|
mut genesis_block,
|
||||||
|
mint_keypair,
|
||||||
|
..
|
||||||
|
} = create_genesis_block(1000);
|
||||||
genesis_block
|
genesis_block
|
||||||
.native_instruction_processors
|
.native_instruction_processors
|
||||||
.push(solana_storage_program::solana_storage_program!());
|
.push(solana_storage_program::solana_storage_program!());
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-token-api"
|
name = "solana-token-api"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana Token API"
|
description = "Solana Token API"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -15,8 +15,8 @@ num-derive = "0.2"
|
|||||||
num-traits = "0.2"
|
num-traits = "0.2"
|
||||||
serde = "1.0.92"
|
serde = "1.0.92"
|
||||||
serde_derive = "1.0.92"
|
serde_derive = "1.0.92"
|
||||||
solana-logger = { path = "../../logger", version = "0.16.0" }
|
solana-logger = { path = "../../logger", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../../sdk", version = "0.16.2" }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["lib"]
|
crate-type = ["lib"]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-token-program"
|
name = "solana-token-program"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana token program"
|
description = "Solana token program"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -10,9 +10,9 @@ edition = "2018"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = "0.4.2"
|
log = "0.4.2"
|
||||||
solana-logger = { path = "../../logger", version = "0.16.0" }
|
solana-logger = { path = "../../logger", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../../sdk", version = "0.16.2" }
|
||||||
solana-token-api = { path = "../token_api", version = "0.16.0" }
|
solana-token-api = { path = "../token_api", version = "0.16.2" }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["lib", "cdylib"]
|
crate-type = ["lib", "cdylib"]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-vote-api"
|
name = "solana-vote-api"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana Vote program API"
|
description = "Solana Vote program API"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -13,9 +13,9 @@ bincode = "1.1.4"
|
|||||||
log = "0.4.2"
|
log = "0.4.2"
|
||||||
serde = "1.0.92"
|
serde = "1.0.92"
|
||||||
serde_derive = "1.0.92"
|
serde_derive = "1.0.92"
|
||||||
solana-logger = { path = "../../logger", version = "0.16.0" }
|
solana-logger = { path = "../../logger", version = "0.16.2" }
|
||||||
solana-metrics = { path = "../../metrics", version = "0.16.0" }
|
solana-metrics = { path = "../../metrics", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../../sdk", version = "0.16.2" }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["lib"]
|
crate-type = ["lib"]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-vote-program"
|
name = "solana-vote-program"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana Vote program"
|
description = "Solana Vote program"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -10,9 +10,9 @@ edition = "2018"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = "0.4.2"
|
log = "0.4.2"
|
||||||
solana-logger = { path = "../../logger", version = "0.16.0" }
|
solana-logger = { path = "../../logger", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../../sdk", version = "0.16.2" }
|
||||||
solana-vote-api = { path = "../vote_api", version = "0.16.0" }
|
solana-vote-api = { path = "../vote_api", version = "0.16.2" }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["lib", "cdylib"]
|
crate-type = ["lib", "cdylib"]
|
||||||
|
@ -2,17 +2,17 @@
|
|||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
name = "solana-replicator"
|
name = "solana-replicator"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
homepage = "https://solana.com/"
|
homepage = "https://solana.com/"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = "2.33.0"
|
clap = "2.33.0"
|
||||||
solana = { path = "../core", version = "0.16.0" }
|
solana = { path = "../core", version = "0.16.2" }
|
||||||
solana-logger = { path = "../logger", version = "0.16.0" }
|
solana-logger = { path = "../logger", version = "0.16.2" }
|
||||||
solana-netutil = { path = "../netutil", version = "0.16.0" }
|
solana-netutil = { path = "../netutil", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../sdk", version = "0.16.2" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
cuda = ["solana/cuda"]
|
cuda = ["solana/cuda"]
|
||||||
|
@ -2,7 +2,6 @@ use clap::{crate_description, crate_name, crate_version, App, Arg};
|
|||||||
use solana::cluster_info::{Node, FULLNODE_PORT_RANGE};
|
use solana::cluster_info::{Node, FULLNODE_PORT_RANGE};
|
||||||
use solana::contact_info::ContactInfo;
|
use solana::contact_info::ContactInfo;
|
||||||
use solana::replicator::Replicator;
|
use solana::replicator::Replicator;
|
||||||
use solana_sdk::pubkey::Pubkey;
|
|
||||||
use solana_sdk::signature::{read_keypair, Keypair, KeypairUtil};
|
use solana_sdk::signature::{read_keypair, Keypair, KeypairUtil};
|
||||||
use std::net::SocketAddr;
|
use std::net::SocketAddr;
|
||||||
use std::process::exit;
|
use std::process::exit;
|
||||||
@ -70,10 +69,6 @@ fn main() {
|
|||||||
Keypair::new()
|
Keypair::new()
|
||||||
};
|
};
|
||||||
|
|
||||||
let storage_mining_pool_pubkey = "StorageMiningPoo111111111111111111111111111"
|
|
||||||
.parse::<Pubkey>()
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let entrypoint_addr = matches
|
let entrypoint_addr = matches
|
||||||
.value_of("entrypoint")
|
.value_of("entrypoint")
|
||||||
.map(|entrypoint| {
|
.map(|entrypoint| {
|
||||||
@ -106,6 +101,6 @@ fn main() {
|
|||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
replicator.run(storage_mining_pool_pubkey);
|
replicator.run();
|
||||||
replicator.close();
|
replicator.close();
|
||||||
}
|
}
|
||||||
|
3
run.sh
3
run.sh
@ -61,7 +61,6 @@ else
|
|||||||
fi
|
fi
|
||||||
solana-keygen new -f -o "$dataDir"/drone-keypair.json
|
solana-keygen new -f -o "$dataDir"/drone-keypair.json
|
||||||
solana-keygen new -f -o "$dataDir"/leader-storage-account-keypair.json
|
solana-keygen new -f -o "$dataDir"/leader-storage-account-keypair.json
|
||||||
solana-keygen new -f -o "$dataDir"/storage-mining-pool-keypair.json
|
|
||||||
|
|
||||||
leaderVoteAccountPubkey=$(\
|
leaderVoteAccountPubkey=$(\
|
||||||
solana-wallet \
|
solana-wallet \
|
||||||
@ -72,8 +71,6 @@ leaderVoteAccountPubkey=$(\
|
|||||||
solana-genesis \
|
solana-genesis \
|
||||||
--lamports 1000000000 \
|
--lamports 1000000000 \
|
||||||
--bootstrap-leader-lamports 10000000 \
|
--bootstrap-leader-lamports 10000000 \
|
||||||
--storage-mining-pool-lamports 100000000 \
|
|
||||||
--storage-mining-pool-keypair "$dataDir"/storage-mining-pool-keypair.json \
|
|
||||||
--target-lamports-per-signature 42 \
|
--target-lamports-per-signature 42 \
|
||||||
--target-signatures-per-slot 42 \
|
--target-signatures-per-slot 42 \
|
||||||
--hashes-per-tick sleep \
|
--hashes-per-tick sleep \
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-runtime"
|
name = "solana-runtime"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana runtime"
|
description = "Solana runtime"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -25,17 +25,17 @@ rayon = "1.1.0"
|
|||||||
serde = "1.0.92"
|
serde = "1.0.92"
|
||||||
serde_derive = "1.0.92"
|
serde_derive = "1.0.92"
|
||||||
serde_json = "1.0.38"
|
serde_json = "1.0.38"
|
||||||
solana-logger = { path = "../logger", version = "0.16.0" }
|
solana-logger = { path = "../logger", version = "0.16.2" }
|
||||||
solana-metrics = { path = "../metrics", version = "0.16.0" }
|
solana-metrics = { path = "../metrics", version = "0.16.2" }
|
||||||
solana-bpf-loader-api = { path = "../programs/bpf_loader_api", version = "0.16.0" }
|
solana-bpf-loader-api = { path = "../programs/bpf_loader_api", version = "0.16.2" }
|
||||||
solana-bpf-loader-program = { path = "../programs/bpf_loader_program", version = "0.16.0" }
|
solana-bpf-loader-program = { path = "../programs/bpf_loader_program", version = "0.16.2" }
|
||||||
solana-noop-program = { path = "../programs/noop_program", version = "0.16.0" }
|
solana-noop-program = { path = "../programs/noop_program", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../sdk", version = "0.16.2" }
|
||||||
solana-stake-api = { path = "../programs/stake_api", version = "0.16.0" }
|
solana-stake-api = { path = "../programs/stake_api", version = "0.16.2" }
|
||||||
solana-stake-program = { path = "../programs/stake_program", version = "0.16.0" }
|
solana-stake-program = { path = "../programs/stake_program", version = "0.16.2" }
|
||||||
solana-storage-api = { path = "../programs/storage_api", version = "0.16.0" }
|
solana-storage-api = { path = "../programs/storage_api", version = "0.16.2" }
|
||||||
solana-vote-api = { path = "../programs/vote_api", version = "0.16.0" }
|
solana-vote-api = { path = "../programs/vote_api", version = "0.16.2" }
|
||||||
solana-vote-program = { path = "../programs/vote_program", version = "0.16.0" }
|
solana-vote-program = { path = "../programs/vote_program", version = "0.16.2" }
|
||||||
sys-info = "0.5.7"
|
sys-info = "0.5.7"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
@ -245,6 +245,8 @@ impl AccountStorageEntry {
|
|||||||
|
|
||||||
if count > 0 {
|
if count > 0 {
|
||||||
*count_and_status = (count - 1, status);
|
*count_and_status = (count - 1, status);
|
||||||
|
} else {
|
||||||
|
warn!("count value 0 for fork {}", self.fork_id);
|
||||||
}
|
}
|
||||||
count_and_status.0
|
count_and_status.0
|
||||||
}
|
}
|
||||||
@ -260,7 +262,7 @@ pub struct AccountsDB {
|
|||||||
pub storage: RwLock<AccountStorage>,
|
pub storage: RwLock<AccountStorage>,
|
||||||
|
|
||||||
/// distribute the accounts across storage lists
|
/// distribute the accounts across storage lists
|
||||||
next_id: AtomicUsize,
|
pub next_id: AtomicUsize,
|
||||||
|
|
||||||
/// write version
|
/// write version
|
||||||
write_version: AtomicUsize,
|
write_version: AtomicUsize,
|
||||||
@ -325,9 +327,7 @@ impl AccountsDB {
|
|||||||
|
|
||||||
let _len: usize = deserialize_from(&mut stream)
|
let _len: usize = deserialize_from(&mut stream)
|
||||||
.map_err(|_| AccountsDB::get_io_error("len deserialize error"))?;
|
.map_err(|_| AccountsDB::get_io_error("len deserialize error"))?;
|
||||||
let accounts_index: AccountsIndex<AccountInfo> = deserialize_from(&mut stream)
|
let mut storage: AccountStorage = deserialize_from(&mut stream)
|
||||||
.map_err(|_| AccountsDB::get_io_error("accounts index deserialize error"))?;
|
|
||||||
let storage: AccountStorage = deserialize_from(&mut stream)
|
|
||||||
.map_err(|_| AccountsDB::get_io_error("storage deserialize error"))?;
|
.map_err(|_| AccountsDB::get_io_error("storage deserialize error"))?;
|
||||||
let version: u64 = deserialize_from(&mut stream)
|
let version: u64 = deserialize_from(&mut stream)
|
||||||
.map_err(|_| AccountsDB::get_io_error("write version deserialize error"))?;
|
.map_err(|_| AccountsDB::get_io_error("write version deserialize error"))?;
|
||||||
@ -341,11 +341,13 @@ impl AccountsDB {
|
|||||||
ids.sort();
|
ids.sort();
|
||||||
|
|
||||||
{
|
{
|
||||||
let mut index = self.accounts_index.write().unwrap();
|
|
||||||
let union = index.roots.union(&accounts_index.roots);
|
|
||||||
index.roots = union.cloned().collect();
|
|
||||||
index.last_root = accounts_index.last_root;
|
|
||||||
let mut stores = self.storage.write().unwrap();
|
let mut stores = self.storage.write().unwrap();
|
||||||
|
if let Some((_, store0)) = storage.0.remove_entry(&0) {
|
||||||
|
let fork_storage0 = stores.0.entry(0).or_insert_with(HashMap::new);
|
||||||
|
for (id, store) in store0.iter() {
|
||||||
|
fork_storage0.insert(*id, store.clone());
|
||||||
|
}
|
||||||
|
}
|
||||||
stores.0.extend(storage.0);
|
stores.0.extend(storage.0);
|
||||||
}
|
}
|
||||||
self.next_id
|
self.next_id
|
||||||
@ -627,8 +629,8 @@ impl AccountsDB {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn generate_index(&self) {
|
fn generate_index(&self) {
|
||||||
let mut forks: Vec<Fork> = self.storage.read().unwrap().0.keys().cloned().collect();
|
let storage = self.storage.read().unwrap();
|
||||||
|
let mut forks: Vec<Fork> = storage.0.keys().cloned().collect();
|
||||||
forks.sort();
|
forks.sort();
|
||||||
let mut accounts_index = self.accounts_index.write().unwrap();
|
let mut accounts_index = self.accounts_index.write().unwrap();
|
||||||
accounts_index.roots.insert(0);
|
accounts_index.roots.insert(0);
|
||||||
@ -655,8 +657,12 @@ impl AccountsDB {
|
|||||||
while let Some(maps) = accumulator.pop() {
|
while let Some(maps) = accumulator.pop() {
|
||||||
AccountsDB::merge(&mut account_maps, &maps);
|
AccountsDB::merge(&mut account_maps, &maps);
|
||||||
}
|
}
|
||||||
for (pubkey, (_, account_info)) in account_maps.iter() {
|
if !account_maps.is_empty() {
|
||||||
accounts_index.add_index(*fork_id, pubkey, account_info.clone());
|
accounts_index.roots.insert(*fork_id);
|
||||||
|
let mut _reclaims: Vec<(u64, AccountInfo)> = vec![];
|
||||||
|
for (pubkey, (_, account_info)) in account_maps.iter() {
|
||||||
|
accounts_index.insert(*fork_id, pubkey, account_info.clone(), &mut _reclaims);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -668,15 +674,11 @@ impl Serialize for AccountsDB {
|
|||||||
S: serde::ser::Serializer,
|
S: serde::ser::Serializer,
|
||||||
{
|
{
|
||||||
use serde::ser::Error;
|
use serde::ser::Error;
|
||||||
let accounts_index = self.accounts_index.read().unwrap();
|
|
||||||
let storage = self.storage.read().unwrap();
|
let storage = self.storage.read().unwrap();
|
||||||
let len = serialized_size(&*accounts_index).unwrap()
|
let len = serialized_size(&*storage).unwrap() + std::mem::size_of::<u64>() as u64;
|
||||||
+ serialized_size(&*storage).unwrap()
|
|
||||||
+ std::mem::size_of::<u64>() as u64;
|
|
||||||
let mut buf = vec![0u8; len as usize];
|
let mut buf = vec![0u8; len as usize];
|
||||||
let mut wr = Cursor::new(&mut buf[..]);
|
let mut wr = Cursor::new(&mut buf[..]);
|
||||||
let version: u64 = self.write_version.load(Ordering::Relaxed) as u64;
|
let version: u64 = self.write_version.load(Ordering::Relaxed) as u64;
|
||||||
serialize_into(&mut wr, &*accounts_index).map_err(Error::custom)?;
|
|
||||||
serialize_into(&mut wr, &*storage).map_err(Error::custom)?;
|
serialize_into(&mut wr, &*storage).map_err(Error::custom)?;
|
||||||
serialize_into(&mut wr, &version).map_err(Error::custom)?;
|
serialize_into(&mut wr, &version).map_err(Error::custom)?;
|
||||||
let len = wr.position() as usize;
|
let len = wr.position() as usize;
|
||||||
@ -880,7 +882,7 @@ mod tests {
|
|||||||
ACCOUNT_DATA_FILE_SIZE as usize / 3,
|
ACCOUNT_DATA_FILE_SIZE as usize / 3,
|
||||||
0,
|
0,
|
||||||
);
|
);
|
||||||
assert!(check_storage(&db, 2));
|
assert!(check_storage(&db, 0, 2));
|
||||||
|
|
||||||
let pubkey = Pubkey::new_rand();
|
let pubkey = Pubkey::new_rand();
|
||||||
let account = Account::new(1, ACCOUNT_DATA_FILE_SIZE as usize / 3, &pubkey);
|
let account = Account::new(1, ACCOUNT_DATA_FILE_SIZE as usize / 3, &pubkey);
|
||||||
@ -991,12 +993,17 @@ mod tests {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn check_storage(accounts: &AccountsDB, count: usize) -> bool {
|
fn check_storage(accounts: &AccountsDB, fork: Fork, count: usize) -> bool {
|
||||||
let stores = accounts.storage.read().unwrap();
|
let storage = accounts.storage.read().unwrap();
|
||||||
assert_eq!(stores.0[&0].len(), 1);
|
assert_eq!(storage.0[&fork].len(), 1);
|
||||||
assert_eq!(stores.0[&0][&0].status(), AccountStorageStatus::Available);
|
let fork_storage = storage.0.get(&fork).unwrap();
|
||||||
assert_eq!(stores.0[&0][&0].count(), count);
|
let mut total_count: usize = 0;
|
||||||
stores.0[&0][&0].count() == count
|
for store in fork_storage.values() {
|
||||||
|
assert_eq!(store.status(), AccountStorageStatus::Available);
|
||||||
|
total_count += store.count();
|
||||||
|
}
|
||||||
|
assert_eq!(total_count, count);
|
||||||
|
total_count == count
|
||||||
}
|
}
|
||||||
|
|
||||||
fn check_accounts(
|
fn check_accounts(
|
||||||
@ -1057,7 +1064,7 @@ mod tests {
|
|||||||
let mut pubkeys: Vec<Pubkey> = vec![];
|
let mut pubkeys: Vec<Pubkey> = vec![];
|
||||||
create_account(&accounts, &mut pubkeys, 0, 100, 0, 0);
|
create_account(&accounts, &mut pubkeys, 0, 100, 0, 0);
|
||||||
update_accounts(&accounts, &pubkeys, 0, 99);
|
update_accounts(&accounts, &pubkeys, 0, 99);
|
||||||
assert_eq!(check_storage(&accounts, 100), true);
|
assert_eq!(check_storage(&accounts, 0, 100), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@ -1232,7 +1239,7 @@ mod tests {
|
|||||||
let accounts = AccountsDB::new(&paths.paths);
|
let accounts = AccountsDB::new(&paths.paths);
|
||||||
let mut pubkeys: Vec<Pubkey> = vec![];
|
let mut pubkeys: Vec<Pubkey> = vec![];
|
||||||
create_account(&accounts, &mut pubkeys, 0, 100, 0, 0);
|
create_account(&accounts, &mut pubkeys, 0, 100, 0, 0);
|
||||||
assert_eq!(check_storage(&accounts, 100), true);
|
assert_eq!(check_storage(&accounts, 0, 100), true);
|
||||||
check_accounts(&accounts, &pubkeys, 0, 100, 1);
|
check_accounts(&accounts, &pubkeys, 0, 100, 1);
|
||||||
modify_accounts(&accounts, &pubkeys, 0, 100, 2);
|
modify_accounts(&accounts, &pubkeys, 0, 100, 2);
|
||||||
check_accounts(&accounts, &pubkeys, 0, 100, 2);
|
check_accounts(&accounts, &pubkeys, 0, 100, 2);
|
||||||
@ -1244,6 +1251,8 @@ mod tests {
|
|||||||
let mut buf = vec![0u8; serialized_size(&accounts).unwrap() as usize];
|
let mut buf = vec![0u8; serialized_size(&accounts).unwrap() as usize];
|
||||||
let mut writer = Cursor::new(&mut buf[..]);
|
let mut writer = Cursor::new(&mut buf[..]);
|
||||||
serialize_into(&mut writer, &accounts).unwrap();
|
serialize_into(&mut writer, &accounts).unwrap();
|
||||||
|
assert!(check_storage(&accounts, 0, 100));
|
||||||
|
assert!(check_storage(&accounts, 1, 10));
|
||||||
|
|
||||||
let mut reader = BufReader::new(&buf[..]);
|
let mut reader = BufReader::new(&buf[..]);
|
||||||
let daccounts = AccountsDB::new(&paths.paths);
|
let daccounts = AccountsDB::new(&paths.paths);
|
||||||
@ -1254,6 +1263,8 @@ mod tests {
|
|||||||
);
|
);
|
||||||
check_accounts(&daccounts, &pubkeys, 0, 100, 2);
|
check_accounts(&daccounts, &pubkeys, 0, 100, 2);
|
||||||
check_accounts(&daccounts, &pubkeys1, 1, 10, 1);
|
check_accounts(&daccounts, &pubkeys1, 1, 10, 1);
|
||||||
|
assert!(check_storage(&daccounts, 0, 100));
|
||||||
|
assert!(check_storage(&daccounts, 1, 10));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -1,21 +1,18 @@
|
|||||||
use hashbrown::HashMap;
|
use hashbrown::HashMap;
|
||||||
use log::*;
|
use log::*;
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
use solana_sdk::pubkey::Pubkey;
|
use solana_sdk::pubkey::Pubkey;
|
||||||
use std::collections;
|
use std::collections;
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
|
|
||||||
pub type Fork = u64;
|
pub type Fork = u64;
|
||||||
|
|
||||||
#[derive(Debug, Default, Deserialize, Serialize)]
|
#[derive(Debug, Default)]
|
||||||
pub struct AccountsIndex<T> {
|
pub struct AccountsIndex<T> {
|
||||||
#[serde(skip)]
|
|
||||||
pub account_maps: HashMap<Pubkey, Vec<(Fork, T)>>,
|
pub account_maps: HashMap<Pubkey, Vec<(Fork, T)>>,
|
||||||
|
|
||||||
pub roots: HashSet<Fork>,
|
pub roots: HashSet<Fork>,
|
||||||
|
|
||||||
//This value that needs to be stored to recover the index from AppendVec
|
//This value that needs to be stored to recover the index from AppendVec
|
||||||
#[serde(skip)]
|
|
||||||
pub last_root: Fork,
|
pub last_root: Fork,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -325,6 +325,7 @@ impl Serialize for AppendVec {
|
|||||||
+ std::mem::size_of::<usize>() as u64;
|
+ std::mem::size_of::<usize>() as u64;
|
||||||
let mut buf = vec![0u8; len as usize];
|
let mut buf = vec![0u8; len as usize];
|
||||||
let mut wr = Cursor::new(&mut buf[..]);
|
let mut wr = Cursor::new(&mut buf[..]);
|
||||||
|
self.map.flush().map_err(Error::custom)?;
|
||||||
serialize_into(&mut wr, &self.path).map_err(Error::custom)?;
|
serialize_into(&mut wr, &self.path).map_err(Error::custom)?;
|
||||||
serialize_into(&mut wr, &(self.current_len.load(Ordering::Relaxed) as u64))
|
serialize_into(&mut wr, &(self.current_len.load(Ordering::Relaxed) as u64))
|
||||||
.map_err(Error::custom)?;
|
.map_err(Error::custom)?;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
//! already been signed and verified.
|
//! already been signed and verified.
|
||||||
use crate::accounts::Accounts;
|
use crate::accounts::Accounts;
|
||||||
use crate::accounts_db::{
|
use crate::accounts_db::{
|
||||||
ErrorCounters, InstructionAccounts, InstructionCredits, InstructionLoaders,
|
AppendVecId, ErrorCounters, InstructionAccounts, InstructionCredits, InstructionLoaders,
|
||||||
};
|
};
|
||||||
use crate::accounts_index::Fork;
|
use crate::accounts_index::Fork;
|
||||||
use crate::blockhash_queue::BlockhashQueue;
|
use crate::blockhash_queue::BlockhashQueue;
|
||||||
@ -62,8 +62,12 @@ pub struct BankRc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl BankRc {
|
impl BankRc {
|
||||||
pub fn new(account_paths: Option<String>) -> Self {
|
pub fn new(account_paths: Option<String>, id: AppendVecId) -> Self {
|
||||||
let accounts = Accounts::new(account_paths);
|
let accounts = Accounts::new(account_paths);
|
||||||
|
accounts
|
||||||
|
.accounts_db
|
||||||
|
.next_id
|
||||||
|
.store(id as usize, Ordering::Relaxed);
|
||||||
BankRc {
|
BankRc {
|
||||||
accounts: Arc::new(accounts),
|
accounts: Arc::new(accounts),
|
||||||
parent: RwLock::new(None),
|
parent: RwLock::new(None),
|
||||||
@ -374,9 +378,10 @@ impl Bank {
|
|||||||
genesis_block: &GenesisBlock,
|
genesis_block: &GenesisBlock,
|
||||||
account_paths: Option<String>,
|
account_paths: Option<String>,
|
||||||
status_cache_rc: &StatusCacheRc,
|
status_cache_rc: &StatusCacheRc,
|
||||||
|
id: AppendVecId,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
let mut bank = Self::default();
|
let mut bank = Self::default();
|
||||||
bank.set_bank_rc(&BankRc::new(account_paths), &status_cache_rc);
|
bank.set_bank_rc(&BankRc::new(account_paths, id), &status_cache_rc);
|
||||||
bank.process_genesis_block(genesis_block);
|
bank.process_genesis_block(genesis_block);
|
||||||
bank.ancestors.insert(0, 0);
|
bank.ancestors.insert(0, 0);
|
||||||
bank
|
bank
|
||||||
@ -2583,7 +2588,7 @@ mod tests {
|
|||||||
let mut dbank: Bank = deserialize_from(&mut rdr).unwrap();
|
let mut dbank: Bank = deserialize_from(&mut rdr).unwrap();
|
||||||
let mut reader = BufReader::new(&buf[rdr.position() as usize..]);
|
let mut reader = BufReader::new(&buf[rdr.position() as usize..]);
|
||||||
dbank.set_bank_rc(
|
dbank.set_bank_rc(
|
||||||
&BankRc::new(Some(bank0.accounts().paths.clone())),
|
&BankRc::new(Some(bank0.accounts().paths.clone()), 0),
|
||||||
&StatusCacheRc::default(),
|
&StatusCacheRc::default(),
|
||||||
);
|
);
|
||||||
assert!(dbank.rc.update_from_stream(&mut reader).is_ok());
|
assert!(dbank.rc.update_from_stream(&mut reader).is_ok());
|
||||||
|
@ -70,6 +70,7 @@ pub fn create_genesis_block_with_leader(
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
builder = solana_stake_api::rewards_pools::genesis(builder);
|
builder = solana_stake_api::rewards_pools::genesis(builder);
|
||||||
|
builder = solana_storage_api::rewards_pools::genesis(builder);
|
||||||
|
|
||||||
GenesisBlockInfo {
|
GenesisBlockInfo {
|
||||||
genesis_block: builder.build(),
|
genesis_block: builder.build(),
|
||||||
|
@ -186,7 +186,10 @@ impl MessageProcessor {
|
|||||||
let program_id = instruction.program_id(&message.account_keys);
|
let program_id = instruction.program_id(&message.account_keys);
|
||||||
// TODO: the runtime should be checking read/write access to memory
|
// TODO: the runtime should be checking read/write access to memory
|
||||||
// we are trusting the hard-coded programs not to clobber or allocate
|
// we are trusting the hard-coded programs not to clobber or allocate
|
||||||
let pre_total: u64 = program_accounts.iter().map(|a| a.lamports).sum();
|
let pre_total: u128 = program_accounts
|
||||||
|
.iter()
|
||||||
|
.map(|a| u128::from(a.lamports))
|
||||||
|
.sum();
|
||||||
let pre_data: Vec<_> = program_accounts
|
let pre_data: Vec<_> = program_accounts
|
||||||
.iter_mut()
|
.iter_mut()
|
||||||
.map(|a| (a.owner, a.lamports, a.data.clone()))
|
.map(|a| (a.owner, a.lamports, a.data.clone()))
|
||||||
@ -215,7 +218,10 @@ impl MessageProcessor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// The total sum of all the lamports in all the accounts cannot change.
|
// The total sum of all the lamports in all the accounts cannot change.
|
||||||
let post_total: u64 = program_accounts.iter().map(|a| a.lamports).sum();
|
let post_total: u128 = program_accounts
|
||||||
|
.iter()
|
||||||
|
.map(|a| u128::from(a.lamports))
|
||||||
|
.sum();
|
||||||
if pre_total != post_total {
|
if pre_total != post_total {
|
||||||
return Err(InstructionError::UnbalancedInstruction);
|
return Err(InstructionError::UnbalancedInstruction);
|
||||||
}
|
}
|
||||||
|
@ -63,10 +63,10 @@ fi
|
|||||||
|
|
||||||
$solana_wallet "${entrypoint[@]}" address
|
$solana_wallet "${entrypoint[@]}" address
|
||||||
check_balance_output "0 lamports"
|
check_balance_output "0 lamports"
|
||||||
$solana_wallet "${entrypoint[@]}" airdrop 60
|
$solana_wallet "${entrypoint[@]}" airdrop 600
|
||||||
check_balance_output "60 lamports"
|
check_balance_output "600 lamports"
|
||||||
$solana_wallet "${entrypoint[@]}" airdrop 40
|
$solana_wallet "${entrypoint[@]}" airdrop 400
|
||||||
check_balance_output "100 lamports"
|
check_balance_output "1000 lamports"
|
||||||
pay_and_confirm $garbage_address 50
|
pay_and_confirm $garbage_address 50
|
||||||
check_balance_output "lamports" # <-- exact number of lamports here depends on the current cluster fees
|
check_balance_output "lamports" # <-- exact number of lamports here depends on the current cluster fees
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-sdk"
|
name = "solana-sdk"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana SDK"
|
description = "Solana SDK"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -28,5 +28,5 @@ serde_derive = "1.0.92"
|
|||||||
serde_json = "1.0.39"
|
serde_json = "1.0.39"
|
||||||
sha2 = "0.8.0"
|
sha2 = "0.8.0"
|
||||||
solana-ed25519-dalek = "0.2.0"
|
solana-ed25519-dalek = "0.2.0"
|
||||||
solana-logger = { path = "../logger", version = "0.16.0" }
|
solana-logger = { path = "../logger", version = "0.16.2" }
|
||||||
untrusted = "0.6.2"
|
untrusted = "0.6.2"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "solana-sdk-bpf-utils"
|
name = "solana-sdk-bpf-utils"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Solana BPF SDK Rust Utils"
|
description = "Solana BPF SDK Rust Utils"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solana-upload-perf"
|
name = "solana-upload-perf"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
description = "Metrics Upload Utility"
|
description = "Metrics Upload Utility"
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -12,7 +12,7 @@ publish = false
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
log = "0.4.2"
|
log = "0.4.2"
|
||||||
serde_json = "1.0.39"
|
serde_json = "1.0.39"
|
||||||
solana-metrics = { path = "../metrics", version = "0.16.0" }
|
solana-metrics = { path = "../metrics", version = "0.16.2" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "solana-upload-perf"
|
name = "solana-upload-perf"
|
||||||
|
@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
name = "solana-validator"
|
name = "solana-validator"
|
||||||
description = "Blockchain, Rebuilt for Scale"
|
description = "Blockchain, Rebuilt for Scale"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
homepage = "https://solana.com/"
|
homepage = "https://solana.com/"
|
||||||
@ -12,15 +12,15 @@ homepage = "https://solana.com/"
|
|||||||
clap = "2.33.0"
|
clap = "2.33.0"
|
||||||
log = "0.4.2"
|
log = "0.4.2"
|
||||||
serde_json = "1.0.39"
|
serde_json = "1.0.39"
|
||||||
solana = { path = "../core", version = "0.16.0" }
|
solana = { path = "../core", version = "0.16.2" }
|
||||||
solana-drone = { path = "../drone", version = "0.16.0" }
|
solana-drone = { path = "../drone", version = "0.16.2" }
|
||||||
solana-logger = { path = "../logger", version = "0.16.0" }
|
solana-logger = { path = "../logger", version = "0.16.2" }
|
||||||
solana-metrics = { path = "../metrics", version = "0.16.0" }
|
solana-metrics = { path = "../metrics", version = "0.16.2" }
|
||||||
solana-netutil = { path = "../netutil", version = "0.16.0" }
|
solana-netutil = { path = "../netutil", version = "0.16.2" }
|
||||||
solana-runtime = { path = "../runtime", version = "0.16.0" }
|
solana-runtime = { path = "../runtime", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../sdk", version = "0.16.2" }
|
||||||
solana-vote-api = { path = "../programs/vote_api", version = "0.16.0" }
|
solana-vote-api = { path = "../programs/vote_api", version = "0.16.2" }
|
||||||
solana-vote-signer = { path = "../vote-signer", version = "0.16.0" }
|
solana-vote-signer = { path = "../vote-signer", version = "0.16.2" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
cuda = ["solana/cuda"]
|
cuda = ["solana/cuda"]
|
||||||
|
@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
name = "solana-vote-signer"
|
name = "solana-vote-signer"
|
||||||
description = "Solana Vote Signing Service"
|
description = "Solana Vote Signing Service"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
homepage = "https://solana.com/"
|
homepage = "https://solana.com/"
|
||||||
@ -17,8 +17,8 @@ jsonrpc-http-server = "12.0.0"
|
|||||||
log = "0.4.2"
|
log = "0.4.2"
|
||||||
serde = "1.0.92"
|
serde = "1.0.92"
|
||||||
serde_json = "1.0.39"
|
serde_json = "1.0.39"
|
||||||
solana-metrics = { path = "../metrics", version = "0.16.0" }
|
solana-metrics = { path = "../metrics", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../sdk", version = "0.16.2" }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["lib"]
|
crate-type = ["lib"]
|
||||||
|
@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
name = "solana-wallet"
|
name = "solana-wallet"
|
||||||
description = "Blockchain, Rebuilt for Scale"
|
description = "Blockchain, Rebuilt for Scale"
|
||||||
version = "0.16.0"
|
version = "0.16.2"
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
homepage = "https://solana.com/"
|
homepage = "https://solana.com/"
|
||||||
@ -17,21 +17,21 @@ dirs = "2.0.1"
|
|||||||
log = "0.4.2"
|
log = "0.4.2"
|
||||||
num-traits = "0.2"
|
num-traits = "0.2"
|
||||||
serde_json = "1.0.39"
|
serde_json = "1.0.39"
|
||||||
solana-budget-api = { path = "../programs/budget_api", version = "0.16.0" }
|
solana-budget-api = { path = "../programs/budget_api", version = "0.16.2" }
|
||||||
solana-client = { path = "../client", version = "0.16.0" }
|
solana-client = { path = "../client", version = "0.16.2" }
|
||||||
solana-drone = { path = "../drone", version = "0.16.0" }
|
solana-drone = { path = "../drone", version = "0.16.2" }
|
||||||
solana-logger = { path = "../logger", version = "0.16.0" }
|
solana-logger = { path = "../logger", version = "0.16.2" }
|
||||||
solana-netutil = { path = "../netutil", version = "0.16.0" }
|
solana-netutil = { path = "../netutil", version = "0.16.2" }
|
||||||
solana-sdk = { path = "../sdk", version = "0.16.0" }
|
solana-sdk = { path = "../sdk", version = "0.16.2" }
|
||||||
solana-stake-api = { path = "../programs/stake_api", version = "0.16.0" }
|
solana-stake-api = { path = "../programs/stake_api", version = "0.16.2" }
|
||||||
solana-storage-api = { path = "../programs/storage_api", version = "0.16.0" }
|
solana-storage-api = { path = "../programs/storage_api", version = "0.16.2" }
|
||||||
solana-vote-api = { path = "../programs/vote_api", version = "0.16.0" }
|
solana-vote-api = { path = "../programs/vote_api", version = "0.16.2" }
|
||||||
solana-vote-signer = { path = "../vote-signer", version = "0.16.0" }
|
solana-vote-signer = { path = "../vote-signer", version = "0.16.2" }
|
||||||
url = "1.7.2"
|
url = "1.7.2"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
solana = { path = "../core", version = "0.16.0" }
|
solana = { path = "../core", version = "0.16.2" }
|
||||||
solana-budget-program = { path = "../programs/budget_program", version = "0.16.0" }
|
solana-budget-program = { path = "../programs/budget_program", version = "0.16.2" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
cuda = []
|
cuda = []
|
||||||
|
@ -52,12 +52,13 @@ pub enum WalletCommand {
|
|||||||
ShowVoteAccount(Pubkey),
|
ShowVoteAccount(Pubkey),
|
||||||
CreateStakeAccount(Pubkey, u64),
|
CreateStakeAccount(Pubkey, u64),
|
||||||
DelegateStake(Keypair, Pubkey, u64),
|
DelegateStake(Keypair, Pubkey, u64),
|
||||||
|
WithdrawStake(Keypair, Pubkey, u64),
|
||||||
|
DeactivateStake(Keypair),
|
||||||
RedeemVoteCredits(Pubkey, Pubkey),
|
RedeemVoteCredits(Pubkey, Pubkey),
|
||||||
ShowStakeAccount(Pubkey),
|
ShowStakeAccount(Pubkey),
|
||||||
CreateStorageMiningPoolAccount(Pubkey, u64),
|
|
||||||
CreateReplicatorStorageAccount(Pubkey, Pubkey),
|
CreateReplicatorStorageAccount(Pubkey, Pubkey),
|
||||||
CreateValidatorStorageAccount(Pubkey, Pubkey),
|
CreateValidatorStorageAccount(Pubkey, Pubkey),
|
||||||
ClaimStorageReward(Pubkey, Pubkey, Pubkey),
|
ClaimStorageReward(Pubkey, Pubkey),
|
||||||
ShowStorageAccount(Pubkey),
|
ShowStorageAccount(Pubkey),
|
||||||
Deploy(String),
|
Deploy(String),
|
||||||
GetTransactionCount,
|
GetTransactionCount,
|
||||||
@ -248,6 +249,23 @@ pub fn parse_command(
|
|||||||
stake,
|
stake,
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
("withdraw-stake", Some(matches)) => {
|
||||||
|
let staking_account_keypair =
|
||||||
|
keypair_of(matches, "staking_account_keypair_file").unwrap();
|
||||||
|
let destination_account_pubkey =
|
||||||
|
value_of(matches, "destination_account_pubkey").unwrap();
|
||||||
|
let lamports = matches.value_of("lamports").unwrap().parse()?;
|
||||||
|
Ok(WalletCommand::WithdrawStake(
|
||||||
|
staking_account_keypair,
|
||||||
|
destination_account_pubkey,
|
||||||
|
lamports,
|
||||||
|
))
|
||||||
|
}
|
||||||
|
("deactivate-stake", Some(matches)) => {
|
||||||
|
let staking_account_keypair =
|
||||||
|
keypair_of(matches, "staking_account_keypair_file").unwrap();
|
||||||
|
Ok(WalletCommand::DeactivateStake(staking_account_keypair))
|
||||||
|
}
|
||||||
("redeem-vote-credits", Some(matches)) => {
|
("redeem-vote-credits", Some(matches)) => {
|
||||||
let staking_account_pubkey = value_of(matches, "staking_account_pubkey").unwrap();
|
let staking_account_pubkey = value_of(matches, "staking_account_pubkey").unwrap();
|
||||||
let voting_account_pubkey = value_of(matches, "voting_account_pubkey").unwrap();
|
let voting_account_pubkey = value_of(matches, "voting_account_pubkey").unwrap();
|
||||||
@ -278,12 +296,9 @@ pub fn parse_command(
|
|||||||
}
|
}
|
||||||
("claim-storage-reward", Some(matches)) => {
|
("claim-storage-reward", Some(matches)) => {
|
||||||
let node_account_pubkey = value_of(matches, "node_account_pubkey").unwrap();
|
let node_account_pubkey = value_of(matches, "node_account_pubkey").unwrap();
|
||||||
let storage_mining_pool_account_pubkey =
|
|
||||||
value_of(matches, "storage_mining_pool_account_pubkey").unwrap();
|
|
||||||
let storage_account_pubkey = value_of(matches, "storage_account_pubkey").unwrap();
|
let storage_account_pubkey = value_of(matches, "storage_account_pubkey").unwrap();
|
||||||
Ok(WalletCommand::ClaimStorageReward(
|
Ok(WalletCommand::ClaimStorageReward(
|
||||||
node_account_pubkey,
|
node_account_pubkey,
|
||||||
storage_mining_pool_account_pubkey,
|
|
||||||
storage_account_pubkey,
|
storage_account_pubkey,
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
@ -558,6 +573,24 @@ fn process_create_stake_account(
|
|||||||
Ok(signature_str.to_string())
|
Ok(signature_str.to_string())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn process_deactivate_stake_account(
|
||||||
|
rpc_client: &RpcClient,
|
||||||
|
config: &WalletConfig,
|
||||||
|
staking_account_keypair: &Keypair,
|
||||||
|
) -> ProcessResult {
|
||||||
|
let (recent_blockhash, _fee_calculator) = rpc_client.get_recent_blockhash()?;
|
||||||
|
let ixs = stake_instruction::deactivate_stake(&staking_account_keypair.pubkey());
|
||||||
|
let mut tx = Transaction::new_signed_with_payer(
|
||||||
|
vec![ixs],
|
||||||
|
Some(&config.keypair.pubkey()),
|
||||||
|
&[&config.keypair, &staking_account_keypair],
|
||||||
|
recent_blockhash,
|
||||||
|
);
|
||||||
|
let signature_str = rpc_client
|
||||||
|
.send_and_confirm_transaction(&mut tx, &[&config.keypair, &staking_account_keypair])?;
|
||||||
|
Ok(signature_str.to_string())
|
||||||
|
}
|
||||||
|
|
||||||
fn process_delegate_stake(
|
fn process_delegate_stake(
|
||||||
rpc_client: &RpcClient,
|
rpc_client: &RpcClient,
|
||||||
config: &WalletConfig,
|
config: &WalletConfig,
|
||||||
@ -584,6 +617,32 @@ fn process_delegate_stake(
|
|||||||
Ok(signature_str.to_string())
|
Ok(signature_str.to_string())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn process_withdraw_stake(
|
||||||
|
rpc_client: &RpcClient,
|
||||||
|
config: &WalletConfig,
|
||||||
|
staking_account_keypair: &Keypair,
|
||||||
|
destination_account_pubkey: &Pubkey,
|
||||||
|
lamports: u64,
|
||||||
|
) -> ProcessResult {
|
||||||
|
let (recent_blockhash, _fee_calculator) = rpc_client.get_recent_blockhash()?;
|
||||||
|
let ixs = vec![stake_instruction::withdraw(
|
||||||
|
&staking_account_keypair.pubkey(),
|
||||||
|
destination_account_pubkey,
|
||||||
|
lamports,
|
||||||
|
)];
|
||||||
|
|
||||||
|
let mut tx = Transaction::new_signed_with_payer(
|
||||||
|
ixs,
|
||||||
|
Some(&config.keypair.pubkey()),
|
||||||
|
&[&config.keypair, &staking_account_keypair],
|
||||||
|
recent_blockhash,
|
||||||
|
);
|
||||||
|
|
||||||
|
let signature_str = rpc_client
|
||||||
|
.send_and_confirm_transaction(&mut tx, &[&config.keypair, &staking_account_keypair])?;
|
||||||
|
Ok(signature_str.to_string())
|
||||||
|
}
|
||||||
|
|
||||||
fn process_redeem_vote_credits(
|
fn process_redeem_vote_credits(
|
||||||
rpc_client: &RpcClient,
|
rpc_client: &RpcClient,
|
||||||
config: &WalletConfig,
|
config: &WalletConfig,
|
||||||
@ -626,23 +685,6 @@ fn process_show_stake_account(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn process_create_storage_mining_pool_account(
|
|
||||||
rpc_client: &RpcClient,
|
|
||||||
config: &WalletConfig,
|
|
||||||
storage_account_pubkey: &Pubkey,
|
|
||||||
lamports: u64,
|
|
||||||
) -> ProcessResult {
|
|
||||||
let (recent_blockhash, _fee_calculator) = rpc_client.get_recent_blockhash()?;
|
|
||||||
let ixs = storage_instruction::create_mining_pool_account(
|
|
||||||
&config.keypair.pubkey(),
|
|
||||||
storage_account_pubkey,
|
|
||||||
lamports,
|
|
||||||
);
|
|
||||||
let mut tx = Transaction::new_signed_instructions(&[&config.keypair], ixs, recent_blockhash);
|
|
||||||
let signature_str = rpc_client.send_and_confirm_transaction(&mut tx, &[&config.keypair])?;
|
|
||||||
Ok(signature_str.to_string())
|
|
||||||
}
|
|
||||||
|
|
||||||
fn process_create_replicator_storage_account(
|
fn process_create_replicator_storage_account(
|
||||||
rpc_client: &RpcClient,
|
rpc_client: &RpcClient,
|
||||||
config: &WalletConfig,
|
config: &WalletConfig,
|
||||||
@ -683,16 +725,12 @@ fn process_claim_storage_reward(
|
|||||||
rpc_client: &RpcClient,
|
rpc_client: &RpcClient,
|
||||||
config: &WalletConfig,
|
config: &WalletConfig,
|
||||||
node_account_pubkey: &Pubkey,
|
node_account_pubkey: &Pubkey,
|
||||||
storage_mining_pool_account_pubkey: &Pubkey,
|
|
||||||
storage_account_pubkey: &Pubkey,
|
storage_account_pubkey: &Pubkey,
|
||||||
) -> ProcessResult {
|
) -> ProcessResult {
|
||||||
let (recent_blockhash, _fee_calculator) = rpc_client.get_recent_blockhash()?;
|
let (recent_blockhash, _fee_calculator) = rpc_client.get_recent_blockhash()?;
|
||||||
|
|
||||||
let instruction = storage_instruction::claim_reward(
|
let instruction =
|
||||||
node_account_pubkey,
|
storage_instruction::claim_reward(node_account_pubkey, storage_account_pubkey);
|
||||||
storage_account_pubkey,
|
|
||||||
storage_mining_pool_account_pubkey,
|
|
||||||
);
|
|
||||||
let signers = [&config.keypair];
|
let signers = [&config.keypair];
|
||||||
let message = Message::new_with_payer(vec![instruction], Some(&signers[0].pubkey()));
|
let message = Message::new_with_payer(vec![instruction], Some(&signers[0].pubkey()));
|
||||||
|
|
||||||
@ -1022,6 +1060,23 @@ pub fn process_command(config: &WalletConfig) -> ProcessResult {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WalletCommand::WithdrawStake(
|
||||||
|
staking_account_keypair,
|
||||||
|
destination_account_pubkey,
|
||||||
|
lamports,
|
||||||
|
) => process_withdraw_stake(
|
||||||
|
&rpc_client,
|
||||||
|
config,
|
||||||
|
&staking_account_keypair,
|
||||||
|
&destination_account_pubkey,
|
||||||
|
*lamports,
|
||||||
|
),
|
||||||
|
|
||||||
|
// Deactivate stake account
|
||||||
|
WalletCommand::DeactivateStake(staking_account_keypair) => {
|
||||||
|
process_deactivate_stake_account(&rpc_client, config, &staking_account_keypair)
|
||||||
|
}
|
||||||
|
|
||||||
WalletCommand::RedeemVoteCredits(staking_account_pubkey, voting_account_pubkey) => {
|
WalletCommand::RedeemVoteCredits(staking_account_pubkey, voting_account_pubkey) => {
|
||||||
process_redeem_vote_credits(
|
process_redeem_vote_credits(
|
||||||
&rpc_client,
|
&rpc_client,
|
||||||
@ -1035,15 +1090,6 @@ pub fn process_command(config: &WalletConfig) -> ProcessResult {
|
|||||||
process_show_stake_account(&rpc_client, config, &staking_account_pubkey)
|
process_show_stake_account(&rpc_client, config, &staking_account_pubkey)
|
||||||
}
|
}
|
||||||
|
|
||||||
WalletCommand::CreateStorageMiningPoolAccount(storage_account_pubkey, lamports) => {
|
|
||||||
process_create_storage_mining_pool_account(
|
|
||||||
&rpc_client,
|
|
||||||
config,
|
|
||||||
&storage_account_pubkey,
|
|
||||||
*lamports,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
WalletCommand::CreateReplicatorStorageAccount(
|
WalletCommand::CreateReplicatorStorageAccount(
|
||||||
storage_account_owner,
|
storage_account_owner,
|
||||||
storage_account_pubkey,
|
storage_account_pubkey,
|
||||||
@ -1063,17 +1109,14 @@ pub fn process_command(config: &WalletConfig) -> ProcessResult {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
WalletCommand::ClaimStorageReward(
|
WalletCommand::ClaimStorageReward(node_account_pubkey, storage_account_pubkey) => {
|
||||||
node_account_pubkey,
|
process_claim_storage_reward(
|
||||||
storage_mining_pool_account_pubkey,
|
&rpc_client,
|
||||||
storage_account_pubkey,
|
config,
|
||||||
) => process_claim_storage_reward(
|
node_account_pubkey,
|
||||||
&rpc_client,
|
&storage_account_pubkey,
|
||||||
config,
|
)
|
||||||
node_account_pubkey,
|
}
|
||||||
&storage_mining_pool_account_pubkey,
|
|
||||||
&storage_account_pubkey,
|
|
||||||
),
|
|
||||||
|
|
||||||
WalletCommand::ShowStorageAccount(storage_account_pubkey) => {
|
WalletCommand::ShowStorageAccount(storage_account_pubkey) => {
|
||||||
process_show_storage_account(&rpc_client, config, &storage_account_pubkey)
|
process_show_storage_account(&rpc_client, config, &storage_account_pubkey)
|
||||||
@ -1401,6 +1444,47 @@ pub fn app<'ab, 'v>(name: &str, about: &'ab str, version: &'v str) -> App<'ab, '
|
|||||||
.help("The number of lamports to stake, must be less than the stake account's balance."),
|
.help("The number of lamports to stake, must be less than the stake account's balance."),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
.subcommand(
|
||||||
|
SubCommand::with_name("deactivate-stake")
|
||||||
|
.about("Deactivate the delegated stake from the staking account")
|
||||||
|
.arg(
|
||||||
|
Arg::with_name("staking_account_keypair_file")
|
||||||
|
.index(1)
|
||||||
|
.value_name("KEYPAIR_FILE")
|
||||||
|
.takes_value(true)
|
||||||
|
.required(true)
|
||||||
|
.help("Keypair file for the staking account, for signing the delegate transaction."),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.subcommand(
|
||||||
|
SubCommand::with_name("withdraw-stake")
|
||||||
|
.about("Withdraw the unstaked lamports from the stake account")
|
||||||
|
.arg(
|
||||||
|
Arg::with_name("staking_account_keypair_file")
|
||||||
|
.index(1)
|
||||||
|
.value_name("KEYPAIR_FILE")
|
||||||
|
.takes_value(true)
|
||||||
|
.required(true)
|
||||||
|
.help("Keypair file for the staking account, for signing the withdraw transaction."),
|
||||||
|
)
|
||||||
|
.arg(
|
||||||
|
Arg::with_name("destination_account_pubkey")
|
||||||
|
.index(2)
|
||||||
|
.value_name("PUBKEY")
|
||||||
|
.takes_value(true)
|
||||||
|
.required(true)
|
||||||
|
.validator(is_pubkey)
|
||||||
|
.help("The account where the lamports should be transfered"),
|
||||||
|
)
|
||||||
|
.arg(
|
||||||
|
Arg::with_name("lamports")
|
||||||
|
.index(3)
|
||||||
|
.value_name("NUM")
|
||||||
|
.takes_value(true)
|
||||||
|
.required(true)
|
||||||
|
.help("The number of lamports to to withdraw from the stake account."),
|
||||||
|
),
|
||||||
|
)
|
||||||
.subcommand(
|
.subcommand(
|
||||||
SubCommand::with_name("redeem-vote-credits")
|
SubCommand::with_name("redeem-vote-credits")
|
||||||
.about("Redeem credits in the staking account")
|
.about("Redeem credits in the staking account")
|
||||||
@ -1518,15 +1602,6 @@ pub fn app<'ab, 'v>(name: &str, about: &'ab str, version: &'v str) -> App<'ab, '
|
|||||||
.validator(is_pubkey)
|
.validator(is_pubkey)
|
||||||
.help("The node account to credit the rewards to"),
|
.help("The node account to credit the rewards to"),
|
||||||
)
|
)
|
||||||
.arg(
|
|
||||||
Arg::with_name("storage_mining_pool_account_pubkey")
|
|
||||||
.index(2)
|
|
||||||
.value_name("MINING POOL PUBKEY")
|
|
||||||
.takes_value(true)
|
|
||||||
.required(true)
|
|
||||||
.validator(is_pubkey)
|
|
||||||
.help("Mining pool account to redeem credits from"),
|
|
||||||
)
|
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("storage_account_pubkey")
|
Arg::with_name("storage_account_pubkey")
|
||||||
.index(3)
|
.index(3)
|
||||||
@ -1837,6 +1912,35 @@ mod tests {
|
|||||||
WalletCommand::DelegateStake(keypair, pubkey, 42)
|
WalletCommand::DelegateStake(keypair, pubkey, 42)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let keypair_file = make_tmp_path("keypair_file");
|
||||||
|
gen_keypair_file(&keypair_file).unwrap();
|
||||||
|
let keypair = read_keypair(&keypair_file).unwrap();
|
||||||
|
// Test Withdraw from Stake Account
|
||||||
|
let test_withdraw_stake = test_commands.clone().get_matches_from(vec![
|
||||||
|
"test",
|
||||||
|
"withdraw-stake",
|
||||||
|
&keypair_file,
|
||||||
|
&pubkey_string,
|
||||||
|
"42",
|
||||||
|
]);
|
||||||
|
assert_eq!(
|
||||||
|
parse_command(&pubkey, &test_withdraw_stake).unwrap(),
|
||||||
|
WalletCommand::WithdrawStake(keypair, pubkey, 42)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Test Deactivate Stake Subcommand
|
||||||
|
let keypair_file = make_tmp_path("keypair_file");
|
||||||
|
gen_keypair_file(&keypair_file).unwrap();
|
||||||
|
let keypair = read_keypair(&keypair_file).unwrap();
|
||||||
|
let test_deactivate_stake =
|
||||||
|
test_commands
|
||||||
|
.clone()
|
||||||
|
.get_matches_from(vec!["test", "deactivate-stake", &keypair_file]);
|
||||||
|
assert_eq!(
|
||||||
|
parse_command(&pubkey, &test_deactivate_stake).unwrap(),
|
||||||
|
WalletCommand::DeactivateStake(keypair)
|
||||||
|
);
|
||||||
|
|
||||||
// Test Deploy Subcommand
|
// Test Deploy Subcommand
|
||||||
let test_deploy =
|
let test_deploy =
|
||||||
test_commands
|
test_commands
|
||||||
@ -2006,6 +2110,17 @@ mod tests {
|
|||||||
let signature = process_command(&config);
|
let signature = process_command(&config);
|
||||||
assert_eq!(signature.unwrap(), SIGNATURE.to_string());
|
assert_eq!(signature.unwrap(), SIGNATURE.to_string());
|
||||||
|
|
||||||
|
let bob_keypair = Keypair::new();
|
||||||
|
let to_pubkey = Pubkey::new_rand();
|
||||||
|
config.command = WalletCommand::WithdrawStake(bob_keypair.into(), to_pubkey, 100);
|
||||||
|
let signature = process_command(&config);
|
||||||
|
assert_eq!(signature.unwrap(), SIGNATURE.to_string());
|
||||||
|
|
||||||
|
let bob_keypair = Keypair::new();
|
||||||
|
config.command = WalletCommand::DeactivateStake(bob_keypair.into());
|
||||||
|
let signature = process_command(&config);
|
||||||
|
assert_eq!(signature.unwrap(), SIGNATURE.to_string());
|
||||||
|
|
||||||
config.command = WalletCommand::GetTransactionCount;
|
config.command = WalletCommand::GetTransactionCount;
|
||||||
assert_eq!(process_command(&config).unwrap(), "1234");
|
assert_eq!(process_command(&config).unwrap(), "1234");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user