Commit e8de31f
committed
refactor!: splitting
Fixes #14555
## New PR Description
As mentioned in the old PR description I originally planned to just type the arg of `getLogsByTags` but while addressing this PR's feedback I realized that I made a mistake: the `getLogsByTags` endpoint was used for both private and public logs and the issue is that for public logs we use "unsiloed" tag and for private logs we use siloed tag.
Having these 2 endpoints merged was just a tech debt: there is not a place where we would call this endpoint expecting only 1 type of logs. This led to us having ugly utilities that filtered out one kind of logs after retrieval.
We didn't split this before because we didn't want to introduce a breaking change to the API.
Given that I am already breaking backwards compatibility and given the error I made it made sense to fix this by splitting the two endpoints.
Now we have `getPrivateLogsByTag` and `getPublicLogsByTagsFromContract` endpoints.
## Old PR Description
In this PR I used the `SiloedTag` type for the param in `getLogsByTags`. This allowed me to drop some ugly type conversions. This was just a tech debt.
The diff turned out to be quite large because I needed to move the type from `pxe` to `stdlib`.
As mentioned in a PR down the stack this is second of 3 PRs in which I clean up the `getLogsByTags` endpoint:
1. First PR - including block timestamp in return value,
2. This is the second PR - I type the tag arg of the function to be `SiloedTag`,
3. in the last PR I will drop pagination from this endpoint.
Co-authored-by: Jan Beneš <[email protected]>getLogsByTags to private and public versions1 parent e007e7b commit e8de31f
File tree
33 files changed
+727
-410
lines changed- yarn-project
- archiver/src/archiver
- kv_archiver_store
- aztec-node/src/aztec-node
- pxe/src
- contract_function_simulator
- noir-structs
- oracle
- logs
- tagging
- recipient_sync
- utils
- sync
- utils
- stdlib/src
- hash
- interfaces
- logs
33 files changed
+727
-410
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
68 | 76 | | |
69 | 77 | | |
70 | 78 | | |
| |||
1407 | 1415 | | |
1408 | 1416 | | |
1409 | 1417 | | |
1410 | | - | |
1411 | | - | |
1412 | | - | |
1413 | | - | |
1414 | | - | |
1415 | | - | |
1416 | | - | |
1417 | | - | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
1418 | 1428 | | |
1419 | 1429 | | |
1420 | 1430 | | |
| |||
2072 | 2082 | | |
2073 | 2083 | | |
2074 | 2084 | | |
2075 | | - | |
2076 | | - | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
| 2088 | + | |
| 2089 | + | |
| 2090 | + | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
2077 | 2094 | | |
2078 | 2095 | | |
2079 | 2096 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
210 | | - | |
| 209 | + | |
| 210 | + | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
216 | 230 | | |
217 | 231 | | |
218 | 232 | | |
| |||
0 commit comments