Closed yondonfu closed 3 years ago
I believe I may be affected by the same bug - this is a similar query to the one above if it's of any help to reproduce.
{
transcoders(where:{ id:"0x74ba897f65f04008d8eff364efcc54b0a20e17eb" }) {
active
activationRound
deactivationRound
}
transcoderActivatedEvents(where: { delegate: "0x74ba897f65f04008d8eff364efcc54b0a20e17eb" }) {id
transaction {
blockNumber
}
activationRound
round {
id
}
}
transcoderDeactivatedEvents(where: { delegate: "0x74ba897f65f04008d8eff364efcc54b0a20e17eb" }) {
round {
id
}
transaction {
blockNumber
}
deactivationRound
}
}
@compscidr A fix for this bug has been deployed to the Livepeer subgraph.
@compscidr A fix for this bug has been deployed to the Livepeer subgraph.
Yes thank you it's been working since the fix was deployed. 🚀
The newRound handler processes pending activations from the previous round and then pending deactivations from the previous round. If a TranscoderDeactivated event is emitted in the previous round and then a TranscoderActivated event is emitted in the previous round for the same transcoder address then the pending activation will be processed before the pending deactivation resulting in the
active
field of the transcoder being set to false. In this case, theactive
field of the transcoder should be set to true, because the TranscoderDeactivated event was emitted before the TranscoderActivated even in the previous round.For an example of this bug in the wild, run the following query at https://thegraph.com/hosted-service/subgraph/livepeer/livepeer
Notice that the
active
field for the transcoder is set to false when it should be set to true.The sequence of events that results in the data returned from the above query: