Coder Social home page Coder Social logo

Comments (10)

xcthulhu avatar xcthulhu commented on July 1, 2024

Try running ./generate-chainspec.sh.

from casper-node.

bingryan avatar bingryan commented on July 1, 2024
➜  casper-node git:(master) ./generate-chainspec.sh
Generating chainspec...
➜  casper-node git:(master) sudo ./generate-chainspec.sh
Generating chainspec...
➜  casper-node git:(master) casper-node validator /etc/casper-node/config.toml

Mar 17 18:06:09.384 INFO  [casper_node::cli cli.rs:149] node starting up; version=0.9.0-cb1d20ad
Mar 17 18:06:09.384 WARN  [casper_node::reactor reactor.rs:437] large event size, consider reducing it or boxing; event_size=272
Error: chainspec error: decoding from TOML error: timestamp format is invalid for key `network.timestamp` at line 208 column 1

Caused by:
    0: decoding from TOML error: timestamp format is invalid for key `network.timestamp` at line 208 column 1
    1: timestamp format is invalid for key `network.timestamp` at line 208 column 1
➜  casper-node git:(master) cd /etc/casper-node/
➜  casper-node ls
chainspec.toml  config.toml

@xcthulhu Can't solve this problem

from casper-node.

bingryan avatar bingryan commented on July 1, 2024

I use root user :

root@ubuntu:/etc/casper-node# casper-node validator /etc/casper-node/config.toml
Mar 17 18:40:06.795 INFO  [casper_node::cli cli.rs:149] node starting up; version=0.9.0-cb1d20ad
Mar 17 18:40:06.796 WARN  [casper_node::reactor reactor.rs:437] large event size, consider reducing it or boxing; event_size=272
Error: chainspec error: decoding from TOML error: timestamp format is invalid for key `network.timestamp` at line 209 column 1

Caused by:
    0: decoding from TOML error: timestamp format is invalid for key `network.timestamp` at line 209 column 1
    1: timestamp format is invalid for key `network.timestamp` at line 209 column 1
root@ubuntu:/etc/casper-node# vim chainspec.toml

then I change timestamp at chainspec.toml

[network]
# Human readable name for convenience; the genesis_hash is the true identifier.  The name influences the genesis hash by
# contributing to the seeding of the pseudo-random number generator used in contract-runtime for computing genesis
# post-state hash.
name = 'casper-example'
# Timestamp for the genesis block.  This is the beginning of era 0. By this time, a sufficient majority (> 50% + F/2 —
# see finality_threshold_percent below) of validator nodes must be up and running to start the blockchain.  This
# timestamp is also used in seeding the pseudo-random number generator used in contract-runtime for computing genesis
# post-state hash.
# timestamp = '${TIMESTAMP}'
timestamp = '2021-03-18T01:11:50.043088Z'
root@ubuntu:/etc/casper-node# casper-node validator /etc/casper-node/config.toml
Mar 17 18:40:29.619 INFO  [casper_node::cli cli.rs:149] node starting up; version=0.9.0-cb1d20ad
Mar 17 18:40:29.620 WARN  [casper_node::reactor reactor.rs:437] large event size, consider reducing it or boxing; event_size=272
Mar 17 18:40:29.621 WARN  [casper_node::components::chainspec_loader chainspec_loader.rs:722] failed to get a valid version from subdirs; dir=/etc; error=failed to get a valid version from subdirs in /etc
Mar 17 18:40:29.622 INFO  [casper_node::components::storage storage.rs:279] reindexing block store
Mar 17 18:40:29.622 INFO  [casper_node::components::storage storage.rs:306] block store reindexing complete
Mar 17 18:40:29.630 INFO  [casper_node::reactor reactor.rs:451] reactor main loop is ready
Mar 17 18:40:29.641 INFO  [casper_node::components::chainspec_loader chainspec_loader.rs:505] chainspec name casper-example
Mar 17 18:40:29.641 INFO  [casper_node::components::chainspec_loader chainspec_loader.rs:506] genesis state root hash Blake2bHash(0x6db355c5186e3610ed046d4a174e6f94c931cdb97532b2a596b9b3570c5465ad)
Mar 17 18:40:29.641 INFO  [casper_node::cli cli.rs:178] finished initialization
Mar 17 18:40:29.641 WARN  [casper_node::reactor reactor.rs:437] large event size, consider reducing it or boxing; event_size=648
Mar 17 18:40:29.641 INFO  [casper_node::components::small_network small_network.rs:272] NodeId::Tls(d208..6534): starting server background task; local_address=0.0.0.0:34553; public_address=127.0.0.1:34553
Mar 17 18:40:29.641 ERROR [casper_node::reactor::joiner joiner.rs:444] Node started with no trusted hash after the expected end of the genesis era! Please specify a trusted hash and restart. Time: 2021-03-18T01:40:29.641Z, End of genesis era: 2021-03-18T01:12:31.043Z
   0: casper_node::panic_hook
   1: core::ops::function::Fn::call
   2: std::panicking::rust_panic_with_hook
             at /rustc/f76ecd0668fcdb289456cdc72a39ad15467cc454/library/std/src/panicking.rs:595:17
   3: std::panicking::begin_panic::{{closure}}
   4: std::sys_common::backtrace::__rust_end_short_backtrace
   5: std::panicking::begin_panic
   6: <casper_node::reactor::joiner::Reactor as casper_node::reactor::Reactor>::new
   7: casper_node::cli::Cli::run::{{closure}}
   8: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
   9: std::thread::local::LocalKey<T>::with
  10: tokio::runtime::enter::Enter::block_on
  11: tokio::runtime::thread_pool::ThreadPool::block_on
  12: tokio::runtime::context::enter
  13: tokio::runtime::handle::Handle::enter
  14: casper_node::main
  15: std::sys_common::backtrace::__rust_begin_short_backtrace
  16: std::rt::lang_start::{{closure}}
  17: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/f76ecd0668fcdb289456cdc72a39ad15467cc454/library/core/src/ops/function.rs:259:13
      std::panicking::try::do_call
             at /rustc/f76ecd0668fcdb289456cdc72a39ad15467cc454/library/std/src/panicking.rs:379:40
      std::panicking::try
             at /rustc/f76ecd0668fcdb289456cdc72a39ad15467cc454/library/std/src/panicking.rs:343:19
      std::panic::catch_unwind
             at /rustc/f76ecd0668fcdb289456cdc72a39ad15467cc454/library/std/src/panic.rs:396:14
      std::rt::lang_start_internal
             at /rustc/f76ecd0668fcdb289456cdc72a39ad15467cc454/library/std/src/rt.rs:51:25
  18: main
  19: __libc_start_main
  20: _start

node panicked: should have trusted hash after genesis era
Aborted (core dumped)

from casper-node.

sacherjj avatar sacherjj commented on July 1, 2024

Can you explain what you are actually trying to do? None of these show bugs, they are configuration issues with your setup.

from casper-node.

bingryan avatar bingryan commented on July 1, 2024

@sacherjj hi, I just want to run a node for my machine.

from casper-node.

sacherjj avatar sacherjj commented on July 1, 2024

By itself or to join the Delta-11 test network?

from casper-node.

bingryan avatar bingryan commented on July 1, 2024

By itself or to join the Delta-11 test network?

By itself

from casper-node.

sacherjj avatar sacherjj commented on July 1, 2024

So your need an accounts.toml file with your key and a validating balance that will have your node as a 100% validating weight.
The last error you posted is that you need a trusted hash after genesis time. This means that you set your genesis time in the past. You need to have that in the future and have your node running prior to genesis time. You also need your own node in known_addresses of config.toml.

To work on networks locally you might also look at the /utils/nctl which is a system to run multiple nodes on one machine to start a Casper network on one machine.

from casper-node.

bingryan avatar bingryan commented on July 1, 2024

hi@sacherjj ,Is there a more friendly deployment document? I want to run a node and experience some functions. I read readme.md step by step, but I can't normal start.

from casper-node.

sacherjj avatar sacherjj commented on July 1, 2024

We are working on that and hope to improve shortly.

from casper-node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.