This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't seem right to provide no gas. then no work will be done and we will almost certainly end up in the wrong state. 50M is an arbitrary amount but we could also set to
U256::max_value
-- the key thing is really that theenv_info
's gas limit is at least the amount of gas provided to the transaction, which seems to be the failure here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for
genesis_epoch_data
, the goal is to get an initial list of validators. when theValidatorSet
is a contract, we have to call a function on that contract to extract the validators. This function needs some gas to read out the validators from storage, allocated memory for them, and ABI-encode the return data.The thought process I've been following so far with ValidatorSet contracts is that supplying infinite gas is fine because the contract is actually part of the consensus process and shouldn't be subject to the metering rules or have an escape-hatch from turing-completeness. The same should apply here.