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

EIP-1344 Add CHAINID op-code #10983

Merged
merged 113 commits into from
Aug 28, 2019
Merged

Conversation

dvdplm
Copy link
Collaborator

@dvdplm dvdplm commented Aug 21, 2019

Part of #10770

Closes #10982

Based on #10978

Move the BlockInfo trait to new crate
Contains code extracted from ethcore that defines `Machine`, `Externalities` and other execution related code.
* master:
  Allow default block parameter to be blockHash (#10932)
  Enable sealing when engine is ready (#10938)
  Fix some warnings and typos. (#10941)
* master:
  unify loading spec && further spec cleanups (#10948)
  refactor: Refactor evmbin CLI (#10742)
  journaldb changes (#10929)
* master:
  Fix compiler warnings in util/io and upgrade to edition 2018 Upgrade mio to latest (#10953)
Cleanup Executed as exported from machine crate
Sort out default impls for EpochVerifier
* master:
  Make ClientIoMessage generic over the Client (#10981)
  bump spin to 0.5.2 (#10996)
  fix compile warnings (#10993)
  Fix compilation on recent nightlies (#10991)
  [ipfs] Convert to edition 2018 (#10979)
@dvdplm
Copy link
Collaborator Author

dvdplm commented Aug 28, 2019

@sorpaas rebased, should be easier to review now.

ethcore/vm/src/schedule.rs Outdated Show resolved Hide resolved
dvdplm and others added 3 commits August 28, 2019 10:44
Co-Authored-By: Andronik Ordian <write@reusable.software>
…aritytech/parity-ethereum into dp/feature/eip-1344-add-ChainID-opcode

* 'dp/feature/eip-1344-add-ChainID-opcode' of github.com:paritytech/parity-ethereum:
  Update ethcore/vm/src/schedule.rs
@dvdplm dvdplm requested a review from ordian August 28, 2019 09:42
Copy link
Collaborator

@ordian ordian left a comment

Choose a reason for hiding this comment

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

LGTM

// 7f PUSH32 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
// 01 ADD
// 60 00 PUSH 0
// 55 SSTORE
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would be nice to have a macro/builder for bytecode instead of having comments, but that's outside of the scope of the PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In the meantime https://ethervm.io/decompile can be helpful.

@ordian ordian added A8-looksgood 🦄 Pull request is reviewed well. B0-patch-stable 🕷 Pull request should also be back-ported to the stable branch. B1-patch-beta 🕷🕷 M4-core ⛓ Core client code / Rust. and removed A0-pleasereview 🤓 Pull request needs code review. labels Aug 28, 2019
@ordian ordian added this to the 2.7 milestone Aug 28, 2019
@@ -416,6 +416,10 @@ impl<'a, T: 'a, V: 'a, B: 'a> Ext for Externalities<'a, T, V, B>
self.env_info
}

fn chain_id(&self) -> u64 {
self.machine.params().chain_id
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just a note that this has the behavior that if EIP-155 is not enabled on a chain, its CHAIN_ID will instead return the network id. This is never specified in EIP-1344, but looks like acceptable behavior for now.

@sorpaas sorpaas merged commit 5ce249a into master Aug 28, 2019
dvdplm added a commit that referenced this pull request Aug 29, 2019
…ndent-ops

* master:
  xDai chain support and nodes list update (#10989)
  [trace] check mem diff within range (#11002)
  EIP-1344 Add CHAINID op-code (#10983)
@ordian ordian deleted the dp/feature/eip-1344-add-ChainID-opcode branch August 29, 2019 11:20
ordian added a commit to ordian/parity that referenced this pull request Aug 29, 2019
* master:
  EIP 1884 Re-pricing of trie-size dependent operations (openethereum#10992)
  xDai chain support and nodes list update (openethereum#10989)
  [trace] check mem diff within range (openethereum#11002)
  EIP-1344 Add CHAINID op-code (openethereum#10983)
  Make ClientIoMessage generic over the Client (openethereum#10981)
  bump spin to 0.5.2 (openethereum#10996)
  fix compile warnings (openethereum#10993)
dvdplm added a commit that referenced this pull request Sep 11, 2019
s3krit pushed a commit that referenced this pull request Sep 11, 2019
This was referenced Sep 12, 2019
s3krit added a commit that referenced this pull request Sep 12, 2019
* add more tx tests (#11038)
* Fix parallel transactions race-condition (#10995)
* Add blake2_f precompile (#11017)
* [trace] introduce trace failed to Ext (#11019)
* Edit publish-onchain.sh to use https (#11016)
* Fix deadlock in network-devp2p (#11013)
* EIP 1108: Reduce alt_bn128 precompile gas costs (#11008)
* xDai chain support and nodes list update (#10989)
* EIP 2028: transaction gas lowered from 68 to 16 (#10987)
* EIP-1344 Add CHAINID op-code (#10983)
* manual publish jobs for releases, no changes for nightlies (#10977)
* [blooms-db] Fix benchmarks (#10974)
* Verify transaction against its block during import (#10954)
* Better error message for rpc gas price errors (#10931)
* Fix fork choice (#10837)
* Fix compilation on recent nightlies (#10991)
s3krit added a commit that referenced this pull request Sep 12, 2019
* add more tx tests (#11038)
* Fix parallel transactions race-condition (#10995)
* Add blake2_f precompile (#11017)
* [trace] introduce trace failed to Ext (#11019)
* Edit publish-onchain.sh to use https (#11016)
* Fix deadlock in network-devp2p (#11013)
* EIP 1108: Reduce alt_bn128 precompile gas costs (#11008)
* xDai chain support and nodes list update (#10989)
* EIP 2028: transaction gas lowered from 68 to 16 (#10987)
* EIP-1344 Add CHAINID op-code (#10983)
* manual publish jobs for releases, no changes for nightlies (#10977)
* [blooms-db] Fix benchmarks (#10974)
* Verify transaction against its block during import (#10954)
* Better error message for rpc gas price errors (#10931)
* tx-pool: accept local tx with higher gas price when pool full (#10901)
* Fix fork choice (#10837)
* Cleanup unused vm dependencies (#10787)
* Fix compilation on recent nightlies (#10991)
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. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EIP-1344: Add ChainID opcode
5 participants