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

fix!: constant jail patch #165

Merged
merged 10 commits into from
Apr 23, 2024
Merged

fix!: constant jail patch #165

merged 10 commits into from
Apr 23, 2024

Conversation

Reecepbcups
Copy link
Member

@Reecepbcups Reecepbcups commented Apr 15, 2024

ref: #165

Requires single line SDK fork. If not upstreamed, will fork the SDK in the Strangelove Org & insert into spawn for all future POA users. Feels wrong to do but can't skip the panic since the jail hits at h+1 where panic is at h :\

test easily with simapp/test_node.sh , create val set, and wait 10 blocks.

FLAGS="--keyring-backend=test --chain-id=poa-1 --home="$HOME/.poad" --yes"

MAIN_VAL=`poad q staking validators --output=json | jq .validators[0].operator_address -r` && echo $MAIN_VAL
poad tx poa set-power $MAIN_VAL 18356789 $FLAGS --from=acc1 --unsafe
sleep 2
poad q staking validators
poad q consensus comet validator-set

poad tx poa create-validator simapp/validator_file.json $FLAGS --from acc3
sleep 2
poad q poa pending-validators --output json # 1 pending

PENIDNG_OPPERATOR_ADDR=$(poad q poa pending-validators --output=json | jq .pending[0].operator_address -r) && echo $PENIDNG_OPPERATOR_ADDR
poad tx poa set-power $PENIDNG_OPPERATOR_ADDR 2000000 $FLAGS --from=acc1
sleep 2
poad q consensus comet validator-set

# wait

@Reecepbcups
Copy link
Member Author

current solution does not work but is a placeholder showcasing how I am thinking through this. Still unsure how staking is pulling the val when its deleted from the power store before, waited to persist, and then set the val to be really jailed

@Reecepbcups
Copy link
Member Author

Reecepbcups commented Apr 16, 2024

:D w/ SDK modification

8:54AM INF finalizing commit of block hash=790B0F2BBB55BD98C7A71B01A792596BFF6C306748B764006170B52C7B58C9BE height=18 module=consensus num_txs=0 root=3CA43E3F0CB32FBDFC88DFC4893FC3C68D33CA356679183A02202FA1ED7C53DE
8:54AM INF BeforeValidatorModified module=x/poa valAddr=cosmosvaloper1efd63aw40lxf3n4mhf7dzhjkr453axurlv4rfe
8:54AM INF no validator slashing because slash amount is zero burned=0 module=x/staking slash_factor=0.000000000000000000 validator=cosmosvaloper1efd63aw40lxf3n4mhf7dzhjkr453axurlv4rfe validatorTokens=2000000
8:54AM INF validator jailed module=x/staking validator=cosmosvalcons1teuqwhxdwz4c460ld0dy2wx6lgcqkmsc2z3p5h
8:54AM INF slashing and jailing validator due to liveness fault height=18 jailed_until=2024-04-16T14:04:05Z min_height=17 module=x/slashing slashed=0.000000000000000000 threshold=10 validator=cosmosvalcons1teuqwhxdwz4c460ld0dy2wx6lgcqkmsc2z3p5h
8:54AM ERR EndBlocker BeforeJailedValidators height=18 module=x/poa operator=cosmosvaloper1efd63aw40lxf3n4mhf7dzhjkr453axurlv4rfe
8:54AM ERR handleBeforeJailedValidators deleting jailed validator blockHeight=18 height=18 module=x/poa
8:54AM INF finalized block block_app_hash=44F45727BEA35E6A4FF1076AE416BE3432E711432D6AA44EB3B8A7A009FC7333 height=18 module=state num_txs_res=0 num_val_updates=1
8:54AM INF executed block app_hash=44F45727BEA35E6A4FF1076AE416BE3432E711432D6AA44EB3B8A7A009FC7333 height=18 module=state
8:54AM INF updates to validators module=state updates=5E78075CCD70AB8AE9FF6BDA4538DAFA300B6E18:2
8:54AM INF committed state block_app_hash=3CA43E3F0CB32FBDFC88DFC4893FC3C68D33CA356679183A02202FA1ED7C53DE height=18 module=state
8:54AM INF indexed block events height=18 module=txindex
8:54AM INF Timed out dur=1196.334769 height=19 module=consensus round=0 step=RoundStepNewHeight
8:54AM INF Timed out dur=3000 height=19 module=consensus round=0 step=RoundStepPropose
8:54AM INF Timed out dur=1000 height=19 module=consensus round=0 step=RoundStepPrecommitWait
8:54AM INF resetting proposal info height=19 module=consensus proposer=58EDA1B0640D54F6FE3E3A1021905320E927B906 round=1
8:54AM INF received proposal module=consensus proposal="Proposal{19/1 (3EED58746E1C42CB70EADB20E3D0F0A4E4ADA8BB740F3868FA18117C1D51C4BF:1:33D9F9312CA2, -1) 452FB82EE643 @ 2024-04-16T13:54:12.164616626Z}" proposer=58EDA1B0640D54F6FE3E3A1021905320E927B906
8:54AM INF received complete proposal block hash=3EED58746E1C42CB70EADB20E3D0F0A4E4ADA8BB740F3868FA18117C1D51C4BF height=19 module=consensus
8:54AM INF finalizing commit of block hash=3EED58746E1C42CB70EADB20E3D0F0A4E4ADA8BB740F3868FA18117C1D51C4BF height=19 module=consensus num_txs=0 root=44F45727BEA35E6A4FF1076AE416BE3432E711432D6AA44EB3B8A7A009FC7333
8:54AM INF BeforeValidatorModified module=x/poa valAddr=cosmosvaloper1efd63aw40lxf3n4mhf7dzhjkr453axurlv4rfe
8:54AM INF no validator slashing because slash amount is zero burned=0 module=x/staking slash_factor=0.000000000000000000 validator=cosmosvaloper1efd63aw40lxf3n4mhf7dzhjkr453axurlv4rfe validatorTokens=2000000
8:54AM INF validator jailed module=x/staking validator=cosmosvalcons1teuqwhxdwz4c460ld0dy2wx6lgcqkmsc2z3p5h
8:54AM INF slashing and jailing validator due to liveness fault height=19 jailed_until=2024-04-16T14:04:06Z min_height=17 module=x/slashing slashed=0.000000000000000000 threshold=10 validator=cosmosvalcons1teuqwhxdwz4c460ld0dy2wx6lgcqkmsc2z3p5h
8:54AM INF BeginBlocker events:
 module=x/poa
