From 52cd9fc6b7c9eed34939589b2605272fac4e539d Mon Sep 17 00:00:00 2001 From: segfaultdoctor <17258903+segfaultdoc@users.noreply.github.com> Date: Fri, 18 Nov 2022 12:55:22 -0500 Subject: [PATCH] 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 --- .gitmodules | 3 --- client/src/http_sender.rs | 5 ++--- dev/Dockerfile | 5 +---- scripts/increment-cargo-version.sh | 1 - solana-accountsdb-connector | 1 - tip-distributor/src/stake_meta_generator_workflow.rs | 5 +++++ 6 files changed, 8 insertions(+), 12 deletions(-) delete mode 160000 solana-accountsdb-connector diff --git a/.gitmodules b/.gitmodules index 7fc0c2809d..e31fc7fccd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,6 +7,3 @@ [submodule "jito-protos/protos"] path = jito-protos/protos url = https://github.com/jito-labs/mev-protos.git -[submodule "solana-accountsdb-connector"] - path = solana-accountsdb-connector - url = https://github.com/jito-foundation/solana-accountsdb-connector.git diff --git a/client/src/http_sender.rs b/client/src/http_sender.rs index 04a8be30fd..c732208c1a 100644 --- a/client/src/http_sender.rs +++ b/client/src/http_sender.rs @@ -232,9 +232,8 @@ impl RpcSender for HttpSender { requests_and_params: Vec<(RpcRequest, serde_json::Value)>, ) -> Result { let mut batch_request = vec![]; - for (rpc_req, params) in requests_and_params { - let request_id = self.request_id.fetch_add(1, Ordering::Relaxed); - batch_request.push(rpc_req.build_request_json(request_id, params)); + 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)); } let resp = self diff --git a/dev/Dockerfile b/dev/Dockerfile index 0f3c3e38f8..ffb6a85f0f 100644 --- a/dev/Dockerfile +++ b/dev/Dockerfile @@ -38,7 +38,4 @@ ENV CI_COMMIT=$ci_commit RUN --mount=type=cache,mode=0777,target=/solana/target \ --mount=type=cache,mode=0777,target=/usr/local/cargo/registry \ --mount=type=cache,mode=0777,target=/usr/local/cargo/git \ - cargo build --release && cp target/release/solana* ./docker-output && \ - cargo build --release --manifest-path solana-accountsdb-connector/Cargo.toml && \ - cp solana-accountsdb-connector/target/release/libsolana* ./docker-output - + cargo build --release && cp target/release/solana* ./docker-output diff --git a/scripts/increment-cargo-version.sh b/scripts/increment-cargo-version.sh index c354b5d023..a4bcfa5918 100755 --- a/scripts/increment-cargo-version.sh +++ b/scripts/increment-cargo-version.sh @@ -26,7 +26,6 @@ ignores=( node_modules jito-programs anchor - solana-accountsdb-connector ) not_paths=() diff --git a/solana-accountsdb-connector b/solana-accountsdb-connector deleted file mode 160000 index f824355c32..0000000000 --- a/solana-accountsdb-connector +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f824355c3212e610ee06b82c7c7c442e1eb978f1 diff --git a/tip-distributor/src/stake_meta_generator_workflow.rs b/tip-distributor/src/stake_meta_generator_workflow.rs index 4405597b71..6e6beb3a8a 100644 --- a/tip-distributor/src/stake_meta_generator_workflow.rs +++ b/tip-distributor/src/stake_meta_generator_workflow.rs @@ -573,12 +573,15 @@ mod tests { bank.epoch(), ); + let expires_at = bank.epoch() + 3; + let tda_0 = TipDistributionAccount { validator_vote_account: validator_keypairs_0.vote_keypair.pubkey(), merkle_root_upload_authority, merkle_root: None, epoch_created_at: bank.epoch(), validator_commission_bps: 50, + expires_at, bump: tip_distribution_account_0.1, }; let tda_1 = TipDistributionAccount { @@ -587,6 +590,7 @@ mod tests { merkle_root: None, epoch_created_at: bank.epoch(), validator_commission_bps: 500, + expires_at: 0, bump: tip_distribution_account_1.1, }; let tda_2 = TipDistributionAccount { @@ -595,6 +599,7 @@ mod tests { merkle_root: None, epoch_created_at: bank.epoch(), validator_commission_bps: 75, + expires_at: 0, bump: tip_distribution_account_2.1, };