Problem: settlement can't tell a capture was taken too early
Maintainers usually reply within 1 day
@MicBun is already working on this.
Since Sep 19, 2026.
Assessment
This issue has not been assessed yet.
Description
A market resolves on a captured query result. request_attestation takes that
capture and stores it in attestations; settle_market reads it back and decodes
an outcome from it.
The two are only loosely connected. request_attestation is a general primitive —
it refers to neither markets nor settle_time — it is PUBLIC, and the
query_components of any live market are readable from ob_queries. So a capture
of a market's query can be taken at any height, including well before the market
falls due, over a window that has not finished.
Settlement has no way to tell such a capture apart from one the settlement path
took after settle_time. attestations records created_height and
signed_height and no wall-clock time at all, while ob_queries.settle_time is a
unix timestamp, so the two cannot be compared from inside settle_market.
Why it matters for whichever capture is chosen
The requirement in
is that a market resolves against the value that existed at settle_time. The
ordering settlement uses to approximate that is chosen in:
Every ordering that settlement can express today is a proxy for that:
| Ordering | What an early capture does | What a late capture does |
|---|---|---|
Earliest created_height |
wins | ignored |
Latest signed_height |
ignored | wins |
Neither can express "at or after settle_time", because the comparison is not
available. The choice between them changes which direction is exposed, not whether
one is.
What this looks like today
Nothing has been captured early: 0 of 1,319 captures on mainnet were taken at a
height below their market's creation height, and the smallest gap is +34 blocks.
This is about a window that is open rather than one that is being used.
What would close it
Settlement needs to be able to tell whether a capture was taken within the window
the market settles on. A block timestamp recorded alongside created_height at
capture time would make the comparison expressible; so would anything else that
lets settle_market place a capture relative to settle_time.
Existing rows would need whatever is added to be backfilled, since the value is
not recoverable from attestations alone.
- Dominant language
- Go
- Stars
- 7
- Forks
- 3
- Avg merge
- 3h 2m
- Merged PRs (30d)
- 13
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from trufnetwork/node
-
type: goal
Difficulty 5/5 Over a week Newbie friendliness 35/100
trufnetwork/node#1436 ·
Maintainers usually reply within 1 day
-
Goal: SDK call for market volume over a time periodPossibly taken @vinarmani claimed this 9 days ago. Open
trufnetwork/node#1429 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
trufnetwork/node#1313 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
trufnetwork/node#1200 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
trufnetwork/node#1190 ·
Maintainers usually reply within 1 day
All issues in trufnetwork/node
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
siderolabs/terraform-provider-talos#414 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
JuliaComputing/jh#63 · 1 comment ·
-
area/proxy kind/bug priority/backlog triage/accepted
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
lexfrei/cloudflare-tunnel-gateway-controller#840 ·
Maintainers usually reply within 1 day
-
Priority: Normal Type: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cloudflare/cloudflared#1747 ·