8:54AM INF PubKey: ed25519:"\246]\320\360\3440\264.\306\331\324\252F\253\024\254\356Uf\351{\227\215\010\370\302\224q\350\352F\310" , Power: 2 module=x/poa
8:54AM INF 
 module=x/poa
8:54AM ERR EndBlocker BeforeJailedValidators height=18 module=x/poa operator=cosmosvaloper1efd63aw40lxf3n4mhf7dzhjkr453axurlv4rfe
8:54AM INF finalized block block_app_hash=86FC147BC81149833F980839076C9BB81C3DA5EE83A5AC33062F916C793175A9 height=19 module=state num_txs_res=0 num_val_updates=1
8:54AM INF executed block app_hash=86FC147BC81149833F980839076C9BB81C3DA5EE83A5AC33062F916C793175A9 height=19 module=state
8:54AM INF updates to validators module=state updates=5E78075CCD70AB8AE9FF6BDA4538DAFA300B6E18:0
8:54AM INF committed state block_app_hash=44F45727BEA35E6A4FF1076AE416BE3432E711432D6AA44EB3B8A7A009FC7333 height=19 module=state
8:54AM INF indexed block events height=19 module=txindex
8:54AM INF Timed out dur=1196.630425 height=20 module=consensus round=0 step=RoundStepNewHeight
8:54AM INF received proposal module=consensus proposal="Proposal{20/0 (B3C0D460F6E2E155C6D960BAACB6D90CD16A3F0BE0F2F2E07C00F46851838AF7:1:5F95FC9228C8, -1) 7F32DA4BAB07 @ 2024-04-16T13:54:13.370961361Z}" proposer=58EDA1B0640D54F6FE3E3A1021905320E927B906
8:54AM INF received complete proposal block hash=B3C0D460F6E2E155C6D960BAACB6D90CD16A3F0BE0F2F2E07C00F46851838AF7 height=20 module=consensus
8:54AM INF finalizing commit of block hash=B3C0D460F6E2E155C6D960BAACB6D90CD16A3F0BE0F2F2E07C00F46851838AF7 height=20 module=consensus num_txs=0 root=86FC147BC81149833F980839076C9BB81C3DA5EE83A5AC33062F916C793175A9
8:54AM INF BeginBlocker events:
 module=x/poa
8:54AM INF PubKey: ed25519:"\246]\320\360\3440\264.\306\331\324\252F\253\024\254\356Uf\351{\227\215\010\370\302\224q\350\352F\310" , Power: 0 module=x/poa
8:54AM INF 
 module=x/poa
8:54AM ERR EndBlocker BeforeJailedValidators height=18 module=x/poa operator=cosmosvaloper1efd63aw40lxf3n4mhf7dzhjkr453axurlv4rfe
8:54AM ERR handleBeforeJailedValidators setting val to jailed blockHeight=20 height=18 module=x/poa
8:54AM INF finalized block block_app_hash=CAD0FCC53D57F6DDA6132E35840E41D3E2CD28CB815ABD2304B2D5482038D0D9 height=20 module=state num_txs_res=0 num_val_updates=0**

go.mod Outdated Show resolved Hide resolved
@Reecepbcups
Copy link
Member Author

leaning towards SDK fork for all POA networks & Spawn. It's less than ideal but I am going to spend another few hours or so tearing my hair out to see if I can get around it.

@Reecepbcups Reecepbcups marked this pull request as ready for review April 22, 2024 20:04
@Reecepbcups Reecepbcups merged commit cb8d77e into main Apr 23, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant