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

instantSeal engine wont seal more than one block #11173

Closed
tristan opened this issue Oct 16, 2019 · 2 comments · Fixed by #11186
Closed

instantSeal engine wont seal more than one block #11173

tristan opened this issue Oct 16, 2019 · 2 comments · Fixed by #11186
Assignees
Labels
F2-bug 🐞 The client fails to follow expected behavior. M4-core ⛓ Core client code / Rust. Z0-unconfirmed 🤔 Issue might be valid, but it’s not yet known.
Milestone

Comments

@tristan
Copy link

tristan commented Oct 16, 2019

  • Parity Ethereum version: >=2.5.8
  • Operating system: Archlinux (kernel 5.3.6)
  • Installation: pacman (for <=2.5.9) and built from source (for 2.6.4)
  • Fully synchronized: N/A
  • Network: custom instantSeal (Chain file)
  • Restarted: yes

After upgrading to 2.5.9 I noticed that my instantSeal network would no longer seal more than one block. i.e. The first transaction submitted correctly creates a new block, but after submitting a second transaction nothing happens.

I created a script to test this which can be found here. The script checks the parity version, creates the relevant chain file, starts parity, then attempts to submit a number of transactions, checking they have been included in a block before continuing to the next. Using parity 2.5.7, the script runs to completion as expected. Upgrading to 2.5.8 and later (including 2.6.4), the script will get stuck forever waiting for the 2nd block to be sealed.

From the logs (with --logging own_tx=trace,rpc=trace,chain=trace,engine=trace,miner=trace,state=trace) i see a bunch of things around the first transaction (which i don't really follow), but for the 2nd transaction all i see is the Imported to the pool message (from own_tx) and nothing else.

I've tried a bunch of different options including, different networkId, different starting nonces for my base account, different base accounts, sending the second transaction from a different account, none of which changed the outcome.

Parity is started using the following arguments

/usr/bin/parity 
    --port $PORT 
    --no-color
    --chain $TMP_DIR/chain.json 
    --author 0102030405060708090001020304050607080900 
    --tracing on 
    --node-key 74a32e8a5ea986ebb4becf4746a09b2bb7abb8ee09f6ead3bc4c0d8968fc27ed
    --base-path $TMP_DIR/data
    --jsonrpc-port $JSONRPC_PORT 
    --jsonrpc-hosts all 
    --ws-interface local 
    --ws-port $WS_PORT 
    --ws-origins all 
    --ws-hosts all 
    --min-gas-price 10000000000 
    --logging "own_tx=trace,rpc=trace,chain=trace,engine=trace,miner=trace,state=trace"

The chain file used can be seen here.

@jam10o-new jam10o-new added F2-bug 🐞 The client fails to follow expected behavior. M4-core ⛓ Core client code / Rust. Z0-unconfirmed 🤔 Issue might be valid, but it’s not yet known. labels Oct 16, 2019
@jam10o-new jam10o-new added this to the 2.7 milestone Oct 16, 2019
@seunlanlege
Copy link
Member

seunlanlege commented Oct 21, 2019

Hi @tristan the script you provided was very useful thank you for that.

The reason InstantSeal won't seal blocks when you send a transaction is because of command-line argument defaults: --reseal-max-period which defaults to 120 seconds and --reseal-min-period which defaults to 2 seconds

In a future release, parity-ethereum will handle this automatically by setting them to zero for the InstantSeal engine. But for now, please run with these extra options --reseal-max-period 0 --reseal-min-period 0 so InstantSeal can seal blocks immediately.

@tristan
Copy link
Author

tristan commented Oct 22, 2019

Thanks @seunlanlege ! adding these options fixed things for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F2-bug 🐞 The client fails to follow expected behavior. M4-core ⛓ Core client code / Rust. Z0-unconfirmed 🤔 Issue might be valid, but it’s not yet known.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants