Skip to content

fix: return 202 upon unknown message status in sync call HTTP handler - #9691

Merged
mraszyk merged 5 commits into
masterfrom
mraszyk/call-sync-unknown-status
Apr 1, 2026
Merged

mraszyk merged 5 commits into
masterfrom
mraszyk/call-sync-unknown-status

Conversation

@mraszyk

@mraszyk mraszyk commented Apr 1, 2026 •

Copy link
Copy Markdown
Contributor

This PR fixes the HTTP handler for the synchronous update call (/api/v4/canister/.../call and the deprecated /api/v3/canister/.../call) by returning a 202 status code instead of a certificate that does not contain the update call status (such a certificate is unexpected by IC agents and could lead to spurious errors).

The root cause for a certificate not containing the update call status is:

  • the execution environment reporting the latest resident state height to the HTTP handler (which might not match the state height at which the update call status is available on a node that is catching up);
  • the consensus certifier reporting every height for which it delivers a certification to the state manager as a certified height although the state manager might not have a certified state on that height if a node is catching up.

The root cause will be fixed in separate follow-up PRs (that will also add a critical error in the HTTP handler if the certificate still does not contain the update call status).

@github-actions github-actions Bot added the fix label Apr 1, 2026
@mraszyk
mraszyk marked this pull request as ready for review April 1, 2026 17:33
@mraszyk
mraszyk requested review from a team as code owners April 1, 2026 17:33
@mraszyk
mraszyk enabled auto-merge April 1, 2026 17:43
@mraszyk
mraszyk added this pull request to the merge queue Apr 1, 2026
Merged via the queue into master with commit 33077fe Apr 1, 2026
39 of 40 checks passed
@mraszyk
mraszyk deleted the mraszyk/call-sync-unknown-status branch April 1, 2026 17:59
pull Bot pushed a commit to mikeyhodl/ic that referenced this pull request Apr 22, 2026
…pl (dfinity#9850)

Move the `max_certified_height` channel from `CertifierImpl` to
`StateManagerImpl`.

The reason for this change is that the consensus certifier was updating
the channel after every `deliver_state_certification`, but the certified
state is not available for heights that have not been committed and
cloned by the state manager.

This issue has also been observed in production (see
[slack](https://dfinity.slack.com/archives/C020G13AS4F/p1773656957580139))
and mitigated by a work-around that checks if the channel was not
updated too early ([PR](dfinity#9691)). This
PR implements a proper fix by ensuring that the channel is not updated
too early at the first place.

---------

Co-authored-by: IDX GitHub Automation <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants