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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
turnNumRecord -- this is always the turn num of the candidate (emitted)
isFinal -- again this is already emitted in the candidate state
fixedPart: I think it is safe to assume off chain clients have this already, if they are "interested in" this channel id
We can go further
The finalizesAt is easily computable by the event block timestamp plus the challenge duration in the fixed part. Only thing is, we will need to go back to the Ethereum JSON API to get the block timestamp from the blocknumber. If we were using block number- based challenge durations, this problem would go away.
If we are happy to claw information back from the calldata of the transaction causing the event, we probably don't need to re-emit candidate and proof.
turnNumRecord -- this is always the turn num of the candidate (emitted)
isFinal -- again this is already emitted in the candidate state
fixedPart: I think it is safe to assume off chain clients have this already, if they are "interested in" this channel id
If we are happy to claw information back from the calldata of the transaction causing the event, we probably don't need to re-emit candidate and proof.
In theory I think we could just emit a challenge event with the channelId to alert someone a challenge has occurred and the rest of the information could be parsed from the challenge call data. I think you could even avoid events all together by just monitoring blocks for transactions to the adjudicator; although this would be a lot less efficient since you can't utilize the log bloom.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Towards #1588
Justifications:
turnNumRecord
-- this is always the turn num of the candidate (emitted)isFinal
-- again this is already emitted in the candidate statefixedPart
: I think it is safe to assume off chain clients have this already, if they are "interested in" this channel idWe can go further
The
finalizesAt
is easily computable by the event block timestamp plus the challenge duration in the fixed part. Only thing is, we will need to go back to the Ethereum JSON API to get the block timestamp from the blocknumber. If we were using block number- based challenge durations, this problem would go away.If we are happy to claw information back from the calldata of the transaction causing the event, we probably don't need to re-emit
candidate
andproof
.These ideas can be the subject of future PRs.