Skip to content

feature: allow to do custom oracle machine query - #131

Open
krypdkat wants to merge 2 commits into
mainfrom
feature/2026-08-22-oracle-machine-custom-fee
Open

feature: allow to do custom oracle machine query#131
krypdkat wants to merge 2 commits into
mainfrom
feature/2026-08-22-oracle-machine-custom-fee

Conversation

@krypdkat

@krypdkat krypdkat commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Adds optional [FEE] to -queryoracle and supports the EvmLogRead / QubicLogRead interfaces from core develop.

qubic-cli [...] -queryoracle [INTERFACE] [QUERY_STRING] [TIMEOUT_IN_SECONDS] [FEE]

FEE is optional, default is the interface fee. Overpayment is refunded.

EVM log: chain_id,tx_hash,log_index (tx hash = 64 hex digits, no 0x)

qubic-cli -nodeip $NODE -seed $SEED -queryoracle EvmLogRead 11155111,a788c0e289bef400d1ea7c6152ff2ad3557620dbeb479ee597c2fda6298af7ea,1 120 1500

Qubic log: tick,tx_hash,log_id (tx hash = 60-char id, log_id = global log id)

qubic-cli -nodeip $NODE -seed $SEED -queryoracle QubicLogRead 12345678,<TX_HASH>,987654

Check result with -getoraclequery user+ [TICK] or -getoraclequery [QUERY_ID].

Core submodule bumped to develop. No new files.

@Franziska-Mueller
Franziska-Mueller self-requested a review September 3, 2026 12:06
Comment thread oracle_query.cpp Outdated
outStr[nDigits] = 0;
}

static void pubkeyFromSeed(const char* seed, uint8_t pubkey[32])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rather move this to key_utils.h ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Franziska-Mueller Sorry, the last PR was AI generated to serve the main PR on core and OM, I forgot to put NoReview tag here.
The new commit is much cleaner, please review again.
Thank you.

Comment thread oracle_query.cpp Outdated
static const char ZERO_IDENTITY[] =
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";

static bool parseHexBytes(const char* hexIn, std::vector<uint8_t>& out)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check if you can use the existing functions in utils.h and otherwise add them there for reusability

Comment thread oracle_query.cpp Outdated
constexpr uint16_t ORACLE_QUORUM = 451; // NUMBER_OF_COMPUTORS quorum

// oracle_transactions.h: Transaction + {oracleInterfaceIndex, timeoutMilliseconds} + query
#pragma pack(push, 1)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have core as submodule in the cli. no need to copy structs if they are available in core.

@krypdkat
krypdkat force-pushed the feature/2026-08-22-oracle-machine-custom-fee branch from 8be6d18 to aba3189 Compare September 4, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants