epic icon indicating copy to clipboard operation
epic copied to clipboard

ERROR epic_core::core::block - block header b9c73ea08824 validation error: invalid POW: Verification Error: Hash randomx invalid!

Open sang-shelton opened this issue 1 year ago • 12 comments

Describe the bug

  • Cannot download the blockchain.
  • Stuck at "Sync step 1/7: Downloading header" or "Running" (cuz cannot find peers)

To Reproduce

  1. Compile epic and run

Expected behavior The server should work normally and the blockchain should be downloaded.


Required data

Logs screenshot

Screenshot_2024-04-27_19-32-20

Logs file

epic-server.log

.epic/main/epic-server.toml


# Generated Server Configuration File for Epic
#
# When running the epic executable without specifying any command line
# arguments, it will look for this file in two places, in the following
# order:
#
# -The working directory
# -[user home]/.epic
#

#########################################
### SERVER CONFIGURATION              ###
#########################################

#Server connection details
[server]

#the directory, relative to current, in which the epic blockchain
#is stored
db_root = "/home/chakra/.epic/main/chain_data"

#path of TLS certificate file, self-signed certificates are not supported
#tls_certificate_file = ""
#private key for the TLS certificate
#tls_certificate_key = ""

#the address on which services will listen, e.g. Transaction Pool
api_http_addr = "127.0.0.1:3413"

#path of the secret token used by the API to authenticate the calls
#comment the it to disable basic auth
api_secret_path = "/home/chakra/.epic/main/.api_secret"
foreign_api_secret_path = ".foreign_api_secret"

#path to the file that contains the pre-generated foundation coinbases
foundation_path = "/usr/share/epic/foundation.json"

#The chain type, which defines the genesis block and the set of cuckoo
#parameters used for mining as well as wallet output coinbase maturity. Can be:
#AutomatedTesting - For CI builds and instant blockchain creation
#UserTesting - For regular user testing (cuckoo 16)
#Floonet - For the long term floonet test network
#Mainnet - For mainnet
chain_type = "Mainnet"

#the chain validation mode, defines how often (if at all) we
#want to run a full chain validation. Can be:
#"EveryBlock" - run full chain validation when processing each block (except during sync)
#"Disabled" - disable full chain validation (just run regular block validation)
chain_validation_mode = "Disabled"

#run the node in "full archive" mode (default is fast-sync, pruned node)
archive_mode = false

#Whether or not to skip pow validation when syncing headers
#Only applies to blocks in checkpointed range, unless disable_checkpoints is set to true
skip_pow_validation = false

#Disables checkpoint-based pow_validation, no proof of work will be validated whatsoever
#while syncing. Has no effect unless 'skip_pow_validation' is set to true
disable_checkpoints = false

#skip waiting for sync on startup, (optional param, mostly for testing)
skip_sync_wait = false

#Timeout (in seconds) without the verification of the existence of more headers to be synced.
#If no valid value is given to this variable (e.g negative values, zero),
#the default value of 10 (seconds) is used.
header_sync_timeout = 10

#whether to run the ncurses TUI. Ncurses must be installed and this
#will also disable logging to stdout
run_tui = true

#Whether or not to set PolicyConfig to only use PoWType::RandomX.
#Required for use of Floonet, has no effect on Mainnet
only_randomx = false

#Whether or not to set PolicyConfig to disable PoWType::ProgPow
#For use on Floonet or Usernet. Has no effect on Mainnet
no_progpow = false

#Whether to run a test miner. This is only for developer testing (chaintype
#usertesting) at cuckoo 16, and will only mine into the default wallet port.
#real mining should use the standalone epic-miner
run_test_miner = false

#test miner wallet URL (burns if this doesn't exist)
#test_miner_wallet_url = "http://127.0.0.1:3415"

#########################################
### SERVER P2P CONFIGURATION          ###
#########################################
#The P2P server details (i.e. the server that communicates with other
[server.p2p_config]

#The interface on which to listen.
#0.0.0.0 will listen on all interfaces, allowing others to interact
#127.0.0.1 will listen on the local machine only
host = "0.0.0.0"

#The port on which to listen.
port = 3414

#how to seed this server, can be None, List or DNSSeed
seeding_type = "List"

#If the seeding type is List, the list of peers to connect to can
#be specified as follows:
seeds = ["95.217.197.180:3517","5.161.127.56:3414","5.75.242.4:3414","5.78.71.29:3414"]

#hardcoded peer lists for allow/deny
#will *only* connect to peers in allow list
#peers_allow = ["192.168.0.1:3414", "192.168.0.2:3414"]
#will *never* connect to peers in deny list
#peers_deny = ["192.168.0.3:3414", "192.168.0.4:3414"]
#a list of preferred peers to connect to
#peers_preferred = ["192.168.0.1:3414","192.168.0.2:3414"]

#how long a banned peer should stay banned
#ban_window = 10800

#maximum number of inbound peers (default = 128)
#peer_max_inbound_count = 40

#maximum number of outbound peers (default = 128)
#peer_max_outbound_count = 40

#preferred minimum number of peers (we'll actively keep trying to add peers
#until we get to at least this number
#peer_min_preferred_count = 8

# 31 = Bit flags for FULL_NODE, with HEADER_FASTSYNC capability
#This structure needs to be changed internally, to make it more configurable

# A preferred dandelion_peer, mainly used for testing dandelion
# dandelion_peer = "10.0.0.1:13144"

[server.p2p_config.capabilities]
bits = 31


#########################################
### MEMPOOL CONFIGURATION             ###
#########################################
[server.pool_config]

#base fee that's accepted into the pool
accept_fee_base = 100000

#maximum number of transactions allowed in the pool
max_pool_size = 50000

#maximum number of transactions allowed in the stempool
max_stempool_size = 50000

#maximum total weight of transactions that can get selected to build a block
mineable_max_weight = 40000


#########################################
### DANDELION CONFIGURATION           ###
#########################################
[server.dandelion_config]

#dandelion epoch duration
epoch_secs = 600

#fluff and broadcast after embargo expires if tx not seen on network
embargo_secs = 180

#dandelion aggregation period in secs
aggregation_secs = 30

#dandelion stem probability (stem 90% of the time, fluff 10% of the time)
stem_probability = 90
always_stem_our_txs = true


################################################
### STRATUM MINING SERVER CONFIGURATION      ###
################################################
[server.stratum_mining_config]

#whether stratum server is enabled
enable_stratum_server = true

#what port and address for the stratum server to listen on
stratum_server_addr = "127.0.0.1:3416"

#the amount of time, in seconds, to attempt to mine on a particular
#header before stopping and re-collecting transactions from the pool
attempt_time_per_block = 15
cuckatoo_minimum_share_difficulty = 3
randomx_minimum_share_difficulty = 4000
progpow_minimum_share_difficulty = 200000

#the wallet receiver to which coinbase rewards will be sent
wallet_listener_url = "http://127.0.0.1:3415"

#whether to ignore the reward (mostly for testing)
burn_reward = false

[server.webhook_config]
nthreads = 4
timeout = 10


#########################################
### LOGGING CONFIGURATION             ###
#########################################
[logging]

#whether to log to stdout
log_to_stdout = true

#log level for stdout: Error, Warning, Info, Debug, Trace
stdout_log_level = "WARN"

#whether to log to a file
log_to_file = true

#log level for file: Error, Warning, Info, Debug, Trace
file_log_level = "INFO"

#log file path
log_file_path = "/home/chakra/.epic/main/epic-server.log"

#whether to append to the log file (true), or replace it on every run (false)
log_file_append = true

#maximum log file size in bytes before performing log rotation
#comment it to disable log rotation
log_max_size = 16777216

#maximum count of the log files to rotate over
log_max_files = 32
  • OS: MX Linux (Debian GNU/Linux 12 (bookworm))
  • rustc 1.77.2 (25ef9e3d8 2024-04-09)
  • cargo 1.77.2 (e52e36006 2024-03-26)
System info

System:
  Kernel: 6.7.12-1-liquorix-amd64 arch: x86_64 bits: 64 compiler: gcc
    v: 12.2.0 parameters: audit=0 intel_pstate=disable rcupdate.rcu_expedited=1
    BOOT_IMAGE=/vmlinuz-6.7.12-1-liquorix-amd64
    root=UUID=4360036c-6183-4585-aa57-03927d0f64ad ro quiet splash
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.36 info: xfce4-panel wm: xfwm
    v: 4.18.0 dm: LightDM v: 1.26.0 Distro: MX-23.2_ahs_x64 Libretto January 21
    2024 base: Debian GNU/Linux 12 (bookworm)
Machine:
  Type: Desktop Mobo: Micro-Star model: MAG B550 TOMAHAWK MAX WIFI (MS-7C91)
    v: 1.0 serial: <filter> UEFI: American Megatrends LLC. v: 2.60
    date: 10/10/2023
CPU:
  Info: model: AMD Ryzen 9 5950X socket: AM4 bits: 64 type: MT MCP
    arch: Zen 3+ gen: 4 level: v3 note: check built: 2022 process: TSMC n6 (7nm)
    family: 0x19 (25) model-id: 0x21 (33) stepping: 2 microcode: 0xA20120E
  Topology: cpus: 1x cores: 16 tpc: 2 threads: 32 smt: enabled cache:
    L1: 1024 KiB desc: d-16x32 KiB; i-16x32 KiB L2: 8 MiB desc: 16x512 KiB
    L3: 64 MiB desc: 2x32 MiB
  Speed (MHz): avg: 2218 high: 2800 min/max: 2200/5083 boost: enabled
    base/boost: 3400/5050 scaling: driver: acpi-cpufreq governor: ondemand
    volts: 1.1 V ext-clock: 100 MHz cores: 1: 2200 2: 2200 3: 2200 4: 2200
    5: 2200 6: 2200 7: 2200 8: 2200 9: 2200 10: 2200 11: 2200 12: 2800
    13: 2200 14: 2200 15: 2200 16: 2200 17: 2200 18: 2200 19: 2200 20: 2200
    21: 2200 22: 2200 23: 2200 24: 2200 25: 2200 26: 2200 27: 2200 28: 2200
    29: 2200 30: 2200 31: 2200 32: 2200 bogomips: 217619
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow mitigation: Safe RET
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: always-on, RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA GA104 [GeForce RTX 3060] vendor: Micro-Star MSI
    driver: nvidia v: 525.147.05 non-free: 530.xx+
    status: current (as of 2023-03) arch: Ampere code: GAxxx
    process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 1 speed: 2.5 GT/s
    lanes: 16 link-max: gen: 4 speed: 16 GT/s bus-ID: 2b:00.0
    chip-ID: 10de:2487 class-ID: 0300
  Display: server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.18.0 driver: X:
    loaded: nvidia unloaded: fbdev,modesetting,nouveau,vesa alternate: nv
    gpu: nvidia display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 2560x1440 s-dpi: 96 s-size: 677x381mm (26.65x15.00")
    s-diag: 777mm (30.58")
  Monitor-1: DP-0 res: 2560x1440 hz: 165 dpi: 108
    size: 600x330mm (23.62x12.99") diag: 685mm (26.96") modes: N/A
  API: OpenGL v: 4.6.0 NVIDIA 525.147.05 renderer: NVIDIA GeForce RTX
    3060/PCIe/SSE2 direct-render: Yes
Audio:
  Device-1: NVIDIA GA104 High Definition Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 2b:00.1 chip-ID: 10de:228b class-ID: 0403
  Device-2: AMD Starship/Matisse HD Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 2d:00.4 chip-ID: 1022:1487 class-ID: 0403
  API: ALSA v: k6.7.12-1-liquorix-amd64 status: kernel-api
    tools: alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 status: n/a (root, process) with:
    1: pipewire-pulse status: active 2: wireplumber status: active
    3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: MEDIATEK MT7921K Wi-Fi 6E 80MHz driver: mt7921e v: kernel
    modules: wl pcie: gen: 2 speed: 5 GT/s lanes: 1 bus-ID: 29:00.0
    chip-ID: 14c3:0608 class-ID: 0280
  IF: wlan0 state: up mac: <filter>
  Device-2: Realtek RTL8125 2.5GbE vendor: Micro-Star MSI driver: r8169
    v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 1 port: f000 bus-ID: 2a:00.0
    chip-ID: 10ec:8125 class-ID: 0200
  IF: eth0 state: down mac: <filter>
Bluetooth:
  Device-1: MediaTek Wireless_Device type: USB driver: btusb v: 0.8
    bus-ID: 1-9:6 chip-ID: 0e8d:0608 class-ID: e001 serial: <filter>
  Report: hciconfig ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 3.0
    lmp-v: 5.2 sub-v: 2311 hci-v: 5.2 rev: 919
  Info: acl-mtu: 1021:6 sco-mtu: 240:8 link-policy: rswitch sniff
    link-mode: peripheral accept service-classes: rendering, capturing, object
    transfer, audio, telephony
Drives:
  Local Storage: total: 1.82 TiB used: 191.46 GiB (10.3%)
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: MSI model: M480 PRO 2TB
    size: 1.82 TiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: EIFM80.0 temp: 35.9 C scheme: GPT
  SMART: yes health: PASSED on: 23d 14h cycles: 99
    read-units: 1,929,753 [988 GB] written-units: 4,818,043 [2.46 TB]
Partition:
  ID-1: / raw-size: 1.82 TiB size: 1.79 TiB (98.37%) used: 191.14 GiB (10.4%)
    fs: ext4 block-size: 4096 B dev: /dev/dm-0 maj-min: 253:0
    mapped: luks-5d75316a-19bd-44ac-892e-477343b3b3ec
  ID-2: /boot raw-size: 1024 MiB size: 973.4 MiB (95.06%)
    used: 328.4 MiB (33.7%) fs: ext4 block-size: 4096 B dev: /dev/nvme0n1p2
    maj-min: 259:2
  ID-3: /boot/efi raw-size: 256 MiB size: 252 MiB (98.46%)
    used: 274 KiB (0.1%) fs: vfat block-size: 512 B dev: /dev/nvme0n1p1
    maj-min: 259:1
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 6 GiB used: 0 KiB (0.0%) priority: -2
    file: /swap/swap
Sensors:
  System Temperatures: cpu: 35.8 C mobo: N/A gpu: nvidia temp: 44 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Info:
  Processes: 592 Uptime: 11h 51m wakeups: 1 Memory: 31.27 GiB
  used: 7.66 GiB (24.5%) Init: SysVinit v: 3.06 runlevel: 5 default: graphical
  tool: systemctl Compilers: gcc: 12.2.0 alt: 12 clang: 14.0.6 Packages: 2485
  pm: dpkg pkgs: 2460 libs: 1323 tools: apt,apt-get,aptitude,nala,synaptic
  pm: rpm pkgs: 0 pm: flatpak pkgs: 25 Shell: Sudo (sudo) v: 1.9.13p3
  default: Bash v: 5.2.15 running-in: xfce4-terminal inxi: 3.3.26

Additional context Many times i had to kill epic process cuz it took too much time to exit.

sang-shelton avatar Apr 27 '24 17:04 sang-shelton

Hmm. Not immediately clear what the issue is here. But, I do know that's a higher rust version than I have compiled with before. I would try recompiling with 1.76 or lower. Let me know if error persists.

Not the recommended way, but you can also set skip_pow_validation = true and disable_checkpoints = true in epic-server.toml. There is a threshold at chaintip where PoW verification gets forced, even with these settings toggled. Still, I'd try to figure out what's up with your node before doing this.

I'm confident that this is a local issue for you, and not related to actual blockchain integrity.

who-biz avatar Apr 27 '24 23:04 who-biz

Please provide more info once you try downgrading your rust toolchain.

who-biz avatar Apr 27 '24 23:04 who-biz

Hmm. Not immediately clear what the issue is here. But, I do know that's a higher rust version than I have compiled with before. I would try recompiling with 1.76 or lower. Let me know if error persists.

I tried compiling using rust toolchain 1.76 and 1.75 but i am getting the same error in the logs.

ERROR epic_core::core::block - block header b9c73ea08824 validation error: invalid POW: Verification Error: Hash randomx invalid

Is it possible this is a bug in librandomx ?


Not the recommended way, but you can also set skip_pow_validation = true and disable_checkpoints = true in epic-server.toml.

I did that and it worked at first, some tiny parts got downloaded:

Screenshots

Screenshot_2024-04-28_11-32-59 Screenshot_2024-04-28_11-32-48

Then it stopped.

Then it's downloading again now. It's coming and going. And the same error keeps appearing in the logs.


  • It's my first time getting in contact with epic cash. I knew it yesterday.
  • I am using libssl3. I do not have libssl1 in my repos. Deprecated.
  • I have only 2 or 3 peers appearing, is that normal ? Sometimes i had 10 or more.
  • Downloading is very slow cuz of the error i assume. My internet connection is very good tho.
  • When i run epic as sudo, i get more peers.

sang-shelton avatar Apr 28 '24 08:04 sang-shelton

Most of the blockchain was downloaded i assume, but there is great irregularity in the connection with the same error being repeated over and over.

Screenshots

Screenshot_2024-04-28_16-56-31

Screenshot_2024-04-28_16-57-13

sang-shelton avatar Apr 28 '24 13:04 sang-shelton

Is it possible this is a bug in librandomx ?

Doubtful this is the case. Nothing in that library has changed in some time. For now:

1.) shut down epic 2.) clear ~/.epic/main/chain_data (or wherever yours is located) 3.) restart

I'll try to reproduce.

I have only 2 or 3 peers appearing, is that normal ? Sometimes i had 10 or more

It's normal, given the proof of work verification failures. Your node is disconnecting because it thinks your peers are misbehaving.

Could be related to OpenSSL maybe, but that doesn't sound like the cause to me.


Please also ensure that your settings in epic-server for RandomX, Progpow, etc, match the automatically template-generated epic-server.toml

who-biz avatar Apr 28 '24 21:04 who-biz

Lastly, there is an often-updated snapshot uploaded by @johanneshahn here: https://51pool.online/downloads/epic_chain_data.tar.gz

Feel free to use that, if you don't feel like debugging further.

who-biz avatar Apr 28 '24 21:04 who-biz

1.) shut down epic 2.) clear ~/.epic/main/chain_data (or wherever yours is located) 3.) restart

Did that.


Lastly, there is an often-updated snapshot uploaded by @johanneshahn here: https://51pool.online/downloads/epic_chain_data.tar.gz

  • When i cleared ~/.epic/main/chain_data and replaced it with the downloaded chain data.

  • When skip_pow_validation = false and disable_checkpoints = false (like default), i get this error: ERROR epic_servers::epic::sync::syncer - chainsync Error { inner: Orphan }

  • When skip_pow_validation = true and disable_checkpoints = true, i get this error: ERROR epic_core::core::block - block header 3f0a1b08e327 validation error: invalid POW: Verification Error: Hash randomx invalid!


