6.1 Share or Perish (SoP) specification questionsgingeropolous sought clarification from tevador on Share-or-Perish fork-choice rules for monerosim. The main points covered were the definition of n_f, handling of displaced blocks after a reorg, peer-ban behavior when height drops, and the interaction of a workshare count placed in version_minor with Monero’s existing hard-fork vote rule. On n_f, tevador stated that the weight becomes objective once the fork point is 48 work objects deep. On displaced blocks and potential cycling, tevador did not believe a switch can cycle because the weight does not change when chains are switched and the objective weight applies at 48 work objects. Peer bans were flagged as a problem: SoP permits a switch to a shorter chain while stock monerod permanently penalizes peers whose height drops, which can produce 24-hour bans among honest nodes. tevador questioned the rationale, noting that cumulative difficulty can also produce shorter-chain reorgs. Placing the workshare count in version_minor collides with the hard-fork vote rule used in v0.18 (blocks with an insufficient vote are rejected). boog900 confirmed the rule in documentation and code. tevador observed that SoP would require a hard fork to remove the rule if it is enforced and asked whether anyone opposed removing the rule; boog900 suggested the entire vote system could go. rucknium will place the hard-fork vote rule on the next agenda. gingeropolous is launching simulations to confirm observed behavior. tevador noted that the Python simulation code is not authoritative.
Relevant links:
https://github.com/Fountain5405/monerosim/blob/main/docs/assets/sop/mrl146_briefing.md
https://github.com/Fountain5405/monerosim/blob/main/docs/assets/sop/fork_choice_loop.html
rucknium: We had gingeropolous 's question for tevador about the Share or Perish spec
gingeropolous: the long version (warning, ai gen): https://github.com/Fountain5405/monerosim/blob/main/docs/assets/sop/mrl146_briefing.md
tevador: For Q1, the intention was that the weight becomes objective once the fork point is 48 work objects deep.
gingeropolous: shorter versions: n_f is ambiguous: the formal definition counts only the alt chain's work objects, but the prose says the lateness factors apply when "the two chains differ by fewer than k*w," and those give different answers, so
gingeropolous: we need to know which one is intended.
rucknium: I requested and received SoP simulation code from these researchers:
tevador: I don't quite get the LLM phrasing of Q2.
gingeropolous: yeah my heads been having trouble getting around it. maybe this: displaced blocks: the spec doesn't say what to do with blocks a reorg knocks off, and since n_f and lateness depend on which branch you're on, the same two branches can both say SWITCH, so the rule can flip back and forth.
gingeropolous: also made this visual: https://github.com/Fountain5405/monerosim/blob/main/docs/assets/sop/fork_choice_loop.html
gingeropolous: yah gotta download it cause github pages are beyond me for some reason
tevador: I don't think that can happen.
gingeropolous: hrm, perhaps if i solidify Q1 in the implementation then Q2 will go away.
tevador: I don't think it can cycle. The weight doesn't change when you switch chains.
tevador: If either chain is 48 work objects from the fork point, the objective weight kicks in.
gingeropolous: ok, awesome. thank you! i think the remaining stuff is just fiddly
tevador: Btw, my python simulation code is not authoritative. It can have bugs.
gingeropolous: the remaining points are peer bans: SoP lets nodes switch to a branch with fewer blocks, and stock monerod penalizes peers whose height drops and never forgives it, so honest nodes end up banning each other for 24h unless the p2p scoring changes too.
gingeropolous: and forking: putting the workshare count in version_minor breaks things because v0.18 uses that field as the hard fork vote, so most SoP blocks get rejected by nodes that haven't upgraded as "old version."
tevador: I'm not sure what the rationale is for banning peers whose height drops. Cumulative difficulty can also cause a reorg to a shorter chain.
tevador: I'm not familiar with any "hard fork vote" rule. I thought version_minor was only indicative and not used for anything consensus-related.
gingeropolous: yeah i was surprised by that as well
tevador: Can anyone confirm that nodes reject blocks based on version_minor?
gingeropolous: i thought it was seen in the sim run, but i'll double check
boog900:
boog900: > The block's vote must be greater than or equal to the version, a vote higher than the maximum known hard-fork is interpreted as a vote for the latest hard-fork3. So if a block is at V2 then the vote must be V2 or higher
boog900: vote = minor but there is an edge case for minor = 0 where vote = 1
syntheticbird: why make it simple
tevador: "must" => block rejected if violated?
tevador: If we really have this rule than SoP cannot be used without a hard fork removing this rule.
boog900: yes:
tevador: Does anyone oppose removing this useless consensus rule?
boog900: I think the whole vote system can go
rucknium: Looks like moneromooo coded this part
boog900: IIRC some code relies on there being no HF where the activation is not at the height set in the table which would break if a HF gets delayed due to votes.
gingeropolous: im launching some sims to confirm
rucknium: I can put this hard fork rule, and maybe the vote system, on next meeting's agenda.
View quoted note →
GitHub
Share or Perish (selfish mining mitigation) · Issue #146 · monero-project/research-lab
Share or Perish The previously proposed Publish or Perish [1] (PoP) has some shortcomings. With the default parameter k=3, it cannot prevent deeper...
Hard Forks - The Monero Book
GitHub
monero/src/cryptonote_basic/hardfork.cpp at eac1b86bb2818ac552457380c9dd421fb8935e5b · monero-project/monero
Monero: the secure, private, untraceable cryptocurrency - monero-project/monero
GitHub
Share or Perish (selfish mining mitigation) · Issue #146 · monero-project/research-lab
Share or Perish The previously proposed Publish or Perish [1] (PoP) has some shortcomings. With the default parameter k=3, it cannot prevent deeper...
Hard Forks - The Monero Book
GitHub
monero/src/cryptonote_basic/hardfork.cpp at eac1b86bb2818ac552457380c9dd421fb8935e5b · monero-project/monero
Monero: the secure, private, untraceable cryptocurrency - monero-project/monero
#monero-research-lab