[ConfigManager] Register Node Sections 3/4 - #3994
Draft
bdchatham wants to merge 2 commits into
Draft
Conversation
State sync, the transaction index, instrumentation, the signing key paths and self remediation. That is every table in the node's own configuration file. The transaction index varies by node kind: a node that serves queries indexes transactions so it can answer them, and a validator and a seed serve none, so they index nothing and keep the write. State sync leaves one path out. The servers to fetch a snapshot from are the operator's own peers, so there is no value to inherit, and an address written here would name a host this binary cannot know about. A test now walks the section names this package owns rather than a list kept beside them, so the next section is covered by registering it. Another asserts the registry refused nothing, which is the check no single section can make: two of the refusals depend on what else has registered, and a section that loses is dropped whole rather than reported by itself. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## plt-775-node-sections-2 #3994 +/- ##
========================================================
Coverage 57.60% 57.61%
========================================================
Files 2230 2230
Lines 187668 187682 +14
========================================================
+ Hits 108112 108126 +14
Misses 69689 69689
Partials 9867 9867
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
The last of the five sections carrying the root directory field the node fills from the command line after the file is read. The signing key section is the one where a blank root is worst: a node that cannot find its key does not sign. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Declares the last five tables in the node's configuration file: state sync, the
transaction index, instrumentation, the signing key paths, and self remediation.
33 keys. Nothing consumes them, so a node's configuration reads exactly as it did.
After this every table in that file is declared. The keys at its top are the
remaining step.
What varies by node kind
One key. A node that serves queries indexes transactions so it can answer them, and
a validator and a seed serve none, so they index nothing and keep the write.
tx-index.indexer[null][null][kv]The other four sections answer the same for every mode, and each says why in the
source. Whether a node starts from a snapshot is a decision about how it is brought
up rather than about what it will be. What a node measures about itself follows from
how it is operated. The signing key paths are unused by a node that does not sign,
so varying them would state a difference the binary does not make. The self
remediation thresholds each describe a node that has stopped making progress, which
is the same condition whatever the node is for.
The paths left out
The signing key section carries the root directory field the node fills from the command line
after the file is read, and it is the one where a blank root is worst: a node that cannot find
its key does not sign. That is the last of the five sections carrying that field.
The one path left out for a reason of its own
statesync.rpc-serversnames the servers to fetch a snapshot from, and they are theoperator's own peers. There is no value to inherit: an empty list is not a default
anyone can start from, and an address written here would name a host this binary
cannot know exists. A test fails if the node ever ships one, and the key should then
be declared.
Two tests worth naming
One walks the section names this package owns rather than a list kept beside them,
so the next section is covered by registering it and not by remembering to extend a
list.
The other asserts the registry refused nothing. That is the check no single section
can make: two of the refusals depend on what else has registered, a section that
loses one is dropped whole with every key it declared, and a dropped section is
absent rather than loud.
Verification
gofmt,goimports,go vetclean.golangci-lintreports nothing on the touchedpackage.
config/...andcmd/seid/...pass.Reviewing this
Third of four, stacked on the second, so the diff shows only this step.