I normally test mining wtih regtest, but just now I tried with alpha and I get this error:
2024-05-30T17:01:43.378836263Z WARN ThreadId(03) neptune_core::models::blockchain::block: Block's timestamp (1717088503376) should be greater than or equal to that of previous block (1719792000000)
previous <= current ?? false
thread 'tokio-runtime-worker' panicked at /home/danda/dev/neptune/neptune-core/src/mine_loop.rs:471:17:
Own mined block must be valid. Failed validity check after successful PoW check.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
This is while mining block 1. Notice that the previous block (genesis) is larger.
Investigating a bit further:
$ cargo run --bin neptune-cli -- block-info height/0 | grep time
timestamp: 2024-06-30T17:00:00-07:00
Hmm, today is 2024-05-30, so that date is in the future.
I normally test mining wtih regtest, but just now I tried with alpha and I get this error:
This is while mining block 1. Notice that the previous block (genesis) is larger.
Investigating a bit further:
Hmm, today is 2024-05-30, so that date is in the future.
Checking in network.rs, Network::launch_date():
so yeah, for all networks except regtest genesis block is hard-coded with a timestamp in the future that breaks mining in the present.
What to do: