Config: Add explicit observer mode and storage kind #6489
Config: Add explicit observer mode and storage kind #6489martintomazic wants to merge 5 commits intomasterfrom
Conversation
✅ Deploy Preview for oasisprotocol-oasis-core canceled.
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #6489 +/- ##
==========================================
- Coverage 64.56% 63.79% -0.77%
==========================================
Files 698 698
Lines 68220 68225 +5
==========================================
- Hits 44043 43521 -522
- Misses 19127 19740 +613
+ Partials 5050 4964 -86 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
eb8ac90 to
9ba3bd6
Compare
| if config.GlobalConfig.Consensus.StateKind == consensusCfg.StateKindStateless { | ||
| return nil // Ignore transactions on stateless clients. | ||
| } |
There was a problem hiding this comment.
I can bring this in using cfg.accept_gossiped_txs to avoid global state.
The location of this handler is weird though, as this protocol is anyways enabled only for the compute nodes, therefore it doe not fit into common package.
3907d37 to
5edb28b
Compare
5edb28b to
36458ff
Compare
f09088e to
9b99580
Compare
36458ff to
7904cf5
Compare
| {name: "keymanager", mode: ModeKeyManager, mustErr: true}, | ||
| {name: "seed", mode: ModeSeed, mustErr: true}, |
There was a problem hiding this comment.
Key-manager is technically stateless. Keymanager and seed should probably have separate config, as most of the configs that apply to client/compute are possible (not rejected) but simply ignored.
Out of scope, just this test makes it clearer.
7904cf5 to
3a8941f
Compare
| } | ||
| case config.ModeSeed: | ||
| } | ||
| if n.Config.Mode == config.ModeSeed { |
There was a problem hiding this comment.
Won't seed nodes by default have local storage enabled?
There was a problem hiding this comment.
What do you mean? this was mechanical refactor but maybe I missed smtg?
There was a problem hiding this comment.
Before, seed nodes would never execute line for _, worker := range n.net.computeWorkers {, but now they can if local storage is disabled. Maybe for test runner this doesn't matter.
There was a problem hiding this comment.
#6489 (comment) it cannot be disabled. Not optimal either but this is a separate problem.
peternose
left a comment
There was a problem hiding this comment.
Are you planning to also update the docs, e.g. for Stateless Client Node?
3a8941f to
3b7526e
Compare
3b7526e to
a1fa33f
Compare
HasLocalStorage variable was misleading as archive node has the local storage yet the variable was set to false for it. Long term solution is to stop abusing light history for tracking storage worker progress, by possibly following NodeDB last synced round directly.
This makes it consistent with the fact that node can currently be validator and compute at the same time.
a1fa33f to
b2b7a01
Compare
Closes #6488, follows #6481.