-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Etcm 139 incomplete data errors during fast sync #748
Conversation
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 comments only
.getOrElse(Account.empty(blockchainConfig.accountStartNonce)) | ||
) | ||
} | ||
}.recover { case _: MissingNodeException => |
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.
When we could get MissingNodeException
?
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.
Mainly during fast-sync.
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.
It could happen during regular one if state node is lost along the way, but it's much less probable while during fast-sync it is sure that such error happens.
private def withAccount[T](address: Address, blockParam: BlockParam)(f: Account => T): ServiceResponse[T] = | ||
Future { | ||
resolveBlock(blockParam).map { case ResolvedBlock(block, _) => | ||
f( |
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: I would like to name this function toResponse
or sth similar and reformat the code to
val account = blockchain
.getAccount(address, block.header.number)
.getOrElse(Account.empty(blockchainConfig.accountStartNonce))
toResponse(account)
it is a little bit more readable
3aff6e9
to
e8201e1
Compare
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.
LGTM 👍
e8201e1
to
b3165d2
Compare
126018c
to
ba8f975
Compare
…eing so unhelpful there
ba8f975
to
75c74ce
Compare
Description
Report custom eth error "100 missing data" when getting data from account
Proposed Solution
implementation of https://eth.wiki/json-rpc/json-rpc-error-codes-improvement-proposal (at least in account-touching methods)
Important Changes Introduced
Reorganized a bit json serialization. Due to nasty error I run into at some point (json4s and its formats <3) I wanted to plug Encoder-based serialization into rpc servers, due to multiple issues I stopped that and got into working state
Testing
Call methods like
eth_getBalance
during fast-sync - it should return error with additional information that state node is missing