Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Add SyncClient trait and Bank implementation#3501

Closed
garious wants to merge 2 commits into
solana-labs:masterfrom
garious:add-sync-client
Closed

Add SyncClient trait and Bank implementation#3501
garious wants to merge 2 commits into
solana-labs:masterfrom
garious:add-sync-client

Conversation

@garious
Copy link
Copy Markdown
Contributor

@garious garious commented Mar 26, 2019

Problem

It's tricky to jump between solana_runtime and testnet. BankClient consumes keypairs, which is constraining and inconsistent with the other clients.

Summary of Changes

Introduce a SyncClient trait instead of wrapping Bank/Keypairs and implement that trait with Bank. The role of a SyncClient would be to update the transaction's blockhash, sign it, and resend as needed.

TODO:

  • Attempt to replace uses of BankClient with this and see if this is better
  • Replace all instances of BankClient
  • Make Message pub
  • Whittle down SyncClient to just send_message()
  • Wrap TransactionError with a new TransportError type
  • Move the trait definition into the SDK

Fixes #3058

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 26, 2019

Codecov Report

Merging #3501 into master will increase coverage by <.1%.
The diff coverage is 89.4%.

@@           Coverage Diff            @@
##           master   #3501     +/-   ##
========================================
+ Coverage    79.3%   79.3%   +<.1%     
========================================
  Files         151     152      +1     
  Lines       24179   24212     +33     
========================================
+ Hits        19187   19216     +29     
- Misses       4992    4996      +4

@garious garious force-pushed the add-sync-client branch 2 times, most recently from 2423b0e to dc6c88e Compare March 26, 2019 17:27
@garious
Copy link
Copy Markdown
Contributor Author

garious commented Mar 26, 2019

Wrong approach, back soon

@garious garious closed this Mar 26, 2019
brooksprumo pushed a commit to brooksprumo/solana that referenced this pull request Nov 14, 2024
…bs#3501)

* Store epoch in MaxAge (solana-labs#3485)

(cherry picked from commit 5a6f518)

# Conflicts:
#	core/src/banking_stage/consumer.rs
#	core/src/banking_stage/scheduler_messages.rs
#	core/src/banking_stage/transaction_scheduler/transaction_state.rs
#	core/src/banking_stage/transaction_scheduler/transaction_state_container.rs

* resolve conflicts

---------

Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant