Skip to content

Conversation

@nicholaspai
Copy link
Member

@nicholaspai nicholaspai commented Mar 11, 2022

Root bundle data can be grabbed deterministically by looking up the latest ProposeRootBundle event before the DisputeRootBundle event, so some of the ancillary data currently emitted by the HubPool is redundant.

The reason why we assume that voters will have to fetch a ProposeRootBundle event is that the root bundle's blockEvaluationNumbers are not stored on-chain. If they were stored on-chain, we could emit all of the data necessary to evaluate a dispute in the ancillary data. But since blockEvaluationNumbers are not stored-onchain, voters will have to look up the ProposeRootBundle event regardless and therefore we should not expend gas emitting data already included in that event.

@nicholaspai nicholaspai marked this pull request as ready for review March 11, 2022 15:38
@mrice32
Copy link
Contributor

mrice32 commented Mar 15, 2022

@chrismaree @nicholaspai have we made a definitive decision as to whether we want to do this? Is all of this context easily derivable from events?

Maybe a compromise would just be putting the roots in, but removing the other fields. For instance, I think the claimed bitmap will always be 0. Similarly, I think we should at least rename the unclaimed leaves variable, since in this case this would just be the number of leaves, since this dispute would happen before execution starts.

Thoughts?

Copy link
Contributor

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nicholaspai
Copy link
Member Author

@mrice32 I believe that fetching the ProposeRootBundle is required for voters because of the bundleEvaluationNumbers not being stored on-chain. See the PR description:

The reason why we assume that voters will have to fetch a ProposeRootBundle event is that the root bundle's blockEvaluationNumbers are not stored on-chain. If they were stored on-chain, we could emit all of the data necessary to evaluate a dispute in the ancillary data. But since blockEvaluationNumbers are not stored-onchain, voters will have to look up the ProposeRootBundle event regardless and therefore we should not expend gas emitting data already included in that event.

Therefore all of the ancillary data that I've removed in this PR can be found in that event so there's really no point in emitting it here. Even if we emit the merkle roots in this ancillary data, voters will still need to look up the bundle block numbers right?

Copy link
Contributor

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree this makes sense! Note: it is required that the OO relays the address of the requester to the DVM (which I think it does).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants