Compare commits
44 Commits
Author | SHA1 | Date | |
---|---|---|---|
81f8368bba | |||
297166e550 | |||
7fff610cae | |||
5f3bf853c6 | |||
fc34c1370b | |||
09410fd5c5 | |||
bfff18ac70 | |||
7239efe1e7 | |||
334a7d9502 | |||
bc2d37015d | |||
d3fcedb179 | |||
f1a77abffb | |||
7acd771271 | |||
9c2d58660b | |||
a907ed2e33 | |||
9d3c426510 | |||
b0bcc8355f | |||
cf99e626c8 | |||
6db61759e0 | |||
aae08bdae3 | |||
5ff22921eb | |||
10012be03e | |||
17def9fbf5 | |||
b5a03d011f | |||
2d39c4257a | |||
8fb86c9fa7 | |||
fc623756df | |||
d92bd0de27 | |||
c818c20399 | |||
ed41547f64 | |||
36398bc3f3 | |||
fa0e1ad356 | |||
f56c5dacca | |||
80e0da132a | |||
f89debdfa6 | |||
16f7e46fce | |||
3a039c8007 | |||
56d5324837 | |||
d3bf0fc707 | |||
f9d8a1d6c0 | |||
70559253ee | |||
9c61abe468 | |||
970954ac3b | |||
39d821ead8 |
180
Cargo.lock
generated
180
Cargo.lock
generated
@ -1715,7 +1715,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "solana"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"bincode 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1739,19 +1739,19 @@ dependencies = [
|
||||
"serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-bpfloader 0.11.0",
|
||||
"solana-drone 0.11.0",
|
||||
"solana-bpfloader 0.11.1",
|
||||
"solana-drone 0.11.1",
|
||||
"solana-jsonrpc-core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-jsonrpc-http-server 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-jsonrpc-macros 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-jsonrpc-pubsub 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-jsonrpc-ws-server 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-logger 0.11.0",
|
||||
"solana-metrics 0.11.0",
|
||||
"solana-native-loader 0.11.0",
|
||||
"solana-netutil 0.11.0",
|
||||
"solana-sdk 0.11.0",
|
||||
"solana-system-program 0.11.0",
|
||||
"solana-logger 0.11.1",
|
||||
"solana-metrics 0.11.1",
|
||||
"solana-native-loader 0.11.1",
|
||||
"solana-netutil 0.11.1",
|
||||
"solana-sdk 0.11.1",
|
||||
"solana-system-program 0.11.1",
|
||||
"tokio 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1759,39 +1759,39 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "solana-bench-streamer"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana 0.11.0",
|
||||
"solana-logger 0.11.0",
|
||||
"solana-netutil 0.11.0",
|
||||
"solana 0.11.1",
|
||||
"solana-logger 0.11.1",
|
||||
"solana-netutil 0.11.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-bench-tps"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana 0.11.0",
|
||||
"solana-drone 0.11.0",
|
||||
"solana-logger 0.11.0",
|
||||
"solana-metrics 0.11.0",
|
||||
"solana-sdk 0.11.0",
|
||||
"solana 0.11.1",
|
||||
"solana-drone 0.11.1",
|
||||
"solana-logger 0.11.1",
|
||||
"solana-metrics 0.11.1",
|
||||
"solana-sdk 0.11.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-bpf-noop"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"rbpf 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-sdk 0.11.0",
|
||||
"solana-sdk 0.11.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-bpfloader"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"bincode 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1799,27 +1799,27 @@ dependencies = [
|
||||
"libc 0.2.45 (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.82 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-logger 0.11.0",
|
||||
"solana-sdk 0.11.0",
|
||||
"solana-logger 0.11.1",
|
||||
"solana-sdk 0.11.1",
|
||||
"solana_rbpf 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-budget-program"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"bincode 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"chrono 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.82 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-logger 0.11.0",
|
||||
"solana-sdk 0.11.0",
|
||||
"solana-logger 0.11.1",
|
||||
"solana-sdk 0.11.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-drone"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"bincode 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1828,43 +1828,43 @@ dependencies = [
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-metrics 0.11.0",
|
||||
"solana-sdk 0.11.0",
|
||||
"solana-metrics 0.11.1",
|
||||
"solana-sdk 0.11.1",
|
||||
"tokio 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-erc20"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"bincode 1.0.1 (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.82 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-logger 0.11.0",
|
||||
"solana-sdk 0.11.0",
|
||||
"solana-logger 0.11.1",
|
||||
"solana-sdk 0.11.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-fullnode"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"clap 2.32.0 (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.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana 0.11.0",
|
||||
"solana-drone 0.11.0",
|
||||
"solana-fullnode-config 0.11.0",
|
||||
"solana-logger 0.11.0",
|
||||
"solana-metrics 0.11.0",
|
||||
"solana-netutil 0.11.0",
|
||||
"solana-sdk 0.11.0",
|
||||
"solana 0.11.1",
|
||||
"solana-drone 0.11.1",
|
||||
"solana-fullnode-config 0.11.1",
|
||||
"solana-logger 0.11.1",
|
||||
"solana-metrics 0.11.1",
|
||||
"solana-netutil 0.11.1",
|
||||
"solana-sdk 0.11.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-fullnode-config"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"dirs 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1872,19 +1872,19 @@ dependencies = [
|
||||
"serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-netutil 0.11.0",
|
||||
"solana-sdk 0.11.0",
|
||||
"solana-netutil 0.11.1",
|
||||
"solana-sdk 0.11.1",
|
||||
"untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-genesis"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana 0.11.0",
|
||||
"solana-sdk 0.11.0",
|
||||
"solana 0.11.1",
|
||||
"solana-sdk 0.11.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2025,70 +2025,70 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "solana-keygen"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"dirs 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-sdk 0.11.0",
|
||||
"solana-sdk 0.11.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-ledger-tool"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana 0.11.0",
|
||||
"solana-logger 0.11.0",
|
||||
"solana 0.11.1",
|
||||
"solana-logger 0.11.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-logger"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-lualoader"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"bincode 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rlua 0.15.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-logger 0.11.0",
|
||||
"solana-sdk 0.11.0",
|
||||
"solana-logger 0.11.1",
|
||||
"solana-sdk 0.11.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-metrics"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"influx_db_client 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.2.0 (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.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"reqwest 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-sdk 0.11.0",
|
||||
"solana-sdk 0.11.1",
|
||||
"sys-info 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-native-loader"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"bincode 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-sdk 0.11.0",
|
||||
"solana-sdk 0.11.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-netutil"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"ipnetwork 0.12.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -2097,33 +2097,33 @@ dependencies = [
|
||||
"rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"reqwest 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"socket2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-logger 0.11.0",
|
||||
"solana-logger 0.11.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-noop"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-logger 0.11.0",
|
||||
"solana-sdk 0.11.0",
|
||||
"solana-logger 0.11.1",
|
||||
"solana-sdk 0.11.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-replicator"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana 0.11.0",
|
||||
"solana-fullnode-config 0.11.0",
|
||||
"solana-logger 0.11.0",
|
||||
"solana-sdk 0.11.0",
|
||||
"solana 0.11.1",
|
||||
"solana-fullnode-config 0.11.1",
|
||||
"solana-logger 0.11.1",
|
||||
"solana-sdk 0.11.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-sdk"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"bincode 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -2141,50 +2141,50 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "solana-storage-program"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"bincode 1.0.1 (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.82 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-logger 0.11.0",
|
||||
"solana-sdk 0.11.0",
|
||||
"solana-logger 0.11.1",
|
||||
"solana-sdk 0.11.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-system-program"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"bincode 1.0.1 (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.82 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-sdk 0.11.0",
|
||||
"solana-sdk 0.11.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-upload-perf"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-metrics 0.11.0",
|
||||
"solana-metrics 0.11.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-vote-program"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"bincode 1.0.1 (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.82 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-logger 0.11.0",
|
||||
"solana-metrics 0.11.0",
|
||||
"solana-sdk 0.11.0",
|
||||
"solana-logger 0.11.1",
|
||||
"solana-metrics 0.11.1",
|
||||
"solana-sdk 0.11.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-vote-signer"
|
||||
version = "0.0.1"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -2193,13 +2193,13 @@ dependencies = [
|
||||
"solana-jsonrpc-core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-jsonrpc-http-server 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-jsonrpc-macros 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-metrics 0.11.0",
|
||||
"solana-sdk 0.11.0",
|
||||
"solana-metrics 0.11.1",
|
||||
"solana-sdk 0.11.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-wallet"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
dependencies = [
|
||||
"bincode 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -2207,10 +2207,10 @@ dependencies = [
|
||||
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"dirs 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana 0.11.0",
|
||||
"solana-drone 0.11.0",
|
||||
"solana-logger 0.11.0",
|
||||
"solana-sdk 0.11.0",
|
||||
"solana 0.11.1",
|
||||
"solana-drone 0.11.1",
|
||||
"solana-logger 0.11.1",
|
||||
"solana-sdk 0.11.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
18
Cargo.toml
18
Cargo.toml
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "solana"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
documentation = "https://docs.rs/solana"
|
||||
homepage = "https://solana.com/"
|
||||
readme = "README.md"
|
||||
@ -43,19 +43,19 @@ rocksdb = "0.10.1"
|
||||
serde = "1.0.82"
|
||||
serde_derive = "1.0.82"
|
||||
serde_json = "1.0.10"
|
||||
solana-bpfloader = { path = "programs/native/bpf_loader", version = "0.11.0" }
|
||||
solana-drone = { path = "drone", version = "0.11.0" }
|
||||
solana-bpfloader = { path = "programs/native/bpf_loader", version = "0.11.1" }
|
||||
solana-drone = { path = "drone", version = "0.11.1" }
|
||||
solana-jsonrpc-core = "0.4.0"
|
||||
solana-jsonrpc-http-server = "0.4.0"
|
||||
solana-jsonrpc-macros = "0.4.0"
|
||||
solana-jsonrpc-pubsub = "0.4.0"
|
||||
solana-jsonrpc-ws-server = "0.4.0"
|
||||
solana-logger = { path = "logger", version = "0.11.0" }
|
||||
solana-metrics = { path = "metrics", version = "0.11.0" }
|
||||
solana-native-loader = { path = "programs/native/native_loader", version = "0.11.0" }
|
||||
solana-netutil = { path = "netutil", version = "0.11.0" }
|
||||
solana-sdk = { path = "sdk", version = "0.11.0" }
|
||||
solana-system-program = { path = "programs/native/system", version = "0.11.0" }
|
||||
solana-logger = { path = "logger", version = "0.11.1" }
|
||||
solana-metrics = { path = "metrics", version = "0.11.1" }
|
||||
solana-native-loader = { path = "programs/native/native_loader", version = "0.11.1" }
|
||||
solana-netutil = { path = "netutil", version = "0.11.1" }
|
||||
solana-sdk = { path = "sdk", version = "0.11.1" }
|
||||
solana-system-program = { path = "programs/native/system", version = "0.11.1" }
|
||||
tokio = "0.1"
|
||||
tokio-codec = "0.1"
|
||||
untrusted = "0.6.2"
|
||||
|
@ -26,7 +26,9 @@ Furthermore, and much to our surprise, it can be implemented using a mechanism t
|
||||
Architecture
|
||||
===
|
||||
|
||||
Before you jump into the code, review the online book [Solana: Blockchain Rebuilt for Scale](https://solana-labs.github.io/solana/).
|
||||
Before you jump into the code, review the online book [Solana: Blockchain Rebuilt for Scale](https://solana-labs.github.io/book/).
|
||||
|
||||
(The _latest_ development version of the online book is also [available here](https://solana-labs.github.io/book-edge/).)
|
||||
|
||||
Developing
|
||||
===
|
||||
|
@ -2,16 +2,16 @@
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-bench-streamer"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
|
||||
[dependencies]
|
||||
clap = "2.32.0"
|
||||
solana = { path = "..", version = "0.11.0" }
|
||||
solana-logger = { path = "../logger", version = "0.11.0" }
|
||||
solana-netutil = { path = "../netutil", version = "0.11.0" }
|
||||
solana = { path = "..", version = "0.11.1" }
|
||||
solana-logger = { path = "../logger", version = "0.11.1" }
|
||||
solana-netutil = { path = "../netutil", version = "0.11.1" }
|
||||
|
||||
[features]
|
||||
cuda = []
|
||||
|
@ -2,7 +2,7 @@
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-bench-tps"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
@ -11,11 +11,11 @@ homepage = "https://solana.com/"
|
||||
clap = "2.32.0"
|
||||
rayon = "1.0.3"
|
||||
serde_json = "1.0.10"
|
||||
solana = { path = "..", version = "0.11.0" }
|
||||
solana-drone = { path = "../drone", version = "0.11.0" }
|
||||
solana-logger = { path = "../logger", version = "0.11.0" }
|
||||
solana-metrics = { path = "../metrics", version = "0.11.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.11.0" }
|
||||
solana = { path = "..", version = "0.11.1" }
|
||||
solana-drone = { path = "../drone", version = "0.11.1" }
|
||||
solana-logger = { path = "../logger", version = "0.11.1" }
|
||||
solana-metrics = { path = "../metrics", version = "0.11.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.11.1" }
|
||||
|
||||
[features]
|
||||
cuda = []
|
||||
|
@ -22,8 +22,9 @@ Methods
|
||||
---
|
||||
|
||||
* [confirmTransaction](#confirmtransaction)
|
||||
* [getBalance](#getbalance)
|
||||
* [getAccountInfo](#getaccountinfo)
|
||||
* [getBalance](#getbalance)
|
||||
* [getConfirmationTime](#getconfirmationTime)
|
||||
* [getLastId](#getlastid)
|
||||
* [getSignatureStatus](#getsignaturestatus)
|
||||
* [getTransactionCount](#gettransactioncount)
|
||||
@ -201,6 +202,25 @@ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "m
|
||||
{"jsonrpc":"2.0","result":268,"id":1}
|
||||
```
|
||||
|
||||
---
|
||||
### getConfirmationTime
|
||||
Returns the current cluster confirmation time in milliseconds
|
||||
|
||||
##### Parameters:
|
||||
None
|
||||
|
||||
##### Results:
|
||||
* `integer` - confirmation time in milliseconds, as unsigned 64-bit integer
|
||||
|
||||
##### Example:
|
||||
```bash
|
||||
// Request
|
||||
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getConfirmationTime"}' http://localhost:8899
|
||||
|
||||
// Result
|
||||
{"jsonrpc":"2.0","result":500,"id":1}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### requestAirdrop
|
||||
|
@ -6,7 +6,7 @@ steps:
|
||||
timeout_in_minutes: 20
|
||||
name: "publish docker"
|
||||
- command: "ci/publish-crate.sh"
|
||||
timeout_in_minutes: 20
|
||||
timeout_in_minutes: 40
|
||||
name: "publish crate"
|
||||
branches: "!master"
|
||||
- command: "ci/publish-bpf-sdk.sh"
|
||||
|
@ -82,10 +82,26 @@ for tag in "${tags[@]}"; do
|
||||
fi
|
||||
done
|
||||
|
||||
echo EDGE_CHANNEL=master
|
||||
echo BETA_CHANNEL="${beta:+v$beta}"
|
||||
echo STABLE_CHANNEL="${stable:+v$stable}"
|
||||
echo BETA_CHANNEL_LATEST_TAG="${beta_tag:+v$beta_tag}"
|
||||
echo STABLE_CHANNEL_LATEST_TAG="${stable_tag:+v$stable_tag}"
|
||||
EDGE_CHANNEL=master
|
||||
BETA_CHANNEL=${beta:+v$beta}
|
||||
STABLE_CHANNEL=${stable:+v$stable}
|
||||
BETA_CHANNEL_LATEST_TAG=${beta_tag:+v$beta_tag}
|
||||
STABLE_CHANNEL_LATEST_TAG=${stable_tag:+v$stable_tag}
|
||||
|
||||
|
||||
if [[ $BUILDKITE_BRANCH = "$STABLE_CHANNEL" ]]; then
|
||||
CHANNEL=stable
|
||||
elif [[ $BUILDKITE_BRANCH = "$EDGE_CHANNEL" ]]; then
|
||||
CHANNEL=edge
|
||||
elif [[ $BUILDKITE_BRANCH = "$BETA_CHANNEL" ]]; then
|
||||
CHANNEL=beta
|
||||
fi
|
||||
|
||||
echo EDGE_CHANNEL="$EDGE_CHANNEL"
|
||||
echo BETA_CHANNEL="$BETA_CHANNEL"
|
||||
echo BETA_CHANNEL_LATEST_TAG="$BETA_CHANNEL_LATEST_TAG"
|
||||
echo STABLE_CHANNEL="$STABLE_CHANNEL"
|
||||
echo STABLE_CHANNEL_LATEST_TAG="$STABLE_CHANNEL_LATEST_TAG"
|
||||
echo CHANNEL="$CHANNEL"
|
||||
|
||||
exit 0
|
||||
|
@ -16,18 +16,29 @@ echo --- create book repo
|
||||
git commit -m "${BUILDKITE_COMMIT:-local}"
|
||||
)
|
||||
|
||||
echo --- publish
|
||||
if [[ $BUILDKITE_BRANCH = master ]]; then
|
||||
cd book/html/
|
||||
git remote add origin git@github.com:solana-labs/solana.git
|
||||
git fetch origin gh-pages
|
||||
if ! git diff HEAD origin/gh-pages --quiet; then
|
||||
git push -f origin HEAD:gh-pages
|
||||
else
|
||||
echo "Content unchanged, publish skipped"
|
||||
fi
|
||||
eval "$(ci/channel-info.sh)"
|
||||
# Only publish the book from the edge and beta channels for now.
|
||||
case $CHANNEL in
|
||||
edge)
|
||||
repo=git@github.com:solana-labs/book-edge.git
|
||||
;;
|
||||
beta)
|
||||
repo=git@github.com:solana-labs/book.git
|
||||
;;
|
||||
*)
|
||||
echo "--- publish skipped"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "--- publish $CHANNEL"
|
||||
cd book/html/
|
||||
git remote add origin $repo
|
||||
git fetch origin master
|
||||
if ! git diff HEAD origin/master --quiet; then
|
||||
git push -f origin HEAD:master
|
||||
else
|
||||
echo "Publish skipped"
|
||||
echo "Content unchanged, publish skipped"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
@ -19,6 +19,7 @@ CRATES=(
|
||||
drone
|
||||
programs/native/{budget,bpf_loader,lua_loader,native_loader,noop,system,vote}
|
||||
.
|
||||
fullnode-config
|
||||
fullnode
|
||||
genesis
|
||||
ledger-tool
|
||||
@ -26,22 +27,18 @@ CRATES=(
|
||||
)
|
||||
|
||||
|
||||
maybePackage="echo Package skipped"
|
||||
maybePublish="echo Publish skipped"
|
||||
|
||||
# Only package/publish if this is a tagged release
|
||||
if [[ -n $BUILDKITE_TAG && -n $TRIGGERED_BUILDKITE_TAG ]]; then
|
||||
maybePackage="cargo package"
|
||||
[[ -n $TRIGGERED_BUILDKITE_TAG ]] || {
|
||||
echo TRIGGERED_BUILDKITE_TAG unset, skipped
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Only publish if there's no human around
|
||||
if [[ -n $CI ]]; then
|
||||
maybePublish="cargo publish --token $CRATES_IO_TOKEN"
|
||||
if [[ -z "$CRATES_IO_TOKEN" ]]; then
|
||||
echo CRATES_IO_TOKEN undefined
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
[[ -n "$CRATES_IO_TOKEN" ]] || {
|
||||
echo CRATES_IO_TOKEN undefined
|
||||
exit 1
|
||||
}
|
||||
|
||||
cargoCommand="cargo publish --token $CRATES_IO_TOKEN"
|
||||
|
||||
for crate in "${CRATES[@]}"; do
|
||||
if [[ ! -r $crate/Cargo.toml ]]; then
|
||||
@ -49,10 +46,14 @@ for crate in "${CRATES[@]}"; do
|
||||
exit 1
|
||||
fi
|
||||
echo "-- $crate"
|
||||
# TODO: Ensure the published version matches the contents of BUILDKITE_TAG
|
||||
# TODO: Ensure the published version matches the contents of
|
||||
# TRIGGERED_BUILDKITE_TAG
|
||||
(
|
||||
set -x
|
||||
ci/docker-run.sh rust bash -exc "cd $crate; $maybePackage; $maybePublish"
|
||||
# TODO: the rocksdb package does not build with the stock rust docker image,
|
||||
# so use the solana rust docker image until this is resolved upstream
|
||||
ci/docker-run.sh solanalabs/rust:1.31.0 bash -exc "cd $crate; $cargoCommand"
|
||||
#ci/docker-run.sh rust bash -exc "cd $crate; $cargoCommand"
|
||||
)
|
||||
done
|
||||
|
||||
|
@ -8,11 +8,11 @@ if [[ -z $BUILDKITE ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z $CHANNEL ]]; then
|
||||
CHANNEL=$(buildkite-agent meta-data get "channel" --default "")
|
||||
if [[ -z $PUBLISH_CHANNEL ]]; then
|
||||
PUBLISH_CHANNEL=$(buildkite-agent meta-data get "channel" --default "")
|
||||
fi
|
||||
|
||||
if [[ -z $CHANNEL ]]; then
|
||||
if [[ -z $PUBLISH_CHANNEL ]]; then
|
||||
(
|
||||
cat <<EOF
|
||||
steps:
|
||||
@ -37,7 +37,7 @@ fi
|
||||
ci/channel-info.sh
|
||||
eval "$(ci/channel-info.sh)"
|
||||
|
||||
case $CHANNEL in
|
||||
case $PUBLISH_CHANNEL in
|
||||
edge)
|
||||
CHANNEL_BRANCH=$EDGE_CHANNEL
|
||||
;;
|
||||
@ -45,10 +45,10 @@ beta)
|
||||
CHANNEL_BRANCH=$BETA_CHANNEL
|
||||
;;
|
||||
stable)
|
||||
CHANNEL_BRANCH=$BETA_CHANNEL
|
||||
CHANNEL_BRANCH=$STABLE_CHANNEL
|
||||
;;
|
||||
*)
|
||||
echo "Error: Invalid CHANNEL=$CHANNEL"
|
||||
echo "Error: Invalid PUBLISH_CHANNEL=$PUBLISH_CHANNEL"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@ -63,11 +63,11 @@ steps:
|
||||
message: "$BUILDKITE_MESSAGE"
|
||||
branch: "$CHANNEL_BRANCH"
|
||||
env:
|
||||
CHANNEL: "$CHANNEL"
|
||||
PUBLISH_CHANNEL: "$PUBLISH_CHANNEL"
|
||||
EOF
|
||||
) | buildkite-agent pipeline upload
|
||||
exit 0
|
||||
fi
|
||||
|
||||
set -x
|
||||
exec metrics/publish-metrics-dashboard.sh "$CHANNEL"
|
||||
exec metrics/publish-metrics-dashboard.sh "$PUBLISH_CHANNEL"
|
||||
|
@ -11,14 +11,6 @@ fi
|
||||
|
||||
eval "$(ci/channel-info.sh)"
|
||||
|
||||
if [[ $BUILDKITE_BRANCH = "$STABLE_CHANNEL" ]]; then
|
||||
CHANNEL=stable
|
||||
elif [[ $BUILDKITE_BRANCH = "$EDGE_CHANNEL" ]]; then
|
||||
CHANNEL=edge
|
||||
elif [[ $BUILDKITE_BRANCH = "$BETA_CHANNEL" ]]; then
|
||||
CHANNEL=beta
|
||||
fi
|
||||
|
||||
if [[ -n "$BUILDKITE_TAG" ]]; then
|
||||
CHANNEL_OR_TAG=$BUILDKITE_TAG
|
||||
elif [[ -n "$TRIGGERED_BUILDKITE_TAG" ]]; then
|
||||
|
14
ci/snap.sh
14
ci/snap.sh
@ -19,14 +19,6 @@ fi
|
||||
|
||||
eval "$(ci/channel-info.sh)"
|
||||
|
||||
if [[ $BUILDKITE_BRANCH = "$STABLE_CHANNEL" ]]; then
|
||||
CHANNEL=stable
|
||||
elif [[ $BUILDKITE_BRANCH = "$EDGE_CHANNEL" ]]; then
|
||||
CHANNEL=edge
|
||||
elif [[ $BUILDKITE_BRANCH = "$BETA_CHANNEL" ]]; then
|
||||
CHANNEL=beta
|
||||
fi
|
||||
|
||||
if [[ -z $CHANNEL ]]; then
|
||||
echo Unable to determine channel to publish into, exiting.
|
||||
exit 1
|
||||
@ -61,13 +53,13 @@ if [[ ! -x /usr/bin/multilog ]]; then
|
||||
sudo apt-get install -y daemontools
|
||||
fi
|
||||
|
||||
echo --- build: $CHANNEL channel
|
||||
echo "--- build: $CHANNEL channel"
|
||||
snapcraft
|
||||
|
||||
source ci/upload-ci-artifact.sh
|
||||
upload-ci-artifact solana_*.snap
|
||||
|
||||
if [[ -z $DO_NOT_PUBLISH_SNAP ]]; then
|
||||
echo --- publish: $CHANNEL channel
|
||||
$DRYRUN snapcraft push solana_*.snap --release $CHANNEL
|
||||
echo "--- publish: $CHANNEL channel"
|
||||
$DRYRUN snapcraft push solana_*.snap --release "$CHANNEL"
|
||||
fi
|
||||
|
@ -25,6 +25,7 @@ launchTestnet() {
|
||||
echo --- setup "$nodeCount" node test
|
||||
net/gce.sh create \
|
||||
-b \
|
||||
-d pd-ssd \
|
||||
-n "$nodeCount" -c "$CLIENT_COUNT" \
|
||||
-G "$LEADER_CPU_MACHINE_TYPE" \
|
||||
-p "$TESTNET_TAG" -z "$TESTNET_ZONE"
|
||||
@ -34,9 +35,9 @@ launchTestnet() {
|
||||
|
||||
echo --- start "$nodeCount" node test
|
||||
if [[ -n $USE_PREBUILT_CHANNEL_TARBALL ]]; then
|
||||
net/net.sh start -o noValidatorSanity -t "$CHANNEL"
|
||||
net/net.sh start -f "cuda" -o noValidatorSanity -t "$CHANNEL"
|
||||
else
|
||||
net/net.sh start -o noValidatorSanity -T solana*.tar.bz2
|
||||
net/net.sh start -f "cuda" -o noValidatorSanity -T solana*.tar.bz2
|
||||
fi
|
||||
|
||||
echo --- wait "$ITERATION_WAIT" seconds to complete test
|
||||
@ -56,24 +57,24 @@ launchTestnet() {
|
||||
WHERE time > now() - 300s GROUP BY time(1s)
|
||||
)'
|
||||
|
||||
declare q_mean_finality='
|
||||
SELECT round(mean("duration_ms")) as "mean_finality"
|
||||
FROM "testnet-automation"."autogen"."leader-finality"
|
||||
declare q_mean_confirmation='
|
||||
SELECT round(mean("duration_ms")) as "mean_confirmation"
|
||||
FROM "testnet-automation"."autogen"."leader-confirmation"
|
||||
WHERE time > now() - 300s'
|
||||
|
||||
declare q_max_finality='
|
||||
SELECT round(max("duration_ms")) as "max_finality"
|
||||
FROM "testnet-automation"."autogen"."leader-finality"
|
||||
declare q_max_confirmation='
|
||||
SELECT round(max("duration_ms")) as "max_confirmation"
|
||||
FROM "testnet-automation"."autogen"."leader-confirmation"
|
||||
WHERE time > now() - 300s'
|
||||
|
||||
declare q_99th_finality='
|
||||
SELECT round(percentile("duration_ms", 99)) as "99th_finality"
|
||||
FROM "testnet-automation"."autogen"."leader-finality"
|
||||
declare q_99th_confirmation='
|
||||
SELECT round(percentile("duration_ms", 99)) as "99th_confirmation"
|
||||
FROM "testnet-automation"."autogen"."leader-confirmation"
|
||||
WHERE time > now() - 300s'
|
||||
|
||||
curl -G "https://metrics.solana.com:8086/query?u=${INFLUX_USERNAME}&p=${INFLUX_PASSWORD}" \
|
||||
--data-urlencode "db=$INFLUX_DATABASE" \
|
||||
--data-urlencode "q=$q_mean_tps;$q_max_tps;$q_mean_finality;$q_max_finality;$q_99th_finality" |
|
||||
--data-urlencode "q=$q_mean_tps;$q_max_tps;$q_mean_confirmation;$q_max_confirmation;$q_99th_confirmation" |
|
||||
python ci/testnet-automation-json-parser.py >>TPS"$nodeCount".log
|
||||
|
||||
upload-ci-artifact TPS"$nodeCount".log
|
||||
|
@ -2,6 +2,7 @@
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")"/..
|
||||
source ci/upload-ci-artifact.sh
|
||||
|
||||
zone=
|
||||
bootstrapFullNodeAddress=
|
||||
@ -9,12 +10,16 @@ bootstrapFullNodeMachineType=
|
||||
clientNodeCount=0
|
||||
additionalFullNodeCount=10
|
||||
publicNetwork=false
|
||||
snapChannel=edge
|
||||
skipSetup=false
|
||||
skipStart=false
|
||||
stopNetwork=false
|
||||
externalNode=false
|
||||
tarChannelOrTag=edge
|
||||
delete=false
|
||||
enableGpu=false
|
||||
bootDiskType=""
|
||||
leaderRotation=true
|
||||
useTarReleaseChannel=false
|
||||
blockstreamer=false
|
||||
|
||||
usage() {
|
||||
exitcode=0
|
||||
@ -23,29 +28,35 @@ usage() {
|
||||
echo "Error: $*"
|
||||
fi
|
||||
cat <<EOF
|
||||
usage: $0 [name] [cloud] [zone] [options...]
|
||||
usage: $0 -p network-name -C cloud -z zone1 [-z zone2] ... [-z zoneN] [options...]
|
||||
|
||||
Deploys a CD testnet
|
||||
|
||||
name - name of the network
|
||||
cloud - cloud provider to use (gce, ec2)
|
||||
zone - cloud provider zone to deploy the network into
|
||||
mandatory arguments:
|
||||
-p [network-name] - name of the network
|
||||
-C [cloud] - cloud provider to use (gce, ec2)
|
||||
-z [zone] - cloud provider zone to deploy the network into. Must specify at least one zone
|
||||
|
||||
options:
|
||||
-s edge|beta|stable - Deploy the specified Snap release channel
|
||||
(default: $snapChannel)
|
||||
-t edge|beta|stable|vX.Y.Z - Deploy the latest tarball release for the
|
||||
specified release channel (edge|beta|stable) or release tag
|
||||
(vX.Y.Z)
|
||||
(default: $tarChannelOrTag)
|
||||
-n [number] - Number of additional full nodes (default: $additionalFullNodeCount)
|
||||
-c [number] - Number of client bencher nodes (default: $clientNodeCount)
|
||||
-u - Include a Blockstreamer (default: $blockstreamer)
|
||||
-P - Use public network IP addresses (default: $publicNetwork)
|
||||
-G - Enable GPU, and set count/type of GPUs to use (e.g n1-standard-16 --accelerator count=4,type=nvidia-tesla-k80)
|
||||
-g - Enable GPU (default: $enableGpu)
|
||||
-b - Disable leader rotation
|
||||
-a [address] - Set the bootstrap fullnode's external IP address to this GCE address
|
||||
-d - Delete the network
|
||||
-d [disk-type] - Specify a boot disk type (default None) Use pd-ssd to get ssd on GCE.
|
||||
-D - Delete the network
|
||||
-r - Reuse existing node/ledger configuration from a
|
||||
previous |start| (ie, don't run ./multinode-demo/setup.sh).
|
||||
-x - External node. Default: false
|
||||
-s - Skip start. Nodes will still be created or configured, but network software will not be started.
|
||||
-S - Stop network software without tearing down nodes.
|
||||
|
||||
Note: the SOLANA_METRICS_CONFIG environment variable is used to configure
|
||||
metrics
|
||||
@ -53,19 +64,22 @@ EOF
|
||||
exit $exitcode
|
||||
}
|
||||
|
||||
netName=$1
|
||||
cloudProvider=$2
|
||||
zone=$3
|
||||
[[ -n $netName ]] || usage
|
||||
[[ -n $cloudProvider ]] || usage "Cloud provider not specified"
|
||||
[[ -n $zone ]] || usage "Zone not specified"
|
||||
shift 3
|
||||
zone=()
|
||||
|
||||
while getopts "h?p:Pn:c:s:t:gG:a:db" opt; do
|
||||
while getopts "h?p:Pn:c:t:gG:a:Dbd:rusxz:p:C:S" opt; do
|
||||
case $opt in
|
||||
h | \?)
|
||||
usage
|
||||
;;
|
||||
p)
|
||||
netName=$OPTARG
|
||||
;;
|
||||
C)
|
||||
cloudProvider=$OPTARG
|
||||
;;
|
||||
z)
|
||||
zone+=("$OPTARG")
|
||||
;;
|
||||
P)
|
||||
publicNetwork=true
|
||||
;;
|
||||
@ -75,21 +89,10 @@ while getopts "h?p:Pn:c:s:t:gG:a:db" opt; do
|
||||
c)
|
||||
clientNodeCount=$OPTARG
|
||||
;;
|
||||
s)
|
||||
case $OPTARG in
|
||||
edge|beta|stable)
|
||||
snapChannel=$OPTARG
|
||||
;;
|
||||
*)
|
||||
usage "Invalid snap channel: $OPTARG"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
t)
|
||||
case $OPTARG in
|
||||
edge|beta|stable|v*)
|
||||
tarChannelOrTag=$OPTARG
|
||||
useTarReleaseChannel=true
|
||||
;;
|
||||
*)
|
||||
usage "Invalid release channel: $OPTARG"
|
||||
@ -110,51 +113,139 @@ while getopts "h?p:Pn:c:s:t:gG:a:db" opt; do
|
||||
bootstrapFullNodeAddress=$OPTARG
|
||||
;;
|
||||
d)
|
||||
bootDiskType=$OPTARG
|
||||
;;
|
||||
D)
|
||||
delete=true
|
||||
;;
|
||||
r)
|
||||
skipSetup=true
|
||||
;;
|
||||
s)
|
||||
skipStart=true
|
||||
;;
|
||||
x)
|
||||
externalNode=true
|
||||
;;
|
||||
u)
|
||||
blockstreamer=true
|
||||
;;
|
||||
S)
|
||||
stopNetwork=true
|
||||
;;
|
||||
*)
|
||||
usage "Error: unhandled option: $opt"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
[[ -n $netName ]] || usage
|
||||
[[ -n $cloudProvider ]] || usage "Cloud provider not specified"
|
||||
[[ -n ${zone[*]} ]] || usage "At least one zone must be specified"
|
||||
|
||||
create_args=(
|
||||
-a "$bootstrapFullNodeAddress"
|
||||
-c "$clientNodeCount"
|
||||
-n "$additionalFullNodeCount"
|
||||
-p "$netName"
|
||||
-z "$zone"
|
||||
)
|
||||
shutdown() {
|
||||
exitcode=$?
|
||||
|
||||
if $enableGpu; then
|
||||
if [[ -z $bootstrapFullNodeMachineType ]]; then
|
||||
create_args+=(-g)
|
||||
else
|
||||
create_args+=(-G "$bootstrapFullNodeMachineType")
|
||||
set +e
|
||||
if [[ -d net/log ]]; then
|
||||
mv net/log net/log-deploy
|
||||
for logfile in net/log-deploy/*; do
|
||||
if [[ -f $logfile ]]; then
|
||||
upload-ci-artifact "$logfile"
|
||||
tail "$logfile"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! $leaderRotation; then
|
||||
create_args+=(-b)
|
||||
fi
|
||||
|
||||
if $publicNetwork; then
|
||||
create_args+=(-P)
|
||||
fi
|
||||
exit $exitcode
|
||||
}
|
||||
rm -rf net/{log,-deploy}
|
||||
trap shutdown EXIT INT
|
||||
|
||||
set -x
|
||||
|
||||
echo "--- $cloudProvider.sh delete"
|
||||
time net/"$cloudProvider".sh delete -z "$zone" -p "$netName"
|
||||
if $delete; then
|
||||
exit 0
|
||||
# Build a string to pass zone opts to $cloudProvider.sh: "-z zone1 -z zone2 ..."
|
||||
zone_args=()
|
||||
for val in "${zone[@]}"; do
|
||||
zone_args+=("-z $val")
|
||||
done
|
||||
|
||||
if $stopNetwork; then
|
||||
skipSetup=true
|
||||
fi
|
||||
|
||||
echo "--- $cloudProvider.sh create"
|
||||
time net/"$cloudProvider".sh create "${create_args[@]}"
|
||||
if $delete; then
|
||||
skipSetup=false
|
||||
fi
|
||||
|
||||
# Create the network
|
||||
if ! $skipSetup; then
|
||||
echo "--- $cloudProvider.sh delete"
|
||||
# shellcheck disable=SC2068
|
||||
time net/"$cloudProvider".sh delete ${zone_args[@]} -p "$netName"
|
||||
if $delete; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "--- $cloudProvider.sh create"
|
||||
create_args=(
|
||||
-p "$netName"
|
||||
-a "$bootstrapFullNodeAddress"
|
||||
-c "$clientNodeCount"
|
||||
-n "$additionalFullNodeCount"
|
||||
)
|
||||
# shellcheck disable=SC2206
|
||||
create_args+=(${zone_args[@]})
|
||||
|
||||
if $blockstreamer; then
|
||||
create_args+=(-u)
|
||||
fi
|
||||
|
||||
if [[ -n $bootDiskType ]]; then
|
||||
create_args+=(-d "$bootDiskType")
|
||||
fi
|
||||
|
||||
if $enableGpu; then
|
||||
if [[ -z $bootstrapFullNodeMachineType ]]; then
|
||||
create_args+=(-g)
|
||||
else
|
||||
create_args+=(-G "$bootstrapFullNodeMachineType")
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! $leaderRotation; then
|
||||
create_args+=(-b)
|
||||
fi
|
||||
|
||||
if $publicNetwork; then
|
||||
create_args+=(-P)
|
||||
fi
|
||||
|
||||
if $externalNode; then
|
||||
create_args+=(-x)
|
||||
fi
|
||||
|
||||
time net/"$cloudProvider".sh create "${create_args[@]}"
|
||||
else
|
||||
echo "--- $cloudProvider.sh config"
|
||||
config_args=(
|
||||
-p "$netName"
|
||||
)
|
||||
# shellcheck disable=SC2206
|
||||
config_args+=(${zone_args[@]})
|
||||
if $publicNetwork; then
|
||||
config_args+=(-P)
|
||||
fi
|
||||
|
||||
time net/"$cloudProvider".sh config "${config_args[@]}"
|
||||
fi
|
||||
net/init-metrics.sh -e
|
||||
|
||||
if $stopNetwork; then
|
||||
echo --- net.sh stop
|
||||
time net/net.sh stop
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo --- net.sh start
|
||||
maybeRejectExtraNodes=
|
||||
if ! $publicNetwork; then
|
||||
@ -168,10 +259,38 @@ maybeNoLedgerVerify=
|
||||
if [[ -n $NO_LEDGER_VERIFY ]]; then
|
||||
maybeNoLedgerVerify="-o noLedgerVerify"
|
||||
fi
|
||||
# shellcheck disable=SC2086 # Don't want to double quote maybeRejectExtraNodes
|
||||
if $useTarReleaseChannel; then
|
||||
time net/net.sh start -t "$tarChannelOrTag" $maybeRejectExtraNodes $maybeNoValidatorSanity $maybeNoLedgerVerify
|
||||
else
|
||||
time net/net.sh start -s "$snapChannel" $maybeRejectExtraNodes $maybeNoValidatorSanity $maybeNoLedgerVerify
|
||||
|
||||
maybeSkipSetup=
|
||||
if $skipSetup; then
|
||||
maybeSkipSetup="-r"
|
||||
fi
|
||||
exit 0
|
||||
|
||||
ok=true
|
||||
if ! $skipStart; then
|
||||
(
|
||||
if $skipSetup; then
|
||||
# TODO: Enable rolling updates
|
||||
#op=update
|
||||
op=restart
|
||||
else
|
||||
op=start
|
||||
fi
|
||||
|
||||
maybeUpdateManifestKeypairFile=
|
||||
# shellcheck disable=SC2154 # SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR_x86_64_unknown_linux_gnu comes from .buildkite/env/
|
||||
if [[ -n $SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR_x86_64_unknown_linux_gnu ]]; then
|
||||
echo "$SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR_x86_64_unknown_linux_gnu" > update_manifest_keypair.json
|
||||
maybeUpdateManifestKeypairFile="-i update_manifest_keypair.json"
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086 # Don't want to double quote the $maybeXYZ variables
|
||||
time net/net.sh $op -t "$tarChannelOrTag" \
|
||||
$maybeUpdateManifestKeypairFile \
|
||||
$maybeSkipSetup \
|
||||
$maybeRejectExtraNodes \
|
||||
$maybeNoValidatorSanity \
|
||||
$maybeNoLedgerVerify
|
||||
) || ok=false
|
||||
fi
|
||||
|
||||
$ok
|
||||
|
@ -42,18 +42,28 @@ steps:
|
||||
value: "testnet-beta"
|
||||
- label: "testnet-beta-perf"
|
||||
value: "testnet-beta-perf"
|
||||
- label: "testnet-demo"
|
||||
value: "testnet-demo"
|
||||
- select: "Operation"
|
||||
key: "testnet-operation"
|
||||
default: "sanity-or-restart"
|
||||
options:
|
||||
- label: "Sanity check. Restart network on failure"
|
||||
value: "sanity-or-restart"
|
||||
- label: "Start (or restart) the network"
|
||||
- label: "Create new testnet nodes and then start network software. If nodes are already created, they will be deleted and then re-created."
|
||||
value: "create-and-start"
|
||||
- label: "Create new testnet nodes, but do not start network software. If nodes are already created, they will be deleted and then re-created."
|
||||
value: "create"
|
||||
- label: "Start network software on already-created testnet nodes. If software is already running, it will be restarted."
|
||||
value: "start"
|
||||
- label: "Stop the network"
|
||||
- label: "Stop network software without deleting testnet nodes"
|
||||
value: "stop"
|
||||
- label: "Update the network software. Restart network software on failure"
|
||||
value: "update-or-restart"
|
||||
- label: "Sanity check. Restart network software on failure"
|
||||
value: "sanity-or-restart"
|
||||
- label: "Sanity check only"
|
||||
value: "sanity"
|
||||
- label: "Delete all nodes on a testnet. Network software will be stopped first if it is running"
|
||||
value: "delete"
|
||||
- command: "ci/$(basename "$0")"
|
||||
agents:
|
||||
- "queue=$BUILDKITE_AGENT_META_DATA_QUEUE"
|
||||
@ -62,27 +72,36 @@ EOF
|
||||
exit 0
|
||||
fi
|
||||
|
||||
export SOLANA_METRICS_CONFIG="db=$TESTNET,$SOLANA_METRICS_PARTIAL_CONFIG"
|
||||
echo "SOLANA_METRICS_CONFIG: $SOLANA_METRICS_CONFIG"
|
||||
|
||||
ci/channel-info.sh
|
||||
eval "$(ci/channel-info.sh)"
|
||||
|
||||
|
||||
EC2_ZONES=(us-west-1a sa-east-1a ap-northeast-2a eu-central-1a ca-central-1a)
|
||||
GCE_ZONES=(us-west1-b asia-east2-a europe-west4-a southamerica-east1-b us-east4-c)
|
||||
case $TESTNET in
|
||||
testnet-edge|testnet-edge-perf)
|
||||
CHANNEL_OR_TAG=edge
|
||||
CHANNEL_BRANCH=$EDGE_CHANNEL
|
||||
: "${TESTNET_DB_HOST:=https://clocktower-f1d56615.influxcloud.net:8086}"
|
||||
;;
|
||||
testnet-beta|testnet-beta-perf)
|
||||
CHANNEL_OR_TAG=beta
|
||||
CHANNEL_BRANCH=$BETA_CHANNEL
|
||||
: "${TESTNET_DB_HOST:=https://clocktower-f1d56615.influxcloud.net:8086}"
|
||||
: "${EC2_NODE_COUNT:=10}"
|
||||
: "${GCE_NODE_COUNT:=}"
|
||||
;;
|
||||
testnet|testnet-perf)
|
||||
if [[ -n $BETA_CHANNEL_LATEST_TAG ]]; then
|
||||
CHANNEL_OR_TAG=$BETA_CHANNEL_LATEST_TAG
|
||||
else
|
||||
CHANNEL_OR_TAG=$STABLE_CHANNEL_LATEST_TAG
|
||||
fi
|
||||
testnet)
|
||||
CHANNEL_OR_TAG=$STABLE_CHANNEL_LATEST_TAG
|
||||
CHANNEL_BRANCH=$STABLE_CHANNEL
|
||||
: "${TESTNET_DB_HOST:=https://clocktower-f1d56615.influxcloud.net:8086}"
|
||||
;;
|
||||
testnet-perf)
|
||||
CHANNEL_OR_TAG=$STABLE_CHANNEL_LATEST_TAG
|
||||
CHANNEL_BRANCH=$STABLE_CHANNEL
|
||||
;;
|
||||
testnet-demo)
|
||||
CHANNEL_OR_TAG=beta
|
||||
CHANNEL_BRANCH=$BETA_CHANNEL
|
||||
;;
|
||||
*)
|
||||
@ -91,9 +110,21 @@ testnet|testnet-perf)
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ $BUILDKITE_BRANCH != "$CHANNEL_BRANCH" ]]; then
|
||||
(
|
||||
cat <<EOF
|
||||
if [[ -n $TESTNET_DB_HOST ]]; then
|
||||
SOLANA_METRICS_PARTIAL_CONFIG="host=$TESTNET_DB_HOST,$SOLANA_METRICS_PARTIAL_CONFIG"
|
||||
fi
|
||||
|
||||
export SOLANA_METRICS_CONFIG="db=$TESTNET,$SOLANA_METRICS_PARTIAL_CONFIG"
|
||||
echo "SOLANA_METRICS_CONFIG: $SOLANA_METRICS_CONFIG"
|
||||
source scripts/configure-metrics.sh
|
||||
|
||||
if [[ -n $TESTNET_TAG ]]; then
|
||||
CHANNEL_OR_TAG=$TESTNET_TAG
|
||||
else
|
||||
|
||||
if [[ $BUILDKITE_BRANCH != "$CHANNEL_BRANCH" ]]; then
|
||||
(
|
||||
cat <<EOF
|
||||
steps:
|
||||
- trigger: "$BUILDKITE_PIPELINE_SLUG"
|
||||
async: true
|
||||
@ -103,78 +134,78 @@ steps:
|
||||
env:
|
||||
TESTNET: "$TESTNET"
|
||||
TESTNET_OP: "$TESTNET_OP"
|
||||
TESTNET_DB_HOST: "$TESTNET_DB_HOST"
|
||||
EC2_NODE_COUNT: "$EC2_NODE_COUNT"
|
||||
GCE_NODE_COUNT: "$GCE_NODE_COUNT"
|
||||
EOF
|
||||
) | buildkite-agent pipeline upload
|
||||
exit 0
|
||||
) | buildkite-agent pipeline upload
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
sanity() {
|
||||
echo "--- sanity $TESTNET"
|
||||
case $TESTNET in
|
||||
testnet-edge)
|
||||
# shellcheck disable=2030
|
||||
# shellcheck disable=2031
|
||||
(
|
||||
set -ex
|
||||
export NO_LEDGER_VERIFY=1
|
||||
export NO_VALIDATOR_SANITY=1
|
||||
ci/testnet-sanity.sh edge-testnet-solana-com ec2 us-west-1a
|
||||
set -x
|
||||
NO_LEDGER_VERIFY=1 \
|
||||
ci/testnet-sanity.sh edge-testnet-solana-com ec2 us-west-1a
|
||||
)
|
||||
;;
|
||||
testnet-edge-perf)
|
||||
# shellcheck disable=2030
|
||||
# shellcheck disable=2031
|
||||
(
|
||||
set -ex
|
||||
export REJECT_EXTRA_NODES=1
|
||||
export NO_LEDGER_VERIFY=1
|
||||
export NO_VALIDATOR_SANITY=1
|
||||
ci/testnet-sanity.sh edge-perf-testnet-solana-com ec2 us-west-2b
|
||||
set -x
|
||||
REJECT_EXTRA_NODES=1 \
|
||||
NO_LEDGER_VERIFY=1 \
|
||||
NO_VALIDATOR_SANITY=1 \
|
||||
ci/testnet-sanity.sh edge-perf-testnet-solana-com ec2 us-west-2b
|
||||
)
|
||||
;;
|
||||
testnet-beta)
|
||||
# shellcheck disable=2030
|
||||
# shellcheck disable=2031
|
||||
(
|
||||
set -ex
|
||||
export NO_LEDGER_VERIFY=1
|
||||
export NO_VALIDATOR_SANITY=1
|
||||
ci/testnet-sanity.sh beta-testnet-solana-com ec2 us-west-1a
|
||||
set -x
|
||||
|
||||
ok=true
|
||||
if [[ -n $EC2_NODE_COUNT ]]; then
|
||||
NO_LEDGER_VERIFY=1 \
|
||||
ci/testnet-sanity.sh beta-testnet-solana-com ec2 "${EC2_ZONES[0]}" || ok=false
|
||||
elif [[ -n $GCE_NODE_COUNT ]]; then
|
||||
NO_LEDGER_VERIFY=1 \
|
||||
ci/testnet-sanity.sh beta-testnet-solana-com gce "${GCE_ZONES[0]}" || ok=false
|
||||
else
|
||||
echo "Error: no EC2 or GCE nodes"
|
||||
ok=false
|
||||
fi
|
||||
$ok
|
||||
)
|
||||
;;
|
||||
testnet-beta-perf)
|
||||
# shellcheck disable=2030
|
||||
# shellcheck disable=2031
|
||||
(
|
||||
set -ex
|
||||
export REJECT_EXTRA_NODES=1
|
||||
export NO_LEDGER_VERIFY=1
|
||||
export NO_VALIDATOR_SANITY=1
|
||||
ci/testnet-sanity.sh beta-perf-testnet-solana-com ec2 us-west-2b
|
||||
set -x
|
||||
REJECT_EXTRA_NODES=1 \
|
||||
NO_LEDGER_VERIFY=1 \
|
||||
NO_VALIDATOR_SANITY=1 \
|
||||
ci/testnet-sanity.sh beta-perf-testnet-solana-com ec2 us-west-2b
|
||||
)
|
||||
;;
|
||||
testnet)
|
||||
# shellcheck disable=2030
|
||||
# shellcheck disable=2031
|
||||
(
|
||||
set -ex
|
||||
export NO_LEDGER_VERIFY=1
|
||||
export NO_VALIDATOR_SANITY=1
|
||||
set -x
|
||||
NO_LEDGER_VERIFY=1 \
|
||||
NO_VALIDATOR_SANITY=1 \
|
||||
ci/testnet-sanity.sh testnet-solana-com ec2 us-west-1a
|
||||
#ci/testnet-sanity.sh testnet-solana-com gce us-east1-c
|
||||
ci/testnet-sanity.sh testnet-solana-com ec2 us-west-1a
|
||||
)
|
||||
;;
|
||||
testnet-perf)
|
||||
# shellcheck disable=2030
|
||||
# shellcheck disable=2031
|
||||
(
|
||||
set -ex
|
||||
export REJECT_EXTRA_NODES=1
|
||||
export NO_LEDGER_VERIFY=1
|
||||
export NO_VALIDATOR_SANITY=1
|
||||
set -x
|
||||
REJECT_EXTRA_NODES=1 \
|
||||
NO_LEDGER_VERIFY=1 \
|
||||
NO_VALIDATOR_SANITY=1 \
|
||||
ci/testnet-sanity.sh perf-testnet-solana-com gce us-west1-b
|
||||
#ci/testnet-sanity.sh perf-testnet-solana-com ec2 us-east-1a
|
||||
ci/testnet-sanity.sh perf-testnet-solana-com gce us-west1-b
|
||||
)
|
||||
;;
|
||||
*)
|
||||
@ -184,100 +215,146 @@ sanity() {
|
||||
esac
|
||||
}
|
||||
|
||||
deploy() {
|
||||
declare maybeCreate=$1
|
||||
declare maybeStart=$2
|
||||
declare maybeStop=$3
|
||||
declare maybeDelete=$4
|
||||
|
||||
start() {
|
||||
declare maybeDelete=$1
|
||||
if [[ -z $maybeDelete ]]; then
|
||||
echo "--- start $TESTNET"
|
||||
echo "--- deploy \"$maybeCreate\" \"$maybeStart\" \"$maybeStop\" \"$maybeDelete\""
|
||||
|
||||
# Create or recreate the nodes
|
||||
if [[ -z $maybeCreate ]]; then
|
||||
skipCreate=skip
|
||||
else
|
||||
echo "--- stop $TESTNET"
|
||||
skipCreate=""
|
||||
fi
|
||||
|
||||
# Start or restart the network software on the nodes
|
||||
if [[ -z $maybeStart ]]; then
|
||||
skipStart=skip
|
||||
else
|
||||
skipStart=""
|
||||
fi
|
||||
|
||||
case $TESTNET in
|
||||
testnet-edge)
|
||||
# shellcheck disable=2030
|
||||
# shellcheck disable=2031
|
||||
(
|
||||
set -ex
|
||||
export NO_LEDGER_VERIFY=1
|
||||
export NO_VALIDATOR_SANITY=1
|
||||
ci/testnet-deploy.sh edge-testnet-solana-com ec2 us-west-1a \
|
||||
-t "$CHANNEL_OR_TAG" -n 3 -c 0 -P -a eipalloc-0ccd4f2239886fa94 \
|
||||
${maybeDelete:+-d}
|
||||
set -x
|
||||
ci/testnet-deploy.sh -p edge-testnet-solana-com -C ec2 -z us-west-1a \
|
||||
-t "$CHANNEL_OR_TAG" -n 3 -c 0 -u -P -a eipalloc-0ccd4f2239886fa94 \
|
||||
${skipCreate:+-r} \
|
||||
${skipStart:+-s} \
|
||||
${maybeStop:+-S} \
|
||||
${maybeDelete:+-D}
|
||||
)
|
||||
;;
|
||||
testnet-edge-perf)
|
||||
# shellcheck disable=2030
|
||||
# shellcheck disable=2031
|
||||
(
|
||||
set -ex
|
||||
export NO_LEDGER_VERIFY=1
|
||||
export NO_VALIDATOR_SANITY=1
|
||||
ci/testnet-deploy.sh edge-perf-testnet-solana-com ec2 us-west-2b \
|
||||
-g -t "$CHANNEL_OR_TAG" -c 2 \
|
||||
-b \
|
||||
${maybeDelete:+-d}
|
||||
set -x
|
||||
NO_LEDGER_VERIFY=1 \
|
||||
NO_VALIDATOR_SANITY=1 \
|
||||
RUST_LOG=solana=warn \
|
||||
ci/testnet-deploy.sh -p edge-perf-testnet-solana-com -C ec2 -z us-west-2b \
|
||||
-g -t "$CHANNEL_OR_TAG" -c 2 \
|
||||
-b \
|
||||
${skipCreate:+-r} \
|
||||
${skipStart:+-s} \
|
||||
${maybeStop:+-S} \
|
||||
${maybeDelete:+-D}
|
||||
)
|
||||
;;
|
||||
testnet-beta)
|
||||
# shellcheck disable=2030
|
||||
# shellcheck disable=2031
|
||||
(
|
||||
set -ex
|
||||
export NO_LEDGER_VERIFY=1
|
||||
export NO_VALIDATOR_SANITY=1
|
||||
ci/testnet-deploy.sh beta-testnet-solana-com ec2 us-west-1a \
|
||||
-t "$CHANNEL_OR_TAG" -n 3 -c 0 -P -a eipalloc-0f286cf8a0771ce35 \
|
||||
-b \
|
||||
${maybeDelete:+-d}
|
||||
set -x
|
||||
|
||||
# Build an array to pass as opts to testnet-deploy.sh: "-z zone1 -z zone2 ..."
|
||||
GCE_ZONE_ARGS=()
|
||||
for val in "${GCE_ZONES[@]}"; do
|
||||
GCE_ZONE_ARGS+=("-z $val")
|
||||
done
|
||||
|
||||
EC2_ZONE_ARGS=()
|
||||
for val in "${EC2_ZONES[@]}"; do
|
||||
EC2_ZONE_ARGS+=("-z $val")
|
||||
done
|
||||
|
||||
if [[ -n $EC2_NODE_COUNT ]]; then
|
||||
if [[ -n $GCE_NODE_COUNT ]] || [[ -n $skipStart ]]; then
|
||||
maybeSkipStart="skip"
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2068
|
||||
ci/testnet-deploy.sh -p beta-testnet-solana-com -C ec2 ${EC2_ZONE_ARGS[@]} \
|
||||
-t "$CHANNEL_OR_TAG" -n "$EC2_NODE_COUNT" -c 0 -u -P -a eipalloc-0f286cf8a0771ce35 \
|
||||
${skipCreate:+-r} \
|
||||
${maybeSkipStart:+-s} \
|
||||
${maybeStop:+-S} \
|
||||
${maybeDelete:+-D}
|
||||
fi
|
||||
|
||||
if [[ -n $GCE_NODE_COUNT ]]; then
|
||||
# shellcheck disable=SC2068
|
||||
ci/testnet-deploy.sh -p beta-testnet-solana-com -C gce ${GCE_ZONE_ARGS[@]} \
|
||||
-t "$CHANNEL_OR_TAG" -n "$GCE_NODE_COUNT" -c 0 -P \
|
||||
${skipCreate:+-r} \
|
||||
${skipStart:+-s} \
|
||||
${maybeStop:+-S} \
|
||||
${maybeDelete:+-D} \
|
||||
${EC2_NODE_COUNT:+-x}
|
||||
fi
|
||||
)
|
||||
;;
|
||||
testnet-beta-perf)
|
||||
# shellcheck disable=2030
|
||||
# shellcheck disable=2031
|
||||
(
|
||||
set -ex
|
||||
export NO_LEDGER_VERIFY=1
|
||||
export NO_VALIDATOR_SANITY=1
|
||||
ci/testnet-deploy.sh beta-perf-testnet-solana-com ec2 us-west-2b \
|
||||
-g -t "$CHANNEL_OR_TAG" -c 2 \
|
||||
-b \
|
||||
${maybeDelete:+-d}
|
||||
set -x
|
||||
NO_LEDGER_VERIFY=1 \
|
||||
NO_VALIDATOR_SANITY=1 \
|
||||
RUST_LOG=solana=warn \
|
||||
ci/testnet-deploy.sh -p beta-perf-testnet-solana-com -C ec2 -z us-west-2b \
|
||||
-g -t "$CHANNEL_OR_TAG" -c 2 \
|
||||
-b \
|
||||
${skipCreate:+-r} \
|
||||
${skipStart:+-s} \
|
||||
${maybeStop:+-S} \
|
||||
${maybeDelete:+-D}
|
||||
)
|
||||
;;
|
||||
testnet)
|
||||
# shellcheck disable=2030
|
||||
# shellcheck disable=2031
|
||||
(
|
||||
set -ex
|
||||
export NO_LEDGER_VERIFY=1
|
||||
export NO_VALIDATOR_SANITY=1
|
||||
#ci/testnet-deploy.sh testnet-solana-com gce us-east1-c \
|
||||
# -s "$CHANNEL_OR_TAG" -n 3 -c 0 -P -a testnet-solana-com \
|
||||
# ${maybeDelete:+-d}
|
||||
ci/testnet-deploy.sh testnet-solana-com ec2 us-west-1a \
|
||||
-t "$CHANNEL_OR_TAG" -n 3 -c 0 -P -a eipalloc-0fa502bf95f6f18b2 \
|
||||
-b \
|
||||
${maybeDelete:+-d}
|
||||
set -x
|
||||
NO_VALIDATOR_SANITY=1 \
|
||||
ci/testnet-deploy.sh -p testnet-solana-com -C ec2 -z us-west-1a \
|
||||
-t "$CHANNEL_OR_TAG" -n 3 -c 0 -u -P -a eipalloc-0fa502bf95f6f18b2 \
|
||||
-b \
|
||||
${skipCreate:+-r} \
|
||||
${skipStart:+-s} \
|
||||
${maybeStop:+-S} \
|
||||
${maybeDelete:+-D}
|
||||
)
|
||||
;;
|
||||
testnet-perf)
|
||||
# shellcheck disable=2030
|
||||
# shellcheck disable=2031
|
||||
(
|
||||
set -ex
|
||||
export NO_LEDGER_VERIFY=1
|
||||
export NO_VALIDATOR_SANITY=1
|
||||
ci/testnet-deploy.sh perf-testnet-solana-com gce us-west1-b \
|
||||
-G "n1-standard-16 --accelerator count=2,type=nvidia-tesla-v100" \
|
||||
-t "$CHANNEL_OR_TAG" -c 2 \
|
||||
-b \
|
||||
-d pd-ssd \
|
||||
${maybeDelete:+-d}
|
||||
#ci/testnet-deploy.sh perf-testnet-solana-com ec2 us-east-1a \
|
||||
# -g \
|
||||
# -t "$CHANNEL_OR_TAG" -c 2 \
|
||||
# ${maybeDelete:+-d}
|
||||
set -x
|
||||
NO_LEDGER_VERIFY=1 \
|
||||
NO_VALIDATOR_SANITY=1 \
|
||||
RUST_LOG=solana=warn \
|
||||
ci/testnet-deploy.sh -p perf-testnet-solana-com -C gce -z us-west1-b \
|
||||
-G "n1-standard-16 --accelerator count=2,type=nvidia-tesla-v100" \
|
||||
-t "$CHANNEL_OR_TAG" -c 2 \
|
||||
-b \
|
||||
-d pd-ssd \
|
||||
${skipCreate:+-r} \
|
||||
${skipStart:+-s} \
|
||||
${maybeStop:+-S} \
|
||||
${maybeDelete:+-D}
|
||||
)
|
||||
;;
|
||||
testnet-demo)
|
||||
(
|
||||
set -x
|
||||
echo "Demo net not yet implemented!"
|
||||
exit 1
|
||||
)
|
||||
;;
|
||||
*)
|
||||
@ -287,29 +364,119 @@ start() {
|
||||
esac
|
||||
}
|
||||
|
||||
ENABLED_LOCKFILE="${HOME}/${TESTNET}.is_enabled"
|
||||
CREATED_LOCKFILE="${HOME}/${TESTNET}.is_created"
|
||||
|
||||
create-and-start() {
|
||||
rm -f "${CREATED_LOCKFILE}"
|
||||
deploy create start
|
||||
touch "${CREATED_LOCKFILE}"
|
||||
}
|
||||
create() {
|
||||
rm -f "${CREATED_LOCKFILE}"
|
||||
deploy create
|
||||
touch "${CREATED_LOCKFILE}"
|
||||
}
|
||||
start() {
|
||||
if [[ -f ${CREATED_LOCKFILE} ]]; then
|
||||
deploy "" start
|
||||
else
|
||||
echo "Unable to start ${TESTNET}. Are the nodes created?
|
||||
Re-run ci/testnet-manager.sh with \$TESTNET_OP=create or \$TESTNET_OP=create-and-start"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
stop() {
|
||||
start delete
|
||||
deploy "" ""
|
||||
}
|
||||
delete() {
|
||||
deploy "" "" "" delete
|
||||
rm -f "${CREATED_LOCKFILE}"
|
||||
}
|
||||
enable_testnet() {
|
||||
touch "${ENABLED_LOCKFILE}"
|
||||
echo "+++ $TESTNET now enabled"
|
||||
}
|
||||
disable_testnet() {
|
||||
rm -f "${ENABLED_LOCKFILE}"
|
||||
echo "+++ $TESTNET now disabled"
|
||||
}
|
||||
is_testnet_enabled() {
|
||||
if [[ ! -f ${ENABLED_LOCKFILE} ]]; then
|
||||
echo "--- ${TESTNET} is currently disabled. Enable ${TESTNET} by running ci/testnet-manager.sh with \$TESTNET_OP=enable, then re-run with current settings."
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
case $TESTNET_OP in
|
||||
sanity)
|
||||
sanity
|
||||
enable)
|
||||
enable_testnet
|
||||
;;
|
||||
disable)
|
||||
disable_testnet
|
||||
delete
|
||||
;;
|
||||
create-and-start)
|
||||
is_testnet_enabled
|
||||
create-and-start
|
||||
;;
|
||||
create)
|
||||
is_testnet_enabled
|
||||
create
|
||||
;;
|
||||
start)
|
||||
is_testnet_enabled
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
is_testnet_enabled
|
||||
stop
|
||||
;;
|
||||
sanity)
|
||||
is_testnet_enabled
|
||||
sanity
|
||||
;;
|
||||
delete)
|
||||
is_testnet_enabled
|
||||
delete
|
||||
;;
|
||||
update-or-restart)
|
||||
is_testnet_enabled
|
||||
if start; then
|
||||
echo Update successful
|
||||
else
|
||||
echo "+++ Update failed, restarting the network"
|
||||
$metricsWriteDatapoint "testnet-manager update-failure=1"
|
||||
create-and-start
|
||||
fi
|
||||
;;
|
||||
sanity-or-restart)
|
||||
is_testnet_enabled
|
||||
if sanity; then
|
||||
echo Pass
|
||||
else
|
||||
echo "Sanity failed, restarting the network"
|
||||
echo "^^^ +++"
|
||||
start
|
||||
echo "+++ Sanity failed, updating the network"
|
||||
$metricsWriteDatapoint "testnet-manager sanity-failure=1"
|
||||
|
||||
# TODO: Restore attempt to restart the cluster before recreating it
|
||||
# See https://github.com/solana-labs/solana/issues/3774
|
||||
if false; then
|
||||
if start; then
|
||||
echo Update successful
|
||||
else
|
||||
echo "+++ Update failed, restarting the network"
|
||||
$metricsWriteDatapoint "testnet-manager update-failure=1"
|
||||
create-and-start
|
||||
fi
|
||||
else
|
||||
create-and-start
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Error: Invalid TESTNET_OP=$TESTNET_OP"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo --- fin
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-drone"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
description = "Solana Drone"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -19,8 +19,8 @@ clap = "2.31"
|
||||
log = "0.4.2"
|
||||
serde = "1.0.82"
|
||||
serde_derive = "1.0.82"
|
||||
solana-sdk = { path = "../sdk", version = "0.11.0" }
|
||||
solana-metrics = { path = "../metrics", version = "0.11.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.11.1" }
|
||||
solana-metrics = { path = "../metrics", version = "0.11.1" }
|
||||
tokio = "0.1"
|
||||
tokio-codec = "0.1"
|
||||
|
||||
|
@ -2,7 +2,8 @@
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-fullnode-config"
|
||||
version = "0.11.0"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.11.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
@ -14,8 +15,8 @@ log = "0.4.2"
|
||||
serde = "1.0.82"
|
||||
serde_derive = "1.0.82"
|
||||
serde_json = "1.0.10"
|
||||
solana-netutil = { path = "../netutil", version = "0.11.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.11.0" }
|
||||
solana-netutil = { path = "../netutil", version = "0.11.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.11.1" }
|
||||
untrusted = "0.6.2"
|
||||
|
||||
[features]
|
||||
|
@ -2,7 +2,8 @@
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-fullnode"
|
||||
version = "0.11.0"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.11.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
@ -11,13 +12,13 @@ homepage = "https://solana.com/"
|
||||
clap = "2.32.0"
|
||||
log = "0.4.2"
|
||||
serde_json = "1.0.10"
|
||||
solana = { path = "..", version = "0.11.0" }
|
||||
solana-drone = { path = "../drone", version = "0.11.0" }
|
||||
solana-fullnode-config = { path = "../fullnode-config", version = "0.11.0" }
|
||||
solana-logger = { path = "../logger", version = "0.11.0" }
|
||||
solana-netutil = { path = "../netutil", version = "0.11.0" }
|
||||
solana-metrics = { path = "../metrics", version = "0.11.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.11.0" }
|
||||
solana = { path = "..", version = "0.11.1" }
|
||||
solana-drone = { path = "../drone", version = "0.11.1" }
|
||||
solana-fullnode-config = { path = "../fullnode-config", version = "0.11.1" }
|
||||
solana-logger = { path = "../logger", version = "0.11.1" }
|
||||
solana-netutil = { path = "../netutil", version = "0.11.1" }
|
||||
solana-metrics = { path = "../metrics", version = "0.11.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.11.1" }
|
||||
|
||||
[features]
|
||||
chacha = []
|
||||
|
@ -2,7 +2,8 @@
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-genesis"
|
||||
version = "0.11.0"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.11.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
@ -10,8 +11,8 @@ homepage = "https://solana.com/"
|
||||
[dependencies]
|
||||
clap = "2.32.0"
|
||||
serde_json = "1.0.10"
|
||||
solana = { path = "..", version = "0.11.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.11.0" }
|
||||
solana = { path = "..", version = "0.11.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.11.1" }
|
||||
|
||||
[features]
|
||||
cuda = []
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-keygen"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
description = "Solana key generation utility"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -14,7 +14,7 @@ cuda = []
|
||||
[dependencies]
|
||||
dirs = "1.0.2"
|
||||
clap = "2.31"
|
||||
solana-sdk = { path = "../sdk", version = "0.11.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.11.1" }
|
||||
|
||||
[[bin]]
|
||||
name = "solana-keygen"
|
||||
|
@ -2,7 +2,8 @@
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-ledger-tool"
|
||||
version = "0.11.0"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.11.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
@ -10,8 +11,8 @@ homepage = "https://solana.com/"
|
||||
[dependencies]
|
||||
clap = "2.32.0"
|
||||
serde_json = "1.0.10"
|
||||
solana = { path = "..", version = "0.11.0" }
|
||||
solana-logger = { path = "../logger", version = "0.11.0" }
|
||||
solana = { path = "..", version = "0.11.1" }
|
||||
solana-logger = { path = "../logger", version = "0.11.1" }
|
||||
|
||||
[features]
|
||||
cuda = []
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-logger"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
description = "Solana Logger"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-metrics"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
description = "Solana Metrics"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -14,7 +14,7 @@ log = "0.4.2"
|
||||
reqwest = "0.9.0"
|
||||
lazy_static = "1.2.0"
|
||||
sys-info = "0.5.6"
|
||||
solana-sdk = { path = "../sdk", version = "0.11.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.11.1" }
|
||||
|
||||
[dev-dependencies]
|
||||
rand = "0.6.1"
|
||||
|
@ -722,7 +722,7 @@
|
||||
],
|
||||
"orderByTime": "ASC",
|
||||
"policy": "default",
|
||||
"query": "SELECT mean(\"duration_ms\") FROM \"$testnet\".\"autogen\".\"leader-finality\" WHERE $timeFilter \n\n\n",
|
||||
"query": "SELECT mean(\"duration_ms\") FROM \"$testnet\".\"autogen\".\"leader-confirmation\" WHERE $timeFilter \n\n\n",
|
||||
"rawQuery": true,
|
||||
"refId": "A",
|
||||
"resultFormat": "time_series",
|
||||
@ -744,7 +744,7 @@
|
||||
}
|
||||
],
|
||||
"thresholds": "",
|
||||
"title": "Mean Finality",
|
||||
"title": "Mean Confirmation",
|
||||
"type": "singlestat",
|
||||
"valueFontSize": "70%",
|
||||
"valueMaps": [
|
||||
@ -833,7 +833,7 @@
|
||||
],
|
||||
"orderByTime": "ASC",
|
||||
"policy": "default",
|
||||
"query": "SELECT median(\"duration_ms\") FROM \"$testnet\".\"autogen\".\"leader-finality\" WHERE $timeFilter \n\n\n",
|
||||
"query": "SELECT median(\"duration_ms\") FROM \"$testnet\".\"autogen\".\"leader-confirmation\" WHERE $timeFilter \n\n\n",
|
||||
"rawQuery": true,
|
||||
"refId": "A",
|
||||
"resultFormat": "time_series",
|
||||
@ -855,7 +855,7 @@
|
||||
}
|
||||
],
|
||||
"thresholds": "",
|
||||
"title": "Median Finality",
|
||||
"title": "Median Confirmation",
|
||||
"type": "singlestat",
|
||||
"valueFontSize": "70%",
|
||||
"valueMaps": [
|
||||
@ -944,7 +944,7 @@
|
||||
],
|
||||
"orderByTime": "ASC",
|
||||
"policy": "default",
|
||||
"query": "SELECT min(\"duration_ms\") FROM \"$testnet\".\"autogen\".\"leader-finality\" WHERE $timeFilter \n\n\n",
|
||||
"query": "SELECT min(\"duration_ms\") FROM \"$testnet\".\"autogen\".\"leader-confirmation\" WHERE $timeFilter \n\n\n",
|
||||
"rawQuery": true,
|
||||
"refId": "A",
|
||||
"resultFormat": "time_series",
|
||||
@ -966,7 +966,7 @@
|
||||
}
|
||||
],
|
||||
"thresholds": "",
|
||||
"title": "Min Finality",
|
||||
"title": "Min Confirmation",
|
||||
"type": "singlestat",
|
||||
"valueFontSize": "70%",
|
||||
"valueMaps": [
|
||||
@ -1055,7 +1055,7 @@
|
||||
],
|
||||
"orderByTime": "ASC",
|
||||
"policy": "default",
|
||||
"query": "SELECT max(\"duration_ms\") FROM \"$testnet\".\"autogen\".\"leader-finality\" WHERE $timeFilter \n\n\n",
|
||||
"query": "SELECT max(\"duration_ms\") FROM \"$testnet\".\"autogen\".\"leader-confirmation\" WHERE $timeFilter \n\n\n",
|
||||
"rawQuery": true,
|
||||
"refId": "A",
|
||||
"resultFormat": "time_series",
|
||||
@ -1077,7 +1077,7 @@
|
||||
}
|
||||
],
|
||||
"thresholds": "",
|
||||
"title": "Max Finality",
|
||||
"title": "Max Confirmation",
|
||||
"type": "singlestat",
|
||||
"valueFontSize": "70%",
|
||||
"valueMaps": [
|
||||
@ -1166,7 +1166,7 @@
|
||||
],
|
||||
"orderByTime": "ASC",
|
||||
"policy": "default",
|
||||
"query": "SELECT percentile(\"duration_ms\", 99) FROM \"$testnet\".\"autogen\".\"leader-finality\" WHERE $timeFilter \n\n\n",
|
||||
"query": "SELECT percentile(\"duration_ms\", 99) FROM \"$testnet\".\"autogen\".\"leader-confirmation\" WHERE $timeFilter \n\n\n",
|
||||
"rawQuery": true,
|
||||
"refId": "A",
|
||||
"resultFormat": "time_series",
|
||||
@ -1188,7 +1188,7 @@
|
||||
}
|
||||
],
|
||||
"thresholds": "",
|
||||
"title": "Finality (99th percentile)",
|
||||
"title": "Confirmation (99th percentile)",
|
||||
"type": "singlestat",
|
||||
"valueFontSize": "70%",
|
||||
"valueMaps": [
|
||||
@ -1651,7 +1651,7 @@
|
||||
"measurement": "counter-cluster_info-vote-count",
|
||||
"orderByTime": "ASC",
|
||||
"policy": "autogen",
|
||||
"query": "SELECT mean(\"duration_ms\") FROM \"$testnet\".\"autogen\".\"leader-finality\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n",
|
||||
"query": "SELECT mean(\"duration_ms\") FROM \"$testnet\".\"autogen\".\"leader-confirmation\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n",
|
||||
"rawQuery": true,
|
||||
"refId": "A",
|
||||
"resultFormat": "time_series",
|
||||
@ -1675,7 +1675,7 @@
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Finality",
|
||||
"title": "Time since last Confirmation",
|
||||
"tooltip": {
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
|
67
net/gce.sh
67
net/gce.sh
@ -154,6 +154,11 @@ case $cloudProvider in
|
||||
gce)
|
||||
if $enableGpu; then
|
||||
# Custom Ubuntu 18.04 LTS image with CUDA 9.2 and CUDA 10.0 installed
|
||||
#
|
||||
# TODO: Unfortunately this image is not public. When this becomes an issue,
|
||||
# use the stock Ubuntu 18.04 image and programmatically install CUDA after the
|
||||
# instance boots
|
||||
#
|
||||
imageName="ubuntu-1804-bionic-v20181029-with-cuda-10-and-cuda-9-2"
|
||||
else
|
||||
# Upstream Ubuntu 18.04 LTS image
|
||||
@ -161,23 +166,45 @@ gce)
|
||||
fi
|
||||
;;
|
||||
ec2)
|
||||
#
|
||||
# Custom Ubuntu 18.04 LTS image with CUDA 9.2 and CUDA 10.0 installed
|
||||
#
|
||||
case $region in # (region global variable is set by cloud_SetZone)
|
||||
us-east-1)
|
||||
imageName="ami-0a8bd6fb204473f78"
|
||||
;;
|
||||
us-west-1)
|
||||
imageName="ami-07011f0795513c59d"
|
||||
;;
|
||||
us-west-2)
|
||||
imageName="ami-0a11ef42b62b82b68"
|
||||
;;
|
||||
*)
|
||||
usage "Unsupported region: $region"
|
||||
;;
|
||||
esac
|
||||
if $enableGpu; then
|
||||
#
|
||||
# Custom Ubuntu 18.04 LTS image with CUDA 9.2 and CUDA 10.0 installed
|
||||
#
|
||||
# TODO: Unfortunately these AMIs are not public. When this becomes an issue,
|
||||
# use the stock Ubuntu 18.04 image and programmatically install CUDA after the
|
||||
# instance boots
|
||||
#
|
||||
case $region in
|
||||
us-east-1)
|
||||
imageName="ami-0a8bd6fb204473f78"
|
||||
;;
|
||||
us-west-1)
|
||||
imageName="ami-07011f0795513c59d"
|
||||
;;
|
||||
us-west-2)
|
||||
imageName="ami-0a11ef42b62b82b68"
|
||||
;;
|
||||
*)
|
||||
usage "Unsupported region: $region"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
# Select an upstream Ubuntu 18.04 AMI from https://cloud-images.ubuntu.com/locator/ec2/
|
||||
case $region in
|
||||
us-east-1)
|
||||
imageName="ami-0a313d6098716f372"
|
||||
;;
|
||||
us-west-1)
|
||||
imageName="ami-06397100adf427136"
|
||||
;;
|
||||
us-west-2)
|
||||
imageName="ami-0dc34f4b016c9ce49"
|
||||
;;
|
||||
*)
|
||||
usage "Unsupported region: $region"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Error: Unknown cloud provider: $cloudProvider"
|
||||
@ -430,6 +457,10 @@ $(
|
||||
network-config.sh \
|
||||
remove-docker-interface.sh \
|
||||
|
||||
if "$enableGpu"; then
|
||||
cat enable-nvidia-persistence-mode.sh
|
||||
fi
|
||||
|
||||
)
|
||||
|
||||
cat > /etc/motd <<EOM
|
||||
@ -440,6 +471,8 @@ touch /.instance-startup-complete
|
||||
|
||||
EOF
|
||||
|
||||
cloud_Initialize "$prefix"
|
||||
|
||||
cloud_CreateInstances "$prefix" "$prefix-bootstrap-leader" 1 \
|
||||
"$imageName" "$bootstrapLeaderMachineType" "$fullNodeBootDiskSizeInGb" \
|
||||
"$startupScript" "$bootstrapLeaderAddress" "$bootDiskType"
|
||||
|
10
net/net.sh
10
net/net.sh
@ -35,6 +35,7 @@ Operate a configured testnet
|
||||
(ignored if -s or -S is specified)
|
||||
-r - Reuse existing node/ledger configuration from a
|
||||
previous |start| (ie, don't run ./mulitnode-demo/setup.sh).
|
||||
-D /path/to/programs - Deploy custom programs from this location
|
||||
|
||||
Note: if RUST_LOG is set in the environment it will be propogated into the
|
||||
network nodes.
|
||||
@ -59,12 +60,13 @@ sanityExtraArgs=
|
||||
cargoFeatures=
|
||||
skipSetup=false
|
||||
updateNodes=false
|
||||
customPrograms=
|
||||
|
||||
command=$1
|
||||
[[ -n $command ]] || usage
|
||||
shift
|
||||
|
||||
while getopts "h?S:s:T:t:o:f:r" opt; do
|
||||
while getopts "h?S:s:T:t:o:f:r:D:" opt; do
|
||||
case $opt in
|
||||
h | \?)
|
||||
usage
|
||||
@ -107,6 +109,9 @@ while getopts "h?S:s:T:t:o:f:r" opt; do
|
||||
r)
|
||||
skipSetup=true
|
||||
;;
|
||||
D)
|
||||
customPrograms=$OPTARG
|
||||
;;
|
||||
o)
|
||||
case $OPTARG in
|
||||
noLedgerVerify|noValidatorSanity|rejectExtraNodes)
|
||||
@ -146,6 +151,9 @@ build() {
|
||||
$MAYBE_DOCKER bash -c "
|
||||
set -ex
|
||||
scripts/cargo-install-all.sh farf \"$cargoFeatures\"
|
||||
if [[ -n \"$customPrograms\" ]]; then
|
||||
scripts/cargo-install-custom-programs.sh farf $customPrograms
|
||||
fi
|
||||
"
|
||||
)
|
||||
echo "Build took $SECONDS seconds"
|
||||
|
@ -101,6 +101,33 @@ cloud_FindInstance() {
|
||||
__cloud_FindInstances "$name"
|
||||
}
|
||||
|
||||
#
|
||||
# cloud_Initialize [networkName]
|
||||
#
|
||||
# Perform one-time initialization that may be required for the given testnet.
|
||||
#
|
||||
# networkName - unique name of this testnet
|
||||
#
|
||||
# This function will be called before |cloud_CreateInstances|
|
||||
cloud_Initialize() {
|
||||
declare networkName="$1"
|
||||
|
||||
__cloud_SshPrivateKeyCheck
|
||||
(
|
||||
set -x
|
||||
aws ec2 delete-key-pair --region "$region" --key-name "$networkName"
|
||||
aws ec2 import-key-pair --region "$region" --key-name "$networkName" \
|
||||
--public-key-material file://"${sshPrivateKey}".pub
|
||||
)
|
||||
|
||||
(
|
||||
set -x
|
||||
aws ec2 delete-security-group --region "$region" --group-name "$networkName" || true
|
||||
aws ec2 create-security-group --region "$region" --group-name "$networkName" --description "Created automatically by $0"
|
||||
rules=$(cat "$(dirname "${BASH_SOURCE[0]}")"/ec2-security-group-config.json)
|
||||
aws ec2 authorize-security-group-ingress --region "$region" --group-name "$networkName" --cli-input-json "$rules"
|
||||
)
|
||||
}
|
||||
|
||||
#
|
||||
# cloud_CreateInstances [networkName] [namePrefix] [numNodes] [imageName]
|
||||
@ -131,21 +158,13 @@ cloud_CreateInstances() {
|
||||
declare optionalStartupScript="$7"
|
||||
declare optionalAddress="$8"
|
||||
|
||||
__cloud_SshPrivateKeyCheck
|
||||
(
|
||||
set -x
|
||||
aws ec2 delete-key-pair --region "$region" --key-name "$networkName"
|
||||
aws ec2 import-key-pair --region "$region" --key-name "$networkName" \
|
||||
--public-key-material file://"${sshPrivateKey}".pub
|
||||
)
|
||||
|
||||
declare -a args
|
||||
args=(
|
||||
--key-name "$networkName"
|
||||
--count "$numNodes"
|
||||
--region "$region"
|
||||
--placement "AvailabilityZone=$zone"
|
||||
--security-groups testnet
|
||||
--security-groups "$networkName"
|
||||
--image-id "$imageName"
|
||||
--instance-type "$machineType"
|
||||
--tag-specifications "ResourceType=instance,Tags=[{Key=name,Value=$namePrefix}]"
|
||||
|
137
net/scripts/ec2-security-group-config.json
Normal file
137
net/scripts/ec2-security-group-config.json
Normal file
@ -0,0 +1,137 @@
|
||||
{
|
||||
"IpPermissions": [
|
||||
{
|
||||
"PrefixListIds": [],
|
||||
"FromPort": 80,
|
||||
"IpRanges": [
|
||||
{
|
||||
"CidrIp": "0.0.0.0/0",
|
||||
"Description": "http for block explorer"
|
||||
}
|
||||
],
|
||||
"ToPort": 80,
|
||||
"IpProtocol": "tcp",
|
||||
"UserIdGroupPairs": [],
|
||||
"Ipv6Ranges": [
|
||||
{
|
||||
"CidrIpv6": "::/0",
|
||||
"Description": "http for block explorer"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"PrefixListIds": [],
|
||||
"FromPort": 8000,
|
||||
"IpRanges": [
|
||||
{
|
||||
"Description": "fullnode UDP range",
|
||||
"CidrIp": "0.0.0.0/0"
|
||||
}
|
||||
],
|
||||
"ToPort": 10000,
|
||||
"IpProtocol": "udp",
|
||||
"UserIdGroupPairs": [],
|
||||
"Ipv6Ranges": [
|
||||
{
|
||||
"CidrIpv6": "::/0",
|
||||
"Description": "fullnode UDP range"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"PrefixListIds": [],
|
||||
"FromPort": 22,
|
||||
"IpRanges": [
|
||||
{
|
||||
"CidrIp": "0.0.0.0/0",
|
||||
"Description": "ssh"
|
||||
}
|
||||
],
|
||||
"ToPort": 22,
|
||||
"IpProtocol": "tcp",
|
||||
"UserIdGroupPairs": [],
|
||||
"Ipv6Ranges": [
|
||||
{
|
||||
"CidrIpv6": "::/0",
|
||||
"Description": "ssh"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"PrefixListIds": [],
|
||||
"FromPort": 873,
|
||||
"IpRanges": [
|
||||
{
|
||||
"Description": "rsync",
|
||||
"CidrIp": "0.0.0.0/0"
|
||||
}
|
||||
],
|
||||
"ToPort": 873,
|
||||
"IpProtocol": "tcp",
|
||||
"UserIdGroupPairs": [],
|
||||
"Ipv6Ranges": [
|
||||
{
|
||||
"CidrIpv6": "::/0",
|
||||
"Description": "rsync"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"PrefixListIds": [],
|
||||
"FromPort": 3001,
|
||||
"IpRanges": [
|
||||
{
|
||||
"Description": "blockexplorer API port",
|
||||
"CidrIp": "0.0.0.0/0"
|
||||
}
|
||||
],
|
||||
"ToPort": 3001,
|
||||
"IpProtocol": "tcp",
|
||||
"UserIdGroupPairs": [],
|
||||
"Ipv6Ranges": [
|
||||
{
|
||||
"CidrIpv6": "::/0",
|
||||
"Description": "blockexplorer API port"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"PrefixListIds": [],
|
||||
"FromPort": 8000,
|
||||
"IpRanges": [
|
||||
{
|
||||
"Description": "fullnode TCP range",
|
||||
"CidrIp": "0.0.0.0/0"
|
||||
}
|
||||
],
|
||||
"ToPort": 10000,
|
||||
"IpProtocol": "tcp",
|
||||
"UserIdGroupPairs": [],
|
||||
"Ipv6Ranges": [
|
||||
{
|
||||
"CidrIpv6": "::/0",
|
||||
"Description": "fullnode TCP range"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"PrefixListIds": [],
|
||||
"FromPort": 8,
|
||||
"IpRanges": [
|
||||
{
|
||||
"CidrIp": "0.0.0.0/0",
|
||||
"Description": "allow ping"
|
||||
}
|
||||
],
|
||||
"ToPort": -1,
|
||||
"IpProtocol": "icmp",
|
||||
"UserIdGroupPairs": [],
|
||||
"Ipv6Ranges": [
|
||||
{
|
||||
"CidrIpv6": "::/0",
|
||||
"Description": "allow ping"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
2
net/scripts/enable-nvidia-persistence-mode.sh
Executable file
2
net/scripts/enable-nvidia-persistence-mode.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
nvidia-smi -pm ENABLED || true
|
@ -76,6 +76,21 @@ cloud_FindInstance() {
|
||||
__cloud_FindInstances "name=$name"
|
||||
}
|
||||
|
||||
#
|
||||
# cloud_Initialize [networkName]
|
||||
#
|
||||
# Perform one-time initialization that may be required for the given testnet.
|
||||
#
|
||||
# networkName - unique name of this testnet
|
||||
#
|
||||
# This function will be called before |cloud_CreateInstances|
|
||||
cloud_Initialize() {
|
||||
declare networkName="$1"
|
||||
# ec2-provider.sh creates firewall rules programmatically, should do the same
|
||||
# here.
|
||||
echo "TODO: create $networkName firewall rules programmatically instead of assuming the 'testnet' tag exists"
|
||||
}
|
||||
|
||||
#
|
||||
# cloud_CreateInstances [networkName] [namePrefix] [numNodes] [imageName]
|
||||
# [machineType] [bootDiskSize] [enableGpu]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-netutil"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
description = "Solana Network Utilities"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -18,7 +18,7 @@ reqwest = "0.9.0"
|
||||
socket2 = "0.3.8"
|
||||
|
||||
[dev-dependencies]
|
||||
solana-logger = { path = "../logger", version = "0.11.0" }
|
||||
solana-logger = { path = "../logger", version = "0.11.1" }
|
||||
|
||||
[lib]
|
||||
name = "solana_netutil"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-bpf-noop"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
description = "Solana BPF noop program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -9,4 +9,4 @@ homepage = "https://solana.com/"
|
||||
|
||||
[dependencies]
|
||||
rbpf = "0.1.0"
|
||||
solana-sdk = { path = "../../../../sdk", version = "0.11.0" }
|
||||
solana-sdk = { path = "../../../../sdk", version = "0.11.1" }
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-bpfloader"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
description = "Solana BPF Loader"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -19,8 +19,8 @@ libc = "0.2.45"
|
||||
log = "0.4.2"
|
||||
solana_rbpf = "=0.1.5"
|
||||
serde = "1.0.82"
|
||||
solana-logger = { path = "../../../logger", version = "0.11.0" }
|
||||
solana-sdk = { path = "../../../sdk", version = "0.11.0" }
|
||||
solana-logger = { path = "../../../logger", version = "0.11.1" }
|
||||
solana-sdk = { path = "../../../sdk", version = "0.11.1" }
|
||||
|
||||
[lib]
|
||||
name = "solana_bpf_loader"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-budget-program"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
description = "Solana budget program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -14,8 +14,8 @@ chrono = { version = "0.4.0", features = ["serde"] }
|
||||
log = "0.4.2"
|
||||
serde = "1.0.82"
|
||||
serde_derive = "1.0.82"
|
||||
solana-logger = { path = "../../../logger", version = "0.11.0" }
|
||||
solana-sdk = { path = "../../../sdk", version = "0.11.0" }
|
||||
solana-logger = { path = "../../../logger", version = "0.11.1" }
|
||||
solana-sdk = { path = "../../../sdk", version = "0.11.1" }
|
||||
|
||||
[lib]
|
||||
name = "solana_budget_program"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-erc20"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
description = "Solana reference erc20 program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -13,8 +13,8 @@ bincode = "1.0.0"
|
||||
log = "0.4.2"
|
||||
serde = "1.0.82"
|
||||
serde_derive = "1.0.82"
|
||||
solana-logger = { path = "../../../logger", version = "0.11.0" }
|
||||
solana-sdk = { path = "../../../sdk", version = "0.11.0" }
|
||||
solana-logger = { path = "../../../logger", version = "0.11.1" }
|
||||
solana-sdk = { path = "../../../sdk", version = "0.11.1" }
|
||||
|
||||
[lib]
|
||||
name = "solana_erc20"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-lualoader"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
description = "Solana Lua Loader"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -14,8 +14,8 @@ log = "0.4.2"
|
||||
rlua = "0.15.2"
|
||||
serde = "1.0.82"
|
||||
serde_derive = "1.0.82"
|
||||
solana-logger = { path = "../../../logger", version = "0.11.0" }
|
||||
solana-sdk = { path = "../../../sdk", version = "0.11.0" }
|
||||
solana-logger = { path = "../../../logger", version = "0.11.1" }
|
||||
solana-sdk = { path = "../../../sdk", version = "0.11.1" }
|
||||
|
||||
[dev-dependencies]
|
||||
bincode = "1.0.0"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-native-loader"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
description = "Solana Native Loader"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -13,7 +13,7 @@ bincode = "1.0.0"
|
||||
libc = "0.2.45"
|
||||
libloading = "0.5.0"
|
||||
log = "0.4.2"
|
||||
solana-sdk = { path = "../../../sdk", version = "0.11.0" }
|
||||
solana-sdk = { path = "../../../sdk", version = "0.11.1" }
|
||||
|
||||
[lib]
|
||||
name = "solana_native_loader"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-noop"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
description = "Solana noop program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -9,8 +9,8 @@ homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk = { path = "../../../sdk", version = "0.11.0" }
|
||||
solana-logger = { path = "../../../logger", version = "0.11.0" }
|
||||
solana-sdk = { path = "../../../sdk", version = "0.11.1" }
|
||||
solana-logger = { path = "../../../logger", version = "0.11.1" }
|
||||
log = "0.4.2"
|
||||
|
||||
[lib]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-storage-program"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
description = "Solana storage program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -13,8 +13,8 @@ bincode = "1.0.0"
|
||||
log = "0.4.2"
|
||||
serde = "1.0.27"
|
||||
serde_derive = "1.0.27"
|
||||
solana-logger = { path = "../../../logger", version = "0.11.0" }
|
||||
solana-sdk = { path = "../../../sdk", version = "0.11.0" }
|
||||
solana-logger = { path = "../../../logger", version = "0.11.1" }
|
||||
solana-sdk = { path = "../../../sdk", version = "0.11.1" }
|
||||
|
||||
[lib]
|
||||
name = "solana_storage_program"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-system-program"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
description = "Solana system program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,7 +12,7 @@ edition = "2018"
|
||||
bincode = "1.0.0"
|
||||
log = "0.4.2"
|
||||
serde = "1.0.27"
|
||||
solana-sdk = { path = "../../../sdk", version = "0.11.0" }
|
||||
solana-sdk = { path = "../../../sdk", version = "0.11.1" }
|
||||
|
||||
[lib]
|
||||
name = "solana_system_program"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-vote-program"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
description = "Solana vote program"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -13,9 +13,9 @@ bincode = "1.0.0"
|
||||
log = "0.4.2"
|
||||
serde = "1.0.82"
|
||||
serde_derive = "1.0.82"
|
||||
solana-logger = { path = "../../../logger", version = "0.11.0" }
|
||||
solana-metrics = { path = "../../../metrics", version = "0.11.0" }
|
||||
solana-sdk = { path = "../../../sdk", version = "0.11.0" }
|
||||
solana-logger = { path = "../../../logger", version = "0.11.1" }
|
||||
solana-metrics = { path = "../../../metrics", version = "0.11.1" }
|
||||
solana-sdk = { path = "../../../sdk", version = "0.11.1" }
|
||||
|
||||
[lib]
|
||||
name = "solana_vote_program"
|
||||
|
@ -2,7 +2,7 @@
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-replicator"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
@ -10,10 +10,10 @@ homepage = "https://solana.com/"
|
||||
[dependencies]
|
||||
clap = "2.32.0"
|
||||
serde_json = "1.0.10"
|
||||
solana = { path = "..", version = "0.11.0" }
|
||||
solana-logger = { path = "../logger", version = "0.11.0" }
|
||||
solana-fullnode-config = { path = "../fullnode-config", version = "0.11.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.11.0" }
|
||||
solana = { path = "..", version = "0.11.1" }
|
||||
solana-logger = { path = "../logger", version = "0.11.1" }
|
||||
solana-fullnode-config = { path = "../fullnode-config", version = "0.11.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.11.1" }
|
||||
|
||||
[features]
|
||||
chacha = ["solana/chacha"]
|
||||
|
30
scripts/cargo-install-custom-programs.sh
Executable file
30
scripts/cargo-install-custom-programs.sh
Executable file
@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# This script will install all cargo workspace libraries found in
|
||||
# `programDir` as native programs.
|
||||
set -e
|
||||
|
||||
# Directory to install libraries into
|
||||
installDir="$(mkdir -p "$1"; cd "$1"; pwd)"
|
||||
|
||||
# Where to find custom programs
|
||||
programDir="$2"
|
||||
|
||||
(
|
||||
set -x
|
||||
cd "$programDir"
|
||||
cargo build --all --release
|
||||
)
|
||||
|
||||
for dir in "$programDir"/*; do
|
||||
for program in $programDir/target/release/deps/lib"$(basename "$dir")".{so,dylib,dll}; do
|
||||
if [[ -f $program ]]; then
|
||||
(
|
||||
set -x
|
||||
mkdir -p "$installDir/bin/deps"
|
||||
rm -f "$installDir/bin/deps/$(basename "$program")"
|
||||
cp -v "$program" "$installDir"/bin/deps
|
||||
)
|
||||
fi
|
||||
done
|
||||
done
|
@ -2,7 +2,6 @@
|
||||
#
|
||||
# Send a metrics datapoint
|
||||
#
|
||||
set -e
|
||||
|
||||
point=$1
|
||||
if [[ -z $point ]]; then
|
||||
@ -18,3 +17,4 @@ fi
|
||||
|
||||
echo "https://metrics.solana.com:8086/write?db=${INFLUX_DATABASE}&u=${INFLUX_USERNAME}&p=${INFLUX_PASSWORD}" \
|
||||
| xargs curl --max-time 5 -XPOST --data-binary "$point"
|
||||
exit 0
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-sdk"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
description = "Solana SDK"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
|
@ -4,17 +4,10 @@ set -ex
|
||||
cd "$(dirname "$0")"
|
||||
eval "$(../../ci/channel-info.sh)"
|
||||
|
||||
if [[ $BUILDKITE_BRANCH = "$STABLE_CHANNEL" ]]; then
|
||||
CHANNEL=stable
|
||||
elif [[ $BUILDKITE_BRANCH = "$EDGE_CHANNEL" ]]; then
|
||||
CHANNEL=edge
|
||||
elif [[ $BUILDKITE_BRANCH = "$BETA_CHANNEL" ]]; then
|
||||
CHANNEL=beta
|
||||
fi
|
||||
|
||||
if [[ -z $CHANNEL ]]; then
|
||||
echo Unable to determine channel to publish into, exiting.
|
||||
exit 1
|
||||
echo "^^^ +++"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
rm -rf usr/
|
||||
@ -23,7 +16,7 @@ rm -rf usr/
|
||||
|
||||
cp -f entrypoint.sh usr/bin/solana-entrypoint.sh
|
||||
|
||||
docker build -t solanalabs/solana:$CHANNEL .
|
||||
docker build -t solanalabs/solana:"$CHANNEL" .
|
||||
|
||||
maybeEcho=
|
||||
if [[ -z $CI ]]; then
|
||||
@ -37,4 +30,4 @@ else
|
||||
fi
|
||||
)
|
||||
fi
|
||||
$maybeEcho docker push solanalabs/solana:$CHANNEL
|
||||
$maybeEcho docker push solanalabs/solana:"$CHANNEL"
|
||||
|
29
src/bank.rs
29
src/bank.rs
@ -94,8 +94,8 @@ pub struct Bank {
|
||||
/// FIFO queue of `last_id` items
|
||||
last_ids: RwLock<StatusDeque<Result<()>>>,
|
||||
|
||||
// The latest finality time for the network
|
||||
finality_time: AtomicUsize,
|
||||
// The latest confirmation time for the network
|
||||
confirmation_time: AtomicUsize,
|
||||
|
||||
// Mapping of account ids to Subscriber ids and sinks to notify on userdata update
|
||||
account_subscriptions: RwLock<HashMap<Pubkey, HashMap<Pubkey, Sink<Account>>>>,
|
||||
@ -115,7 +115,7 @@ impl Default for Bank {
|
||||
Bank {
|
||||
accounts: Accounts::default(),
|
||||
last_ids: RwLock::new(StatusDeque::default()),
|
||||
finality_time: AtomicUsize::new(std::usize::MAX),
|
||||
confirmation_time: AtomicUsize::new(std::usize::MAX),
|
||||
account_subscriptions: RwLock::new(HashMap::new()),
|
||||
signature_subscriptions: RwLock::new(HashMap::new()),
|
||||
leader_scheduler: Arc::new(RwLock::new(LeaderScheduler::default())),
|
||||
@ -316,14 +316,14 @@ impl Bank {
|
||||
}
|
||||
|
||||
/// Looks through a list of tick heights and stakes, and finds the latest
|
||||
/// tick that has achieved finality
|
||||
pub fn get_finality_timestamp(
|
||||
/// tick that has achieved confirmation
|
||||
pub fn get_confirmation_timestamp(
|
||||
&self,
|
||||
ticks_and_stakes: &mut [(u64, u64)],
|
||||
supermajority_stake: u64,
|
||||
) -> Option<u64> {
|
||||
let last_ids = self.last_ids.read().unwrap();
|
||||
last_ids.get_finality_timestamp(ticks_and_stakes, supermajority_stake)
|
||||
last_ids.get_confirmation_timestamp(ticks_and_stakes, supermajority_stake)
|
||||
}
|
||||
|
||||
/// Tell the bank which Entry IDs exist on the ledger. This function
|
||||
@ -871,12 +871,13 @@ impl Bank {
|
||||
self.accounts.hash_internal_state()
|
||||
}
|
||||
|
||||
pub fn finality(&self) -> usize {
|
||||
self.finality_time.load(Ordering::Relaxed)
|
||||
pub fn confirmation_time(&self) -> usize {
|
||||
self.confirmation_time.load(Ordering::Relaxed)
|
||||
}
|
||||
|
||||
pub fn set_finality(&self, finality: usize) {
|
||||
self.finality_time.store(finality, Ordering::Relaxed);
|
||||
pub fn set_confirmation_time(&self, confirmation: usize) {
|
||||
self.confirmation_time
|
||||
.store(confirmation, Ordering::Relaxed);
|
||||
}
|
||||
|
||||
fn send_account_notifications(
|
||||
@ -1403,11 +1404,11 @@ mod tests {
|
||||
assert_eq!(bank0.hash_internal_state(), bank1.hash_internal_state());
|
||||
}
|
||||
#[test]
|
||||
fn test_finality() {
|
||||
fn test_confirmation_time() {
|
||||
let def_bank = Bank::default();
|
||||
assert_eq!(def_bank.finality(), std::usize::MAX);
|
||||
def_bank.set_finality(90);
|
||||
assert_eq!(def_bank.finality(), 90);
|
||||
assert_eq!(def_bank.confirmation_time(), std::usize::MAX);
|
||||
def_bank.set_confirmation_time(90);
|
||||
assert_eq!(def_bank.confirmation_time(), 90);
|
||||
}
|
||||
#[test]
|
||||
fn test_interleaving_locks() {
|
||||
|
@ -3,7 +3,7 @@
|
||||
//! can do its processing in parallel with signature verification on the GPU.
|
||||
|
||||
use crate::bank::Bank;
|
||||
use crate::compute_leader_finality_service::ComputeLeaderFinalityService;
|
||||
use crate::compute_leader_confirmation_service::ComputeLeaderConfirmationService;
|
||||
use crate::counter::Counter;
|
||||
use crate::entry::Entry;
|
||||
use crate::packet::Packets;
|
||||
@ -40,7 +40,7 @@ pub struct BankingStage {
|
||||
/// Handle to the stage's thread.
|
||||
bank_thread_hdls: Vec<JoinHandle<Option<BankingStageReturnType>>>,
|
||||
poh_service: PohService,
|
||||
compute_finality_service: ComputeLeaderFinalityService,
|
||||
compute_confirmation_service: ComputeLeaderConfirmationService,
|
||||
}
|
||||
|
||||
impl BankingStage {
|
||||
@ -64,8 +64,8 @@ impl BankingStage {
|
||||
// Once an entry has been recorded, its last_id is registered with the bank.
|
||||
let poh_service = PohService::new(poh_recorder.clone(), config);
|
||||
|
||||
// Single thread to compute finality
|
||||
let compute_finality_service = ComputeLeaderFinalityService::new(
|
||||
// Single thread to compute confirmation
|
||||
let compute_confirmation_service = ComputeLeaderConfirmationService::new(
|
||||
bank.clone(),
|
||||
leader_id,
|
||||
poh_service.poh_exit.clone(),
|
||||
@ -120,7 +120,7 @@ impl BankingStage {
|
||||
Self {
|
||||
bank_thread_hdls,
|
||||
poh_service,
|
||||
compute_finality_service,
|
||||
compute_confirmation_service,
|
||||
},
|
||||
entry_receiver,
|
||||
)
|
||||
@ -239,7 +239,7 @@ impl Service for BankingStage {
|
||||
}
|
||||
}
|
||||
|
||||
self.compute_finality_service.join()?;
|
||||
self.compute_confirmation_service.join()?;
|
||||
|
||||
let poh_return_value = self.poh_service.join()?;
|
||||
match poh_return_value {
|
||||
|
79
src/compute_leader_finality_service.rs → src/compute_leader_confirmation_service.rs
Normal file → Executable file
79
src/compute_leader_finality_service.rs → src/compute_leader_confirmation_service.rs
Normal file → Executable file
@ -1,5 +1,5 @@
|
||||
//! The `compute_leader_finality_service` module implements the tools necessary
|
||||
//! to generate a thread which regularly calculates the last finality times
|
||||
//! The `compute_leader_confirmation_service` module implements the tools necessary
|
||||
//! to generate a thread which regularly calculates the last confirmation times
|
||||
//! observed by the leader
|
||||
|
||||
use crate::bank::Bank;
|
||||
@ -17,23 +17,23 @@ use std::thread::{self, Builder, JoinHandle};
|
||||
use std::time::Duration;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub enum FinalityError {
|
||||
pub enum ConfirmationError {
|
||||
NoValidSupermajority,
|
||||
}
|
||||
|
||||
pub const COMPUTE_FINALITY_MS: u64 = 100;
|
||||
pub const COMPUTE_CONFIRMATION_MS: u64 = 100;
|
||||
|
||||
pub struct ComputeLeaderFinalityService {
|
||||
compute_finality_thread: JoinHandle<()>,
|
||||
pub struct ComputeLeaderConfirmationService {
|
||||
compute_confirmation_thread: JoinHandle<()>,
|
||||
}
|
||||
|
||||
impl ComputeLeaderFinalityService {
|
||||
impl ComputeLeaderConfirmationService {
|
||||
fn get_last_supermajority_timestamp(
|
||||
bank: &Arc<Bank>,
|
||||
leader_id: Pubkey,
|
||||
now: u64,
|
||||
last_valid_validator_timestamp: u64,
|
||||
) -> result::Result<u64, FinalityError> {
|
||||
) -> result::Result<u64, ConfirmationError> {
|
||||
let mut total_stake = 0;
|
||||
|
||||
let mut ticks_and_stakes: Vec<(u64, u64)> = {
|
||||
@ -72,14 +72,14 @@ impl ComputeLeaderFinalityService {
|
||||
let super_majority_stake = (2 * total_stake) / 3;
|
||||
|
||||
if let Some(last_valid_validator_timestamp) =
|
||||
bank.get_finality_timestamp(&mut ticks_and_stakes, super_majority_stake)
|
||||
bank.get_confirmation_timestamp(&mut ticks_and_stakes, super_majority_stake)
|
||||
{
|
||||
return Ok(last_valid_validator_timestamp);
|
||||
}
|
||||
|
||||
if last_valid_validator_timestamp != 0 {
|
||||
submit(
|
||||
influxdb::Point::new(&"leader-finality")
|
||||
influxdb::Point::new(&"leader-confirmation")
|
||||
.add_field(
|
||||
"duration_ms",
|
||||
influxdb::Value::Integer((now - last_valid_validator_timestamp) as i64),
|
||||
@ -88,10 +88,10 @@ impl ComputeLeaderFinalityService {
|
||||
);
|
||||
}
|
||||
|
||||
Err(FinalityError::NoValidSupermajority)
|
||||
Err(ConfirmationError::NoValidSupermajority)
|
||||
}
|
||||
|
||||
pub fn compute_finality(
|
||||
pub fn compute_confirmation(
|
||||
bank: &Arc<Bank>,
|
||||
leader_id: Pubkey,
|
||||
last_valid_validator_timestamp: &mut u64,
|
||||
@ -103,53 +103,60 @@ impl ComputeLeaderFinalityService {
|
||||
now,
|
||||
*last_valid_validator_timestamp,
|
||||
) {
|
||||
let finality_ms = now - super_majority_timestamp;
|
||||
let confirmation_ms = now - super_majority_timestamp;
|
||||
|
||||
*last_valid_validator_timestamp = super_majority_timestamp;
|
||||
bank.set_finality((now - *last_valid_validator_timestamp) as usize);
|
||||
bank.set_confirmation_time((now - *last_valid_validator_timestamp) as usize);
|
||||
|
||||
submit(
|
||||
influxdb::Point::new(&"leader-finality")
|
||||
.add_field("duration_ms", influxdb::Value::Integer(finality_ms as i64))
|
||||
influxdb::Point::new(&"leader-confirmation")
|
||||
.add_field(
|
||||
"duration_ms",
|
||||
influxdb::Value::Integer(confirmation_ms as i64),
|
||||
)
|
||||
.to_owned(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a new ComputeLeaderFinalityService for computing finality.
|
||||
/// Create a new ComputeLeaderConfirmationService for computing confirmation.
|
||||
pub fn new(bank: Arc<Bank>, leader_id: Pubkey, exit: Arc<AtomicBool>) -> Self {
|
||||
let compute_finality_thread = Builder::new()
|
||||
.name("solana-leader-finality-stage".to_string())
|
||||
let compute_confirmation_thread = Builder::new()
|
||||
.name("solana-leader-confirmation-stage".to_string())
|
||||
.spawn(move || {
|
||||
let mut last_valid_validator_timestamp = 0;
|
||||
loop {
|
||||
if exit.load(Ordering::Relaxed) {
|
||||
break;
|
||||
}
|
||||
Self::compute_finality(&bank, leader_id, &mut last_valid_validator_timestamp);
|
||||
sleep(Duration::from_millis(COMPUTE_FINALITY_MS));
|
||||
Self::compute_confirmation(
|
||||
&bank,
|
||||
leader_id,
|
||||
&mut last_valid_validator_timestamp,
|
||||
);
|
||||
sleep(Duration::from_millis(COMPUTE_CONFIRMATION_MS));
|
||||
}
|
||||
})
|
||||
.unwrap();
|
||||
|
||||
(ComputeLeaderFinalityService {
|
||||
compute_finality_thread,
|
||||
(ComputeLeaderConfirmationService {
|
||||
compute_confirmation_thread,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl Service for ComputeLeaderFinalityService {
|
||||
impl Service for ComputeLeaderConfirmationService {
|
||||
type JoinReturnType = ();
|
||||
|
||||
fn join(self) -> thread::Result<()> {
|
||||
self.compute_finality_thread.join()
|
||||
self.compute_confirmation_thread.join()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub mod tests {
|
||||
use crate::bank::Bank;
|
||||
use crate::compute_leader_finality_service::ComputeLeaderFinalityService;
|
||||
use crate::compute_leader_confirmation_service::ComputeLeaderConfirmationService;
|
||||
use crate::create_vote_account::*;
|
||||
|
||||
use crate::mint::Mint;
|
||||
@ -164,7 +171,7 @@ pub mod tests {
|
||||
use std::time::Duration;
|
||||
|
||||
#[test]
|
||||
fn test_compute_finality() {
|
||||
fn test_compute_confirmation() {
|
||||
solana_logger::setup();
|
||||
|
||||
let mint = Mint::new(1234);
|
||||
@ -206,14 +213,14 @@ pub mod tests {
|
||||
})
|
||||
.collect();
|
||||
|
||||
// There isn't 2/3 consensus, so the bank's finality value should be the default
|
||||
let mut last_finality_time = 0;
|
||||
ComputeLeaderFinalityService::compute_finality(
|
||||
// There isn't 2/3 consensus, so the bank's confirmation value should be the default
|
||||
let mut last_confirmation_time = 0;
|
||||
ComputeLeaderConfirmationService::compute_confirmation(
|
||||
&bank,
|
||||
dummy_leader_id,
|
||||
&mut last_finality_time,
|
||||
&mut last_confirmation_time,
|
||||
);
|
||||
assert_eq!(bank.finality(), std::usize::MAX);
|
||||
assert_eq!(bank.confirmation_time(), std::usize::MAX);
|
||||
|
||||
// Get another validator to vote, so we now have 2/3 consensus
|
||||
let vote_account = &vote_accounts[7];
|
||||
@ -221,12 +228,12 @@ pub mod tests {
|
||||
let vote_tx = Transaction::vote_new(&vote_account, vote, ids[6], 0);
|
||||
bank.process_transaction(&vote_tx).unwrap();
|
||||
|
||||
ComputeLeaderFinalityService::compute_finality(
|
||||
ComputeLeaderConfirmationService::compute_confirmation(
|
||||
&bank,
|
||||
dummy_leader_id,
|
||||
&mut last_finality_time,
|
||||
&mut last_confirmation_time,
|
||||
);
|
||||
assert!(bank.finality() != std::usize::MAX);
|
||||
assert!(last_finality_time > 0);
|
||||
assert!(bank.confirmation_time() != std::usize::MAX);
|
||||
assert!(last_confirmation_time > 0);
|
||||
}
|
||||
}
|
@ -32,7 +32,7 @@ pub mod create_vote_account;
|
||||
#[macro_use]
|
||||
pub mod contact_info;
|
||||
pub mod cluster_info;
|
||||
pub mod compute_leader_finality_service;
|
||||
pub mod compute_leader_confirmation_service;
|
||||
pub mod db_ledger;
|
||||
pub mod db_window;
|
||||
pub mod entry;
|
||||
|
@ -25,7 +25,7 @@ use std::thread::{self, Builder, JoinHandle};
|
||||
use std::time::Duration;
|
||||
use std::time::Instant;
|
||||
|
||||
pub const BLOCK_TICK_COUNT: u64 = 8;
|
||||
pub const BLOCK_TICK_COUNT: u64 = 4;
|
||||
pub const MAX_ENTRY_RECV_PER_ITER: usize = 512;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
|
18
src/rpc.rs
18
src/rpc.rs
@ -135,8 +135,8 @@ build_rpc_trait! {
|
||||
#[rpc(meta, name = "getBalance")]
|
||||
fn get_balance(&self, Self::Metadata, String) -> Result<u64>;
|
||||
|
||||
#[rpc(meta, name = "getFinality")]
|
||||
fn get_finality(&self, Self::Metadata) -> Result<usize>;
|
||||
#[rpc(meta, name = "getConfirmationTime")]
|
||||
fn get_confirmation_time(&self, Self::Metadata) -> Result<usize>;
|
||||
|
||||
#[rpc(meta, name = "getLastId")]
|
||||
fn get_last_id(&self, Self::Metadata) -> Result<String>;
|
||||
@ -184,9 +184,9 @@ impl RpcSol for RpcSolImpl {
|
||||
let pubkey = verify_pubkey(id)?;
|
||||
meta.request_processor.get_balance(pubkey)
|
||||
}
|
||||
fn get_finality(&self, meta: Self::Metadata) -> Result<usize> {
|
||||
info!("get_finality rpc request received");
|
||||
meta.request_processor.get_finality()
|
||||
fn get_confirmation_time(&self, meta: Self::Metadata) -> Result<usize> {
|
||||
info!("get_confirmation_time rpc request received");
|
||||
meta.request_processor.get_confirmation_time()
|
||||
}
|
||||
fn get_last_id(&self, meta: Self::Metadata) -> Result<String> {
|
||||
info!("get_last_id rpc request received");
|
||||
@ -329,8 +329,8 @@ impl JsonRpcRequestProcessor {
|
||||
let val = self.bank.get_balance(&pubkey);
|
||||
Ok(val)
|
||||
}
|
||||
fn get_finality(&self) -> Result<usize> {
|
||||
Ok(self.bank.finality())
|
||||
fn get_confirmation_time(&self) -> Result<usize> {
|
||||
Ok(self.bank.confirmation_time())
|
||||
}
|
||||
fn get_last_id(&self) -> Result<String> {
|
||||
let id = self.bank.last_id();
|
||||
@ -612,11 +612,11 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_rpc_get_finality() {
|
||||
fn test_rpc_get_confirmation() {
|
||||
let bob_pubkey = Keypair::new().pubkey();
|
||||
let (io, meta, _last_id, _alice_keypair) = start_rpc_handler_with_tx(bob_pubkey);
|
||||
|
||||
let req = format!(r#"{{"jsonrpc":"2.0","id":1,"method":"getFinality"}}"#);
|
||||
let req = format!(r#"{{"jsonrpc":"2.0","id":1,"method":"getConfirmationTime"}}"#);
|
||||
let res = io.handle_request_sync(&req, meta);
|
||||
let expected = format!(r#"{{"jsonrpc":"2.0","result":18446744073709551615,"id":1}}"#);
|
||||
let expected: Response =
|
||||
|
@ -44,7 +44,7 @@ pub enum RpcRequest {
|
||||
ConfirmTransaction,
|
||||
GetAccountInfo,
|
||||
GetBalance,
|
||||
GetFinality,
|
||||
GetConfirmationTime,
|
||||
GetLastId,
|
||||
GetSignatureStatus,
|
||||
GetTransactionCount,
|
||||
@ -89,7 +89,7 @@ impl RpcRequest {
|
||||
RpcRequest::ConfirmTransaction => "confirmTransaction",
|
||||
RpcRequest::GetAccountInfo => "getAccountInfo",
|
||||
RpcRequest::GetBalance => "getBalance",
|
||||
RpcRequest::GetFinality => "getFinality",
|
||||
RpcRequest::GetConfirmationTime => "getConfirmationTime",
|
||||
RpcRequest::GetLastId => "getLastId",
|
||||
RpcRequest::GetSignatureStatus => "getSignatureStatus",
|
||||
RpcRequest::GetTransactionCount => "getTransactionCount",
|
||||
@ -166,9 +166,9 @@ mod tests {
|
||||
);
|
||||
assert_eq!(request["method"], "getBalance");
|
||||
|
||||
let test_request = RpcRequest::GetFinality;
|
||||
let test_request = RpcRequest::GetConfirmationTime;
|
||||
let request = test_request.build_request_json(1, None);
|
||||
assert_eq!(request["method"], "getFinality");
|
||||
assert_eq!(request["method"], "getConfirmationTime");
|
||||
assert_eq!(request["params"], json!(null));
|
||||
|
||||
let test_request = RpcRequest::GetLastId;
|
||||
|
@ -44,7 +44,7 @@ struct StatusEntry<T> {
|
||||
/// when the id was registered, according to network time
|
||||
tick_height: u64,
|
||||
|
||||
/// timestamp when this id was registered, used for stats/finality
|
||||
/// timestamp when this id was registered, used for stats/confirmation
|
||||
timestamp: u64,
|
||||
|
||||
/// a map of signature status, used for duplicate detection
|
||||
@ -183,14 +183,14 @@ impl<T: Clone> StatusDeque<T> {
|
||||
}
|
||||
|
||||
/// Looks through a list of tick heights and stakes, and finds the latest
|
||||
/// tick that has achieved finality
|
||||
pub fn get_finality_timestamp(
|
||||
/// tick that has achieved confirmation
|
||||
pub fn get_confirmation_timestamp(
|
||||
&self,
|
||||
ticks_and_stakes: &mut [(u64, u64)],
|
||||
supermajority_stake: u64,
|
||||
) -> Option<u64> {
|
||||
// Sort by tick height
|
||||
ticks_and_stakes.sort_by(|a, b| a.0.cmp(&b.0));
|
||||
ticks_and_stakes.sort_by(|a, b| b.0.cmp(&a.0));
|
||||
let current_tick_height = self.tick_height;
|
||||
let mut total = 0;
|
||||
for (tick_height, stake) in ticks_and_stakes.iter() {
|
||||
|
@ -41,7 +41,7 @@ pub struct ThinClient {
|
||||
transaction_count: u64,
|
||||
balances: HashMap<Pubkey, Account>,
|
||||
signature_status: bool,
|
||||
finality: Option<usize>,
|
||||
confirmation: Option<usize>,
|
||||
|
||||
rpc_client: RpcClient,
|
||||
}
|
||||
@ -87,7 +87,7 @@ impl ThinClient {
|
||||
transaction_count: 0,
|
||||
balances: HashMap::new(),
|
||||
signature_status: false,
|
||||
finality: None,
|
||||
confirmation: None,
|
||||
}
|
||||
}
|
||||
|
||||
@ -187,23 +187,23 @@ impl ThinClient {
|
||||
.ok_or_else(|| io::Error::new(io::ErrorKind::Other, "AccountNotFound"))
|
||||
}
|
||||
|
||||
/// Request the finality from the leader node
|
||||
pub fn get_finality(&mut self) -> usize {
|
||||
trace!("get_finality");
|
||||
/// Request the confirmation time from the leader node
|
||||
pub fn get_confirmation_time(&mut self) -> usize {
|
||||
trace!("get_confirmation_time");
|
||||
let mut done = false;
|
||||
while !done {
|
||||
debug!("get_finality send_to {}", &self.rpc_addr);
|
||||
let resp = RpcRequest::GetFinality.make_rpc_request(&self.rpc_client, 1, None);
|
||||
debug!("get_confirmation_time send_to {}", &self.rpc_addr);
|
||||
let resp = RpcRequest::GetConfirmationTime.make_rpc_request(&self.rpc_client, 1, None);
|
||||
|
||||
if let Ok(value) = resp {
|
||||
done = true;
|
||||
let finality = value.as_u64().unwrap() as usize;
|
||||
self.finality = Some(finality);
|
||||
let confirmation = value.as_u64().unwrap() as usize;
|
||||
self.confirmation = Some(confirmation);
|
||||
} else {
|
||||
debug!("thin_client get_finality error: {:?}", resp);
|
||||
debug!("thin_client get_confirmation_time error: {:?}", resp);
|
||||
}
|
||||
}
|
||||
self.finality.expect("some finality")
|
||||
self.confirmation.expect("some confirmation")
|
||||
}
|
||||
|
||||
/// Request the transaction count. If the response packet is dropped by the network,
|
||||
@ -477,8 +477,8 @@ mod tests {
|
||||
let mut client = ThinClient::new(leader_data.rpc, leader_data.tpu, transactions_socket);
|
||||
let transaction_count = client.transaction_count();
|
||||
assert_eq!(transaction_count, 0);
|
||||
let finality = client.get_finality();
|
||||
assert_eq!(finality, 18446744073709551615);
|
||||
let confirmation = client.get_confirmation_time();
|
||||
assert_eq!(confirmation, 18446744073709551615);
|
||||
let last_id = client.get_last_id();
|
||||
let signature = client
|
||||
.transfer(500, &alice.keypair(), bob_pubkey, &last_id)
|
||||
|
12
src/window_service.rs
Normal file → Executable file
12
src/window_service.rs
Normal file → Executable file
@ -89,12 +89,6 @@ fn recv_window(
|
||||
(p.index()?, p.meta.size)
|
||||
};
|
||||
|
||||
submit(
|
||||
influxdb::Point::new("window-service")
|
||||
.add_field("last-recv", influxdb::Value::Integer(pix as i64))
|
||||
.to_owned(),
|
||||
);
|
||||
|
||||
trace!("{} window pix: {} size: {}", id, pix, meta_size);
|
||||
|
||||
let _ = process_blob(
|
||||
@ -172,12 +166,6 @@ pub fn window_service(
|
||||
let received = meta.received;
|
||||
let consumed = meta.consumed;
|
||||
|
||||
submit(
|
||||
influxdb::Point::new("window-stage")
|
||||
.add_field("consumed", influxdb::Value::Integer(consumed as i64))
|
||||
.to_owned(),
|
||||
);
|
||||
|
||||
// Consumed should never be bigger than received
|
||||
assert!(consumed <= received);
|
||||
if received == consumed {
|
||||
|
@ -714,8 +714,8 @@ fn test_multi_node_dynamic_network() {
|
||||
let mut validators: Vec<_> = t2.into_iter().map(|t| t.join().unwrap()).collect();
|
||||
|
||||
let mut client = mk_client(&leader_data);
|
||||
let mut last_finality = client.get_finality();
|
||||
info!("Last finality {}", last_finality);
|
||||
let mut last_confirmation = client.get_confirmation_time();
|
||||
info!("Last confirmation {}", last_confirmation);
|
||||
let start = Instant::now();
|
||||
let mut consecutive_success = 0;
|
||||
let mut expected_balance = leader_balance;
|
||||
@ -738,28 +738,28 @@ fn test_multi_node_dynamic_network() {
|
||||
assert!(e.is_ok(), "err: {:?}", e);
|
||||
|
||||
let now = Instant::now();
|
||||
let mut finality = client.get_finality();
|
||||
let mut confirmation = client.get_confirmation_time();
|
||||
|
||||
// Need this to make sure the finality is updated
|
||||
// Need this to make sure the confirmation is updated
|
||||
// (i.e. the node is not returning stale value)
|
||||
while last_finality == finality {
|
||||
finality = client.get_finality();
|
||||
while last_confirmation == confirmation {
|
||||
confirmation = client.get_confirmation_time();
|
||||
}
|
||||
|
||||
while duration_as_ms(&now.elapsed()) < finality as u64 {
|
||||
while duration_as_ms(&now.elapsed()) < confirmation as u64 {
|
||||
sleep(Duration::from_millis(100));
|
||||
finality = client.get_finality()
|
||||
confirmation = client.get_confirmation_time()
|
||||
}
|
||||
|
||||
last_finality = finality;
|
||||
last_confirmation = confirmation;
|
||||
|
||||
let balance = retry_get_balance(&mut client, &bob_pubkey, Some(expected_balance));
|
||||
assert_eq!(balance, Some(expected_balance));
|
||||
consecutive_success += 1;
|
||||
|
||||
info!(
|
||||
"SUCCESS[{}] balance: {}, finality: {} ms",
|
||||
i, expected_balance, last_finality,
|
||||
"SUCCESS[{}] balance: {}, confirmation: {} ms",
|
||||
i, expected_balance, last_confirmation,
|
||||
);
|
||||
|
||||
if consecutive_success == 10 {
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-upload-perf"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
description = "Metrics Upload Utility"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -10,7 +10,7 @@ homepage = "https://solana.com/"
|
||||
|
||||
[dependencies]
|
||||
serde_json = "1.0.10"
|
||||
solana-metrics = { path = "../metrics", version = "0.11.0" }
|
||||
solana-metrics = { path = "../metrics", version = "0.11.1" }
|
||||
|
||||
[[bin]]
|
||||
name = "solana-upload-perf"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-vote-signer"
|
||||
version = "0.0.1"
|
||||
version = "0.11.1"
|
||||
description = "Solana Vote Signing Service"
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
@ -12,8 +12,8 @@ bs58 = "0.2.0"
|
||||
clap = "2.31"
|
||||
log = "0.4.2"
|
||||
serde_json = "1.0.10"
|
||||
solana-sdk = { path = "../sdk", version = "0.11.0" }
|
||||
solana-metrics = { path = "../metrics", version = "0.11.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.11.1" }
|
||||
solana-metrics = { path = "../metrics", version = "0.11.1" }
|
||||
solana-jsonrpc-core = "0.3.0"
|
||||
solana-jsonrpc-http-server = "0.3.0"
|
||||
solana-jsonrpc-macros = "0.3.0"
|
||||
|
@ -2,7 +2,8 @@
|
||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||
edition = "2018"
|
||||
name = "solana-wallet"
|
||||
version = "0.11.0"
|
||||
description = "Blockchain, Rebuilt for Scale"
|
||||
version = "0.11.1"
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
@ -14,10 +15,10 @@ clap = "2.32.0"
|
||||
chrono = { version = "0.4.0", features = ["serde"] }
|
||||
dirs = "1.0.2"
|
||||
serde_json = "1.0.10"
|
||||
solana = { path = "..", version = "0.11.0" }
|
||||
solana-drone = { path = "../drone", version = "0.11.0" }
|
||||
solana-logger = { path = "../logger", version = "0.11.0" }
|
||||
solana-sdk = { path = "../sdk", version = "0.11.0" }
|
||||
solana = { path = "..", version = "0.11.1" }
|
||||
solana-drone = { path = "../drone", version = "0.11.1" }
|
||||
solana-logger = { path = "../logger", version = "0.11.1" }
|
||||
solana-sdk = { path = "../sdk", version = "0.11.1" }
|
||||
|
||||
[features]
|
||||
cuda = []
|
||||
|
@ -602,7 +602,7 @@ pub fn process_command(config: &WalletConfig) -> Result<String, Box<dyn error::E
|
||||
}
|
||||
// Apply time elapsed to contract
|
||||
WalletCommand::TimeElapsed(to, pubkey, dt) => {
|
||||
let params = json!(format!("{}", config.id.pubkey()));
|
||||
let params = json!([format!("{}", config.id.pubkey())]);
|
||||
let balance = RpcRequest::GetBalance
|
||||
.make_rpc_request(&rpc_client, 1, Some(params))?
|
||||
.as_u64();
|
||||
|
Reference in New Issue
Block a user