-
Notifications
You must be signed in to change notification settings - Fork 331
MTP: Extension node is a lie! #703
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #703 +/- ##
=======================================
Coverage 94.29% 94.29%
=======================================
Files 143 143
Lines 16145 16110 -35
=======================================
- Hits 15224 15191 -33
+ Misses 921 919 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
fcb7222 to
75ec69a
Compare
65c369a to
c4e9edf
Compare
c4e9edf to
6004d73
Compare
42f8279 to
ce0bca3
Compare
b4727c9 to
f6bd4c1
Compare
11af3f5 to
60c37ca
Compare
|
After extracting refactoring to #751, this is finally ready for review. |
e7601b2 to
2314743
Compare
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.
Pull Request Overview
This PR simplifies the Merkle Patricia Trie (MPT) implementation by removing the explicit extended node type and treating branch nodes as having potentially non-empty extended paths instead.
- Removes the
extenum value from theKindenum, changing it fromuint8_ttobool - Eliminates extended node creation methods and simplifies branch node construction
- Refactors the encoding logic to handle extended paths within branch nodes
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #703 +/- ##
==========================================
- Coverage 87.15% 87.14% -0.01%
==========================================
Files 167 167
Lines 24751 24701 -50
Branches 4068 4063 -5
==========================================
- Hits 21571 21525 -46
+ Misses 541 538 -3
+ Partials 2639 2638 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Notice that the formally specified extended node in the Merkle Patricia Trie always leads to a branch node. Therefore, we can treat branch nodes as having potentially non-empty "extended path" and remove the explicit extended node kind. This significantly simplifies the implementation.
MPT: Remove explicit extended node kind
Notice that the formally specified extended node in
the Merkle Patricia Trie always leads to a branch node.
Therefore, we can treat branch nodes as having potentially non-empty
"extended path" and remove the explicit extended node kind.
This significantly simplifies the implementation.