Seems like now it's stuck at "downloading headers 1/7"

Screenshot_2024-04-29_00-32-40

I noticed that when i first moved the downloaded chain data, the Disk usage was 6+ GB. When the skip_pow_validation = false and disable_checkpoints = false.

And when i changed skip_pow_validation = true and disable_checkpoints = true, the disk usage became 5+ GB like shown in the above screenshot.

The chain data decreased 🤦🏻‍♂️

or was it miscalculated in the first place ?!

sang-shelton avatar Apr 28 '24 21:04 sang-shelton

Describe the bug

  • Cannot download the blockchain.
  • Stuck at "Sync step 1/7: Downloading header" or "Running" (cuz cannot find peers)

Logs screenshot Logs file .epic/main/epic-server.toml

  • OS: MX Linux (Debian GNU/Linux 12 (bookworm))
  • rustc 1.77.2 (25ef9e3d8 2024-04-09)
  • cargo 1.77.2 (e52e36006 2024-03-26)

System info Additional context Many times i had to kill epic process cuz it took too much time to exit.

I have the same problem, and am using the same Rust version. It connected to 13 peers but I am stack on downloading headers. After quitting it I discovered that it output to the terminal:

The file `/usr/share/epic/foundation.json` was not found!
Will try to use the alternative file `/home/admin_u/epic/debian/foundation.json`!

