ethereumjs-monorepo icon indicating copy to clipboard operation
ethereumjs-monorepo copied to clipboard

client: tests for getTrieNodes and trieNodes SNAP messages

Open am1r021 opened this issue 3 years ago • 1 comments

This PR adds tests for the getTrieNodes and trieNodes SNAP messages. Real data is captured and used for tests.

am1r021 avatar Sep 14 '22 00:09 am1r021

Codecov Report

Merging #2282 (f70702c) into master (8910fe2) will increase coverage by 1.79%. The diff coverage is 96.51%.

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block 90.41% <ø> (ø)
blockchain 90.40% <ø> (ø)
client 87.06% <100.00%> (+0.11%) :arrow_up:
common 95.74% <ø> (ø)
devp2p 91.84% <ø> (+0.05%) :arrow_up:
ethash ∅ <ø> (∅)
evm ?
rlp ∅ <ø> (∅)
statemanager 89.61% <ø> (?)
trie 90.36% <ø> (ø)
tx 94.33% <ø> (ø)
util 85.07% <96.47%> (+0.56%) :arrow_up:
vm 84.54% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

codecov[bot] avatar Sep 14 '22 00:09 codecov[bot]

Just to note: CI tests are partly failing for this PR.

holgerd77 avatar Sep 26 '22 11:09 holgerd77

I am not sure what to make of the karma browser test failures. It seems to be complaining about a dist file. @acolytec3 are these karma errors a known issue?

am1r021 avatar Sep 30 '22 01:09 am1r021

I am not sure what to make of the karma browser test failures. It seems to be complaining about a dist file. @acolytec3 are these karma errors a known issue?

I'll take a look in the morning. Karma can be tricky

acolytec3 avatar Sep 30 '22 02:09 acolytec3

I am not sure what to make of the karma browser test failures. It seems to be complaining about a dist file. @acolytec3 are these karma errors a known issue?

I'll take a look in the morning. Karma can be tricky

Fixed. We had a missing configuration option for karma. Tests are passing locally now.

acolytec3 avatar Oct 01 '22 00:10 acolytec3

Great work! I have some questions. Do you also have an URL to this compact encoding somewhere?

Thanks! I wasn't able to find much on compact encoding. There is some mention of it here, and the code was ported from geth's trie/encoding.go.

am1r021 avatar Oct 22 '22 00:10 am1r021