Repository navigation
Commit 73c0d5b
committed
fix: show delegated reward calls in account history
Account history is keyed on the transaction sender:
transactions(where: { from: $account })
Since LIP-118 (livepeer/protocol#648) an orchestrator can nominate a
reward caller to submit reward() on its behalf. That transaction is sent
by the caller, so it drops out of the query and every event inside it -
including the RewardEvent - disappears from the orchestrator's history.
The event itself was always attributed correctly: RewardEvent.delegate is
the orchestrator regardless of who signed. The blind spot is purely in how
the Explorer asks for it. It cannot be fixed in place either, because
Transaction.events is typed as the Event interface, whose filter exposes
only id/timestamp/transaction/round - delegate lives on the concrete
RewardEvent type, so events_: { delegate: ... } does not exist.
So query the event entity directly, keyed on the orchestrator. This is the
same shape as winningTicketRedeemedEvents, already a separate role-keyed
query in this file for the same reason: a ticket's recipient is an event
param, so it survives being redeemed by a separate wallet.
Excluding RewardEvent from the transaction-path list is what keeps
self-called rewards, which appear in both queries, from rendering twice -
there is no id-based dedupe in this component.
Also require every list to be exhausted before paging stops. Keying that
on transactions alone cuts off exactly the accounts this fixes: an
orchestrator delegating every reward call has few transactions but one
reward event per round. This equally affects gateways with more tickets
than transactions, which 90ab4a1 fixed for totalLoaded but not reachedEnd.
Delegated calls render with the existing copy. Distinguishing them would
mean comparing transaction.from against the account, which is approximate
- a multisig or relayer shows as the sender. The authoritative answer is
Transcoder.rewardCaller, pending livepeer/subgraph#253.1 parent 72a24a1 commit 73c0d5b
3 files changed
Lines changed: 78 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5764 | 5764 | | |
5765 | 5765 | | |
5766 | 5766 | | |
5767 | | - | |
5768 | | - | |
| 5767 | + | |
| 5768 | + | |
5769 | 5769 | | |
5770 | 5770 | | |
5771 | 5771 | | |
| |||
9707 | 9707 | | |
9708 | 9708 | | |
9709 | 9709 | | |
9710 | | - | |
| 9710 | + | |
9711 | 9711 | | |
9712 | 9712 | | |
9713 | 9713 | | |
| |||
10781 | 10781 | | |
10782 | 10782 | | |
10783 | 10783 | | |
| 10784 | + | |
| 10785 | + | |
| 10786 | + | |
| 10787 | + | |
| 10788 | + | |
| 10789 | + | |
| 10790 | + | |
| 10791 | + | |
| 10792 | + | |
| 10793 | + | |
| 10794 | + | |
| 10795 | + | |
| 10796 | + | |
| 10797 | + | |
| 10798 | + | |
| 10799 | + | |
| 10800 | + | |
| 10801 | + | |
10784 | 10802 | | |
10785 | 10803 | | |
10786 | 10804 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
| |||
170 | 172 | | |
171 | 173 | | |
172 | 174 | | |
173 | | - | |
174 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
175 | 185 | | |
176 | 186 | | |
177 | 187 | | |
| 188 | + | |
| 189 | + | |
178 | 190 | | |
179 | 191 | | |
180 | 192 | | |
181 | 193 | | |
182 | | - | |
| 194 | + | |
| 195 | + | |
183 | 196 | | |
184 | 197 | | |
| 198 | + | |
185 | 199 | | |
186 | 200 | | |
187 | 201 | | |
| |||
191 | 205 | | |
192 | 206 | | |
193 | 207 | | |
| 208 | + | |
194 | 209 | | |
195 | 210 | | |
196 | 211 | | |
197 | 212 | | |
198 | 213 | | |
199 | 214 | | |
200 | 215 | | |
201 | | - | |
| 216 | + | |
| 217 | + | |
202 | 218 | | |
203 | 219 | | |
204 | 220 | | |
| |||
210 | 226 | | |
211 | 227 | | |
212 | 228 | | |
| 229 | + | |
213 | 230 | | |
214 | 231 | | |
215 | 232 | | |
216 | 233 | | |
217 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
218 | 242 | | |
219 | 243 | | |
220 | 244 | | |
| |||
223 | 247 | | |
224 | 248 | | |
225 | 249 | | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | 250 | | |
230 | 251 | | |
231 | 252 | | |
232 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
233 | 258 | | |
234 | 259 | | |
235 | 260 | | |
| |||
276 | 301 | | |
277 | 302 | | |
278 | 303 | | |
279 | | - | |
| 304 | + | |
| 305 | + | |
280 | 306 | | |
281 | 307 | | |
282 | 308 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
135 | 157 | | |
0 commit comments