Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blockchain reorg testing framework #44

Closed
InoMurko opened this issue May 8, 2020 · 9 comments
Closed

blockchain reorg testing framework #44

InoMurko opened this issue May 8, 2020 · 9 comments
Assignees
Labels
testing testing the description that this is a test

Comments

@InoMurko
Copy link
Contributor

InoMurko commented May 8, 2020

I would like to be able to trigger random reorgs on private geth chains of N depth. I believe something like that could possibly be achieved with docker engine and https://github.com/alexei-led/pumba (or similar tool, that allows you to manipulate network and containers).

This was we are going to be able to validate our assumptions in designing childchain and provide proofs of whit-standing these attacks and glitches.


linked: #31

@InoMurko
Copy link
Contributor Author

InoMurko commented May 8, 2020

blocks #45

@InoMurko
Copy link
Contributor Author

@InoMurko
Copy link
Contributor Author

https://github.com/drandreaskrueger/chainhammer
Chain hammer: This is a collection of python scripts that rapidly sends asynchronous transactions to an Ethereum node.

https://github.com/wolfcw/libfaketime
libfaketime: This library allows us to intercept system calls made within the containers and return values modified by the user. With this, we were able to simulate clock skew between the containers.

@InoMurko
Copy link
Contributor Author

@ayrat555
Copy link
Contributor

ayrat555 commented Jun 1, 2020

@InoMurko Can we just use geth chain config which defines block numbers for hard forks?

{
  "config": {
    "chainId": <arbitrary positive integer>,
    "homesteadBlock": 0,
    "eip150Block": 0,
    "eip155Block": 0,
    "eip158Block": 0,
    "byzantiumBlock": 0,
    "constantinopleBlock": 0,
    "petersburgBlock": 0,
    "istanbulBlock": 0
  },
...

@InoMurko
Copy link
Contributor Author

InoMurko commented Jun 1, 2020

Hmm. This issue is specifically related to manually induce https://en.bitcoin.it/wiki/Chain_Reorganization

@boolafish
Copy link

some of my previous note talking with white block: https://omisego.atlassian.net/l/c/2ECjxSf6

@InoMurko
Copy link
Contributor Author

InoMurko commented Jun 1, 2020

This is cool. I would like to wait for @ayrat555 to review the task in detail, provide some feedback to us how difficult would this be to create on our own - since we would like to see this testable, we would need this continuously (in CI).

@ayrat555
Copy link
Contributor

ayrat555 commented Jun 1, 2020

Currently, I'm trying to do the following:

  1. Create private geth chain with 2 nodes with clique poa consensus
  2. Disconnect nodes from each other using pumba
  3. Submit the same transaction to both of them
  4. Connect these nodes to each other again

@achiurizo achiurizo removed their assignment Jun 5, 2020
@achiurizo achiurizo added the testing testing the description that this is a test label Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing testing the description that this is a test
Projects
None yet
Development

No branches or pull requests

4 participants