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
TakaYuPP and others added 4 commits January 7, 2026 16:06
* Add qRWA SC

* Add qRWA unit test

* Fix payout logic

* Fix typos and renames

* Fix Bug

- Wrong treasury update after release when the SC does not have enough funds to pay for releaseShares (to QX)

* Add a comprehensive test case

* Exclude the SC from the snapshot

* Fix init addresses

* Fix init addresses for gtest

* Add get active poll functions

* Add function to get general asset balances

* Add function to get a list of general assets

* Adapt to new DateAndTime object

* Fix Pool B extra funds after revoking management rights

* Use internal Asset object in qRWA

* Add checks for dividend transfer

* Address comments

* Snapshot QMINE shares in all SC

* Fix SC code compliance

* Remove unused comments
philippwerner and others added 30 commits January 27, 2026 13:31
... for out-of-storage tick numbers (too distant future or past)
* Improve connection between node and OM.

* Fix missing debug log.
* Add ability to adjust multipler of each mining algo's solution.

* Set ADDITION multiplier equal to HYPERIDENTITY.
Some compilers, such as gcc, are less permissive with anonymous unions.
Such cases are fixed here in order to get rid of warnings when the core
is included as a submodule in other repos.
…feature/2025-12-15-contract-one-time-oracle-query
- test multiple queries in one tick
- increase timeouts
- emit log events in END_TICK
- replace half of coingecko queries by mock price queries
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

8 participants