You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: database/README.md
+23-21Lines changed: 23 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,11 @@ Associates the 32 bytes contract app data with the corresponding full app data.
14
14
15
15
See [here](https://github.com/cowprotocol/services/issues/1465) for more details. In this table the contract app data is either the old unixfs based scheme, or the new keccak scheme. The new scheme can be validated by keccak-256 hashing the full app data, which should produce the contract app data. The old scheme cannot be validated.
16
16
17
-
Column | Type | Nullable | Details
18
-
---------------------|-------|----------|-------
19
-
contract\_app\_data | bytea | not null | 32 bytes. Referenced by `orders.app_data`.
20
-
full\_app\_data | bytea | not null | Is utf-8 but not stored as string because the raw bytes are important for hashing.
contract\_app\_data | bytea | not null | 32 bytes. Referenced by `orders.app_data`.
20
+
full\_app\_data | bytea | not null | Is utf-8 but not stored as string because the raw bytes are important for hashing.
21
+
creation\_timestamp | timestamptz | not null | when the entry was created or when column was added (DEFAULT NOW() for new and 1970-01-01 for historical data)
Contains all auctions for which a valid solver competition exists.
65
+
Contains all auctions for which a valid solver competition exists.
65
66
66
67
Column | Type | Nullable | Details
67
68
---------------|---------|----------|--------
@@ -202,7 +203,7 @@ Indexes:
202
203
203
204
### order\_execution
204
205
205
-
Contains metainformation for trades, required for reward computations that cannot be recovered from the blockchain and are not stored in a persistent manner somewhere else.
206
+
Contains metainformation for trades, required for reward computations that cannot be recovered from the blockchain and are not stored in a persistent manner somewhere else.
206
207
Protocol fee tokens/amounts are stored in the same order as fee policies in fee_policies table.
207
208
208
209
Column | Type | Nullable | Details
@@ -230,17 +231,18 @@ Indexes:
230
231
231
232
Quotes that an order was created with. These quotes get stored persistently and can be used to evaluate how accurate the quoted fee predicted the execution cost that actually happened on-chain.
order\_uid | bytea | not null | order that this quote belongs to
236
-
gas\_amount | double | not null | estimated gas used by the quote used to create this order with
237
-
gas\_price | double | not null | gas price at the time of order creation
238
-
sell\_token\_price | double | not null | ether-denominated price of sell\_token at the time of quoting. The ether value of `x` sell\_tokens is `x * sell_token_price`.
239
-
sell\_amount | numeric | not null | sell\_amount of the quote used to create the order with
240
-
buy\_amount | numeric | not null | buy\_amount of the quote used to create the order with
241
-
solver | bytea | not null | public address of the solver that provided this quote
242
-
verified | boolean | not null | information if quote was verified
243
-
metadata | json | not null | additional data associated with the quote in json format
order\_uid | bytea | not null | order that this quote belongs to
237
+
gas\_amount | double | not null | estimated gas used by the quote used to create this order with
238
+
gas\_price | double | not null | gas price at the time of order creation
239
+
sell\_token\_price | double | not null | ether-denominated price of sell\_token at the time of quoting. The ether value of `x` sell\_tokens is `x * sell_token_price`.
240
+
sell\_amount | numeric | not null | sell\_amount of the quote used to create the order with
241
+
buy\_amount | numeric | not null | buy\_amount of the quote used to create the order with
242
+
solver | bytea | not null | public address of the solver that provided this quote
243
+
verified | boolean | not null | information if quote was verified
244
+
metadata | json | not null | additional data associated with the quote in json format
245
+
creation\_timestamp | timestamptz | not null | when the entry was created (DEFAULT NOW() for new and 1970-01-01 for historical data)
244
246
245
247
Indexes:
246
248
- PRIMARY KEY: btree(`order_uid`)
@@ -354,7 +356,7 @@ All solutions reported by solvers, that were part of a solver competition. A sol
354
356
355
357
Column | Type | Nullable | Details
356
358
---------------|-----------|----------|--------
357
-
auction\_id | bigint | not null | auction for which the solution was proposed
359
+
auction\_id | bigint | not null | auction for which the solution was proposed
358
360
uid | bigint | not null | unique id of the proposed solution within a single auction
359
361
id | numeric | not null | id of the proposed solution as reported by the solver
360
362
solver | bytea | not null | solver submission address
@@ -369,11 +371,11 @@ Indexes:
369
371
370
372
### proposed\_trade\_executions
371
373
372
-
Contains all order executions for proposed solutions.
374
+
Contains all order executions for proposed solutions.
373
375
374
376
Column | Type | Nullable | Details
375
377
----------------|----------|----------|--------
376
-
auction\_id | bigint | not null | auction for which the order was executed
378
+
auction\_id | bigint | not null | auction for which the order was executed
377
379
solution_uid | bigint | not null | `uid` from `proposed\_solutions`
378
380
order_uid | bigint | not null | id of the order
379
381
executed\_sell | numeric | not null | the effective amount that left the user's wallet including all fees
@@ -388,7 +390,7 @@ Solvers report orders they solved on each competition. Orders that don't exist i
0 commit comments