Skip to content

Oracle demo - #21

Draft
stringhandler wants to merge 5 commits into
mainfrom
st-oracle-demo
Draft

stringhandler wants to merge 5 commits into
mainfrom
st-oracle-demo

Conversation

@stringhandler

Copy link
Copy Markdown
Owner

No description provided.

The node rejects a program that may cost more than its witness's size buys,
with "Program's execution cost could exceed budget". run still built,
signed and even exported such a transaction. Finalizing a covenant input on
Elements now checks the budget, and says how many bytes short the witness is.

Liquid doesn't relay the annex that would pad it (bad-witness-nonstandard),
so the error says to pad with a witness the program reads.
An explicit wallet UTXO, such as a payout a covenant made with
confidential: false, reaches the builder as a covenant input, and the builder
counted only the L-BTC of covenant inputs toward balance and change. Spending
explicit tUSDT therefore built a transaction with no tUSDT change and no
error, which the node refused: bad-txns-in-ne-out.

Every input's amount now counts toward its asset's balance, so the surplus
becomes change where the manifest permits it and an error where it doesn't.
An action's lock_time, {"height": <expr>} or {"time": <expr>}, sets the
transaction's nLockTime, which the check_lock_height and check_lock_time jets
read. Until now it was always zero, so a covenant could only demand a lock
time the wallet could never set.

A height must be below 500,000,000 and a time at least that, since consensus
tells them apart by size. A lock time is ignored when every input is final, so
each input that asks for no sequence gets 0xfffffffe, on both chains.
An example can ship a second manifest in a subdirectory, since run writes
its state files beside each manifest. The parse, validate, schema,
UI-coverage and CLI checks now cover those too.
Burns testnet L-BTC for a new tUSDT asset at the price in a signed oracle
statement. Simplicity can't tell whether a statement is current, so a mint
takes two steps: a request opens a 5-block window in which anyone holding a
newer statement whose price differs by more than 0.5% can cancel it, and
after which anyone can finalize it.

Statements use Mycelia Signal's canonical format and ECDSA scheme, signed by
a local test key (fake_oracle.py), and the covenant verifies and parses them
itself. issue_usdt/ issues the asset. Both paths ran on Liquid testnet; the
README lists the transactions.
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.

1 participant