Improve tx verification error for ValidUntilBlock check failure #1584

Open
opened 2025-12-28 17:16:54 +00:00 by sami · 0 comments
Owner

Originally created by @ixje on GitHub (Dec 3, 2025).

I'm always frustrated when a tx fails but the verification error doesn't contain enough details to know how to resolve the problem. e.g.

transaction e1caca64d67a80a3cbceec9f553123ff6879e2a4f8404571b575bf86ef56b399 failed to verify: transaction has expired: ValidUntilBlock = 1001, current height = 1

My memory (and test case) said a 1000 blocks is the max valid. Under those assumptions the above error message makes no sense.

Looking at
nspcc-dev/neo-go@39f8079b7e/pkg/core/blockchain.go (L2931-L2932)

GetMaxValidUntilBlockIncrement() must return a different value than the 1000 I expect(ed).

Describe the solution you'd like

I would like some addition indicating what the max allowed value would have been to pass e.g.

ValidUntilBlock = 1001, current height = 1, max valid = 501

Describe alternatives you've considered

n/a

Additional context

n/a

Originally created by @ixje on GitHub (Dec 3, 2025). ## Is your feature request related to a problem? Please describe. I'm always frustrated when a tx fails but the verification error doesn't contain enough details to know how to resolve the problem. e.g. ``` transaction e1caca64d67a80a3cbceec9f553123ff6879e2a4f8404571b575bf86ef56b399 failed to verify: transaction has expired: ValidUntilBlock = 1001, current height = 1 ``` My memory (and test case) said a `1000` blocks is the max valid. Under those assumptions the above error message makes no sense. Looking at https://github.com/nspcc-dev/neo-go/blob/39f8079b7e58cc8dff570cb121e061a74ed784c0/pkg/core/blockchain.go#L2931-L2932 `GetMaxValidUntilBlockIncrement()` must return a different value than the `1000` I expect(ed). ## Describe the solution you'd like I would like some addition indicating what the max allowed value would have been to pass e.g. `ValidUntilBlock = 1001, current height = 1, max valid = 501` ## Describe alternatives you've considered n/a ## Additional context n/a
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neo-go#1584
No description provided.