Skip to content

feat: extend state endpoint with PoC metadata and remove poc v1#749

Open
IgnatovFedor wants to merge 6 commits intoupgrade-v0.2.11from
fi/state-improvement
Open

feat: extend state endpoint with PoC metadata and remove poc v1#749
IgnatovFedor wants to merge 6 commits intoupgrade-v0.2.11from
fi/state-improvement

Conversation

@IgnatovFedor
Copy link
Collaborator

@IgnatovFedor IgnatovFedor commented Feb 13, 2026

State endpoint enrichment & PoC v1 removal

What problem does this solve?

Clients had to make multiple consecutive calls to mlnode to determine full node status. PoC v1 is replaced with v2.

How do you know this is a real problem?

broker.go:queryNodeStatus() - client forced to chain status calls to get a complete picture. PoC v1 is replaced by v2 and no longer served a purpose.

How does this solve the problem?

The state endpoint now returns enriched data, eliminating the need for follow-up status calls. PoC v1 code has been removed entirely.

What risks does this introduce? How can we mitigate those risks?

The enriched response may break existing clients expecting the old schema. Any remaining PoC v1 consumers would lose that endpoint. Mitigation: test checks that go client ignores enriched fields (cd gonka/decentralized-api && go test ./mlnodeclient/ -run TestClient_NodeState_EnrichedResponse -v 2>&1).

How do you know this PR fixes the problem?

The enriched response covers all data previously requiring separate calls. PoC v1 references are gone from the codebase. The broker client currently ignores the new fields safely. In a follow-up, the broker will be updated to consume the enriched data and drop the redundant GetPowStatus call in queryNodeStatus.

@IgnatovFedor IgnatovFedor added this to the v0.2.11 milestone Feb 13, 2026
Copilot AI review requested due to automatic review settings February 13, 2026 07:57
@IgnatovFedor IgnatovFedor linked an issue Feb 13, 2026 that may be closed by this pull request
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the PoC (Proof of Compute) v1 implementation from the codebase, keeping only the v2 off-chain validator. The orchestrator that selected between v1 and v2 has been removed, and the system now directly uses the OffChainValidator (v2).

Changes:

  • Removed all PoC v1 code including validator, handlers, requests, and tests
  • Replaced the orchestrator pattern with direct use of OffChainValidator
  • Cleaned up MLNodeClient interface to remove v1 methods
  • Removed v1 NATS streams and batch consumers
  • Removed IDE configuration files (.idea directory) that shouldn't be in the repository

Reviewed changes

Copilot reviewed 26 out of 30 changed files in this pull request and generated no comments.

