Skip to content

Config: Add explicit observer mode and storage kind #6489

Open
martintomazic wants to merge 5 commits intomasterfrom
martin/breaking/explicit-observer-mode
Open

Config: Add explicit observer mode and storage kind #6489
martintomazic wants to merge 5 commits intomasterfrom
martin/breaking/explicit-observer-mode

Conversation

@martintomazic
Copy link
Copy Markdown
Contributor

@martintomazic martintomazic commented Mar 27, 2026

Closes #6488, follows #6481.

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 27, 2026

Deploy Preview for oasisprotocol-oasis-core canceled.

Name Link
🔨 Latest commit b2b7a01
🔍 Latest deploy log https://app.netlify.com/projects/oasisprotocol-oasis-core/deploys/69e68150203b070008537972

Comment thread go/consensus/cometbft/config/config.go Outdated
Comment thread go/consensus/cometbft/config/config.go Outdated
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 76.47059% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.79%. Comparing base (6330716) to head (a1fa33f).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
go/oasis-node/cmd/node/node.go 63.63% 2 Missing and 2 partials ⚠️
go/consensus/cometbft/cometbft.go 50.00% 1 Missing and 2 partials ⚠️
go/worker/common/committee/p2p.go 75.00% 1 Missing and 1 partial ⚠️
go/runtime/history/history.go 87.50% 0 Missing and 1 partial ⚠️
go/runtime/registry/config.go 75.00% 1 Missing ⚠️
go/worker/client/worker.go 50.00% 0 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@martintomazic martintomazic force-pushed the martin/breaking/explicit-observer-mode branch from eb8ac90 to 9ba3bd6 Compare March 30, 2026 13:59
Comment thread go/worker/common/committee/p2p.go Outdated
Comment on lines +40 to +42
if config.GlobalConfig.Consensus.StateKind == consensusCfg.StateKindStateless {
return nil // Ignore transactions on stateless clients.
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread go/worker/client/worker.go Outdated
Comment thread go/oasis-node/cmd/node/node.go Outdated
Comment thread go/worker/storage/worker.go Outdated
Comment thread go/oasis-node/cmd/node/node_control.go Outdated
@martintomazic martintomazic force-pushed the martin/breaking/explicit-observer-mode branch 3 times, most recently from 3907d37 to 5edb28b Compare April 7, 2026 08:51
@martintomazic martintomazic marked this pull request as ready for review April 7, 2026 09:13
Comment thread .changelog/6488.cfg.1.md Outdated
Comment thread go/consensus/cometbft/config/config.go Outdated
Comment thread go/consensus/cometbft/cometbft.go Outdated
Comment thread go/oasis-node/cmd/node/node.go Outdated
@martintomazic martintomazic force-pushed the martin/breaking/explicit-observer-mode branch from 5edb28b to 36458ff Compare April 13, 2026 12:15
@martintomazic martintomazic changed the base branch from master to martin/trivial/observer-e2e-test April 13, 2026 12:23
@martintomazic martintomazic force-pushed the martin/trivial/observer-e2e-test branch from f09088e to 9b99580 Compare April 14, 2026 14:49
Base automatically changed from martin/trivial/observer-e2e-test to master April 14, 2026 15:15
@martintomazic martintomazic force-pushed the martin/breaking/explicit-observer-mode branch from 36458ff to 7904cf5 Compare April 14, 2026 15:34
@martintomazic martintomazic requested a review from kostko April 14, 2026 16:04
Comment thread go/config/config_test.go
Comment on lines +20 to +21
{name: "keymanager", mode: ModeKeyManager, mustErr: true},
{name: "seed", mode: ModeSeed, mustErr: true},
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread go/oasis-node/cmd/node/node.go Outdated
Comment thread go/oasis-node/cmd/node/node.go
@martintomazic martintomazic force-pushed the martin/breaking/explicit-observer-mode branch from 7904cf5 to 3a8941f Compare April 15, 2026 13:41
Comment thread .changelog/6488.cfg.1.md Outdated
Comment thread go/consensus/cometbft/config/config.go Outdated
}
case config.ModeSeed:
}
if n.Config.Mode == config.ModeSeed {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't seed nodes by default have local storage enabled?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean? this was mechanical refactor but maybe I missed smtg?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#6489 (comment) it cannot be disabled. Not optimal either but this is a separate problem.

Comment thread go/oasis-test-runner/oasis/stateless_client.go
Comment thread go/worker/client/worker.go Outdated
Comment thread go/oasis-node/cmd/node/node.go Outdated
Comment thread go/oasis-node/cmd/node/node.go
Comment thread go/config/config.go Outdated
Copy link
Copy Markdown
Collaborator

@peternose peternose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you planning to also update the docs, e.g. for Stateless Client Node?

@martintomazic martintomazic force-pushed the martin/breaking/explicit-observer-mode branch from 3a8941f to 3b7526e Compare April 16, 2026 11:02
@martintomazic martintomazic requested a review from peternose April 16, 2026 11:29
@martintomazic martintomazic force-pushed the martin/breaking/explicit-observer-mode branch from 3b7526e to a1fa33f Compare April 16, 2026 12:07
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.
@martintomazic martintomazic force-pushed the martin/breaking/explicit-observer-mode branch from a1fa33f to b2b7a01 Compare April 20, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add explicit observer mode to the node config

3 participants