From 1a919d4820c8ff2a22b9ed829f2aff587f4be179 Mon Sep 17 00:00:00 2001
From: Lucas B
Date: Thu, 25 Aug 2022 17:18:46 -0500
Subject: [PATCH] jito patch only reroute if relayer connected (#123) feat: add
client tls config (#121) remove extra val (#129) fix clippy (#130) copy all
binaries to docker-output (#131) Ledger tool halts at slot passed to
create-snapshot (#118) update program submodule (#133) quick fix for tips and
clearing old bundles (#135) update submodule to new program (#136) Improve
stake-meta-generator usability (#134) pinning submodule head (#140) Use
BundleAccountLocker when handling tip txs (#147) Add metrics for relayer +
block engine proxy (#149) Build claim-mev in docker (#141) Rework bundle
receiving and add metrics (#152) (#154) update submodule + dev files (#158)
Deterministically find tip amounts, add meta to stake info, and cleanup
pubkey/strings in MEV tips (#159) update jito-programs submodule (#160)
Separate MEV tip related workflow (#161) Add block builder fee protos (#162)
fix jito programs (#163) update submodule so autosnapshot exits out of ledger
tool early (#164) Pipe through block builder fee (#167) pull in new snapshot
code (#171) block builder bug (#172) update submodule add accountsdb conn
submod (#170) new submodules (#180) (#181) Fixed broken links to repositories
(#184) (#186) Changed from ssh to https transfer for clone Co-authored-by:
Tomas Eminger <86430113+Tomas-Eminger@users.noreply.github.com> Seg/update
submods (#187) (#189) * Seg/update submods (#187) * fix tests (#190) * rm
geyser submod (#192) * rm dangling geyser references * fix syntax err * use
deterministic req ids in batch calls Seg/v1.14 backport (#202) * update
submod * added arg --rpc-max-request-payload-size to validator (#26377) *
added ability to pass --rpc-max-request-payload-size to validator * fixed
lint errors * more lint fix * patch Co-authored-by: ultd
Co-authored-by: Justin Starry
Co-authored-by: Ahmad <12675427+ultd@users.noreply.github.com>
Co-authored-by: Justin Starry
use efficient data structures when calling batch_simulate_bundles (#206) (#207)
add config to simulate on top of working bank (#213)
rm frozen bank check
simulate_bundle rpc bugfixes (#214) (#215)
rm frozen bank check in simulate_bundle rpc method
bump versions, rm dead code, and build
[JIT-519] Store ClaimStatus address in merkle-root-json (#210)
* add files
* switch to include bump
update autosnapshot (#222)
Print TX error in Bundles (#223)
add new args to support single relayer and block-engine endpoints (#224)
point to new jito-programs submod and invoke updated init tda instruction (#228)
update lockfiles, address clippy
fix validator start scripts (#232)
update lockfile
Backport #247 on v1.14 (#249)
rebase issues
use updated anchor submodule
Backport #225 on v1.14 (#256)
* buffer bundles that exceed cost model
Seg/v1.14 (#259)
* bump jito-programs submod
* update Cargo lock
clear qos failed bundles buffer if not leader soon (#260)
Backport #240 on 1.14 (#261)
Add missing rustfmt install for rust-version toolchain (#263)
fix shellcheck and cargo lock
update jito-programs submodule
fix simulate_bundle client and better error handling (#267) (#269)
backport Dockerfile (#276)
Backport #238 onto v1.14 (#264)
* Preallocate Bundle Cost (#238)
update Cargo lock
fix lockfile
update jito-programs submod
add reclaim rent workflow (#283)
downgrade clap
fix clippy errs
bump to 1.14.18
Fix CVE-2023-26964 (#296)
Backport #299 onto v1.14 (#300)
Backport #290 to v1.14 (#302)
Backport #304 onto v1.14 (#307)
Jl/backport 306 v1.14 (#308)
Backport #309 (#312)
Co-authored-by: segfaultdoctor <17258903+segfaultdoc@users.noreply.github.com>
Backport tip distributor scripts updates from master (#318)
--ignore RUSTSEC-2022-0093
---
.dockerignore | 1 +
.github/dependabot.yml | 41 -
.github/workflows/client-targets.yml | 6 +-
.gitignore | 5 +-
.gitmodules | 9 +
Cargo.lock | 770 ++++--
Cargo.toml | 4 +
README.md | 12 +-
anchor | 1 +
banking-bench/src/main.rs | 15 +-
banks-server/Cargo.toml | 4 +
banks-server/src/banks_server.rs | 5 +-
banks-server/src/rpc_banks_service.rs | 33 +-
bootstrap | 21 +
ci/buildkite-pipeline-in-disk.sh | 36 +-
ci/buildkite-pipeline.sh | 36 +-
ci/buildkite-solana-private.sh | 31 +-
ci/channel-info.sh | 2 +-
ci/do-audit.sh | 3 +
ci/docker-rust/Dockerfile | 1 +
ci/rust-version.sh | 1 +
ci/test-stable.sh | 2 +-
client/src/http_sender.rs | 210 +-
client/src/mock_sender.rs | 7 +
client/src/nonblocking/rpc_client.rs | 127 +-
client/src/rpc_client.rs | 30 +
client/src/rpc_config.rs | 52 +-
client/src/rpc_request.rs | 3 +
client/src/rpc_response.rs | 49 +-
client/src/rpc_sender.rs | 4 +
core/Cargo.toml | 15 +
core/benches/banking_stage.rs | 17 +-
core/benches/cluster_info.rs | 1 +
core/benches/proto_to_packet.rs | 56 +
core/benches/retransmit_stage.rs | 1 +
core/src/admin_rpc_post_init.rs | 9 +-
core/src/banking_stage.rs | 196 +-
core/src/broadcast_stage.rs | 55 +-
.../broadcast_duplicates_run.rs | 1 +
.../broadcast_fake_shreds_run.rs | 1 +
core/src/broadcast_stage/broadcast_utils.rs | 60 +-
.../fail_entry_verification_broadcast_run.rs | 4 +-
.../broadcast_stage/standard_broadcast_run.rs | 30 +-
core/src/bundle_account_locker.rs | 333 +++
core/src/bundle_sanitizer.rs | 617 +++++
core/src/bundle_stage.rs | 2145 +++++++++++++++++
core/src/bundle_stage_leader_stats.rs | 326 +++
core/src/consensus_cache_updater.rs | 52 +
core/src/lib.rs | 47 +
core/src/packet_bundle.rs | 7 +
core/src/proxy/auth.rs | 185 ++
core/src/proxy/block_engine_stage.rs | 561 +++++
core/src/proxy/fetch_stage_manager.rs | 161 ++
core/src/proxy/mod.rs | 100 +
core/src/proxy/relayer_stage.rs | 524 ++++
core/src/qos_service.rs | 44 +-
core/src/retransmit_stage.rs | 17 +-
core/src/tip_manager.rs | 472 ++++
core/src/tpu.rs | 108 +-
core/src/tvu.rs | 5 +-
core/src/validator.rs | 32 +-
core/tests/snapshots.rs | 2 +
deploy_programs | 17 +
dev/Dockerfile | 48 +
entry/src/entry.rs | 2 +-
entry/src/poh.rs | 29 +-
f | 30 +
gossip/src/cluster_info.rs | 4 +
jito-programs | 1 +
jito-protos/Cargo.toml | 14 +
jito-protos/build.rs | 17 +
jito-protos/protos | 1 +
jito-protos/src/lib.rs | 25 +
ledger-tool/src/main.rs | 27 +-
ledger/src/bank_forks_utils.rs | 4 +-
ledger/src/blockstore_processor.rs | 4 +-
ledger/src/token_balances.rs | 58 +-
.../src/local_cluster_snapshot_utils.rs | 6 +-
local-cluster/src/validator_configs.rs | 5 +
local-cluster/tests/local_cluster.rs | 12 +-
merkle-tree/src/merkle_tree.rs | 46 +-
multinode-demo/bootstrap-validator.sh | 40 +
multinode-demo/validator.sh | 34 +
perf/src/sigverify.rs | 2 +-
poh/src/poh_recorder.rs | 126 +-
poh/src/poh_service.rs | 34 +-
programs/bpf/Cargo.lock | 441 +++-
programs/bpf/tests/programs.rs | 4 +-
rpc/src/rpc.rs | 436 +++-
rpc/src/rpc_service.rs | 6 +-
runtime/src/accounts.rs | 96 +-
runtime/src/bank.rs | 1146 ++++++++-
runtime/src/builtins.rs | 2 +-
runtime/src/cost_tracker.rs | 8 +
runtime/src/snapshot_utils.rs | 30 +-
runtime/src/stake_account.rs | 4 +-
runtime/src/stakes.rs | 12 +-
rustfmt.toml | 5 +
s | 15 +
scripts/coverage.sh | 17 +-
scripts/increment-cargo-version.sh | 2 +
scripts/run.sh | 4 +
sdk/Cargo.toml | 1 +
sdk/src/bundle/error.rs | 51 +
sdk/src/bundle/mod.rs | 12 +
sdk/src/bundle/sanitized.rs | 20 +
sdk/src/bundle/utils.rs | 20 +
sdk/src/lib.rs | 1 +
sdk/src/transaction/error.rs | 8 +
send-transaction-service/Cargo.toml | 2 +
.../src/send_transaction_service.rs | 51 +-
start | 9 +
start_multi | 29 +
storage-bigtable/Cargo.toml | 4 +-
storage-proto/proto/transaction_by_addr.proto | 2 +
storage-proto/src/convert.rs | 8 +
tip-distributor/Cargo.toml | 51 +
tip-distributor/README.md | 43 +
tip-distributor/src/bin/claim-mev-tips.rs | 52 +
.../src/bin/merkle-root-generator.rs | 34 +
.../src/bin/merkle-root-uploader.rs | 50 +
tip-distributor/src/bin/reclaim-rent.rs | 62 +
.../src/bin/stake-meta-generator.rs | 67 +
tip-distributor/src/claim_mev_workflow.rs | 151 ++
tip-distributor/src/lib.rs | 890 +++++++
.../src/merkle_root_generator_workflow.rs | 54 +
.../src/merkle_root_upload_workflow.rs | 134 +
tip-distributor/src/reclaim_rent_workflow.rs | 168 ++
.../src/stake_meta_generator_workflow.rs | 951 ++++++++
validator/Cargo.toml | 1 +
validator/src/admin_rpc_service.rs | 115 +-
validator/src/bootstrap.rs | 8 +-
validator/src/dashboard.rs | 1 +
validator/src/main.rs | 431 +++-
134 files changed, 13297 insertions(+), 703 deletions(-)
create mode 100644 .dockerignore
delete mode 100644 .github/dependabot.yml
create mode 100644 .gitmodules
create mode 160000 anchor
create mode 100755 bootstrap
create mode 100644 core/benches/proto_to_packet.rs
create mode 100644 core/src/bundle_account_locker.rs
create mode 100644 core/src/bundle_sanitizer.rs
create mode 100644 core/src/bundle_stage.rs
create mode 100644 core/src/bundle_stage_leader_stats.rs
create mode 100644 core/src/consensus_cache_updater.rs
create mode 100644 core/src/packet_bundle.rs
create mode 100644 core/src/proxy/auth.rs
create mode 100644 core/src/proxy/block_engine_stage.rs
create mode 100644 core/src/proxy/fetch_stage_manager.rs
create mode 100644 core/src/proxy/mod.rs
create mode 100644 core/src/proxy/relayer_stage.rs
create mode 100644 core/src/tip_manager.rs
create mode 100755 deploy_programs
create mode 100644 dev/Dockerfile
create mode 100755 f
create mode 160000 jito-programs
create mode 100644 jito-protos/Cargo.toml
create mode 100644 jito-protos/build.rs
create mode 160000 jito-protos/protos
create mode 100644 jito-protos/src/lib.rs
create mode 100755 s
create mode 100644 sdk/src/bundle/error.rs
create mode 100644 sdk/src/bundle/mod.rs
create mode 100644 sdk/src/bundle/sanitized.rs
create mode 100644 sdk/src/bundle/utils.rs
create mode 100755 start
create mode 100755 start_multi
create mode 100644 tip-distributor/Cargo.toml
create mode 100644 tip-distributor/README.md
create mode 100644 tip-distributor/src/bin/claim-mev-tips.rs
create mode 100644 tip-distributor/src/bin/merkle-root-generator.rs
create mode 100644 tip-distributor/src/bin/merkle-root-uploader.rs
create mode 100644 tip-distributor/src/bin/reclaim-rent.rs
create mode 100644 tip-distributor/src/bin/stake-meta-generator.rs
create mode 100644 tip-distributor/src/claim_mev_workflow.rs
create mode 100644 tip-distributor/src/lib.rs
create mode 100644 tip-distributor/src/merkle_root_generator_workflow.rs
create mode 100644 tip-distributor/src/merkle_root_upload_workflow.rs
create mode 100644 tip-distributor/src/reclaim_rent_workflow.rs
create mode 100644 tip-distributor/src/stake_meta_generator_workflow.rs
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000000..2f7896d1d1
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1 @@
+target/
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
deleted file mode 100644
index c2fc36a3e6..0000000000
--- a/.github/dependabot.yml
+++ /dev/null
@@ -1,41 +0,0 @@
-# To get started with Dependabot version updates, you'll need to specify which
-# package ecosystems to update and where the package manifests are located.
-# Please see the documentation for all configuration options:
-# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
-
-version: 2
-updates:
-- package-ecosystem: cargo
- directory: "/"
- schedule:
- interval: daily
- time: "01:00"
- timezone: America/Los_Angeles
- #labels:
- # - "automerge"
- open-pull-requests-limit: 3
-
-- package-ecosystem: npm
- directory: "/web3.js"
- schedule:
- interval: daily
- time: "01:00"
- timezone: America/Los_Angeles
- labels:
- - "automerge"
- commit-message:
- prefix: "chore:"
- open-pull-requests-limit: 3
-
-- package-ecosystem: npm
- directory: "/explorer"
- schedule:
- interval: daily
- time: "01:00"
- timezone: America/Los_Angeles
- labels:
- - "automerge"
- commit-message:
- prefix: "chore:"
- include: "scope"
- open-pull-requests-limit: 3
diff --git a/.github/workflows/client-targets.yml b/.github/workflows/client-targets.yml
index c5c8532461..8e4448ca39 100644
--- a/.github/workflows/client-targets.yml
+++ b/.github/workflows/client-targets.yml
@@ -45,8 +45,10 @@ jobs:
platform: android
os: ubuntu-latest
steps:
- - name: Checkout code
- uses: actions/checkout@v2
+ - uses: actions/checkout@v3
+ with:
+ submodules: recursive
+ ssh-key: ${{ secrets.DEPLOYER_SSH_KEY }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
diff --git a/.gitignore b/.gitignore
index 124358b46f..92281a9a08 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,7 +3,7 @@
/solana-release.tar.bz2
/solana-metrics/
/solana-metrics.tar.bz2
-/target/
+**/target/
/test-ledger/
**/*.rs.bk
@@ -30,3 +30,6 @@ log-*/
.DS_Store
# scripts that may be generated by cargo *-bpf commands
**/cargo-*-bpf-child-script-*.sh
+
+.env
+docker-output/
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000000..e31fc7fccd
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,9 @@
+[submodule "anchor"]
+ path = anchor
+ url = https://github.com/jito-foundation/anchor.git
+[submodule "jito-programs"]
+ path = jito-programs
+ url = https://github.com/jito-foundation/jito-programs.git
+[submodule "jito-protos/protos"]
+ path = jito-protos/protos
+ url = https://github.com/jito-labs/mev-protos.git
diff --git a/Cargo.lock b/Cargo.lock
index 720fc934a2..5cb41cf8a3 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -95,6 +95,145 @@ dependencies = [
"alloc-no-stdlib",
]
+[[package]]
+name = "anchor-attribute-access-control"
+version = "0.24.2"
+dependencies = [
+ "anchor-syn",
+ "anyhow",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
+ "regex",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "anchor-attribute-account"
+version = "0.24.2"
+dependencies = [
+ "anchor-syn",
+ "anyhow",
+ "bs58 0.4.0",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
+ "rustversion",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "anchor-attribute-constant"
+version = "0.24.2"
+dependencies = [
+ "anchor-syn",
+ "proc-macro2 1.0.66",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "anchor-attribute-error"
+version = "0.24.2"
+dependencies = [
+ "anchor-syn",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "anchor-attribute-event"
+version = "0.24.2"
+dependencies = [
+ "anchor-syn",
+ "anyhow",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "anchor-attribute-interface"
+version = "0.24.2"
+dependencies = [
+ "anchor-syn",
+ "anyhow",
+ "heck 0.3.3",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "anchor-attribute-program"
+version = "0.24.2"
+dependencies = [
+ "anchor-syn",
+ "anyhow",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "anchor-attribute-state"
+version = "0.24.2"
+dependencies = [
+ "anchor-syn",
+ "anyhow",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "anchor-derive-accounts"
+version = "0.24.2"
+dependencies = [
+ "anchor-syn",
+ "anyhow",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "anchor-lang"
+version = "0.24.2"
+dependencies = [
+ "anchor-attribute-access-control",
+ "anchor-attribute-account",
+ "anchor-attribute-constant",
+ "anchor-attribute-error",
+ "anchor-attribute-event",
+ "anchor-attribute-interface",
+ "anchor-attribute-program",
+ "anchor-attribute-state",
+ "anchor-derive-accounts",
+ "arrayref",
+ "base64 0.13.0",
+ "bincode",
+ "borsh",
+ "bytemuck",
+ "solana-program 1.14.24",
+ "thiserror",
+]
+
+[[package]]
+name = "anchor-syn"
+version = "0.24.2"
+dependencies = [
+ "anyhow",
+ "bs58 0.3.1",
+ "heck 0.3.3",
+ "proc-macro2 1.0.66",
+ "proc-macro2-diagnostics",
+ "quote 1.0.31",
+ "serde",
+ "serde_json",
+ "sha2 0.9.9",
+ "syn 1.0.109",
+ "thiserror",
+]
+
[[package]]
name = "ansi_term"
version = "0.11.0"
@@ -156,8 +295,8 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
"synstructure",
]
@@ -168,8 +307,8 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -232,8 +371,8 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "648ed8c8d2ce5409ccd57453d9d1b214b342a0d69376a6feda1fd6cae3299308"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -243,8 +382,8 @@ version = "0.1.56"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -372,8 +511,8 @@ dependencies = [
"lazy_static",
"lazycell",
"peeking_take_while",
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"regex",
"rustc-hash",
"shlex",
@@ -488,7 +627,7 @@ dependencies = [
"borsh-derive-internal",
"borsh-schema-derive-internal",
"proc-macro-crate 0.1.5",
- "proc-macro2 1.0.52",
+ "proc-macro2 1.0.66",
"syn 1.0.109",
]
@@ -498,8 +637,8 @@ version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -509,8 +648,8 @@ version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -535,6 +674,12 @@ dependencies = [
"alloc-stdlib",
]
+[[package]]
+name = "bs58"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb"
+
[[package]]
name = "bs58"
version = "0.4.0"
@@ -605,8 +750,8 @@ version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1aca418a974d83d40a0c1f0c5cba6ff4bc28d8df099109ca459a2118d40b6322"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -800,9 +945,9 @@ dependencies = [
[[package]]
name = "clap"
-version = "3.2.23"
+version = "3.2.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5"
+checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123"
dependencies = [
"atty",
"bitflags",
@@ -817,14 +962,14 @@ dependencies = [
[[package]]
name = "clap_derive"
-version = "3.2.18"
+version = "3.2.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65"
+checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008"
dependencies = [
"heck 0.4.0",
"proc-macro-error",
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -906,8 +1051,8 @@ version = "0.2.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef196d5d972878a48da7decb7686eded338b4858fbabeed513d63a7c98b2b82d"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"unicode-xid 0.2.2",
]
@@ -1160,8 +1305,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40eebddd2156ce1bb37b20bbe5151340a31828b1f2d22ba4141f3531710e38df"
dependencies = [
"convert_case",
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"rustc_version 0.3.3",
"syn 1.0.109",
]
@@ -1248,8 +1393,8 @@ version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -1330,8 +1475,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f86b50932a01e7ec5c06160492ab660fb19b6bb2a7878030dd6cd68d21df9d4d"
dependencies = [
"enum-ordinalize",
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -1371,8 +1516,8 @@ version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8958699f9359f0b04e691a13850d48b7de329138023876d07cbd024c2c820598"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -1384,8 +1529,8 @@ checksum = "0b166c9e378360dd5a6666a9604bb4f54ae0cac39023ffbac425e917a2a04fef"
dependencies = [
"num-bigint 0.4.3",
"num-traits",
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -1396,8 +1541,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eb359f1476bf611266ac1f5355bc14aeca37b299d0ebccc038ee7058891c9cb"
dependencies = [
"once_cell",
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -1427,13 +1572,13 @@ dependencies = [
[[package]]
name = "errno"
-version = "0.3.0"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50d6a0976c999d473fe89ad888d5a284e55366d9dc9038b1ba2aa15128c4afa0"
+checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a"
dependencies = [
"errno-dragonfly",
"libc",
- "windows-sys 0.45.0",
+ "windows-sys 0.48.0",
]
[[package]]
@@ -1531,6 +1676,12 @@ dependencies = [
"winapi 0.3.9",
]
+[[package]]
+name = "fixedbitset"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d"
+
[[package]]
name = "fixedbitset"
version = "0.4.0"
@@ -1651,8 +1802,8 @@ version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -2241,6 +2392,28 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
+[[package]]
+name = "jito-programs-vote-state"
+version = "0.1.2"
+dependencies = [
+ "anchor-lang",
+ "bincode",
+ "serde",
+ "serde_derive",
+ "solana-program 1.14.24",
+]
+
+[[package]]
+name = "jito-protos"
+version = "1.14.24"
+dependencies = [
+ "bytes",
+ "prost 0.8.0",
+ "prost-types 0.8.0",
+ "tonic 0.5.2",
+ "tonic-build 0.5.2",
+]
+
[[package]]
name = "jobserver"
version = "0.1.24"
@@ -2321,8 +2494,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b939a78fa820cdfcb7ee7484466746a7377760970f6f9c6fe19f9edcc8a38d2"
dependencies = [
"proc-macro-crate 0.1.5",
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -2420,9 +2593,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]]
name = "libc"
-version = "0.2.140"
+version = "0.2.147"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
+checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
[[package]]
name = "libloading"
@@ -2697,8 +2870,8 @@ version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -2821,8 +2994,8 @@ version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -2894,8 +3067,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2be1598bf1c313dcdd12092e3f1920f463462525a21b7b4e11b4168353d0123e"
dependencies = [
"proc-macro-crate 1.1.0",
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -2962,8 +3135,8 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -3039,8 +3212,8 @@ checksum = "084fd65d5dd8b3772edccb5ffd1e4b7eba43897ecd0f9401e330e8c542959408"
dependencies = [
"Inflector",
"proc-macro-error",
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -3187,8 +3360,8 @@ checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55"
dependencies = [
"pest",
"pest_meta",
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -3203,13 +3376,23 @@ dependencies = [
"sha-1 0.8.2",
]
+[[package]]
+name = "petgraph"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7"
+dependencies = [
+ "fixedbitset 0.2.0",
+ "indexmap",
+]
+
[[package]]
name = "petgraph"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a13a2fa9d0b63e5f22328828741e523766fff0ee9e779316902290dff3f824f"
dependencies = [
- "fixedbitset",
+ "fixedbitset 0.4.0",
"indexmap",
]
@@ -3238,8 +3421,8 @@ version = "1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -3335,7 +3518,7 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b83ec2d0af5c5c556257ff52c9f98934e243b9fd39604bfb2a9b75ec2e97f18"
dependencies = [
- "proc-macro2 1.0.52",
+ "proc-macro2 1.0.66",
"syn 1.0.109",
]
@@ -3365,8 +3548,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
dependencies = [
"proc-macro-error-attr",
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
"version_check",
]
@@ -3377,8 +3560,8 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"version_check",
]
@@ -3393,13 +3576,26 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "1.0.52"
+version = "1.0.66"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224"
+checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9"
dependencies = [
"unicode-ident",
]
+[[package]]
+name = "proc-macro2-diagnostics"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4bf29726d67464d49fa6224a1d07936a8c08bb3fba727c7493f6cf1616fdaada"
+dependencies = [
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
+ "syn 1.0.109",
+ "version_check",
+ "yansi",
+]
+
[[package]]
name = "proptest"
version = "1.0.0"
@@ -3420,6 +3616,16 @@ dependencies = [
"tempfile",
]
+[[package]]
+name = "prost"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "de5e2533f59d08fcf364fd374ebda0692a70bd6d7e66ef97f306f45c6c5d8020"
+dependencies = [
+ "bytes",
+ "prost-derive 0.8.0",
+]
+
[[package]]
name = "prost"
version = "0.9.0"
@@ -3440,6 +3646,24 @@ dependencies = [
"prost-derive 0.11.0",
]
+[[package]]
+name = "prost-build"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "355f634b43cdd80724ee7848f95770e7e70eefa6dcf14fea676216573b8fd603"
+dependencies = [
+ "bytes",
+ "heck 0.3.3",
+ "itertools",
+ "log",
+ "multimap",
+ "petgraph 0.5.1",
+ "prost 0.8.0",
+ "prost-types 0.8.0",
+ "tempfile",
+ "which",
+]
+
[[package]]
name = "prost-build"
version = "0.9.0"
@@ -3452,7 +3676,7 @@ dependencies = [
"lazy_static",
"log",
"multimap",
- "petgraph",
+ "petgraph 0.6.0",
"prost 0.9.0",
"prost-types 0.9.0",
"regex",
@@ -3472,7 +3696,7 @@ dependencies = [
"lazy_static",
"log",
"multimap",
- "petgraph",
+ "petgraph 0.6.0",
"prost 0.11.0",
"prost-types 0.11.0",
"regex",
@@ -3480,6 +3704,19 @@ dependencies = [
"which",
]
+[[package]]
+name = "prost-derive"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "600d2f334aa05acb02a755e217ef1ab6dea4d51b58b7846588b747edec04efba"
+dependencies = [
+ "anyhow",
+ "itertools",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
+ "syn 1.0.109",
+]
+
[[package]]
name = "prost-derive"
version = "0.9.0"
@@ -3488,8 +3725,8 @@ checksum = "f9cc1a3263e07e0bf68e96268f37665207b49560d98739662cdfaae215c720fe"
dependencies = [
"anyhow",
"itertools",
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -3501,11 +3738,21 @@ checksum = "7345d5f0e08c0536d7ac7229952590239e77abf0a0100a1b1d890add6ea96364"
dependencies = [
"anyhow",
"itertools",
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
+[[package]]
+name = "prost-types"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "603bbd6394701d13f3f25aada59c7de9d35a6a5887cfc156181234a44002771b"
+dependencies = [
+ "bytes",
+ "prost 0.8.0",
+]
+
[[package]]
name = "prost-types"
version = "0.9.0"
@@ -3594,7 +3841,7 @@ dependencies = [
"rand 0.8.5",
"ring",
"rustls 0.20.6",
- "rustls-native-certs",
+ "rustls-native-certs 0.6.1",
"rustls-pemfile 0.2.1",
"slab",
"thiserror",
@@ -3629,11 +3876,11 @@ dependencies = [
[[package]]
name = "quote"
-version = "1.0.18"
+version = "1.0.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1"
+checksum = "5fe8a65d69dd0808184ebb5f836ab526bb259db23c657efa38711b1072ee47f0"
dependencies = [
- "proc-macro2 1.0.52",
+ "proc-macro2 1.0.66",
]
[[package]]
@@ -3787,7 +4034,7 @@ dependencies = [
name = "rbpf-cli"
version = "1.14.24"
dependencies = [
- "clap 3.2.23",
+ "clap 3.2.25",
"serde",
"serde_json",
"solana-bpf-loader-program",
@@ -3924,7 +4171,7 @@ dependencies = [
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
- "webpki-roots",
+ "webpki-roots 0.22.1",
"winreg",
]
@@ -4025,7 +4272,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e78cc525325c06b4a7ff02db283472f3c042b7ff0c391f96c6d5ac6f4f91b75"
dependencies = [
"bitflags",
- "errno 0.3.0",
+ "errno 0.3.1",
"io-lifetimes 1.0.9",
"libc",
"linux-raw-sys 0.3.1",
@@ -4057,6 +4304,18 @@ dependencies = [
"webpki 0.22.0",
]
+[[package]]
+name = "rustls-native-certs"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092"
+dependencies = [
+ "openssl-probe",
+ "rustls 0.19.1",
+ "schannel",
+ "security-framework",
+]
+
[[package]]
name = "rustls-native-certs"
version = "0.6.1"
@@ -4151,8 +4410,8 @@ version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bdbda6ac5cd1321e724fa9cee216f3a61885889b896f073b8f82322789c5250e"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -4250,8 +4509,8 @@ version = "1.0.138"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "023e9b1467aef8a10fb88f25611870ada9800ef7e22afce356bb0d2387b6f27c"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -4310,8 +4569,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1b95bb2f4f624565e8fe8140c789af7e2082c0e0561b5a82a1b678baa9703dc"
dependencies = [
"proc-macro-error",
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"rustversion",
"syn 1.0.109",
]
@@ -4514,7 +4773,7 @@ dependencies = [
"Inflector",
"base64 0.13.0",
"bincode",
- "bs58",
+ "bs58 0.4.0",
"bv",
"lazy_static",
"serde",
@@ -4605,7 +4864,7 @@ dependencies = [
name = "solana-banking-bench"
version = "1.14.24"
dependencies = [
- "clap 3.2.23",
+ "clap 3.2.25",
"crossbeam-channel",
"log",
"rand 0.7.3",
@@ -4659,9 +4918,11 @@ dependencies = [
"futures 0.3.21",
"solana-banks-interface",
"solana-client",
+ "solana-gossip",
"solana-runtime",
"solana-sdk 1.14.24",
"solana-send-transaction-service",
+ "solana-streamer",
"tarpc",
"tokio",
"tokio-serde",
@@ -4672,7 +4933,7 @@ dependencies = [
name = "solana-bench-streamer"
version = "1.14.24"
dependencies = [
- "clap 3.2.23",
+ "clap 3.2.25",
"crossbeam-channel",
"solana-net-utils",
"solana-streamer",
@@ -4779,7 +5040,7 @@ name = "solana-cargo-build-bpf"
version = "1.14.24"
dependencies = [
"cargo_metadata",
- "clap 3.2.23",
+ "clap 3.2.25",
"solana-sdk 1.14.24",
]
@@ -4789,7 +5050,7 @@ version = "1.14.24"
dependencies = [
"bzip2",
"cargo_metadata",
- "clap 3.2.23",
+ "clap 3.2.25",
"log",
"regex",
"serial_test",
@@ -4804,7 +5065,7 @@ name = "solana-cargo-test-bpf"
version = "1.14.24"
dependencies = [
"cargo_metadata",
- "clap 3.2.23",
+ "clap 3.2.25",
]
[[package]]
@@ -4812,7 +5073,7 @@ name = "solana-cargo-test-sbf"
version = "1.14.24"
dependencies = [
"cargo_metadata",
- "clap 3.2.23",
+ "clap 3.2.25",
]
[[package]]
@@ -4837,7 +5098,7 @@ name = "solana-clap-v3-utils"
version = "1.14.24"
dependencies = [
"chrono",
- "clap 3.2.23",
+ "clap 3.2.25",
"rpassword",
"solana-perf",
"solana-remote-wallet",
@@ -4854,7 +5115,7 @@ name = "solana-cli"
version = "1.14.24"
dependencies = [
"bincode",
- "bs58",
+ "bs58 0.4.0",
"clap 2.33.3",
"console",
"const_format",
@@ -4946,7 +5207,7 @@ dependencies = [
"async-trait",
"base64 0.13.0",
"bincode",
- "bs58",
+ "bs58 0.4.0",
"bytes",
"clap 2.33.3",
"crossbeam-channel",
@@ -5045,23 +5306,33 @@ name = "solana-core"
version = "1.14.24"
dependencies = [
"ahash",
+ "anchor-lang",
"base64 0.13.0",
"bincode",
- "bs58",
+ "bs58 0.4.0",
+ "bytes",
"chrono",
+ "clap 3.2.25",
"crossbeam-channel",
"dashmap",
"eager",
"etcd-client",
"fs_extra",
+ "futures 0.3.21",
+ "futures-util",
+ "h2",
"histogram",
+ "indexmap",
"itertools",
+ "jito-protos",
"lazy_static",
"log",
"lru",
"matches",
"min-max-heap",
"num_enum",
+ "prost 0.8.0",
+ "prost-types 0.8.0",
"rand 0.7.3",
"rand_chacha 0.2.2",
"raptorq",
@@ -5104,7 +5375,12 @@ dependencies = [
"tempfile",
"test-case",
"thiserror",
+ "tip-distribution",
+ "tip-payment",
"tokio",
+ "tokio-stream",
+ "tonic 0.5.2",
+ "tonic-build 0.5.2",
"trees",
]
@@ -5113,7 +5389,7 @@ name = "solana-dos"
version = "1.14.24"
dependencies = [
"bincode",
- "clap 3.2.23",
+ "clap 3.2.25",
"crossbeam-channel",
"itertools",
"log",
@@ -5213,7 +5489,7 @@ dependencies = [
"ahash",
"blake3",
"block-buffer 0.9.0",
- "bs58",
+ "bs58 0.4.0",
"bv",
"byteorder",
"cc",
@@ -5245,7 +5521,7 @@ dependencies = [
"ahash",
"blake3",
"block-buffer 0.9.0",
- "bs58",
+ "bs58 0.4.0",
"bv",
"byteorder",
"cc",
@@ -5277,8 +5553,8 @@ version = "1.14.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57892538250428ad3dc3cbe05f6cd75ad14f4f16734fcb91bc7cd5fbb63d6315"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"rustc_version 0.4.0",
"syn 1.0.109",
]
@@ -5287,8 +5563,8 @@ dependencies = [
name = "solana-frozen-abi-macro"
version = "1.14.24"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"rustc_version 0.4.0",
"syn 1.0.109",
]
@@ -5338,7 +5614,7 @@ dependencies = [
name = "solana-geyser-plugin-manager"
version = "1.14.24"
dependencies = [
- "bs58",
+ "bs58 0.4.0",
"crossbeam-channel",
"json5",
"libloading",
@@ -5437,8 +5713,8 @@ dependencies = [
name = "solana-keygen"
version = "1.14.24"
dependencies = [
- "bs58",
- "clap 3.2.23",
+ "bs58 0.4.0",
+ "clap 3.2.25",
"dirs-next",
"num_cpus",
"solana-clap-v3-utils",
@@ -5456,7 +5732,7 @@ dependencies = [
"assert_matches",
"bincode",
"bitflags",
- "bs58",
+ "bs58 0.4.0",
"byteorder",
"chrono",
"chrono-humanize",
@@ -5582,7 +5858,7 @@ name = "solana-log-analyzer"
version = "1.14.24"
dependencies = [
"byte-unit",
- "clap 3.2.23",
+ "clap 3.2.25",
"serde",
"serde_json",
"solana-logger 1.14.24",
@@ -5659,7 +5935,7 @@ dependencies = [
name = "solana-net-shaper"
version = "1.14.24"
dependencies = [
- "clap 3.2.23",
+ "clap 3.2.25",
"rand 0.7.3",
"serde",
"serde_json",
@@ -5671,7 +5947,7 @@ name = "solana-net-utils"
version = "1.14.24"
dependencies = [
"bincode",
- "clap 3.2.23",
+ "clap 3.2.25",
"crossbeam-channel",
"log",
"nix",
@@ -5750,7 +6026,7 @@ dependencies = [
name = "solana-poh-bench"
version = "1.14.24"
dependencies = [
- "clap 3.2.23",
+ "clap 3.2.25",
"log",
"rand 0.7.3",
"rayon",
@@ -5774,7 +6050,7 @@ dependencies = [
"blake3",
"borsh",
"borsh-derive",
- "bs58",
+ "bs58 0.4.0",
"bv",
"bytemuck",
"cc",
@@ -5823,7 +6099,7 @@ dependencies = [
"blake3",
"borsh",
"borsh-derive",
- "bs58",
+ "bs58 0.4.0",
"bv",
"bytemuck",
"cc",
@@ -5944,7 +6220,7 @@ version = "1.14.24"
dependencies = [
"base64 0.13.0",
"bincode",
- "bs58",
+ "bs58 0.4.0",
"crossbeam-channel",
"dashmap",
"itertools",
@@ -5998,7 +6274,7 @@ name = "solana-rpc-test"
version = "1.14.24"
dependencies = [
"bincode",
- "bs58",
+ "bs58 0.4.0",
"crossbeam-channel",
"futures-util",
"log",
@@ -6091,7 +6367,7 @@ dependencies = [
"bincode",
"bitflags",
"borsh",
- "bs58",
+ "bs58 0.4.0",
"bytemuck",
"byteorder",
"chrono",
@@ -6135,13 +6411,14 @@ dependencies = [
name = "solana-sdk"
version = "1.14.24"
dependencies = [
+ "anchor-lang",
"anyhow",
"assert_matches",
"base64 0.13.0",
"bincode",
"bitflags",
"borsh",
- "bs58",
+ "bs58 0.4.0",
"bytemuck",
"byteorder",
"chrono",
@@ -6191,9 +6468,9 @@ version = "1.14.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d41a09b9cecd0a4df63c78a192adee99ebf2d3757c19713a68246e1d9789c7c"
dependencies = [
- "bs58",
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "bs58 0.4.0",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"rustversion",
"syn 1.0.109",
]
@@ -6202,9 +6479,9 @@ dependencies = [
name = "solana-sdk-macro"
version = "1.14.24"
dependencies = [
- "bs58",
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "bs58 0.4.0",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"rustversion",
"syn 1.0.109",
]
@@ -6216,11 +6493,13 @@ dependencies = [
"crossbeam-channel",
"log",
"solana-client",
+ "solana-gossip",
"solana-logger 1.14.24",
"solana-measure",
"solana-metrics",
"solana-runtime",
"solana-sdk 1.14.24",
+ "solana-streamer",
]
[[package]]
@@ -6299,7 +6578,7 @@ name = "solana-storage-proto"
version = "1.14.24"
dependencies = [
"bincode",
- "bs58",
+ "bs58 0.4.0",
"enum-iterator",
"prost 0.11.0",
"protobuf-src",
@@ -6388,6 +6667,35 @@ dependencies = [
"tokio",
]
+[[package]]
+name = "solana-tip-distributor"
+version = "1.14.24"
+dependencies = [
+ "anchor-lang",
+ "clap 3.2.25",
+ "env_logger",
+ "futures 0.3.21",
+ "im",
+ "itertools",
+ "log",
+ "num-traits",
+ "serde",
+ "serde_json",
+ "solana-client",
+ "solana-genesis-utils",
+ "solana-ledger",
+ "solana-merkle-tree",
+ "solana-metrics",
+ "solana-program 1.14.24",
+ "solana-runtime",
+ "solana-sdk 1.14.24",
+ "solana-stake-program",
+ "thiserror",
+ "tip-distribution",
+ "tip-payment",
+ "tokio",
+]
+
[[package]]
name = "solana-tokens"
version = "1.14.24"
@@ -6453,7 +6761,7 @@ dependencies = [
"base64 0.13.0",
"bincode",
"borsh",
- "bs58",
+ "bs58 0.4.0",
"lazy_static",
"log",
"serde",
@@ -6529,6 +6837,7 @@ dependencies = [
"solana-vote-program",
"symlink",
"tikv-jemallocator",
+ "tonic 0.5.2",
]
[[package]]
@@ -6819,8 +7128,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6878079b17446e4d3eba6192bb0a2950d5b14f0ed8424b852310e5a94345d0ef"
dependencies = [
"heck 0.4.0",
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"rustversion",
"syn 1.0.109",
]
@@ -6854,8 +7163,8 @@ version = "1.0.109"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"unicode-ident",
]
@@ -6871,8 +7180,8 @@ version = "0.12.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
"unicode-xid 0.2.2",
]
@@ -6955,8 +7264,8 @@ version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ee42b4e559f17bce0385ebf511a7beb67d5cc33c12c96b7f4e9789919d9c10f"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -7015,8 +7324,8 @@ checksum = "8dd461f47ade621665c9f4e44b20449341769911c253275dc5cb03726cbb852c"
dependencies = [
"cfg-if 1.0.0",
"proc-macro-error",
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -7050,8 +7359,8 @@ version = "1.0.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -7153,6 +7462,22 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
+[[package]]
+name = "tip-distribution"
+version = "0.1.0"
+dependencies = [
+ "anchor-lang",
+ "jito-programs-vote-state",
+ "solana-program 1.14.24",
+]
+
+[[package]]
+name = "tip-payment"
+version = "0.1.0"
+dependencies = [
+ "anchor-lang",
+]
+
[[package]]
name = "tokio"
version = "1.14.1"
@@ -7189,8 +7514,8 @@ version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -7266,7 +7591,7 @@ dependencies = [
"tokio-rustls 0.23.3",
"tungstenite",
"webpki 0.22.0",
- "webpki-roots",
+ "webpki-roots 0.22.1",
]
[[package]]
@@ -7308,6 +7633,40 @@ dependencies = [
"serde",
]
+[[package]]
+name = "tonic"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "796c5e1cd49905e65dd8e700d4cb1dffcbfdb4fc9d017de08c1a537afd83627c"
+dependencies = [
+ "async-stream",
+ "async-trait",
+ "base64 0.13.0",
+ "bytes",
+ "futures-core",
+ "futures-util",
+ "h2",
+ "http",
+ "http-body",
+ "hyper",
+ "hyper-timeout",
+ "percent-encoding 2.1.0",
+ "pin-project",
+ "prost 0.8.0",
+ "prost-derive 0.8.0",
+ "rustls-native-certs 0.5.0",
+ "tokio",
+ "tokio-rustls 0.22.0",
+ "tokio-stream",
+ "tokio-util 0.6.9",
+ "tower",
+ "tower-layer",
+ "tower-service",
+ "tracing",
+ "tracing-futures",
+ "webpki-roots 0.21.1",
+]
+
[[package]]
name = "tonic"
version = "0.6.2"
@@ -7374,15 +7733,27 @@ dependencies = [
"tracing-futures",
]
+[[package]]
+name = "tonic-build"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "12b52d07035516c2b74337d2ac7746075e7dcae7643816c1b12c5ff8a7484c08"
+dependencies = [
+ "proc-macro2 1.0.66",
+ "prost-build 0.8.0",
+ "quote 1.0.31",
+ "syn 1.0.109",
+]
+
[[package]]
name = "tonic-build"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9403f1bafde247186684b230dc6f38b5cd514584e8bec1dd32514be4745fa757"
dependencies = [
- "proc-macro2 1.0.52",
+ "proc-macro2 1.0.66",
"prost-build 0.9.0",
- "quote 1.0.18",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -7393,9 +7764,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2fbcd2800e34e743b9ae795867d5f77b535d3a3be69fd731e39145719752df8c"
dependencies = [
"prettyplease",
- "proc-macro2 1.0.52",
+ "proc-macro2 1.0.66",
"prost-build 0.11.0",
- "quote 1.0.18",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -7469,8 +7840,8 @@ version = "0.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
]
@@ -7547,7 +7918,7 @@ dependencies = [
"url 2.2.2",
"utf-8",
"webpki 0.22.0",
- "webpki-roots",
+ "webpki-roots 0.22.1",
]
[[package]]
@@ -7790,8 +8161,8 @@ dependencies = [
"bumpalo",
"log",
"once_cell",
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
"wasm-bindgen-shared",
]
@@ -7814,7 +8185,7 @@ version = "0.2.82"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602"
dependencies = [
- "quote 1.0.18",
+ "quote 1.0.31",
"wasm-bindgen-macro-support",
]
@@ -7824,8 +8195,8 @@ version = "0.2.82"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
@@ -7867,6 +8238,15 @@ dependencies = [
"untrusted",
]
+[[package]]
+name = "webpki-roots"
+version = "0.21.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940"
+dependencies = [
+ "webpki 0.21.4",
+]
+
[[package]]
name = "webpki-roots"
version = "0.22.1"
@@ -7962,7 +8342,16 @@ version = "0.45.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
dependencies = [
- "windows-targets",
+ "windows-targets 0.42.2",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
+dependencies = [
+ "windows-targets 0.48.1",
]
[[package]]
@@ -7971,21 +8360,42 @@ version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
dependencies = [
- "windows_aarch64_gnullvm",
+ "windows_aarch64_gnullvm 0.42.2",
"windows_aarch64_msvc 0.42.2",
"windows_i686_gnu 0.42.2",
"windows_i686_msvc 0.42.2",
"windows_x86_64_gnu 0.42.2",
- "windows_x86_64_gnullvm",
+ "windows_x86_64_gnullvm 0.42.2",
"windows_x86_64_msvc 0.42.2",
]
+[[package]]
+name = "windows-targets"
+version = "0.48.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f"
+dependencies = [
+ "windows_aarch64_gnullvm 0.48.0",
+ "windows_aarch64_msvc 0.48.0",
+ "windows_i686_gnu 0.48.0",
+ "windows_i686_msvc 0.48.0",
+ "windows_x86_64_gnu 0.48.0",
+ "windows_x86_64_gnullvm 0.48.0",
+ "windows_x86_64_msvc 0.48.0",
+]
+
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
+
[[package]]
name = "windows_aarch64_msvc"
version = "0.30.0"
@@ -8004,6 +8414,12 @@ version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
+
[[package]]
name = "windows_i686_gnu"
version = "0.30.0"
@@ -8022,6 +8438,12 @@ version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
+[[package]]
+name = "windows_i686_gnu"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
+
[[package]]
name = "windows_i686_msvc"
version = "0.30.0"
@@ -8040,6 +8462,12 @@ version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
+[[package]]
+name = "windows_i686_msvc"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
+
[[package]]
name = "windows_x86_64_gnu"
version = "0.30.0"
@@ -8058,12 +8486,24 @@ version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
+
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
+
[[package]]
name = "windows_x86_64_msvc"
version = "0.30.0"
@@ -8082,6 +8522,12 @@ version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
+
[[package]]
name = "winreg"
version = "0.10.1"
@@ -8127,6 +8573,12 @@ dependencies = [
"linked-hash-map",
]
+[[package]]
+name = "yansi"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec"
+
[[package]]
name = "yasna"
version = "0.5.0"
@@ -8151,8 +8603,8 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bdff2024a851a322b08f179173ae2ba620445aef1e838f0c196820eade4ae0c7"
dependencies = [
- "proc-macro2 1.0.52",
- "quote 1.0.18",
+ "proc-macro2 1.0.66",
+ "quote 1.0.31",
"syn 1.0.109",
"synstructure",
]
diff --git a/Cargo.toml b/Cargo.toml
index 219a27a411..f27d9528c6 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -30,6 +30,7 @@ members = [
"geyser-plugin-manager",
"gossip",
"install",
+ "jito-protos",
"keygen",
"ledger",
"ledger-tool",
@@ -80,6 +81,7 @@ members = [
"streamer",
"sys-tuner",
"test-validator",
+ "tip-distributor",
"tokens",
"transaction-dos",
"transaction-status",
@@ -91,6 +93,8 @@ members = [
]
exclude = [
+ "anchor",
+ "jito-programs",
"programs/bpf",
]
diff --git a/README.md b/README.md
index 0e939f533f..81863bae57 100644
--- a/README.md
+++ b/README.md
@@ -4,10 +4,14 @@
-[![Solana crate](https://img.shields.io/crates/v/solana-core.svg)](https://crates.io/crates/solana-core)
-[![Solana documentation](https://docs.rs/solana-core/badge.svg)](https://docs.rs/solana-core)
-[![Build status](https://badge.buildkite.com/8cc350de251d61483db98bdfc895b9ea0ac8ffa4a32ee850ed.svg?branch=master)](https://buildkite.com/solana-labs/solana/builds?branch=master)
-[![codecov](https://codecov.io/gh/solana-labs/solana/branch/master/graph/badge.svg)](https://codecov.io/gh/solana-labs/solana)
+[![Build status](https://badge.buildkite.com/a6981eb34c6e0c7c09e3a3cb4bda09579f0ff2dcb1bd74b2ad.svg?branch=master)](https://buildkite.com/jito-labs/jito-solana)
+
+[//]: # ([![Solana crate](https://img.shields.io/crates/v/solana-core.svg)](https://crates.io/crates/solana-core))
+[//]: # ([![Solana documentation](https://docs.rs/solana-core/badge.svg)](https://docs.rs/solana-core))
+[//]: # ([![codecov](https://codecov.io/gh/solana-labs/solana/branch/master/graph/badge.svg)](https://codecov.io/gh/solana-labs/solana))
+
+# About
+This repository contains Jito Foundations's fork of the Solana validator.
# Building
diff --git a/anchor b/anchor
new file mode 160000
index 0000000000..25a497e4f0
--- /dev/null
+++ b/anchor
@@ -0,0 +1 @@
+Subproject commit 25a497e4f0f300eb363b44a52f5c794e7085b0f4
diff --git a/banking-bench/src/main.rs b/banking-bench/src/main.rs
index 2806a8a9e0..64a19c289a 100644
--- a/banking-bench/src/main.rs
+++ b/banking-bench/src/main.rs
@@ -6,7 +6,7 @@ use {
rand::{thread_rng, Rng},
rayon::prelude::*,
solana_client::connection_cache::{ConnectionCache, DEFAULT_TPU_CONNECTION_POOL_SIZE},
- solana_core::banking_stage::BankingStage,
+ solana_core::{banking_stage::BankingStage, bundle_account_locker::BundleAccountLocker},
solana_gossip::cluster_info::{ClusterInfo, Node},
solana_ledger::{
blockstore::Blockstore,
@@ -30,6 +30,7 @@ use {
},
solana_streamer::socket::SocketAddrSpace,
std::{
+ collections::HashSet,
sync::{atomic::Ordering, Arc, RwLock},
thread::sleep,
time::{Duration, Instant},
@@ -45,9 +46,15 @@ fn check_txs(
let now = Instant::now();
let mut no_bank = false;
loop {
- if let Ok((_bank, (entry, _tick_height))) = receiver.recv_timeout(Duration::from_millis(10))
+ if let Ok(WorkingBankEntry {
+ bank: _,
+ entries_ticks,
+ }) = receiver.recv_timeout(Duration::from_millis(10))
{
- total += entry.transactions.len();
+ total += entries_ticks
+ .iter()
+ .map(|e| e.0.transactions.len())
+ .sum::();
}
if total >= ref_tx_count {
break;
@@ -359,6 +366,8 @@ fn main() {
None,
Arc::new(connection_cache),
bank_forks.clone(),
+ HashSet::default(),
+ BundleAccountLocker::default(),
);
poh_recorder.write().unwrap().set_bank(&bank, false);
diff --git a/banks-server/Cargo.toml b/banks-server/Cargo.toml
index f65be6f48d..31dd561746 100644
--- a/banks-server/Cargo.toml
+++ b/banks-server/Cargo.toml
@@ -15,6 +15,7 @@ crossbeam-channel = "0.5"
futures = "0.3"
solana-banks-interface = { path = "../banks-interface", version = "=1.14.24" }
solana-client = { path = "../client", version = "=1.14.24" }
+solana-gossip = { path = "../gossip", version = "=1.14.24" }
solana-runtime = { path = "../runtime", version = "=1.14.24" }
solana-sdk = { path = "../sdk", version = "=1.14.24" }
solana-send-transaction-service = { path = "../send-transaction-service", version = "=1.14.24" }
@@ -23,6 +24,9 @@ tokio = { version = "1", features = ["full"] }
tokio-serde = { version = "0.8", features = ["bincode"] }
tokio-stream = "0.1"
+[dev-dependencies]
+solana-streamer = { path = "../streamer", version = "=1.14.24" }
+
[lib]
crate-type = ["lib"]
name = "solana_banks_server"
diff --git a/banks-server/src/banks_server.rs b/banks-server/src/banks_server.rs
index cf0a1c6083..08a5478781 100644
--- a/banks-server/src/banks_server.rs
+++ b/banks-server/src/banks_server.rs
@@ -7,6 +7,7 @@ use {
TransactionConfirmationStatus, TransactionSimulationDetails, TransactionStatus,
},
solana_client::connection_cache::ConnectionCache,
+ solana_gossip::cluster_info::ClusterInfo,
solana_runtime::{
bank::{Bank, TransactionSimulationResult},
bank_forks::BankForks,
@@ -391,7 +392,7 @@ pub async fn start_local_server(
pub async fn start_tcp_server(
listen_addr: SocketAddr,
- tpu_addr: SocketAddr,
+ cluster_info: Arc,
bank_forks: Arc>,
block_commitment_cache: Arc>,
connection_cache: Arc,
@@ -416,7 +417,7 @@ pub async fn start_tcp_server(
let (sender, receiver) = unbounded();
SendTransactionService::new::(
- tpu_addr,
+ cluster_info.clone(),
&bank_forks,
None,
receiver,
diff --git a/banks-server/src/rpc_banks_service.rs b/banks-server/src/rpc_banks_service.rs
index f3224fb64e..4d4ad61dae 100644
--- a/banks-server/src/rpc_banks_service.rs
+++ b/banks-server/src/rpc_banks_service.rs
@@ -4,6 +4,7 @@ use {
crate::banks_server::start_tcp_server,
futures::{future::FutureExt, pin_mut, prelude::stream::StreamExt, select},
solana_client::connection_cache::ConnectionCache,
+ solana_gossip::cluster_info::ClusterInfo,
solana_runtime::{bank_forks::BankForks, commitment::BlockCommitmentCache},
std::{
net::SocketAddr,
@@ -27,7 +28,7 @@ pub struct RpcBanksService {
/// Run the TCP service until `exit` is set to true
async fn start_abortable_tcp_server(
listen_addr: SocketAddr,
- tpu_addr: SocketAddr,
+ cluster_info: Arc,
bank_forks: Arc>,
block_commitment_cache: Arc>,
connection_cache: Arc,
@@ -35,7 +36,7 @@ async fn start_abortable_tcp_server(
) {
let server = start_tcp_server(
listen_addr,
- tpu_addr,
+ cluster_info,
bank_forks.clone(),
block_commitment_cache.clone(),
connection_cache,
@@ -59,7 +60,7 @@ async fn start_abortable_tcp_server(
impl RpcBanksService {
fn run(
listen_addr: SocketAddr,
- tpu_addr: SocketAddr,
+ cluster_info: Arc,
bank_forks: Arc>,
block_commitment_cache: Arc>,
connection_cache: Arc,
@@ -67,7 +68,7 @@ impl RpcBanksService {
) {
let server = start_abortable_tcp_server(
listen_addr,
- tpu_addr,
+ cluster_info,
bank_forks,
block_commitment_cache,
connection_cache,
@@ -78,7 +79,7 @@ impl RpcBanksService {
pub fn new(
listen_addr: SocketAddr,
- tpu_addr: SocketAddr,
+ cluster_info: Arc,
bank_forks: &Arc>,
block_commitment_cache: &Arc>,
connection_cache: &Arc,
@@ -93,7 +94,7 @@ impl RpcBanksService {
.spawn(move || {
Self::run(
listen_addr,
- tpu_addr,
+ cluster_info,
bank_forks,
block_commitment_cache,
connection_cache,
@@ -112,7 +113,14 @@ impl RpcBanksService {
#[cfg(test)]
mod tests {
- use {super::*, solana_runtime::bank::Bank};
+ use {
+ super::*,
+ solana_gossip::legacy_contact_info::LegacyContactInfo as ContactInfo,
+ solana_runtime::bank::Bank,
+ solana_sdk::signature::Keypair,
+ solana_streamer::socket::SocketAddrSpace,
+ std::net::{IpAddr, Ipv4Addr},
+ };
#[test]
fn test_rpc_banks_server_exit() {
@@ -121,9 +129,18 @@ mod tests {
let connection_cache = Arc::new(ConnectionCache::default());
let exit = Arc::new(AtomicBool::new(false));
let addr = "127.0.0.1:0".parse().unwrap();
+ let contact_info = ContactInfo {
+ tpu: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080),
+ ..ContactInfo::default()
+ };
+ let cluster_info: Arc = Arc::new(ClusterInfo::new(
+ contact_info,
+ Arc::new(Keypair::new()),
+ SocketAddrSpace::new(false),
+ ));
let service = RpcBanksService::new(
addr,
- addr,
+ cluster_info,
&bank_forks,
&block_commitment_cache,
&connection_cache,
diff --git a/bootstrap b/bootstrap
new file mode 100755
index 0000000000..b01bc6734f
--- /dev/null
+++ b/bootstrap
@@ -0,0 +1,21 @@
+#!/usr/bin/env sh
+bank_hash=$(./target/release/solana-ledger-tool -l config/bootstrap-validator bank-hash)
+
+# NOTE: make sure tip-payment and tip-distribution program are deployed using the correct pubkeys
+RUST_LOG=INFO,solana_core::bundle_stage=DEBUG \
+ NDEBUG=1 ./multinode-demo/bootstrap-validator.sh \
+ --wait-for-supermajority 0 \
+ --expected-bank-hash $bank_hash \
+ --block-engine-address http://127.0.0.1:1003 \
+ --block-engine-auth-service-address http://127.0.0.1:1005 \
+ --relayer-auth-service-address http://127.0.0.1:11226 \
+ --relayer-address http://127.0.0.1:11226 \
+ --rpc-pubsub-enable-block-subscription \
+ --enable-rpc-transaction-history \
+ --tip-payment-program-pubkey 6veFRUKJBNGMR58LEcKn5Bc6MR17WZF4rsgD4Lqq7fsU \
+ --tip-distribution-program-pubkey 3PX9z1qPj37eNZqH7e5fyaVDyG7ARqkjkYEe1a4xsBkA \
+ --commission-bps 0 \
+ --shred-receiver-address 127.0.0.1:1002 \
+ --allow-private-addr \
+ --trust-relayer-packets \
+ --trust-block-engine-packets
diff --git a/ci/buildkite-pipeline-in-disk.sh b/ci/buildkite-pipeline-in-disk.sh
index fcb4eb6118..694c2dab46 100644
--- a/ci/buildkite-pipeline-in-disk.sh
+++ b/ci/buildkite-pipeline-in-disk.sh
@@ -185,7 +185,7 @@ all_test_steps() {
queue: "gcp"
EOF
else
- annotate --style info \
+ annotate --style info --context test-stable-bpf \
"Stable-BPF skipped as no relevant files were modified"
fi
@@ -203,16 +203,20 @@ EOF
^programs/ \
^sdk/ \
; then
- cat >> "$output_file" <<"EOF"
- - command: "ci/test-stable-perf.sh"
- name: "stable-perf"
- timeout_in_minutes: 20
- artifact_paths: "log-*.txt"
- agents:
- queue: "cuda"
-EOF
+
+annotate --style warning --context test-stable-perf \
+ "test-stable-perf is currently disabled because it requires GPUs (LB)"
+#cat >> "$output_file" <<"EOF"
+# - command: "ci/test-stable-perf.sh"
+# name: "stable-perf"
+# timeout_in_minutes: 20
+# artifact_paths: "log-*.txt"
+# agents:
+# queue: "cuda"
+#EOF
+
else
- annotate --style info \
+ annotate --style info --context test-stable-perf \
"Stable-perf skipped as no relevant files were modified"
fi
@@ -237,7 +241,7 @@ EOF
timeout_in_minutes: 30
EOF
else
- annotate --style info \
+ annotate --style info --context test-downstream-projects \
"downstream-projects skipped as no relevant files were modified"
fi
@@ -247,9 +251,11 @@ EOF
^ci/test-stable.sh \
^sdk/ \
; then
- command_step wasm ". ci/rust-version.sh; ci/docker-run.sh \$\$rust_stable_docker_image ci/test-wasm.sh" 20
+ annotate --style warning --context test-wasm \
+ "test-wasm is currently disabled because it times out (LB)"
+# command_step wasm ". ci/rust-version.sh; ci/docker-run.sh \$\$rust_stable_docker_image ci/test-wasm.sh" 20
else
- annotate --style info \
+ annotate --style info --context test-wasm \
"wasm skipped as no relevant files were modified"
fi
@@ -312,7 +318,7 @@ if [[ -n $BUILDKITE_TAG ]]; then
"https://github.com/solana-labs/solana/releases/$BUILDKITE_TAG"
# Jump directly to the secondary build to publish release artifacts quickly
- trigger_secondary_step
+# trigger_secondary_step
exit 0
fi
@@ -340,5 +346,5 @@ fi
start_pipeline "Push pipeline for ${BUILDKITE_BRANCH:-?unknown branch?}"
pull_or_push_steps
wait_step
-trigger_secondary_step
+#trigger_secondary_step
exit 0
diff --git a/ci/buildkite-pipeline.sh b/ci/buildkite-pipeline.sh
index 71bdb01b60..a719b14ef4 100755
--- a/ci/buildkite-pipeline.sh
+++ b/ci/buildkite-pipeline.sh
@@ -190,7 +190,7 @@ all_test_steps() {
queue: "solana"
EOF
else
- annotate --style info \
+ annotate --style info --context test-stable-bpf \
"Stable-BPF skipped as no relevant files were modified"
fi
@@ -208,16 +208,20 @@ EOF
^programs/ \
^sdk/ \
; then
- cat >> "$output_file" <<"EOF"
- - command: "ci/test-stable-perf.sh"
- name: "stable-perf"
- timeout_in_minutes: 20
- artifact_paths: "log-*.txt"
- agents:
- queue: "cuda"
-EOF
+
+annotate --style warning --context test-stable-perf \
+ "test-stable-perf is currently disabled because it requires GPUs (LB)"
+#cat >> "$output_file" <<"EOF"
+# - command: "ci/test-stable-perf.sh"
+# name: "stable-perf"
+# timeout_in_minutes: 20
+# artifact_paths: "log-*.txt"
+# agents:
+# queue: "cuda"
+#EOF
+
else
- annotate --style info \
+ annotate --style info --context test-stable-perf \
"Stable-perf skipped as no relevant files were modified"
fi
@@ -244,7 +248,7 @@ EOF
queue: "solana"
EOF
else
- annotate --style info \
+ annotate --style info --context test-downstream-projects \
"downstream-projects skipped as no relevant files were modified"
fi
@@ -254,9 +258,11 @@ EOF
^ci/test-stable.sh \
^sdk/ \
; then
- command_step wasm ". ci/rust-version.sh; ci/docker-run.sh \$\$rust_stable_docker_image ci/test-wasm.sh" 20
+ annotate --style warning --context test-wasm \
+ "test-wasm is currently disabled because it times out (LB)"
+# command_step wasm ". ci/rust-version.sh; ci/docker-run.sh \$\$rust_stable_docker_image ci/test-wasm.sh" 20
else
- annotate --style info \
+ annotate --style info --context test-wasm \
"wasm skipped as no relevant files were modified"
fi
@@ -342,7 +348,7 @@ if [[ -n $BUILDKITE_TAG ]]; then
"https://github.com/solana-labs/solana/releases/$BUILDKITE_TAG"
# Jump directly to the secondary build to publish release artifacts quickly
- trigger_secondary_step
+# trigger_secondary_step
exit 0
fi
@@ -370,5 +376,5 @@ fi
start_pipeline "Push pipeline for ${BUILDKITE_BRANCH:-?unknown branch?}"
pull_or_push_steps
wait_step
-trigger_secondary_step
+#trigger_secondary_step
exit 0
diff --git a/ci/buildkite-solana-private.sh b/ci/buildkite-solana-private.sh
index 7a2f19d45f..026ebdaf86 100644
--- a/ci/buildkite-solana-private.sh
+++ b/ci/buildkite-solana-private.sh
@@ -185,7 +185,7 @@ all_test_steps() {
queue: "sol-private"
EOF
else
- annotate --style info \
+ annotate --style info --context test-stable-bpf \
"Stable-BPF skipped as no relevant files were modified"
fi
@@ -203,16 +203,19 @@ EOF
^programs/ \
^sdk/ \
; then
- cat >> "$output_file" <<"EOF"
- - command: "ci/test-stable-perf.sh"
- name: "stable-perf"
- timeout_in_minutes: 35
- artifact_paths: "log-*.txt"
- agents:
- queue: "sol-private"
-EOF
+
+annotate --style warning --context test-stable-perf \
+ "test-stable-perf is currently disabled because it requires GPUs (LB)"
+# cat >> "$output_file" <<"EOF"
+# - command: "ci/test-stable-perf.sh"
+# name: "stable-perf"
+# timeout_in_minutes: 35
+# artifact_paths: "log-*.txt"
+# agents:
+# queue: "sol-private"
+#EOF
else
- annotate --style info \
+ annotate --style info --context test-stable-perf \
"Stable-perf skipped as no relevant files were modified"
fi
@@ -239,7 +242,7 @@ EOF
queue: "sol-private"
EOF
else
- annotate --style info \
+ annotate --style info --context test-downstream-projects \
"downstream-projects skipped as no relevant files were modified"
fi
@@ -249,9 +252,11 @@ EOF
^ci/test-stable.sh \
^sdk/ \
; then
- command_step wasm ". ci/rust-version.sh; ci/docker-run.sh \$\$rust_stable_docker_image ci/test-wasm.sh" 20
+ annotate --style warning --context test-wasm \
+ "test-wasm is currently disabled because it times out (LB)"
+# command_step wasm ". ci/rust-version.sh; ci/docker-run.sh \$\$rust_stable_docker_image ci/test-wasm.sh" 20
else
- annotate --style info \
+ annotate --style info --context test-wasm \
"wasm skipped as no relevant files were modified"
fi
diff --git a/ci/channel-info.sh b/ci/channel-info.sh
index c82806454d..101583307f 100755
--- a/ci/channel-info.sh
+++ b/ci/channel-info.sh
@@ -11,7 +11,7 @@ here="$(dirname "$0")"
# shellcheck source=ci/semver_bash/semver.sh
source "$here"/semver_bash/semver.sh
-remote=https://github.com/solana-labs/solana.git
+remote=https://github.com/jito-foundation/jito-solana.git
# Fetch all vX.Y.Z tags
#
diff --git a/ci/do-audit.sh b/ci/do-audit.sh
index a4da2b5b2a..293aeff11f 100755
--- a/ci/do-audit.sh
+++ b/ci/do-audit.sh
@@ -43,6 +43,9 @@ cargo_audit_ignores=(
#
# Not worth upgrading tokio version on a stable branch
--ignore RUSTSEC-2023-0001
+
+
+ --ignore RUSTSEC-2022-0093
)
scripts/cargo-for-all-lock-files.sh stable audit "${cargo_audit_ignores[@]}" | $dep_tree_filter
# we want the `cargo audit` exit code, not `$dep_tree_filter`'s
diff --git a/ci/docker-rust/Dockerfile b/ci/docker-rust/Dockerfile
index 6805f85fcd..cd638e5c28 100644
--- a/ci/docker-rust/Dockerfile
+++ b/ci/docker-rust/Dockerfile
@@ -40,6 +40,7 @@ RUN set -x \
&& cargo install mdbook-linkcheck \
&& cargo install svgbob_cli \
&& cargo install wasm-pack \
+ && cargo install sccache \
&& rustc --version \
&& cargo --version \
&& curl -OL https://github.com/google/protobuf/releases/download/v$PROTOC_VERSION/$PROTOC_ZIP \
diff --git a/ci/rust-version.sh b/ci/rust-version.sh
index dc3570fa93..aec772f68f 100644
--- a/ci/rust-version.sh
+++ b/ci/rust-version.sh
@@ -42,6 +42,7 @@ export rust_nightly_docker_image=solanalabs/rust-nightly:"$nightly_version"
echo "$0: Missing toolchain? Installing...: $toolchain" >&2
rustup install "$toolchain"
cargo +"$toolchain" -V
+ rustup component add rustfmt --toolchain "$toolchain"
fi
}
diff --git a/ci/test-stable.sh b/ci/test-stable.sh
index e3a630599d..dd70804696 100755
--- a/ci/test-stable.sh
+++ b/ci/test-stable.sh
@@ -119,7 +119,7 @@ test-stable-bpf)
# latest mainbeta release version.
solana_program_count=$(grep -c 'solana-program v' cargo.log)
rm -f cargo.log
- if ((solana_program_count > 10)); then
+ if ((solana_program_count > 20)); then
echo "Regression of build redundancy ${solana_program_count}."
echo "Review dependency features that trigger redundant rebuilds of solana-program."
exit 1
diff --git a/client/src/http_sender.rs b/client/src/http_sender.rs
index 18caad62d6..c732208c1a 100644
--- a/client/src/http_sender.rs
+++ b/client/src/http_sender.rs
@@ -71,6 +71,110 @@ impl HttpSender {
stats: RwLock::new(RpcTransportStats::default()),
}
}
+
+ fn check_response(json: &serde_json::Value) -> Result<()> {
+ if json["error"].is_object() {
+ return match serde_json::from_value::(json["error"].clone()) {
+ Ok(rpc_error_object) => {
+ let data = match rpc_error_object.code {
+ rpc_custom_error::JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE => {
+ match serde_json::from_value::(
+ json["error"]["data"].clone(),
+ ) {
+ Ok(data) => {
+ RpcResponseErrorData::SendTransactionPreflightFailure(data)
+ }
+ Err(err) => {
+ debug!(
+ "Failed to deserialize RpcSimulateTransactionResult: {:?}",
+ err
+ );
+ RpcResponseErrorData::Empty
+ }
+ }
+ }
+ rpc_custom_error::JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY => {
+ match serde_json::from_value::(
+ json["error"]["data"].clone(),
+ ) {
+ Ok(rpc_custom_error::NodeUnhealthyErrorData { num_slots_behind }) => {
+ RpcResponseErrorData::NodeUnhealthy { num_slots_behind }
+ }
+ Err(_err) => RpcResponseErrorData::Empty,
+ }
+ }
+ _ => RpcResponseErrorData::Empty,
+ };
+
+ Err(RpcError::RpcResponseError {
+ request_id: json["id"].as_u64().unwrap(),
+ code: rpc_error_object.code,
+ message: rpc_error_object.message,
+ data,
+ }
+ .into())
+ }
+ Err(err) => Err(RpcError::RpcRequestError(format!(
+ "Failed to deserialize RPC error response: {} [{}]",
+ serde_json::to_string(&json["error"]).unwrap(),
+ err
+ ))
+ .into()),
+ };
+ }
+ Ok(())
+ }
+
+ async fn do_send_with_retry(
+ &self,
+ request: serde_json::Value,
+ ) -> reqwest::Result {
+ let mut stats_updater = StatsUpdater::new(&self.stats);
+ let mut too_many_requests_retries = 5;
+ loop {
+ let response = {
+ let client = self.client.clone();
+ let request = request.to_string();
+ client
+ .post(&self.url)
+ .header(CONTENT_TYPE, "application/json")
+ .body(request)
+ .send()
+ .await
+ }?;
+
+ if !response.status().is_success() {
+ if response.status() == StatusCode::TOO_MANY_REQUESTS
+ && too_many_requests_retries > 0
+ {
+ let mut duration = Duration::from_millis(500);
+ if let Some(retry_after) = response.headers().get(RETRY_AFTER) {
+ if let Ok(retry_after) = retry_after.to_str() {
+ if let Ok(retry_after) = retry_after.parse::() {
+ if retry_after < 120 {
+ duration = Duration::from_secs(retry_after);
+ }
+ }
+ }
+ }
+
+ too_many_requests_retries -= 1;
+ debug!(
+ "Too many requests: server responded with {:?}, {} retries left, pausing for {:?}",
+ response, too_many_requests_retries, duration
+ );
+
+ sleep(duration).await;
+ stats_updater.add_rate_limited_time(duration);
+
+ continue;
+ }
+ return Err(response.error_for_status().unwrap_err());
+ }
+
+ return response.json::().await;
+ }
+ }
}
#[derive(Deserialize, Debug)]
@@ -110,103 +214,37 @@ impl<'a> Drop for StatsUpdater<'a> {
#[async_trait]
impl RpcSender for HttpSender {
- fn get_transport_stats(&self) -> RpcTransportStats {
- self.stats.read().unwrap().clone()
- }
-
async fn send(
&self,
request: RpcRequest,
params: serde_json::Value,
) -> Result {
- let mut stats_updater = StatsUpdater::new(&self.stats);
-
let request_id = self.request_id.fetch_add(1, Ordering::Relaxed);
- let request_json = request.build_request_json(request_id, params).to_string();
+ let request = request.build_request_json(request_id, params);
+ let mut resp = self.do_send_with_retry(request).await?;
+ Self::check_response(&resp)?;
- let mut too_many_requests_retries = 5;
- loop {
- let response = {
- let client = self.client.clone();
- let request_json = request_json.clone();
- client
- .post(&self.url)
- .header(CONTENT_TYPE, "application/json")
- .body(request_json)
- .send()
- .await
- }?;
+ Ok(resp["result"].take())
+ }
- if !response.status().is_success() {
- if response.status() == StatusCode::TOO_MANY_REQUESTS
- && too_many_requests_retries > 0
- {
- let mut duration = Duration::from_millis(500);
- if let Some(retry_after) = response.headers().get(RETRY_AFTER) {
- if let Ok(retry_after) = retry_after.to_str() {
- if let Ok(retry_after) = retry_after.parse::() {
- if retry_after < 120 {
- duration = Duration::from_secs(retry_after);
- }
- }
- }
- }
+ async fn send_batch(
+ &self,
+ requests_and_params: Vec<(RpcRequest, serde_json::Value)>,
+ ) -> Result {
+ let mut batch_request = vec![];
+ for (request_id, req) in requests_and_params.into_iter().enumerate() {
+ batch_request.push(req.0.build_request_json(request_id as u64, req.1));
+ }
- too_many_requests_retries -= 1;
- debug!(
- "Too many requests: server responded with {:?}, {} retries left, pausing for {:?}",
- response, too_many_requests_retries, duration
- );
+ let resp = self
+ .do_send_with_retry(serde_json::Value::Array(batch_request))
+ .await?;
- sleep(duration).await;
- stats_updater.add_rate_limited_time(duration);
- continue;
- }
- return Err(response.error_for_status().unwrap_err().into());
- }
+ Ok(resp)
+ }
- let mut json = response.json::().await?;
- if json["error"].is_object() {
- return match serde_json::from_value::(json["error"].clone()) {
- Ok(rpc_error_object) => {
- let data = match rpc_error_object.code {
- rpc_custom_error::JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE => {
- match serde_json::from_value::(json["error"]["data"].clone()) {
- Ok(data) => RpcResponseErrorData::SendTransactionPreflightFailure(data),
- Err(err) => {
- debug!("Failed to deserialize RpcSimulateTransactionResult: {:?}", err);
- RpcResponseErrorData::Empty
- }
- }
- },
- rpc_custom_error::JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY => {
- match serde_json::from_value::(json["error"]["data"].clone()) {
- Ok(rpc_custom_error::NodeUnhealthyErrorData {num_slots_behind}) => RpcResponseErrorData::NodeUnhealthy {num_slots_behind},
- Err(_err) => {
- RpcResponseErrorData::Empty
- }
- }
- },
- _ => RpcResponseErrorData::Empty
- };
-
- Err(RpcError::RpcResponseError {
- code: rpc_error_object.code,
- message: rpc_error_object.message,
- data,
- }
- .into())
- }
- Err(err) => Err(RpcError::RpcRequestError(format!(
- "Failed to deserialize RPC error response: {} [{}]",
- serde_json::to_string(&json["error"]).unwrap(),
- err
- ))
- .into()),
- };
- }
- return Ok(json["result"].take());
- }
+ fn get_transport_stats(&self) -> RpcTransportStats {
+ self.stats.read().unwrap().clone()
}
fn url(&self) -> String {
diff --git a/client/src/mock_sender.rs b/client/src/mock_sender.rs
index 057dbed5c8..2a26c8c0b4 100644
--- a/client/src/mock_sender.rs
+++ b/client/src/mock_sender.rs
@@ -484,4 +484,11 @@ impl RpcSender for MockSender {
fn url(&self) -> String {
format!("MockSender: {}", self.url)
}
+
+ async fn send_batch(
+ &self,
+ _requests_and_params: Vec<(RpcRequest, serde_json::Value)>,
+ ) -> Result {
+ todo!()
+ }
}
diff --git a/client/src/nonblocking/rpc_client.rs b/client/src/nonblocking/rpc_client.rs
index e47908016f..014d6cf118 100644
--- a/client/src/nonblocking/rpc_client.rs
+++ b/client/src/nonblocking/rpc_client.rs
@@ -37,6 +37,7 @@ use {
},
solana_sdk::{
account::Account,
+ bundle::VersionedBundle,
clock::{Epoch, Slot, UnixTimestamp, DEFAULT_MS_PER_SLOT, MAX_HASH_AGE_IN_SECONDS},
commitment_config::{CommitmentConfig, CommitmentLevel},
epoch_info::EpochInfo,
@@ -45,7 +46,7 @@ use {
hash::Hash,
pubkey::Pubkey,
signature::Signature,
- transaction,
+ transaction::{self, VersionedTransaction},
},
solana_transaction_status::{
EncodedConfirmedBlock, EncodedConfirmedTransactionWithStatusMeta, TransactionStatus,
@@ -960,6 +961,7 @@ impl RpcClient {
code,
message,
data,
+ ..
}) = &err.kind
{
debug!("{} {}", code, message);
@@ -1406,6 +1408,113 @@ impl RpcClient {
.await
}
+ pub async fn batch_simulate_bundle(
+ &self,
+ bundles: &[VersionedBundle],
+ ) -> BatchRpcResult {
+ let configs = bundles
+ .iter()
+ .map(|b| RpcSimulateBundleConfig {
+ simulation_bank: Some(SimulationSlotConfig::Commitment(self.commitment())),
+ pre_execution_accounts_configs: vec![None; b.transactions.len()],
+ post_execution_accounts_configs: vec![None; b.transactions.len()],
+ ..RpcSimulateBundleConfig::default()
+ })
+ .collect::>();
+
+ self.batch_simulate_bundle_with_config(bundles.iter().zip(configs).collect())
+ .await
+ }
+
+ pub async fn batch_simulate_bundle_with_config(
+ &self,
+ bundles_and_configs: Vec<(&VersionedBundle, RpcSimulateBundleConfig)>,
+ ) -> BatchRpcResult {
+ let mut params = vec![];
+ for (bundle, config) in bundles_and_configs {
+ let transaction_encoding = if let Some(encoding) = config.transaction_encoding {
+ encoding
+ } else {
+ self.default_cluster_transaction_encoding().await?
+ };
+
+ let simulation_bank = config.simulation_bank.unwrap_or_default();
+
+ let config = RpcSimulateBundleConfig {
+ transaction_encoding: Some(transaction_encoding),
+ simulation_bank: Some(simulation_bank),
+ ..config
+ };
+
+ let encoded_transactions = bundle
+ .transactions
+ .iter()
+ .map(|tx| serialize_and_encode::(tx, transaction_encoding))
+ .collect::, ClientError>>()?;
+ let rpc_bundle_request = RpcBundleRequest {
+ encoded_transactions,
+ };
+
+ params.push(json!([rpc_bundle_request, config]));
+ }
+
+ let requests_and_params = vec![RpcRequest::SimulateBundle; params.len()]
+ .into_iter()
+ .zip(params)
+ .collect();
+ self.send_batch(requests_and_params).await
+ }
+
+ pub async fn simulate_bundle(
+ &self,
+ bundle: &VersionedBundle,
+ ) -> RpcResult {
+ self.simulate_bundle_with_config(
+ bundle,
+ RpcSimulateBundleConfig {
+ simulation_bank: Some(SimulationSlotConfig::Commitment(self.commitment())),
+ pre_execution_accounts_configs: vec![None; bundle.transactions.len()],
+ post_execution_accounts_configs: vec![None; bundle.transactions.len()],
+ ..RpcSimulateBundleConfig::default()
+ },
+ )
+ .await
+ }
+
+ pub async fn simulate_bundle_with_config(
+ &self,
+ bundle: &VersionedBundle,
+ config: RpcSimulateBundleConfig,
+ ) -> RpcResult {
+ let transaction_encoding = if let Some(enc) = config.transaction_encoding {
+ enc
+ } else {
+ self.default_cluster_transaction_encoding().await?
+ };
+ let simulation_bank = Some(config.simulation_bank.unwrap_or_default());
+
+ let encoded_transactions = bundle
+ .transactions
+ .iter()
+ .map(|tx| serialize_and_encode::(tx, transaction_encoding))
+ .collect::>>()?;
+ let rpc_bundle_request = RpcBundleRequest {
+ encoded_transactions,
+ };
+
+ let config = RpcSimulateBundleConfig {
+ transaction_encoding: Some(transaction_encoding),
+ simulation_bank,
+ ..config
+ };
+
+ self.send(
+ RpcRequest::SimulateBundle,
+ json!([rpc_bundle_request, config]),
+ )
+ .await
+ }
+
/// Returns the highest slot information that the node has snapshots for.
///
/// This will find the highest full snapshot slot, and the highest incremental snapshot slot
@@ -5455,6 +5564,22 @@ impl RpcClient {
.map_err(|err| ClientError::new_with_request(err.into(), request))
}
+ pub async fn send_batch(
+ &self,
+ requests_and_params: Vec<(RpcRequest, Value)>,
+ ) -> ClientResult
+ where
+ T: serde::de::DeserializeOwned,
+ {
+ let response = self.sender.send_batch(requests_and_params).await?;
+ debug!("response: {:?}", response);
+
+ serde_json::from_value(response).map_err(|err| ClientError {
+ request: None,
+ kind: err.into(),
+ })
+ }
+
pub fn get_transport_stats(&self) -> RpcTransportStats {
self.sender.get_transport_stats()
}
diff --git a/client/src/rpc_client.rs b/client/src/rpc_client.rs
index bac070ce6f..d2efc9ad1e 100644
--- a/client/src/rpc_client.rs
+++ b/client/src/rpc_client.rs
@@ -28,6 +28,7 @@ use {
},
solana_sdk::{
account::Account,
+ bundle::VersionedBundle,
clock::{Epoch, Slot, UnixTimestamp},
commitment_config::CommitmentConfig,
epoch_info::EpochInfo,
@@ -1151,6 +1152,35 @@ impl RpcClient {
)
}
+ pub fn batch_simulate_bundle(
+ &self,
+ bundles: &[VersionedBundle],
+ ) -> BatchRpcResult {
+ self.invoke(self.rpc_client.batch_simulate_bundle(bundles))
+ }
+
+ pub fn batch_simulate_bundle_with_config(
+ &self,
+ bundles_and_configs: Vec<(&VersionedBundle, RpcSimulateBundleConfig)>,
+ ) -> BatchRpcResult {
+ self.invoke(
+ self.rpc_client
+ .batch_simulate_bundle_with_config(bundles_and_configs),
+ )
+ }
+
+ pub fn simulate_bundle(&self, bundle: &VersionedBundle) -> RpcResult {
+ self.invoke(self.rpc_client.simulate_bundle(bundle))
+ }
+
+ pub fn simulate_bundle_with_config(
+ &self,
+ bundle: &VersionedBundle,
+ config: RpcSimulateBundleConfig,
+ ) -> RpcResult {
+ self.invoke(self.rpc_client.simulate_bundle_with_config(bundle, config))
+ }
+
/// Returns the highest slot information that the node has snapshots for.
///
/// This will find the highest full snapshot slot, and the highest incremental snapshot slot
diff --git a/client/src/rpc_config.rs b/client/src/rpc_config.rs
index d5bc986a21..8877a789cb 100644
--- a/client/src/rpc_config.rs
+++ b/client/src/rpc_config.rs
@@ -46,7 +46,57 @@ pub struct RpcSimulateTransactionConfig {
pub min_context_slot: Option,
}
-#[derive(Debug, Default, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Serialize, Deserialize, Clone, Copy, Debug, Eq, PartialEq)]
+#[serde(rename_all = "camelCase")]
+pub enum SimulationSlotConfig {
+ /// Simulate on top of bank with the provided commitment.
+ Commitment(CommitmentConfig),
+
+ /// Simulate on the provided slot's bank.
+ Slot(Slot),
+
+ /// Simulates on top of the RPC's highest slot's bank i.e. the working bank.
+ Tip,
+}
+
+impl Default for SimulationSlotConfig {
+ fn default() -> Self {
+ Self::Commitment(CommitmentConfig {
+ commitment: CommitmentLevel::Confirmed,
+ })
+ }
+}
+
+#[derive(Debug, PartialEq, Default, Eq, Clone, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct RpcBundleRequest {
+ pub encoded_transactions: Vec,
+}
+
+#[derive(Debug, Default, Clone, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct RpcSimulateBundleConfig {
+ /// Gives the state of accounts pre/post transaction execution.
+ /// The length of each of these must be equal to the number transactions.
+ pub pre_execution_accounts_configs: Vec