Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ship in 4.0.4: head.block_num is 2 blocks behind trace_end_block and chain_state_end_block #1694

Closed
cc32d9 opened this issue Sep 29, 2023 · 0 comments · Fixed by #1769, #1777 or #1778
Closed
Assignees
Labels
bug Something isn't working 👍 lgtm OCI Work exclusive to OCI team
Milestone

Comments

@cc32d9
Copy link
Contributor

cc32d9 commented Sep 29, 2023

Head block in ship response to get_status_request_v0 is supposed to be the same as the last block in traces.

As of 4.0.4, the head block is always 2 blocks behind. Here's the test that reproduces it with Proton mainnet (Proton is much smaller than EOS, but running standard Leap software).

# Ubuntu 22.04

wget https://github.com/AntelopeIO/leap/releases/download/v4.0.4/leap_4.0.4-ubuntu22.04_amd64.deb
apt install ./leap_4.0.4-ubuntu22.04_amd64.deb

mkdir -p /srv/proton/etc

cat >/srv/proton/etc/config.ini <<'EOT'
chain-state-db-size-mb = 65536
wasm-runtime = eos-vm-jit
eos-vm-oc-enable = false
http-server-address = 0.0.0.0:8888
p2p-listen-endpoint = 0.0.0.0:9805
validation-mode = light
plugin = eosio::chain_plugin
plugin = eosio::chain_api_plugin
plugin = eosio::state_history_plugin
trace-history = true
chain-state-history = true
state-history-endpoint = 0.0.0.0:8080
p2p-peer-address = proton.cryptolions.io:9876
p2p-peer-address = proton.eu.eosamsterdam.net:9103
p2p-peer-address = p2p-proton.eosarabia.net:9876
EOT

curl http://seed01.eosusa.news/snaps/proton/proton-2023-09-29_08-00.tar.gz | tar xzvf -

nohup /usr/bin/nodeos --data-dir /srv/proton/data --config-dir /srv/proton/etc --disable-replay-opts --snapshot snapshot-0ce9cdac014dbf27263b2a00442d9c47f64a43a3121109707a8e937dba9e205e.bin &


curl -sL https://deb.nodesource.com/setup_18.x -o nodesource_setup.sh
bash nodesource_setup.sh 
apt install -y nodejs

git clone https://github.com/cc32d9/eos-nagios-plugins.git /opt/eos-nagios-plugins

cd /opt/eos-nagios-plugins/ship
npm install

./check_eosio_ship  --url-ws http://127.0.0.1:8080 --url-api http://127.0.0.1:8888
CRITICAL - state history corrupted

# after adding "console.error(response); "

{
  head: {
    block_num: 216656945,
    block_id: '0CE9EC31CF64DD66449D01B4B92EB0C615916A41812593FDF0C5F2FE96581D5D'
  },
  last_irreversible: {
    block_num: 216656612,
    block_id: '0CE9EAE452780BA4B1A041F6E0EEB8918486F11479FBC1EDBF8CB8F14F3A8E6B'
  },
  trace_begin_block: 216649133,
  trace_end_block: 216656947,
  chain_state_begin_block: 216649132,
  chain_state_end_block: 216656947,
  chain_id: '384DA888112027F0321850A169F737C33E53B388AAD48B5ADACE4BAB97F437E0'
}

@bhazzard bhazzard added bug Something isn't working and removed triage labels Oct 12, 2023
@bhazzard bhazzard added this to the Leap v4.0.5 milestone Oct 12, 2023
@heifner heifner self-assigned this Oct 12, 2023
@heifner heifner added the OCI Work exclusive to OCI team label Oct 12, 2023
@heifner heifner linked a pull request Oct 13, 2023 that will close this issue
@heifner heifner moved this from Todo to In Progress in Team Backlog Oct 13, 2023
@heifner heifner moved this from In Progress to Awaiting Review in Team Backlog Oct 13, 2023
heifner added a commit that referenced this issue Oct 16, 2023
[4.0] Signal accepted_block after it is marked valid
@heifner heifner linked a pull request Oct 16, 2023 that will close this issue
heifner added a commit that referenced this issue Oct 16, 2023
[4.0 -> 5.0] Signal accepted_block after it is marked valid
heifner added a commit that referenced this issue Oct 16, 2023
[5.0 -> main] Signal accepted_block after it is marked valid
@github-project-automation github-project-automation bot moved this from Awaiting Review to Done in Team Backlog Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment