-
Notifications
You must be signed in to change notification settings - Fork 624
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
feat: Opt-in index reduction for Validator nodes #10748
base: master
Are you sure you want to change the base?
Conversation
I've verified that these indexes are not used in any validator processes. Additionally, the validator has been running successfully on the testnet for several days. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #10748 +/- ##
==========================================
- Coverage 71.65% 71.62% -0.04%
==========================================
Files 758 758
Lines 152705 152771 +66
Branches 152705 152771 +66
==========================================
- Hits 109425 109421 -4
- Misses 38308 38380 +72
+ Partials 4972 4970 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Hey @valar999, thanks for this submission! It's a cool idea indeed. I'm a bit busy right now but I'll try to find a good reviewer for this PR.
|
@wacban I will review this PR also, and ask for more support if needed |
I have only testnet data:
At least DBCol::Transactions should be garbage collected. The RPC node will reply with a "not found" error anyway.
I think there's also no problem here. The node simply won't write data for some time, which isn't permanent anyway.
Agree, I'll try to commit it tomorrow.
I believe it is. But I'm not sure exactly when and how. I haven't delved deeply into this. |
Hey @valar999. Just a ping to see if you managed to get to this work yet. |
Sorry for the huge delay in review. So, additionally to this, I would like to:
I don't know how this change will affect network communication, and sync of other nodes. I want to be sure that if all peers of some node enable this option, the node can still sync if it fell behind. I will look deeper into that. Finally, not a concern, but some stats for these columns. In our fleet the average size of |
One thing that's hard to have noticed is that this actually won't play well with the current implementation of the "tx" RPC method. You would expect that if you're running a validator with this option, you'd get some sort of nearcore/chain/jsonrpc/src/lib.rs Line 616 in 8954a36
maybe @telezhnaya might have an idea of how to fix that in this PR? |
In order to reduce the number of indexes stored in the database (Issue #10357), we are adding the "--validator-minimal-store" flag, which tells the node to store only the data necessary for the operation of a validator node.
Currently, three indexes listed in the issue are not being written: DBCol::Transactions, DBCol::Receipts, DBCol::TransactionResultForBlock.