-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
parity-common triehash still.
indentation Co-Authored-By: cheme <[email protected]>
with simple_codec changes
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.
Looks good, minor style nits.
Use better namings.
Co-Authored-By: Andronik Ordian <[email protected]>
Co-Authored-By: Andronik Ordian <[email protected]>
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.
minor grumbles and questions
if r.is_data() && r.size() == KeccakHasher::LENGTH { | ||
Some(r.as_val().expect("Hash is the correct size; qed")) | ||
|
||
if data.len() == KeccakHasher::LENGTH { |
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.
How come we don't need to check that data
is rlp data anymore? Was that check unneeded before maybe?
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.
That is a change from upstream trie crate, the try_decode_hash
is using directly the hash data, and we skip the header in decode
function at
nodes[i] = Some(&value.as_raw()[1..]);
. (I will change this line, writing this comment make me realize there is a cleanest way of doing this and without the implied malleability from skipping a byte).
The change is related to the fact that when trie uses this payload as an encoded children (try_decode_hash
return none) trie code previously need to manage this byte.
So now this is done in decode
. Thinking again that is not ideal and it would have been more direct to return either a hash or a new smaller slice from try_decode
function.
Which is not perfect either (if the type of children could be encoded heading byte for instance).
Better comments and formatting.
Co-Authored-By: David <[email protected]>
Co-Authored-By: David <[email protected]>
* master: [evmbin] fix compilation (#10976) Update to latest trie version. (#10972) [blooms-db] Fix benchmarks (#10974) Fix ethcore/benches build. (#10964) tx-pool: accept local tx with higher gas price when pool full (#10901) Disable unsyncable expanse chain (#10926) Extract Machine from ethcore (#10949) removed redundant state_root function from spec, improve spec error types (#10955) Add support for Energy Web Foundation's new chains (#10957) [evmbin] add more tests to main.rs (#10956) Fix compiler warnings in util/io and upgrade to edition 2018 Upgrade mio to latest (#10953) unify loading spec && further spec cleanups (#10948) refactor: Refactor evmbin CLI (#10742) journaldb changes (#10929) Allow default block parameter to be blockHash (#10932) Enable sealing when engine is ready (#10938) Fix some warnings and typos. (#10941) Updated [email protected] key (#10939) Change the return type of step_inner function. (#10940)
* master: Verify transaction against its block during import (#10954) [evmbin] fix compilation (#10976) Update to latest trie version. (#10972) [blooms-db] Fix benchmarks (#10974) Fix ethcore/benches build. (#10964) tx-pool: accept local tx with higher gas price when pool full (#10901) Disable unsyncable expanse chain (#10926)
* master: Extract the Engine trait (#10958) Better error message for rpc gas price errors (#10931) [.gitlab.yml] cargo check ethcore benches (#10965) Verify transaction against its block during import (#10954) [evmbin] fix compilation (#10976) Update to latest trie version. (#10972) [blooms-db] Fix benchmarks (#10974) Fix ethcore/benches build. (#10964) tx-pool: accept local tx with higher gas price when pool full (#10901) Disable unsyncable expanse chain (#10926)
This PR update to latest trie crates (and parity-util-mem 0.2).
Those crates introduces some changes in codec: