-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Add CellDep and change OutPoint data structure #1356
refactor: Add CellDep and change OutPoint data structure #1356
Conversation
@zhangsoledad is assigned as the chief reviewer |
a994829
to
777c071
Compare
777c071
to
1c1fde2
Compare
The Dep in SourceEntry should rename to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Dep in SourceEntry should rename to
CellDep
and Header should be namedHeaderDep
What about DepCell
and DepHeader
?
Would be inconsistent with |
So ...... Why not rename to |
Because they are dependencies, and we just talked about it. |
96fd217
to
fbbf2cc
Compare
fbbf2cc
to
937d793
Compare
BREAKING CHANGE: core data structure CellDep/OutPoint/CellInput/Transaction changed
BREAKING CHANGE: Transaction/OutPoint data structure changed
BREAKING CHANGE: Protocol schema changed
BREAKING CHANGE: schema changed
BREAKING CHANGE: OutPoint/Transaction data structure changed
BREAKING CHANGE: Transaction structure changed
937d793
to
7a6fb0b
Compare
The PR description is out dated. |
Updated |
bors r+ |
1356: refactor: Add CellDep and change OutPoint data structure r=TheWaWaR a=TheWaWaR 1. Add a new `CellDep` data structure, and changed `Transaction`: ``` rust // For support dep group pub struct CellDep { out_point: OutPoint, is_dep_group: bool, } // deps changed to cell_deps and header_deps pub struct Transaction { // ... cell_deps: Vec<CellDep>, header_deps: Vec<H256>, // ... } ``` 2. `OutPoint` data structure renamed from origin `CellOutPoint`. 3. `HeaderProvider` changed to `HeaderChecker` because header now lazy loaded. 4. `SourceEntry` rename `Dep` to `CellDep` and add a new variant `CellHeader`, you can load `CellHeader` from `deps.headers` by index in VM. ``` rust enum SourceEntry { Input, Output, // Cell dep CellDep, // Header dep CellHeader, } ``` Co-authored-by: Linfeng Qian <[email protected]> Co-authored-by: Qian Linfeng <[email protected]>
Build failed
|
CellDep
data structure, and changedTransaction
:OutPoint
data structure renamed from originCellOutPoint
.HeaderProvider
changed toHeaderChecker
because header now lazy loaded.SourceEntry
renameDep
toCellDep
and add a new variantCellHeader
, you can loadCellHeader
fromdeps.headers
by index in VM.