Skip to content

Commit 72fd8dc

Browse files
authored
Revert "Data Streams: RWA v8 (#2851)"
This reverts commit 63bfda1.
1 parent 63bfda1 commit 72fd8dc

32 files changed

+333
-428
lines changed

public/samples/DataStreams/ClientReportsVerifier.sol

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,16 @@ contract ClientReportsVerifier {
100100
}
101101

102102
/**
103-
* @dev Data Streams report schema v8 (RWA streams).
103+
* @dev Data Streams report schema v4 (RWA streams).
104104
*/
105-
struct ReportV8 {
105+
struct ReportV4 {
106106
bytes32 feedId;
107107
uint32 validFromTimestamp;
108108
uint32 observationsTimestamp;
109109
uint192 nativeFee;
110110
uint192 linkFee;
111111
uint32 expiresAt;
112-
uint64 lastUpdateTimestamp;
113-
int192 midPrice;
112+
int192 price;
114113
uint32 marketStatus;
115114
}
116115

@@ -141,11 +140,11 @@ contract ClientReportsVerifier {
141140
// ----------------- Public API -----------------
142141

143142
/**
144-
* @notice Verify a Data Streams report (schema v3 or v8).
143+
* @notice Verify a Data Streams report (schema v3 or v4).
145144
*
146145
* @dev Steps:
147146
* 1. Decode the unverified report to get `reportData`.
148-
* 2. Read the first two bytes → schema version (`0x0003` or `0x0008`).
147+
* 2. Read the first two bytes → schema version (`0x0003` or `0x0004`).
149148
* - Revert if the version is unsupported.
150149
* 3. Fee handling:
151150
* - Query `s_feeManager()` on the proxy.
@@ -156,7 +155,7 @@ contract ClientReportsVerifier {
156155
* 5. Decode the verified report into the correct struct and emit the price.
157156
*
158157
* @param unverifiedReport Full payload returned by Streams Direct.
159-
* @custom:reverts InvalidReportVersion when schema ≠ v3/v8.
158+
* @custom:reverts InvalidReportVersion when schema ≠ v3/v4.
160159
*/
161160
function verifyReport(bytes memory unverifiedReport) external {
162161
// ─── 1. & 2. Extract reportData and schema version ──
@@ -167,7 +166,7 @@ contract ClientReportsVerifier {
167166

168167
uint16 reportVersion = (uint16(uint8(reportData[0])) << 8) |
169168
uint16(uint8(reportData[1]));
170-
if (reportVersion != 3 && reportVersion != 8)
169+
if (reportVersion != 3 && reportVersion != 4)
171170
revert InvalidReportVersion(reportVersion);
172171

173172
// ─── 3. Fee handling ──
@@ -205,7 +204,7 @@ contract ClientReportsVerifier {
205204
lastDecodedPrice = price;
206205
emit DecodedPrice(price);
207206
} else {
208-
int192 price = abi.decode(verified, (ReportV8)).midPrice;
207+
int192 price = abi.decode(verified, (ReportV4)).price;
209208
lastDecodedPrice = price;
210209
emit DecodedPrice(price);
211210
}

src/config/sidebar.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ export const SIDEBAR: Partial<Record<Sections, SectionEntry[]>> = {
349349
children: [
350350
{
351351
title: "Report Schema v3 (Crypto)",
352-
url: "data-streams/reference/report-schema-v3",
352+
url: "data-streams/reference/report-schema",
353353
},
354354
{
355355
title: "Report Schema v3 (DEX State Price)",
@@ -362,8 +362,8 @@ export const SIDEBAR: Partial<Record<Sections, SectionEntry[]>> = {
362362
url: "data-streams/rwa-streams",
363363
children: [
364364
{
365-
title: "Report Schema v8",
366-
url: "data-streams/reference/report-schema-v8",
365+
title: "Report Schema v4",
366+
url: "data-streams/reference/report-schema-v4",
367367
},
368368
],
369369
},

src/content/data-streams/architecture.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ whatsnext:
1010
"Learn more about the Standard API Implementation": "/data-streams/tutorials/api-go",
1111
"Learn more about the Streams Trade Implementation": "/data-streams/streams-trade",
1212
"Find the list of available Stream IDs": "/data-streams/crypto-streams",
13-
"Find the schema of data to expect from Data Streams reports: Crypto": "/data-streams/reference/report-schema-v3",
14-
"Find the schema of data to expect from Data Streams reports: RWA": "/data-streams/reference/report-schema-v8",
13+
"Find the schema of data to expect from Data Streams reports": "/data-streams/reference/report-schema",
1514
}
1615
---
1716

src/content/data-streams/billing.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ whatsnext:
1010
{
1111
"Learn the basics about how to retrieve Data Streams reports in the Getting Started guide.": "/data-streams/getting-started",
1212
"Find the list of available Stream IDs.": "/data-streams/crypto-streams",
13-
"Find the schema of data to expect from Data Streams reports: Crypto": "/data-streams/reference/report-schema-v3",
14-
"Find the schema of data to expect from Data Streams reports: RWA": "/data-streams/reference/report-schema-v8",
13+
"Find the schema of data to expect from Data Streams reports.": "/data-streams/reference/report-schema",
1514
}
1615
---
1716

src/content/data-streams/concepts/liquidity-weighted-prices.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,15 @@ metadata:
88
whatsnext:
99
{
1010
"Find the list of available Stream IDs.": "/data-streams/crypto-streams",
11-
"Find the schema of data to expect from Data Streams reports: Crypto": "/data-streams/reference/report-schema-v3",
12-
"Find the schema of data to expect from Data Streams reports: RWA": "/data-streams/reference/report-schema-v8",
11+
"Find the schema of data to expect from Data Streams reports.": "/data-streams/reference/report-schema",
1312
}
1413
---
1514

1615
import DataStreams from "@features/data-streams/common/DataStreams.astro"
1716

1817
<DataStreams section="dsNotes" />
1918

20-
Chainlink Data Streams provides [reports](/data-streams/reference/report-schema-v3) with a _Mid_ and _Liquidity-Weighted Bid and Ask (LWBA)_ prices. These three prices form a pricing spread that offers protocols insight into market activity based on the current state of the order books.
19+
Chainlink Data Streams provides [reports](/data-streams/reference/report-schema) with a _Mid_ and _Liquidity-Weighted Bid and Ask (LWBA)_ prices. These three prices form a pricing spread that offers protocols insight into market activity based on the current state of the order books.
2120

2221
**Note**: At the moment, only [Crypto streams](/data-streams/crypto-streams) provide LWBA prices.
2322

src/content/data-streams/developer-responsibilities.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ metadata:
88
whatsnext:
99
{
1010
"Find the list of available Stream IDs": "/data-streams/crypto-streams",
11-
"Find the schema of data to expect from Data Streams reports: Crypto": "/data-streams/reference/report-schema-v3",
12-
"Find the schema of data to expect from Data Streams reports: RWA": "/data-streams/reference/report-schema-v8",
11+
"Find the schema of data to expect from Data Streams reports": "/data-streams/reference/report-schema",
1312
"Learn the basics about how to retrieve Data Streams reports using the Streams Trade implementation": "/data-streams/getting-started",
1413
"Learn how to fetch and decode Data Streams reports using the Data Streams API": "/data-streams/tutorials/api-go",
1514
}

src/content/data-streams/index.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ whatsnext:
1010
{
1111
"Learn how to fetch and decode Data Streams reports with the API": "/data-streams/tutorials/api-go",
1212
"Find the list of available Stream IDs": "/data-streams/crypto-streams",
13-
"Find the schema of data to expect from Data Streams reports: Crypto": "/data-streams/reference/report-schema-v3",
14-
"Find the schema of data to expect from Data Streams reports: RWA": "/data-streams/reference/report-schema-v8",
13+
"Find the schema of data to expect from Data Streams reports": "/data-streams/reference/report-schema",
1514
}
1615
---
1716

@@ -86,7 +85,7 @@ Access data directly through REST APIs or WebSocket connections using our SDKs:
8685

8786
1. Understand the Architecture: Review the [system components and data flow](/data-streams/architecture) to understand how Data Streams works.
8887

89-
1. Explore Available Data: Browse [available Stream IDs](/data-streams/crypto-streams) and [report schemas](/data-streams/reference/report-schema-v3) to see what data is available.
88+
1. Explore Available Data: Browse [available Stream IDs](/data-streams/crypto-streams) and [report schemas](/data-streams/reference/report-schema) to see what data is available.
9089

9190
1. Try the API: Follow our [hands-on tutorial](/data-streams/tutorials/api-go) to fetch and decode your first report.
9291

src/content/data-streams/market-hours.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ whatsnext:
1010
{
1111
"Find the list of available Crypto streams": "/data-streams/crypto-streams",
1212
"Find the list of available RWA streams": "/data-streams/rwa-streams",
13-
"Find the schema of data to expect from Data Streams reports: Crypto": "/data-streams/reference/report-schema-v3",
14-
"Find the schema of data to expect from Data Streams reports: RWA": "/data-streams/reference/report-schema-v8",
13+
"Find the schema of data to expect from Data Streams reports": "/data-streams/reference/report-schema",
1514
}
1615
---
1716

@@ -27,4 +26,4 @@ Markets for several assets are actively traded only during certain hours. Listed
2726

2827
## Real World Asset market status
2928

30-
Reports for Real World Asset (RWA) streams include the `marketStatus` value, which reflects the DON'S consensus on whether the market is currently open. For additional information, refer to the [RWA report schema](/data-streams/reference/report-schema-v8) page.
29+
Reports for Real World Asset (RWA) streams include the `marketStatus` value, which reflects the DON'S consensus on whether the market is currently open. For additional information, refer to the [RWA report schema](/data-streams/reference/report-schema-v4) page.

src/content/data-streams/reference/go-sdk.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ Where `ID` is the unique identifier for the stream.
267267

268268
#### `FeedVersion` uint16
269269

270-
Represents the stream [report schema](/data-streams/reference/report-schema-v3) version.
270+
Represents the stream [report schema](/data-streams/reference/report-schema) version.
271271

272272
```go
273273
type FeedVersion uint16
@@ -329,7 +329,7 @@ import report "github.com/smartcontractkit/data-streams-sdk/go/report"
329329

330330
```go
331331
type Data interface {
332-
v1.Data | v2.Data | v3.Data | v4.Data | v8.Data | v9.Data
332+
v1.Data | v2.Data | v3.Data | v4.Data
333333
Schema() abi.Arguments
334334
}
335335
```

src/content/data-streams/reference/report-schema-v3-dex.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import { PageTabs } from "@components"
2020
url: "/data-streams/reference/report-schema-v3-dex",
2121
},
2222
{
23-
name: "RWA Report Schema (v8)",
24-
url: "/data-streams/reference/report-schema-v8",
23+
name: "Real World Asset (RWA) Report Schema (v4)",
24+
url: "/data-streams/reference/report-schema-v4",
2525
},
2626
]}
2727
headerTitle="Available Report Schemas"

0 commit comments

Comments
 (0)