Compare commits

...

33 Commits

Author SHA1 Message Date
Trent Nelson
caa55bb0f2 cli: allow skipping fee-checks when writing program buffers (hidden) 2022-03-25 19:34:26 -06:00
mergify[bot]
fb5b42cabc Add get_confirmed_blocks_with_data method (backport #23618) (#23939)
* add get_confirmed_blocks_with_data and get_protobuf_or_bincode_cells

(cherry picked from commit f3219fb695)

* appease clippy

(cherry picked from commit 5533e9393c)

* use &[T] instead of Vec<T> where appropriate

clippy

(cherry picked from commit fbcf6a0802)

* modify get_protobuf_or_bincode_cells to accept and return an iterator

(cherry picked from commit f717fda9a3)

* make get_protobuf_or_bincode_cells accept IntoIter on row_keys, make get_confirmed_blocks_with_data return an Iterator

(cherry picked from commit d8be0d9430)

Co-authored-by: Edgar Xi <edgarxi97@gmail.com>
2022-03-26 01:13:32 +00:00
mergify[bot]
0c01b236c6 ci: don't allow mergify to add automerge label to merged PRs (#23930)
(cherry picked from commit e34c52934c)

Co-authored-by: Trent Nelson <trent@solana.com>
2022-03-25 16:20:04 +00:00
mergify[bot]
6e02c14055 docs: fix stake state typo (#23776) (#23778)
(cherry picked from commit c556811c0f)

Co-authored-by: g1stavo <gustavocsalvador@gmail.com>
2022-03-22 00:10:40 +00:00
mergify[bot]
a70bce050d Add ability to get the latest incremental snapshot via RPC (#23788) (#23808)
(cherry picked from commit 739e43ba58)

Co-authored-by: DimAn <diman@diman.io>
2022-03-21 20:07:34 +00:00
mergify[bot]
edb38c4bbd validator: --only-known-rpc requires a --known-validator ... (#23767)
(cherry picked from commit ce2e82cfb6)

Co-authored-by: Trent Nelson <trent@solana.com>
2022-03-18 08:54:52 +00:00
Trent Nelson
2e1989bb9b validator: adds --no-incremental-snapshots NOP arg for v1.10 forward compat 2022-03-17 23:50:37 -06:00
mergify[bot]
08f4b19a21 Add accounts_data_len to bank snapshot (backport #23714) (#23758)
* Add accounts_data_len to bank snapshot (#23714)

(cherry picked from commit 7ff8c80e25)

# Conflicts:
#	runtime/src/serde_snapshot/tests.rs

* fix frozen abi hash

Co-authored-by: Brooks Prumo <brooks@solana.com>
2022-03-18 04:44:56 +00:00
mergify[bot]
da6bb66475 Pin version for publish cargo-check (#23716) (#23721)
(cherry picked from commit 330d6db19a)

Co-authored-by: Tyera Eulberg <tyera@solana.com>
2022-03-17 01:52:19 +00:00
Tyera Eulberg
8859f35b26 Bump version to 1.9.14 (#23703)
* Bump version to 1.9.14

* Bump openssl-src
2022-03-16 11:21:18 -06:00
mergify[bot]
3ac7e043a7 Update InvalidRentPayingAccount error (#23680) (#23693)
(cherry picked from commit 410463fb72)

Co-authored-by: Tyera Eulberg <tyera@solana.com>
2022-03-16 05:25:23 +00:00
mergify[bot]
db43c5d46d log hash and lamport result of calculate_accounts_hash_without_index (#23425) (#23676)
(cherry picked from commit d909b7c80b)

Co-authored-by: Jeff Washington (jwash) <wash678@gmail.com>
2022-03-15 19:23:13 +00:00
mergify[bot]
48dc4b3bb2 ledger tool halt at slot verify hash (#23424) (#23677)
(cherry picked from commit ef8b7d9c62)

Co-authored-by: Jeff Washington (jwash) <wash678@gmail.com>
2022-03-15 16:17:29 +00:00
mergify[bot]
b0543a1ae6 docs: update sysvar docs for load_instruction_at_checked (#22925) (#23673)
* docs: update sysvar docs for load_instruction_at_checked

Update the instruction introspection docs to use the updated load_instruction_at_checked function instead of deprecated load_instruction_at

* Update to load_current_index_checked

(cherry picked from commit 64e2d9dc47)

Co-authored-by: Zayyan Faizal <zayyanf@gmail.com>
2022-03-15 12:51:15 +00:00
mergify[bot]
8b0576d954 Rename AccountsDb plugins to Geyser plugins (backport #23604) (#23668)
* Rename AccountsDb plugins to Geyser plugins (#23604)

(cherry picked from commit 102dd68a03)

# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	core/Cargo.toml
#	core/src/replay_stage.rs
#	core/src/tvu.rs
#	geyser-plugin-interface/Cargo.toml
#	geyser-plugin-manager/Cargo.toml
#	geyser-plugin-manager/src/geyser_plugin_service.rs
#	geyser-plugin-manager/src/slot_status_notifier.rs
#	validator/src/bin/solana-test-validator.rs
#	validator/src/main.rs

* Fix conflicts

Co-authored-by: Tyera Eulberg <tyera@solana.com>
2022-03-15 05:04:17 +00:00
mergify[bot]
5c3e1967e6 Add space for keys in calculation for rent exempt in process_set_validator_info (#23485) (#23658)
* Fix `process_set_validator_info`

Add space for keys in calculation for rent exempt in
`process_set_validator_info`.

The space required for allocating the `(ConfigKeys, ValidatorInfo)`
tuple only considered space for `ValidatorInfo`.
But `config_instruction::create_account` also requires space for `n`
keys.

* Remove one clone call from closure

(cherry picked from commit 7eaec26a1c)

Co-authored-by: Enrique Fynn <me@enriquefynn.com>
2022-03-14 23:18:14 +00:00
Michael Vines
06ebed861e Bump publish crate timeout 2022-03-13 21:01:15 -07:00
Michael Vines
52bd1658cc Disable publish of test crates 2022-03-13 20:48:17 -07:00
Michael Vines
07a6b597d0 Update Cargo.toml 2022-03-13 17:22:01 -07:00
Michael Vines
857a541ddb Pin histogram crate version to fix cargo publish
(cherry picked from commit 01b6f97f0b)

# Conflicts:
#	ledger-tool/Cargo.toml
2022-03-13 17:22:01 -07:00
Tyera Eulberg
87fee49ed7 Add token-balance unit test 2022-03-11 20:58:00 -07:00
Will Hickey
3ed915dcc9 Bump version to 1.9.13 (#23614) 2022-03-11 10:09:26 -06:00
Trent Nelson
3875bc91ab Revert "chore: bump dashmap from 4.0.2 to 5.1.0 (#23372) (#23521)" (#23596)
This reverts commit f56b25ac29.
2022-03-11 09:12:46 +01:00
mergify[bot]
e0f5fb887b Ensure blocks do not exceed the max accounts data size during Replay Stage (backport #23422) (#23589)
* Ensure blocks do not exceed the max accounts data size during Replay Stage (#23422)

(cherry picked from commit 3c6840050c)

# Conflicts:
#	runtime/src/bank.rs

* fix conflicts

Co-authored-by: Brooks Prumo <brooks@solana.com>
2022-03-10 18:59:46 +00:00
mergify[bot]
49952e05cf Report even if slot begins and ends in process_buffered_packets() (#23549) (#23576)
(cherry picked from commit 588414a776)

Co-authored-by: carllin <carl@solana.com>
2022-03-10 07:59:26 +00:00
Will Hickey
4a100fbe3b Bump version to 1.9.12 (#23577) 2022-03-09 23:22:45 -06:00
Tao Zhu
607a98e9d0 remove persist_cost_table code 2022-03-09 21:06:00 -07:00
Tao Zhu
86a97563b5 Patch validator from loading persisted program costs 2022-03-09 21:06:00 -07:00
mergify[bot]
4e5d9885da Revert exponential moving average cost model changes (backport #23541) (#23543)
* Revert "fix tests after merge"

This reverts commit ba2d83f580.

(cherry picked from commit 0a17edcc1f)

* Revert "1. Persist to blockstore less frequently;"

This reverts commit 7aa1fb4e24.

(cherry picked from commit c878c9e2cb)

# Conflicts:
#	core/src/cost_update_service.rs
#	core/src/tvu.rs
#	runtime/src/cost_model.rs

* Revert "use EMA in place of Welford"

This reverts commit 6587dbfa47.

(cherry picked from commit 9acbfa5eb1)

* Revert "- estimate a program cost as 2 standard deviation above mean"

This reverts commit a25ac1c988.

(cherry picked from commit 5a0cd05866)

# Conflicts:
#	core/src/cost_update_service.rs
#	runtime/src/cost_model.rs

* fix merge conflicts

Co-authored-by: Carl Lin <carl@solana.com>
Co-authored-by: Tao Zhu <tao@solana.com>
2022-03-09 03:55:36 +00:00
mergify[bot]
714cf0eff2 solana-validator set-identity no longer writes a tower file unnecessarily (#23542)
(cherry picked from commit b719d6a2ad)

Co-authored-by: Michael Vines <mvines@gmail.com>
2022-03-09 01:55:14 +00:00
mergify[bot]
babba3b0ff Fix getting the golden snapshot hashes during bootstrap with Incremental Snapshots (#23518) (#23532)
(cherry picked from commit 9b80452c7c)

Co-authored-by: Brooks Prumo <brooks@solana.com>
2022-03-08 23:07:26 +00:00
Michael Vines
8c59fa5a73 Update regex to v1.5.5
(cherry picked from commit 536a99705b)
2022-03-08 11:53:30 -08:00
Stephen Akridge
de694402ca Bump version to 1.9.11 2022-03-08 10:53:04 -08:00
196 changed files with 2427 additions and 1977 deletions

View File

@@ -93,6 +93,7 @@ pull_request_rules:
- author=mergify[bot]
- head~=^mergify/bp/
- "#status-failure=0"
- "-merged"
actions:
label:
add:

485
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +1,14 @@
[workspace]
members = [
"accountsdb-plugin-interface",
"accountsdb-plugin-manager",
"accounts-cluster-bench",
"bench-streamer",
"bench-tps",
"account-decoder",
"accounts-bench",
"accounts-cluster-bench",
"banking-bench",
"banks-client",
"banks-interface",
"banks-server",
"bench-streamer",
"bench-tps",
"bucket_map",
"bloom",
"clap-utils",
@@ -26,6 +25,8 @@ members = [
"validator",
"genesis",
"genesis-utils",
"geyser-plugin-interface",
"geyser-plugin-manager",
"gossip",
"install",
"keygen",
@@ -69,7 +70,6 @@ members = [
"tokens",
"transaction-dos",
"transaction-status",
"account-decoder",
"upload-perf",
"net-utils",
"version",

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-account-decoder"
version = "1.9.10"
version = "1.9.14"
description = "Solana account decoder"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -19,9 +19,9 @@ lazy_static = "1.4.0"
serde = "1.0.130"
serde_derive = "1.0.103"
serde_json = "1.0.72"
solana-config-program = { path = "../programs/config", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.10" }
solana-config-program = { path = "../programs/config", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.14" }
spl-token = { version = "=3.2.0", features = ["no-entrypoint"] }
thiserror = "1.0"
zstd = "0.9.0"

View File

@@ -2,7 +2,7 @@
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2021"
name = "solana-accounts-bench"
version = "1.9.10"
version = "1.9.14"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -11,11 +11,11 @@ publish = false
[dependencies]
log = "0.4.14"
rayon = "1.5.1"
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-runtime = { path = "../runtime", version = "=1.9.10" }
solana-measure = { path = "../measure", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-version = { path = "../version", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-runtime = { path = "../runtime", version = "=1.9.14" }
solana-measure = { path = "../measure", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-version = { path = "../version", version = "=1.9.14" }
clap = "2.33.1"
[package.metadata.docs.rs]

View File

@@ -2,7 +2,7 @@
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2021"
name = "solana-accounts-cluster-bench"
version = "1.9.10"
version = "1.9.14"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -13,25 +13,25 @@ clap = "2.33.1"
log = "0.4.14"
rand = "0.7.0"
rayon = "1.5.1"
solana-account-decoder = { path = "../account-decoder", version = "=1.9.10" }
solana-clap-utils = { path = "../clap-utils", version = "=1.9.10" }
solana-client = { path = "../client", version = "=1.9.10" }
solana-core = { path = "../core", version = "=1.9.10" }
solana-faucet = { path = "../faucet", version = "=1.9.10" }
solana-gossip = { path = "../gossip", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-measure = { path = "../measure", version = "=1.9.10" }
solana-net-utils = { path = "../net-utils", version = "=1.9.10" }
solana-runtime = { path = "../runtime", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-streamer = { path = "../streamer", version = "=1.9.10" }
solana-test-validator = { path = "../test-validator", version = "=1.9.10" }
solana-transaction-status = { path = "../transaction-status", version = "=1.9.10" }
solana-version = { path = "../version", version = "=1.9.10" }
solana-account-decoder = { path = "../account-decoder", version = "=1.9.14" }
solana-clap-utils = { path = "../clap-utils", version = "=1.9.14" }
solana-client = { path = "../client", version = "=1.9.14" }
solana-core = { path = "../core", version = "=1.9.14" }
solana-faucet = { path = "../faucet", version = "=1.9.14" }
solana-gossip = { path = "../gossip", version = "=1.9.14" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-measure = { path = "../measure", version = "=1.9.14" }
solana-net-utils = { path = "../net-utils", version = "=1.9.14" }
solana-runtime = { path = "../runtime", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-streamer = { path = "../streamer", version = "=1.9.14" }
solana-test-validator = { path = "../test-validator", version = "=1.9.14" }
solana-transaction-status = { path = "../transaction-status", version = "=1.9.14" }
solana-version = { path = "../version", version = "=1.9.14" }
spl-token = { version = "=3.2.0", features = ["no-entrypoint"] }
[dev-dependencies]
solana-local-cluster = { path = "../local-cluster", version = "=1.9.10" }
solana-local-cluster = { path = "../local-cluster", version = "=1.9.14" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -1,20 +0,0 @@
<p align="center">
<a href="https://solana.com">
<img alt="Solana" src="https://i.imgur.com/IKyzQ6T.png" width="250" />
</a>
</p>
# Solana AccountsDb Plugin Interface
This crate enables an AccountsDb plugin to be plugged into the Solana Validator runtime to take actions
at the time of each account update; for example, saving the account state to an external database. The plugin must implement the `AccountsDbPlugin` trait. Please see the detail of the `accountsdb_plugin_interface.rs` for the interface definition.
The plugin should produce a `cdylib` dynamic library, which must expose a `C` function `_create_plugin()` that
instantiates the implementation of the interface.
The `solana-accountsdb-plugin-postgres` crate provides an example of how to create a plugin which saves the accounts data into an
external PostgreSQL databases.
More information about Solana is available in the [Solana documentation](https://docs.solana.com/).
Still have questions? Ask us on [Discord](https://discordapp.com/invite/pquxPsq)

View File

@@ -1 +0,0 @@
pub mod accountsdb_plugin_interface;

View File

@@ -1,31 +0,0 @@
[package]
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2021"
name = "solana-accountsdb-plugin-manager"
description = "The Solana AccountsDb plugin manager."
version = "1.9.10"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-validator"
[dependencies]
bs58 = "0.4.0"
crossbeam-channel = "0.5"
libloading = "0.7.2"
log = "0.4.11"
serde = "1.0.130"
serde_derive = "1.0.103"
serde_json = "1.0.72"
solana-accountsdb-plugin-interface = { path = "../accountsdb-plugin-interface", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-measure = { path = "../measure", version = "=1.9.10" }
solana-metrics = { path = "../metrics", version = "=1.9.10" }
solana-rpc = { path = "../rpc", version = "=1.9.10" }
solana-runtime = { path = "../runtime", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-transaction-status = { path = "../transaction-status", version = "=1.9.10" }
thiserror = "1.0.30"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -2,7 +2,7 @@
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2021"
name = "solana-banking-bench"
version = "1.9.10"
version = "1.9.14"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -14,17 +14,17 @@ crossbeam-channel = "0.5"
log = "0.4.14"
rand = "0.7.0"
rayon = "1.5.1"
solana-core = { path = "../core", version = "=1.9.10" }
solana-gossip = { path = "../gossip", version = "=1.9.10" }
solana-ledger = { path = "../ledger", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-measure = { path = "../measure", version = "=1.9.10" }
solana-perf = { path = "../perf", version = "=1.9.10" }
solana-poh = { path = "../poh", version = "=1.9.10" }
solana-runtime = { path = "../runtime", version = "=1.9.10" }
solana-streamer = { path = "../streamer", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-version = { path = "../version", version = "=1.9.10" }
solana-core = { path = "../core", version = "=1.9.14" }
solana-gossip = { path = "../gossip", version = "=1.9.14" }
solana-ledger = { path = "../ledger", version = "=1.9.14" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-measure = { path = "../measure", version = "=1.9.14" }
solana-perf = { path = "../perf", version = "=1.9.14" }
solana-poh = { path = "../poh", version = "=1.9.14" }
solana-runtime = { path = "../runtime", version = "=1.9.14" }
solana-streamer = { path = "../streamer", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-version = { path = "../version", version = "=1.9.14" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-banks-client"
version = "1.9.10"
version = "1.9.14"
description = "Solana banks client"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,17 +12,17 @@ edition = "2021"
[dependencies]
borsh = "0.9.1"
futures = "0.3"
solana-banks-interface = { path = "../banks-interface", version = "=1.9.10" }
solana-program = { path = "../sdk/program", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-banks-interface = { path = "../banks-interface", version = "=1.9.14" }
solana-program = { path = "../sdk/program", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
tarpc = { version = "0.27.2", features = ["full"] }
thiserror = "1.0"
tokio = { version = "1", features = ["full"] }
tokio-serde = { version = "0.8", features = ["bincode"] }
[dev-dependencies]
solana-runtime = { path = "../runtime", version = "=1.9.10" }
solana-banks-server = { path = "../banks-server", version = "=1.9.10" }
solana-runtime = { path = "../runtime", version = "=1.9.14" }
solana-banks-server = { path = "../banks-server", version = "=1.9.14" }
[lib]
crate-type = ["lib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-banks-interface"
version = "1.9.10"
version = "1.9.14"
description = "Solana banks RPC interface"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -11,7 +11,7 @@ edition = "2021"
[dependencies]
serde = { version = "1.0.130", features = ["derive"] }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
tarpc = { version = "0.27.2", features = ["full"] }
[lib]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-banks-server"
version = "1.9.10"
version = "1.9.14"
description = "Solana banks server"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,10 +12,10 @@ edition = "2021"
[dependencies]
bincode = "1.3.3"
futures = "0.3"
solana-banks-interface = { path = "../banks-interface", version = "=1.9.10" }
solana-runtime = { path = "../runtime", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-send-transaction-service = { path = "../send-transaction-service", version = "=1.9.10" }
solana-banks-interface = { path = "../banks-interface", version = "=1.9.14" }
solana-runtime = { path = "../runtime", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-send-transaction-service = { path = "../send-transaction-service", version = "=1.9.14" }
tarpc = { version = "0.27.2", features = ["full"] }
tokio = { version = "1", features = ["full"] }
tokio-serde = { version = "0.8", features = ["bincode"] }

View File

@@ -2,7 +2,7 @@
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2021"
name = "solana-bench-streamer"
version = "1.9.10"
version = "1.9.14"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -10,11 +10,11 @@ publish = false
[dependencies]
clap = "2.33.1"
solana-clap-utils = { path = "../clap-utils", version = "=1.9.10" }
solana-streamer = { path = "../streamer", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-net-utils = { path = "../net-utils", version = "=1.9.10" }
solana-version = { path = "../version", version = "=1.9.10" }
solana-clap-utils = { path = "../clap-utils", version = "=1.9.14" }
solana-streamer = { path = "../streamer", version = "=1.9.14" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-net-utils = { path = "../net-utils", version = "=1.9.14" }
solana-version = { path = "../version", version = "=1.9.14" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -2,7 +2,7 @@
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2021"
name = "solana-bench-tps"
version = "1.9.10"
version = "1.9.14"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -14,23 +14,23 @@ log = "0.4.14"
rayon = "1.5.1"
serde_json = "1.0.72"
serde_yaml = "0.8.21"
solana-core = { path = "../core", version = "=1.9.10" }
solana-genesis = { path = "../genesis", version = "=1.9.10" }
solana-client = { path = "../client", version = "=1.9.10" }
solana-faucet = { path = "../faucet", version = "=1.9.10" }
solana-gossip = { path = "../gossip", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-metrics = { path = "../metrics", version = "=1.9.10" }
solana-measure = { path = "../measure", version = "=1.9.10" }
solana-net-utils = { path = "../net-utils", version = "=1.9.10" }
solana-runtime = { path = "../runtime", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-streamer = { path = "../streamer", version = "=1.9.10" }
solana-version = { path = "../version", version = "=1.9.10" }
solana-core = { path = "../core", version = "=1.9.14" }
solana-genesis = { path = "../genesis", version = "=1.9.14" }
solana-client = { path = "../client", version = "=1.9.14" }
solana-faucet = { path = "../faucet", version = "=1.9.14" }
solana-gossip = { path = "../gossip", version = "=1.9.14" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-metrics = { path = "../metrics", version = "=1.9.14" }
solana-measure = { path = "../measure", version = "=1.9.14" }
solana-net-utils = { path = "../net-utils", version = "=1.9.14" }
solana-runtime = { path = "../runtime", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-streamer = { path = "../streamer", version = "=1.9.14" }
solana-version = { path = "../version", version = "=1.9.14" }
[dev-dependencies]
serial_test = "0.5.1"
solana-local-cluster = { path = "../local-cluster", version = "=1.9.10" }
solana-local-cluster = { path = "../local-cluster", version = "=1.9.14" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bloom"
version = "1.9.10"
version = "1.9.14"
description = "Solana bloom filter"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -16,9 +16,9 @@ rand = "0.7.0"
serde = { version = "1.0.133", features = ["rc"] }
rayon = "1.5.1"
serde_derive = "1.0.103"
solana-frozen-abi = { path = "../frozen-abi", version = "=1.9.10" }
solana-frozen-abi-macro = { path = "../frozen-abi/macro", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-frozen-abi = { path = "../frozen-abi", version = "=1.9.14" }
solana-frozen-abi-macro = { path = "../frozen-abi/macro", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
log = "0.4.14"
[lib]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bucket-map"
version = "1.9.10"
version = "1.9.14"
description = "solana-bucket-map"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-bucket-map"
@@ -12,11 +12,11 @@ edition = "2021"
[dependencies]
rayon = "1.5.0"
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
memmap2 = "0.5.0"
log = { version = "0.4.11" }
solana-measure = { path = "../measure", version = "=1.9.10" }
solana-measure = { path = "../measure", version = "=1.9.14" }
rand = "0.7.0"
fs_extra = "1.2.0"
tempfile = "3.2.0"

View File

@@ -16,7 +16,7 @@ steps:
- command: "ci/publish-crate.sh"
agents:
- "queue=release-build"
timeout_in_minutes: 240
timeout_in_minutes: 360
name: "publish crate"
branches: "!master"
- command: "ci/publish-tarball.sh"

View File

@@ -70,7 +70,7 @@ for Cargo_toml in $Cargo_tomls; do
rm -rf crate-test
"$cargo" stable init crate-test
cd crate-test/
echo "${crate_name} = \"${expectedCrateVersion}\"" >> Cargo.toml
echo "${crate_name} = \"=${expectedCrateVersion}\"" >> Cargo.toml
echo "[workspace]" >> Cargo.toml
"$cargo" stable check
) && really_uploaded=1

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-clap-utils"
version = "1.9.10"
version = "1.9.14"
description = "Solana utilities for the clap"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -12,9 +12,9 @@ edition = "2021"
[dependencies]
clap = "2.33.0"
rpassword = "5.0"
solana-perf = { path = "../perf", version = "=1.9.10" }
solana-remote-wallet = { path = "../remote-wallet", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-perf = { path = "../perf", version = "=1.9.14" }
solana-remote-wallet = { path = "../remote-wallet", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
thiserror = "1.0.30"
tiny-bip39 = "0.8.2"
uriparse = "0.6.3"

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2021"
name = "solana-cli-config"
description = "Blockchain, Rebuilt for Scale"
version = "1.9.10"
version = "1.9.14"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2021"
name = "solana-cli-output"
description = "Blockchain, Rebuilt for Scale"
version = "1.9.10"
version = "1.9.14"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -19,12 +19,12 @@ Inflector = "0.11.4"
indicatif = "0.16.2"
serde = "1.0.130"
serde_json = "1.0.72"
solana-account-decoder = { path = "../account-decoder", version = "=1.9.10" }
solana-clap-utils = { path = "../clap-utils", version = "=1.9.10" }
solana-client = { path = "../client", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-transaction-status = { path = "../transaction-status", version = "=1.9.10" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.10" }
solana-account-decoder = { path = "../account-decoder", version = "=1.9.14" }
solana-clap-utils = { path = "../clap-utils", version = "=1.9.14" }
solana-client = { path = "../client", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-transaction-status = { path = "../transaction-status", version = "=1.9.14" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.14" }
spl-memo = { version = "=3.0.1", features = ["no-entrypoint"] }
[package.metadata.docs.rs]

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2021"
name = "solana-cli"
description = "Blockchain, Rebuilt for Scale"
version = "1.9.10"
version = "1.9.14"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -26,29 +26,29 @@ semver = "1.0.4"
serde = "1.0.130"
serde_derive = "1.0.103"
serde_json = "1.0.72"
solana-account-decoder = { path = "../account-decoder", version = "=1.9.10" }
solana-bpf-loader-program = { path = "../programs/bpf_loader", version = "=1.9.10" }
solana-clap-utils = { path = "../clap-utils", version = "=1.9.10" }
solana-cli-config = { path = "../cli-config", version = "=1.9.10" }
solana-cli-output = { path = "../cli-output", version = "=1.9.10" }
solana-client = { path = "../client", version = "=1.9.10" }
solana-config-program = { path = "../programs/config", version = "=1.9.10" }
solana-faucet = { path = "../faucet", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-program-runtime = { path = "../program-runtime", version = "=1.9.10" }
solana-account-decoder = { path = "../account-decoder", version = "=1.9.14" }
solana-bpf-loader-program = { path = "../programs/bpf_loader", version = "=1.9.14" }
solana-clap-utils = { path = "../clap-utils", version = "=1.9.14" }
solana-cli-config = { path = "../cli-config", version = "=1.9.14" }
solana-cli-output = { path = "../cli-output", version = "=1.9.14" }
solana-client = { path = "../client", version = "=1.9.14" }
solana-config-program = { path = "../programs/config", version = "=1.9.14" }
solana-faucet = { path = "../faucet", version = "=1.9.14" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-program-runtime = { path = "../program-runtime", version = "=1.9.14" }
solana_rbpf = "=0.2.24"
solana-remote-wallet = { path = "../remote-wallet", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-transaction-status = { path = "../transaction-status", version = "=1.9.10" }
solana-version = { path = "../version", version = "=1.9.10" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.10" }
solana-remote-wallet = { path = "../remote-wallet", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-transaction-status = { path = "../transaction-status", version = "=1.9.14" }
solana-version = { path = "../version", version = "=1.9.14" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.14" }
spl-memo = { version = "=3.0.1", features = ["no-entrypoint"] }
thiserror = "1.0.30"
tiny-bip39 = "0.8.2"
[dev-dependencies]
solana-streamer = { path = "../streamer", version = "=1.9.10" }
solana-test-validator = { path = "../test-validator", version = "=1.9.10" }
solana-streamer = { path = "../streamer", version = "=1.9.14" }
solana-test-validator = { path = "../test-validator", version = "=1.9.14" }
tempfile = "3.2.0"
[[bin]]

View File

@@ -161,6 +161,7 @@ pub enum CliCommand {
address: Option<SignerIndex>,
use_deprecated_loader: bool,
allow_excessive_balance: bool,
skip_fee_check: bool,
},
Program(ProgramCliCommand),
// Stake Commands
@@ -743,6 +744,7 @@ pub fn parse_command(
signers.push(signer);
1
});
let skip_fee_check = matches.is_present("skip_fee_check");
Ok(CliCommandInfo {
command: CliCommand::Deploy {
@@ -750,6 +752,7 @@ pub fn parse_command(
address,
use_deprecated_loader: matches.is_present("use_deprecated_loader"),
allow_excessive_balance: matches.is_present("allow_excessive_balance"),
skip_fee_check,
},
signers,
})
@@ -1126,6 +1129,7 @@ pub fn process_command(config: &CliConfig) -> ProcessResult {
address,
use_deprecated_loader,
allow_excessive_balance,
skip_fee_check,
} => process_deploy(
rpc_client,
config,
@@ -1133,6 +1137,7 @@ pub fn process_command(config: &CliConfig) -> ProcessResult {
*address,
*use_deprecated_loader,
*allow_excessive_balance,
*skip_fee_check,
),
CliCommand::Program(program_subcommand) => {
process_program_subcommand(rpc_client, config, program_subcommand)
@@ -1964,6 +1969,7 @@ mod tests {
address: None,
use_deprecated_loader: false,
allow_excessive_balance: false,
skip_fee_check: false,
},
signers: vec![read_keypair_file(&keypair_file).unwrap().into()],
}
@@ -1986,6 +1992,7 @@ mod tests {
address: Some(1),
use_deprecated_loader: false,
allow_excessive_balance: false,
skip_fee_check: false,
},
signers: vec![
read_keypair_file(&keypair_file).unwrap().into(),
@@ -2379,6 +2386,7 @@ mod tests {
address: None,
use_deprecated_loader: false,
allow_excessive_balance: false,
skip_fee_check: false,
};
config.output_format = OutputFormat::JsonCompact;
let result = process_command(&config);
@@ -2399,6 +2407,7 @@ mod tests {
address: None,
use_deprecated_loader: false,
allow_excessive_balance: false,
skip_fee_check: false,
};
assert!(process_command(&config).is_err());
}

View File

@@ -65,6 +65,7 @@ pub enum ProgramCliCommand {
is_final: bool,
max_len: Option<usize>,
allow_excessive_balance: bool,
skip_fee_check: bool,
},
WriteBuffer {
program_location: String,
@@ -72,6 +73,7 @@ pub enum ProgramCliCommand {
buffer_pubkey: Option<Pubkey>,
buffer_authority_signer_index: Option<SignerIndex>,
max_len: Option<usize>,
skip_fee_check: bool,
},
SetBufferAuthority {
buffer_pubkey: Pubkey,
@@ -113,6 +115,13 @@ impl ProgramSubCommands for App<'_, '_> {
SubCommand::with_name("program")
.about("Program management")
.setting(AppSettings::SubcommandRequiredElseHelp)
.arg(
Arg::with_name("skip_fee_check")
.long("skip-fee-check")
.hidden(true)
.takes_value(false)
.global(true)
)
.subcommand(
SubCommand::with_name("deploy")
.about("Deploy a program")
@@ -405,6 +414,12 @@ impl ProgramSubCommands for App<'_, '_> {
.long("allow-excessive-deploy-account-balance")
.takes_value(false)
.help("Use the designated program id, even if the account already holds a large balance of SOL")
)
.arg(
Arg::with_name("skip_fee_check")
.long("skip-fee-check")
.hidden(true)
.takes_value(false)
),
)
}
@@ -415,7 +430,14 @@ pub fn parse_program_subcommand(
default_signer: &DefaultSigner,
wallet_manager: &mut Option<Arc<RemoteWalletManager>>,
) -> Result<CliCommandInfo, CliError> {
let response = match matches.subcommand() {
let (subcommand, sub_matches) = matches.subcommand();
let matches_skip_fee_check = matches.is_present("skip_fee_check");
let sub_matches_skip_fee_check = sub_matches
.map(|m| m.is_present("skip_fee_check"))
.unwrap_or(false);
let skip_fee_check = matches_skip_fee_check || sub_matches_skip_fee_check;
let response = match (subcommand, sub_matches) {
("deploy", Some(matches)) => {
let mut bulk_signers = vec![Some(
default_signer.signer_from_path(matches, wallet_manager)?,
@@ -475,6 +497,7 @@ pub fn parse_program_subcommand(
is_final: matches.is_present("final"),
max_len,
allow_excessive_balance: matches.is_present("allow_excessive_balance"),
skip_fee_check,
}),
signers: signer_info.signers,
}
@@ -520,6 +543,7 @@ pub fn parse_program_subcommand(
buffer_authority_signer_index: signer_info
.index_of_or_none(buffer_authority_pubkey),
max_len,
skip_fee_check,
}),
signers: signer_info.signers,
}
@@ -668,6 +692,7 @@ pub fn process_program_subcommand(
is_final,
max_len,
allow_excessive_balance,
skip_fee_check,
} => process_program_deploy(
rpc_client,
config,
@@ -680,6 +705,7 @@ pub fn process_program_subcommand(
*is_final,
*max_len,
*allow_excessive_balance,
*skip_fee_check,
),
ProgramCliCommand::WriteBuffer {
program_location,
@@ -687,6 +713,7 @@ pub fn process_program_subcommand(
buffer_pubkey,
buffer_authority_signer_index,
max_len,
skip_fee_check,
} => process_write_buffer(
rpc_client,
config,
@@ -695,6 +722,7 @@ pub fn process_program_subcommand(
*buffer_pubkey,
*buffer_authority_signer_index,
*max_len,
*skip_fee_check,
),
ProgramCliCommand::SetBufferAuthority {
buffer_pubkey,
@@ -792,6 +820,7 @@ fn process_program_deploy(
is_final: bool,
max_len: Option<usize>,
allow_excessive_balance: bool,
skip_fee_check: bool,
) -> ProcessResult {
let (words, mnemonic, buffer_keypair) = create_ephemeral_keypair()?;
let (buffer_provided, buffer_signer, buffer_pubkey) = if let Some(i) = buffer_signer_index {
@@ -946,6 +975,7 @@ fn process_program_deploy(
&buffer_pubkey,
Some(upgrade_authority_signer),
allow_excessive_balance,
skip_fee_check,
)
} else {
do_process_program_upgrade(
@@ -956,6 +986,7 @@ fn process_program_deploy(
config.signers[upgrade_authority_signer_index],
&buffer_pubkey,
buffer_signer,
skip_fee_check,
)
};
if result.is_ok() && is_final {
@@ -982,6 +1013,7 @@ fn process_write_buffer(
buffer_pubkey: Option<Pubkey>,
buffer_authority_signer_index: Option<SignerIndex>,
max_len: Option<usize>,
skip_fee_check: bool,
) -> ProcessResult {
// Create ephemeral keypair to use for Buffer account, if not provided
let (words, mnemonic, buffer_keypair) = create_ephemeral_keypair()?;
@@ -1049,6 +1081,7 @@ fn process_write_buffer(
&buffer_pubkey,
Some(buffer_authority),
true,
skip_fee_check,
);
if result.is_err() && buffer_signer_index.is_none() && buffer_signer.is_some() {
@@ -1635,6 +1668,7 @@ pub fn process_deploy(
buffer_signer_index: Option<SignerIndex>,
use_deprecated_loader: bool,
allow_excessive_balance: bool,
skip_fee_check: bool,
) -> ProcessResult {
// Create ephemeral keypair to use for Buffer account, if not provided
let (words, mnemonic, buffer_keypair) = create_ephemeral_keypair()?;
@@ -1665,6 +1699,7 @@ pub fn process_deploy(
&buffer_signer.pubkey(),
Some(buffer_signer),
allow_excessive_balance,
skip_fee_check,
);
if result.is_err() && buffer_signer_index.is_none() {
report_ephemeral_mnemonic(words, mnemonic);
@@ -1703,6 +1738,7 @@ fn do_process_program_write_and_deploy(
buffer_pubkey: &Pubkey,
buffer_authority_signer: Option<&dyn Signer>,
allow_excessive_balance: bool,
skip_fee_check: bool,
) -> ProcessResult {
// Build messages to calculate fees
let mut messages: Vec<&Message> = Vec::new();
@@ -1833,7 +1869,9 @@ fn do_process_program_write_and_deploy(
messages.push(message);
}
check_payer(&rpc_client, config, balance_needed, &messages)?;
if !skip_fee_check {
check_payer(&rpc_client, config, balance_needed, &messages)?;
}
send_deploy_messages(
rpc_client,
@@ -1867,6 +1905,7 @@ fn do_process_program_upgrade(
upgrade_authority: &dyn Signer,
buffer_pubkey: &Pubkey,
buffer_signer: Option<&dyn Signer>,
skip_fee_check: bool,
) -> ProcessResult {
let loader_id = bpf_loader_upgradeable::id();
let data_len = program_data.len();
@@ -1966,7 +2005,10 @@ fn do_process_program_upgrade(
);
messages.push(&final_message);
check_payer(&rpc_client, config, balance_needed, &messages)?;
if !skip_fee_check {
check_payer(&rpc_client, config, balance_needed, &messages)?;
}
send_deploy_messages(
rpc_client,
config,
@@ -2253,6 +2295,7 @@ mod tests {
is_final: false,
max_len: None,
allow_excessive_balance: false,
skip_fee_check: false,
}),
signers: vec![read_keypair_file(&keypair_file).unwrap().into()],
}
@@ -2279,6 +2322,7 @@ mod tests {
is_final: false,
max_len: Some(42),
allow_excessive_balance: false,
skip_fee_check: false,
}),
signers: vec![read_keypair_file(&keypair_file).unwrap().into()],
}
@@ -2307,6 +2351,7 @@ mod tests {
is_final: false,
max_len: None,
allow_excessive_balance: false,
skip_fee_check: false,
}),
signers: vec![
read_keypair_file(&keypair_file).unwrap().into(),
@@ -2337,6 +2382,7 @@ mod tests {
is_final: false,
max_len: None,
allow_excessive_balance: false,
skip_fee_check: false,
}),
signers: vec![read_keypair_file(&keypair_file).unwrap().into()],
}
@@ -2366,6 +2412,7 @@ mod tests {
is_final: false,
max_len: None,
allow_excessive_balance: false,
skip_fee_check: false,
}),
signers: vec![
read_keypair_file(&keypair_file).unwrap().into(),
@@ -2398,6 +2445,7 @@ mod tests {
is_final: false,
max_len: None,
allow_excessive_balance: false,
skip_fee_check: false,
}),
signers: vec![
read_keypair_file(&keypair_file).unwrap().into(),
@@ -2425,6 +2473,7 @@ mod tests {
upgrade_authority_signer_index: 0,
is_final: true,
max_len: None,
skip_fee_check: false,
allow_excessive_balance: false,
}),
signers: vec![read_keypair_file(&keypair_file).unwrap().into()],
@@ -2458,6 +2507,7 @@ mod tests {
buffer_pubkey: None,
buffer_authority_signer_index: Some(0),
max_len: None,
skip_fee_check: false,
}),
signers: vec![read_keypair_file(&keypair_file).unwrap().into()],
}
@@ -2481,6 +2531,7 @@ mod tests {
buffer_pubkey: None,
buffer_authority_signer_index: Some(0),
max_len: Some(42),
skip_fee_check: false,
}),
signers: vec![read_keypair_file(&keypair_file).unwrap().into()],
}
@@ -2507,6 +2558,7 @@ mod tests {
buffer_pubkey: Some(buffer_keypair.pubkey()),
buffer_authority_signer_index: Some(0),
max_len: None,
skip_fee_check: false,
}),
signers: vec![
read_keypair_file(&keypair_file).unwrap().into(),
@@ -2536,6 +2588,7 @@ mod tests {
buffer_pubkey: None,
buffer_authority_signer_index: Some(1),
max_len: None,
skip_fee_check: false,
}),
signers: vec![
read_keypair_file(&keypair_file).unwrap().into(),
@@ -2570,6 +2623,7 @@ mod tests {
buffer_pubkey: Some(buffer_keypair.pubkey()),
buffer_authority_signer_index: Some(2),
max_len: None,
skip_fee_check: false,
}),
signers: vec![
read_keypair_file(&keypair_file).unwrap().into(),
@@ -3012,6 +3066,7 @@ mod tests {
is_final: false,
max_len: None,
allow_excessive_balance: false,
skip_fee_check: false,
}),
signers: vec![&default_keypair],
output_format: OutputFormat::JsonCompact,

View File

@@ -291,8 +291,12 @@ pub fn process_set_validator_info(
// Check existence of validator-info account
let balance = rpc_client.get_balance(&info_pubkey).unwrap_or(0);
let lamports =
rpc_client.get_minimum_balance_for_rent_exemption(ValidatorInfo::max_space() as usize)?;
let keys = vec![
(validator_info::id(), false),
(config.signers[0].pubkey(), true),
];
let data_len = ValidatorInfo::max_space() + ConfigKeys::serialized_size(keys.clone());
let lamports = rpc_client.get_minimum_balance_for_rent_exemption(data_len as usize)?;
let signers = if balance == 0 {
if info_pubkey != info_keypair.pubkey() {
@@ -308,10 +312,7 @@ pub fn process_set_validator_info(
};
let build_message = |lamports| {
let keys = vec![
(validator_info::id(), false),
(config.signers[0].pubkey(), true),
];
let keys = keys.clone();
if balance == 0 {
println!(
"Publishing info for Validator {:?}",

View File

@@ -62,6 +62,7 @@ fn test_cli_program_deploy_non_upgradeable() {
address: None,
use_deprecated_loader: false,
allow_excessive_balance: false,
skip_fee_check: false,
};
config.output_format = OutputFormat::JsonCompact;
let response = process_command(&config);
@@ -91,6 +92,7 @@ fn test_cli_program_deploy_non_upgradeable() {
address: Some(1),
use_deprecated_loader: false,
allow_excessive_balance: false,
skip_fee_check: false,
};
process_command(&config).unwrap();
let account1 = rpc_client
@@ -118,6 +120,7 @@ fn test_cli_program_deploy_non_upgradeable() {
address: Some(1),
use_deprecated_loader: false,
allow_excessive_balance: false,
skip_fee_check: false,
};
process_command(&config).unwrap_err();
@@ -127,6 +130,7 @@ fn test_cli_program_deploy_non_upgradeable() {
address: Some(1),
use_deprecated_loader: false,
allow_excessive_balance: true,
skip_fee_check: false,
};
process_command(&config).unwrap();
let account2 = rpc_client
@@ -193,6 +197,7 @@ fn test_cli_program_deploy_no_authority() {
upgrade_authority_signer_index: 1,
is_final: true,
max_len: None,
skip_fee_check: false,
});
config.output_format = OutputFormat::JsonCompact;
let response = process_command(&config);
@@ -218,6 +223,7 @@ fn test_cli_program_deploy_no_authority() {
upgrade_authority_signer_index: 1,
is_final: false,
max_len: None,
skip_fee_check: false,
});
process_command(&config).unwrap_err();
}
@@ -278,6 +284,7 @@ fn test_cli_program_deploy_with_authority() {
upgrade_authority_signer_index: 1,
is_final: false,
max_len: Some(max_len),
skip_fee_check: false,
});
config.output_format = OutputFormat::JsonCompact;
let response = process_command(&config);
@@ -325,6 +332,7 @@ fn test_cli_program_deploy_with_authority() {
upgrade_authority_signer_index: 1,
is_final: false,
max_len: Some(max_len),
skip_fee_check: false,
});
let response = process_command(&config);
let json: Value = serde_json::from_str(&response.unwrap()).unwrap();
@@ -366,6 +374,7 @@ fn test_cli_program_deploy_with_authority() {
upgrade_authority_signer_index: 1,
is_final: false,
max_len: Some(max_len),
skip_fee_check: false,
});
process_command(&config).unwrap();
let program_account = rpc_client.get_account(&program_pubkey).unwrap();
@@ -420,6 +429,7 @@ fn test_cli_program_deploy_with_authority() {
upgrade_authority_signer_index: 1,
is_final: false,
max_len: None,
skip_fee_check: false,
});
process_command(&config).unwrap();
let program_account = rpc_client.get_account(&program_pubkey).unwrap();
@@ -494,6 +504,7 @@ fn test_cli_program_deploy_with_authority() {
upgrade_authority_signer_index: 1,
is_final: false,
max_len: None,
skip_fee_check: false,
});
process_command(&config).unwrap_err();
@@ -509,6 +520,7 @@ fn test_cli_program_deploy_with_authority() {
upgrade_authority_signer_index: 1,
is_final: true,
max_len: None,
skip_fee_check: false,
});
let response = process_command(&config);
let json: Value = serde_json::from_str(&response.unwrap()).unwrap();
@@ -611,6 +623,7 @@ fn test_cli_program_close_program() {
upgrade_authority_signer_index: 1,
is_final: false,
max_len: Some(max_len),
skip_fee_check: false,
});
config.output_format = OutputFormat::JsonCompact;
process_command(&config).unwrap();
@@ -695,6 +708,7 @@ fn test_cli_program_write_buffer() {
buffer_pubkey: None,
buffer_authority_signer_index: None,
max_len: None,
skip_fee_check: false,
});
config.output_format = OutputFormat::JsonCompact;
let response = process_command(&config);
@@ -729,6 +743,7 @@ fn test_cli_program_write_buffer() {
buffer_pubkey: Some(buffer_keypair.pubkey()),
buffer_authority_signer_index: None,
max_len: Some(max_len),
skip_fee_check: false,
});
let response = process_command(&config);
let json: Value = serde_json::from_str(&response.unwrap()).unwrap();
@@ -790,6 +805,7 @@ fn test_cli_program_write_buffer() {
buffer_pubkey: Some(buffer_keypair.pubkey()),
buffer_authority_signer_index: Some(2),
max_len: None,
skip_fee_check: false,
});
let response = process_command(&config);
let json: Value = serde_json::from_str(&response.unwrap()).unwrap();
@@ -827,6 +843,7 @@ fn test_cli_program_write_buffer() {
buffer_pubkey: None,
buffer_authority_signer_index: Some(2),
max_len: None,
skip_fee_check: false,
});
let response = process_command(&config);
let json: Value = serde_json::from_str(&response.unwrap()).unwrap();
@@ -899,6 +916,7 @@ fn test_cli_program_write_buffer() {
buffer_pubkey: None,
buffer_authority_signer_index: None,
max_len: None,
skip_fee_check: false,
});
config.output_format = OutputFormat::JsonCompact;
let response = process_command(&config);
@@ -938,6 +956,7 @@ fn test_cli_program_write_buffer() {
buffer_pubkey: Some(buffer_keypair.pubkey()),
buffer_authority_signer_index: None,
max_len: None, //Some(max_len),
skip_fee_check: false,
});
process_command(&config).unwrap();
config.signers = vec![&keypair, &buffer_keypair];
@@ -951,6 +970,7 @@ fn test_cli_program_write_buffer() {
upgrade_authority_signer_index: 1,
is_final: true,
max_len: None,
skip_fee_check: false,
});
config.output_format = OutputFormat::JsonCompact;
let error = process_command(&config).unwrap_err();
@@ -1008,6 +1028,7 @@ fn test_cli_program_set_buffer_authority() {
buffer_pubkey: Some(buffer_keypair.pubkey()),
buffer_authority_signer_index: None,
max_len: None,
skip_fee_check: false,
});
process_command(&config).unwrap();
let buffer_account = rpc_client.get_account(&buffer_keypair.pubkey()).unwrap();
@@ -1123,6 +1144,7 @@ fn test_cli_program_mismatch_buffer_authority() {
buffer_pubkey: Some(buffer_keypair.pubkey()),
buffer_authority_signer_index: Some(2),
max_len: None,
skip_fee_check: false,
});
process_command(&config).unwrap();
let buffer_account = rpc_client.get_account(&buffer_keypair.pubkey()).unwrap();
@@ -1145,6 +1167,7 @@ fn test_cli_program_mismatch_buffer_authority() {
upgrade_authority_signer_index: 1,
is_final: true,
max_len: None,
skip_fee_check: false,
});
process_command(&config).unwrap_err();
@@ -1160,6 +1183,7 @@ fn test_cli_program_mismatch_buffer_authority() {
upgrade_authority_signer_index: 1,
is_final: true,
max_len: None,
skip_fee_check: false,
});
process_command(&config).unwrap();
}
@@ -1216,6 +1240,7 @@ fn test_cli_program_show() {
buffer_pubkey: Some(buffer_keypair.pubkey()),
buffer_authority_signer_index: Some(2),
max_len: None,
skip_fee_check: false,
});
process_command(&config).unwrap();
@@ -1275,6 +1300,7 @@ fn test_cli_program_show() {
upgrade_authority_signer_index: 1,
is_final: false,
max_len: Some(max_len),
skip_fee_check: false,
});
config.output_format = OutputFormat::JsonCompact;
let min_slot = rpc_client.get_slot().unwrap();
@@ -1401,6 +1427,7 @@ fn test_cli_program_dump() {
buffer_pubkey: Some(buffer_keypair.pubkey()),
buffer_authority_signer_index: Some(2),
max_len: None,
skip_fee_check: false,
});
process_command(&config).unwrap();

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-client-test"
version = "1.9.10"
version = "1.9.14"
description = "Solana RPC Test"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -8,28 +8,29 @@ license = "Apache-2.0"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-client-test"
edition = "2021"
publish = false
[dependencies]
serde_json = "1.0.72"
serial_test = "0.5.1"
solana-client = { path = "../client", version = "=1.9.10" }
solana-ledger = { path = "../ledger", version = "=1.9.10" }
solana-measure = { path = "../measure", version = "=1.9.10" }
solana-merkle-tree = { path = "../merkle-tree", version = "=1.9.10" }
solana-metrics = { path = "../metrics", version = "=1.9.10" }
solana-perf = { path = "../perf", version = "=1.9.10" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "=1.9.10" }
solana-rpc = { path = "../rpc", version = "=1.9.10" }
solana-runtime = { path = "../runtime", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-streamer = { path = "../streamer", version = "=1.9.10" }
solana-test-validator = { path = "../test-validator", version = "=1.9.10" }
solana-transaction-status = { path = "../transaction-status", version = "=1.9.10" }
solana-version = { path = "../version", version = "=1.9.10" }
solana-client = { path = "../client", version = "=1.9.14" }
solana-ledger = { path = "../ledger", version = "=1.9.14" }
solana-measure = { path = "../measure", version = "=1.9.14" }
solana-merkle-tree = { path = "../merkle-tree", version = "=1.9.14" }
solana-metrics = { path = "../metrics", version = "=1.9.14" }
solana-perf = { path = "../perf", version = "=1.9.14" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "=1.9.14" }
solana-rpc = { path = "../rpc", version = "=1.9.14" }
solana-runtime = { path = "../runtime", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-streamer = { path = "../streamer", version = "=1.9.14" }
solana-test-validator = { path = "../test-validator", version = "=1.9.14" }
solana-transaction-status = { path = "../transaction-status", version = "=1.9.14" }
solana-version = { path = "../version", version = "=1.9.14" }
systemstat = "0.1.10"
[dev-dependencies]
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.14" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-client"
version = "1.9.10"
version = "1.9.14"
description = "Solana Client"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -23,15 +23,15 @@ semver = "1.0.4"
serde = "1.0.130"
serde_derive = "1.0.103"
serde_json = "1.0.72"
solana-account-decoder = { path = "../account-decoder", version = "=1.9.10" }
solana-clap-utils = { path = "../clap-utils", version = "=1.9.10" }
solana-faucet = { path = "../faucet", version = "=1.9.10" }
solana-net-utils = { path = "../net-utils", version = "=1.9.10" }
solana-measure = { path = "../measure", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-transaction-status = { path = "../transaction-status", version = "=1.9.10" }
solana-version = { path = "../version", version = "=1.9.10" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.10" }
solana-account-decoder = { path = "../account-decoder", version = "=1.9.14" }
solana-clap-utils = { path = "../clap-utils", version = "=1.9.14" }
solana-faucet = { path = "../faucet", version = "=1.9.14" }
solana-net-utils = { path = "../net-utils", version = "=1.9.14" }
solana-measure = { path = "../measure", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-transaction-status = { path = "../transaction-status", version = "=1.9.14" }
solana-version = { path = "../version", version = "=1.9.14" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.14" }
thiserror = "1.0"
tokio = { version = "1", features = ["full"] }
tungstenite = { version = "0.16.0", features = ["rustls-tls-webpki-roots"] }
@@ -40,7 +40,7 @@ url = "2.2.2"
[dev-dependencies]
assert_matches = "1.5.0"
jsonrpc-http-server = "18.0.0"
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.14" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -1,7 +1,7 @@
[package]
name = "solana-core"
description = "Blockchain, Rebuilt for Scale"
version = "1.9.10"
version = "1.9.14"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-core"
readme = "../README.md"
@@ -20,7 +20,7 @@ bincode = "1.3.3"
bs58 = "0.4.0"
chrono = { version = "0.4.11", features = ["serde"] }
crossbeam-channel = "0.5"
dashmap = { version = "5.1.0", features = ["rayon", "raw-api"] }
dashmap = { version = "4.0.2", features = ["rayon", "raw-api"] }
etcd-client = { version = "0.8.1", features = ["tls"]}
fs_extra = "1.2.0"
histogram = "0.6.9"
@@ -34,32 +34,32 @@ rayon = "1.5.1"
retain_mut = "0.1.5"
serde = "1.0.130"
serde_derive = "1.0.103"
solana-accountsdb-plugin-manager = { path = "../accountsdb-plugin-manager", version = "=1.9.10" }
solana-bloom = { path = "../bloom", version = "=1.9.10" }
solana-client = { path = "../client", version = "=1.9.10" }
solana-entry = { path = "../entry", version = "=1.9.10" }
solana-gossip = { path = "../gossip", version = "=1.9.10" }
solana-ledger = { path = "../ledger", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-measure = { path = "../measure", version = "=1.9.10" }
solana-metrics = { path = "../metrics", version = "=1.9.10" }
solana-net-utils = { path = "../net-utils", version = "=1.9.10" }
solana-perf = { path = "../perf", version = "=1.9.10" }
solana-poh = { path = "../poh", version = "=1.9.10" }
solana-program-runtime = { path = "../program-runtime", version = "=1.9.10" }
solana-rpc = { path = "../rpc", version = "=1.9.10" }
solana-replica-lib = { path = "../replica-lib", version = "=1.9.10" }
solana-runtime = { path = "../runtime", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-frozen-abi = { path = "../frozen-abi", version = "=1.9.10" }
solana-frozen-abi-macro = { path = "../frozen-abi/macro", version = "=1.9.10" }
solana-send-transaction-service = { path = "../send-transaction-service", version = "=1.9.10" }
solana-streamer = { path = "../streamer", version = "=1.9.10" }
solana-transaction-status = { path = "../transaction-status", version = "=1.9.10" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.10" }
solana-bloom = { path = "../bloom", version = "=1.9.14" }
solana-client = { path = "../client", version = "=1.9.14" }
solana-entry = { path = "../entry", version = "=1.9.14" }
solana-geyser-plugin-manager = { path = "../geyser-plugin-manager", version = "=1.9.14" }
solana-gossip = { path = "../gossip", version = "=1.9.14" }
solana-ledger = { path = "../ledger", version = "=1.9.14" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-measure = { path = "../measure", version = "=1.9.14" }
solana-metrics = { path = "../metrics", version = "=1.9.14" }
solana-net-utils = { path = "../net-utils", version = "=1.9.14" }
solana-perf = { path = "../perf", version = "=1.9.14" }
solana-poh = { path = "../poh", version = "=1.9.14" }
solana-program-runtime = { path = "../program-runtime", version = "=1.9.14" }
solana-rpc = { path = "../rpc", version = "=1.9.14" }
solana-replica-lib = { path = "../replica-lib", version = "=1.9.14" }
solana-runtime = { path = "../runtime", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-frozen-abi = { path = "../frozen-abi", version = "=1.9.14" }
solana-frozen-abi-macro = { path = "../frozen-abi/macro", version = "=1.9.14" }
solana-send-transaction-service = { path = "../send-transaction-service", version = "=1.9.14" }
solana-streamer = { path = "../streamer", version = "=1.9.14" }
solana-transaction-status = { path = "../transaction-status", version = "=1.9.14" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.14" }
tempfile = "3.2.0"
thiserror = "1.0"
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "=1.9.10" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "=1.9.14" }
sys-info = "0.9.1"
tokio = { version = "1", features = ["full"] }
trees = "0.4.2"
@@ -73,9 +73,9 @@ matches = "0.1.9"
reqwest = { version = "0.11.6", default-features = false, features = ["blocking", "rustls-tls", "json"] }
serde_json = "1.0.72"
serial_test = "0.5.1"
solana-program-runtime = { path = "../program-runtime", version = "=1.9.10" }
solana-stake-program = { path = "../programs/stake", version = "=1.9.10" }
solana-version = { path = "../version", version = "=1.9.10" }
solana-program-runtime = { path = "../program-runtime", version = "=1.9.14" }
solana-stake-program = { path = "../programs/stake", version = "=1.9.14" }
solana-version = { path = "../version", version = "=1.9.14" }
static_assertions = "1.1.0"
systemstat = "0.1.10"

View File

@@ -791,7 +791,7 @@ impl BankingStage {
),
)
};
slot_metrics_tracker.update_on_leader_slot_boundary(&bank_start);
Self::consume_or_forward_packets(
my_pubkey,
leader_at_slot_offset,
@@ -3102,10 +3102,6 @@ mod tests {
..
} = create_slow_genesis_config(lamports);
let bank = Arc::new(Bank::new_no_wallclock_throttle_for_tests(&genesis_config));
// set cost tracker limits to MAX so it will not filter out TXs
bank.write_cost_tracker()
.unwrap()
.set_limits(std::u64::MAX, std::u64::MAX, std::u64::MAX);
// Transfer more than the balance of the mint keypair, should cause a
// InstructionError::InsufficientFunds that is then committed. Needs to be
@@ -3162,10 +3158,6 @@ mod tests {
..
} = create_slow_genesis_config(10_000);
let bank = Arc::new(Bank::new_no_wallclock_throttle_for_tests(&genesis_config));
// set cost tracker limits to MAX so it will not filter out TXs
bank.write_cost_tracker()
.unwrap()
.set_limits(std::u64::MAX, std::u64::MAX, std::u64::MAX);
// Make all repetitive transactions that conflict on the `mint_keypair`, so only 1 should be executed
let mut transactions = vec![

View File

@@ -10,44 +10,31 @@ use {
solana_runtime::{bank::Bank, cost_model::CostModel},
solana_sdk::timing::timestamp,
std::{
sync::atomic::{AtomicBool, Ordering},
sync::{mpsc::Receiver, Arc, RwLock},
thread::{self, Builder, JoinHandle},
time::Duration,
},
};
// Update blockstore persistence storage when accumulated cost_table updates count exceeds the threshold
const PERSIST_THRESHOLD: u64 = 1_000;
#[derive(Default)]
pub struct CostUpdateServiceTiming {
last_print: u64,
update_cost_model_count: u64,
update_cost_model_elapsed: u64,
persist_cost_table_elapsed: u64,
}
impl CostUpdateServiceTiming {
fn update(
&mut self,
update_cost_model_count: Option<u64>,
update_cost_model_elapsed: Option<u64>,
persist_cost_table_elapsed: Option<u64>,
) {
if let Some(update_cost_model_count) = update_cost_model_count {
self.update_cost_model_count += update_cost_model_count;
}
if let Some(update_cost_model_elapsed) = update_cost_model_elapsed {
self.update_cost_model_elapsed += update_cost_model_elapsed;
}
if let Some(persist_cost_table_elapsed) = persist_cost_table_elapsed {
self.persist_cost_table_elapsed += persist_cost_table_elapsed;
}
fn update(&mut self, update_cost_model_count: u64, update_cost_model_elapsed: u64) {
self.update_cost_model_count += update_cost_model_count;
self.update_cost_model_elapsed += update_cost_model_elapsed;
let now = timestamp();
let elapsed_ms = now - self.last_print;
if elapsed_ms > 1000 {
datapoint_info!(
"cost-update-service-stats",
("total_elapsed_us", elapsed_ms * 1000, i64),
(
"update_cost_model_count",
self.update_cost_model_count as i64,
@@ -58,11 +45,6 @@ impl CostUpdateServiceTiming {
self.update_cost_model_elapsed as i64,
i64
),
(
"persist_cost_table_elapsed",
self.persist_cost_table_elapsed as i64,
i64
),
);
*self = CostUpdateServiceTiming::default();
@@ -89,6 +71,7 @@ pub struct CostUpdateService {
impl CostUpdateService {
#[allow(clippy::new_ret_no_self)]
pub fn new(
exit: Arc<AtomicBool>,
blockstore: Arc<Blockstore>,
cost_model: Arc<RwLock<CostModel>>,
cost_update_receiver: CostUpdateReceiver,
@@ -96,7 +79,7 @@ impl CostUpdateService {
let thread_hdl = Builder::new()
.name("solana-cost-update-service".to_string())
.spawn(move || {
Self::service_loop(blockstore, cost_model, cost_update_receiver);
Self::service_loop(exit, blockstore, cost_model, cost_update_receiver);
})
.unwrap();
@@ -108,99 +91,85 @@ impl CostUpdateService {
}
fn service_loop(
blockstore: Arc<Blockstore>,
exit: Arc<AtomicBool>,
_blockstore: Arc<Blockstore>,
cost_model: Arc<RwLock<CostModel>>,
cost_update_receiver: CostUpdateReceiver,
) {
let mut cost_update_service_timing = CostUpdateServiceTiming::default();
let mut update_count = 0_u64;
let mut update_count: u64;
let wait_timer = Duration::from_millis(100);
for cost_update in cost_update_receiver.iter() {
match cost_update {
CostUpdate::FrozenBank { bank } => {
bank.read_cost_tracker().unwrap().report_stats(bank.slot());
loop {
if exit.load(Ordering::Relaxed) {
break;
}
update_count = 0_u64;
let mut update_cost_model_time = Measure::start("update_cost_model_time");
for cost_update in cost_update_receiver.try_iter() {
match cost_update {
CostUpdate::FrozenBank { bank } => {
bank.read_cost_tracker().unwrap().report_stats(bank.slot());
}
CostUpdate::ExecuteTiming {
mut execute_timings,
} => {
Self::update_cost_model(&cost_model, &mut execute_timings);
update_count += 1;
}
}
CostUpdate::ExecuteTiming {
mut execute_timings,
} => {
let mut update_cost_model_time = Measure::start("update_cost_model_time");
update_count += Self::update_cost_model(&cost_model, &mut execute_timings);
update_cost_model_time.stop();
cost_update_service_timing.update(
Some(update_count),
Some(update_cost_model_time.as_us()),
None,
);
}
update_cost_model_time.stop();
if update_count > PERSIST_THRESHOLD {
let mut persist_cost_table_time = Measure::start("persist_cost_table_time");
Self::persist_cost_table(&blockstore, &cost_model);
update_count = 0_u64;
persist_cost_table_time.stop();
cost_update_service_timing.update(
None,
None,
Some(persist_cost_table_time.as_us()),
cost_update_service_timing.update(update_count, update_cost_model_time.as_us());
thread::sleep(wait_timer);
}
}
fn update_cost_model(
cost_model: &RwLock<CostModel>,
execute_timings: &mut ExecuteTimings,
) -> bool {
let mut dirty = false;
{
for (program_id, program_timings) in &mut execute_timings.details.per_program_timings {
let current_estimated_program_cost =
cost_model.read().unwrap().find_instruction_cost(program_id);
program_timings.coalesce_error_timings(current_estimated_program_cost);
if program_timings.count < 1 {
continue;
}
let units = program_timings.accumulated_units / program_timings.count as u64;
match cost_model
.write()
.unwrap()
.upsert_instruction_cost(program_id, units)
{
Ok(c) => {
debug!(
"after replayed into bank, instruction {:?} has averaged cost {}",
program_id, c
);
dirty = true;
}
Err(err) => {
debug!(
"after replayed into bank, instruction {:?} failed to update cost, err: {}",
program_id, err
);
}
}
}
}
}
// Normalize `program_timings` with current estimated cost, update instruction_cost table
// Returns number of updates applied
fn update_cost_model(
cost_model: &RwLock<CostModel>,
execute_timings: &mut ExecuteTimings,
) -> u64 {
let mut update_count = 0_u64;
for (program_id, program_timings) in &mut execute_timings.details.per_program_timings {
let current_estimated_program_cost =
cost_model.read().unwrap().find_instruction_cost(program_id);
program_timings.coalesce_error_timings(current_estimated_program_cost);
if program_timings.count < 1 {
continue;
}
let units = program_timings.accumulated_units / program_timings.count as u64;
cost_model
.write()
.unwrap()
.upsert_instruction_cost(program_id, units);
update_count += 1;
debug!(
"After replayed into bank, updated cost for instruction {:?}, update_value {}, pre_aggregated_value {}",
program_id, units, current_estimated_program_cost
);
}
update_count
}
// 1. Remove obsolete program entries from persisted table to limit its size
// 2. Update persisted program cost. This involves EMA cost calculation at
// execute_cost_table.get_cost()
fn persist_cost_table(blockstore: &Blockstore, cost_model: &RwLock<CostModel>) {
let db_records = blockstore.read_program_costs().expect("read programs");
let cost_model = cost_model.read().unwrap();
let active_program_keys = cost_model.get_program_keys();
// delete records from blockstore if they are no longer in cost_table
db_records.iter().for_each(|(pubkey, _)| {
if !active_program_keys.contains(&pubkey) {
blockstore
.delete_program_cost(pubkey)
.expect("delete old program");
}
});
active_program_keys.iter().for_each(|program_id| {
let cost = cost_model.find_instruction_cost(program_id);
blockstore
.write_program_cost(program_id, &cost)
.expect("persist program costs to blockstore");
});
debug!(
"after replayed into bank, updated cost model instruction cost table, current values: {:?}",
cost_model.read().unwrap().get_instruction_cost_table()
);
dirty
}
}
@@ -212,9 +181,15 @@ mod tests {
fn test_update_cost_model_with_empty_execute_timings() {
let cost_model = Arc::new(RwLock::new(CostModel::default()));
let mut empty_execute_timings = ExecuteTimings::default();
CostUpdateService::update_cost_model(&cost_model, &mut empty_execute_timings);
assert_eq!(
CostUpdateService::update_cost_model(&cost_model, &mut empty_execute_timings),
0
0,
cost_model
.read()
.unwrap()
.get_instruction_cost_table()
.len()
);
}
@@ -232,7 +207,7 @@ mod tests {
let accumulated_units: u64 = 100;
let total_errored_units = 0;
let count: u32 = 10;
expected_cost = accumulated_units / count as u64; // = 10
expected_cost = accumulated_units / count as u64;
execute_timings.details.per_program_timings.insert(
program_key_1,
@@ -244,15 +219,22 @@ mod tests {
total_errored_units,
},
);
let update_count =
CostUpdateService::update_cost_model(&cost_model, &mut execute_timings);
assert_eq!(1, update_count);
CostUpdateService::update_cost_model(&cost_model, &mut execute_timings);
assert_eq!(
expected_cost,
1,
cost_model
.read()
.unwrap()
.find_instruction_cost(&program_key_1)
.get_instruction_cost_table()
.len()
);
assert_eq!(
Some(&expected_cost),
cost_model
.read()
.unwrap()
.get_instruction_cost_table()
.get(&program_key_1)
);
}
@@ -261,8 +243,8 @@ mod tests {
let accumulated_us: u64 = 2000;
let accumulated_units: u64 = 200;
let count: u32 = 10;
// to expect new cost = (mean + 2 * std) of [10, 20]
expected_cost = 13;
// to expect new cost is Average(new_value, existing_value)
expected_cost = ((accumulated_units / count as u64) + expected_cost) / 2;
execute_timings.details.per_program_timings.insert(
program_key_1,
@@ -274,15 +256,22 @@ mod tests {
total_errored_units: 0,
},
);
let update_count =
CostUpdateService::update_cost_model(&cost_model, &mut execute_timings);
assert_eq!(1, update_count);
CostUpdateService::update_cost_model(&cost_model, &mut execute_timings);
assert_eq!(
expected_cost,
1,
cost_model
.read()
.unwrap()
.find_instruction_cost(&program_key_1)
.get_instruction_cost_table()
.len()
);
assert_eq!(
Some(&expected_cost),
cost_model
.read()
.unwrap()
.get_instruction_cost_table()
.get(&program_key_1)
);
}
}
@@ -306,49 +295,20 @@ mod tests {
total_errored_units: 0,
},
);
CostUpdateService::update_cost_model(&cost_model, &mut execute_timings);
// If both the `errored_txs_compute_consumed` is empty and `count == 0`, then
// nothing should be inserted into the cost model
assert_eq!(
CostUpdateService::update_cost_model(&cost_model, &mut execute_timings),
0
);
}
// set up current instruction cost to 100
let current_program_cost = 100;
{
execute_timings.details.per_program_timings.insert(
program_key_1,
ProgramTiming {
accumulated_us: 1000,
accumulated_units: current_program_cost,
count: 1,
errored_txs_compute_consumed: vec![],
total_errored_units: 0,
},
);
let update_count =
CostUpdateService::update_cost_model(&cost_model, &mut execute_timings);
assert_eq!(1, update_count);
assert_eq!(
current_program_cost,
cost_model
.read()
.unwrap()
.find_instruction_cost(&program_key_1)
);
assert!(cost_model
.read()
.unwrap()
.get_instruction_cost_table()
.is_empty());
}
// Test updating cost model with only erroring compute costs where the `cost_per_error` is
// greater than the current instruction cost for the program. Should update with the
// new erroring compute costs
let cost_per_error = 1000;
// expected_cost = (mean + 2*std) of data points:
// [
// 100, // original program_cost
// 1000, // cost_per_error
// ]
let expected_cost = 289u64;
{
let errored_txs_compute_consumed = vec![cost_per_error; 3];
let total_errored_units = errored_txs_compute_consumed.iter().sum();
@@ -362,23 +322,29 @@ mod tests {
total_errored_units,
},
);
let update_count =
CostUpdateService::update_cost_model(&cost_model, &mut execute_timings);
assert_eq!(1, update_count);
CostUpdateService::update_cost_model(&cost_model, &mut execute_timings);
assert_eq!(
expected_cost,
1,
cost_model
.read()
.unwrap()
.find_instruction_cost(&program_key_1)
.get_instruction_cost_table()
.len()
);
assert_eq!(
Some(&cost_per_error),
cost_model
.read()
.unwrap()
.get_instruction_cost_table()
.get(&program_key_1)
);
}
// Test updating cost model with only erroring compute costs where the error cost is
// `smaller_cost_per_error`, less than the current instruction cost for the program.
// The cost should not decrease for these new lesser errors
let smaller_cost_per_error = expected_cost - 10;
let smaller_cost_per_error = cost_per_error - 10;
{
let errored_txs_compute_consumed = vec![smaller_cost_per_error; 3];
let total_errored_units = errored_txs_compute_consumed.iter().sum();
@@ -392,23 +358,22 @@ mod tests {
total_errored_units,
},
);
let update_count =
CostUpdateService::update_cost_model(&cost_model, &mut execute_timings);
// expected_cost = (mean = 2*std) of data points:
// [
// 100, // original program cost,
// 1000, // cost_per_error from above test
// 289, // the smaller_cost_per_error will be coalesced to prev cost
// ]
let expected_cost = 293u64;
assert_eq!(1, update_count);
CostUpdateService::update_cost_model(&cost_model, &mut execute_timings);
assert_eq!(
expected_cost,
1,
cost_model
.read()
.unwrap()
.find_instruction_cost(&program_key_1)
.get_instruction_cost_table()
.len()
);
assert_eq!(
Some(&cost_per_error),
cost_model
.read()
.unwrap()
.get_instruction_cost_table()
.get(&program_key_1)
);
}
}

View File

@@ -26,9 +26,9 @@ use {
voting_service::VoteOp,
window_service::DuplicateSlotReceiver,
},
solana_accountsdb_plugin_manager::block_metadata_notifier_interface::BlockMetadataNotifierLock,
solana_client::rpc_response::SlotUpdate,
solana_entry::entry::VerifyRecyclers,
solana_geyser_plugin_manager::block_metadata_notifier_interface::BlockMetadataNotifierLock,
solana_gossip::cluster_info::ClusterInfo,
solana_ledger::{
block_error::BlockError,
@@ -726,11 +726,16 @@ impl ReplayStage {
restored_tower.adjust_lockouts_after_replay(root_bank.slot(), &slot_history)
}).
unwrap_or_else(|err| {
// It's a fatal error if the tower is not present. This is
// necessary to prevent the validator from violating
// lockouts for its new identity
error!("Failed to load tower for {}: {}", my_pubkey, err);
std::process::exit(1);
if err.is_file_missing() {
Tower::new_from_bankforks(
&bank_forks.read().unwrap(),
&my_pubkey,
&vote_account,
)
} else {
error!("Failed to load tower for {}: {}", my_pubkey, err);
std::process::exit(1);
}
});
// Ensure the validator can land votes with the new identity before

View File

@@ -26,7 +26,7 @@ use {
voting_service::VotingService,
},
crossbeam_channel::unbounded,
solana_accountsdb_plugin_manager::block_metadata_notifier_interface::BlockMetadataNotifierLock,
solana_geyser_plugin_manager::block_metadata_notifier_interface::BlockMetadataNotifierLock,
solana_gossip::cluster_info::ClusterInfo,
solana_ledger::{
blockstore::Blockstore, blockstore_processor::TransactionStatusSender,
@@ -311,8 +311,12 @@ impl Tvu {
);
let (cost_update_sender, cost_update_receiver) = channel();
let cost_update_service =
CostUpdateService::new(blockstore.clone(), cost_model.clone(), cost_update_receiver);
let cost_update_service = CostUpdateService::new(
exit.clone(),
blockstore.clone(),
cost_model.clone(),
cost_update_receiver,
);
let (drop_bank_sender, drop_bank_receiver) = channel();

View File

@@ -21,8 +21,8 @@ use {
},
crossbeam_channel::{bounded, unbounded},
rand::{thread_rng, Rng},
solana_accountsdb_plugin_manager::accountsdb_plugin_service::AccountsDbPluginService,
solana_entry::poh::compute_hash_time_ns,
solana_geyser_plugin_manager::geyser_plugin_service::GeyserPluginService,
solana_gossip::{
cluster_info::{
ClusterInfo, Node, DEFAULT_CONTACT_DEBUG_INTERVAL_MILLIS,
@@ -119,7 +119,7 @@ pub struct ValidatorConfig {
pub account_shrink_paths: Option<Vec<PathBuf>>,
pub rpc_config: JsonRpcConfig,
pub accountsdb_repl_service_config: Option<AccountsDbReplServiceConfig>,
pub accountsdb_plugin_config_files: Option<Vec<PathBuf>>,
pub geyser_plugin_config_files: Option<Vec<PathBuf>>,
pub rpc_addrs: Option<(SocketAddr, SocketAddr)>, // (JsonRpc, JsonRpcPubSub)
pub pubsub_config: PubSubConfig,
pub snapshot_config: Option<SnapshotConfig>,
@@ -180,7 +180,7 @@ impl Default for ValidatorConfig {
account_shrink_paths: None,
rpc_config: JsonRpcConfig::default(),
accountsdb_repl_service_config: None,
accountsdb_plugin_config_files: None,
geyser_plugin_config_files: None,
rpc_addrs: None,
pubsub_config: PubSubConfig::default(),
snapshot_config: None,
@@ -298,7 +298,7 @@ pub struct Validator {
pub cluster_info: Arc<ClusterInfo>,
pub bank_forks: Arc<RwLock<BankForks>>,
accountsdb_repl_service: Option<AccountsDbReplService>,
accountsdb_plugin_service: Option<AccountsDbPluginService>,
geyser_plugin_service: Option<GeyserPluginService>,
}
// in the distant future, get rid of ::new()/exit() and use Result properly...
@@ -337,18 +337,16 @@ impl Validator {
let mut bank_notification_senders = Vec::new();
let accountsdb_plugin_service =
if let Some(accountsdb_plugin_config_files) = &config.accountsdb_plugin_config_files {
let geyser_plugin_service =
if let Some(geyser_plugin_config_files) = &config.geyser_plugin_config_files {
let (confirmed_bank_sender, confirmed_bank_receiver) = unbounded();
bank_notification_senders.push(confirmed_bank_sender);
let result = AccountsDbPluginService::new(
confirmed_bank_receiver,
accountsdb_plugin_config_files,
);
let result =
GeyserPluginService::new(confirmed_bank_receiver, geyser_plugin_config_files);
match result {
Ok(accountsdb_plugin_service) => Some(accountsdb_plugin_service),
Ok(geyser_plugin_service) => Some(geyser_plugin_service),
Err(err) => {
error!("Failed to load the AccountsDb plugin: {:?}", err);
error!("Failed to load the Geyser plugin: {:?}", err);
abort();
}
}
@@ -422,29 +420,20 @@ impl Validator {
let accounts_package_channel = channel();
let accounts_update_notifier =
accountsdb_plugin_service
.as_ref()
.and_then(|accountsdb_plugin_service| {
accountsdb_plugin_service.get_accounts_update_notifier()
});
let accounts_update_notifier = geyser_plugin_service
.as_ref()
.and_then(|geyser_plugin_service| geyser_plugin_service.get_accounts_update_notifier());
let transaction_notifier =
accountsdb_plugin_service
.as_ref()
.and_then(|accountsdb_plugin_service| {
accountsdb_plugin_service.get_transaction_notifier()
});
let transaction_notifier = geyser_plugin_service
.as_ref()
.and_then(|geyser_plugin_service| geyser_plugin_service.get_transaction_notifier());
let block_metadata_notifier =
accountsdb_plugin_service
.as_ref()
.and_then(|accountsdb_plugin_service| {
accountsdb_plugin_service.get_block_metadata_notifier()
});
let block_metadata_notifier = geyser_plugin_service
.as_ref()
.and_then(|geyser_plugin_service| geyser_plugin_service.get_block_metadata_notifier());
info!(
"AccountsDb plugin: accounts_update_notifier: {} transaction_notifier: {}",
"Geyser plugin: accounts_update_notifier: {} transaction_notifier: {}",
accounts_update_notifier.is_some(),
transaction_notifier.is_some()
);
@@ -805,7 +794,8 @@ impl Validator {
let vote_tracker = Arc::<VoteTracker>::default();
let mut cost_model = CostModel::default();
cost_model.initialize_cost_table(&blockstore.read_program_costs().unwrap());
// initialize cost model with built-in instruction costs only
cost_model.initialize_cost_table(&[]);
let cost_model = Arc::new(RwLock::new(cost_model));
let (retransmit_slots_sender, retransmit_slots_receiver) = unbounded();
@@ -953,7 +943,7 @@ impl Validator {
cluster_info,
bank_forks,
accountsdb_repl_service,
accountsdb_plugin_service,
geyser_plugin_service,
}
}
@@ -1072,10 +1062,8 @@ impl Validator {
.expect("accountsdb_repl_service");
}
if let Some(accountsdb_plugin_service) = self.accountsdb_plugin_service {
accountsdb_plugin_service
.join()
.expect("accountsdb_plugin_service");
if let Some(geyser_plugin_service) = self.geyser_plugin_service {
geyser_plugin_service.join().expect("geyser_plugin_service");
}
}
}

View File

@@ -80,7 +80,7 @@ module.exports = {
},
"developing/test-validator",
"developing/backwards-compatibility",
"developing/plugins/accountsdb_plugin"
"developing/plugins/geyser-plugins"
],
Integrating: ["integrations/exchange"],
Validating: [

View File

@@ -76,7 +76,7 @@ Major releases:
- [`solana-program`](https://docs.rs/solana-program/) - Rust SDK for writing programs
- [`solana-client`](https://docs.rs/solana-client/) - Rust client for connecting to RPC API
- [`solana-cli-config`](https://docs.rs/solana-cli-config/) - Rust client for managing Solana CLI config files
- [`solana-accountsdb-plugin-interface`](https://docs.rs/solana-accountsdb-plugin-interface/) - Rust interface for developing Solana AccountsDb plugins.
- [`solana-geyser-plugin-interface`](https://docs.rs/solana-geyser-plugin-interface/) - Rust interface for developing Solana Geyser plugins.
Patch releases:

View File

@@ -677,8 +677,8 @@ console.log(`Stake balance: ${stakeBalance}`)
// We can verify the state of our stake. This may take some time to become active
let stakeState = await connection.getStakeActivation(stakeAccount.publicKey);
console.log(`Stake Stake: ${stakeState.state}`);
// Stake State: inactive
console.log(`Stake state: ${stakeState.state}`);
// Stake state: inactive
// To delegate our stake, we get the current vote accounts and choose the first
let voteAccounts = await connection.getVoteAccounts();

View File

@@ -2949,7 +2949,7 @@ curl http://localhost:8899 -X POST -H "Content-Type: application/json" -d '
Result:
```json
{"jsonrpc":"2.0","result":{"solana-core": "1.9.10"},"id":1}
{"jsonrpc":"2.0","result":{"solana-core": "1.9.14"},"id":1}
```
### getVoteAccounts

View File

@@ -1,18 +1,18 @@
---
title: Plugins
title: Geyser Plugins
---
## Overview
Validators under heavy RPC loads, such as when serving getProgramAccounts calls,
can fall behind the network. To solve this problem, the validator has been
enhanced to support a plugin mechanism through which the information about
accounts and slots can be transmitted to external data stores such as relational
databases, NoSQL databases or Kafka. RPC services then can be developed to
consume data from these external data stores with the possibility of more
flexible and targeted optimizations such as caching and indexing. This allows
the validator to focus on processing transactions without being slowed down by
busy RPC requests.
enhanced to support a plugin mechanism, called a "Geyser" plugin, through which
the information about accounts, slots, blocks, and transactions can be
transmitted to external data stores such as relational databases, NoSQL
databases or Kafka. RPC services then can be developed to consume data from
these external data stores with the possibility of more flexible and targeted
optimizations such as caching and indexing. This allows the validator to focus
on processing transactions without being slowed down by busy RPC requests.
This document describes the interfaces of the plugin and the referential plugin
implementation for the PostgreSQL database.
@@ -22,24 +22,24 @@ implementation for the PostgreSQL database.
### Important Crates:
- [`solana-accountsdb-plugin-interface`] &mdash; This crate defines the plugin
- [`solana-geyser-plugin-interface`] &mdash; This crate defines the plugin
interfaces.
- [`solana-accountsdb-plugin-postgres`] &mdash; The crate for the referential
plugin implementation for the PostgreSQL database.
[`solana-accountsdb-plugin-interface`]: https://docs.rs/solana-accountsdb-plugin-interface
[`solana-geyser-plugin-interface`]: https://docs.rs/solana-geyser-plugin-interface
[`solana-accountsdb-plugin-postgres`]: https://docs.rs/solana-accountsdb-plugin-postgres
[`solana-sdk`]: https://docs.rs/solana-sdk
[`solana-transaction-status`]: https://docs.rs/solana-transaction-status
## The Plugin Interface
The Plugin interface is declared in [`solana-accountsdb-plugin-interface`]. It
is defined by the trait `AccountsDbPlugin`. The plugin should implement the
The Plugin interface is declared in [`solana-geyser-plugin-interface`]. It
is defined by the trait `GeyserPlugin`. The plugin should implement the
trait and expose a "C" function `_create_plugin` to return the pointer to this
trait. For example, in the referential implementation, the following code
instantiates the PostgreSQL plugin `AccountsDbPluginPostgres ` and returns its
instantiates the PostgreSQL plugin `GeyserPluginPostgres ` and returns its
pointer.
```
@@ -47,10 +47,10 @@ pointer.
#[allow(improper_ctypes_definitions)]
/// # Safety
///
/// This function returns the AccountsDbPluginPostgres pointer as trait AccountsDbPlugin.
pub unsafe extern "C" fn _create_plugin() -> *mut dyn AccountsDbPlugin {
let plugin = AccountsDbPluginPostgres::new();
let plugin: Box<dyn AccountsDbPlugin> = Box::new(plugin);
/// This function returns the GeyserPluginPostgres pointer as trait GeyserPlugin.
pub unsafe extern "C" fn _create_plugin() -> *mut dyn GeyserPlugin {
let plugin = GeyserPluginPostgres::new();
let plugin: Box<dyn GeyserPlugin> = Box::new(plugin);
Box::into_raw(plugin)
}
```
@@ -62,7 +62,7 @@ file in JSON format. The JSON file must have a field `libpath` that points
to the full path name of the shared library implementing the plugin, and may
have other configuration information, like connection parameters for the external
database. The plugin configuration file is specified by the validator's CLI
parameter `--accountsdb-plugin-config` and the file must be readable to the
parameter `--geyser-plugin-config` and the file must be readable to the
validator process.
Please see the [config file](#config) for the referential
@@ -164,11 +164,11 @@ please refer to [`solana-sdk`] and [`solana-transaction-status`]
The `slot` points to the slot the transaction is executed at.
For more details, please refer to the Rust documentation in
[`solana-accountsdb-plugin-interface`].
[`solana-geyser-plugin-interface`].
## Example PostgreSQL Plugin
The [`solana-accountsdb-plugin-postgres`] crate implements a plugin storing
The [`solana-accountsdb-plugin-postgres`] repository implements a plugin storing
account data to a PostgreSQL database to illustrate how a plugin can be
developed.
@@ -182,7 +182,7 @@ configuration file looks like the following:
```
{
"libpath": "/solana/target/release/libsolana_accountsdb_plugin_postgres.so",
"libpath": "/solana/target/release/libsolana_geyser_plugin_postgres.so",
"host": "postgres-server",
"user": "solana",
"port": 5433,
@@ -366,7 +366,7 @@ Then run the script:
psql -U solana -p 5433 -h 10.138.0.9 -w -d solana -f create_schema.sql
```
After this, start the validator with the plugin by using the `--accountsdb-plugin-config`
After this, start the validator with the plugin by using the `--geyser-plugin-config`
argument mentioned above.
#### Destroy the Schema Objects

View File

@@ -16,8 +16,8 @@ and received the Message's instruction data inside, and also the index of the cu
Two helper functions to extract this data can be used:
```
fn load_current_index(instruction_data: &[u8]) -> u16;
fn load_instruction_at(instruction_index: usize, instruction_data: &[u8]) -> Result<Instruction>;
fn load_current_index_checked(instruction_data: &[u8]) -> u16;
fn load_instruction_at_checked(instruction_index: usize, instruction_sysvar_account_info: &AccountInfo) -> Result<Instruction>;
```
The runtime will recognize this special instruction, serialize the Message instruction data

View File

@@ -2,7 +2,7 @@
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2021"
name = "solana-dos"
version = "1.9.10"
version = "1.9.14"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -13,15 +13,15 @@ bincode = "1.3.3"
clap = "2.33.1"
log = "0.4.14"
rand = "0.7.0"
solana-core = { path = "../core", version = "=1.9.10" }
solana-gossip = { path = "../gossip", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-net-utils = { path = "../net-utils", version = "=1.9.10" }
solana-perf = { path = "../perf", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-streamer = { path = "../streamer", version = "=1.9.10" }
solana-version = { path = "../version", version = "=1.9.10" }
solana-client = { path = "../client", version = "=1.9.10" }
solana-core = { path = "../core", version = "=1.9.14" }
solana-gossip = { path = "../gossip", version = "=1.9.14" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-net-utils = { path = "../net-utils", version = "=1.9.14" }
solana-perf = { path = "../perf", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-streamer = { path = "../streamer", version = "=1.9.14" }
solana-version = { path = "../version", version = "=1.9.14" }
solana-client = { path = "../client", version = "=1.9.14" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-download-utils"
version = "1.9.10"
version = "1.9.14"
description = "Solana Download Utils"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -14,8 +14,8 @@ console = "0.15.0"
indicatif = "0.16.2"
log = "0.4.14"
reqwest = { version = "0.11.6", default-features = false, features = ["blocking", "rustls-tls", "json"] }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-runtime = { path = "../runtime", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-runtime = { path = "../runtime", version = "=1.9.14" }
[lib]
crate-type = ["lib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-entry"
version = "1.9.10"
version = "1.9.14"
description = "Solana Entry"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -16,17 +16,17 @@ log = "0.4.11"
rand = "0.7.0"
rayon = "1.5.1"
serde = "1.0.130"
solana-measure = { path = "../measure", version = "=1.9.10" }
solana-merkle-tree = { path = "../merkle-tree", version = "=1.9.10" }
solana-metrics = { path = "../metrics", version = "=1.9.10" }
solana-perf = { path = "../perf", version = "=1.9.10" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-measure = { path = "../measure", version = "=1.9.14" }
solana-merkle-tree = { path = "../merkle-tree", version = "=1.9.14" }
solana-metrics = { path = "../metrics", version = "=1.9.14" }
solana-perf = { path = "../perf", version = "=1.9.14" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
bincode = "1.3.3"
[dev-dependencies]
matches = "0.1.9"
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.14" }
[lib]
crate-type = ["lib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-faucet"
version = "1.9.10"
version = "1.9.14"
description = "Solana Faucet"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -16,12 +16,12 @@ clap = "2.33"
log = "0.4.14"
serde = "1.0.130"
serde_derive = "1.0.103"
solana-clap-utils = { path = "../clap-utils", version = "=1.9.10" }
solana-cli-config = { path = "../cli-config", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-metrics = { path = "../metrics", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-version = { path = "../version", version = "=1.9.10" }
solana-clap-utils = { path = "../clap-utils", version = "=1.9.14" }
solana-cli-config = { path = "../cli-config", version = "=1.9.14" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-metrics = { path = "../metrics", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-version = { path = "../version", version = "=1.9.14" }
spl-memo = { version = "=3.0.1", features = ["no-entrypoint"] }
thiserror = "1.0"
tokio = { version = "1", features = ["full"] }

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-frozen-abi"
version = "1.9.10"
version = "1.9.14"
description = "Solana Frozen ABI"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -16,11 +16,11 @@ log = "0.4.14"
serde = "1.0.130"
serde_derive = "1.0.103"
sha2 = "0.9.8"
solana-frozen-abi-macro = { path = "macro", version = "=1.9.10" }
solana-frozen-abi-macro = { path = "macro", version = "=1.9.14" }
thiserror = "1.0"
[target.'cfg(not(target_arch = "bpf"))'.dependencies]
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.14" }
generic-array = { version = "0.14.4", default-features = false, features = ["serde", "more_lengths"]}
memmap2 = "0.5.0"

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-frozen-abi-macro"
version = "1.9.10"
version = "1.9.14"
description = "Solana Frozen ABI Macro"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-genesis-utils"
version = "1.9.10"
version = "1.9.14"
description = "Solana Genesis Utils"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,9 +10,9 @@ documentation = "https://docs.rs/solana-download-utils"
edition = "2021"
[dependencies]
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-download-utils = { path = "../download-utils", version = "=1.9.10" }
solana-runtime = { path = "../runtime", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-download-utils = { path = "../download-utils", version = "=1.9.14" }
solana-runtime = { path = "../runtime", version = "=1.9.14" }
[lib]
crate-type = ["lib"]

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2021"
name = "solana-genesis"
description = "Blockchain, Rebuilt for Scale"
version = "1.9.10"
version = "1.9.14"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -15,16 +15,16 @@ clap = "2.33.1"
serde = "1.0.130"
serde_json = "1.0.72"
serde_yaml = "0.8.21"
solana-clap-utils = { path = "../clap-utils", version = "=1.9.10" }
solana-cli-config = { path = "../cli-config", version = "=1.9.10" }
solana-entry = { path = "../entry", version = "=1.9.10" }
solana-ledger = { path = "../ledger", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-runtime = { path = "../runtime", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-stake-program = { path = "../programs/stake", version = "=1.9.10" }
solana-version = { path = "../version", version = "=1.9.10" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.10" }
solana-clap-utils = { path = "../clap-utils", version = "=1.9.14" }
solana-cli-config = { path = "../cli-config", version = "=1.9.14" }
solana-entry = { path = "../entry", version = "=1.9.14" }
solana-ledger = { path = "../ledger", version = "=1.9.14" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-runtime = { path = "../runtime", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-stake-program = { path = "../programs/stake", version = "=1.9.14" }
solana-version = { path = "../version", version = "=1.9.14" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.14" }
tempfile = "3.2.0"
[[bin]]

View File

@@ -1,19 +1,19 @@
[package]
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2021"
name = "solana-accountsdb-plugin-interface"
description = "The Solana AccountsDb plugin interface."
version = "1.9.10"
name = "solana-geyser-plugin-interface"
description = "The Solana Geyser plugin interface."
version = "1.9.14"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-accountsdb-plugin-interface"
documentation = "https://docs.rs/solana-geyser-plugin-interface"
[dependencies]
log = "0.4.11"
thiserror = "1.0.30"
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-transaction-status = { path = "../transaction-status", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-transaction-status = { path = "../transaction-status", version = "=1.9.14" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -0,0 +1,25 @@
<p align="center">
<a href="https://solana.com">
<img alt="Solana" src="https://i.imgur.com/IKyzQ6T.png" width="250" />
</a>
</p>
# Solana Geyser Plugin Interface
This crate enables an plugin to be added into the Solana Validator runtime to
take actions at the time of account updates or block and transaction processing;
for example, saving the account state to an external database. The plugin must
implement the `GeyserPlugin` trait. Please see the detail of the
`geyser_plugin_interface.rs` for the interface definition.
The plugin should produce a `cdylib` dynamic library, which must expose a `C`
function `_create_plugin()` that instantiates the implementation of the
interface.
The https://github.com/solana-labs/solana-accountsdb-plugin-postgres repository
provides an example of how to create a plugin which saves the accounts data into
an external PostgreSQL databases.
More information about Solana is available in the [Solana documentation](https://docs.solana.com/).
Still have questions? Ask us on [Discord](https://discordapp.com/invite/pquxPsq)

View File

@@ -1,5 +1,5 @@
/// The interface for AccountsDb plugins. A plugin must implement
/// the AccountsDbPlugin trait to work with the runtime.
/// The interface for Geyser plugins. A plugin must implement
/// the GeyserPlugin trait to work with the runtime.
/// In addition, the dynamic library must export a "C" function _create_plugin which
/// creates the implementation of the plugin.
use {
@@ -87,7 +87,7 @@ pub enum ReplicaBlockInfoVersions<'a> {
/// Errors returned by plugin calls
#[derive(Error, Debug)]
pub enum AccountsDbPluginError {
pub enum GeyserPluginError {
/// Error opening the configuration file; for example, when the file
/// is not found or when the validator process has no permission to read it.
#[error("Error opening config file. Error detail: ({0}).")]
@@ -136,12 +136,12 @@ impl SlotStatus {
}
}
pub type Result<T> = std::result::Result<T, AccountsDbPluginError>;
pub type Result<T> = std::result::Result<T, GeyserPluginError>;
/// Defines an AccountsDb plugin, to stream data from the runtime.
/// AccountsDb plugins must describe desired behavior for load and unload,
/// Defines a Geyser plugin, to stream data from the runtime.
/// Geyser plugins must describe desired behavior for load and unload,
/// as well as how they will handle streamed data.
pub trait AccountsDbPlugin: Any + Send + Sync + std::fmt::Debug {
pub trait GeyserPlugin: Any + Send + Sync + std::fmt::Debug {
fn name(&self) -> &'static str;
/// The callback called when a plugin is loaded by the system,

View File

@@ -0,0 +1 @@
pub mod geyser_plugin_interface;

View File

@@ -0,0 +1,31 @@
[package]
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2021"
name = "solana-geyser-plugin-manager"
description = "The Solana Geyser plugin manager."
version = "1.9.14"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-geyser-plugin-manager"
[dependencies]
bs58 = "0.4.0"
crossbeam-channel = "0.5"
libloading = "0.7.2"
log = "0.4.11"
serde = "1.0.130"
serde_derive = "1.0.103"
serde_json = "1.0.72"
solana-geyser-plugin-interface = { path = "../geyser-plugin-interface", version = "=1.9.14" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-measure = { path = "../measure", version = "=1.9.14" }
solana-metrics = { path = "../metrics", version = "=1.9.14" }
solana-rpc = { path = "../rpc", version = "=1.9.14" }
solana-runtime = { path = "../runtime", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-transaction-status = { path = "../transaction-status", version = "=1.9.14" }
thiserror = "1.0.30"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -1,8 +1,8 @@
/// Module responsible for notifying plugins of account updates
use {
crate::accountsdb_plugin_manager::AccountsDbPluginManager,
crate::geyser_plugin_manager::GeyserPluginManager,
log::*,
solana_accountsdb_plugin_interface::accountsdb_plugin_interface::{
solana_geyser_plugin_interface::geyser_plugin_interface::{
ReplicaAccountInfo, ReplicaAccountInfoVersions,
},
solana_measure::measure::Measure,
@@ -19,7 +19,7 @@ use {
};
#[derive(Debug)]
pub(crate) struct AccountsUpdateNotifierImpl {
plugin_manager: Arc<RwLock<AccountsDbPluginManager>>,
plugin_manager: Arc<RwLock<GeyserPluginManager>>,
}
impl AccountsUpdateNotifierInterface for AccountsUpdateNotifierImpl {
@@ -30,14 +30,14 @@ impl AccountsUpdateNotifierInterface for AccountsUpdateNotifierImpl {
}
fn notify_account_restore_from_snapshot(&self, slot: Slot, account: &StoredAccountMeta) {
let mut measure_all = Measure::start("accountsdb-plugin-notify-account-restore-all");
let mut measure_copy = Measure::start("accountsdb-plugin-copy-stored-account-info");
let mut measure_all = Measure::start("geyser-plugin-notify-account-restore-all");
let mut measure_copy = Measure::start("geyser-plugin-copy-stored-account-info");
let account = self.accountinfo_from_stored_account_meta(account);
measure_copy.stop();
inc_new_counter_debug!(
"accountsdb-plugin-copy-stored-account-info-us",
"geyser-plugin-copy-stored-account-info-us",
measure_copy.as_us() as usize,
100000,
100000
@@ -49,7 +49,7 @@ impl AccountsUpdateNotifierInterface for AccountsUpdateNotifierImpl {
measure_all.stop();
inc_new_counter_debug!(
"accountsdb-plugin-notify-account-restore-all-us",
"geyser-plugin-notify-account-restore-all-us",
measure_all.as_us() as usize,
100000,
100000
@@ -63,7 +63,7 @@ impl AccountsUpdateNotifierInterface for AccountsUpdateNotifierImpl {
}
for plugin in plugin_manager.plugins.iter_mut() {
let mut measure = Measure::start("accountsdb-plugin-end-of-restore-from-snapshot");
let mut measure = Measure::start("geyser-plugin-end-of-restore-from-snapshot");
match plugin.notify_end_of_startup() {
Err(err) => {
error!(
@@ -81,7 +81,7 @@ impl AccountsUpdateNotifierInterface for AccountsUpdateNotifierImpl {
}
measure.stop();
inc_new_counter_debug!(
"accountsdb-plugin-end-of-restore-from-snapshot",
"geyser-plugin-end-of-restore-from-snapshot",
measure.as_us() as usize
);
}
@@ -89,7 +89,7 @@ impl AccountsUpdateNotifierInterface for AccountsUpdateNotifierImpl {
}
impl AccountsUpdateNotifierImpl {
pub fn new(plugin_manager: Arc<RwLock<AccountsDbPluginManager>>) -> Self {
pub fn new(plugin_manager: Arc<RwLock<GeyserPluginManager>>) -> Self {
AccountsUpdateNotifierImpl { plugin_manager }
}
@@ -130,14 +130,14 @@ impl AccountsUpdateNotifierImpl {
slot: Slot,
is_startup: bool,
) {
let mut measure2 = Measure::start("accountsdb-plugin-notify_plugins_of_account_update");
let mut measure2 = Measure::start("geyser-plugin-notify_plugins_of_account_update");
let mut plugin_manager = self.plugin_manager.write().unwrap();
if plugin_manager.plugins.is_empty() {
return;
}
for plugin in plugin_manager.plugins.iter_mut() {
let mut measure = Measure::start("accountsdb-plugin-update-account");
let mut measure = Measure::start("geyser-plugin-update-account");
match plugin.update_account(
ReplicaAccountInfoVersions::V0_0_1(&account),
slot,
@@ -163,7 +163,7 @@ impl AccountsUpdateNotifierImpl {
}
measure.stop();
inc_new_counter_debug!(
"accountsdb-plugin-update-account-us",
"geyser-plugin-update-account-us",
measure.as_us() as usize,
100000,
100000
@@ -171,7 +171,7 @@ impl AccountsUpdateNotifierImpl {
}
measure2.stop();
inc_new_counter_debug!(
"accountsdb-plugin-notify_plugins_of_account_update-us",
"geyser-plugin-notify_plugins_of_account_update-us",
measure2.as_us() as usize,
100000,
100000

View File

@@ -1,10 +1,10 @@
use {
crate::{
accountsdb_plugin_manager::AccountsDbPluginManager,
block_metadata_notifier_interface::BlockMetadataNotifier,
geyser_plugin_manager::GeyserPluginManager,
},
log::*,
solana_accountsdb_plugin_interface::accountsdb_plugin_interface::{
solana_geyser_plugin_interface::geyser_plugin_interface::{
ReplicaBlockInfo, ReplicaBlockInfoVersions,
},
solana_measure::measure::Measure,
@@ -16,7 +16,7 @@ use {
};
pub(crate) struct BlockMetadataNotifierImpl {
plugin_manager: Arc<RwLock<AccountsDbPluginManager>>,
plugin_manager: Arc<RwLock<GeyserPluginManager>>,
}
impl BlockMetadataNotifier for BlockMetadataNotifierImpl {
@@ -36,7 +36,7 @@ impl BlockMetadataNotifier for BlockMetadataNotifierImpl {
let rewards = Self::build_rewards(rewards);
for plugin in plugin_manager.plugins.iter_mut() {
let mut measure = Measure::start("accountsdb-plugin-update-slot");
let mut measure = Measure::start("geyser-plugin-update-slot");
let block_info =
Self::build_replica_block_info(slot, blockhash, &rewards, block_time, block_height);
let block_info = ReplicaBlockInfoVersions::V0_0_1(&block_info);
@@ -59,7 +59,7 @@ impl BlockMetadataNotifier for BlockMetadataNotifierImpl {
}
measure.stop();
inc_new_counter_debug!(
"accountsdb-plugin-update-block-metadata-us",
"geyser-plugin-update-block-metadata-us",
measure.as_us() as usize,
1000,
1000
@@ -99,7 +99,7 @@ impl BlockMetadataNotifierImpl {
}
}
pub fn new(plugin_manager: Arc<RwLock<AccountsDbPluginManager>>) -> Self {
pub fn new(plugin_manager: Arc<RwLock<GeyserPluginManager>>) -> Self {
Self { plugin_manager }
}
}

View File

@@ -1,20 +1,20 @@
/// Managing the AccountsDb plugins
/// Managing the Geyser plugins
use {
libloading::{Library, Symbol},
log::*,
solana_accountsdb_plugin_interface::accountsdb_plugin_interface::AccountsDbPlugin,
solana_geyser_plugin_interface::geyser_plugin_interface::GeyserPlugin,
std::error::Error,
};
#[derive(Default, Debug)]
pub struct AccountsDbPluginManager {
pub plugins: Vec<Box<dyn AccountsDbPlugin>>,
pub struct GeyserPluginManager {
pub plugins: Vec<Box<dyn GeyserPlugin>>,
libs: Vec<Library>,
}
impl AccountsDbPluginManager {
impl GeyserPluginManager {
pub fn new() -> Self {
AccountsDbPluginManager {
GeyserPluginManager {
plugins: Vec::default(),
libs: Vec::default(),
}
@@ -29,7 +29,7 @@ impl AccountsDbPluginManager {
libpath: &str,
config_file: &str,
) -> Result<(), Box<dyn Error>> {
type PluginConstructor = unsafe fn() -> *mut dyn AccountsDbPlugin;
type PluginConstructor = unsafe fn() -> *mut dyn GeyserPlugin;
let lib = Library::new(libpath)?;
let constructor: Symbol<PluginConstructor> = lib.get(b"_create_plugin")?;
let plugin_raw = constructor();

View File

@@ -1,11 +1,10 @@
use {
crate::{
accounts_update_notifier::AccountsUpdateNotifierImpl,
accountsdb_plugin_manager::AccountsDbPluginManager,
block_metadata_notifier::BlockMetadataNotifierImpl,
block_metadata_notifier_interface::BlockMetadataNotifierLock,
slot_status_notifier::SlotStatusNotifierImpl, slot_status_observer::SlotStatusObserver,
transaction_notifier::TransactionNotifierImpl,
geyser_plugin_manager::GeyserPluginManager, slot_status_notifier::SlotStatusNotifierImpl,
slot_status_observer::SlotStatusObserver, transaction_notifier::TransactionNotifierImpl,
},
crossbeam_channel::Receiver,
log::*,
@@ -26,7 +25,7 @@ use {
};
#[derive(Error, Debug)]
pub enum AccountsdbPluginServiceError {
pub enum GeyserPluginServiceError {
#[error("Cannot open the the plugin config file")]
CannotOpenConfigFile(String),
@@ -46,41 +45,41 @@ pub enum AccountsdbPluginServiceError {
PluginLoadError(String),
}
/// The service managing the AccountsDb plugin workflow.
pub struct AccountsDbPluginService {
/// The service managing the Geyser plugin workflow.
pub struct GeyserPluginService {
slot_status_observer: Option<SlotStatusObserver>,
plugin_manager: Arc<RwLock<AccountsDbPluginManager>>,
plugin_manager: Arc<RwLock<GeyserPluginManager>>,
accounts_update_notifier: Option<AccountsUpdateNotifier>,
transaction_notifier: Option<TransactionNotifierLock>,
block_metadata_notifier: Option<BlockMetadataNotifierLock>,
}
impl AccountsDbPluginService {
/// Creates and returns the AccountsDbPluginService.
impl GeyserPluginService {
/// Creates and returns the GeyserPluginService.
/// # Arguments
/// * `confirmed_bank_receiver` - The receiver for confirmed bank notification
/// * `accountsdb_plugin_config_file` - The config file path for the plugin. The
/// * `geyser_plugin_config_file` - The config file path for the plugin. The
/// config file controls the plugin responsible
/// for transporting the data to external data stores. It is defined in JSON format.
/// The `libpath` field should be pointed to the full path of the dynamic shared library
/// (.so file) to be loaded. The shared library must implement the `AccountsDbPlugin`
/// (.so file) to be loaded. The shared library must implement the `GeyserPlugin`
/// trait. And the shared library shall export a `C` function `_create_plugin` which
/// shall create the implementation of `AccountsDbPlugin` and returns to the caller.
/// shall create the implementation of `GeyserPlugin` and returns to the caller.
/// The rest of the JSON fields' definition is up to to the concrete plugin implementation
/// It is usually used to configure the connection information for the external data store.
pub fn new(
confirmed_bank_receiver: Receiver<BankNotification>,
accountsdb_plugin_config_files: &[PathBuf],
) -> Result<Self, AccountsdbPluginServiceError> {
geyser_plugin_config_files: &[PathBuf],
) -> Result<Self, GeyserPluginServiceError> {
info!(
"Starting AccountsDbPluginService from config files: {:?}",
accountsdb_plugin_config_files
"Starting GeyserPluginService from config files: {:?}",
geyser_plugin_config_files
);
let mut plugin_manager = AccountsDbPluginManager::new();
let mut plugin_manager = GeyserPluginManager::new();
for accountsdb_plugin_config_file in accountsdb_plugin_config_files {
Self::load_plugin(&mut plugin_manager, accountsdb_plugin_config_file)?;
for geyser_plugin_config_file in geyser_plugin_config_files {
Self::load_plugin(&mut plugin_manager, geyser_plugin_config_file)?;
}
let account_data_notifications_enabled =
plugin_manager.account_data_notifications_enabled();
@@ -124,8 +123,8 @@ impl AccountsDbPluginService {
(None, None)
};
info!("Started AccountsDbPluginService");
Ok(AccountsDbPluginService {
info!("Started GeyserPluginService");
Ok(GeyserPluginService {
slot_status_observer,
plugin_manager,
accounts_update_notifier,
@@ -135,46 +134,44 @@ impl AccountsDbPluginService {
}
fn load_plugin(
plugin_manager: &mut AccountsDbPluginManager,
accountsdb_plugin_config_file: &Path,
) -> Result<(), AccountsdbPluginServiceError> {
let mut file = match File::open(accountsdb_plugin_config_file) {
plugin_manager: &mut GeyserPluginManager,
geyser_plugin_config_file: &Path,
) -> Result<(), GeyserPluginServiceError> {
let mut file = match File::open(geyser_plugin_config_file) {
Ok(file) => file,
Err(err) => {
return Err(AccountsdbPluginServiceError::CannotOpenConfigFile(format!(
return Err(GeyserPluginServiceError::CannotOpenConfigFile(format!(
"Failed to open the plugin config file {:?}, error: {:?}",
accountsdb_plugin_config_file, err
geyser_plugin_config_file, err
)));
}
};
let mut contents = String::new();
if let Err(err) = file.read_to_string(&mut contents) {
return Err(AccountsdbPluginServiceError::CannotReadConfigFile(format!(
return Err(GeyserPluginServiceError::CannotReadConfigFile(format!(
"Failed to read the plugin config file {:?}, error: {:?}",
accountsdb_plugin_config_file, err
geyser_plugin_config_file, err
)));
}
let result: serde_json::Value = match serde_json::from_str(&contents) {
Ok(value) => value,
Err(err) => {
return Err(AccountsdbPluginServiceError::InvalidConfigFileFormat(
format!(
"The config file {:?} is not in a valid Json format, error: {:?}",
accountsdb_plugin_config_file, err
),
));
return Err(GeyserPluginServiceError::InvalidConfigFileFormat(format!(
"The config file {:?} is not in a valid Json format, error: {:?}",
geyser_plugin_config_file, err
)));
}
};
let libpath = result["libpath"]
.as_str()
.ok_or(AccountsdbPluginServiceError::LibPathNotSet)?;
let config_file = accountsdb_plugin_config_file
.ok_or(GeyserPluginServiceError::LibPathNotSet)?;
let config_file = geyser_plugin_config_file
.as_os_str()
.to_str()
.ok_or(AccountsdbPluginServiceError::InvalidPluginPath)?;
.ok_or(GeyserPluginServiceError::InvalidPluginPath)?;
unsafe {
let result = plugin_manager.load_plugin(libpath, config_file);
@@ -183,7 +180,7 @@ impl AccountsDbPluginService {
"Failed to load the plugin library: {:?}, error: {:?}",
libpath, err
);
return Err(AccountsdbPluginServiceError::PluginLoadError(msg));
return Err(GeyserPluginServiceError::PluginLoadError(msg));
}
}
Ok(())

View File

@@ -1,8 +1,8 @@
pub mod accounts_update_notifier;
pub mod accountsdb_plugin_manager;
pub mod accountsdb_plugin_service;
pub mod block_metadata_notifier;
pub mod block_metadata_notifier_interface;
pub mod geyser_plugin_manager;
pub mod geyser_plugin_service;
pub mod slot_status_notifier;
pub mod slot_status_observer;
pub mod transaction_notifier;

View File

@@ -1,7 +1,7 @@
use {
crate::accountsdb_plugin_manager::AccountsDbPluginManager,
crate::geyser_plugin_manager::GeyserPluginManager,
log::*,
solana_accountsdb_plugin_interface::accountsdb_plugin_interface::SlotStatus,
solana_geyser_plugin_interface::geyser_plugin_interface::SlotStatus,
solana_measure::measure::Measure,
solana_metrics::*,
solana_sdk::clock::Slot,
@@ -22,7 +22,7 @@ pub trait SlotStatusNotifierInterface {
pub type SlotStatusNotifier = Arc<RwLock<dyn SlotStatusNotifierInterface + Sync + Send>>;
pub struct SlotStatusNotifierImpl {
plugin_manager: Arc<RwLock<AccountsDbPluginManager>>,
plugin_manager: Arc<RwLock<GeyserPluginManager>>,
}
impl SlotStatusNotifierInterface for SlotStatusNotifierImpl {
@@ -40,7 +40,7 @@ impl SlotStatusNotifierInterface for SlotStatusNotifierImpl {
}
impl SlotStatusNotifierImpl {
pub fn new(plugin_manager: Arc<RwLock<AccountsDbPluginManager>>) -> Self {
pub fn new(plugin_manager: Arc<RwLock<GeyserPluginManager>>) -> Self {
Self { plugin_manager }
}
@@ -51,7 +51,7 @@ impl SlotStatusNotifierImpl {
}
for plugin in plugin_manager.plugins.iter_mut() {
let mut measure = Measure::start("accountsdb-plugin-update-slot");
let mut measure = Measure::start("geyser-plugin-update-slot");
match plugin.update_slot_status(slot, parent, slot_status.clone()) {
Err(err) => {
error!(
@@ -71,7 +71,7 @@ impl SlotStatusNotifierImpl {
}
measure.stop();
inc_new_counter_debug!(
"accountsdb-plugin-update-slot-us",
"geyser-plugin-update-slot-us",
measure.as_us() as usize,
1000,
1000

View File

@@ -1,8 +1,8 @@
/// Module responsible for notifying plugins of transactions
use {
crate::accountsdb_plugin_manager::AccountsDbPluginManager,
crate::geyser_plugin_manager::GeyserPluginManager,
log::*,
solana_accountsdb_plugin_interface::accountsdb_plugin_interface::{
solana_geyser_plugin_interface::geyser_plugin_interface::{
ReplicaTransactionInfo, ReplicaTransactionInfoVersions,
},
solana_measure::measure::Measure,
@@ -16,9 +16,9 @@ use {
/// This implementation of TransactionNotifier is passed to the rpc's TransactionStatusService
/// at the validator startup. TransactionStatusService invokes the notify_transaction method
/// for new transactions. The implementation in turn invokes the notify_transaction of each
/// plugin enabled with transaction notification managed by the AccountsDbPluginManager.
/// plugin enabled with transaction notification managed by the GeyserPluginManager.
pub(crate) struct TransactionNotifierImpl {
plugin_manager: Arc<RwLock<AccountsDbPluginManager>>,
plugin_manager: Arc<RwLock<GeyserPluginManager>>,
}
impl TransactionNotifier for TransactionNotifierImpl {
@@ -29,7 +29,7 @@ impl TransactionNotifier for TransactionNotifierImpl {
transaction_status_meta: &TransactionStatusMeta,
transaction: &SanitizedTransaction,
) {
let mut measure = Measure::start("accountsdb-plugin-notify_plugins_of_transaction_info");
let mut measure = Measure::start("geyser-plugin-notify_plugins_of_transaction_info");
let transaction_log_info =
Self::build_replica_transaction_info(signature, transaction_status_meta, transaction);
@@ -64,7 +64,7 @@ impl TransactionNotifier for TransactionNotifierImpl {
}
measure.stop();
inc_new_counter_debug!(
"accountsdb-plugin-notify_plugins_of_transaction_info-us",
"geyser-plugin-notify_plugins_of_transaction_info-us",
measure.as_us() as usize,
10000,
10000
@@ -73,7 +73,7 @@ impl TransactionNotifier for TransactionNotifierImpl {
}
impl TransactionNotifierImpl {
pub fn new(plugin_manager: Arc<RwLock<AccountsDbPluginManager>>) -> Self {
pub fn new(plugin_manager: Arc<RwLock<GeyserPluginManager>>) -> Self {
Self { plugin_manager }
}

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2021"
name = "solana-gossip"
description = "Blockchain, Rebuilt for Scale"
version = "1.9.10"
version = "1.9.14"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -26,28 +26,28 @@ rayon = "1.5.1"
serde = "1.0.130"
serde_bytes = "0.11"
serde_derive = "1.0.103"
solana-bloom = { path = "../bloom", version = "=1.9.10" }
solana-clap-utils = { path = "../clap-utils", version = "=1.9.10" }
solana-client = { path = "../client", version = "=1.9.10" }
solana-entry = { path = "../entry", version = "=1.9.10" }
solana-frozen-abi = { path = "../frozen-abi", version = "=1.9.10" }
solana-frozen-abi-macro = { path = "../frozen-abi/macro", version = "=1.9.10" }
solana-ledger = { path = "../ledger", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-measure = { path = "../measure", version = "=1.9.10" }
solana-metrics = { path = "../metrics", version = "=1.9.10" }
solana-net-utils = { path = "../net-utils", version = "=1.9.10" }
solana-perf = { path = "../perf", version = "=1.9.10" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "=1.9.10" }
solana-runtime = { path = "../runtime", version = "=1.9.10" }
solana-streamer = { path = "../streamer", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-version = { path = "../version", version = "=1.9.10" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.10" }
solana-bloom = { path = "../bloom", version = "=1.9.14" }
solana-clap-utils = { path = "../clap-utils", version = "=1.9.14" }
solana-client = { path = "../client", version = "=1.9.14" }
solana-entry = { path = "../entry", version = "=1.9.14" }
solana-frozen-abi = { path = "../frozen-abi", version = "=1.9.14" }
solana-frozen-abi-macro = { path = "../frozen-abi/macro", version = "=1.9.14" }
solana-ledger = { path = "../ledger", version = "=1.9.14" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-measure = { path = "../measure", version = "=1.9.14" }
solana-metrics = { path = "../metrics", version = "=1.9.14" }
solana-net-utils = { path = "../net-utils", version = "=1.9.14" }
solana-perf = { path = "../perf", version = "=1.9.14" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "=1.9.14" }
solana-runtime = { path = "../runtime", version = "=1.9.14" }
solana-streamer = { path = "../streamer", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-version = { path = "../version", version = "=1.9.14" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.14" }
thiserror = "1.0"
[dev-dependencies]
num_cpus = "1.13.1"
num_cpus = "1.13.0"
serial_test = "0.5.1"
[build-dependencies]

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2021"
name = "solana-install"
description = "The solana cluster software installer"
version = "1.9.10"
version = "1.9.14"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -24,12 +24,12 @@ nix = "0.23.0"
reqwest = { version = "0.11.6", default-features = false, features = ["blocking", "rustls-tls", "json"] }
serde = { version = "1.0.130", features = ["derive"] }
serde_yaml = "0.8.21"
solana-clap-utils = { path = "../clap-utils", version = "=1.9.10" }
solana-client = { path = "../client", version = "=1.9.10" }
solana-config-program = { path = "../programs/config", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-version = { path = "../version", version = "=1.9.10" }
solana-clap-utils = { path = "../clap-utils", version = "=1.9.14" }
solana-client = { path = "../client", version = "=1.9.14" }
solana-config-program = { path = "../programs/config", version = "=1.9.14" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-version = { path = "../version", version = "=1.9.14" }
semver = "1.0.4"
tar = "0.4.37"
tempfile = "3.2.0"

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-keygen"
version = "1.9.10"
version = "1.9.14"
description = "Solana key generation utility"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -14,11 +14,11 @@ bs58 = "0.4.0"
clap = "2.33"
dirs-next = "2.0.0"
num_cpus = "1.13.1"
solana-clap-utils = { path = "../clap-utils", version = "=1.9.10" }
solana-cli-config = { path = "../cli-config", version = "=1.9.10" }
solana-remote-wallet = { path = "../remote-wallet", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-version = { path = "../version", version = "=1.9.10" }
solana-clap-utils = { path = "../clap-utils", version = "=1.9.14" }
solana-cli-config = { path = "../cli-config", version = "=1.9.14" }
solana-remote-wallet = { path = "../remote-wallet", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-version = { path = "../version", version = "=1.9.14" }
tiny-bip39 = "0.8.2"
[[bin]]

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2021"
name = "solana-ledger-tool"
description = "Blockchain, Rebuilt for Scale"
version = "1.9.10"
version = "1.9.14"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -14,28 +14,28 @@ bs58 = "0.4.0"
bytecount = "0.6.2"
clap = "2.33.1"
csv = "1.1.6"
dashmap = "5.1.0"
histogram = "*"
dashmap = "4.0.2"
histogram = "0.6.9"
itertools = "0.10.1"
log = { version = "0.4.14" }
regex = "1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0.72"
serde_yaml = "0.8.21"
solana-clap-utils = { path = "../clap-utils", version = "=1.9.10" }
solana-cli-output = { path = "../cli-output", version = "=1.9.10" }
solana-core = { path = "../core", version = "=1.9.10" }
solana-entry = { path = "../entry", version = "=1.9.10" }
solana-ledger = { path = "../ledger", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-measure = { path = "../measure", version = "=1.9.10" }
solana-runtime = { path = "../runtime", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-stake-program = { path = "../programs/stake", version = "=1.9.10" }
solana-storage-bigtable = { path = "../storage-bigtable", version = "=1.9.10" }
solana-transaction-status = { path = "../transaction-status", version = "=1.9.10" }
solana-version = { path = "../version", version = "=1.9.10" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.10" }
solana-clap-utils = { path = "../clap-utils", version = "=1.9.14" }
solana-cli-output = { path = "../cli-output", version = "=1.9.14" }
solana-core = { path = "../core", version = "=1.9.14" }
solana-entry = { path = "../entry", version = "=1.9.14" }
solana-ledger = { path = "../ledger", version = "=1.9.14" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-measure = { path = "../measure", version = "=1.9.14" }
solana-runtime = { path = "../runtime", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-stake-program = { path = "../programs/stake", version = "=1.9.14" }
solana-storage-bigtable = { path = "../storage-bigtable", version = "=1.9.14" }
solana-transaction-status = { path = "../transaction-status", version = "=1.9.14" }
solana-version = { path = "../version", version = "=1.9.14" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.14" }
tokio = { version = "1", features = ["full"] }
[target.'cfg(not(target_env = "msvc"))'.dependencies]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-ledger"
version = "1.9.10"
version = "1.9.14"
description = "Solana ledger"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -23,7 +23,7 @@ libc = "0.2.108"
log = { version = "0.4.14" }
num-derive = "0.3"
num-traits = "0.2"
num_cpus = "1.13.1"
num_cpus = "1.13.0"
prost = "0.9.0"
rand = "0.7.0"
rand_chacha = "0.2.2"
@@ -31,22 +31,22 @@ rayon = "1.5.1"
serde = "1.0.130"
serde_bytes = "0.11.5"
sha2 = "0.9.8"
solana-bpf-loader-program = { path = "../programs/bpf_loader", version = "=1.9.10" }
solana-entry = { path = "../entry", version = "=1.9.10" }
solana-frozen-abi = { path = "../frozen-abi", version = "=1.9.10" }
solana-frozen-abi-macro = { path = "../frozen-abi/macro", version = "=1.9.10" }
solana-transaction-status = { path = "../transaction-status", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-measure = { path = "../measure", version = "=1.9.10" }
solana-metrics = { path = "../metrics", version = "=1.9.10" }
solana-perf = { path = "../perf", version = "=1.9.10" }
solana-program-runtime = { path = "../program-runtime", version = "=1.9.10" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "=1.9.10" }
solana-runtime = { path = "../runtime", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-storage-bigtable = { path = "../storage-bigtable", version = "=1.9.10" }
solana-storage-proto = { path = "../storage-proto", version = "=1.9.10" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.10" }
solana-bpf-loader-program = { path = "../programs/bpf_loader", version = "=1.9.14" }
solana-entry = { path = "../entry", version = "=1.9.14" }
solana-frozen-abi = { path = "../frozen-abi", version = "=1.9.14" }
solana-frozen-abi-macro = { path = "../frozen-abi/macro", version = "=1.9.14" }
solana-transaction-status = { path = "../transaction-status", version = "=1.9.14" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-measure = { path = "../measure", version = "=1.9.14" }
solana-metrics = { path = "../metrics", version = "=1.9.14" }
solana-perf = { path = "../perf", version = "=1.9.14" }
solana-program-runtime = { path = "../program-runtime", version = "=1.9.14" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "=1.9.14" }
solana-runtime = { path = "../runtime", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-storage-bigtable = { path = "../storage-bigtable", version = "=1.9.14" }
solana-storage-proto = { path = "../storage-proto", version = "=1.9.14" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.14" }
tempfile = "3.2.0"
thiserror = "1.0"
tokio = { version = "1", features = ["full"] }
@@ -64,7 +64,7 @@ features = ["lz4"]
[dev-dependencies]
assert_matches = "1.5.0"
matches = "0.1.9"
solana-account-decoder = { path = "../account-decoder", version = "=1.9.10" }
solana-account-decoder = { path = "../account-decoder", version = "=1.9.14" }
[build-dependencies]
rustc_version = "0.4"

View File

@@ -42,6 +42,7 @@ use {
feature_set,
genesis_config::GenesisConfig,
hash::Hash,
instruction::InstructionError,
pubkey::Pubkey,
signature::{Keypair, Signature},
timing,
@@ -224,6 +225,13 @@ fn execute_batch(
..
} = tx_results;
if bank
.feature_set
.is_active(&feature_set::cap_accounts_data_len::id())
{
check_accounts_data_size(&execution_results)?;
}
if let Some(transaction_status_sender) = transaction_status_sender {
let transactions = batch.sanitized_transactions().to_vec();
let post_token_balances = if record_token_balances {
@@ -1375,6 +1383,8 @@ fn load_frozen_forks(
)?;
if slot >= dev_halt_at_slot {
bank.force_flush_accounts_cache();
let _ = bank.verify_bank_hash(false);
break;
}
}
@@ -1583,6 +1593,30 @@ pub fn fill_blockstore_slot_with_ticks(
last_entry_hash
}
/// Check the transaction execution results to see if any instruction errored by exceeding the max
/// accounts data size limit for all slots. If yes, the whole block needs to be failed.
fn check_accounts_data_size<'a>(
execution_results: impl IntoIterator<Item = &'a TransactionExecutionResult>,
) -> Result<()> {
if let Some(result) = execution_results
.into_iter()
.map(|execution_result| execution_result.flattened_result())
.find(|result| {
matches!(
result,
Err(TransactionError::InstructionError(
_,
InstructionError::MaxAccountsDataSizeExceeded
)),
)
})
{
return result;
}
Ok(())
}
#[cfg(test)]
pub mod tests {
use {

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2021"
name = "solana-local-cluster"
description = "Blockchain, Rebuilt for Scale"
version = "1.9.10"
version = "1.9.14"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -17,19 +17,19 @@ fs_extra = "1.2.0"
log = "0.4.14"
rand = "0.7.0"
rayon = "1.5.1"
solana-config-program = { path = "../programs/config", version = "=1.9.10" }
solana-core = { path = "../core", version = "=1.9.10" }
solana-client = { path = "../client", version = "=1.9.10" }
solana-download-utils = { path = "../download-utils", version = "=1.9.10" }
solana-entry = { path = "../entry", version = "=1.9.10" }
solana-gossip = { path = "../gossip", version = "=1.9.10" }
solana-ledger = { path = "../ledger", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-runtime = { path = "../runtime", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-stake-program = { path = "../programs/stake", version = "=1.9.10" }
solana-streamer = { path = "../streamer", version = "=1.9.10" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.10" }
solana-config-program = { path = "../programs/config", version = "=1.9.14" }
solana-core = { path = "../core", version = "=1.9.14" }
solana-client = { path = "../client", version = "=1.9.14" }
solana-download-utils = { path = "../download-utils", version = "=1.9.14" }
solana-entry = { path = "../entry", version = "=1.9.14" }
solana-gossip = { path = "../gossip", version = "=1.9.14" }
solana-ledger = { path = "../ledger", version = "=1.9.14" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-runtime = { path = "../runtime", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-stake-program = { path = "../programs/stake", version = "=1.9.14" }
solana-streamer = { path = "../streamer", version = "=1.9.14" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.14" }
tempfile = "3.2.0"
[dev-dependencies]

View File

@@ -15,7 +15,7 @@ pub fn safe_clone_config(config: &ValidatorConfig) -> ValidatorConfig {
account_shrink_paths: config.account_shrink_paths.clone(),
rpc_config: config.rpc_config.clone(),
accountsdb_repl_service_config: config.accountsdb_repl_service_config.clone(),
accountsdb_plugin_config_files: config.accountsdb_plugin_config_files.clone(),
geyser_plugin_config_files: config.geyser_plugin_config_files.clone(),
rpc_addrs: config.rpc_addrs,
pubsub_config: config.pubsub_config.clone(),
snapshot_config: config.snapshot_config.clone(),

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.com>"]
edition = "2021"
name = "solana-log-analyzer"
description = "The solana cluster network analysis tool"
version = "1.9.10"
version = "1.9.14"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -14,8 +14,8 @@ byte-unit = "4.0.13"
clap = "2.33.1"
serde = "1.0.130"
serde_json = "1.0.72"
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-version = { path = "../version", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-version = { path = "../version", version = "=1.9.14" }
[[bin]]
name = "solana-log-analyzer"

View File

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

View File

@@ -1,7 +1,7 @@
[package]
name = "solana-measure"
description = "Blockchain, Rebuilt for Scale"
version = "1.9.10"
version = "1.9.14"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-measure"
readme = "../README.md"
@@ -12,7 +12,7 @@ edition = "2021"
[dependencies]
log = "0.4.14"
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -2,7 +2,7 @@
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2021"
name = "solana-merkle-root-bench"
version = "1.9.10"
version = "1.9.14"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -10,11 +10,11 @@ publish = false
[dependencies]
log = "0.4.14"
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-runtime = { path = "../runtime", version = "=1.9.10" }
solana-measure = { path = "../measure", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-version = { path = "../version", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-runtime = { path = "../runtime", version = "=1.9.14" }
solana-measure = { path = "../measure", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-version = { path = "../version", version = "=1.9.14" }
clap = "2.33.1"
[package.metadata.docs.rs]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-merkle-tree"
version = "1.9.10"
version = "1.9.14"
description = "Solana Merkle Tree"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-merkle-tree"
edition = "2021"
[dependencies]
solana-program = { path = "../sdk/program", version = "=1.9.10" }
solana-program = { path = "../sdk/program", version = "=1.9.14" }
fast-math = "0.1"
# This can go once the BPF toolchain target Rust 1.42.0+

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-metrics"
version = "1.9.10"
version = "1.9.14"
description = "Solana Metrics"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -15,7 +15,7 @@ gethostname = "0.2.1"
lazy_static = "1.4.0"
log = "0.4.14"
reqwest = { version = "0.11.6", default-features = false, features = ["blocking", "rustls-tls", "json"] }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
[dev-dependencies]
rand = "0.7.0"

View File

@@ -3,7 +3,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2021"
name = "solana-net-shaper"
description = "The solana cluster network shaping tool"
version = "1.9.10"
version = "1.9.14"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -13,8 +13,8 @@ publish = false
clap = "2.33.1"
serde = "1.0.130"
serde_json = "1.0.72"
solana-clap-utils = { path = "../clap-utils", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-clap-utils = { path = "../clap-utils", version = "=1.9.14" }
solana-logger = { path = "../logger", version = "=1.9.14" }
rand = "0.7.0"
[[bin]]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-net-utils"
version = "1.9.10"
version = "1.9.14"
description = "Solana Network Utilities"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -18,9 +18,9 @@ rand = "0.7.0"
serde = "1.0.130"
serde_derive = "1.0.103"
socket2 = "0.4.2"
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-version = { path = "../version", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-version = { path = "../version", version = "=1.9.14" }
tokio = { version = "1", features = ["full"] }
url = "2.2.2"

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-notifier"
version = "1.9.10"
version = "1.9.14"
description = "Solana Notifier"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-perf"
version = "1.9.10"
version = "1.9.14"
description = "Solana Performance APIs"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -22,12 +22,12 @@ log = "0.4.14"
rand = "0.7.0"
rayon = "1.5.1"
serde = "1.0.130"
solana-bloom = { path = "../bloom", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-metrics = { path = "../metrics", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.10" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "=1.9.10" }
solana-bloom = { path = "../bloom", version = "=1.9.14" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-metrics = { path = "../metrics", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.14" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "=1.9.14" }
[target."cfg(target_os = \"linux\")".dependencies]
caps = "0.5.3"

View File

@@ -2,7 +2,7 @@
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
edition = "2021"
name = "solana-poh-bench"
version = "1.9.10"
version = "1.9.14"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
@@ -14,12 +14,12 @@ clap = "2.33.1"
log = "0.4.14"
rand = "0.7.0"
rayon = "1.5.1"
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-entry = { path = "../entry", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-measure = { path = "../measure", version = "=1.9.10" }
solana-version = { path = "../version", version = "=1.9.10" }
solana-perf = { path = "../perf", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-entry = { path = "../entry", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-measure = { path = "../measure", version = "=1.9.14" }
solana-version = { path = "../version", version = "=1.9.14" }
solana-perf = { path = "../perf", version = "=1.9.14" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-poh"
version = "1.9.10"
version = "1.9.14"
description = "Solana PoH"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -13,21 +13,21 @@ edition = "2021"
core_affinity = "0.5.10"
crossbeam-channel = "0.5"
log = "0.4.14"
solana-entry = { path = "../entry", version = "=1.9.10" }
solana-ledger = { path = "../ledger", version = "=1.9.10" }
solana-measure = { path = "../measure", version = "=1.9.10" }
solana-metrics = { path = "../metrics", version = "=1.9.10" }
solana-runtime = { path = "../runtime", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-sys-tuner = { path = "../sys-tuner", version = "=1.9.10" }
solana-entry = { path = "../entry", version = "=1.9.14" }
solana-ledger = { path = "../ledger", version = "=1.9.14" }
solana-measure = { path = "../measure", version = "=1.9.14" }
solana-metrics = { path = "../metrics", version = "=1.9.14" }
solana-runtime = { path = "../runtime", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-sys-tuner = { path = "../sys-tuner", version = "=1.9.14" }
thiserror = "1.0"
[dev-dependencies]
bincode = "1.3.3"
matches = "0.1.9"
rand = "0.7.0"
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-perf = { path = "../perf", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-perf = { path = "../perf", version = "=1.9.14" }
[lib]
crate-type = ["lib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-program-runtime"
version = "1.9.10"
version = "1.9.14"
description = "Solana program runtime"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -19,11 +19,11 @@ log = "0.4.14"
num-derive = { version = "0.3" }
num-traits = { version = "0.2" }
serde = { version = "1.0.129", features = ["derive", "rc"] }
solana-frozen-abi = { path = "../frozen-abi", version = "=1.9.10" }
solana-frozen-abi-macro = { path = "../frozen-abi/macro", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-measure = { path = "../measure", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-frozen-abi = { path = "../frozen-abi", version = "=1.9.14" }
solana-frozen-abi-macro = { path = "../frozen-abi/macro", version = "=1.9.14" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-measure = { path = "../measure", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
thiserror = "1.0"
[lib]

View File

@@ -79,7 +79,7 @@ impl AccountsDataMeter {
/// return an error and *do not* consume more accounts data space.
pub fn consume(&mut self, amount: i64) -> Result<(), InstructionError> {
if amount > self.remaining() as i64 {
return Err(InstructionError::AccountsDataBudgetExceeded);
return Err(InstructionError::MaxAccountsDataSizeExceeded);
}
self.consume_unchecked(amount);
Ok(())

View File

@@ -1918,7 +1918,7 @@ mod tests {
assert!(result.is_err());
assert!(matches!(
result,
Err(solana_sdk::instruction::InstructionError::AccountsDataBudgetExceeded)
Err(solana_sdk::instruction::InstructionError::MaxAccountsDataSizeExceeded)
));
assert_eq!(invoke_context.accounts_data_meter.remaining(), 0);
}

View File

@@ -5,7 +5,7 @@ edition = "2021"
license = "Apache-2.0"
name = "solana-program-test"
repository = "https://github.com/solana-labs/solana"
version = "1.9.10"
version = "1.9.14"
[dependencies]
async-trait = "0.1.51"
@@ -14,14 +14,14 @@ bincode = "1.3.3"
chrono-humanize = "0.2.1"
log = "0.4.14"
serde = "1.0.130"
solana-banks-client = { path = "../banks-client", version = "=1.9.10" }
solana-banks-server = { path = "../banks-server", version = "=1.9.10" }
solana-bpf-loader-program = { path = "../programs/bpf_loader", version = "=1.9.10" }
solana-logger = { path = "../logger", version = "=1.9.10" }
solana-program-runtime = { path = "../program-runtime", version = "=1.9.10" }
solana-runtime = { path = "../runtime", version = "=1.9.10" }
solana-sdk = { path = "../sdk", version = "=1.9.10" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.10" }
solana-banks-client = { path = "../banks-client", version = "=1.9.14" }
solana-banks-server = { path = "../banks-server", version = "=1.9.14" }
solana-bpf-loader-program = { path = "../programs/bpf_loader", version = "=1.9.14" }
solana-logger = { path = "../logger", version = "=1.9.14" }
solana-program-runtime = { path = "../program-runtime", version = "=1.9.14" }
solana-runtime = { path = "../runtime", version = "=1.9.14" }
solana-sdk = { path = "../sdk", version = "=1.9.14" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.14" }
thiserror = "1.0"
tokio = { version = "1", features = ["full"] }

View File

@@ -3,7 +3,7 @@
[package]
name = "solana-address-lookup-table-program-tests"
version = "1.9.10"
version = "1.9.14"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
@@ -14,9 +14,9 @@ publish = false
[dev-dependencies]
assert_matches = "1.5.0"
bincode = "1.3.3"
solana-address-lookup-table-program = { path = "../address-lookup-table", version = "=1.9.10" }
solana-program-test = { path = "../../program-test", version = "=1.9.10" }
solana-sdk = { path = "../../sdk", version = "=1.9.10" }
solana-address-lookup-table-program = { path = "../address-lookup-table", version = "=1.9.14" }
solana-program-test = { path = "../../program-test", version = "=1.9.14" }
solana-sdk = { path = "../../sdk", version = "=1.9.14" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-address-lookup-table-program"
version = "1.9.10"
version = "1.9.14"
description = "Solana address lookup table program"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -16,10 +16,10 @@ log = "0.4.14"
num-derive = "0.3"
num-traits = "0.2"
serde = { version = "1.0.127", features = ["derive"] }
solana-frozen-abi = { path = "../../frozen-abi", version = "=1.9.10" }
solana-frozen-abi-macro = { path = "../../frozen-abi/macro", version = "=1.9.10" }
solana-program-runtime = { path = "../../program-runtime", version = "=1.9.10" }
solana-sdk = { path = "../../sdk", version = "=1.9.10" }
solana-frozen-abi = { path = "../../frozen-abi", version = "=1.9.14" }
solana-frozen-abi-macro = { path = "../../frozen-abi/macro", version = "=1.9.14" }
solana-program-runtime = { path = "../../program-runtime", version = "=1.9.14" }
solana-sdk = { path = "../../sdk", version = "=1.9.14" }
thiserror = "1.0"
[build-dependencies]

405
programs/bpf/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
[package]
name = "solana-bpf-programs"
description = "Blockchain, Rebuilt for Scale"
version = "1.9.10"
version = "1.9.14"
documentation = "https://docs.rs/solana"
homepage = "https://solana.com/"
readme = "README.md"
@@ -26,19 +26,19 @@ itertools = "0.10.1"
log = "0.4.11"
miow = "0.3.6"
net2 = "0.2.37"
solana-bpf-rust-invoke = { path = "rust/invoke", version = "=1.9.10"}
solana-bpf-loader-program = { path = "../bpf_loader", version = "=1.9.10"}
solana-bpf-rust-realloc = { path = "rust/realloc", version = "=1.9.10"}
solana-bpf-rust-realloc-invoke = { path = "rust/realloc_invoke", version = "=1.9.10"}
solana-cli-output = { path = "../../cli-output", version = "=1.9.10" }
solana-logger = { path = "../../logger", version = "=1.9.10" }
solana-measure = { path = "../../measure", version = "=1.9.10" }
solana-bpf-rust-invoke = { path = "rust/invoke", version = "=1.9.14"}
solana-bpf-loader-program = { path = "../bpf_loader", version = "=1.9.14"}
solana-bpf-rust-realloc = { path = "rust/realloc", version = "=1.9.14"}
solana-bpf-rust-realloc-invoke = { path = "rust/realloc_invoke", version = "=1.9.14"}
solana-cli-output = { path = "../../cli-output", version = "=1.9.14" }
solana-logger = { path = "../../logger", version = "=1.9.14" }
solana-measure = { path = "../../measure", version = "=1.9.14" }
solana_rbpf = "=0.2.24"
solana-runtime = { path = "../../runtime", version = "=1.9.10" }
solana-program-runtime = { path = "../../program-runtime", version = "=1.9.10" }
solana-sdk = { path = "../../sdk", version = "=1.9.10" }
solana-transaction-status = { path = "../../transaction-status", version = "=1.9.10" }
solana-account-decoder = { path = "../../account-decoder", version = "=1.9.10" }
solana-runtime = { path = "../../runtime", version = "=1.9.14" }
solana-program-runtime = { path = "../../program-runtime", version = "=1.9.14" }
solana-sdk = { path = "../../sdk", version = "=1.9.14" }
solana-transaction-status = { path = "../../transaction-status", version = "=1.9.14" }
solana-account-decoder = { path = "../../account-decoder", version = "=1.9.14" }
[[bench]]
name = "bpf_loader"

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-128bit"
version = "1.9.10"
version = "1.9.14"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,8 +10,8 @@ documentation = "https://docs.rs/solana-bpf-rust-128bit"
edition = "2021"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "=1.9.10" }
solana-bpf-rust-128bit-dep = { path = "../128bit_dep", version = "=1.9.10" }
solana-program = { path = "../../../../sdk/program", version = "=1.9.14" }
solana-bpf-rust-128bit-dep = { path = "../128bit_dep", version = "=1.9.14" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-128bit-dep"
version = "1.9.10"
version = "1.9.14"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-128bit-dep"
edition = "2021"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "=1.9.10" }
solana-program = { path = "../../../../sdk/program", version = "=1.9.14" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-alloc"
version = "1.9.10"
version = "1.9.14"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-alloc"
edition = "2021"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "=1.9.10" }
solana-program = { path = "../../../../sdk/program", version = "=1.9.14" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-call-depth"
version = "1.9.10"
version = "1.9.14"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-call-depth"
edition = "2021"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "=1.9.10" }
solana-program = { path = "../../../../sdk/program", version = "=1.9.14" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-caller-access"
version = "1.9.10"
version = "1.9.14"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-caller-access"
edition = "2021"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "=1.9.10" }
solana-program = { path = "../../../../sdk/program", version = "=1.9.14" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-custom-heap"
version = "1.9.10"
version = "1.9.14"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-custom-heap"
edition = "2021"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "=1.9.10" }
solana-program = { path = "../../../../sdk/program", version = "=1.9.14" }
[features]
default = ["custom-heap"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-dep-crate"
version = "1.9.10"
version = "1.9.14"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -11,7 +11,7 @@ edition = "2021"
[dependencies]
byteorder = { version = "1", default-features = false }
solana-program = { path = "../../../../sdk/program", version = "=1.9.10" }
solana-program = { path = "../../../../sdk/program", version = "=1.9.14" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-deprecated-loader"
version = "1.9.10"
version = "1.9.14"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-deprecated-loader"
edition = "2021"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "=1.9.10" }
solana-program = { path = "../../../../sdk/program", version = "=1.9.14" }
[lib]
crate-type = ["cdylib"]

View File

@@ -1,6 +1,6 @@
[package]
name = "solana-bpf-rust-dup-accounts"
version = "1.9.10"
version = "1.9.14"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/solana-bpf-rust-dup-accounts"
edition = "2021"
[dependencies]
solana-program = { path = "../../../../sdk/program", version = "=1.9.10" }
solana-program = { path = "../../../../sdk/program", version = "=1.9.14" }
[lib]
crate-type = ["cdylib"]

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