-
Notifications
You must be signed in to change notification settings - Fork 104
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
Remove usages of CoreDb in Fluffy. #2152
Conversation
Note that I also reviewed the usage of CoreDb in the test_state_network test but I don't yet understand the details of that test. I'll update it if possible once I've implemented more of the state network code and have a better understanding. |
Yeah that's a very old test where a JSON genesis file is read and a trie is created from that. Next all the trie nodes are stored in the database and then some retrieval test is done. Here too that CoreDb could be replaced, but it is fine to do it in an iteration where you look into the tests. This type of test that starts from this genesis file is however pretty useful as first starting point to start testing the state network I think. |
@@ -11,7 +11,7 @@ import | |||
stew/results, | |||
chronos, | |||
chronicles, | |||
eth/[common/eth_types_rlp, rlp], | |||
eth/[common/eth_types_rlp, rlp, trie, trie/db], |
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.
Can remove the db/core_db
import lower?
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.
Yes, will do. Thanks
@@ -41,7 +41,7 @@ import | |||
chronicles, | |||
chronos, | |||
confutils, | |||
eth/[keys, rlp], | |||
eth/[keys, rlp, trie, trie/db], |
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.
Can remove the ../../nimbus/db/core_db,
import lower?
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.
Yes, will do.
I ran into some issues when I tried to update the test. I updated the
and I'm getting this error:
Basically the test breaks when I try to update it to use a trie state generated directly from the json file. No idea why this is effecting the decoding. |
Considering that we don't need the complexity of CoreDb and will likely never need the CoreDb aristo implemention in Fluffy, lets keep it simple and use the HexaryTrie implementation when doing in memory merkle root calculations.