Compare commits

..

72 Commits

Author SHA1 Message Date
Michael Vines
16e9b4207e Bump blockexplorer version to 1.32.0 2019-07-30 07:18:59 -07:00
mergify[bot]
b1b217f12c Fix poh recorder not flushing virtual ticks immediately (#5277) (#5281)
automerge
2019-07-25 12:21:56 -07:00
mergify[bot]
575f30c54f Remove usage of api.testnet.solana.com (#5274) (#5275)
(cherry picked from commit 3bd35dd7cc)
2019-07-24 21:37:58 -07:00
mergify[bot]
73d2c636f4 Post warning if window service isn't receiving any data (#5269) (#5271)
automerge
2019-07-24 13:31:27 -07:00
Michael Vines
4d4c4b9904 NDEBUG=1 2019-07-24 07:29:38 -07:00
Michael Vines
7adaf329cf Bump publish-crate.sh timeout 2019-07-23 22:12:58 -07:00
Dan Albert
ed83367141 Update cargo toml files to 0.16.7 (#5258) 2019-07-23 22:47:02 -06:00
Dan Albert
b5ca6e8e5a Update testnet docs to 0.16.6 release (#5257) 2019-07-23 21:29:43 -06:00
mergify[bot]
16f50729e9 Add logs to indicate when the leader changes (bp #5253) (#5256)
automerge
2019-07-23 20:19:33 -07:00
mergify[bot]
c119fdf711 Sort bench-tps keypairs (#5254) (#5255)
automerge
2019-07-23 19:04:08 -07:00
Michael Vines
b2a467fa7d Bump blockexplorer version to 1.27.0 2019-07-23 17:13:45 -07:00
Michael Vines
cb6f14004d Disable snapshot generation on cluster entrypoint 2019-07-23 14:04:44 -07:00
Michael Vines
952e28343e Add support to install a specific Solana version directly from the Github releases (#5249)
automerge
2019-07-23 13:26:39 -07:00
Michael Vines
cdfeee1854 Introduce --config-dir to avoid shipping clear-config.sh (#5241) 2019-07-22 23:08:07 -07:00
mergify[bot]
5eb5589bb3 validator.sh: Add --reset-ledger option (#5235) (#5240)
automerge
2019-07-22 23:04:41 -07:00
mergify[bot]
c1d78ddbb5 Call book/build.sh from docker (#5237) (#5238)
automerge
2019-07-22 22:22:06 -07:00
mergify[bot]
cf7c5cdb03 Add --no-deploy option to allow restarting nodes without a software update (#5182) (#5239)
automerge
2019-07-22 22:20:39 -07:00
mergify[bot]
8c23508cd5 Add manual publish for book and create book-beta (#5112) (#5236)
(cherry picked from commit 735c7c9841)
2019-07-22 18:14:42 -06:00
mergify[bot]
3ca91c316a Surface validator pubkey in metrics (#5227) (#5234)
(cherry picked from commit 3a69459645)
2019-07-22 17:05:58 -07:00
mergify[bot]
be3a025491 Do not attempt to create solana user multiple times (#5228) (#5233)
* Do not attempt to create solana user multiple times

(cherry picked from commit 21cef2fe21)
2019-07-22 16:32:25 -07:00
mergify[bot]
94c757013d Log the repairee pubkey when unable to serve them (#5222) (#5226)
automerge
2019-07-22 15:09:33 -07:00
Rob Walker
d6372a930c disable audit until crossbeam epoch release (#5208) 2019-07-22 09:43:03 -07:00
mergify[bot]
4746902074 add root to terminology (#5209) (#5217)
* add root to terminology

* review feedback

(cherry picked from commit 2d42c1e33e)
2019-07-22 09:39:55 -07:00
Michael Vines
c6b95a8f65 Request a uniform timezone 2019-07-22 09:25:15 -07:00
Michael Vines
fdfdf2eb39 Encourage setting an RPC port 2019-07-22 08:25:07 -07:00
Michael Vines
3448842c0c Add time units 2019-07-22 08:25:07 -07:00
Michael Vines
f5f1efe94a Update location of TdS external accounts file url 2019-07-21 17:37:58 -07:00
Michael Vines
50e0c806da Update incoming_webhook 2019-07-21 11:27:31 -07:00
Michael Vines
e613a0aa7e Update S3 key 2019-07-21 11:17:54 -07:00
Michael Vines
2c54cdd07e Ensure CI_OS_NAME is set for appveyor server 2019-07-21 09:26:10 -07:00
Michael Vines
cbb0ed7c56 Adjustments for appveyor server 2019-07-21 09:25:22 -07:00
Michael Vines
50aa099400 Show wallet commands for better log debugging 2019-07-19 20:20:38 -07:00
mergify[bot]
53c901471c Fix internal node lamport funding and staking allocation logic (#5192) (#5200)
automerge
2019-07-19 12:28:27 -07:00
mergify[bot]
4badf63cfd Update struct order arbitrarily to match rpc output (#5197) (#5199)
automerge
2019-07-19 11:23:47 -07:00
Michael Vines
d04fd3c3ab Fix up signal handling 2019-07-19 08:34:56 -07:00
Michael Vines
a8a9907ace Disable restart 2019-07-19 08:34:56 -07:00
Michael Vines
a7644630cc Document fetch-perf-libs.sh when building with CUDA 2019-07-19 08:34:56 -07:00
mergify[bot]
58666543e2 Add getEpochInfo() and getLeaderSchedule() RPC methods (#5189) (#5195)
automerge
2019-07-19 08:27:44 -07:00
mergify[bot]
a8a5d16278 Select stable rust version (#5180) (#5191)
automerge
2019-07-18 22:28:11 -07:00
mergify[bot]
01ebbe367a Ensure validator process is kill when stdout/stderr are redirected (#5179) (#5190)
automerge
2019-07-18 22:01:05 -07:00
mergify[bot]
2cada71151 fix book typos (#5185) (#5186)
automerge
2019-07-18 17:56:44 -07:00
mergify[bot]
d6ce97bcbd Fix misleading variable name (bp #5176) (#5183)
automerge
2019-07-18 16:58:53 -07:00
mergify[bot]
3ddc92ab86 Skip sleeping in replay stage if a bank was recently processed (bp #5161) (#5178)
automerge
2019-07-18 15:47:14 -07:00
mergify[bot]
5a99e86a60 Keybase: s/id/username (bp #5165) (#5173)
automerge
2019-07-18 12:00:26 -07:00
mergify[bot]
d9e1a8b492 net/: startnode/stopnode now works for blockstreamer/replicator nodes (#5146) (#5162)
automerge
2019-07-17 20:03:16 -07:00
mergify[bot]
4244a0f716 Add ability to prune ledger (bp #5128) (#5158)
automerge
2019-07-17 17:14:38 -07:00
Dan Albert
5f1d86c040 Bump cargo.toml files to 0.16.6 (#5155) 2019-07-17 14:29:33 -06:00
Dan Albert
f9d9c1fcbf Update book to SOLANA_RELEASE=v0.16.5 (#5154) 2019-07-17 14:20:49 -06:00
mergify[bot]
7c59c105cf Add weighted shuffle support for values upto u64::MAX (#5151) (#5152)
automerge

(cherry picked from commit 10d85f8366)
2019-07-17 13:12:05 -07:00
Tyera Eulberg
a8ea9f2738 Fix bench-tps funding math; make generate_keypairs() and fund_keys() algorithms consistent (#4841) (#5145)
* Fix funding math; make generate_keypairs and fund_keys consistent

* Add test, and fix inconsistencies it exposes

* De-pow math, and use assert_eq in tests for better failure msgs
2019-07-17 09:01:13 -07:00
Michael Vines
651f87a937 Show stake pubkey 2019-07-16 20:10:58 -07:00
mergify[bot]
88f8e2f332 Check harder on crates.io for recently published crates (#5136) (#5138)
automerge
2019-07-16 19:54:17 -07:00
mergify[bot]
a2cb289503 clear-config.sh now works with a secondary disk (#5135) (#5137)
automerge
2019-07-16 19:47:40 -07:00
Michael Vines
89bd9d5b72 Bump blockexplorer version 2019-07-16 19:44:42 -07:00
mergify[bot]
7edaaeb2a1 Improve validator-info CLI (#5121) (#5125)
automerge
2019-07-16 09:08:35 -07:00
Michael Vines
1c3ade80c2 Add missing dash 2019-07-16 07:28:26 -07:00
Dan Albert
3606d51507 Increment toml and cargo.ock to 0.16.5 (#5119) 2019-07-15 17:32:12 -06:00
Dan Albert
281fd88ea7 Update testnet doc to use latest release (#5118) 2019-07-15 17:11:42 -06:00
mergify[bot]
ee6b625c13 fix transaction_count (bp #5110) (#5111)
automerge
2019-07-15 14:46:11 -07:00
mergify[bot]
4cc1b85376 Boot remote native loads, take 2 (#5106) (#5109)
automerge
2019-07-15 12:54:24 -07:00
mergify[bot]
f8312ce125 Keybase pubkey file instructions and verification for validators (#5090) (#5102)
automerge
2019-07-14 23:25:50 -07:00
mergify[bot]
6a4cd02f64 Add node zone and count to ENV (#5100) (#5101)
automerge
2019-07-14 22:13:50 -07:00
mergify[bot]
50f238d900 Pull testnet vars up to buildkite env (#5098) (#5099)
automerge
2019-07-14 19:56:59 -07:00
mergify[bot]
23e3f4e8a2 Plumb --no-snapshot in from CI (#5077) (#5095)
* Plumb --no-snapshot in from CI

(cherry picked from commit 440d006ec1)
2019-07-14 13:22:28 -06:00
mergify[bot]
27f70dfa49 Correctly decode update manifest (#5086) (#5087)
automerge
2019-07-12 23:25:15 -07:00
Michael Vines
72d366a84e Stop trying to publish crates that are unpublishable 2019-07-12 21:53:33 -07:00
Michael Vines
2da9de8861 Avoid trying to republish crates already on crates.io 2019-07-12 21:36:07 -07:00
Michael Vines
f4288961d5 Add epoch voting history to show-vote-account (#5080) 2019-07-12 21:23:15 -07:00
Michael Vines
143ad436cf Give publish-crate more time 2019-07-12 20:28:23 -07:00
mergify[bot]
0a9fbc3e4c Facility to generate a blocktree prune list using ledger tool (#5041) (#5081)
automerge
2019-07-12 17:49:29 -07:00
Jack May
7aa091bf8c Add rewards to is_syscall_id() (#5035) 2019-07-12 16:10:28 -07:00
Dan Albert
91d8bfa828 Increment cargo tomls to 0.16.4 (#5078) 2019-07-12 16:30:55 -06:00
117 changed files with 2133 additions and 984 deletions

View File

@@ -16,7 +16,7 @@ build_script:
notifications:
- provider: Slack
incoming_webhook:
secure: 6HTXVh+FBz29LGJb+taFOo9dqoADfo9xyAszeyXZF5Ub9t5NERytKAR35B2wb+uIOOCBF8+JhmH4437Cgf/ti4IqvURzW1QReXK7eQhn1EI=
secure: 6HnLbeS6/Iv7JSMrrHQ7V9OSIjH/3KFzvZiinNWgQqEN0e9A6zaE4MwEXUYDWbcvVJiQneWit6dswY8Scoms2rS1PWEN5N6sjgLgyzroptc=
channel: ci-status
on_build_success: false
on_build_failure: true
@@ -25,9 +25,9 @@ notifications:
deploy:
- provider: S3
access_key_id:
secure: ptvqM/yvgeTeA12XOzybH1KYNh95AdfEvqoH9mvP2ic=
secure: G6uzyGqbkMCXS2+sCeBCT/+s/11AHLWXCuGayfKcMEE=
secret_access_key:
secure: IkrgBlz5hdxvwcJdMXyyHUrpWhKa6fXLOD/8rm/rjKqYCdrba9B8V1nLZVrzXGGy
secure: Lc+aVrbcPSXoDV7h2J7gqKT+HX0n3eEzp3JIrSP2pcKxbAikGnCtOogCiHO9/er2
bucket: release.solana.com
region: us-west-1
set_public: true

1
.gitignore vendored
View File

@@ -23,3 +23,4 @@ log-*.txt
# intellij files
/.idea/
/solana.iml
/.vscode/

462
Cargo.lock generated
View File

@@ -2044,6 +2044,14 @@ dependencies = [
"libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "semver"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "semver"
version = "0.9.0"
@@ -2168,7 +2176,7 @@ dependencies = [
[[package]]
name = "solana"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2200,27 +2208,27 @@ dependencies = [
"serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-budget-api 0.16.3",
"solana-budget-program 0.16.3",
"solana-chacha-sys 0.16.3",
"solana-client 0.16.3",
"solana-config-program 0.16.3",
"solana-drone 0.16.3",
"solana-budget-api 0.16.7",
"solana-budget-program 0.16.7",
"solana-chacha-sys 0.16.7",
"solana-client 0.16.7",
"solana-config-program 0.16.7",
"solana-drone 0.16.7",
"solana-ed25519-dalek 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-exchange-program 0.16.3",
"solana-kvstore 0.16.3",
"solana-logger 0.16.3",
"solana-metrics 0.16.3",
"solana-netutil 0.16.3",
"solana-runtime 0.16.3",
"solana-sdk 0.16.3",
"solana-stake-api 0.16.3",
"solana-stake-program 0.16.3",
"solana-storage-api 0.16.3",
"solana-storage-program 0.16.3",
"solana-vote-api 0.16.3",
"solana-vote-program 0.16.3",
"solana-vote-signer 0.16.3",
"solana-exchange-program 0.16.7",
"solana-kvstore 0.16.7",
"solana-logger 0.16.7",
"solana-metrics 0.16.7",
"solana-netutil 0.16.7",
"solana-runtime 0.16.7",
"solana-sdk 0.16.7",
"solana-stake-api 0.16.7",
"solana-stake-program 0.16.7",
"solana-storage-api 0.16.7",
"solana-storage-program 0.16.7",
"solana-vote-api 0.16.7",
"solana-vote-program 0.16.7",
"solana-vote-signer 0.16.7",
"sys-info 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2229,7 +2237,7 @@ dependencies = [
[[package]]
name = "solana-bench-exchange"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2245,33 +2253,33 @@ dependencies = [
"serde_derive 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_yaml 0.8.9 (registry+https://github.com/rust-lang/crates.io-index)",
"solana 0.16.3",
"solana-client 0.16.3",
"solana-drone 0.16.3",
"solana-exchange-api 0.16.3",
"solana-exchange-program 0.16.3",
"solana-logger 0.16.3",
"solana-metrics 0.16.3",
"solana-netutil 0.16.3",
"solana-runtime 0.16.3",
"solana-sdk 0.16.3",
"solana 0.16.7",
"solana-client 0.16.7",
"solana-drone 0.16.7",
"solana-exchange-api 0.16.7",
"solana-exchange-program 0.16.7",
"solana-logger 0.16.7",
"solana-metrics 0.16.7",
"solana-netutil 0.16.7",
"solana-runtime 0.16.7",
"solana-sdk 0.16.7",
"untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"ws 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "solana-bench-streamer"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
"solana 0.16.3",
"solana-logger 0.16.3",
"solana-netutil 0.16.3",
"solana 0.16.7",
"solana-logger 0.16.7",
"solana-netutil 0.16.7",
]
[[package]]
name = "solana-bench-tps"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2280,58 +2288,58 @@ dependencies = [
"serde_derive 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_yaml 0.8.9 (registry+https://github.com/rust-lang/crates.io-index)",
"solana 0.16.3",
"solana-client 0.16.3",
"solana-drone 0.16.3",
"solana-logger 0.16.3",
"solana-metrics 0.16.3",
"solana-netutil 0.16.3",
"solana-runtime 0.16.3",
"solana-sdk 0.16.3",
"solana 0.16.7",
"solana-client 0.16.7",
"solana-drone 0.16.7",
"solana-logger 0.16.7",
"solana-metrics 0.16.7",
"solana-netutil 0.16.7",
"solana-runtime 0.16.7",
"solana-sdk 0.16.7",
]
[[package]]
name = "solana-bpf-loader-api"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-logger 0.16.3",
"solana-sdk 0.16.3",
"solana-logger 0.16.7",
"solana-sdk 0.16.7",
"solana_rbpf 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "solana-bpf-loader-program"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-bpf-loader-api 0.16.3",
"solana-logger 0.16.3",
"solana-sdk 0.16.3",
"solana-bpf-loader-api 0.16.7",
"solana-logger 0.16.7",
"solana-sdk 0.16.7",
]
[[package]]
name = "solana-bpf-programs"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"elf 0.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-bpf-loader-api 0.16.3",
"solana-logger 0.16.3",
"solana-runtime 0.16.3",
"solana-sdk 0.16.3",
"solana-bpf-loader-api 0.16.7",
"solana-logger 0.16.7",
"solana-runtime 0.16.7",
"solana-sdk 0.16.7",
"solana_rbpf 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
"walkdir 2.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "solana-budget-api"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2340,30 +2348,30 @@ dependencies = [
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-runtime 0.16.3",
"solana-sdk 0.16.3",
"solana-runtime 0.16.7",
"solana-sdk 0.16.7",
]
[[package]]
name = "solana-budget-program"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-budget-api 0.16.3",
"solana-logger 0.16.3",
"solana-sdk 0.16.3",
"solana-budget-api 0.16.7",
"solana-logger 0.16.7",
"solana-sdk 0.16.7",
]
[[package]]
name = "solana-chacha-sys"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "solana-client"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2376,37 +2384,37 @@ dependencies = [
"serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-logger 0.16.3",
"solana-netutil 0.16.3",
"solana-sdk 0.16.3",
"solana-logger 0.16.7",
"solana-netutil 0.16.7",
"solana-sdk 0.16.7",
]
[[package]]
name = "solana-config-api"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-logger 0.16.3",
"solana-runtime 0.16.3",
"solana-sdk 0.16.3",
"solana-logger 0.16.7",
"solana-runtime 0.16.7",
"solana-sdk 0.16.7",
]
[[package]]
name = "solana-config-program"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-config-api 0.16.3",
"solana-logger 0.16.3",
"solana-sdk 0.16.3",
"solana-config-api 0.16.7",
"solana-logger 0.16.7",
"solana-sdk 0.16.7",
]
[[package]]
name = "solana-drone"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2415,9 +2423,9 @@ dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-logger 0.16.3",
"solana-metrics 0.16.3",
"solana-sdk 0.16.3",
"solana-logger 0.16.7",
"solana-metrics 0.16.7",
"solana-sdk 0.16.7",
"tokio 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2436,40 +2444,40 @@ dependencies = [
[[package]]
name = "solana-exchange-api"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-logger 0.16.3",
"solana-metrics 0.16.3",
"solana-runtime 0.16.3",
"solana-sdk 0.16.3",
"solana-logger 0.16.7",
"solana-metrics 0.16.7",
"solana-runtime 0.16.7",
"solana-sdk 0.16.7",
]
[[package]]
name = "solana-exchange-program"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-exchange-api 0.16.3",
"solana-logger 0.16.3",
"solana-sdk 0.16.3",
"solana-exchange-api 0.16.7",
"solana-logger 0.16.7",
"solana-sdk 0.16.7",
]
[[package]]
name = "solana-failure-program"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-runtime 0.16.3",
"solana-sdk 0.16.3",
"solana-runtime 0.16.7",
"solana-sdk 0.16.7",
]
[[package]]
name = "solana-genesis"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2478,41 +2486,41 @@ dependencies = [
"serde_derive 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_yaml 0.8.9 (registry+https://github.com/rust-lang/crates.io-index)",
"solana 0.16.3",
"solana-bpf-loader-api 0.16.3",
"solana-bpf-loader-program 0.16.3",
"solana-budget-api 0.16.3",
"solana-budget-program 0.16.3",
"solana-config-api 0.16.3",
"solana-config-program 0.16.3",
"solana-exchange-api 0.16.3",
"solana-exchange-program 0.16.3",
"solana-sdk 0.16.3",
"solana-stake-api 0.16.3",
"solana-stake-program 0.16.3",
"solana-storage-api 0.16.3",
"solana-storage-program 0.16.3",
"solana-token-api 0.16.3",
"solana-token-program 0.16.3",
"solana-vote-api 0.16.3",
"solana-vote-program 0.16.3",
"solana 0.16.7",
"solana-bpf-loader-api 0.16.7",
"solana-bpf-loader-program 0.16.7",
"solana-budget-api 0.16.7",
"solana-budget-program 0.16.7",
"solana-config-api 0.16.7",
"solana-config-program 0.16.7",
"solana-exchange-api 0.16.7",
"solana-exchange-program 0.16.7",
"solana-sdk 0.16.7",
"solana-stake-api 0.16.7",
"solana-stake-program 0.16.7",
"solana-storage-api 0.16.7",
"solana-storage-program 0.16.7",
"solana-token-api 0.16.7",
"solana-token-program 0.16.7",
"solana-vote-api 0.16.7",
"solana-vote-program 0.16.7",
]
[[package]]
name = "solana-gossip"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"solana 0.16.3",
"solana-client 0.16.3",
"solana-netutil 0.16.3",
"solana-sdk 0.16.3",
"solana 0.16.7",
"solana-client 0.16.7",
"solana-netutil 0.16.7",
"solana-sdk 0.16.7",
]
[[package]]
name = "solana-install"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2529,13 +2537,14 @@ dependencies = [
"nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)",
"reqwest 0.9.18 (registry+https://github.com/rust-lang/crates.io-index)",
"ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)",
"semver 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_yaml 0.8.9 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-client 0.16.3",
"solana-config-api 0.16.3",
"solana-logger 0.16.3",
"solana-sdk 0.16.3",
"solana-client 0.16.7",
"solana-config-api 0.16.7",
"solana-logger 0.16.7",
"solana-sdk 0.16.7",
"tar 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
"tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2545,16 +2554,16 @@ dependencies = [
[[package]]
name = "solana-keygen"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
"dirs 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-sdk 0.16.3",
"solana-sdk 0.16.7",
]
[[package]]
name = "solana-kvstore"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2569,35 +2578,39 @@ dependencies = [
[[package]]
name = "solana-ledger-tool"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"assert_cmd 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)",
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
"solana 0.16.3",
"solana-logger 0.16.3",
"solana-runtime 0.16.3",
"solana-sdk 0.16.3",
"serde_yaml 0.8.9 (registry+https://github.com/rust-lang/crates.io-index)",
"solana 0.16.7",
"solana-logger 0.16.7",
"solana-runtime 0.16.7",
"solana-sdk 0.16.7",
]
[[package]]
name = "solana-logger"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "solana-merkle-tree"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-sdk 0.16.3",
"solana-sdk 0.16.7",
]
[[package]]
name = "solana-metrics"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"influx_db_client 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2605,13 +2618,13 @@ dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"reqwest 0.9.18 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-sdk 0.16.3",
"solana-sdk 0.16.7",
"sys-info 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "solana-netutil"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2619,33 +2632,33 @@ dependencies = [
"nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"socket2 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-logger 0.16.3",
"solana-logger 0.16.7",
"tokio 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "solana-noop-program"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-logger 0.16.3",
"solana-sdk 0.16.3",
"solana-logger 0.16.7",
"solana-sdk 0.16.7",
]
[[package]]
name = "solana-replicator"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
"solana 0.16.3",
"solana-logger 0.16.3",
"solana-netutil 0.16.3",
"solana-sdk 0.16.3",
"solana 0.16.7",
"solana-logger 0.16.7",
"solana-netutil 0.16.7",
"solana-sdk 0.16.7",
]
[[package]]
name = "solana-runtime"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"bv 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2663,23 +2676,23 @@ dependencies = [
"serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-bpf-loader-api 0.16.3",
"solana-bpf-loader-program 0.16.3",
"solana-logger 0.16.3",
"solana-metrics 0.16.3",
"solana-noop-program 0.16.3",
"solana-sdk 0.16.3",
"solana-stake-api 0.16.3",
"solana-stake-program 0.16.3",
"solana-storage-api 0.16.3",
"solana-vote-api 0.16.3",
"solana-vote-program 0.16.3",
"solana-bpf-loader-api 0.16.7",
"solana-bpf-loader-program 0.16.7",
"solana-logger 0.16.7",
"solana-metrics 0.16.7",
"solana-noop-program 0.16.7",
"solana-sdk 0.16.7",
"solana-stake-api 0.16.7",
"solana-stake-program 0.16.7",
"solana-storage-api 0.16.7",
"solana-vote-api 0.16.7",
"solana-vote-program 0.16.7",
"sys-info 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "solana-sdk"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2700,38 +2713,38 @@ dependencies = [
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
"sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-ed25519-dalek 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-logger 0.16.3",
"solana-logger 0.16.7",
"untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "solana-stake-api"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-logger 0.16.3",
"solana-metrics 0.16.3",
"solana-sdk 0.16.3",
"solana-vote-api 0.16.3",
"solana-logger 0.16.7",
"solana-metrics 0.16.7",
"solana-sdk 0.16.7",
"solana-vote-api 0.16.7",
]
[[package]]
name = "solana-stake-program"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-logger 0.16.3",
"solana-sdk 0.16.3",
"solana-stake-api 0.16.3",
"solana-logger 0.16.7",
"solana-sdk 0.16.7",
"solana-stake-api 0.16.7",
]
[[package]]
name = "solana-storage-api"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2741,26 +2754,26 @@ dependencies = [
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-logger 0.16.3",
"solana-sdk 0.16.3",
"solana-logger 0.16.7",
"solana-sdk 0.16.7",
]
[[package]]
name = "solana-storage-program"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-logger 0.16.3",
"solana-runtime 0.16.3",
"solana-sdk 0.16.3",
"solana-storage-api 0.16.3",
"solana-logger 0.16.7",
"solana-runtime 0.16.7",
"solana-sdk 0.16.7",
"solana-storage-api 0.16.7",
]
[[package]]
name = "solana-token-api"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2768,89 +2781,90 @@ dependencies = [
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-logger 0.16.3",
"solana-sdk 0.16.3",
"solana-logger 0.16.7",
"solana-sdk 0.16.7",
]
[[package]]
name = "solana-token-program"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-logger 0.16.3",
"solana-sdk 0.16.3",
"solana-token-api 0.16.3",
"solana-logger 0.16.7",
"solana-sdk 0.16.7",
"solana-token-api 0.16.7",
]
[[package]]
name = "solana-upload-perf"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-metrics 0.16.3",
"solana-metrics 0.16.7",
]
[[package]]
name = "solana-validator"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
"solana 0.16.3",
"solana-drone 0.16.3",
"solana-logger 0.16.3",
"solana-metrics 0.16.3",
"solana-netutil 0.16.3",
"solana-runtime 0.16.3",
"solana-sdk 0.16.3",
"solana-vote-api 0.16.3",
"solana-vote-signer 0.16.3",
"solana 0.16.7",
"solana-drone 0.16.7",
"solana-logger 0.16.7",
"solana-metrics 0.16.7",
"solana-netutil 0.16.7",
"solana-runtime 0.16.7",
"solana-sdk 0.16.7",
"solana-vote-api 0.16.7",
"solana-vote-signer 0.16.7",
]
[[package]]
name = "solana-validator-info"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
"dirs 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"reqwest 0.9.18 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-client 0.16.3",
"solana-config-api 0.16.3",
"solana-sdk 0.16.3",
"solana-client 0.16.7",
"solana-config-api 0.16.7",
"solana-sdk 0.16.7",
"url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "solana-vote-api"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-logger 0.16.3",
"solana-metrics 0.16.3",
"solana-sdk 0.16.3",
"solana-logger 0.16.7",
"solana-metrics 0.16.7",
"solana-sdk 0.16.7",
]
[[package]]
name = "solana-vote-program"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-logger 0.16.3",
"solana-sdk 0.16.3",
"solana-vote-api 0.16.3",
"solana-logger 0.16.7",
"solana-sdk 0.16.7",
"solana-vote-api 0.16.7",
]
[[package]]
name = "solana-vote-signer"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2860,13 +2874,13 @@ dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-metrics 0.16.3",
"solana-sdk 0.16.3",
"solana-metrics 0.16.7",
"solana-sdk 0.16.7",
]
[[package]]
name = "solana-wallet"
version = "0.16.3"
version = "0.16.7"
dependencies = [
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"bs58 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2876,18 +2890,19 @@ dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
"solana 0.16.3",
"solana-budget-api 0.16.3",
"solana-budget-program 0.16.3",
"solana-client 0.16.3",
"solana-drone 0.16.3",
"solana-logger 0.16.3",
"solana-netutil 0.16.3",
"solana-sdk 0.16.3",
"solana-stake-api 0.16.3",
"solana-storage-api 0.16.3",
"solana-vote-api 0.16.3",
"solana-vote-signer 0.16.3",
"solana 0.16.7",
"solana-budget-api 0.16.7",
"solana-budget-program 0.16.7",
"solana-client 0.16.7",
"solana-drone 0.16.7",
"solana-logger 0.16.7",
"solana-netutil 0.16.7",
"solana-runtime 0.16.7",
"solana-sdk 0.16.7",
"solana-stake-api 0.16.7",
"solana-storage-api 0.16.7",
"solana-vote-api 0.16.7",
"solana-vote-signer 0.16.7",
"url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -3734,6 +3749,7 @@ dependencies = [
"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d"
"checksum security-framework 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfab8dda0e7a327c696d893df9ffa19cadc4bd195797997f5223cf5831beaf05"
"checksum security-framework-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3d6696852716b589dff9e886ff83778bb635150168e83afa8ac6b8a78cb82abc"
"checksum semver 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3fdd61b85a0fa777f7fb7c454b9189b2941b110d1385ce84d7f76efdf1606a85"
"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
"checksum serde 1.0.94 (registry+https://github.com/rust-lang/crates.io-index)" = "076a696fdea89c19d3baed462576b8f6d663064414b5c793642da8dfeb99475b"

View File

@@ -127,12 +127,9 @@ Remote Testnets
We maintain several testnets:
* `testnet` - public stable testnet accessible via testnet.solana.com, with an https proxy for web apps at api.testnet.solana.com. Runs 24/7
* `testnet` - public stable testnet accessible via testnet.solana.com. Runs 24/7
* `testnet-beta` - public beta channel testnet accessible via beta.testnet.solana.com. Runs 24/7
* `testnet-edge` - public edge channel testnet accessible via edge.testnet.solana.com. Runs 24/7
* `testnet-perf` - permissioned stable testnet running a 24/7 soak test
* `testnet-beta-perf` - permissioned beta channel testnet running a multi-hour soak test weekday mornings
* `testnet-edge-perf` - permissioned edge channel testnet running a multi-hour soak test weekday mornings
## Deploy process

View File

@@ -61,7 +61,7 @@ There are three release channels that map to branches as follows:
## Release Steps
### Advance the Channels
### Creating a new branch from master
#### Create the new branch
1. Pick your branch point for release on master.
@@ -84,6 +84,12 @@ There are three release channels that map to branches as follows:
At this point, `ci/channel-info.sh` should show your freshly cut release branch as
"BETA_CHANNEL" and the previous release branch as "STABLE_CHANNEL".
### Update documentation
Document the new recommended version by updating
```export SOLANA_RELEASE=[new scheduled TESTNET_TAG value]```
in book/src/testnet-participation.md on the release (beta) branch.
### Make the Release
We use [github's Releases UI](https://github.com/solana-labs/solana/releases) for tagging a release.
@@ -106,6 +112,25 @@ We use [github's Releases UI](https://github.com/solana-labs/solana/releases) fo
1. Push your Cargo.toml change and the autogenerated Cargo.lock changes to the
release branch.
### Publish updated Book
We maintain three copies of the "book" as official documentation:
1) "Book" is the documentation for the latest official release. This should get manually updated whenever a new release is made. It is published here:
https://solana-labs.github.io/book/
2) "Book-edge" tracks the tip of the master branch and updates automatically.
https://solana-labs.github.io/book-edge/
3) "Book-beta" tracks the tip of the beta branch and updates automatically.
https://solana-labs.github.io/book-beta/
To manually trigger an update of the "Book", create a new job of the manual-update-book pipeline.
Set the tag of the latest release as the PUBLISH_BOOK_TAG environment variable.
```bash
PUBLISH_BOOK_TAG=v0.16.6
```
https://buildkite.com/solana-labs/manual-update-book
### Update software on testnet.solana.com
The testnet running on testnet.solana.com is set to use a fixed release tag
@@ -145,12 +170,6 @@ TESTNET_TAG=[same value as used in TESTNET_TAG in the schedules]
TESTNET_OP=create-and-start
```
#### Update documentation
Document the new recommended version by updating
```export SOLANA_RELEASE=[new scheduled TESTNET_TAG value]```
in book/src/testnet-participation.md for both edge and beta channel branches.
### Alert the community
Notify Discord users on #validator-support that a new release for

View File

@@ -2,7 +2,7 @@
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-bench-exchange"
version = "0.16.3"
version = "0.16.7"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -24,16 +24,16 @@ serde_derive = "1.0.92"
serde_json = "1.0.39"
serde_yaml = "0.8.9"
# solana-runtime = { path = "../solana/runtime"}
solana = { path = "../core", version = "0.16.3" }
solana-client = { path = "../client", version = "0.16.3" }
solana-drone = { path = "../drone", version = "0.16.3" }
solana-exchange-api = { path = "../programs/exchange_api", version = "0.16.3" }
solana-exchange-program = { path = "../programs/exchange_program", version = "0.16.3" }
solana-logger = { path = "../logger", version = "0.16.3" }
solana-metrics = { path = "../metrics", version = "0.16.3" }
solana-netutil = { path = "../netutil", version = "0.16.3" }
solana-runtime = { path = "../runtime", version = "0.16.3" }
solana-sdk = { path = "../sdk", version = "0.16.3" }
solana = { path = "../core", version = "0.16.7" }
solana-client = { path = "../client", version = "0.16.7" }
solana-drone = { path = "../drone", version = "0.16.7" }
solana-exchange-api = { path = "../programs/exchange_api", version = "0.16.7" }
solana-exchange-program = { path = "../programs/exchange_program", version = "0.16.7" }
solana-logger = { path = "../logger", version = "0.16.7" }
solana-metrics = { path = "../metrics", version = "0.16.7" }
solana-netutil = { path = "../netutil", version = "0.16.7" }
solana-runtime = { path = "../runtime", version = "0.16.7" }
solana-sdk = { path = "../sdk", version = "0.16.7" }
untrusted = "0.6.2"
ws = "0.8.1"

View File

@@ -2,16 +2,16 @@
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-bench-streamer"
version = "0.16.3"
version = "0.16.7"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
[dependencies]
clap = "2.33.0"
solana = { path = "../core", version = "0.16.3" }
solana-logger = { path = "../logger", version = "0.16.3" }
solana-netutil = { path = "../netutil", version = "0.16.3" }
solana = { path = "../core", version = "0.16.7" }
solana-logger = { path = "../logger", version = "0.16.7" }
solana-netutil = { path = "../netutil", version = "0.16.7" }
[features]
cuda = ["solana/cuda"]

View File

@@ -2,7 +2,7 @@
authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-bench-tps"
version = "0.16.3"
version = "0.16.7"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -15,14 +15,14 @@ serde = "1.0.92"
serde_derive = "1.0.92"
serde_json = "1.0.39"
serde_yaml = "0.8.9"
solana = { path = "../core", version = "0.16.3" }
solana-client = { path = "../client", version = "0.16.3" }
solana-drone = { path = "../drone", version = "0.16.3" }
solana-logger = { path = "../logger", version = "0.16.3" }
solana-metrics = { path = "../metrics", version = "0.16.3" }
solana-netutil = { path = "../netutil", version = "0.16.3" }
solana-runtime = { path = "../runtime", version = "0.16.3" }
solana-sdk = { path = "../sdk", version = "0.16.3" }
solana = { path = "../core", version = "0.16.7" }
solana-client = { path = "../client", version = "0.16.7" }
solana-drone = { path = "../drone", version = "0.16.7" }
solana-logger = { path = "../logger", version = "0.16.7" }
solana-metrics = { path = "../metrics", version = "0.16.7" }
solana-netutil = { path = "../netutil", version = "0.16.7" }
solana-runtime = { path = "../runtime", version = "0.16.7" }
solana-sdk = { path = "../sdk", version = "0.16.7" }
[features]
cuda = ["solana/cuda"]

View File

@@ -346,10 +346,12 @@ pub fn fund_keys<T: Client>(
source: &Keypair,
dests: &[Keypair],
total: u64,
lamports_per_signature: u64,
max_fee: u64,
mut extra: u64,
) {
let mut funded: Vec<(&Keypair, u64)> = vec![(source, total)];
let mut notfunded: Vec<&Keypair> = dests.iter().collect();
let lamports_per_account = (total - (extra * max_fee)) / (notfunded.len() as u64 + 1);
println!("funding keys {}", dests.len());
while !notfunded.is_empty() {
@@ -362,7 +364,8 @@ pub fn fund_keys<T: Client>(
break;
}
let start = notfunded.len() - max_units as usize;
let per_unit = (f.1 - max_units * lamports_per_signature) / max_units;
let fees = if extra > 0 { max_fee } else { 0 };
let per_unit = (f.1 - lamports_per_account - fees) / max_units;
let moves: Vec<_> = notfunded[start..]
.iter()
.map(|k| (k.pubkey(), per_unit))
@@ -374,6 +377,7 @@ pub fn fund_keys<T: Client>(
if !moves.is_empty() {
to_fund.push((f.0, moves));
}
extra -= 1;
}
// try to transfer a "few" at a time with recent blockhash
@@ -582,16 +586,20 @@ fn should_switch_directions(num_lamports_per_account: u64, i: u64) -> bool {
i % (num_lamports_per_account / 4) == 0 && (i >= (3 * num_lamports_per_account) / 4)
}
pub fn generate_keypairs(seed_keypair: &Keypair, count: u64) -> Vec<Keypair> {
pub fn generate_keypairs(seed_keypair: &Keypair, count: u64) -> (Vec<Keypair>, u64) {
let mut seed = [0u8; 32];
seed.copy_from_slice(&seed_keypair.to_bytes()[..32]);
let mut rnd = GenKeys::new(seed);
let mut total_keys = 1;
let mut total_keys = 0;
let mut extra = 0; // This variable tracks the number of keypairs needing extra transaction fees funded
let mut delta = 1;
while total_keys < count {
total_keys *= MAX_SPENDS_PER_TX;
extra += delta;
delta *= MAX_SPENDS_PER_TX;
total_keys += delta;
}
rnd.gen_n_keypairs(total_keys)
(rnd.gen_n_keypairs(total_keys), extra)
}
pub fn generate_and_fund_keypairs<T: Client>(
@@ -602,8 +610,7 @@ pub fn generate_and_fund_keypairs<T: Client>(
lamports_per_account: u64,
) -> Result<(Vec<Keypair>, u64)> {
info!("Creating {} keypairs...", tx_count * 2);
let mut keypairs = generate_keypairs(funding_pubkey, tx_count as u64 * 2);
let (mut keypairs, extra) = generate_keypairs(funding_pubkey, tx_count as u64 * 2);
info!("Get lamports...");
// Sample the first keypair, see if it has lamports, if so then resume.
@@ -614,19 +621,21 @@ pub fn generate_and_fund_keypairs<T: Client>(
if lamports_per_account > last_keypair_balance {
let (_, fee_calculator) = client.get_recent_blockhash().unwrap();
let extra =
let account_desired_balance =
lamports_per_account - last_keypair_balance + fee_calculator.max_lamports_per_signature;
let total = extra * (keypairs.len() as u64);
let extra_fees = extra * fee_calculator.max_lamports_per_signature;
let total = account_desired_balance * (1 + keypairs.len() as u64) + extra_fees;
if client.get_balance(&funding_pubkey.pubkey()).unwrap_or(0) < total {
airdrop_lamports(client, &drone_addr.unwrap(), funding_pubkey, total)?;
}
info!("adding more lamports {}", extra);
info!("adding more lamports {}", account_desired_balance);
fund_keys(
client,
funding_pubkey,
&keypairs,
total,
fee_calculator.max_lamports_per_signature,
extra,
);
}
@@ -647,6 +656,7 @@ mod tests {
use solana_runtime::bank::Bank;
use solana_runtime::bank_client::BankClient;
use solana_sdk::client::SyncClient;
use solana_sdk::fee_calculator::FeeCalculator;
use solana_sdk::genesis_block::create_genesis_block;
use std::sync::mpsc::channel;
@@ -735,7 +745,33 @@ mod tests {
generate_and_fund_keypairs(&client, None, &id, tx_count, lamports).unwrap();
for kp in &keypairs {
assert!(client.get_balance(&kp.pubkey()).unwrap() >= lamports);
assert_eq!(client.get_balance(&kp.pubkey()).unwrap(), lamports);
}
}
#[test]
fn test_bench_tps_fund_keys_with_fees() {
let (mut genesis_block, id) = create_genesis_block(10_000);
let fee_calculator = FeeCalculator::new(11);
genesis_block.fee_calculator = fee_calculator;
let bank = Bank::new(&genesis_block);
let client = BankClient::new(bank);
let tx_count = 10;
let lamports = 20;
let (keypairs, _keypair_balance) =
generate_and_fund_keypairs(&client, None, &id, tx_count, lamports).unwrap();
let max_fee = client
.get_recent_blockhash()
.unwrap()
.1
.max_lamports_per_signature;
for kp in &keypairs {
assert_eq!(
client.get_balance(&kp.pubkey()).unwrap(),
lamports + max_fee
);
}
}
}

View File

@@ -6,7 +6,7 @@ use crate::bench::{
};
use solana::gossip_service::{discover_cluster, get_multi_client};
use solana_sdk::fee_calculator::FeeCalculator;
use solana_sdk::signature::Keypair;
use solana_sdk::signature::{Keypair, KeypairUtil};
use std::collections::HashMap;
use std::fs::File;
use std::io::prelude::*;
@@ -40,7 +40,7 @@ fn main() {
} = cli_config;
if write_to_client_file {
let keypairs = generate_keypairs(&id, tx_count as u64 * 2);
let (keypairs, _) = generate_keypairs(&id, tx_count as u64 * 2);
let num_accounts = keypairs.len() as u64;
let max_fee = FeeCalculator::new(target_lamports_per_signature).max_lamports_per_signature;
let num_lamports_per_account = (num_accounts - 1 + NUM_SIGNATURES_FOR_TXS * max_fee)
@@ -91,6 +91,10 @@ fn main() {
keypairs.push(Keypair::from_bytes(&bytes).unwrap());
last_balance = balance;
});
// Sort keypairs so that do_bench_tps() uses the same subset of accounts for each run.
// This prevents the amount of storage needed for bench-tps accounts from creeping up
// across multiple runs.
keypairs.sort_by(|x, y| x.pubkey().to_string().cmp(&y.pubkey().to_string()));
(keypairs, last_balance)
} else {
generate_and_fund_keypairs(

View File

@@ -22,7 +22,7 @@ gossip endpoint (a socket address).
Records shared over gossip are arbitrary, but signed and versioned (with a
timestamp) as needed to make sense to the node receiving them. If a node
recieves two records from the same source, it it updates its own copy with the
receives two records from the same source, it updates its own copy with the
record with the most recent timestamp.
## Gossip Service Interface

View File

@@ -153,7 +153,7 @@ FLAGS:
OPTIONS:
-d, --data_dir <PATH> Directory to store install data [default: /Users/mvines/Library/Application Support/solana]
-u, --url <URL> JSON RPC URL for the solana cluster [default: https://api.testnet.solana.com/]
-u, --url <URL> JSON RPC URL for the solana cluster [default: http://testnet.solana.com:8899]
-p, --pubkey <PUBKEY> Public key of the update manifest [default: 9XX329sPuskWhH4DQh6k16c87dHKhXLBZTL3Gxmve8Gp]
```

View File

@@ -25,6 +25,8 @@ Methods
* [getAccountInfo](#getaccountinfo)
* [getBalance](#getbalance)
* [getClusterNodes](#getclusternodes)
* [getEpochInfo](#getepochinfo)
* [getLeaderSchedule](#getleaderschedule)
* [getProgramAccounts](#getprogramaccounts)
* [getRecentBlockhash](#getrecentblockhash)
* [getSignatureStatus](#getsignaturestatus)
@@ -169,6 +171,50 @@ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "
---
### getEpochInfo
Returns information about the current epoch
##### Parameters:
None
##### Results:
The result field will be an object with the following fields:
* `epoch`, the current epoch
* `slotIndex`, the current slot relative to the start of the current epoch
* `slotsInEpoch`, the number of slots in this epoch
##### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getEpochInfo"}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":{"epoch":3,"slotIndex":126,"slotsInEpoch":256},"id":1}
```
---
### getLeaderSchedule
Returns the leader schedule for the current epoch
##### Parameters:
None
##### Results:
The result field will be an array of leader public keys (as base-58 encoded
strings) for each slot in the current epoch
##### Example:
```bash
// Request
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getLeaderSchedule"}' http://localhost:8899
// Result
{"jsonrpc":"2.0","result":[...],"id":1}
```
---
### getProgramAccounts
Returns all accounts owned by the provided program Pubkey

View File

@@ -11,7 +11,7 @@ of getting its stake slashed. The economics are covered in [staking
rewards](staking-rewards.md). This chapter, on the other hand, describes the
underlying mechanics of its implementation.
## Basic Besign
## Basic Design
The general idea is that the validator owns a Vote account. The Vote account
tracks validator votes, counts validator generated credits, and provides any
@@ -114,7 +114,13 @@ tokens stored as `Account::lamports`.
The stakes and the MiningPool are accounts that are owned by the same `Stake`
program.
<<<<<<< HEAD
### StakeInstruction::Initialize
=======
The Stake account is moved from Uninitialized to StakeState::Stake form. This is
how stakers choose their initial delegate validator node and activate their
stake account lamports.
>>>>>>> 25080f1a3... fix book typos (#5185)
* `account[0]` - RW - The StakeState::Delegate instance.
`StakeState::Delegate::credits_observed` is initialized to `VoteState::credits`.

View File

@@ -91,6 +91,10 @@ History](#proof-of-history).
The time, i.e. number of [slots](#slot), for which a [leader
schedule](#leader-schedule) is valid.
#### finality
When nodes representing 2/3rd of the stake have a common [root](#root).
#### fork
A [ledger](#ledger) derived from common entries but then diverged.
@@ -213,6 +217,15 @@ The public key of a [keypair](#keypair).
Storage mining client, stores some part of the ledger enumerated in blocks and
submits storage proofs to the chain. Not a full-node.
#### root
A [block](#block) or [slot](#slot) that has reached maximum [lockout](#lockout)
on a validator. The root is the highest block that is an ancestor of all active
forks on a validator. All ancestor blocks of a root are also transitively a
root. Blocks that are not an ancestor and not a descendant of the root are
excluded from consideration for consensus and can be discarded.
#### runtime
The component of a [fullnode](#fullnode) responsible for [program](#program)

View File

@@ -74,8 +74,7 @@ The `solana-install` tool can be used to easily install and upgrade the cluster
software on Linux x86_64 and mac OS systems.
```bash
$ export SOLANA_RELEASE=v0.16.0 # skip this line to install the latest release
$ curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.16.0/install/solana-install-init.sh | sh -s
$ curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.16.6/install/solana-install-init.sh | sh -s
```
Alternatively build the `solana-install` program from source and run the
@@ -122,8 +121,11 @@ $ ./scripts/cargo-install-all.sh .
$ export PATH=$PWD/bin:$PATH
```
If building for CUDA, include the `cuda` feature flag as well:
If building for CUDA (Linux only), fetch the perf-libs first then include the
`cuda` feature flag when building:
```bash
$ ./fetch-perf-libs.sh
$ source /home/mvines/ws/solana/target/perf-libs/env.sh
$ ./scripts/cargo-install-all.sh . cuda
$ export PATH=$PWD/bin:$PATH
```
@@ -152,21 +154,18 @@ choice, to start the node:
If this is a `solana-install`-installation:
```bash
$ clear-config.sh
$ validator.sh --identity ~/validator-keypair.json --poll-for-new-genesis-block testnet.solana.com
$ validator.sh --identity ~/validator-keypair.json --config-dir ~/validator-config --rpc-port 8899 --poll-for-new-genesis-block testnet.solana.com
```
Alternatively, the `solana-install run` command can be used to run the validator
node while periodically checking for and applying software updates:
```bash
$ clear-config.sh
$ solana-install run validator.sh -- --identity ~/validator-keypair.json --poll-for-new-genesis-block testnet.solana.com
$ solana-install run validator.sh -- --identity ~/validator-keypair.json --config-dir ~/validator-config --rpc-port 8899 --poll-for-new-genesis-block testnet.solana.com
```
If you built from source:
```bash
$ USE_INSTALL=1 ./multinode-demo/clear-config.sh
$ USE_INSTALL=1 ./multinode-demo/validator.sh --identity ~/validator-keypair.json --poll-for-new-genesis-block testnet.solana.com
$ NDEBUG=1 USE_INSTALL=1 ./multinode-demo/validator.sh --identity ~/validator-keypair.json --rpc-port 8899 --poll-for-new-genesis-block testnet.solana.com
```
#### Enabling CUDA
@@ -241,6 +240,18 @@ A local InfluxDB and Grafana instance is now running on your machine. Define
Metrics should now be streaming and visible from your local Grafana dashboard.
#### Timezone For Log Messages
Log messages emitted by your validator include a timestamp. When sharing logs
with others to help triage issues, that timestamp can cause confusion as it does
not contain timezone information.
To make it easier to compare logs between different sources we request that
everybody use Pacific Time on their validator nodes. In Linux this can be
accomplished by running:
```bash
$ sudo ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
```
#### Publishing Validator Info
You can publish your validator information to the chain to be publicly visible
@@ -248,10 +259,26 @@ to other users.
Run the solana-validator-info CLI to populate a validator-info account:
```bash
$ solana-validator-info publish -k ~/validator-keypair.json <VALIDATOR_INFO_ARGS>
$ solana-validator-info publish ~/validator-keypair.json <VALIDATOR_NAME> <VALIDATOR_INFO_ARGS>
```
Available fields for VALIDATOR_INFO_ARGS:
* Name (required)
Optional fields for VALIDATOR_INFO_ARGS:
* Website
* Keybase ID
* Keybase Username
* Details
##### Keybase
Including a Keybase username allows client applications (like the Solana Network
Explorer) to automatically pull in your validator public profile, including
cryptographic proofs, brand identity, etc. To connect your validator pubkey with
Keybase:
1. Join https://keybase.io/ and complete the profile for your validator
2. Add your validator **identity pubkey** to Keybase:
* Create an empty file on your local computer called `solana_pubkey_<PUBKEY>`
* In Keybase, navigate to the Files section, and upload your pubkey file to
a `solana` subdirectory in your public folder: `/keybase/public/<KEYBASE_USERNAME>/solana`
* To check your pubkey, ensure you can successfully browse to
`https://keybase.pub/<KEYBASE_USERNAME>/solana/validator-<PUBKEY>`
3. Add or update your `solana-validator-info` with your Keybase username. The
CLI will verify the `validator-<PUBKEY>` file

View File

@@ -53,8 +53,8 @@ software.
##### Linux and mac OS
```bash
$ export SOLANA_RELEASE=v0.16.0 # skip this line to install the latest release
$ curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.16.0/install/solana-install-init.sh | sh -s
$ export SOLANA_RELEASE=v0.16.6 # skip this line to install the latest release
$ curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.16.6/install/solana-install-init.sh | sh -s
```
Alternatively build the `solana-install` program from source and run the

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-chacha-sys"
version = "0.16.3"
version = "0.16.7"
description = "Solana chacha-sys"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"

View File

@@ -3,7 +3,7 @@ steps:
timeout_in_minutes: 20
name: "publish docker"
- command: "ci/publish-crate.sh"
timeout_in_minutes: 40
timeout_in_minutes: 90
name: "publish crate"
branches: "!master"
- command: "ci/publish-bpf-sdk.sh"

View File

@@ -59,7 +59,7 @@ if [[ -n $CI ]]; then
fi
if [[ $CI_LINUX = True ]]; then
export CI_OS_NAME=linux
elif [[ $CI_WINDOWS = True ]]; then
else
export CI_OS_NAME=windows
fi
export CI_REPO_SLUG=$APPVEYOR_REPO_NAME

View File

@@ -2,8 +2,50 @@
set -e
cd "$(dirname "$0")/.."
BOOK="book"
book/build.sh
source ci/rust-version.sh stable
eval "$(ci/channel-info.sh)"
if [[ -n $PUBLISH_BOOK_TAG ]]; then
CURRENT_TAG="$(git describe --tags)"
COMMIT_TO_PUBLISH="$(git rev-list -n 1 "${PUBLISH_BOOK_TAG}")"
# book is manually published at a specified release tag
if [[ $PUBLISH_BOOK_TAG != "$CURRENT_TAG" ]]; then
(
cat <<EOF
steps:
- trigger: "$BUILDKITE_PIPELINE_SLUG"
async: true
build:
message: "$BUILDKITE_MESSAGE"
commit: "$COMMIT_TO_PUBLISH"
env:
PUBLISH_BOOK_TAG: "$PUBLISH_BOOK_TAG"
EOF
) | buildkite-agent pipeline upload
exit 0
fi
repo=git@github.com:solana-labs/book.git
else
# book-edge and book-beta are published automatically on the tip of the branch
case $CHANNEL in
edge)
repo=git@github.com:solana-labs/book-edge.git
;;
beta)
repo=git@github.com:solana-labs/book-beta.git
;;
*)
echo "--- publish skipped"
exit 0
;;
esac
BOOK=$CHANNEL
fi
ci/docker-run.sh "$rust_stable_docker_image" bash -exc "book/build.sh"
echo --- create book repo
(
@@ -16,22 +58,7 @@ echo --- create book repo
git commit -m "${CI_COMMIT:-local}"
)
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"
echo "--- publish $BOOK"
cd book/html/
git remote add origin $repo
git fetch origin master

View File

@@ -2,6 +2,7 @@
set -e
cd "$(dirname "$0")/.."
source ci/semver_bash/semver.sh
source ci/rust-version.sh stable
# shellcheck disable=SC2086
is_crate_version_uploaded() {
@@ -25,35 +26,56 @@ expectedCrateVersion="$MAJOR.$MINOR.$PATCH$SPECIAL"
exit 1
}
cargoCommand="cargo publish --token $CRATES_IO_TOKEN"
Cargo_tomls=$(ci/order-crates-for-publishing.py)
for Cargo_toml in $Cargo_tomls; do
echo "-- $Cargo_toml"
echo "--- $Cargo_toml"
grep -q "^version = \"$expectedCrateVersion\"$" "$Cargo_toml" || {
echo "Error: $Cargo_toml version is not $expectedCrateVersion"
exit 1
}
crate_name=$(grep -m 1 '^name = ' "$Cargo_toml" | cut -f 3 -d ' ' | tr -d \")
if grep -q "^publish = false" "$Cargo_toml"; then
echo "$crate_name is is marked as unpublishable"
continue
fi
if [[ $(is_crate_version_uploaded "$crate_name" "$expectedCrateVersion") = True ]] ; then
echo "${crate_name} version ${expectedCrateVersion} is already on crates.io"
continue
fi
(
set -x
crate=$(dirname "$Cargo_toml")
# 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
source ci/rust-version.sh
cargoCommand="cargo publish --token $CRATES_IO_TOKEN"
ci/docker-run.sh "$rust_stable_docker_image" bash -exc "cd $crate; $cargoCommand"
) || true # <-- Don't fail. We want to be able to retry the job in cases when a publish fails halfway due to network/cloud issues
# shellcheck disable=SC2086
crate_name=$(grep -m 1 '^name = ' $Cargo_toml | cut -f 3 -d ' ' | tr -d \")
numRetries=30
for ((i = 1 ; i <= numRetries ; i++)); do
echo "Attempt ${i} of ${numRetries}"
# shellcheck disable=SC2086
if [[ $(is_crate_version_uploaded $crate_name $expectedCrateVersion) = True ]] ; then
echo "Found ${crate_name} version ${expectedCrateVersion} on crates.io"
break
if [[ $(is_crate_version_uploaded "$crate_name" "$expectedCrateVersion") = True ]] ; then
echo "Found ${crate_name} version ${expectedCrateVersion} on crates.io REST API"
really_uploaded=0
(
set -x
rm -rf crate-test
cargo +"$rust_stable" init crate-test
cd crate-test/
echo "${crate_name} = \"${expectedCrateVersion}\"" >> Cargo.toml
echo "[workspace]" >> Cargo.toml
cargo +"$rust_stable" check
) && really_uploaded=1
if ((really_uploaded)); then
break;
fi
echo "${crate_name} not yet available for download from crates.io"
fi
echo "Did not find ${crate_name} version ${expectedCrateVersion} on crates.io. Sleeping for 2 seconds."
sleep 2

View File

@@ -49,7 +49,8 @@ windows)
TARGET=x86_64-pc-windows-msvc
;;
*)
TARGET=unknown-unknown-unknown
echo CI_OS_NAME unset
exit 1
;;
esac
@@ -70,6 +71,12 @@ echo --- Creating tarball
source ci/rust-version.sh stable
scripts/cargo-install-all.sh +"$rust_stable" solana-release
# Reduce the archive size until
# https://github.com/appveyor/ci/issues/2997 is fixed
if [[ -n $APPVEYOR ]]; then
rm -f solana-release/bin/solana-validator.exe solana-release/bin/solana-bench-exchange.exe
fi
if $PERF_LIBS; then
rm -rf target/perf-libs
./fetch-perf-libs.sh
@@ -94,22 +101,13 @@ echo --- Creating tarball
set -e
cd "$(dirname "$0")"/..
export USE_INSTALL=1
export REQUIRE_CONFIG_DIR=1
exec multinode-demo/validator.sh "$@"
EOF
chmod +x solana-release/bin/validator.sh
# Add a wrapper script for clear-config.sh
# TODO: Remove multinode/... from tarball
cat > solana-release/bin/clear-config.sh <<'EOF'
#!/usr/bin/env bash
set -e
cd "$(dirname "$0")"/..
export USE_INSTALL=1
exec multinode-demo/clear-config.sh "$@"
EOF
chmod +x solana-release/bin/clear-config.sh
tar jvcf solana-release-$TARGET.tar.bz2 solana-release/
tar cvf solana-release-$TARGET.tar solana-release
bzip2 solana-release-$TARGET.tar
cp solana-release/bin/solana-install-init solana-install-init-$TARGET
)

View File

@@ -14,7 +14,7 @@ do_bpf_check() {
_ cargo +"$rust_stable" fmt --all -- --check
_ cargo +"$rust_nightly" clippy --all -- --version
_ cargo +"$rust_nightly" clippy --all -- --deny=warnings
_ cargo +"$rust_stable" audit
# _ cargo +"$rust_stable" audit
}
(
@@ -33,7 +33,7 @@ do_bpf_check() {
_ cargo +"$rust_stable" fmt --all -- --check
_ cargo +"$rust_stable" clippy --all -- --version
_ cargo +"$rust_stable" clippy --all -- --deny=warnings
_ cargo +"$rust_stable" audit
#_ cargo +"$rust_stable" audit
_ ci/nits.sh
_ ci/order-crates-for-publishing.py
_ book/build.sh

View File

@@ -24,11 +24,14 @@ blockstreamer=false
deployUpdateManifest=true
fetchLogs=true
maybeHashesPerTick=
maybeStakeNodesInGenesisBlock=
maybeDisableAirdrops=
maybeInternalNodesStakeLamports=
maybeInternalNodesLamports=
maybeExternalPrimordialAccountsFile=
maybeLamports=
maybeLetsEncrypt=
maybeFullnodeAdditionalDiskSize=
maybeNoSnapshot=
usage() {
exitcode=0
@@ -67,8 +70,12 @@ Deploys a CD testnet
-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.
-f - Discard validator nodes that didn't bootup successfully
--stake-internal-nodes NUM_LAMPORTS
- Amount to stake internal nodes. If set, airdrops are disabled.
--no-airdrop
- If set, disables airdrops. Nodes must be funded in genesis block when airdrops are disabled.
--internal-nodes-stake-lamports NUM_LAMPORTS
- Amount to stake internal nodes.
--internal-nodes-lamports NUM_LAMPORTS
- Amount to fund internal nodes in genesis block
--external-accounts-file FILE_PATH
- Path to external Primordial Accounts file, if it exists.
--hashes-per-tick NUM_HASHES|sleep|auto
@@ -83,6 +90,8 @@ Deploys a CD testnet
- Attempt to generate a TLS certificate using this DNS name
--fullnode-additional-disk-size-gb [number]
- Size of additional disk in GB for all fullnodes
--no-snapshot
- If set, disables booting validators from a snapshot
Note: the SOLANA_METRICS_CONFIG environment variable is used to configure
metrics
@@ -101,8 +110,14 @@ while [[ -n $1 ]]; do
elif [[ $1 = --lamports ]]; then
maybeLamports="$1 $2"
shift 2
elif [[ $1 = --stake-internal-nodes ]]; then
maybeStakeNodesInGenesisBlock="$1 $2"
elif [[ $1 = --no-airdrop ]]; then
maybeDisableAirdrops="$1"
shift 1
elif [[ $1 = --internal-nodes-stake-lamports ]]; then
maybeInternalNodesStakeLamports="$1 $2"
shift 2
elif [[ $1 = --internal-nodes-lamports ]]; then
maybeInternalNodesLamports="$1 $2"
shift 2
elif [[ $1 = --external-accounts-file ]]; then
maybeExternalPrimordialAccountsFile="$1 $2"
@@ -122,6 +137,9 @@ while [[ -n $1 ]]; do
elif [[ $1 == --machine-type* ]]; then # Bypass quoted long args for GPUs
shortArgs+=("$1")
shift
elif [[ $1 = --no-snapshot ]]; then
maybeNoSnapshot="$1"
shift 1
else
usage "Unknown long option: $1"
fi
@@ -383,9 +401,17 @@ if ! $skipStart; then
args+=(--deploy-update windows)
fi
if [[ -n $maybeStakeNodesInGenesisBlock ]]; then
# shellcheck disable=SC2206 # Do not want to quote $maybeStakeNodesInGenesisBlock
args+=($maybeStakeNodesInGenesisBlock)
if [[ -n $maybeDisableAirdrops ]]; then
# shellcheck disable=SC2206
args+=($maybeDisableAirdrops)
fi
if [[ -n $maybeInternalNodesStakeLamports ]]; then
# shellcheck disable=SC2206 # Do not want to quote $maybeInternalNodesStakeLamports
args+=($maybeInternalNodesStakeLamports)
fi
if [[ -n $maybeInternalNodesLamports ]]; then
# shellcheck disable=SC2206 # Do not want to quote $maybeInternalNodesLamports
args+=($maybeInternalNodesLamports)
fi
if [[ -n $maybeExternalPrimordialAccountsFile ]]; then
# shellcheck disable=SC2206 # Do not want to quote $maybeExternalPrimordialAccountsFile
@@ -396,6 +422,11 @@ if ! $skipStart; then
args+=($maybeLamports)
fi
if [[ -n $maybeNoSnapshot ]]; then
# shellcheck disable=SC2206
args+=($maybeNoSnapshot)
fi
time net/net.sh "${args[@]}"
) || ok=false

View File

@@ -158,7 +158,6 @@ testnet-demo)
tds)
CHANNEL_OR_TAG=beta
CHANNEL_BRANCH=$BETA_CHANNEL
: "${GCE_NODE_COUNT:=3}"
;;
*)
echo "Error: Invalid TESTNET=$TESTNET"
@@ -470,10 +469,91 @@ deploy() {
(
set -x
EXTERNAL_ACCOUNTS_FILE_URL=https://raw.githubusercontent.com/solana-labs/tour-de-sol/master/stage1/validator.yml
EXTERNAL_ACCOUNTS_FILE=/tmp/validator.yml
# Allow cluster configuration to be overridden from env vars
if [[ -z $TDS_ZONES ]]; then
TDS_ZONES="us-west1-a,us-central1-a,europe-west4-a"
fi
GCE_CLOUD_ZONES=(); while read -r -d, ; do GCE_CLOUD_ZONES+=( "$REPLY" ); done <<< "${TDS_ZONES},"
if [[ -z $TDS_NODE_COUNT ]]; then
TDS_NODE_COUNT="3"
fi
if [[ -z $TDS_CLIENT_COUNT ]]; then
TDS_CLIENT_COUNT="1"
fi
if [[ -z $ENABLE_GPU ]]; then
maybeGpu=(-G "--machine-type n1-standard-16 --accelerator count=2,type=nvidia-tesla-v100")
elif [[ $ENABLE_GPU == skip ]]; then
maybeGpu=()
else
maybeGpu=(-G "${ENABLE_GPU}")
fi
if [[ -z $HASHES_PER_TICK ]]; then
maybeHashesPerTick="--hashes-per-tick auto"
elif [[ $HASHES_PER_TICK == skip ]]; then
maybeHashesPerTick=""
else
maybeHashesPerTick="--hashes-per-tick ${HASHES_PER_TICK}"
fi
if [[ -z $DISABLE_AIRDROPS ]]; then
DISABLE_AIRDROPS="true"
fi
if [[ $DISABLE_AIRDROPS == true ]] ; then
maybeDisableAirdrops="--no-airdrop"
else
maybeDisableAirdrops=""
fi
if [[ -z $INTERNAL_NODES_STAKE_LAMPORTS ]]; then
maybeInternalNodesStakeLamports="--internal-nodes-stake-lamports 1000000000000"
elif [[ $INTERNAL_NODES_STAKE_LAMPORTS == skip ]]; then
maybeInternalNodesStakeLamports=""
else
maybeInternalNodesStakeLamports="--internal-nodes-stake-lamports ${INTERNAL_NODES_STAKE_LAMPORTS}"
fi
if [[ -z $INTERNAL_NODES_LAMPORTS ]]; then
maybeInternalNodesLamports="--internal-nodes-lamports 2000000000000"
elif [[ $INTERNAL_NODES_LAMPORTS == skip ]]; then
maybeInternalNodesLamports=""
else
maybeInternalNodesLamports="--internal-nodes-lamports ${INTERNAL_NODES_LAMPORTS}"
fi
EXTERNAL_ACCOUNTS_FILE=/tmp/validator.yml
if [[ -z $EXTERNAL_ACCOUNTS_FILE_URL ]]; then
EXTERNAL_ACCOUNTS_FILE_URL=https://raw.githubusercontent.com/solana-labs/tour-de-sol/master/validators/all.yml
wget ${EXTERNAL_ACCOUNTS_FILE_URL} -O ${EXTERNAL_ACCOUNTS_FILE}
maybeExternalAccountsFile="--external-accounts-file ${EXTERNAL_ACCOUNTS_FILE}"
elif [[ $EXTERNAL_ACCOUNTS_FILE_URL == skip ]]; then
maybeExternalAccountsFile=""
else
wget ${EXTERNAL_ACCOUNTS_FILE_URL} -O ${EXTERNAL_ACCOUNTS_FILE}
maybeExternalAccountsFile="--external-accounts-file ${EXTERNAL_ACCOUNTS_FILE}"
fi
if [[ -z $LAMPORTS ]]; then
maybeLamports="--lamports 8589934592000000000"
elif [[ $LAMPORTS == skip ]]; then
maybeLamports=""
else
maybeLamports="--lamports ${LAMPORTS}"
fi
if [[ -z $ADDITIONAL_DISK_SIZE_GB ]]; then
maybeAdditionalDisk="--fullnode-additional-disk-size-gb 32000"
elif [[ $ADDITIONAL_DISK_SIZE_GB == skip ]]; then
maybeAdditionalDisk=""
else
maybeAdditionalDisk="--fullnode-additional-disk-size-gb ${ADDITIONAL_DISK_SIZE_GB}"
fi
# Multiple V100 GPUs are available in us-west1, us-central1 and europe-west4
# shellcheck disable=SC2068
@@ -481,24 +561,27 @@ deploy() {
NO_LEDGER_VERIFY=1 \
NO_VALIDATOR_SANITY=1 \
ci/testnet-deploy.sh -p tds-solana-com -C gce \
-G "--machine-type n1-standard-16 --accelerator count=2,type=nvidia-tesla-v100" \
"${maybeGpu[@]}" \
-d pd-ssd \
-z us-west1-a \
-z us-central1-a \
-z europe-west4-a \
-t "$CHANNEL_OR_TAG" -n "$GCE_NODE_COUNT" -c 1 -P -u \
${GCE_CLOUD_ZONES[@]/#/-z } \
-t "$CHANNEL_OR_TAG" \
-n ${TDS_NODE_COUNT} \
-c ${TDS_CLIENT_COUNT} \
-P -u \
-a tds-solana-com --letsencrypt tds.solana.com \
--hashes-per-tick auto \
${maybeHashesPerTick} \
${skipCreate:+-e} \
${skipStart:+-s} \
${maybeStop:+-S} \
${maybeDelete:+-D} \
--stake-internal-nodes 1000000000000 \
--external-accounts-file "$EXTERNAL_ACCOUNTS_FILE" \
--lamports 8589934592000000000 \
${maybeDisableAirdrops} \
${maybeInternalNodesStakeLamports} \
${maybeInternalNodesLamports} \
${maybeExternalAccountsFile} \
${maybeLamports} \
${maybeAdditionalDisk} \
--skip-deploy-update \
--fullnode-additional-disk-size-gb 32000
--no-snapshot
)
;;
*)

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-client"
version = "0.16.3"
version = "0.16.7"
description = "Solana Client"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -19,10 +19,10 @@ reqwest = "0.9.18"
serde = "1.0.92"
serde_derive = "1.0.92"
serde_json = "1.0.39"
solana-netutil = { path = "../netutil", version = "0.16.3" }
solana-sdk = { path = "../sdk", version = "0.16.3" }
solana-netutil = { path = "../netutil", version = "0.16.7" }
solana-sdk = { path = "../sdk", version = "0.16.7" }
[dev-dependencies]
jsonrpc-core = "12.0.0"
jsonrpc-http-server = "12.0.0"
solana-logger = { path = "../logger", version = "0.16.3" }
solana-logger = { path = "../logger", version = "0.16.7" }

View File

@@ -293,7 +293,6 @@ impl RpcClient {
format!("GetProgramAccounts parse failure: {:?}", err),
)
})?;
println!("{:?}", accounts);
let mut pubkey_accounts: Vec<(Pubkey, Account)> = Vec::new();
for (string, account) in accounts.into_iter() {

View File

@@ -1,7 +1,7 @@
[package]
name = "solana"
description = "Blockchain, Rebuilt for Scale"
version = "0.16.3"
version = "0.16.7"
documentation = "https://docs.rs/solana"
homepage = "https://solana.com/"
readme = "../README.md"
@@ -45,27 +45,27 @@ rocksdb = "0.11.0"
serde = "1.0.92"
serde_derive = "1.0.92"
serde_json = "1.0.39"
solana-budget-api = { path = "../programs/budget_api", version = "0.16.3" }
solana-budget-program = { path = "../programs/budget_program", version = "0.16.3" }
solana-chacha-sys = { path = "../chacha-sys", version = "0.16.3" }
solana-client = { path = "../client", version = "0.16.3" }
solana-config-program = { path = "../programs/config_program", version = "0.16.3" }
solana-drone = { path = "../drone", version = "0.16.3" }
solana-budget-api = { path = "../programs/budget_api", version = "0.16.7" }
solana-budget-program = { path = "../programs/budget_program", version = "0.16.7" }
solana-chacha-sys = { path = "../chacha-sys", version = "0.16.7" }
solana-client = { path = "../client", version = "0.16.7" }
solana-config-program = { path = "../programs/config_program", version = "0.16.7" }
solana-drone = { path = "../drone", version = "0.16.7" }
solana-ed25519-dalek = "0.2.0"
solana-exchange-program = { path = "../programs/exchange_program", version = "0.16.3" }
solana-kvstore = { path = "../kvstore", version = "0.16.3", optional = true }
solana-logger = { path = "../logger", version = "0.16.3" }
solana-metrics = { path = "../metrics", version = "0.16.3" }
solana-netutil = { path = "../netutil", version = "0.16.3" }
solana-runtime = { path = "../runtime", version = "0.16.3" }
solana-sdk = { path = "../sdk", version = "0.16.3" }
solana-stake-api = { path = "../programs/stake_api", version = "0.16.3" }
solana-stake-program = { path = "../programs/stake_program", version = "0.16.3" }
solana-storage-api = { path = "../programs/storage_api", version = "0.16.3" }
solana-storage-program = { path = "../programs/storage_program", version = "0.16.3" }
solana-vote-api = { path = "../programs/vote_api", version = "0.16.3" }
solana-vote-program = { path = "../programs/vote_program", version = "0.16.3" }
solana-vote-signer = { path = "../vote-signer", version = "0.16.3" }
solana-exchange-program = { path = "../programs/exchange_program", version = "0.16.7" }
solana-kvstore = { path = "../kvstore", version = "0.16.7", optional = true }
solana-logger = { path = "../logger", version = "0.16.7" }
solana-metrics = { path = "../metrics", version = "0.16.7" }
solana-netutil = { path = "../netutil", version = "0.16.7" }
solana-runtime = { path = "../runtime", version = "0.16.7" }
solana-sdk = { path = "../sdk", version = "0.16.7" }
solana-stake-api = { path = "../programs/stake_api", version = "0.16.7" }
solana-stake-program = { path = "../programs/stake_program", version = "0.16.7" }
solana-storage-api = { path = "../programs/storage_api", version = "0.16.7" }
solana-storage-program = { path = "../programs/storage_program", version = "0.16.7" }
solana-vote-api = { path = "../programs/vote_api", version = "0.16.7" }
solana-vote-program = { path = "../programs/vote_program", version = "0.16.7" }
solana-vote-signer = { path = "../vote-signer", version = "0.16.7" }
sys-info = "0.5.7"
tokio = "0.1"
tokio-codec = "0.1"

View File

@@ -418,7 +418,7 @@ impl BankingStage {
// the likelihood of any single thread getting starved and processing old ids.
// TODO: Banking stage threads should be prioritized to complete faster then this queue
// expires.
let (loaded_accounts, results) =
let (loaded_accounts, results, tx_count, signature_count) =
bank.load_and_execute_transactions(txs, lock_results, MAX_RECENT_BLOCKHASHES / 2);
let load_execute_time = now.elapsed();
@@ -432,7 +432,7 @@ impl BankingStage {
let commit_time = {
let now = Instant::now();
bank.commit_transactions(txs, &loaded_accounts, &results);
bank.commit_transactions(txs, &loaded_accounts, &results, tx_count, signature_count);
now.elapsed()
};

View File

@@ -193,6 +193,63 @@ impl Blocktree {
false
}
// silently deletes all blocktree column families starting at the given slot
fn delete_all_columns(&self, starting_slot: u64) {
match self.meta_cf.force_delete_all(Some(starting_slot)) {
Ok(_) => (),
Err(e) => error!(
"Error: {:?} while deleting meta_cf for slot {:?}",
e, starting_slot
),
}
match self.data_cf.force_delete_all(Some((starting_slot, 0))) {
Ok(_) => (),
Err(e) => error!(
"Error: {:?} while deleting data_cf for slot {:?}",
e, starting_slot
),
}
match self
.erasure_meta_cf
.force_delete_all(Some((starting_slot, 0)))
{
Ok(_) => (),
Err(e) => error!(
"Error: {:?} while deleting erasure_meta_cf for slot {:?}",
e, starting_slot
),
}
match self.erasure_cf.force_delete_all(Some((starting_slot, 0))) {
Ok(_) => (),
Err(e) => error!(
"Error: {:?} while deleting erasure_cf for slot {:?}",
e, starting_slot
),
}
match self.orphans_cf.force_delete_all(Some(starting_slot)) {
Ok(_) => (),
Err(e) => error!(
"Error: {:?} while deleting orphans_cf for slot {:?}",
e, starting_slot
),
}
match self.dead_slots_cf.force_delete_all(Some(starting_slot)) {
Ok(_) => (),
Err(e) => error!(
"Error: {:?} while deleting dead_slots_cf for slot {:?}",
e, starting_slot
),
}
let roots_cf = self.db.column::<cf::Root>();
match roots_cf.force_delete_all(Some(starting_slot)) {
Ok(_) => (),
Err(e) => error!(
"Error: {:?} while deleting roots_cf for slot {:?}",
e, starting_slot
),
}
}
pub fn erasure_meta(&self, slot: u64, set_index: u64) -> Result<Option<ErasureMeta>> {
self.erasure_meta_cf.get((slot, set_index))
}
@@ -201,7 +258,7 @@ impl Blocktree {
self.orphans_cf.get(slot)
}
pub fn rooted_slot_iterator<'a>(&'a self, slot: u64) -> Result<RootedSlotIterator<'a>> {
pub fn rooted_slot_iterator(&self, slot: u64) -> Result<RootedSlotIterator> {
RootedSlotIterator::new(slot, self)
}
@@ -527,6 +584,13 @@ impl Blocktree {
self.data_cf.get_bytes((slot, index))
}
/// Manually update the meta for a slot.
/// Can interfere with automatic meta update and potentially break chaining.
/// Dangerous. Use with care.
pub fn put_meta_bytes(&self, slot: u64, bytes: &[u8]) -> Result<()> {
self.meta_cf.put_bytes(slot, bytes)
}
/// For benchmarks, testing, and setup.
/// Does no metadata tracking. Use with care.
pub fn put_data_blob_bytes(&self, slot: u64, index: u64, bytes: &[u8]) -> Result<()> {
@@ -848,6 +912,39 @@ impl Blocktree {
batch_processor.write(batch)?;
Ok(())
}
/// Prune blocktree such that slots higher than `target_slot` are deleted and all references to
/// higher slots are removed
pub fn prune(&self, target_slot: u64) {
let mut meta = self
.meta(target_slot)
.expect("couldn't read slot meta")
.expect("no meta for target slot");
meta.next_slots.clear();
self.put_meta_bytes(
target_slot,
&bincode::serialize(&meta).expect("couldn't get meta bytes"),
)
.expect("unable to update meta for target slot");
self.delete_all_columns(target_slot + 1);
// fixup anything that refers to non-root slots and delete the rest
for (slot, mut meta) in self
.slot_meta_iterator(0)
.expect("unable to iterate over meta")
{
if slot > target_slot {
break;
}
meta.next_slots.retain(|slot| *slot <= target_slot);
self.put_meta_bytes(
slot,
&bincode::serialize(&meta).expect("couldn't update meta"),
)
.expect("couldn't update meta");
}
}
}
fn insert_data_blob_batch<'a, I>(
@@ -3060,6 +3157,66 @@ pub mod tests {
Blocktree::destroy(&blocktree_path).expect("Expected successful database destruction");
}
#[test]
fn test_prune() {
let blocktree_path = get_tmp_ledger_path!();
let blocktree = Blocktree::open(&blocktree_path).unwrap();
let (blobs, _) = make_many_slot_entries(0, 50, 6);
blocktree.write_blobs(blobs).unwrap();
blocktree
.slot_meta_iterator(0)
.unwrap()
.for_each(|(_, meta)| assert_eq!(meta.last_index, 5));
blocktree.prune(5);
blocktree
.slot_meta_iterator(0)
.unwrap()
.for_each(|(slot, meta)| {
assert!(slot <= 5);
assert_eq!(meta.last_index, 5)
});
let data_iter = blocktree.data_cf.iter(Some((0, 0))).unwrap();
for ((slot, _), _) in data_iter {
if slot > 5 {
assert!(false);
}
}
drop(blocktree);
Blocktree::destroy(&blocktree_path).expect("Expected successful database destruction");
}
#[should_panic]
#[test]
fn test_prune_out_of_bounds() {
let blocktree_path = get_tmp_ledger_path!();
let blocktree = Blocktree::open(&blocktree_path).unwrap();
// slot 5 does not exist, prune should panic
blocktree.prune(5);
drop(blocktree);
Blocktree::destroy(&blocktree_path).expect("Expected successful database destruction");
}
#[test]
fn test_iter_bounds() {
let blocktree_path = get_tmp_ledger_path!();
let blocktree = Blocktree::open(&blocktree_path).unwrap();
// slot 5 does not exist, iter should be ok and should be a noop
blocktree
.slot_meta_iterator(5)
.unwrap()
.for_each(|_| assert!(false));
drop(blocktree);
Blocktree::destroy(&blocktree_path).expect("Expected successful database destruction");
}
mod erasure {
use super::*;
use crate::blocktree::meta::ErasureMetaStatus;

View File

@@ -405,6 +405,16 @@ where
Ok(iter.map(|(key, value)| (C::index(&key), value)))
}
//TODO add a delete_until that goes the other way
pub fn force_delete_all(&self, start_from: Option<C::Index>) -> Result<()> {
let iter = self.iter(start_from)?;
iter.for_each(|(index, _)| match self.delete(index) {
Ok(_) => (),
Err(e) => error!("Error: {:?} while deleting {:?}", e, C::NAME),
});
Ok(())
}
#[inline]
pub fn handle(&self) -> B::ColumnFamily {
self.backend.cf_handle(C::NAME).clone()

View File

@@ -142,6 +142,7 @@ pub fn process_blocktree(
genesis_block: &GenesisBlock,
blocktree: &Blocktree,
account_paths: Option<String>,
verify_ledger: bool,
) -> result::Result<(BankForks, Vec<BankForksInfo>, LeaderScheduleCache), BlocktreeProcessorError> {
let now = Instant::now();
info!("processing ledger...");
@@ -204,7 +205,7 @@ pub fn process_blocktree(
}
if !entries.is_empty() {
if !entries.verify(&last_entry_hash) {
if verify_ledger && !entries.verify(&last_entry_hash) {
warn!(
"Ledger proof of history failed at slot: {}, entry: {}",
slot, entry_height
@@ -373,7 +374,7 @@ pub mod tests {
fill_blocktree_slot_with_ticks(&blocktree, ticks_per_slot, 2, 1, blockhash);
let (mut _bank_forks, bank_forks_info, _) =
process_blocktree(&genesis_block, &blocktree, None).unwrap();
process_blocktree(&genesis_block, &blocktree, None, true).unwrap();
assert_eq!(bank_forks_info.len(), 1);
assert_eq!(
@@ -432,7 +433,7 @@ pub mod tests {
blocktree.set_roots(&[4, 1, 0]).unwrap();
let (bank_forks, bank_forks_info, _) =
process_blocktree(&genesis_block, &blocktree, None).unwrap();
process_blocktree(&genesis_block, &blocktree, None, true).unwrap();
assert_eq!(bank_forks_info.len(), 1); // One fork, other one is ignored b/c not a descendant of the root
@@ -506,7 +507,7 @@ pub mod tests {
blocktree.set_roots(&[0, 1]).unwrap();
let (bank_forks, bank_forks_info, _) =
process_blocktree(&genesis_block, &blocktree, None).unwrap();
process_blocktree(&genesis_block, &blocktree, None, true).unwrap();
assert_eq!(bank_forks_info.len(), 2); // There are two forks
assert_eq!(
@@ -587,7 +588,7 @@ pub mod tests {
// Check that we can properly restart the ledger / leader scheduler doesn't fail
let (bank_forks, bank_forks_info, _) =
process_blocktree(&genesis_block, &blocktree, None).unwrap();
process_blocktree(&genesis_block, &blocktree, None, true).unwrap();
assert_eq!(bank_forks_info.len(), 1); // There is one fork
assert_eq!(
@@ -723,7 +724,7 @@ pub mod tests {
.unwrap();
let entry_height = genesis_block.ticks_per_slot + entries.len() as u64;
let (bank_forks, bank_forks_info, _) =
process_blocktree(&genesis_block, &blocktree, None).unwrap();
process_blocktree(&genesis_block, &blocktree, None, true).unwrap();
assert_eq!(bank_forks_info.len(), 1);
assert_eq!(bank_forks.root(), 0);
@@ -754,7 +755,7 @@ pub mod tests {
let blocktree = Blocktree::open(&ledger_path).unwrap();
let (bank_forks, bank_forks_info, _) =
process_blocktree(&genesis_block, &blocktree, None).unwrap();
process_blocktree(&genesis_block, &blocktree, None, true).unwrap();
assert_eq!(bank_forks_info.len(), 1);
assert_eq!(

View File

@@ -234,6 +234,7 @@ impl ClusterInfoRepairListener {
let _ = Self::serve_repairs_to_repairee(
my_pubkey,
repairee_pubkey,
my_root,
blocktree,
&repairee_epoch_slots,
@@ -249,8 +250,10 @@ impl ClusterInfoRepairListener {
Ok(())
}
#[allow(clippy::too_many_arguments)]
fn serve_repairs_to_repairee(
my_pubkey: &Pubkey,
repairee_pubkey: &Pubkey,
my_root: u64,
blocktree: &Blocktree,
repairee_epoch_slots: &EpochSlots,
@@ -263,8 +266,8 @@ impl ClusterInfoRepairListener {
let slot_iter = blocktree.rooted_slot_iterator(repairee_epoch_slots.root);
if slot_iter.is_err() {
info!(
"Root for repairee is on different fork. My root: {}, repairee_root: {}",
my_root, repairee_epoch_slots.root
"Root for repairee is on different fork. My root: {}, repairee_root: {} repairee_pubkey: {:?}",
my_root, repairee_epoch_slots.root, repairee_pubkey,
);
return Ok(());
}
@@ -656,6 +659,7 @@ mod tests {
for repairman_pubkey in &eligible_repairmen {
ClusterInfoRepairListener::serve_repairs_to_repairee(
&repairman_pubkey,
&mock_repairee.id,
num_slots - 1,
&blocktree,
&repairee_epoch_slots,
@@ -725,6 +729,7 @@ mod tests {
ClusterInfoRepairListener::serve_repairs_to_repairee(
&my_pubkey,
&mock_repairee.id,
total_slots - 1,
&blocktree,
&repairee_epoch_slots,
@@ -746,6 +751,7 @@ mod tests {
EpochSlots::new(mock_repairee.id, stakers_slot_offset, repairee_slots, 1);
ClusterInfoRepairListener::serve_repairs_to_repairee(
&my_pubkey,
&mock_repairee.id,
total_slots - 1,
&blocktree,
&repairee_epoch_slots,

View File

@@ -29,6 +29,10 @@ impl LeaderSchedule {
.collect();
Self { slot_leaders }
}
pub(crate) fn get_slot_leaders(&self) -> &[Pubkey] {
&self.slot_leaders
}
}
impl Index<u64> for LeaderSchedule {

View File

@@ -5,16 +5,16 @@ use solana_sdk::pubkey::Pubkey;
use solana_sdk::timing::NUM_CONSECUTIVE_LEADER_SLOTS;
/// Return the leader schedule for the given epoch.
pub fn leader_schedule(epoch_height: u64, bank: &Bank) -> Option<LeaderSchedule> {
staking_utils::staked_nodes_at_epoch(bank, epoch_height).map(|stakes| {
pub fn leader_schedule(epoch: u64, bank: &Bank) -> Option<LeaderSchedule> {
staking_utils::staked_nodes_at_epoch(bank, epoch).map(|stakes| {
let mut seed = [0u8; 32];
seed[0..8].copy_from_slice(&epoch_height.to_le_bytes());
seed[0..8].copy_from_slice(&epoch.to_le_bytes());
let mut stakes: Vec<_> = stakes.into_iter().collect();
sort_stakes(&mut stakes);
LeaderSchedule::new(
&stakes,
seed,
bank.get_slots_in_epoch(epoch_height),
bank.get_slots_in_epoch(epoch),
NUM_CONSECUTIVE_LEADER_SLOTS,
)
})

View File

@@ -176,6 +176,7 @@ impl LocalCluster {
&leader_voting_keypair,
&leader_storage_keypair,
None,
true,
&config.validator_configs[0],
);
@@ -308,6 +309,7 @@ impl LocalCluster {
&voting_keypair,
&storage_keypair,
Some(&self.entry_point_info),
true,
&validator_config,
);
@@ -561,6 +563,7 @@ impl Cluster for LocalCluster {
&fullnode_info.voting_keypair,
&fullnode_info.storage_keypair,
None,
true,
config,
);

View File

@@ -204,6 +204,7 @@ impl PohRecorder {
pub fn set_working_bank(&mut self, working_bank: WorkingBank) {
trace!("new working bank");
self.working_bank = Some(working_bank);
let _ = self.flush_cache(false);
}
pub fn set_bank(&mut self, bank: &Arc<Bank>) {
let max_tick_height = (bank.slot() + 1) * bank.ticks_per_slot() - 1;
@@ -1296,6 +1297,8 @@ mod tests {
false
);
// Move the bank up a slot (so that max_tick_height > slot 0's tick_height)
let bank = Arc::new(Bank::new_from_parent(&bank, &Pubkey::default(), 1));
// If we set the working bank, the node should be leader within next 2 slots
poh_recorder.set_bank(&bank);
assert_eq!(
@@ -1304,4 +1307,37 @@ mod tests {
);
}
}
#[test]
fn test_flush_virtual_ticks() {
let ledger_path = get_tmp_ledger_path!();
{
// test that virtual ticks are flushed into a newly set bank asap
let blocktree =
Blocktree::open(&ledger_path).expect("Expected to be able to open database ledger");
let GenesisBlockInfo { genesis_block, .. } = create_genesis_block(2);
let bank = Arc::new(Bank::new(&genesis_block));
let genesis_blockhash = bank.last_blockhash();
let (mut poh_recorder, _entry_receiver) = PohRecorder::new(
0,
bank.last_blockhash(),
0,
Some(2),
bank.ticks_per_slot(),
&Pubkey::default(),
&Arc::new(blocktree),
&Arc::new(LeaderScheduleCache::new_from_bank(&bank)),
&Arc::new(PohConfig::default()),
);
//create a new bank
let bank = Arc::new(Bank::new_from_parent(&bank, &Pubkey::default(), 2));
//put 2 slots worth of virtual ticks into poh
for _ in 0..(bank.ticks_per_slot() * 2) {
poh_recorder.tick();
}
poh_recorder.set_bank(&bank.clone());
assert!(!bank.check_hash_age(&genesis_blockhash, 1));
}
}
}

View File

@@ -112,6 +112,8 @@ impl ReplayStage {
.spawn(move || {
let _exit = Finalizer::new(exit_.clone());
let mut progress = HashMap::new();
let mut current_leader = None;
loop {
let now = Instant::now();
// Stop getting entries if we get exit signal
@@ -124,17 +126,15 @@ impl ReplayStage {
&mut bank_forks.write().unwrap(),
&leader_schedule_cache,
);
let mut is_tpu_bank_active = poh_recorder.lock().unwrap().bank().is_some();
Self::replay_active_banks(
let did_complete_bank = Self::replay_active_banks(
&blocktree,
&bank_forks,
&my_pubkey,
&mut ticks_per_slot,
&mut progress,
&slot_full_sender,
)?;
);
if ticks_per_slot == 0 {
let frozen_banks = bank_forks.read().unwrap().frozen_banks();
@@ -148,6 +148,17 @@ impl ReplayStage {
if let Some((_, bank)) = votable.last() {
subscriptions.notify_subscribers(bank.slot(), &bank_forks);
if let Some(new_leader) =
leader_schedule_cache.slot_leader_at(bank.slot(), Some(&bank))
{
Self::log_leader_change(
&my_pubkey,
bank.slot(),
&mut current_leader,
&new_leader,
);
}
Self::handle_votable_bank(
&bank,
&bank_forks,
@@ -197,12 +208,25 @@ impl ReplayStage {
grace_ticks,
&leader_schedule_cache,
);
if let Some(bank) = poh_recorder.lock().unwrap().bank() {
Self::log_leader_change(
&my_pubkey,
bank.slot(),
&mut current_leader,
&my_pubkey,
);
}
}
inc_new_counter_info!(
"replicate_stage-duration",
duration_as_ms(&now.elapsed()) as usize
);
if did_complete_bank {
//just processed a bank, skip the signal; maybe there's more slots available
continue;
}
let timer = Duration::from_millis(100);
let result = ledger_signal_receiver.recv_timeout(timer);
match result {
@@ -216,6 +240,31 @@ impl ReplayStage {
.unwrap();
(Self { t_replay }, slot_full_receiver, root_bank_receiver)
}
fn log_leader_change(
my_pubkey: &Pubkey,
bank_slot: u64,
current_leader: &mut Option<Pubkey>,
new_leader: &Pubkey,
) {
if let Some(ref current_leader) = current_leader {
if current_leader != new_leader {
let msg = if current_leader == my_pubkey {
"I am no longer the leader"
} else if new_leader == my_pubkey {
"I am the new leader"
} else {
""
};
info!(
"LEADER CHANGE at slot: {} leader: {}. {}",
bank_slot, new_leader, msg
);
}
}
current_leader.replace(new_leader.to_owned());
}
pub fn start_leader(
my_pubkey: &Pubkey,
bank_forks: &Arc<RwLock<BankForks>>,
@@ -237,7 +286,8 @@ impl ReplayStage {
};
assert!(parent.is_frozen());
leader_schedule_cache.slot_leader_at(poh_slot, Some(&parent))
leader_schedule_cache
.slot_leader_at(poh_slot, Some(&parent))
.map(|next_leader| {
debug!(
"me: {} leader {} at poh slot {}",
@@ -249,7 +299,8 @@ impl ReplayStage {
datapoint_warn!(
"replay_stage-new_leader",
("count", poh_slot, i64),
("grace", grace_ticks, i64));
("grace", grace_ticks, i64)
);
let tpu_bank = Bank::new_from_parent(&parent, my_pubkey, poh_slot);
bank_forks.write().unwrap().insert(tpu_bank);
if let Some(tpu_bank) = bank_forks.read().unwrap().get(poh_slot).cloned() {
@@ -257,12 +308,6 @@ impl ReplayStage {
bank_forks.read().unwrap().working_bank().slot(),
tpu_bank.slot()
);
debug!(
"poh_recorder new working bank: me: {} next_slot: {} next_leader: {}",
my_pubkey,
tpu_bank.slot(),
next_leader
);
poh_recorder.lock().unwrap().set_bank(&tpu_bank);
}
}
@@ -391,11 +436,18 @@ impl ReplayStage {
next_leader_slot,
ticks_per_slot,
);
debug!(
"{:?} voted and reset poh at {}. next leader slot {:?}",
let next_leader_msg = if let Some(next_leader_slot) = next_leader_slot {
format!("My next leader slot is #{}", next_leader_slot)
} else {
"I am not in the upcoming leader schedule yet".to_owned()
};
info!(
"{} voted and reset poh at {}. {}",
my_pubkey,
bank.tick_height(),
next_leader_slot
next_leader_msg,
);
}
@@ -406,7 +458,8 @@ impl ReplayStage {
ticks_per_slot: &mut u64,
progress: &mut HashMap<u64, ForkProgress>,
slot_full_sender: &Sender<(u64, Pubkey)>,
) -> Result<()> {
) -> bool {
let mut did_complete_bank = false;
let active_banks = bank_forks.read().unwrap().active_banks();
trace!("active banks {:?}", active_banks);
@@ -429,11 +482,11 @@ impl ReplayStage {
}
let max_tick_height = (*bank_slot + 1) * bank.ticks_per_slot() - 1;
if bank.tick_height() == max_tick_height {
did_complete_bank = true;
Self::process_completed_bank(my_pubkey, bank, slot_full_sender);
}
}
Ok(())
did_complete_bank
}
fn generate_votable_banks(
@@ -525,12 +578,12 @@ impl ReplayStage {
.map(|s| s.is_frozen())
.unwrap_or(true)
{
info!("validator fork confirmed {} {}", *slot, duration);
info!("validator fork confirmed {} {}ms", *slot, duration);
datapoint_warn!("validator-confirmation", ("duration_ms", duration, i64));
false
} else {
debug!(
"validator fork not confirmed {} {} {:?}",
"validator fork not confirmed {} {}ms {:?}",
*slot,
duration,
stake_lockouts.get(slot)

View File

@@ -209,6 +209,19 @@ pub struct RpcVoteAccountInfo {
pub commission: u8,
}
#[derive(Serialize, Deserialize, Clone, Debug)]
#[serde(rename_all = "camelCase")]
pub struct RpcEpochInfo {
/// The current epoch
pub epoch: u64,
/// The current slot, relative to the start of the current epoch
pub slot_index: u64,
/// The number of slots in this epoch
pub slots_in_epoch: u64,
}
#[rpc(server)]
pub trait RpcSol {
type Metadata;
@@ -228,6 +241,12 @@ pub trait RpcSol {
#[rpc(meta, name = "getClusterNodes")]
fn get_cluster_nodes(&self, _: Self::Metadata) -> Result<Vec<RpcContactInfo>>;
#[rpc(meta, name = "getEpochInfo")]
fn get_epoch_info(&self, _: Self::Metadata) -> Result<RpcEpochInfo>;
#[rpc(meta, name = "getLeaderSchedule")]
fn get_leader_schedule(&self, _: Self::Metadata) -> Result<Option<Vec<String>>>;
#[rpc(meta, name = "getRecentBlockhash")]
fn get_recent_blockhash(&self, _: Self::Metadata) -> Result<(String, FeeCalculator)>;
@@ -355,6 +374,32 @@ impl RpcSol for RpcSolImpl {
.collect())
}
fn get_epoch_info(&self, meta: Self::Metadata) -> Result<RpcEpochInfo> {
let bank = meta.request_processor.read().unwrap().bank();
let epoch_schedule = bank.epoch_schedule();
let (epoch, slot_index) = epoch_schedule.get_epoch_and_slot_index(bank.slot());
Ok(RpcEpochInfo {
epoch,
slot_index,
slots_in_epoch: epoch_schedule.get_slots_in_epoch(epoch),
})
}
fn get_leader_schedule(&self, meta: Self::Metadata) -> Result<Option<Vec<String>>> {
let bank = meta.request_processor.read().unwrap().bank();
Ok(
crate::leader_schedule_utils::leader_schedule(bank.epoch(), &bank).map(
|leader_schedule| {
leader_schedule
.get_slot_leaders()
.iter()
.map(|pubkey| pubkey.to_string())
.collect()
},
),
)
}
fn get_recent_blockhash(&self, meta: Self::Metadata) -> Result<(String, FeeCalculator)> {
debug!("get_recent_blockhash rpc request received");
Ok(meta

View File

@@ -84,6 +84,7 @@ impl Validator {
voting_keypair: &Arc<Keypair>,
storage_keypair: &Arc<Keypair>,
entrypoint_info_option: Option<&ContactInfo>,
verify_ledger: bool,
config: &ValidatorConfig,
) -> Self {
warn!("CUDA is {}abled", if cfg!(cuda) { "en" } else { "dis" });
@@ -104,6 +105,7 @@ impl Validator {
ledger_path,
config.account_paths.clone(),
config.snapshot_path.clone(),
verify_ledger,
);
let leader_schedule_cache = Arc::new(leader_schedule_cache);
@@ -301,6 +303,7 @@ fn get_bank_forks(
blocktree: &Blocktree,
account_paths: Option<String>,
snapshot_path: Option<String>,
verify_ledger: bool,
) -> (BankForks, Vec<BankForksInfo>, LeaderScheduleCache) {
if snapshot_path.is_some() {
let bank_forks =
@@ -318,7 +321,12 @@ fn get_bank_forks(
}
}
let (mut bank_forks, bank_forks_info, leader_schedule_cache) =
blocktree_processor::process_blocktree(&genesis_block, &blocktree, account_paths)
blocktree_processor::process_blocktree(
&genesis_block,
&blocktree,
account_paths,
verify_ledger,
)
.expect("process_blocktree failed");
if snapshot_path.is_some() {
bank_forks.set_snapshot_config(snapshot_path);
@@ -331,6 +339,7 @@ pub fn new_banks_from_blocktree(
blocktree_path: &str,
account_paths: Option<String>,
snapshot_path: Option<String>,
verify_ledger: bool,
) -> (
BankForks,
Vec<BankForksInfo>,
@@ -347,8 +356,13 @@ pub fn new_banks_from_blocktree(
Blocktree::open_with_signal(blocktree_path)
.expect("Expected to successfully open database ledger");
let (bank_forks, bank_forks_info, leader_schedule_cache) =
get_bank_forks(&genesis_block, &blocktree, account_paths, snapshot_path);
let (bank_forks, bank_forks_info, leader_schedule_cache) = get_bank_forks(
&genesis_block,
&blocktree,
account_paths,
snapshot_path,
verify_ledger,
);
(
bank_forks,
@@ -412,6 +426,7 @@ pub fn new_validator_for_tests() -> (Validator, ContactInfo, Keypair, String) {
&voting_keypair,
&storage_keypair,
None,
true,
&ValidatorConfig::default(),
);
discover_cluster(&contact_info.gossip, 1).expect("Node startup failed");
@@ -447,6 +462,7 @@ mod tests {
&voting_keypair,
&storage_keypair,
Some(&leader_node.info),
true,
&ValidatorConfig::default(),
);
validator.close().unwrap();
@@ -478,6 +494,7 @@ mod tests {
&voting_keypair,
&storage_keypair,
Some(&leader_node.info),
true,
&ValidatorConfig::default(),
)
})

View File

@@ -7,6 +7,8 @@ use rand_chacha::ChaChaRng;
use std::iter;
use std::ops::Div;
/// Returns a list of indexes shuffled based on the input weights
/// Note - The sum of all weights must not exceed `u64::MAX`
pub fn weighted_shuffle<T>(weights: Vec<T>, rng: ChaChaRng) -> Vec<usize>
where
T: Copy + PartialOrd + iter::Sum + Div<T, Output = T> + FromPrimitive + ToPrimitive,
@@ -17,10 +19,13 @@ where
.into_iter()
.enumerate()
.map(|(i, v)| {
let x = (total_weight / v).to_u32().unwrap();
let x = (total_weight / v)
.to_u64()
.expect("values > u64::max are not supported");
(
i,
(&mut rng).gen_range(1, u64::from(std::u16::MAX)) * u64::from(x),
// capture the u64 into u128s to prevent overflow
(&mut rng).gen_range(1, u128::from(std::u16::MAX)) * u128::from(x),
)
})
.sorted_by(|(_, l_val), (_, r_val)| l_val.cmp(r_val))
@@ -73,4 +78,18 @@ mod tests {
assert_eq!(x, y);
});
}
#[test]
fn test_weighted_shuffle_imbalanced() {
let mut weights = vec![std::u32::MAX as u64; 3];
weights.push(1);
let shuffle = weighted_shuffle(weights.clone(), ChaChaRng::from_seed([0x5a; 32]));
shuffle.into_iter().for_each(|x| {
if x == weights.len() - 1 {
assert_eq!(weights[x], 1);
} else {
assert_eq!(weights[x], std::u32::MAX as u64);
}
});
}
}

View File

@@ -219,6 +219,7 @@ impl WindowService {
.num_threads(sys_info::cpu_num().unwrap_or(NUM_THREADS) as usize)
.build()
.unwrap();
let mut now = Instant::now();
loop {
if exit.load(Ordering::Relaxed) {
break;
@@ -242,12 +243,19 @@ impl WindowService {
) {
match e {
Error::RecvTimeoutError(RecvTimeoutError::Disconnected) => break,
Error::RecvTimeoutError(RecvTimeoutError::Timeout) => (),
Error::RecvTimeoutError(RecvTimeoutError::Timeout) => {
if now.elapsed() > Duration::from_secs(30) {
warn!("Window does not seem to be receiving data. Ensure port configuration is correct...");
now = Instant::now();
}
}
_ => {
inc_new_counter_error!("streamer-window-error", 1, 1);
error!("window error: {:?}", e);
}
}
} else {
now = Instant::now();
}
}
})

View File

@@ -98,7 +98,7 @@ fn test_replay() {
completed_slots_receiver,
leader_schedule_cache,
_,
) = validator::new_banks_from_blocktree(&blocktree_path, None, None);
) = validator::new_banks_from_blocktree(&blocktree_path, None, None, true);
let working_bank = bank_forks.working_bank();
assert_eq!(
working_bank.get_balance(&mint_keypair.pubkey()),

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-drone"
version = "0.16.3"
version = "0.16.7"
description = "Solana Drone"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -20,9 +20,9 @@ clap = "2.33"
log = "0.4.2"
serde = "1.0.92"
serde_derive = "1.0.92"
solana-logger = { path = "../logger", version = "0.16.3" }
solana-metrics = { path = "../metrics", version = "0.16.3" }
solana-sdk = { path = "../sdk", version = "0.16.3" }
solana-logger = { path = "../logger", version = "0.16.7" }
solana-metrics = { path = "../metrics", version = "0.16.7" }
solana-sdk = { path = "../sdk", version = "0.16.7" }
tokio = "0.1"
tokio-codec = "0.1"

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-genesis"
description = "Blockchain, Rebuilt for Scale"
version = "0.16.3"
version = "0.16.7"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -15,24 +15,24 @@ serde = "1.0.92"
serde_derive = "1.0.92"
serde_json = "1.0.39"
serde_yaml = "0.8.9"
solana = { path = "../core", version = "0.16.3" }
solana-bpf-loader-api = { path = "../programs/bpf_loader_api", version = "0.16.3" }
solana-bpf-loader-program = { path = "../programs/bpf_loader_program", version = "0.16.3" }
solana-budget-api = { path = "../programs/budget_api", version = "0.16.3" }
solana-budget-program = { path = "../programs/budget_program", version = "0.16.3" }
solana-config-api = { path = "../programs/config_api", version = "0.16.3" }
solana-config-program = { path = "../programs/config_program", version = "0.16.3" }
solana-exchange-api = { path = "../programs/exchange_api", version = "0.16.3" }
solana-exchange-program = { path = "../programs/exchange_program", version = "0.16.3" }
solana-sdk = { path = "../sdk", version = "0.16.3" }
solana-stake-api = { path = "../programs/stake_api", version = "0.16.3" }
solana-stake-program = { path = "../programs/stake_program", version = "0.16.3" }
solana-storage-api = { path = "../programs/storage_api", version = "0.16.3" }
solana-storage-program = { path = "../programs/storage_program", version = "0.16.3" }
solana-token-api = { path = "../programs/token_api", version = "0.16.3" }
solana-token-program = { path = "../programs/token_program", version = "0.16.3" }
solana-vote-api = { path = "../programs/vote_api", version = "0.16.3" }
solana-vote-program = { path = "../programs/vote_program", version = "0.16.3" }
solana = { path = "../core", version = "0.16.7" }
solana-bpf-loader-api = { path = "../programs/bpf_loader_api", version = "0.16.7" }
solana-bpf-loader-program = { path = "../programs/bpf_loader_program", version = "0.16.7" }
solana-budget-api = { path = "../programs/budget_api", version = "0.16.7" }
solana-budget-program = { path = "../programs/budget_program", version = "0.16.7" }
solana-config-api = { path = "../programs/config_api", version = "0.16.7" }
solana-config-program = { path = "../programs/config_program", version = "0.16.7" }
solana-exchange-api = { path = "../programs/exchange_api", version = "0.16.7" }
solana-exchange-program = { path = "../programs/exchange_program", version = "0.16.7" }
solana-sdk = { path = "../sdk", version = "0.16.7" }
solana-stake-api = { path = "../programs/stake_api", version = "0.16.7" }
solana-stake-program = { path = "../programs/stake_program", version = "0.16.7" }
solana-storage-api = { path = "../programs/storage_api", version = "0.16.7" }
solana-storage-program = { path = "../programs/storage_program", version = "0.16.7" }
solana-token-api = { path = "../programs/token_api", version = "0.16.7" }
solana-token-program = { path = "../programs/token_program", version = "0.16.7" }
solana-vote-api = { path = "../programs/vote_api", version = "0.16.7" }
solana-vote-program = { path = "../programs/vote_program", version = "0.16.7" }
[dev-dependencies]
hashbrown = "0.3.0"

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-gossip"
description = "Blockchain, Rebuilt for Scale"
version = "0.16.3"
version = "0.16.7"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -11,10 +11,10 @@ homepage = "https://solana.com/"
[dependencies]
clap = "2.33.0"
env_logger = "0.6.1"
solana = { path = "../core", version = "0.16.3" }
solana-client = { path = "../client", version = "0.16.3" }
solana-netutil = { path = "../netutil", version = "0.16.3" }
solana-sdk = { path = "../sdk", version = "0.16.3" }
solana = { path = "../core", version = "0.16.7" }
solana-client = { path = "../client", version = "0.16.7" }
solana-netutil = { path = "../netutil", version = "0.16.7" }
solana-sdk = { path = "../sdk", version = "0.16.7" }
[features]
cuda = []

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-install"
description = "The solana cluster software installer"
version = "0.16.3"
version = "0.16.7"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -28,13 +28,14 @@ log = "0.4.2"
nix = "0.14.1"
reqwest = "0.9.18"
ring = "0.13.2"
semver = "0.7.0"
serde = "1.0.92"
serde_derive = "1.0.92"
serde_yaml = "0.8.9"
solana-client = { path = "../client", version = "0.16.3" }
solana-config-api = { path = "../programs/config_api", version = "0.16.3" }
solana-logger = { path = "../logger", version = "0.16.3" }
solana-sdk = { path = "../sdk", version = "0.16.3" }
solana-client = { path = "../client", version = "0.16.7" }
solana-config-api = { path = "../programs/config_api", version = "0.16.7" }
solana-logger = { path = "../logger", version = "0.16.7" }
solana-sdk = { path = "../sdk", version = "0.16.7" }
tar = "0.4.26"
tempdir = "0.3.7"
url = "1.7.2"

View File

@@ -245,7 +245,7 @@ fn get_update_manifest(
let mut data = rpc_client
.get_account_data(update_manifest_pubkey)
.map_err(|err| format!("Unable to fetch update manifest: {}", err))?;
data.split_off(ConfigKeys::serialized_size(vec![]));
let data = data.split_off(ConfigKeys::serialized_size(vec![]));
let signed_update_manifest =
SignedUpdateManifest::deserialize(update_manifest_pubkey, &data)
@@ -498,13 +498,19 @@ pub fn init(
json_rpc_url: &str,
update_manifest_pubkey: &Pubkey,
no_modify_path: bool,
release_semver: Option<&str>,
) -> Result<(), String> {
let config = {
// Write new config file only if different, so that running |solana-install init|
// repeatedly doesn't unnecessarily re-download
let mut current_config = Config::load(config_file).unwrap_or_default();
current_config.current_update_manifest = None;
let config = Config::new(data_dir, json_rpc_url, update_manifest_pubkey);
let config = Config::new(
data_dir,
json_rpc_url,
update_manifest_pubkey,
release_semver,
);
if current_config != config {
config.save(config_file)?;
}
@@ -525,24 +531,42 @@ pub fn init(
Ok(())
}
fn github_download_url(release_semver: &str) -> String {
format!(
"https://github.com/solana-labs/solana/releases/download/v{}/solana-release-{}.tar.bz2",
release_semver,
crate::build_env::TARGET
)
}
pub fn info(config_file: &str, local_info_only: bool) -> Result<Option<UpdateManifest>, String> {
let config = Config::load(config_file)?;
println_name_value("JSON RPC URL:", &config.json_rpc_url);
println_name_value(
"Update manifest pubkey:",
&config.update_manifest_pubkey.to_string(),
);
println_name_value("Configuration:", &config_file);
println_name_value(
"Active release directory:",
&config.active_release_dir().to_str().unwrap_or("?"),
);
if let Some(release_semver) = &config.release_semver {
println_name_value(&format!("{}Release version:", BULLET), &release_semver);
println_name_value(
&format!("{}Release URL:", BULLET),
&github_download_url(release_semver),
);
return Ok(None);
}
println_name_value("JSON RPC URL:", &config.json_rpc_url);
println_name_value(
"Update manifest pubkey:",
&config.update_manifest_pubkey.to_string(),
);
fn print_update_manifest(update_manifest: &UpdateManifest) {
let when = Local.timestamp(update_manifest.timestamp_secs as i64, 0);
println_name_value(&format!("{}release date", BULLET), &when.to_string());
println_name_value(&format!("{}release date:", BULLET), &when.to_string());
println_name_value(
&format!("{}download URL", BULLET),
&format!("{}download URL:", BULLET),
&update_manifest.download_url,
);
}
@@ -675,7 +699,29 @@ fn symlink_dir<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q) -> std::io::Resul
}
pub fn update(config_file: &str) -> Result<bool, String> {
let mut config = Config::load(config_file)?;
let update_manifest = info(config_file, false)?;
let release_dir = if let Some(release_semver) = &config.release_semver {
let download_url = github_download_url(release_semver);
let release_dir = config.release_dir(&release_semver);
let ok_dir = release_dir.join(".ok");
if ok_dir.exists() {
return Ok(false);
}
let (_temp_dir, temp_archive, _temp_archive_sha256) =
download_to_temp_archive(&download_url, None)
.map_err(|err| format!("Unable to download {}: {}", download_url, err))?;
extract_release_archive(&temp_archive, &release_dir).map_err(|err| {
format!(
"Unable to extract {:?} to {:?}: {}",
temp_archive, release_dir, err
)
})?;
let _ = fs::create_dir_all(ok_dir);
release_dir
} else {
if update_manifest.is_none() {
return Ok(false);
}
@@ -687,13 +733,12 @@ pub fn update(config_file: &str) -> Result<bool, String> {
Err("Unable to update as system time seems unreliable".to_string())?
}
let mut config = Config::load(config_file)?;
if let Some(ref current_update_manifest) = config.current_update_manifest {
if update_manifest.timestamp_secs < current_update_manifest.timestamp_secs {
Err("Unable to update to an older version".to_string())?
}
}
let release_dir = config.release_dir(&update_manifest.download_sha256);
let (_temp_dir, temp_archive, _temp_archive_sha256) = download_to_temp_archive(
&update_manifest.download_url,
Some(&update_manifest.download_sha256),
@@ -704,9 +749,6 @@ pub fn update(config_file: &str) -> Result<bool, String> {
update_manifest.download_url, err
)
})?;
let release_dir = config.release_dir(&update_manifest.download_sha256);
extract_release_archive(&temp_archive, &release_dir).map_err(|err| {
format!(
"Unable to extract {:?} to {:?}: {}",
@@ -714,6 +756,10 @@ pub fn update(config_file: &str) -> Result<bool, String> {
)
})?;
config.current_update_manifest = Some(update_manifest);
release_dir
};
let release_target = load_release_target(&release_dir).map_err(|err| {
format!(
"Unable to load release target from {:?}: {}",
@@ -739,7 +785,6 @@ pub fn update(config_file: &str) -> Result<bool, String> {
)
})?;
config.current_update_manifest = Some(update_manifest);
config.save(config_file)?;
println!(" {}{}", SPARKLE, style("Update successful").bold());

View File

@@ -11,17 +11,24 @@ pub struct Config {
pub update_manifest_pubkey: Pubkey,
pub current_update_manifest: Option<UpdateManifest>,
pub update_poll_secs: u64,
pub release_semver: Option<String>,
releases_dir: PathBuf,
active_release_dir: PathBuf,
}
impl Config {
pub fn new(data_dir: &str, json_rpc_url: &str, update_manifest_pubkey: &Pubkey) -> Self {
pub fn new(
data_dir: &str,
json_rpc_url: &str,
update_manifest_pubkey: &Pubkey,
release_semver: Option<&str>,
) -> Self {
Self {
json_rpc_url: json_rpc_url.to_string(),
update_manifest_pubkey: *update_manifest_pubkey,
current_update_manifest: None,
update_poll_secs: 60, // check for updates once a minute
release_semver: release_semver.map(|s| s.to_string()),
releases_dir: PathBuf::from(data_dir).join("releases"),
active_release_dir: PathBuf::from(data_dir).join("active_release"),
}
@@ -64,7 +71,7 @@ impl Config {
self.active_release_dir.join("bin")
}
pub fn release_dir(&self, release_sha256: &str) -> PathBuf {
self.releases_dir.join(release_sha256)
pub fn release_dir(&self, release_id: &str) -> PathBuf {
self.releases_dir.join(release_id)
}
}

View File

@@ -1,4 +1,4 @@
pub const JSON_RPC_URL: &str = "https://api.testnet.solana.com/";
pub const JSON_RPC_URL: &str = "http://testnet.solana.com:8899";
lazy_static! {
pub static ref CONFIG_FILE: Option<String> = {

View File

@@ -33,6 +33,13 @@ fn is_pubkey(string: String) -> Result<(), String> {
}
}
fn is_semver(string: String) -> Result<(), String> {
match semver::Version::parse(&string) {
Ok(_) => Ok(()),
Err(err) => Err(format!("{:?}", err)),
}
}
pub fn main() -> Result<(), String> {
solana_logger::setup();
@@ -98,7 +105,15 @@ pub fn main() -> Result<(), String> {
Some(default_value) => arg.default_value(default_value),
None => arg,
}
}),
})
.arg(
Arg::with_name("release_semver")
.value_name("release-semver")
.index(1)
.conflicts_with_all(&["json_rpc_url", "update_manifest_pubkey"])
.validator(is_semver)
.help("The exact version to install. Updates will not be available if this argument is used"),
),
)
.subcommand(
SubCommand::with_name("info")
@@ -191,6 +206,7 @@ pub fn main() -> Result<(), String> {
.unwrap();
let data_dir = matches.value_of("data_dir").unwrap();
let no_modify_path = matches.is_present("no_modify_path");
let release_semver = matches.value_of("release_semver");
command::init(
config_file,
@@ -198,6 +214,7 @@ pub fn main() -> Result<(), String> {
json_rpc_url,
&update_manifest_pubkey,
no_modify_path,
release_semver,
)
}
("info", Some(matches)) => {
@@ -292,6 +309,14 @@ pub fn main_init() -> Result<(), String> {
None => arg,
}
})
.arg(
Arg::with_name("release_semver")
.value_name("release-semver")
.index(1)
.conflicts_with_all(&["json_rpc_url", "update_manifest_pubkey"])
.validator(is_semver)
.help("The exact version to install. Updates will not be available if this argument is used"),
)
.get_matches();
let config_file = matches.value_of("config_file").unwrap();
@@ -304,6 +329,7 @@ pub fn main_init() -> Result<(), String> {
.unwrap();
let data_dir = matches.value_of("data_dir").unwrap();
let no_modify_path = matches.is_present("no_modify_path");
let release_semver = matches.value_of("release_semver");
command::init(
config_file,
@@ -311,5 +337,6 @@ pub fn main_init() -> Result<(), String> {
json_rpc_url,
&update_manifest_pubkey,
no_modify_path,
release_semver,
)
}

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-keygen"
version = "0.16.3"
version = "0.16.7"
description = "Solana key generation utility"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -15,7 +15,7 @@ cuda = []
[dependencies]
clap = "2.33"
dirs = "2.0.1"
solana-sdk = { path = "../sdk", version = "0.16.3" }
solana-sdk = { path = "../sdk", version = "0.16.7" }
[[bin]]
name = "solana-keygen"

View File

@@ -1,7 +1,7 @@
[package]
name = "solana-kvstore"
description = "Embedded Key-Value store for solana"
version = "0.16.3"
version = "0.16.7"
homepage = "https://solana.com/"
repository = "https://github.com/solana-labs/solana"
authors = ["Solana Maintainers <maintainers@solana.com>"]

View File

@@ -3,18 +3,22 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2018"
name = "solana-ledger-tool"
description = "Blockchain, Rebuilt for Scale"
version = "0.16.3"
version = "0.16.7"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
[dependencies]
bincode = "1.1.4"
clap = "2.33.0"
serde_json = "1.0.39"
solana = { path = "../core", version = "0.16.3" }
solana-logger = { path = "../logger", version = "0.16.3" }
solana-runtime = { path = "../runtime", version = "0.16.3" }
solana-sdk = { path = "../sdk", version = "0.16.3" }
serde = "1.0.94"
serde_derive = "1.0.94"
serde_json = "1.0.40"
serde_yaml = "0.8.9"
solana = { path = "../core", version = "0.16.7" }
solana-logger = { path = "../logger", version = "0.16.7" }
solana-runtime = { path = "../runtime", version = "0.16.7" }
solana-sdk = { path = "../sdk", version = "0.16.7" }
[dev-dependencies]
assert_cmd = "0.11"

View File

@@ -2,8 +2,11 @@ use clap::{crate_description, crate_name, crate_version, value_t, App, Arg, SubC
use solana::blocktree::Blocktree;
use solana::blocktree_processor::process_blocktree;
use solana_sdk::genesis_block::GenesisBlock;
use std::collections::BTreeMap;
use std::fs::File;
use std::io::{stdout, Write};
use std::process::exit;
use std::str::FromStr;
#[derive(PartialEq)]
enum LedgerOutputMethod {
@@ -58,6 +61,7 @@ fn output_ledger(blocktree: Blocktree, starting_slot: u64, method: LedgerOutputM
}
fn main() {
const DEFAULT_ROOT_COUNT: &str = "1";
solana_logger::setup();
let matches = App::new(crate_name!())
.about(crate_description!())
@@ -82,6 +86,37 @@ fn main() {
.subcommand(SubCommand::with_name("print").about("Print the ledger"))
.subcommand(SubCommand::with_name("json").about("Print the ledger in JSON format"))
.subcommand(SubCommand::with_name("verify").about("Verify the ledger's PoH"))
.subcommand(SubCommand::with_name("prune").about("Prune the ledger at the block height").arg(
Arg::with_name("slot_list")
.long("slot-list")
.value_name("FILENAME")
.takes_value(true)
.required(true)
.help("The location of the YAML file with a list of rollback slot heights and hashes"),
))
.subcommand(SubCommand::with_name("list-roots").about("Output upto last <num-roots> root hashes and their heights starting at the given block height").arg(
Arg::with_name("max_height")
.long("max-height")
.value_name("NUM")
.takes_value(true)
.required(true)
.help("Maximum block height"),
).arg(
Arg::with_name("slot_list")
.long("slot-list")
.value_name("FILENAME")
.required(false)
.takes_value(true)
.help("The location of the output YAML file. A list of rollback slot heights and hashes will be written to the file."),
).arg(
Arg::with_name("num_roots")
.long("num-roots")
.value_name("NUM")
.takes_value(true)
.default_value(DEFAULT_ROOT_COUNT)
.required(false)
.help("Number of roots in the output"),
))
.get_matches();
let ledger_path = matches.value_of("ledger").unwrap();
@@ -113,7 +148,7 @@ fn main() {
}
("verify", _) => {
println!("Verifying ledger...");
match process_blocktree(&genesis_block, &blocktree, None) {
match process_blocktree(&genesis_block, &blocktree, None, true) {
Ok((_bank_forks, bank_forks_info, _)) => {
println!("{:?}", bank_forks_info);
}
@@ -123,6 +158,97 @@ fn main() {
}
}
}
("prune", Some(args_matches)) => {
if let Some(prune_file_path) = args_matches.value_of("slot_list") {
let prune_file = File::open(prune_file_path.to_string()).unwrap();
let slot_hashes: BTreeMap<u64, String> =
serde_yaml::from_reader(prune_file).unwrap();
let iter = blocktree
.rooted_slot_iterator(0)
.expect("Failed to get rooted slot");
let potential_hashes: Vec<_> = iter
.filter_map(|(slot, meta)| {
let blockhash = blocktree
.get_slot_entries(slot, meta.last_index, Some(1))
.unwrap()
.first()
.unwrap()
.hash
.to_string();
slot_hashes.get(&slot).and_then(|hash| {
if *hash == blockhash {
Some((slot, blockhash))
} else {
None
}
})
})
.collect();
let (target_slot, target_hash) = potential_hashes
.last()
.expect("Failed to find a valid slot");
println!("Prune at slot {:?} hash {:?}", target_slot, target_hash);
blocktree.prune(*target_slot);
}
}
("list-roots", Some(args_matches)) => {
let max_height = if let Some(height) = args_matches.value_of("max_height") {
usize::from_str(height).expect("Maximum height must be a number")
} else {
panic!("Maximum height must be provided");
};
let num_roots = if let Some(roots) = args_matches.value_of("num_roots") {
usize::from_str(roots).expect("Number of roots must be a number")
} else {
usize::from_str(DEFAULT_ROOT_COUNT).unwrap()
};
let iter = blocktree
.rooted_slot_iterator(0)
.expect("Failed to get rooted slot");
let slot_hash: Vec<_> = iter
.filter_map(|(slot, meta)| {
if slot <= max_height as u64 {
let blockhash = blocktree
.get_slot_entries(slot, meta.last_index, Some(1))
.unwrap()
.first()
.unwrap()
.hash;
Some((slot, blockhash))
} else {
None
}
})
.collect();
let mut output_file: Box<Write> = if let Some(path) = args_matches.value_of("slot_list")
{
match File::create(path) {
Ok(file) => Box::new(file),
_ => Box::new(stdout()),
}
} else {
Box::new(stdout())
};
slot_hash
.into_iter()
.rev()
.enumerate()
.for_each(|(i, (slot, hash))| {
if i < num_roots {
output_file
.write_all(format!("{:?}: {:?}\n", slot, hash).as_bytes())
.expect("failed to write");
}
});
}
("", _) => {
eprintln!("{}", matches.usage());
exit(1);

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-logger"
version = "0.16.3"
version = "0.16.7"
description = "Solana Logger"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-merkle-tree"
version = "0.16.3"
version = "0.16.7"
description = "Solana Merkle Tree"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -9,7 +9,7 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk = { path = "../sdk", version = "0.16.3" }
solana-sdk = { path = "../sdk", version = "0.16.7" }
[dev-dependencies]
hex = "0.3.2"

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-metrics"
version = "0.16.3"
version = "0.16.7"
description = "Solana Metrics"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -14,7 +14,7 @@ influx_db_client = "0.3.6"
lazy_static = "1.3.0"
log = "0.4.2"
reqwest = "0.9.18"
solana-sdk = { path = "../sdk", version = "0.16.3" }
solana-sdk = { path = "../sdk", version = "0.16.7" }
sys-info = "0.5.7"
[dev-dependencies]

View File

@@ -125,20 +125,11 @@ macro_rules! datapoint_debug {
}
lazy_static! {
static ref HOST_INFO: String = {
let v = env::var("SOLANA_METRICS_DISPLAY_HOSTNAME")
.map(|x| {
x.parse()
.expect("Failed to parse SOLANA_METRICS_DISPLAY_HOSTNAME")
static ref HOST_ID: String = {
env::var("SOLANA_METRICS_HOST_ID").unwrap_or_else(|_| {
let hostname: String = hostname().unwrap_or_else(|_| "".to_string());
format!("host-{}", hash(hostname.as_bytes())).to_string()
})
.unwrap_or(0);
let name: String = hostname().unwrap_or_else(|_| "".to_string());
if v == 0 {
hash(name.as_bytes()).to_string()
} else {
name
}
};
}
@@ -254,7 +245,7 @@ impl MetricsAgent {
let extra = influxdb::Point::new("metrics")
.add_timestamp(timing::timestamp() as i64)
.add_field("host_id", influxdb::Value::String(HOST_INFO.to_string()))
.add_field("host_id", influxdb::Value::String(HOST_ID.to_string()))
.add_field(
"points_written",
influxdb::Value::Integer(points_written as i64),
@@ -351,7 +342,7 @@ impl MetricsAgent {
}
pub fn submit(&self, mut point: influxdb::Point, level: log::Level) {
point.add_field("host_id", influxdb::Value::String(HOST_INFO.to_string()));
point.add_field("host_id", influxdb::Value::String(HOST_ID.to_string()));
if point.timestamp.is_none() {
point.timestamp = Some(timing::timestamp() as i64);
}
@@ -461,7 +452,7 @@ pub fn set_panic_hook(program: &'static str) {
None => "?".to_string(),
}),
)
.add_field("host_id", influxdb::Value::String(HOST_INFO.to_string()))
.add_field("host_id", influxdb::Value::String(HOST_ID.to_string()))
.to_owned(),
Level::Error,
);

View File

@@ -11,7 +11,9 @@ set -e
for i in "$SOLANA_RSYNC_CONFIG_DIR" "$SOLANA_CONFIG_DIR"; do
echo "Cleaning $i"
rm -rvf "${i:?}/" # <-- $i might be a symlink, rm the other side of it first
rm -rvf "$i"
mkdir -p "$i"
done
setup_secondary_mount

View File

@@ -72,13 +72,15 @@ SOLANA_RSYNC_CONFIG_DIR=$SOLANA_ROOT/config
# Configuration that remains local
SOLANA_CONFIG_DIR=$SOLANA_ROOT/config-local
# If there is a secondary disk, symlink the config-local dir there
SECONDARY_DISK_MOUNT_POINT=/mnt/extra-disk
setup_secondary_mount() {
# If there is a secondary disk, symlink the config-local dir there
if [[ -d $SECONDARY_DISK_MOUNT_POINT ]]; then
mkdir -p $SECONDARY_DISK_MOUNT_POINT/config-local
mkdir -p "$SOLANA_ROOT"
ln -s $SECONDARY_DISK_MOUNT_POINT/config-local "$SOLANA_ROOT"
rm -rf "$SOLANA_CONFIG_DIR"
ln -sfT $SECONDARY_DISK_MOUNT_POINT/config-local "$SOLANA_CONFIG_DIR"
fi
}
default_arg() {
declare name=$1

View File

@@ -18,15 +18,17 @@ fullnode_usage() {
cat <<EOF
Fullnode Usage:
usage: $0 [--blockstream PATH] [--init-complete-file FILE] [--label LABEL] [--stake LAMPORTS] [--no-voting] [--rpc-port port] [rsync network path to bootstrap leader configuration] [cluster entry point]
usage: $0 [--config-dir PATH] [--blockstream PATH] [--init-complete-file FILE] [--label LABEL] [--stake LAMPORTS] [--no-voting] [--rpc-port port] [rsync network path to bootstrap leader configuration] [cluster entry point]
Start a validator or a replicator
--config-dir PATH - store configuration and data files under this PATH
--blockstream PATH - open blockstream at this unix domain socket location
--init-complete-file FILE - create this file, if it doesn't already exist, once node initialization is complete
--label LABEL - Append the given label to the configuration files, useful when running
multiple fullnodes in the same workspace
--stake LAMPORTS - Number of lamports to stake
--node-lamports LAMPORTS - Number of lamports this node has been funded from the genesis block
--no-voting - start node without vote signer
--rpc-port port - custom RPC port for this node
--no-restart - do not restart the node if it exits
@@ -84,43 +86,61 @@ setup_validator_accounts() {
echo "Vote and stake accounts have already been configured"
else
if ((airdrops_enabled)); then
# Fund the node with enough tokens to fund its Vote, Staking, and Storage accounts
echo "Fund the node with enough tokens to fund its Vote, Staking, and Storage accounts"
(
declare fees=100 # TODO: No hardcoded transaction fees, fetch the current cluster fees
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" airdrop $((node_lamports+stake_lamports+fees)) || return $?
set -x
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" \
airdrop $((node_lamports+stake_lamports+fees))
) || return $?
else
echo "current account balance is "
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" balance || return $?
fi
# Fund the vote account from the node, with the node as the identity_pubkey
echo "Fund the vote account from the node's identity pubkey"
(
set -x
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" \
create-vote-account "$vote_pubkey" "$identity_pubkey" 1 --commission 127 || return $?
create-vote-account "$vote_pubkey" "$identity_pubkey" 1 --commission 127
) || return $?
# Fund the stake account from the node, with the node as the identity_pubkey
echo "Fund the stake account from the node's identity pubkey"
(
set -x
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" \
create-stake-account "$stake_pubkey" "$stake_lamports" || return $?
create-stake-account "$stake_pubkey" "$stake_lamports"
) || return $?
# Delegate the stake. The transaction fee is paid by the node but the
echo "Delegate the stake account to the node's vote account"
# transaction must be signed by the stake_keypair
(
set -x
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" \
delegate-stake "$stake_keypair_path" "$vote_pubkey" "$stake_lamports" || return $?
delegate-stake "$stake_keypair_path" "$vote_pubkey" "$stake_lamports"
) || return $?
# Setup validator storage account
echo "Create validator storage account"
(
set -x
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" \
create-validator-storage-account "$identity_pubkey" "$storage_pubkey" || return $?
create-validator-storage-account "$identity_pubkey" "$storage_pubkey"
) || return $?
touch "$configured_flag"
fi
echo "Identity account balance:"
(
set -x
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" balance
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" \
show-vote-account "$vote_pubkey"
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" \
show-stake-account "$stake_pubkey"
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" \
show-storage-account "$storage_pubkey"
echo "Identity account balance:"
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" balance
)
return 0
}
@@ -132,21 +152,31 @@ setup_replicator_account() {
echo "Replicator account has already been configured"
else
if ((airdrops_enabled)); then
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" airdrop "$node_lamports" || return $?
(
set -x
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899"
airdrop "$node_lamports"
) || return $?
else
echo "current account balance is "
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" balance || return $?
fi
# Setup replicator storage account
echo "Create replicator storage account"
(
set -x
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" \
create-replicator-storage-account "$identity_pubkey" "$storage_pubkey" || return $?
create-replicator-storage-account "$identity_pubkey" "$storage_pubkey"
) || return $?
touch "$configured_flag"
fi
(
set -x
$solana_wallet --keypair "$identity_keypair_path" --url "http://$entrypoint_ip:8899" \
show-storage-account "$storage_pubkey"
)
return 0
}
@@ -169,6 +199,8 @@ no_restart=0
airdrops_enabled=1
generate_snapshots=0
boot_from_snapshot=1
reset_ledger=0
config_dir=
positional_args=()
while [[ -n $1 ]]; do
@@ -215,9 +247,15 @@ while [[ -n $1 ]]; do
elif [[ $1 = --stake ]]; then
stake_lamports="$2"
shift 2
elif [[ $1 = --node-lamports ]]; then
node_lamports="$2"
shift 2
elif [[ $1 = --no-voting ]]; then
args+=("$1")
shift
elif [[ $1 = --skip-ledger-verify ]]; then
args+=("$1")
shift
elif [[ $1 = --no-sigverify ]]; then
args+=("$1")
shift
@@ -233,6 +271,12 @@ while [[ -n $1 ]]; do
elif [[ $1 = --no-airdrop ]]; then
airdrops_enabled=0
shift
elif [[ $1 = --reset-ledger ]]; then
reset_ledger=1
shift
elif [[ $1 = --config-dir ]]; then
config_dir=$2
shift 2
elif [[ $1 = -h ]]; then
fullnode_usage "$@"
else
@@ -245,6 +289,16 @@ while [[ -n $1 ]]; do
fi
done
if [[ -n $REQUIRE_CONFIG_DIR ]]; then
if [[ -z $config_dir ]]; then
fullnode_usage "Error: --config-dir not specified"
fi
SOLANA_RSYNC_CONFIG_DIR="$config_dir"/config
SOLANA_CONFIG_DIR="$config_dir"/config-local
fi
setup_secondary_mount
if [[ $node_type = replicator ]]; then
if [[ ${#positional_args[@]} -gt 2 ]]; then
@@ -326,6 +380,7 @@ else
fi
identity_pubkey=$($solana_keygen pubkey "$identity_keypair_path")
export SOLANA_METRICS_HOST_ID="$identity_pubkey"
if [[ $node_type != replicator ]]; then
accounts_config_dir="$state_dir"/accounts
@@ -366,17 +421,31 @@ PS4="$(basename "$0"): "
pid=
kill_fullnode() {
# Note: do not echo anything from this function to ensure $pid is actually
# killed when stdout/stderr are redirected
set +ex
if [[ -n $pid ]]; then
declare _pid=$pid
pid=
echo "killing pid $_pid"
kill "$_pid" || true
wait "$_pid" || true
echo "$_pid killed"
fi
exit
}
trap 'kill_fullnode' INT TERM ERR
if ((reset_ledger)); then
echo "Resetting ledger..."
(
set -x
rm -rf "$state_dir"
rm -rf "$ledger_config_dir"
)
if [[ -d "$SOLANA_RSYNC_CONFIG_DIR"/ledger/ ]]; then
cp -a "$SOLANA_RSYNC_CONFIG_DIR"/ledger/ "$ledger_config_dir"
fi
fi
while true; do
if [[ $node_type != bootstrap_leader ]] && new_gensis_block; then
# If the genesis block has changed remove the now stale ledger and
@@ -468,6 +537,7 @@ EOF
======================[ $node_type configuration ]======================
identity pubkey: $identity_pubkey
vote pubkey: $vote_pubkey
stake pubkey: $stake_pubkey
storage pubkey: $storage_pubkey
ledger: $ledger_config_dir
accounts: $accounts_config_dir
@@ -491,8 +561,8 @@ EOF
secs_to_next_genesis_poll=5
secs_to_next_snapshot=30
while true; do
if ! kill -0 "$pid"; then
wait "$pid" || true
if [[ -z $pid ]] || ! kill -0 "$pid"; then
[[ -z $pid ]] || wait "$pid"
echo "############## $node_type exited, restarting ##############"
break
fi

View File

@@ -3,6 +3,7 @@
here=$(dirname "$0")
# shellcheck source=multinode-demo/common.sh
source "$here"/common.sh
setup_secondary_mount
set -e
"$here"/clear-config.sh

View File

@@ -24,6 +24,8 @@ Operate a configured testnet
restart - Shortcut for stop then start
update - Live update all network nodes
logs - Fetch remote logs from each network node
startnode- Start an individual node (previously stopped with stopNode)
stopnode - Stop an individual node
start/update-specific options:
-T [tarFilename] - Deploy the specified release tarball
@@ -54,12 +56,27 @@ Operate a configured testnet
--hashes-per-tick NUM_HASHES|sleep|auto
- Override the default --hashes-per-tick for the cluster
--no-airdrop
- If set, disables airdrops. Nodes must be funded in genesis block when airdrops are disabled.
--lamports NUM_LAMPORTS_TO_MINT
- Override the default 100000000000000 lamports minted in genesis
--stake-internal-nodes NUM_LAMPORTS_PER_NODE
- Amount to stake internal nodes in genesis block. If set, airdrops are disabled.
--internal-nodes-stake-lamports NUM_LAMPORTS_PER_NODE
- Amount to stake internal nodes.
--internal-nodes-lamports NUM_LAMPORTS_PER_NODE
- Amount to fund internal nodes in genesis block.
--external-accounts-file FILE_PATH
- A YML file with a list of account pubkeys and corresponding stakes for external nodes
- A YML file with a list of account pubkeys and corresponding lamport balances in genesis block for external nodes
--no-snapshot
- If set, disables booting validators from a snapshot
--skip-ledger-verify
- If set, validators will skip verifying
the ledger they already have saved to disk at
boot (results in a much faster boot)
--no-deploy
- Don't deploy new software, use the
existing deployment
sanity/start/update-specific options:
-F - Discard validator nodes that didn't bootup successfully
-o noLedgerVerify - Skip ledger verification
@@ -73,6 +90,9 @@ Operate a configured testnet
logs-specific options:
none
startnode/stopnode-specific options:
-i [ip address] - IP Address of the node to start or stop
Note: if RUST_LOG is set in the environment it will be propogated into the
network nodes.
EOF
@@ -87,6 +107,7 @@ skipSetup=false
updateNodes=false
customPrograms=
updatePlatforms=
nodeAddress=
numBenchTpsClients=0
numBenchExchangeClients=0
benchTpsExtraArgs=
@@ -96,7 +117,11 @@ genesisOptions=
numFullnodesRequested=
externalPrimordialAccountsFile=
remoteExternalPrimordialAccountsFile=
stakeNodesInGenesisBlock=
internalNodesStakeLamports=
internalNodesLamports=
maybeNoSnapshot=""
maybeSkipLedgerVerify=""
maybeDisableAirdrops=""
command=$1
[[ -n $command ]] || usage
@@ -114,16 +139,31 @@ while [[ -n $1 ]]; do
elif [[ $1 = --lamports ]]; then
genesisOptions="$genesisOptions $1 $2"
shift 2
elif [[ $1 = --no-snapshot ]]; then
maybeNoSnapshot="$1"
shift 1
elif [[ $1 = --no-deploy ]]; then
deployMethod=skip
shift 1
elif [[ $1 = --skip-ledger-verify ]]; then
maybeSkipLedgerVerify="$1"
shift 1
elif [[ $1 = --deploy-update ]]; then
updatePlatforms="$updatePlatforms $2"
shift 2
elif [[ $1 = --stake-internal-nodes ]]; then
stakeNodesInGenesisBlock="$2"
elif [[ $1 = --internal-nodes-stake-lamports ]]; then
internalNodesStakeLamports="$2"
shift 2
elif [[ $1 = --internal-nodes-lamports ]]; then
internalNodesLamports="$2"
shift 2
elif [[ $1 = --external-accounts-file ]]; then
externalPrimordialAccountsFile="$2"
remoteExternalPrimordialAccountsFile=/tmp/external-primordial-accounts.yml
shift 2
elif [[ $1 = --no-airdrop ]]; then
maybeDisableAirdrops="$1"
shift 1
else
usage "Unknown long option: $1"
fi
@@ -314,8 +354,8 @@ startCommon() {
startBootstrapLeader() {
declare ipAddress=$1
declare logFile="$2"
declare nodeIndex="$3"
declare nodeIndex="$2"
declare logFile="$3"
echo "--- Starting bootstrap leader: $ipAddress"
echo "start log: $logFile"
@@ -333,11 +373,14 @@ startBootstrapLeader() {
local)
rsync -vPrc -e "ssh ${sshOptions[*]}" "$SOLANA_ROOT"/farf/bin/* "$ipAddress:~/.cargo/bin/"
;;
skip)
;;
*)
usage "Internal error: invalid deployMethod: $deployMethod"
;;
esac
# shellcheck disable=SC2086 # Don't want to double quote "$maybeNoSnapshot $maybeSkipLedgerVerify"
ssh "${sshOptions[@]}" -n "$ipAddress" \
"./solana/net/remote/remote-node.sh \
$deployMethod \
@@ -348,11 +391,14 @@ startBootstrapLeader() {
$skipSetup \
$failOnValidatorBootupFailure \
\"$remoteExternalPrimordialAccountsFile\" \
\"$stakeNodesInGenesisBlock\" \
\"$maybeDisableAirdrops\" \
\"$internalNodesStakeLamports\" \
\"$internalNodesLamports\" \
$nodeIndex \
$numBenchTpsClients \"$benchTpsExtraArgs\" \
$numBenchExchangeClients \"$benchExchangeExtraArgs\" \
\"$genesisOptions\" \
"$maybeNoSnapshot $maybeSkipLedgerVerify" \
"
) >> "$logFile" 2>&1 || {
cat "$logFile"
@@ -367,6 +413,16 @@ startNode() {
declare nodeIndex="$3"
declare logFile="$netLogDir/fullnode-$ipAddress.log"
if [[ -z $nodeType ]]; then
echo nodeType not specified
exit 1
fi
if [[ -z $nodeIndex ]]; then
echo nodeIndex not specified
exit 1
fi
echo "--- Starting $nodeType: $ipAddress"
echo "start log: $logFile"
(
@@ -399,9 +455,14 @@ startNode() {
$skipSetup \
$failOnValidatorBootupFailure \
\"$remoteExternalPrimordialAccountsFile\" \
\"$stakeNodesInGenesisBlock\" \
\"$maybeDisableAirdrops\" \
\"$internalNodesStakeLamports\" \
\"$internalNodesLamports\" \
$nodeIndex \
$numBenchTpsClients \"$benchTpsExtraArgs\" \
$numBenchExchangeClients \"$benchExchangeExtraArgs\" \
\"$genesisOptions\" \
\"$maybeNoSnapshot $maybeSkipLedgerVerify\" \
"
) >> "$logFile" 2>&1 &
declare pid=$!
@@ -487,7 +548,35 @@ deployUpdate() {
) || ok=false
$ok || exit 1
done
}
getNodeType() {
echo "getNodeType: $nodeAddress"
[[ -n $nodeAddress ]] || {
echo "Error: nodeAddress not set"
exit 1
}
nodeIndex=0 # <-- global
nodeType=validator # <-- global
for ipAddress in "${fullnodeIpList[@]}" b "${blockstreamerIpList[@]}" r "${replicatorIpList[@]}"; do
if [[ $ipAddress = b ]]; then
nodeType=blockstreamer
continue
elif [[ $ipAddress = r ]]; then
nodeType=replicator
continue
fi
if [[ $ipAddress = "$nodeAddress" ]]; then
echo "getNodeType: $nodeType ($nodeIndex)"
return
fi
((nodeIndex = nodeIndex + 1))
done
echo "Error: Unknown node: $nodeAddress"
exit 1
}
start() {
@@ -518,6 +607,8 @@ start() {
local)
build
;;
skip)
;;
*)
usage "Internal error: invalid deployMethod: $deployMethod"
;;
@@ -531,23 +622,14 @@ start() {
fi
declare bootstrapLeader=true
declare nodeType=validator
declare loopCount=0
for ipAddress in "${fullnodeIpList[@]}" b "${blockstreamerIpList[@]}" r "${replicatorIpList[@]}"; do
if [[ $ipAddress = b ]]; then
nodeType=blockstreamer
continue
elif [[ $ipAddress = r ]]; then
nodeType=replicator
continue
fi
if $updateNodes; then
stopNode "$ipAddress" true
fi
for nodeAddress in "${fullnodeIpList[@]}" "${blockstreamerIpList[@]}" "${replicatorIpList[@]}"; do
nodeType=
nodeIndex=
getNodeType
if $bootstrapLeader; then
SECONDS=0
declare bootstrapNodeDeployTime=
startBootstrapLeader "$ipAddress" "$netLogDir/bootstrap-leader-$ipAddress.log" $loopCount
startBootstrapLeader "$nodeAddress" $nodeIndex "$netLogDir/bootstrap-leader-$ipAddress.log"
bootstrapNodeDeployTime=$SECONDS
$metricsWriteDatapoint "testnet-deploy net-bootnode-leader-started=1"
@@ -555,15 +637,18 @@ start() {
SECONDS=0
pids=()
else
startNode "$ipAddress" $nodeType $loopCount
startNode "$ipAddress" $nodeType $nodeIndex
# Stagger additional node start time. If too many nodes start simultaneously
# the bootstrap node gets more rsync requests from the additional nodes than
# it can handle.
((loopCount++ % 2 == 0)) && sleep 2
if ((nodeIndex % 2 == 0)); then
sleep 2
fi
fi
done
for pid in "${pids[@]}"; do
declare ok=true
wait "$pid" || ok=false
@@ -619,6 +704,8 @@ start() {
local)
networkVersion="$(git rev-parse HEAD || echo local-unknown)"
;;
skip)
;;
*)
usage "Internal error: invalid deployMethod: $deployMethod"
;;
@@ -713,10 +800,21 @@ stop)
stop
;;
stopnode)
if [[ -z $nodeAddress ]]; then
usage "node address (-i) not specified"
exit 1
fi
stopNode "$nodeAddress" true
;;
startnode)
startNode "$nodeAddress" validator
if [[ -z $nodeAddress ]]; then
usage "node address (-i) not specified"
exit 1
fi
nodeType=
nodeIndex=
getNodeType
startNode "$nodeAddress" $nodeType $nodeIndex
;;
logs)
fetchRemoteLog() {

View File

@@ -41,6 +41,8 @@ local|tar)
net/scripts/rsync-retry.sh -vPrc "$entrypointIp:~/.cargo/bin/solana*" ~/.cargo/bin/
;;
skip)
;;
*)
echo "Unknown deployment method: $deployMethod"
exit 1

View File

@@ -12,13 +12,16 @@ RUST_LOG="$5"
skipSetup="$6"
failOnValidatorBootupFailure="$7"
externalPrimordialAccountsFile="$8"
stakeNodesInGenesisBlock="$9"
nodeIndex="${10}"
numBenchTpsClients="${11}"
benchTpsExtraArgs="${12}"
numBenchExchangeClients="${13}"
benchExchangeExtraArgs="${14}"
genesisOptions="${15}"
maybeDisableAirdrops="$9"
internalNodesStakeLamports="${10}"
internalNodesLamports="${11}"
nodeIndex="${12}"
numBenchTpsClients="${13}"
benchTpsExtraArgs="${14}"
numBenchExchangeClients="${15}"
benchExchangeExtraArgs="${16}"
genesisOptions="${17}"
extraNodeArgs="${18}"
set +x
export RUST_LOG
@@ -28,7 +31,7 @@ export RUST_LOG
# trouble
#
# Ref: https://github.com/solana-labs/solana/issues/3798
stake=424243
stake=${internalNodesStakeLamports:=424243}
missing() {
echo "Error: $1 not specified"
@@ -43,7 +46,7 @@ missing() {
[[ -n $failOnValidatorBootupFailure ]] || missing failOnValidatorBootupFailure
airdropsEnabled=true
if [[ -n $stakeNodesInGenesisBlock ]]; then
if [[ -n $maybeDisableAirdrops ]]; then
airdropsEnabled=false
fi
cat > deployConfig <<EOF
@@ -75,10 +78,9 @@ waitForNodeToInit() {
}
case $deployMethod in
local|tar)
local|tar|skip)
PATH="$HOME"/.cargo/bin:"$PATH"
export USE_INSTALL=1
export SOLANA_METRICS_DISPLAY_HOSTNAME=1
# Setup `/var/snap/solana/current` symlink so rsyncing the genesis
# ledger works (reference: `net/scripts/install-rsync.sh`)
@@ -105,14 +107,15 @@ local|tar)
export SOLANA_CUDA=1
fi
set -x
if [[ $skipSetup != true ]]; then
rm -rf ./solana-node-keys
rm -rf ./solana-node-stakes
mkdir ./solana-node-stakes
if [[ -n $stakeNodesInGenesisBlock ]]; then
rm -rf ./solana-node-balances
mkdir ./solana-node-balances
if [[ -n $internalNodesLamports ]]; then
for i in $(seq 0 "$numNodes"); do
solana-keygen new -o ./solana-node-keys/"$i"
pubkey="$(solana-keygen pubkey ./solana-node-keys/"$i")"
echo "${pubkey}: $stakeNodesInGenesisBlock" >> ./solana-node-stakes/fullnode-stakes.yml
echo "${pubkey}: $internalNodesLamports" >> ./solana-node-balances/fullnode-balances.yml
done
fi
@@ -143,22 +146,25 @@ local|tar)
tail -n +2 -q ./solana-client-accounts/bench-exchange"$i".yml >> ./solana-client-accounts/client-accounts.yml
echo "" >> ./solana-client-accounts/client-accounts.yml
done
[[ -z $externalPrimordialAccountsFile ]] || cat "$externalPrimordialAccountsFile" >> ./solana-node-stakes/fullnode-stakes.yml
if [ -f ./solana-node-stakes/fullnode-stakes.yml ]; then
genesisOptions+=" --primordial-accounts-file ./solana-node-stakes/fullnode-stakes.yml"
[[ -z $externalPrimordialAccountsFile ]] || cat "$externalPrimordialAccountsFile" >> ./solana-node-balances/fullnode-balances.yml
if [ -f ./solana-node-balances/fullnode-balances.yml ]; then
genesisOptions+=" --primordial-accounts-file ./solana-node-balances/fullnode-balances.yml"
fi
if [ -f ./solana-client-accounts/client-accounts.yml ]; then
genesisOptions+=" --primordial-keypairs-file ./solana-client-accounts/client-accounts.yml"
fi
if [[ $skipSetup != true ]]; then
args=(
--bootstrap-leader-stake-lamports "$stake"
)
if [[ -n $internalNodesLamports ]]; then
args+=(--bootstrap-leader-lamports "$internalNodesLamports")
fi
# shellcheck disable=SC2206 # Do not want to quote $genesisOptions
args+=($genesisOptions)
./multinode-demo/setup.sh "${args[@]}"
fi
if [[ -z $stakeNodesInGenesisBlock ]]; then
if [[ $airdropsEnabled = true ]]; then
./multinode-demo/drone.sh > drone.log 2>&1 &
fi
args=(
@@ -166,18 +172,24 @@ local|tar)
--gossip-port "$entrypointIp":8001
)
if [[ -n $stakeNodesInGenesisBlock ]]; then
if [[ $airdropsEnabled != true ]]; then
args+=(--no-airdrop)
fi
args+=(--init-complete-file "$initCompleteFile")
# shellcheck disable=SC2206 # Don't want to double quote $extraNodeArgs
args+=($extraNodeArgs)
nohup ./multinode-demo/validator.sh --bootstrap-leader "${args[@]}" > fullnode.log 2>&1 &
waitForNodeToInit
;;
validator|blockstreamer)
if [[ $deployMethod != skip ]]; then
net/scripts/rsync-retry.sh -vPrc "$entrypointIp":~/.cargo/bin/ ~/.cargo/bin/
fi
if [[ $skipSetup != true ]]; then
rm -f ~/solana/fullnode-identity.json
[[ -z $stakeNodesInGenesisBlock ]] || net/scripts/rsync-retry.sh -vPrc \
[[ -z $internalNodesLamports ]] || net/scripts/rsync-retry.sh -vPrc \
"$entrypointIp":~/solana/solana-node-keys/"$nodeIndex" ~/solana/fullnode-identity.json
fi
if [[ -e /dev/nvidia0 && -x ~/.cargo/bin/solana-validator-cuda ]]; then
echo Selecting solana-validator-cuda
@@ -194,18 +206,20 @@ local|tar)
--blockstream /tmp/solana-blockstream.sock
--no-voting
--stake 0
--generate-snapshots
)
else
args+=(--stake "$stake")
args+=(--enable-rpc-exit)
if [[ -n $internalNodesLamports ]]; then
args+=(--node-lamports "$internalNodesLamports")
fi
fi
if [[ -f ~/solana/fullnode-identity.json ]]; then
args+=(--identity ~/solana/fullnode-identity.json)
fi
if [[ -n $stakeNodesInGenesisBlock ]]; then
if [[ $airdropsEnabled != true ]]; then
args+=(--no-airdrop)
fi
@@ -220,7 +234,7 @@ local|tar)
# a static IP/DNS name for hosting the blockexplorer web app, and is
# a location that somebody would expect to be able to airdrop from
scp "$entrypointIp":~/solana/config-local/mint-keypair.json config-local/
if [[ -z $stakeNodesInGenesisBlock ]]; then
if [[ $airdropsEnabled = true ]]; then
./multinode-demo/drone.sh > drone.log 2>&1 &
fi
@@ -231,7 +245,7 @@ local|tar)
fi
export BLOCKEXPLORER_GEOIP_WHITELIST=$PWD/net/config/geoip.yml
npm install @solana/blockexplorer@1.17.2
npm install @solana/blockexplorer@1.32.0
npx solana-blockexplorer > blockexplorer.log 2>&1 &
# Confirm the blockexplorer is accessible
@@ -247,23 +261,33 @@ local|tar)
fi
args+=(--init-complete-file "$initCompleteFile")
# shellcheck disable=SC2206 # Don't want to double quote $extraNodeArgs
args+=($extraNodeArgs)
nohup ./multinode-demo/validator.sh "${args[@]}" > fullnode.log 2>&1 &
waitForNodeToInit
;;
replicator)
if [[ $deployMethod != skip ]]; then
net/scripts/rsync-retry.sh -vPrc "$entrypointIp":~/.cargo/bin/ ~/.cargo/bin/
fi
args=(
"$entrypointIp":~/solana "$entrypointIp:8001"
)
if [[ -n $stakeNodesInGenesisBlock ]]; then
if [[ $airdropsEnabled != true ]]; then
args+=(--no-airdrop)
fi
if [[ -n $internalNodesLamports ]] ; then
args+=(--node-lamports "$internalNodesLamports")
fi
if [[ $skipSetup != true ]]; then
./multinode-demo/clear-config.sh
fi
# shellcheck disable=SC2206 # Don't want to double quote $extraNodeArgs
args+=($extraNodeArgs)
nohup ./multinode-demo/replicator.sh "${args[@]}" > fullnode.log 2>&1 &
sleep 1
;;

View File

@@ -67,7 +67,7 @@ source net/common.sh
loadConfigFile
case $deployMethod in
local|tar)
local|tar|skip)
PATH="$HOME"/.cargo/bin:"$PATH"
export USE_INSTALL=1
if [[ -r target/perf-libs/env.sh ]]; then
@@ -158,7 +158,7 @@ echo "--- $sanityTargetIp: validator sanity"
if $validatorSanity; then
(
set -x -o pipefail
timeout 10s ./multinode-demo/validator-x.sh --stake 0 \
timeout 10s ./multinode-demo/validator-x.sh --no-restart --stake 0 \
"$entrypointRsyncUrl" \
"$sanityTargetIp:8001" 2>&1 | tee validator-sanity.log
) || {

View File

@@ -4,6 +4,9 @@ set -ex
[[ $(uname) = Linux ]] || exit 1
[[ $USER = root ]] || exit 1
if grep -q solana /etc/passwd ; then
echo "User solana already exists"
else
adduser solana --gecos "" --disabled-password --quiet
adduser solana sudo
adduser solana adm
@@ -26,4 +29,4 @@ sudo -u solana bash -c "
StrictHostKeyChecking no
\" > config
"
fi

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-netutil"
version = "0.16.3"
version = "0.16.7"
description = "Solana Network Utilities"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -15,7 +15,7 @@ log = "0.4.2"
nix = "0.14.1"
rand = "0.6.1"
socket2 = "0.3.9"
solana-logger = { path = "../logger", version = "0.16.3" }
solana-logger = { path = "../logger", version = "0.16.7" }
tokio = "0.1"
[lib]

View File

@@ -1,7 +1,7 @@
[package]
name = "solana-bpf-programs"
description = "Blockchain, Rebuilt for Scale"
version = "0.16.3"
version = "0.16.7"
documentation = "https://docs.rs/solana"
homepage = "https://solana.com/"
readme = "README.md"
@@ -9,6 +9,7 @@ repository = "https://github.com/solana-labs/solana"
authors = ["Solana Maintainers <maintainers@solana.com>"]
license = "Apache-2.0"
edition = "2018"
publish = false
[features]
bpf_c = []
@@ -21,10 +22,10 @@ walkdir = "2"
bincode = "1.1.4"
byteorder = "1.3.2"
elf = "0.0.10"
solana-bpf-loader-api = { path = "../bpf_loader_api", version = "0.16.3" }
solana-logger = { path = "../../logger", version = "0.16.3" }
solana-runtime = { path = "../../runtime", version = "0.16.3" }
solana-sdk = { path = "../../sdk", version = "0.16.3" }
solana-bpf-loader-api = { path = "../bpf_loader_api", version = "0.16.7" }
solana-logger = { path = "../../logger", version = "0.16.7" }
solana-runtime = { path = "../../runtime", version = "0.16.7" }
solana-sdk = { path = "../../sdk", version = "0.16.7" }
solana_rbpf = "=0.1.13"
[[bench]]

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-128bit"
version = "0.16.3"
version = "0.16.7"
description = "Solana BPF iter program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,8 +12,8 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.3" }
solana-bpf-rust-128bit-dep = { path = "../128bit_dep", version = "0.16.3" }
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.7" }
solana-bpf-rust-128bit-dep = { path = "../128bit_dep", version = "0.16.7" }
[workspace]
members = []

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-128bit-dep"
version = "0.16.3"
version = "0.16.7"
description = "Solana BPF many-args-dep program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,7 +12,7 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.3" }
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.7" }
[workspace]
members = []

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-alloc"
version = "0.16.3"
version = "0.16.7"
description = "Solana BPF alloc program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,7 +12,7 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.3" }
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.7" }
[workspace]
members = []

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-dep-crate"
version = "0.16.3"
version = "0.16.7"
description = "Solana BPF dep-crate program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -13,7 +13,7 @@ edition = "2018"
[dependencies]
byteorder = { version = "1", default-features = false }
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.3" }
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.7" }
[workspace]
members = []

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-iter"
version = "0.16.3"
version = "0.16.7"
description = "Solana BPF iter program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,7 +12,7 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.3" }
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.7" }
[workspace]
members = []

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-many-args"
version = "0.16.3"
version = "0.16.7"
description = "Solana BPF many-args program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,8 +12,8 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.3" }
solana-bpf-rust-many-args-dep = { path = "../many_args_dep", version = "0.16.3" }
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.7" }
solana-bpf-rust-many-args-dep = { path = "../many_args_dep", version = "0.16.7" }
[workspace]
members = []

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-many-args-dep"
version = "0.16.3"
version = "0.16.7"
description = "Solana BPF many-args-dep program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,7 +12,7 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.3" }
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.7" }
[workspace]
members = []

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-noop"
version = "0.16.3"
version = "0.16.7"
description = "Solana BPF noop program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,7 +12,7 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.3" }
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.7" }
[workspace]
members = []

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-panic"
version = "0.16.3"
version = "0.16.7"
description = "Solana BPF iter program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,7 +12,7 @@ homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.3" }
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.7" }
[workspace]
members = []

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-bpf-rust-tick-height"
version = "0.16.3"
version = "0.16.7"
description = "Solana BPF noop program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -14,7 +14,7 @@ edition = "2018"
[dependencies]
byteorder = { version = "1", default-features = false }
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.3" }
solana-sdk-bpf-utils = { path = "../../../../sdk/bpf/rust/rust-utils", version = "0.16.7" }
[workspace]
members = []

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-loader-api"
version = "0.16.3"
version = "0.16.7"
description = "Solana BPF Loader"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -14,8 +14,8 @@ byteorder = "1.3.2"
libc = "0.2.58"
log = "0.4.2"
serde = "1.0.92"
solana-logger = { path = "../../logger", version = "0.16.3" }
solana-sdk = { path = "../../sdk", version = "0.16.3" }
solana-logger = { path = "../../logger", version = "0.16.7" }
solana-sdk = { path = "../../sdk", version = "0.16.7" }
solana_rbpf = "=0.1.13"
[lib]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-loader-program"
version = "0.16.3"
version = "0.16.7"
description = "Solana BPF Loader"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,9 +10,9 @@ edition = "2018"
[dependencies]
log = "0.4.2"
solana-logger = { path = "../../logger", version = "0.16.3" }
solana-sdk = { path = "../../sdk", version = "0.16.3" }
solana-bpf-loader-api = { path = "../bpf_loader_api", version = "0.16.3" }
solana-logger = { path = "../../logger", version = "0.16.7" }
solana-sdk = { path = "../../sdk", version = "0.16.7" }
solana-bpf-loader-api = { path = "../bpf_loader_api", version = "0.16.7" }
[lib]
crate-type = ["lib", "cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-budget-api"
version = "0.16.3"
version = "0.16.7"
description = "Solana Budget program API"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -16,10 +16,10 @@ num-derive = "0.2"
num-traits = "0.2"
serde = "1.0.92"
serde_derive = "1.0.92"
solana-sdk = { path = "../../sdk", version = "0.16.3" }
solana-sdk = { path = "../../sdk", version = "0.16.7" }
[dev-dependencies]
solana-runtime = { path = "../../runtime", version = "0.16.3" }
solana-runtime = { path = "../../runtime", version = "0.16.7" }
[lib]
crate-type = ["lib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-budget-program"
version = "0.16.3"
version = "0.16.7"
description = "Solana budget program"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,9 +10,9 @@ edition = "2018"
[dependencies]
log = "0.4.2"
solana-budget-api = { path = "../budget_api", version = "0.16.3" }
solana-logger = { path = "../../logger", version = "0.16.3" }
solana-sdk = { path = "../../sdk", version = "0.16.3" }
solana-budget-api = { path = "../budget_api", version = "0.16.7" }
solana-logger = { path = "../../logger", version = "0.16.7" }
solana-sdk = { path = "../../sdk", version = "0.16.7" }
[lib]
crate-type = ["lib", "cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-config-api"
version = "0.16.3"
version = "0.16.7"
description = "config program API"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -13,11 +13,11 @@ bincode = "1.1.4"
log = "0.4.2"
serde = "1.0.92"
serde_derive = "1.0.92"
solana-logger = { path = "../../logger", version = "0.16.3" }
solana-sdk = { path = "../../sdk", version = "0.16.3" }
solana-logger = { path = "../../logger", version = "0.16.7" }
solana-sdk = { path = "../../sdk", version = "0.16.7" }
[dev-dependencies]
solana-runtime = { path = "../../runtime", version = "0.16.3" }
solana-runtime = { path = "../../runtime", version = "0.16.7" }
[lib]
crate-type = ["lib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-config-program"
version = "0.16.3"
version = "0.16.7"
description = "config program"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,9 +10,9 @@ edition = "2018"
[dependencies]
log = "0.4.2"
solana-config-api = { path = "../config_api", version = "0.16.3" }
solana-logger = { path = "../../logger", version = "0.16.3" }
solana-sdk = { path = "../../sdk", version = "0.16.3" }
solana-config-api = { path = "../config_api", version = "0.16.7" }
solana-logger = { path = "../../logger", version = "0.16.7" }
solana-sdk = { path = "../../sdk", version = "0.16.7" }
[lib]
crate-type = ["lib", "cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-exchange-api"
version = "0.16.3"
version = "0.16.7"
description = "Solana Exchange program API"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -13,12 +13,12 @@ bincode = "1.1.4"
log = "0.4.2"
serde = "1.0.92"
serde_derive = "1.0.92"
solana-logger = { path = "../../logger", version = "0.16.3" }
solana-metrics = { path = "../../metrics", version = "0.16.3" }
solana-sdk = { path = "../../sdk", version = "0.16.3" }
solana-logger = { path = "../../logger", version = "0.16.7" }
solana-metrics = { path = "../../metrics", version = "0.16.7" }
solana-sdk = { path = "../../sdk", version = "0.16.7" }
[dev-dependencies]
solana-runtime = { path = "../../runtime", version = "0.16.3" }
solana-runtime = { path = "../../runtime", version = "0.16.7" }
[lib]
crate-type = ["lib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-exchange-program"
version = "0.16.3"
version = "0.16.7"
description = "Solana exchange program"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,9 +10,9 @@ edition = "2018"
[dependencies]
log = "0.4.2"
solana-exchange-api = { path = "../exchange_api", version = "0.16.3" }
solana-logger = { path = "../../logger", version = "0.16.3" }
solana-sdk = { path = "../../sdk", version = "0.16.3" }
solana-exchange-api = { path = "../exchange_api", version = "0.16.7" }
solana-logger = { path = "../../logger", version = "0.16.7" }
solana-sdk = { path = "../../sdk", version = "0.16.7" }
[lib]
crate-type = ["lib", "cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-failure-program"
version = "0.16.3"
version = "0.16.7"
description = "Solana failure program"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,10 +10,10 @@ edition = "2018"
[dependencies]
log = "0.4.2"
solana-sdk = { path = "../../sdk", version = "0.16.3" }
solana-sdk = { path = "../../sdk", version = "0.16.7" }
[dev-dependencies]
solana-runtime = { path = "../../runtime", version = "0.16.3" }
solana-runtime = { path = "../../runtime", version = "0.16.7" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,24 +1,23 @@
use solana_runtime::bank::Bank;
use solana_runtime::bank_client::BankClient;
use solana_runtime::loader_utils::{create_invoke_instruction, load_program};
use solana_runtime::loader_utils::create_invoke_instruction;
use solana_sdk::client::SyncClient;
use solana_sdk::genesis_block::create_genesis_block;
use solana_sdk::instruction::InstructionError;
use solana_sdk::native_loader;
use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::KeypairUtil;
use solana_sdk::transaction::TransactionError;
#[test]
fn test_program_native_failure() {
let (genesis_block, alice_keypair) = create_genesis_block(50);
let program_id = Pubkey::new_rand();
let bank = Bank::new(&genesis_block);
let bank_client = BankClient::new(bank);
let program = "solana_failure_program".as_bytes().to_vec();
let program_id = load_program(&bank_client, &alice_keypair, &native_loader::id(), program);
bank.register_native_instruction_processor("solana_failure_program", &program_id);
// Call user program
let instruction = create_invoke_instruction(alice_keypair.pubkey(), program_id, &1u8);
let bank_client = BankClient::new(bank);
assert_eq!(
bank_client
.send_instruction(&alice_keypair, instruction)

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-noop-program"
version = "0.16.3"
version = "0.16.7"
description = "Solana noop program"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,8 +10,8 @@ edition = "2018"
[dependencies]
log = "0.4.2"
solana-logger = { path = "../../logger", version = "0.16.3" }
solana-sdk = { path = "../../sdk", version = "0.16.3" }
solana-logger = { path = "../../logger", version = "0.16.7" }
solana-sdk = { path = "../../sdk", version = "0.16.7" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-stake-api"
version = "0.16.3"
version = "0.16.7"
description = "Solana Stake program API"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -14,10 +14,10 @@ log = "0.4.2"
rand = "0.6.5"
serde = "1.0.92"
serde_derive = "1.0.92"
solana-logger = { path = "../../logger", version = "0.16.3" }
solana-metrics = { path = "../../metrics", version = "0.16.3" }
solana-sdk = { path = "../../sdk", version = "0.16.3" }
solana-vote-api = { path = "../vote_api", version = "0.16.3" }
solana-logger = { path = "../../logger", version = "0.16.7" }
solana-metrics = { path = "../../metrics", version = "0.16.7" }
solana-sdk = { path = "../../sdk", version = "0.16.7" }
solana-vote-api = { path = "../vote_api", version = "0.16.7" }
[lib]
crate-type = ["lib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-stake-program"
version = "0.16.3"
version = "0.16.7"
description = "Solana stake program"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,9 +10,9 @@ edition = "2018"
[dependencies]
log = "0.4.2"
solana-logger = { path = "../../logger", version = "0.16.3" }
solana-sdk = { path = "../../sdk", version = "0.16.3" }
solana-stake-api = { path = "../stake_api", version = "0.16.3" }
solana-logger = { path = "../../logger", version = "0.16.7" }
solana-sdk = { path = "../../sdk", version = "0.16.7" }
solana-stake-api = { path = "../stake_api", version = "0.16.7" }
[lib]
crate-type = ["lib", "cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-storage-api"
version = "0.16.3"
version = "0.16.7"
description = "Solana Storage program API"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -17,8 +17,8 @@ num-derive = "0.2"
num-traits = "0.2"
serde = "1.0.92"
serde_derive = "1.0.92"
solana-logger = { path = "../../logger", version = "0.16.3" }
solana-sdk = { path = "../../sdk", version = "0.16.3" }
solana-logger = { path = "../../logger", version = "0.16.7" }
solana-sdk = { path = "../../sdk", version = "0.16.7" }
[lib]
crate-type = ["lib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-storage-program"
version = "0.16.3"
version = "0.16.7"
description = "Solana storage program"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,12 +10,12 @@ edition = "2018"
[dependencies]
log = "0.4.2"
solana-logger = { path = "../../logger", version = "0.16.3" }
solana-sdk = { path = "../../sdk", version = "0.16.3" }
solana-storage-api = { path = "../storage_api", version = "0.16.3" }
solana-logger = { path = "../../logger", version = "0.16.7" }
solana-sdk = { path = "../../sdk", version = "0.16.7" }
solana-storage-api = { path = "../storage_api", version = "0.16.7" }
[dev-dependencies]
solana-runtime = { path = "../../runtime", version = "0.16.3" }
solana-runtime = { path = "../../runtime", version = "0.16.7" }
assert_matches = "1.3.0"
bincode = "1.1.4"

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-token-api"
version = "0.16.3"
version = "0.16.7"
description = "Solana Token API"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -15,8 +15,8 @@ num-derive = "0.2"
num-traits = "0.2"
serde = "1.0.92"
serde_derive = "1.0.92"
solana-logger = { path = "../../logger", version = "0.16.3" }
solana-sdk = { path = "../../sdk", version = "0.16.3" }
solana-logger = { path = "../../logger", version = "0.16.7" }
solana-sdk = { path = "../../sdk", version = "0.16.7" }
[lib]
crate-type = ["lib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-token-program"
version = "0.16.3"
version = "0.16.7"
description = "Solana token program"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,9 +10,9 @@ edition = "2018"
[dependencies]
log = "0.4.2"
solana-logger = { path = "../../logger", version = "0.16.3" }
solana-sdk = { path = "../../sdk", version = "0.16.3" }
solana-token-api = { path = "../token_api", version = "0.16.3" }
solana-logger = { path = "../../logger", version = "0.16.7" }
solana-sdk = { path = "../../sdk", version = "0.16.7" }
solana-token-api = { path = "../token_api", version = "0.16.7" }
[lib]
crate-type = ["lib", "cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-vote-api"
version = "0.16.3"
version = "0.16.7"
description = "Solana Vote program API"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -13,9 +13,9 @@ bincode = "1.1.4"
log = "0.4.2"
serde = "1.0.92"
serde_derive = "1.0.92"
solana-logger = { path = "../../logger", version = "0.16.3" }
solana-metrics = { path = "../../metrics", version = "0.16.3" }
solana-sdk = { path = "../../sdk", version = "0.16.3" }
solana-logger = { path = "../../logger", version = "0.16.7" }
solana-metrics = { path = "../../metrics", version = "0.16.7" }
solana-sdk = { path = "../../sdk", version = "0.16.7" }
[lib]
crate-type = ["lib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-vote-program"
version = "0.16.3"
version = "0.16.7"
description = "Solana Vote program"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,9 +10,9 @@ edition = "2018"
[dependencies]
log = "0.4.2"
solana-logger = { path = "../../logger", version = "0.16.3" }
solana-sdk = { path = "../../sdk", version = "0.16.3" }
solana-vote-api = { path = "../vote_api", version = "0.16.3" }
solana-logger = { path = "../../logger", version = "0.16.7" }
solana-sdk = { path = "../../sdk", version = "0.16.7" }
solana-vote-api = { path = "../vote_api", version = "0.16.7" }
[lib]
crate-type = ["lib", "cdylib"]

Some files were not shown because too many files have changed in this diff Show More