Show a summary per file
File Description
decentralized-api/poc/validator_v1.go Removed entire v1 on-chain validator implementation
decentralized-api/poc/validator_v1_test.go Removed v1 validator tests
decentralized-api/poc/orchestrator.go Removed orchestrator that chose between v1 and v2
decentralized-api/poc/migration.go Removed migration logic for v1/v2 transition
decentralized-api/poc/validator.go Moved common constants (POC_VALIDATE_GET_NODES_RETRIES) from v1
decentralized-api/poc/commit_worker.go Removed v1/v2 check as v2 is now always used
decentralized-api/mlnodeclient/poc_v1_requests.go Removed all v1 request types and methods
decentralized-api/mlnodeclient/poc_v1_requests_test.go Removed v1 request tests
decentralized-api/mlnodeclient/interface.go Removed v1 methods from MLNodeClient interface
decentralized-api/mlnodeclient/mock.go Removed v1 mock methods and state tracking
decentralized-api/main.go Replaced orchestrator with direct OffChainValidator initialization
decentralized-api/internal/server/public/poc_handler.go Removed v1 mode checks
decentralized-api/internal/server/mlnode/server.go Removed v1 callback routes
decentralized-api/internal/server/mlnode/post_generated_artifacts_v1_handler.go Removed entire v1 handler file
decentralized-api/internal/nats/server/server.go Removed v1 NATS streams
decentralized-api/internal/event_listener/*.go Updated to use OffChainValidator directly instead of orchestrator
decentralized-api/cosmosclient/cosmosclient_v1.go Removed v1 cosmos client methods
decentralized-api/cosmosclient/cosmosclient.go Removed v1 methods from interface
decentralized-api/cosmosclient/tx_manager/*.go Removed v1 batch consumers and publishers
decentralized-api/cosmosclient/mock_cosmos_message_client.go Removed v1 mock methods
decentralized-api/broker/node_worker_commands_v1.go Removed v1 node worker commands
decentralized-api/broker/node_worker_commands_v1_test.go Removed v1 command tests
decentralized-api/broker/broker.go Removed v1-specific logic, now always uses v2 commands
.idea/* Removed IDE configuration files
Files not reviewed (4)
  • .idea/.gitignore: Language not supported
  • .idea/inference-ignite.iml: Language not supported
  • .idea/modules.xml: Language not supported
  • .idea/vcs.xml: Language not supported
Comments suppressed due to low confidence (1)

decentralized-api/poc/validator_v1.go:1

  • The PR title mentions "extend state endpoint with PoC metadata" but there are no visible changes to the state endpoint in the diff. The primary changes are the removal of PoC v1 code. Please verify that the PR title accurately describes the changes, or if there are additional changes to the state endpoint that aren't shown in this diff.

@gmorgachev gmorgachev closed this Feb 20, 2026
@gmorgachev gmorgachev deleted the fi/state-improvement branch February 20, 2026 08:47
@github-project-automation github-project-automation bot moved this from Todo to Done in Upgrade v0.2.11 Feb 20, 2026
@gmorgachev gmorgachev restored the fi/state-improvement branch February 20, 2026 09:01
@gmorgachev gmorgachev reopened this Feb 20, 2026
@tcharchian tcharchian moved this from Done to In Progress in Upgrade v0.2.11 Feb 21, 2026
@patimen patimen changed the base branch from upgrade-v0.2.10 to upgrade-v0.2.11 February 21, 2026 07:43
@patimen patimen added the planned Ready to go in the milestone it's assigned in label Feb 21, 2026
@IgnatovFedor IgnatovFedor force-pushed the fi/state-improvement branch 3 times, most recently from af55048 to ce9ff81 Compare February 26, 2026 17:51
@IgnatovFedor IgnatovFedor marked this pull request as ready for review February 26, 2026 17:51
@IgnatovFedor IgnatovFedor force-pushed the fi/state-improvement branch from ce9ff81 to f71fd2b Compare March 5, 2026 20:07
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can delete this as well as IsPoCv2Enabled

Choose a reason for hiding this comment

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

I think that can also delete IsV2EndpointsEnabled like IsPoCv2Enabled and IsMigrationMod

statuses = [proxy_module.poc_status_by_port.get(p, "") for p in healthy_ports]
if all(s == "GENERATING" for s in statuses):
poc_status = "GENERATING"
elif any(s == "GENERATING" for s in statuses):
Copy link
Contributor

Choose a reason for hiding this comment

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

I think VALIDATING is missing

Copy link

@Ryanchen911 Ryanchen911 left a comment

Choose a reason for hiding this comment

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

IsV2EndpointsEnabled isn't deleted and "VALIDATING" status is missing

Choose a reason for hiding this comment

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

I think that can also delete IsV2EndpointsEnabled like IsPoCv2Enabled and IsMigrationMod

poc_status = "MIXED"
else:
poc_status = "IDLE"

Choose a reason for hiding this comment

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

missing VALIDATING status

assert data["inference_healthy"] is True
assert data["poc_status"] == "IDLE"
assert data["loaded_model"] is None

Choose a reason for hiding this comment

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

I think the test about "VALIDATING" status is missing

@IgnatovFedor
Copy link
Collaborator Author

@x0152 @Ryanchen911 thanks for your feedback!

  • VALIDATING status and test are added
  • IsV2EndpointsEnabled() / IsPoCv2Enabled() / IsMigrationMode(): removed from broker and phase tracker
  • Chain-side cleanup: removed remaining isMigrationTracking logic from ante handler and v2 msg servers, deleted chainvalidation_v1.go, confirmation_poc_v1.go, poc_migration.go

@tcharchian tcharchian moved this from In Progress to Needs reviewer in Upgrade v0.2.11 Mar 11, 2026
Copy link

@Ryanchen911 Ryanchen911 left a comment

Choose a reason for hiding this comment

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

approved this pull request.

@tcharchian
Copy link
Collaborator

hey @Ryanchen911, can I kindly ask you to contact us via email hello@productscience.ai? Thanks.
cc: @mtvnastya

@Ryanchen911
Copy link

sure, i'm the member of 6block,I'll send you later! @tcharchian thank you

@patimen patimen modified the milestones: v0.2.11, v0.2.12 Mar 16, 2026
@IgnatovFedor IgnatovFedor modified the milestones: v0.2.11, v0.2.12 Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

planned Ready to go in the milestone it's assigned in

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deleting PoC v1 + Extend state endpoint with PoC metadata

7 participants