whileunless avatar Apr 30 '24 11:04 whileunless

I was having a problem in the GUI app for not having libssl1 and it was fixed, now the GUI app works fine. The server works fine in the GUI app, but does not work well when it's standalone !

Screenshot_2024-04-30_19-59-55

sang-shelton avatar Apr 30 '24 17:04 sang-shelton

I managed to install all the .deb packages of epic, epic-wallet and epic-miner. I think the problem was in the absence of libssl1.

Then after the sync of my GUI wallet which was working and done successfully, I copied my chain_data from /home/chakra/.epic/shrouded/main/chain_data/ (which is my GUI wallet) to /home/chakra/.epic/main/chain_data/ (which is the directory created by the standalone server).

Now the server seems to be running normally and i am not getting any of those errors i was getting in the logs.

Screenshots

Screenshot_2024-05-01_12-06-58

Screenshot_2024-05-01_12-07-17

Screenshot_2024-05-01_12-08-03


But, when i run the miner, i get these errors:

Error

$ epic-miner 
Starting Epic-Miner from config file at: /opt/epic-miner/epic-miner.toml
May 01 12:15:18.209 INFO This is Epic-Miner version 2.3.1 (git debian/2.3.1-1), built for x86_64-unknown-linux-gnu by rustc 1.35.0 (3c235d560 2019-05-20).
May 01 12:15:19.218 WARN Connection Status: Connected to Epic server at 127.0.0.1:3416.
May 01 12:15:20.009 INFO Got a new job: JobTemplate { height: 2467731, job_id: 0, difficulty: [("cuckoo", 3), ("randomx", 4000), ("progpow", 200000)], block_difficulty: [("cuckoo", 38642076), ("randomx", 291828428), ("progpow", 676274128546)], pre_pow: "0006000000000025a7930000000066320827c410916dd5488dc8fd9ed39219a552f727dc8d41e4f31292a94e92afa158f0bb6c3007d92001ac13b4432ccf94acb9f8ea9a4720903c50772f1173bbb44fae0f9f388491e5ed47d83aaaa3792a1100ee7694a45d9559f7e66ba763887a30cca6e9e97da6eea15ddb430286221bd2f8d9e71f22e8a0baeb2ef02da22529a3e6efdca96f38c3dc6d8d6eb6431d0b4096f4d37175d3906ba75dfd982e129cfff851186c8e5b90f5888d57aeef6c4082ea7c75bb93789ef1c600b2ee7170d7dcf5aa000000000062d87b00000000005346120000000000000004000000000000969e50010000411ee44cd46802000c58ac4f32057203507a2b0fea42015f0000000d", epochs: [(2467060, 2468060, [68, 129, 229, 98, 238, 129, 32, 59, 163, 181, 71, 205, 136, 106, 203, 175, 83, 7, 167, 11, 239, 4, 151, 103, 91, 53, 117, 16, 187, 149, 113, 242])], algorithm: "randomx" }
May 01 12:15:20.009 INFO Got a job at height 2467731 and share difficulty "Cuckatoo: 38642076, ProgPow: 676274128546, RandomX: 291828428"
May 01 12:15:21.010 INFO Mining: RandomX at 0 hps (hashes per second)
May 01 12:15:24.010 INFO Mining: RandomX at 0 hps (hashes per second)
May 01 12:15:27.011 INFO Mining: RandomX at 0 hps (hashes per second)
May 01 12:15:30.011 INFO Mining: RandomX at 0 hps (hashes per second)
May 01 12:15:33.012 INFO Mining: RandomX at 0 hps (hashes per second)
May 01 12:15:36.008 INFO Got a new job: JobTemplate { height: 2467731, job_id: 1, difficulty: [("cuckoo", 3), ("randomx", 4000), ("progpow", 200000)], block_difficulty: [("cuckoo", 38642076), ("randomx", 291828428), ("progpow", 676274128546)], pre_pow: "0006000000000025a7930000000066320836c410916dd5488dc8fd9ed39219a552f727dc8d41e4f31292a94e92afa158f0bb6c3007d92001ac13b4432ccf94acb9f8ea9a4720903c50772f1173bbb44fae0f9f388491e5ed47d83aaaa3792a1100ee7694a45d9559f7e66ba763887a30cca6e9e97da6eea15ddb430286221bd2f8d9e71f22e8a0baeb2ef02da22529a3e6efc02f6270145d4c958e17b5f57791d08881a3456499660a57c86aee60d2ab7707186c8e5b90f5888d57aeef6c4082ea7c75bb93789ef1c600b2ee7170d7dcf5aa000000000062d87b00000000005346120000000000000004000000000000969e50010000411ee44cd46802000c58ac4f32057203507a2b0fea42015f0000000d", epochs: [(2467060, 2468060, [68, 129, 229, 98, 238, 129, 32, 59, 163, 181, 71, 205, 136, 106, 203, 175, 83, 7, 167, 11, 239, 4, 151, 103, 91, 53, 117, 16, 187, 149, 113, 242])], algorithm: "randomx" }
May 01 12:15:36.012 INFO Mining: RandomX at 0 hps (hashes per second)
May 01 12:15:38.010 ERRO Failed to submit a solution: RpcError { code: -32502, message: "Failed to validate solution" }
May 01 12:15:38.010 ERRO Failed to submit a solution: RpcError { code: -32502, message: "Failed to validate solution" }
May 01 12:15:39.012 INFO Mining: RandomX at 4496 hps (hashes per second)
May 01 12:15:40.001 ERRO Failed to submit a solution: RpcError { code: -32502, message: "Failed to validate solution" }
May 01 12:15:42.002 ERRO Failed to submit a solution: RpcError { code: -32502, message: "Failed to validate solution" }
May 01 12:15:42.003 ERRO Failed to submit a solution: RpcError { code: -32502, message: "Failed to validate solution" }
May 01 12:15:42.003 ERRO Failed to submit a solution: RpcError { code: -32502, message: "Failed to validate solution" }
May 01 12:15:42.013 INFO Mining: RandomX at 4468 hps (hashes per second)
May 01 12:15:44.004 ERRO Failed to submit a solution: RpcError { code: -32502, message: "Failed to validate solution" }
May 01 12:15:44.004 ERRO Failed to submit a solution: RpcError { code: -32502, message: "Failed to validate solution" }
May 01 12:15:45.013 INFO Mining: RandomX at 4459 hps (hashes per second)
May 01 12:15:46.005 ERRO Failed to submit a solution: RpcError { code: -32502, message: "Failed to validate solution" }
May 01 12:15:46.006 ERRO Failed to submit a solution: RpcError { code: -32502, message: "Failed to validate solution" }
May 01 12:15:48.007 ERRO Failed to submit a solution: RpcError { code: -32502, message: "Failed to validate solution" }
May 01 12:15:48.007 ERRO Failed to submit a solution: RpcError { code: -32502, message: "Failed to validate solution" }
May 01 12:15:48.014 INFO Mining: RandomX at 4489 hps (hashes per second)
^C
Screenshots

