Skip to content

Comments

Governable block gas limit#522

Merged
asaj merged 21 commits intocelo-org:masterfrom
mrsmkl:param-gaslimit-474
Nov 7, 2019
Merged

Governable block gas limit#522
asaj merged 21 commits intocelo-org:masterfrom
mrsmkl:param-gaslimit-474

Conversation

@mrsmkl
Copy link
Contributor

@mrsmkl mrsmkl commented Oct 11, 2019

Description

Reads the block gas limit from a governable contract.

Tested

I'll add test to the corresponding PR celo-org/celo-monorepo#1253

Other changes

Related issues

Backwards compatibility

@mrsmkl mrsmkl requested a review from asaj as a code owner October 11, 2019 08:29
@asaj
Copy link
Contributor

asaj commented Oct 11, 2019

@mrsmkl when this is ready to review would you mind assigning me (or someone else?)

@mrsmkl mrsmkl assigned asaj and unassigned mrsmkl Oct 14, 2019
ParentHash: parent.Hash(),
Number: parent.Number().Add(parent.Number(), common.Big1),
GasLimit: core.CalcGasLimit(parent, parent.GasLimit(), parent.GasLimit()),
GasLimit: core.CalcGasLimit(parent, nil, parent.GasLimit(), parent.GasLimit()),
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to store this in the block header at all anymore, since it can be read from the state trie?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well there is still the time before the contracts are deployed, how should that be handled?

Copy link
Contributor

Choose a reason for hiding this comment

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

Good question. Should we have a fallback value that we define in protocol_params.go?

@asaj asaj assigned mrsmkl and unassigned asaj Oct 14, 2019
@mrsmkl mrsmkl assigned asaj and unassigned mrsmkl Nov 6, 2019
ParentHash: parent.Hash(),
Number: parent.Number().Add(parent.Number(), common.Big1),
GasLimit: core.CalcGasLimit(parent, parent.GasLimit(), parent.GasLimit()),
GasLimit: core.CalcGasLimit(parent, nil),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should remove this field from the block header

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perhaps this should be in another PR, changing the header seems to break many things in the tests.

Copy link
Contributor

Choose a reason for hiding this comment

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

Works for me!

@asaj
Copy link
Contributor

asaj commented Nov 6, 2019

It looks like there's an end-to-end test failure

@asaj asaj removed their assignment Nov 6, 2019
@mrsmkl mrsmkl assigned asaj and unassigned mrsmkl Nov 7, 2019
Copy link
Contributor

@asaj asaj left a comment

Choose a reason for hiding this comment

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

Is the monorepo PR in the description the correct corresponding PR? It seems slightly unrelated.

ParentHash: parent.Hash(),
Number: parent.Number().Add(parent.Number(), common.Big1),
GasLimit: core.CalcGasLimit(parent, parent.GasLimit(), parent.GasLimit()),
GasLimit: core.CalcGasLimit(parent, nil),
Copy link
Contributor

Choose a reason for hiding this comment

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

Works for me!

@asaj asaj merged commit 8d79a06 into celo-org:master Nov 7, 2019
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.

Protocol SBAT set block gas limit via governance

2 participants