Skip to content

Improve error messages for stateless nodes #6063

@LesnyRumcajs

Description

@LesnyRumcajs

Summary

This call results in a pretty cryptic message if running a stateless node:

forest-cli state compute --epoch 3007310
Error: ErrorObject { code: InternalError, message: "Can't create a valid state tree from the given root. This error may indicate unsupported version. state_root_cid=bafy2bzacebbi2b2lilpd5vokfjcknqchakpm3a47e2r5yfpuofpdj63jvefnm, state_root_version=unknown", data: None }

Caused by:
    ErrorObject { code: InternalError, message: "Can't create a valid state tree from the given root. This error may indicate unsupported version. state_root_cid=bafy2bzacebbi2b2lilpd5vokfjcknqchakpm3a47e2r5yfpuofpdj63jvefnm, state_root_version=unknown", data: None }

Requirements

The error message is correct, but totally not helpful. The method should short circuit and fail for a stateless node, with a helpful message that those exclude each other.

Motivation

Infra wants it! I want it too.

Metadata

Metadata

Assignees

Labels

Type: RequestRequests to implement features or make other changes

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions