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

Panic when switching to Ethash from PoA #10599

Closed
zscole opened this issue Apr 17, 2019 · 6 comments
Closed

Panic when switching to Ethash from PoA #10599

zscole opened this issue Apr 17, 2019 · 6 comments
Labels
F1-panic 🔨 The client panics and exits without proper error handling. M4-core ⛓ Core client code / Rust. Z8-wontfix 🙅‍♀️ Issue is in principle valid, but this project will not address it. Closer should explain why.
Milestone

Comments

@zscole
Copy link

zscole commented Apr 17, 2019

  • Parity Ethereum version: 2.4.5
  • Operating system: Linux
  • Installation: built from source
  • Fully synchronized: no
  • Network: ethereum
  • Restarted: no

For testing purposes within a controlled environment, we attempted to generate a large state using PoA, then switch to Ethash in order to allow additional nodes to join the network and sync with this large state. We made multiple attempts under various configurations, but the client didn't seem to like any of them. Our last attempt resulted in the following panic:

Loading config file from /parity-poa/config.toml
2019-04-17 06:49:15 UTC main INFO ethcore_service::service  Configured for whiteblock using Ethash engine


====================

stack backtrace:
   0:     0x56008829866d - backtrace::backtrace::trace::haa2270d18230204f
   1:     0x560088297792 - backtrace::capture::Backtrace::new::h692bc46e5120c9eb
   2:     0x560088296946 - panic_hook::gen_panic_msg::h1242155ed941885b
   3:     0x560088296721 - panic_hook::set_with::{{closure}}::he0cc7c2fbb0e63dc
   4:     0x5600883091c9 - std::panicking::rust_panic_with_hook::h8cbdfe43764887be
                        at src/libstd/panicking.rs:495
   5:     0x560088308c71 - std::panicking::continue_panic_fmt::h3d3c5a833c00a5e1
                        at src/libstd/panicking.rs:398
   6:     0x560088308b55 - rust_begin_unwind
                        at src/libstd/panicking.rs:325
   7:     0x5600883267cc - core::panicking::panic_fmt::h4d67173bc68f6d5a
                        at src/libcore/panicking.rs:95
   8:     0x560088326da1 - core::slice::slice_index_order_fail::h0e662b493ebc9fb3
                        at src/libcore/slice/mod.rs:2355
   9:     0x560087077370 - parity_ethereum::blockchain::execute_import::hecaa5ea5bcbddac8
  10:     0x56008706d9eb - parity_ethereum::blockchain::execute::h43664afa6688f82a
  11:     0x560086e04b0d - parity_ethereum::start::h26c4cbc9c2342548
  12:     0x560086dec5f7 - parity::main_direct::h69ceed2b62e5b4eb
  13:     0x560086defd01 - parity::main::ha99621f7fe011685
  14:     0x560086d03412 - std::rt::lang_start::{{closure}}::h2e522e003c8d0b18
  15:     0x560088308af2 - std::rt::lang_start_internal::{{closure}}::hdfc28107b5be47c9
                        at src/libstd/rt.rs:59
                         - std::panicking::try::do_call::h69790245ac2d03fe
                        at src/libstd/panicking.rs:310
  16:     0x56008831fc79 - __rust_maybe_catch_panic
                        at src/libpanic_unwind/lib.rs:102
  17:     0x560088309583 - std::panicking::try::h9c1cbc5599e1efbf
                        at src/libstd/panicking.rs:289
                         - std::panic::catch_unwind::h0562757d03ff60b3
                        at src/libstd/panic.rs:398
                         - std::rt::lang_start_internal::h540c897fe52ba9c5
                        at src/libstd/rt.rs:58
  18:     0x560086df0671 - main
  19:     0x7f038a7f2b96 - __libc_start_main
  20:     0x5600869eecf9 - _start
  21:                0x0 - <unknown>

Thread 'main' panicked at 'slice index starts at 8 but ends at 1', src/libcore/slice/mod.rs:2355

This is a bug. Please report it at:

    https://github.com/paritytech/parity-ethereum/issues/new

Aborted (core dumped)```

I'm not sure what the expected output is since this we're pretty much hacking the client, but figured this could be of some value to you guys in the future. 
@HCastano HCastano added F1-panic 🔨 The client panics and exits without proper error handling. M4-core ⛓ Core client code / Rust. labels Apr 17, 2019
@jam10o-new jam10o-new added F8-enhancement 🎊 An additional feature request. Z5-intended 🎯 Issue describes a behavior which turns out to work as intended. Closer should explain why. labels Apr 17, 2019
@jam10o-new
Copy link
Contributor

we don't currently support changing the engine mid-chain, but it is something requested quite often.

@zscole
Copy link
Author

zscole commented Apr 17, 2019

Sorry, should have clarified: we're not switching engine mid-chain. We're generating state in PoA network, exporting it, and then importing that state in a new Ethash chain.

@jam10o-new jam10o-new removed the Z5-intended 🎯 Issue describes a behavior which turns out to work as intended. Closer should explain why. label Apr 17, 2019
@jam10o-new
Copy link
Contributor

ah sorry, didn't connect this issue to our conversation on riot.

@jam10o-new jam10o-new removed the F8-enhancement 🎊 An additional feature request. label Apr 17, 2019
@jam10o-new jam10o-new added this to the 2.6 milestone Apr 17, 2019
@zscole
Copy link
Author

zscole commented Apr 17, 2019

No problem. I have additional logs to share as well, however, I'll have to do so later. Please let me know if you need additional details as well.

@jam10o-new
Copy link
Contributor

for anyone wanting to replicate this - here is the process to export state from one chain and import it in the genesis of another: #10304 (comment)

@jam10o-new
Copy link
Contributor

Hey @zscole, while exporting and importing state is definitely something we support, I don't think we can reasonably support changing the engine mid-chain without more significant changes at this stage, and I'm not sure we should spend time fixing issues for a usecase we don't really support.

Closing this for now, but we're open to discussion on how to do this properly.

@jam10o-new jam10o-new added the Z8-wontfix 🙅‍♀️ Issue is in principle valid, but this project will not address it. Closer should explain why. label Jul 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F1-panic 🔨 The client panics and exits without proper error handling. M4-core ⛓ Core client code / Rust. Z8-wontfix 🙅‍♀️ Issue is in principle valid, but this project will not address it. Closer should explain why.
Projects
None yet
Development

No branches or pull requests

3 participants