piplabs / story

Official repo for the Story L1 consensus client, contracts, and associated tooling.
GNU General Public License v3.0
39 stars 26 forks source link

devnet - validator 01 and validator 07 are jailed unexpected #336

Closed jia57b closed 3 weeks ago

jia57b commented 4 weeks ago

Description and context

validator 01 and validator 07 are jailed unexpected

Steps to reproduce

Precondition: A test node still running but cannot generate blocks.

  1. Reset devnet (singularity height is 600)
  2. self-delegate to genesis validator 10^7
  3. Run singularity test (the test stop validator01 story and geth process and not start the process after singularity)

Experienced behavior

validator01: jailed at 601 height validator07: confilct voting from height 01 after reset and jailed at height 06 block 1-15 timestamps are from the previous day.

validator01 logs:

24-11-01 03:33:15.018 INFO validator slashed by slash factor        module=x/staking validator=storyvaloper1plzprxwwtzy53ps63k5x6uj6tgrn46g6c8w4xv slash_factor=0.050000000000000000 burned=50000
24-11-01 03:33:15.018 DEBU 📚 Validator slashed                     val_addr=0FC41199CE588948861A8DA86D725A5A073AE91A amount=0.000000000002500000

validator 07 logs:

24-11-01 02:34:12.047 INFO validator slashed by slash factor        module=x/staking validator=storyvaloper1q9vn6g9fj96rw2anyklt56v96rf20ap5z7zha7 slash_factor=0.050000000000000000 burned=50000

evidence:

"evidence": {
                "evidence": [
                    {
                        "type": "tendermint/DuplicateVoteEvidence",
                        "value": {
                            "vote_a": {
                                "type": 2,
                                "height": "6",
                                "round": 0,
                                "block_id": {
                                    "hash": "",
                                    "parts": {
                                        "total": 0,
                                        "hash": ""
                                    }
                                },
                                "timestamp": "2024-11-01T02:34:04.641334564Z",
                                "validator_address": "01593D20A99174372BB325BEBA6985D0D2A7F434",
                                "validator_index": 0,
                                "signature": "bAnUzwmfcUNXOTF+K5Db25APXUBLuEjaYTCUDR5VGXcsk8NtYLGdFDIcvVavOtGU5+HCo+L9c+YoHO6TW+d7Ow==",
                                "extension": null,
                                "extension_signature": null
                            },
                            "vote_b": {
                                "type": 2,
                                "height": "6",
                                "round": 0,
                                "block_id": {
                                    "hash": "9C488B81D08AC8A1C0B9BD6E780DBFD69D735150D9F78D4D1C6B156E5430B3FC",
                                    "parts": {
                                        "total": 1,
                                        "hash": "2B110C861050FA209EEEE68D3B54B4AC491999388494D021B65CB46120DB324B"
                                    }
                                },
                                "timestamp": "2024-10-31T04:56:44.898326719Z",
                                "validator_address": "01593D20A99174372BB325BEBA6985D0D2A7F434",
                                "validator_index": 0,
                                "signature": "TkYLl0cmO/7NorpEpTd/HOVIXMHTaDn57OqJMQ52mvIp2xmyeqwPS9iepn1Zn7mDHzBESurPqh46bclf8/5ZDg==",
                                "extension": null,
                                "extension_signature": null
                            },
                            "TotalVotingPower": "8",
                            "ValidatorPower": "1",
                            "Timestamp": "2024-10-31T04:56:41.691193633Z"
                        }
                    }
                ]
            },

test node logs:

Nov 01 02:34:01 ip-172-31-27-190.us-west-1.compute.internal node-story[1099781]: 24-11-01 02:34:01.396 ERRO Stopping peer for error                  module=p2p peer="Peer{MConn{52.53.108.57:26656} 0c5d4c35c110ed19c79297852abd4b55f538154d out}" err=EOF
Nov 01 02:34:11 ip-172-31-27-190.us-west-1.compute.internal node-story[1099781]: 24-11-01 02:34:11.907 ERRO CONSENSUS FAILURE!!!                     module=consensus err="precommit step; +2/3 prevoted for an invalid block: wrong Block.Header.AppHash.  Expected FC7B7FEB14C96DE1B30CBFB1F9CE3C0039D01ADD89E8CA24F3D06BD601C18C96, got 1D04C6C0D1E03FE8C01D1C4E723FF933A68E7210694C66B740CDB6F785FAC1D8"

Expected behavior

validaor01 should be jailed at 600+200 (slashing window). validaor07: not sure how it was affected by test node.

Solution recommendation

0xHansLee commented 3 weeks ago

@jia57b Please check this issue and close if it has been resolved.

jia57b commented 3 weeks ago

Tested the issue of validator01 jailed:

  1. stop validator before 410 height, reset missed block as 0 at singularity, it's jailed at 791 height
  2. stop validator after 410 height and before 600, it's jailed at 600 + 190 - missed block + 1 (since the missed block is counted at the next block)

Cannot reproduce the validator07 issue.