Screenshot_2024-05-01_12-16-31

Screenshot_2024-05-01_12-16-58


I think is error of the miner of not being able to "validate solution"

May 01 12:19:42.006 ERRO Failed to submit a solution: RpcError { code: -32502, message: "Failed to validate solution" }

has to do with the server error and the topic of this issue "Hash invalid"

ERROR epic_core::core::block - block header b9c73ea08824 validation error: invalid POW: Verification Error: Hash randomx invalid

also i am getting in the miner

May 01 12:22:14.005 ERRO Failed to submit a solution: RpcError { code: -32503, message: "Solution submitted too late" }

sang-shelton avatar May 01 '24 09:05 sang-shelton

I tried mining on ParrotOS and it worked fine, i just didn't find any blocks cuz i was solo mining. 8000H/s. I used the same Linux packages downloaded from here i my current MX Linux and ParrotOS, they just didn't work as expected in MX Linux.

Packages used: packages.zip

sang-shelton avatar May 02 '24 17:05 sang-shelton

Describe the bug

  • Cannot download the blockchain.
  • Stuck at "Sync step 1/7: Downloading header" or "Running" (cuz cannot find peers)

To Reproduce

  1. Compile epic and run

Expected behavior The server should work normally and the blockchain should be downloaded.

Required data

