fix(tholos-v2): bound max_total_weight / max_position ratio to raise Sybil cost (#168) - #174
Closed
ZacLou wants to merge 3 commits into
Closed
fix(tholos-v2): bound max_total_weight / max_position ratio to raise Sybil cost (#168)#174ZacLou wants to merge 3 commits into
ZacLou wants to merge 3 commits into
Conversation
…n open_reveal_phase Closes drydocs#156 When open_reveal_phase auto-reveals the asserter and disputer fixed positions, publish a Revealed event for each so off-chain indexers can observe the revealed choice without requiring an explicit reveal() call. Adds a test assertion that exactly three Revealed events are emitted: asserter, disputer, and the external voter that called reveal().
) Closes drydocs#165 Adds a conflict-of-interest check in esolve: a resolver who is also the asserter or disputer of the assertion cannot vote. A new Error::SelfVote variant is returned. Adds tests covering both the asserter-as-resolver and disputer-as-resolver cases.
…Sybil cost (drydocs#168) Closes drydocs#168 - Enforce max_total_weight <= MAX_TOTAL_WEIGHT_TO_POSITION_RATIO * max_position (ratio = 10) in initialize. - Add Error::InvalidWeightRatio and document it in CONTRACT_V2.md. - Add tests for the bound and adjust the existing max-position test so its policy satisfies the new ratio. cargo test --workspace passes after rebuilding the tholos WASM for contract imports.
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #168
Enforces a maximum ratio of max_total_weight to max_position (MAX_TOTAL_WEIGHT_TO_POSITION_RATIO = 10) in initialize, raising the cost of Sybil-style address splitting without requiring an external identity system.
cargo test --workspace passes.