-
Notifications
You must be signed in to change notification settings - Fork 36
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
core, eth: rework snap sync #564
core, eth: rework snap sync #564
Conversation
The reason behind why we changed from paths to keys and hexpath to path
The keys []byte will convert to hex format nibbles via this function
|
} | ||
|
||
// NodeSyncResult is a response with requested trie node along with its node path. | ||
type NodeSyncResult struct { |
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.
split request logic into node and code, same with SyncResult
|
||
if _, present := codeTasks[hash]; present { | ||
err := s.sched.ProcessCode(trie.CodeSyncResult{ | ||
Hash: hash, |
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.
In the previous logic.
err := s.sched.Process(res)
They will forward res to Process function , in the new logic, we need to split into handle either ProcessCode or ProcessNode. Could u explain a little the condition check here for choosing which kind of processing in sched.
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.
Since the requests list is also now divided into nodeReqs
and codeReqs
, we use ProcessNode
for each request taking from nodeReqs
and ProcessCode
for each request taking from codeReqs
core, eth, les, trie: rework snap sync
e65dbfa
to
1db21d8
Compare
LGTM, let merge and retest again |
1b91fce
into
axieinfinity:path-base-implementing
core, eth, les, trie: rework snap sync Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
core, eth, les, trie: rework snap sync Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
core, eth, les, trie: rework snap sync Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
core, eth, les, trie: rework snap sync Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
Reference: ethereum/go-ethereum#24898