Logs screenshot Logs file .epic/main/epic-server.toml

  • OS: MX Linux (Debian GNU/Linux 12 (bookworm))
  • rustc 1.77.2 (25ef9e3d8 2024-04-09)
  • cargo 1.77.2 (e52e36006 2024-03-26)

System info Additional context Many times i had to kill epic process cuz it took too much time to exit.

Hi, please see In the top of the logfile.

20240427 19:14:51.116 INFO epic_servers::epic::server - The policy configuration is: PolicyConfig { allowed_policies: [AllowPolicy { height: 0, value: 1 }, AllowPolicy { height: 480961, value: 2 }, AllowPolicy { height: 1157761, value: 4 }, AllowPolicy { height: 2023201, value: 8 }, AllowPolicy { height: 3175201, value: 16 }, AllowPolicy { height: 4642561, value: 32 }], policies: [{ProgPow: 38, Cuckaroo: 0, Cuckatoo: 2, RandomX: 60}, {Cuckaroo: 0, RandomX: 60, Cuckatoo: 2, ProgPow: 38}, {Cuckaroo: 0, Cuckatoo: 4, ProgPow: 48, RandomX: 48}, {ProgPow: 48, Cuckaroo: 0, Cuckatoo: 4, RandomX: 48}, {ProgPow: 48, Cuckaroo: 0, Cuckatoo: 4, RandomX: 48}, {Cuckaroo: 0, RandomX: 48, Cuckatoo: 4, ProgPow: 48}] }
20240427 19:14:51.116 INFO epic_servers::epic::server - The foundation.json is being read from "/home/debian/foundation.json"
20240427 19:14:51.117 ERROR epic_util::logger - 
thread 'main' panicked at 'Error trying to read the foundation.json. Couldn't find/open the file /home/debian/foundation.json!: Os { code: 2, kind: NotFound, message: "No such file or directory" }': core/src/global.rs:658   0: epic_util::logger::send_panic_to_log::{{closure}}
   1: std::panicking::rust_panic_with_hook
   2: std::panicking::begin_panic_handler::{{closure}}
   3: std::sys_common::backtrace::__rust_end_short_backtrace
   4: rust_begin_unwind
   5: core::panicking::panic_fmt
   6: core::result::unwrap_failed
   7: epic_core::global::get_file_sha256
   8: epic_servers::epic::server::Server::start
   9: epic::cmd::server::start_server
  10: epic::cmd::server::server_command
  11: epic::real_main
  12: epic::main
  13: std::sys_common::backtrace::__rust_begin_short_backtrace
  14: std::rt::lang_start::{{closure}}
  15: std::rt::lang_start_internal
  16: main
  17: <unknown>
  18: __libc_start_main
  19: _start

the node can not find correct foundation.json you can copy the foundation.json from ./debian/ folder into the ~/.epic/main folder next to the "chain_data" folder

see path epic-server.toml - data_file_dir

else the blockchain validation fails.

johanneshahn avatar May 03 '24 04:05 johanneshahn

Sounds like @johanneshahn has the right solution. Indeed, foundation file contains information that is required for block validation when syncing the chain.

Please confirm that adding this file has solved your problem, so we can close this issue.

who-biz avatar Jun 11 '24 02:06 who-biz

I think it worked, thanks much

sang-shelton avatar Jun 11 '24 13:06 sang-shelton