-
Notifications
You must be signed in to change notification settings - Fork 10
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
Gateway crashes while bootstrapping from out of sync AN #488
Comments
At this point I don't think EVM GW should communicate with ANs that are not synced. The problem you are experiencing is that the account you set as the COA is not found and this makes gateway panic. I don't think it's beneficial for GW to handle such case gracefully or retry, it will just add complexity. Please correct me if I'm wrong but I don't see a benefit in real-world usage that GW communicates with out-of-sync AN. |
it seems that it panics when it fails to get an account from the AN, because the AN has not yet indexed the data. It's definitely possible for an AN to fall behind on indexing, or be restarted. Are you saying that this panic only happens in the case when node's COA has not yet been loaded? If the GW requires that the AN is fully synced with the network before starting, I think that should be explicitly stated somewhere in the setup docs since I think a common usecase will be to run the GW with a local AN. |
The error is coming from this check right here: https://github.com/onflow/flow-evm-gateway/blob/main/services/requester/requester.go#L130-L137. This might be because the AN has not yet indexed the latest data, or it can simply be because of a wrong Flow address provided in the corresponding bootstrap flag. |
It does not have to be strictly fully synced with the network before starting, but in order to be operational, it should be synced to the block height where the configured COA is created. For |
OK. I'll leave it up to you what should or doesn't need to be documented. I know the GW is still in development and may have some rough edges. This came up when I was testing the setup and was non-obvious what went wrong and what I should do to resolve it. |
We'll certainly add dedicated sections to the README, including the specific block height at which |
I believe the pr #500 improves this problem, so the only remaining thing is to add to the documentation. |
Problem
I am testing the process for running a gateway with a local dedicated access node. When starting the gateway while the Access node is still catching up with the network, it syncs up until the AN's latest indexed block, the panics.
Here's the log output from the GW from my testing
It appears that what's happening is the first request to the AN for a block that it has not indexed is forwarded to an execution node. However, since the AN is behind, the EN has already pruned data for this block, resulting in an
OutOfRange
response code. The gateway then panics.In this case, I think the gateway should pause and retry.
The text was updated successfully, but these errors were encountered: