Consensus Data Layer
Accord
Accord is TruthLinked's protocol path for external data. A cell requests data, validators observe the source independently, commits enter the chain, reveals are verified against those commits, and a finalized oracle result becomes available to deterministic execution.
01 Core Model
Accord gives programmable cells a controlled way to use external facts. The network request is converted into protocol state before it affects execution. Validators fetch the source, commit to their observation, reveal the response, and finalize a canonical result only when stake agreement is reached.
A cell or agent workflow creates an oracle request with URL, method, body, response format, optional schema ID, requesting cell, and expiry height.
Each validator commits to a response hash bound to validator key, request ID, response body, and HTTP status.
After commit quorum, validators reveal the response. The chain verifies each reveal against the original commit hash.
Once reveal quorum is reached, the canonical response is stored as an oracle result with body hash, status, finalization height, expiry height, and quorum stake.
02 Data Flow
Accord finalization produces an OracleResult. Cell-specific settlement remains an application or ABI decision; the node finalizes the result and exposes it to execution.
03 Request Identity
Each request has a deterministic ID derived from the request fields. Validators observing the same URL, method, body, response format, and schema ID derive the same request identity.
| Field | Role |
|---|---|
| URL | The external endpoint requested by the cell. |
| Method | GET, POST, PUT, or DELETE. |
| Body | Request body bytes for methods that carry a payload. |
| Response Format | Canonicalization mode: raw, canonical JSON, or USD price normalization. |
| Schema ID | Optional approved schema used to project response fields. |
| Requesting Cell | The cell that issued the request. |
| Expiry Height | Height after which the pending request or result expires. |
04 URL Governance
Public external data access is governed by URL pattern proposals. A proposer posts a bond, validators vote by active stake, and approval requires two-thirds stake support. Approved patterns become eligible for public cell requests.
| Action | Effect |
|---|---|
| ProposeUrl | Creates a bonded proposal for a URL pattern and voting period. |
| VoteUrl | Records an active validator's stake-weighted approval or rejection vote. |
| ReportMaliciousUrl | Reports a URL pattern with evidence and triggers proposer-bond slashing through the oracle update path. |
| SetCellVisibility | Sets a cell's public or private visibility posture for URL permission checks. |
URL patterns support exact matches and wildcard suffixes such as https://api.example.com/*. Public cells use approved URL proposals. Private cells use the private visibility path.
05 Commit And Reveal
Accord uses commit-reveal to keep validator observations accountable. The commit phase records a hash of the validator key, request ID, response body, and HTTP status. The reveal phase submits the body and status. The chain recomputes the hash and counts only reveals that match their commits.
| Phase | Transaction | Stored Data |
|---|---|---|
| Commit | SubmitOracleCommit | Request ID and commit hash. |
| Reveal | SubmitOracleReveal | Request ID, response body, and response status. |
| Finalize | State transition | Oracle result, body hash, finalized height, expiry height, and quorum stake fraction. |
06 Response Formats
| Format | Use | Canonicalization |
|---|---|---|
| Raw | Stable bytes, fixtures, metadata, registry data, and simple API responses. | Raw bytes are used. JSON-looking bodies are normalized where possible to reduce non-deterministic field ordering. |
| JsonCanonical | JSON APIs where semantic data is stable but formatting, key order, or volatile fields vary. | JSON is normalized, keys are sorted, and known non-deterministic fields are removed. |
| PriceUsd | USD price feeds where providers expose equivalent price fields under different names. | Prices are normalized to price_usd_micros, grouped inside a tolerance bucket, and finalized by stake-weighted median. |
Cells can request the price normalization path by adding accord_format=price_usd to the URL. Validators remove that marker before making the upstream HTTP request.
https://api.example.com/btc.json?accord_format=price_usd
07 Schema Projection
Approved schemas allow Accord to project a JSON response to declared keys before finalization. Projection keeps only the fields that the cell declared and sorts them deterministically. Nested keys can be referenced with dot notation, such as data.price.
A 32-byte identifier attached to the request and included in the request ID.
The schema registry must contain an approved schema entry for projection to proceed.
Only declared keys are preserved in the projected canonical JSON body.
If projection fails or a declared key is missing, validators do not commit that response.
08 Axiom Cell Surface
Axiom cells use Accord through explicit request and read operations. The request path queues external data. The read path consumes a finalized result when quorum has produced one.
| Operation | Function |
|---|---|
| AccordRequest | Queues a URL, method, and body request. The result is a deterministic request ID. |
| AccordRead | Reads the finalized oracle result by request ID. Pending and expired states are surfaced through return codes. |
| Manifest Oracle IDs | Cells can declare oracle schema IDs in their manifest, making external data usage part of the execution surface. |
let req_id = accord::request("https://api.example.com/data.json", "GET", "");
let result = accord::read(req_id);09 Return Codes
| Code Name | Meaning |
|---|---|
| OK | Finalized response is available and copied to the result buffer. |
| ORACLE_PENDING | The request is queued or tallying. Retry after finalization advances. |
| ORACLE_EXPIRED | The result expired and the request is requeued. |
| URL_NOT_APPROVED | The URL does not match the cell's permitted visibility and governance path. |
| INVALID_METHOD | The request method is outside the supported HTTP methods. |
| RESPONSE_TOO_LARGE | The response exceeds the protocol response-size limit. |
| MEM_ERR / ENCODING_ERR | The request could not be read from cell memory or decoded as valid UTF-8. |
10 CLI Usage
The Axiom CLI exposes URL governance commands for operators and validators. Amounts are accepted in TRTH notation or raw axi notation where supported by the CLI parser.
Propose a URL pattern
axiom propose-url \ --from ./operator.keys.json \ --url-pattern "https://api.example.com/*" \ --bond 1000 \ --voting-period-blocks 7200
Vote as a validator
axiom vote-url \ --from ./validator.keys.json \ --url-pattern "https://api.example.com/*" \ --approve true
Report a malicious URL pattern
axiom report-malicious-url \ --from ./operator.keys.json \ --url-pattern "https://api.example.com/*" \ --evidence "provider returned manipulated settlement data"
11 Explorer And API
Accord activity appears as ordinary chain activity. Commits, reveals, URL proposals, votes, and reports carry transaction hashes, actors, block references, request IDs, and raw intent fields.
| Surface | Data |
|---|---|
| Transactions | ProposeUrl, VoteUrl, ReportMaliciousUrl, SubmitOracleCommit, and SubmitOracleReveal. |
| Transaction detail | Request ID, commit hash, reveal status, response body metadata, actor, and block information. |
| Indexer endpoint | GET /oracle/events returns indexed oracle event rows. |
| RPC debug | GET /oracle_debug exposes pending requests, pending tallies, and finalized results for operators. |
| MCP tools | get_oracle_result polls a finalized result by request ID. |
12 Operating Guidance
- Use URL proposals for public data dependencies that many cells or applications will rely on.
- Use schema projection for JSON APIs with extra fields, volatile metadata, or nested response shapes.
- Use
PriceUsdfor price feeds that need tolerance grouping and stake-weighted median finalization. - Keep response bodies small and stable. Large responses are rejected by protocol limits.
- Design cells to handle
ORACLE_PENDINGand retry after finalization. - Inspect commits and reveals in the explorer when diagnosing data finalization.