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

Mine one block, force a fork #9434

Closed
dpc opened this issue Aug 29, 2018 · 2 comments
Closed

Mine one block, force a fork #9434

dpc opened this issue Aug 29, 2018 · 2 comments
Labels
F8-enhancement 🎊 An additional feature request. M4-core ⛓ Core client code / Rust. Q5-substantial 📓 Can be fixed by a developer with decent experience.
Milestone

Comments

@dpc
Copy link

dpc commented Aug 29, 2018

I'd like to write a testing framework for stuff that integrates (runs on top of) ethereum node. To ensure correct handling of of corner cases I'd like to simulate things like eg. reorgs.

I was googling for regtest for ethereum and I've found things like: https://wiki.parity.io/Private-development-chain . It seems it covers what I need from a node itself, but I need to tightly control mining.

I need to be able to:

  • mine exactly one block on demand
  • force a fork - make the miner mine on top of an arbitrary block instead of a "longest one"

Describe the solution you'd like
I would like two command line arguments / rpcs:

  • stop-after-one-block
  • force-height=12345

that would accomplish the above.

Describe alternatives you've considered
I haven't considered much and I have no idea about ETH mining. I'm open for suggestions.

I tried to ask the same question in ethminer github, but they've told me that I should probably use cpuminer provided by the network client itself. ethereum-mining/ethminer#1522

@Tbaut Tbaut added Z1-question 🙋‍♀️ Issue is a question. Closer should answer. M4-core ⛓ Core client code / Rust. labels Aug 30, 2018
@Tbaut Tbaut added this to the 2.1 milestone Aug 30, 2018
@5chdn 5chdn modified the milestones: 2.1, 2.2 Sep 11, 2018
@5chdn 5chdn modified the milestones: 2.2, 2.3 Oct 29, 2018
@jam10o-new jam10o-new added F8-enhancement 🎊 An additional feature request. Q5-substantial 📓 Can be fixed by a developer with decent experience. and removed Z1-question 🙋‍♀️ Issue is a question. Closer should answer. labels Nov 9, 2018
@jam10o-new
Copy link
Contributor

This would actually be quite involved to implement, as it would need a new consensus engine/modification of an existing one, and would probably have to come after #8259 is implemented.

@5chdn 5chdn modified the milestones: 2.3, 2.4 Jan 10, 2019
@5chdn 5chdn modified the milestones: 2.4, 2.5 Feb 21, 2019
@soc1c soc1c modified the milestones: 2.5, 2.6 Apr 2, 2019
@ordian ordian modified the milestones: 2.6, 2.7 Jul 12, 2019
@adria0
Copy link

adria0 commented Jul 27, 2020

Closing issue due to its stale state.

@adria0 adria0 closed this as completed Jul 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F8-enhancement 🎊 An additional feature request. M4-core ⛓ Core client code / Rust. Q5-substantial 📓 Can be fixed by a developer with decent experience.
Projects
None yet
Development

No branches or pull requests

7 participants