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

Remove transaction encoding from storage layer #12404

Merged
merged 1 commit into from
Sep 24, 2020

Conversation

jstarry
Copy link
Contributor

@jstarry jstarry commented Sep 23, 2020

Problem

Transaction encoding is done in the storage layer (bigtable / blockstore) when it really only needs to be done at the api layer (RPC). The current implementation couples the storage types with "UI"/"Encoded" types which adds extra data conversion overhead that isn't necessary. It also does unnecessary transaction serialization

Context: This makes it easier to separate API invoked instruction types from storage invoked instruction types here: #12311

Summary of Changes

  • Introduce new Encoded.. flavors of ConfirmedBlock, ConfirmedTransaction, etc.
  • Remove all encoding logic from blockstore and bigtable libraries

Fixes #

@jstarry jstarry force-pushed the bigtable-confirmed-block branch from d90fd1b to 62bcdaa Compare September 23, 2020 03:26
@jstarry jstarry force-pushed the bigtable-confirmed-block branch from 62bcdaa to 7d6710e Compare September 23, 2020 03:48
@codecov
Copy link

codecov bot commented Sep 23, 2020

Codecov Report

Merging #12404 into master will decrease coverage by 0.0%.
The diff coverage is 58.0%.

@@            Coverage Diff            @@
##           master   #12404     +/-   ##
=========================================
- Coverage    82.2%    82.2%   -0.1%     
=========================================
  Files         346      346             
  Lines       81481    81463     -18     
=========================================
- Hits        67016    66991     -25     
- Misses      14465    14472      +7     

@jstarry jstarry requested a review from mvines September 23, 2020 05:25
@jstarry
Copy link
Contributor Author

jstarry commented Sep 23, 2020

Adding backports since this is a prereq for surfacing CPI's

Copy link
Contributor

@mvines mvines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks much cleaner, thanks!

@jstarry jstarry merged commit 731a943 into solana-labs:master Sep 24, 2020
@jstarry jstarry deleted the bigtable-confirmed-block branch September 24, 2020 05:10
mergify bot pushed a commit that referenced this pull request Sep 24, 2020
(cherry picked from commit 731a943)

# Conflicts:
#	ledger-tool/src/bigtable.rs
#	ledger/src/blockstore.rs
mergify bot pushed a commit that referenced this pull request Sep 24, 2020
(cherry picked from commit 731a943)

# Conflicts:
#	ledger-tool/src/bigtable.rs
jstarry added a commit that referenced this pull request Sep 24, 2020
jstarry added a commit that referenced this pull request Sep 24, 2020
@jstarry
Copy link
Contributor Author

jstarry commented Sep 24, 2020

skipped the v1.2 backport

mergify bot added a commit that referenced this pull request Sep 24, 2020
* Remove transaction encoding from storage layer (#12404)

(cherry picked from commit 731a943)

* Bump

Co-authored-by: Justin Starry <justin@solana.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.

2 participants