This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
allow try-runtime and
TestExternalities
to report PoV size #10372allow try-runtime and
TestExternalities
to report PoV size #10372Changes from 10 commits
95aba94
4248638
af6f451
156e63d
ca861bb
f6b6138
15966b6
8b8cc18
4db4c6d
5553bee
4fdc3dc
8d9cbb0
e9daa29
c572b84
0e1fa18
c519d98
ee94f32
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
I tried to make this test such that I would make two
ext
s with the same initial data, read 1 key from one and 3 keys from the other one, and expect the proof of the latter to be bigger than the former, but this failed. Any idea why @cheme?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.
If values are small, they can be encoded in a same node (inline encoding) and the proof will be the same length.
Using values of length 32 or more is better for testing this kind of things.
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.
Sounds like a bad test.
Convert the proof back to a db and check that it contains the expected values.
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 backing memory db contains the same data trie nodes of
proof
, and thei hash, not sure what is there to check. If you want me to improve the test, doing in on theproof
itself is enough.I am looking into checking the proof itself, but it sounds a bit like an overkill. It is not the scope of this test to make sure the proof recorded is doing its job well, just that something is recorded.
Inserting large values (32+ bytes) does help indeed.
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.
looking a bit into example code, I presume making sure that the proof (as memory-db or as-is) contains the root is a reasonable check to do, aka using
create_proof_check_backend
.