-
Notifications
You must be signed in to change notification settings - Fork 285
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
RLP decoding #687
base: master
Are you sure you want to change the base?
RLP decoding #687
Conversation
rodiazet
commented
Aug 16, 2023
- Implement RLP decoding for basic types
- Use it to implement Transaction decoding.
- Add unit tests
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #687 +/- ##
==========================================
+ Coverage 97.60% 97.69% +0.09%
==========================================
Files 95 96 +1
Lines 8645 8985 +340
==========================================
+ Hits 8438 8778 +340
Misses 207 207
Flags with carried forward coverage won't be shown. Click here to find out more.
|
ec92650
to
d5dfe89
Compare
test/state/rlp.hpp
Outdated
@@ -119,4 +121,116 @@ inline bytes internal::encode_container(InputIterator begin, InputIterator end) | |||
content += encode(*it); | |||
return wrap_list(content); | |||
} | |||
|
|||
// Load unsigned integral from bytes_view. The destination size must not me smaller than input data. |
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.
// Load unsigned integral from bytes_view. The destination size must not me smaller than input data. | |
// Load unsigned integral from bytes_view. The destination size must not be smaller than input data. |
Put this comment above load()
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.
done
d5dfe89
to
15745e0
Compare
test/state/state.hpp
Outdated
@@ -127,7 +127,7 @@ struct Transaction | |||
|
|||
Type type = Type::legacy; | |||
bytes data; | |||
int64_t gas_limit; | |||
int64_t gas_limit{}; |
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.
int64_t gas_limit{}; | |
int64_t gas_limit = 0; |
to be consistent with initializations below
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.
done
test/state/rlp.cpp
Outdated
@@ -0,0 +1,90 @@ | |||
// evmone: Fast Ethereum Virtual Machine implementation | |||
// Copyright 2021 The evmone Authors. |
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.
// Copyright 2021 The evmone Authors. | |
// Copyright 2023 The evmone Authors. |
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.
done
15745e0
to
3a8a2ff
Compare
3a8a2ff
to
0045be6
Compare