-
Notifications
You must be signed in to change notification settings - Fork 73
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
optimize extrinsics decoding and storage indexing #462
optimize extrinsics decoding and storage indexing #462
Conversation
xcaptain
commented
Apr 29, 2022
•
edited
Loading
edited
- Ignore extrinsics decoding errors and move forward rather than abort and retry.
- Index storage in ascending order and with a fixed limit(1000) to avoid too many blocks not in storage table.
- Construct wasm executor from runtime configs rather than hard-coded values.
This looks good to me, some simple and effective changes |
Added a small improvement, please take a look again. |
I think you'll need to run/resolve |
The new commit may fix the CI error. The reason is in previous commits I changed behavior of |
Shouldn't add the `block_num >= (select max(block_num) ...)` condition in the previous commits, in some situations `extrinsics` and `storage` table may not increase in ascending order
LGTM. I would just make sure that if archive stops unexpectedly or is stopped, then we don't miss any storage blocks since we specify that we restore at MAX(block_num). As long as we always have contiguous blocks in |
@insipx I'm currently using with the I don't know how to simulate the scene, it just occurred to me that adding this condition won't give us too much benefit but may introduce potential problems. |
If you're running with only one storage indexer than I believe you are correct. If a later block finishes execution before an earlier block and is inserted first, then a gap is created which |