Skip to content

Conversation

@philippwerner
Copy link
Contributor

Closes #672

Using plain function pointers for referencing user procedures for
notifications may cause failures when snapshots are saved and loaded,
because function pointer may change when the node is restarted with a
snapshot in the middle of an epoch.

As a solution, notification contract procedures must be registered at
node startup. The function pointer and related data is stored in a
registry and referenced by a procedure ID that is defined by the
contract index and the line of the procedure in the source code (which
stay constant between restarts and thus can be stored in the oracle
engine state snapshot file).
@philippwerner philippwerner self-assigned this Jan 6, 2026
@philippwerner philippwerner linked an issue Jan 6, 2026 that may be closed by this pull request
@philippwerner philippwerner force-pushed the feature/2025-12-15-contract-one-time-oracle-query branch from 017c75f to 45e7b62 Compare January 7, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Oracles: one-time-query and reply for contracts

2 participants