Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Add EIP-1283 disable transition #10214

Merged
merged 1 commit into from
Jan 21, 2019
Merged

Add EIP-1283 disable transition #10214

merged 1 commit into from
Jan 21, 2019

Conversation

sorpaas
Copy link
Collaborator

@sorpaas sorpaas commented Jan 18, 2019

Add a transition flag that allows disabling EIP-1283 when EIP-1283 is already enabled. Replaces #10191

@sorpaas sorpaas added A0-pleasereview 🤓 Pull request needs code review. M4-core ⛓ Core client code / Rust. labels Jan 18, 2019
@sorpaas sorpaas requested a review from 5chdn January 18, 2019 15:23
@5chdn 5chdn added this to the 2.4 milestone Jan 19, 2019
@5chdn
Copy link
Contributor

5chdn commented Jan 19, 2019

Waiting for confirmation on block numbers from other teams. I proposed blocks 4939394 (Ropsten) and 10255201 (Kovan).

@5chdn 5chdn added B1-patch-beta 🕷🕷 B0-patch-stable 🕷 Pull request should also be back-ported to the stable branch. labels Jan 19, 2019
@@ -300,6 +302,10 @@ impl From<ethjson::spec::Params> for CommonParams {
BlockNumber::max_value,
Into::into,
),
eip1283_disable_transition: p.eip1283_disable_transition.map_or_else(
BlockNumber::max_value,
Copy link
Contributor

@holiman holiman Jan 21, 2019

Choose a reason for hiding this comment

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

This means that the disable-eip will be by default disabled (in other words: eip1283 will be enabled), so unless otherwise specified, eip-1283 will be present. How will this work out for mainnet clients? Will you include the fork numbers for Constantinople+Fix later on in this PR?

Copy link
Contributor

@cheme cheme Jan 21, 2019

Choose a reason for hiding this comment

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

eip 1283 is disabled by default too (eip1283 activation transition also default to max block size).

Copy link
Contributor

@holiman holiman Jan 21, 2019

Choose a reason for hiding this comment

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

Yes, but if someone sets constantinople without setting constantinople-disable, it will not default to mainnet behaviour.

Might be fine, but I chose to default to 'if nil: use same as Constantinople' for the geth PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

abut the json tag name, it applies camelCase to rust field name so it is indeed eip1283DisableTransition in the json.

Copy link
Contributor

Choose a reason for hiding this comment

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

There is no way to "set Constantinople" in Parity Ethereum. You either enable EIP-1283 or you don't (default). You either disable it or you don't (default). So a default chain does neither have a 1283-transition nor a 1283-disable-transition.

Copy link
Contributor

Choose a reason for hiding this comment

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

You either enable EIP-1283 or you don't (default)

Not quite true. You either

  1. Define it, as disabled,
  2. Define it, as enabled,
  3. Don't define it.

In the case where you have set a blocknumber for EIP-1283, but haven't defined eip1283_disable_transition, it will default use 1283. Which is what I'm talking about.

Just clarifying what I meant, not trying to argue that you should do it the way I proposed...

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not understanding your comment. if you define something, than you are not using defaults.

  • eip1283Transition is default BlockNumber::max_value, hence disabled
  • eip1283DisableTransition is default BlockNumber::max_value, hence disabled

So if you don't define 1283, there won't be 1283 by default. You only get it if you set eip1283Transition explicitly.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right. So if you have a chain spec which your colleague gave you a month ago, which has eip1283Transition defined as (in two wooks), and update to the latest parity client, it will roll out the version with 1283, because eip1283_disable_transition is not defined.

An alternative approach would be to have it at 0 unless otherwise defined.

@holiman
Copy link
Contributor

holiman commented Jan 21, 2019

Also, will the spec json tag be eip1283DisableTransition ?

Copy link
Contributor

@cheme cheme left a comment

Choose a reason for hiding this comment

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

LGTM (even if I am really sad we need to disable it). Using first block disable instead of last block enabled in conf seems like the right choice to me (same behavior as enable in applying update).

@5chdn 5chdn added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jan 21, 2019
@5chdn 5chdn merged commit fb07ffa into master Jan 21, 2019
@5chdn 5chdn deleted the sp-eip1283-disable branch January 21, 2019 11:22
5chdn pushed a commit that referenced this pull request Jan 22, 2019
@5chdn 5chdn added the B7-releasenotes 📜 Changes should be mentioned in the release notes of the next minor version release. label Jan 22, 2019
5chdn pushed a commit that referenced this pull request Jan 22, 2019
5chdn added a commit that referenced this pull request Jan 22, 2019
* version: bump stable to 2.2.8

* Update for Android cross-compilation. (#10180)

* build-unix update

* .gitlab-ci update

* Update build-unix.sh

add android postprocessing

* path to android lib

libparity.so

* fix path to libparity

* add android lib to artifacts

* Cancel Constantinople HF on POA Core (#10198)

* Add EIP-1283 disable transition (#10214)

* Enable St-Peters-Fork ("Constantinople Fix") (#10223)

* ethcore: disable eip-1283 on kovan block 10255201

* ethcore: disable eip-1283 on ropsten block 4939394

* ethcore: enable st-peters-fork on mainnet block 7280000

* ethcore: fix kovan chain spec

* version: update fork blocks

* ethcore: disable eip-1283 on sokol block 7026400
5chdn added a commit that referenced this pull request Jan 22, 2019
* version: bump beta to 2.3.1

* Fix _cannot recursively call into `Core`_ issue (#10144)

* Change igd to github:maufl/rust-igd

* Run `igd::search_gateway_from_timeout` from own thread

* Update for Android cross-compilation. (#10180)

* build-unix update

* .gitlab-ci update

* Update build-unix.sh

add android postprocessing

* path to android lib

libparity.so

* fix path to libparity

* add android lib to artifacts

* Run all `igd` methods in its own thread (#10195)

* Cancel Constantinople HF on POA Core (#10198)

* Add EIP-1283 disable transition (#10214)

* Enable St-Peters-Fork ("Constantinople Fix") (#10223)

* ethcore: disable eip-1283 on kovan block 10255201

* ethcore: disable eip-1283 on ropsten block 4939394

* ethcore: enable st-peters-fork on mainnet block 7280000

* ethcore: fix kovan chain spec

* version: update fork blocks

* ethcore: disable eip-1283 on sokol block 7026400
ordian pushed a commit that referenced this pull request Mar 12, 2019
ordian pushed a commit that referenced this pull request Mar 13, 2019
ordian pushed a commit that referenced this pull request Mar 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. B0-patch-stable 🕷 Pull request should also be back-ported to the stable branch. B7-releasenotes 📜 Changes should be mentioned in the release notes of the next minor version release. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants