fix(ci): restore green content after conflict-merge corruption (all m… - #1
Open
Kingsley4867 wants to merge 411 commits into
Open
fix(ci): restore green content after conflict-merge corruption (all m…#1Kingsley4867 wants to merge 411 commits into
Kingsley4867 wants to merge 411 commits into
Conversation
docs(disputes): add rustdoc examples for the disputes public API
docs(reputation): document authorization rules
feat(reputation): emit indexed event
feat(disputes): add pause-aware guard
docs(reputation): add threat-model note
test(milestones): add resource-budget tests
docs(milestones): add rustdoc examples
docs(contracts): document storage layout and TTL
fix(escrow): add missing validate_contract_id_bounds for reputation/evidence/dispute
test(settlement): add resource-budget regression tests for settlement
…sts-for-escrow-1020 test(escrow): add property tests
…odel docs(disputes): add threat-model note
…in-settlement-with-named-constants refactor(settlement): name magic numbers
docs(escrow): add threat-model note
test(reputation): add resource-budget tests
…ndex-event feat(authorization): emit indexed event
Add pause guard for mutating escrow entrypoints
docs(milestones): document authorization rules
docs(milestones): document storage layout and TTL
…hreatmodel docs: add milestone threat model (#1008)
…rization-and-access-rules docs(settlement): document authorization rules
feat(arbiter): emit state-change event #804
docs(storage): document the model and invariants
…-rollback feat(reputation): add guarded rollback
feat(escrow): add paginated enumeration view and tests
…e-released-key refactor: resolve the unused MilestoneReleased DataKey variant
…eduplicate-settlement-token-check refactor(escrow): extract require_settlement_token helper (#807)
docs(arbiter): document storage layout and TTL
…roval feat: add revoke_approval to withdraw a milestone approval
docs(arbiter): document authorization and access rules
- Fix 5 unchecked arithmetic sites with checked_add/checked_sub: - dispute.rs resolve_dispute_impl: refunded/released += checked_add - lib.rs resolve_dispute: same accumulators checked_add - refund_impl.rs: refunded_amount and total_refund_amount checked_add - refund_impl.rs check_sufficient_balance: checked_sub for available - Add comprehensive settlement_overflow.rs (697 lines, 33 test cases): - resolution_payouts: FullRefund/FullPayout/PartialRefund/Split extremes - i128::MAX, i128::MIN, safe_max, one-past-safe boundaries - Conservation invariant table-driven tests - safe_add/sub, validate_single_amount, accumulate_amounts edges - Integration: corrupted state rejection via entrypoints - Register test module in test/mod.rs Closes #895
Replace the hardcoded 30 and 100 in resolution_payouts's PartialRefund arm with named, documented consts (PARTIAL_REFUND_FREELANCER_PERCENT, PARTIAL_REFUND_PERCENT_BASE). Values and behavior are unchanged. This also restores dispute-module types and wiring that a prior merge had silently dropped (DisputeInfo, DisputeMetadata, DisputeMetadataV0, DISPUTE_STORAGE_VERSION, the two DataKey::Dispute* variants, and the two related Error variants), since dispute.rs did not compile without them. Fixes the resulting tuple/struct mismatches in dispute.rs, lib.rs::resolve_dispute, and the dispute payout tests. Addresses #1058. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
* docs(settlement): add rustdoc examples * fix(settlement): expose settlement as pub mod so rustdoc examples resolve * fix(settlement): mark doc examples no_run to avoid doctest compile failures
Co-authored-by: Gogo-Eng <“progressgogochinda@gmail.com”>
Add min/max/zero/over-limit coverage for contracts limits and readers, plus bounded fuzz-style property tests. Unblock compile by deduping contractimpl entrypoints and restoring Error/DataKey wiring so the new suite can run. Refs #1255. Co-authored-by: Cursor <cursoragent@cursor.com>
test(events): add authorization-matrix tests
…ract-entrypoints fix: resolve escrow contract entrypoint wiring
Add a per-withdrawal cap and cooldown to withdraw_protocol_fees to prevent a compromised admin key from draining the entire treasury in a single call. - Add FeeWithdrawalCap (default 5000 bps = 50%) and FeeWithdrawalCooldownLedgers (default 17280 ledgers = ~1 day) DataKey variants for governed rate-limiting parameters. - Add LastFeeWithdrawalLedger DataKey to track the last successful withdrawal ledger sequence. - Add FeeWithdrawalCapExceeded (#66) and FeeWithdrawalCooldownActive (#67) EscrowError variants. - Enforce per-withdrawal cap in withdraw_protocol_fees with ceiling division for conservative rounding. - Enforce minimum cooldown interval between withdrawals. - Follow CEI ordering: state written before token transfer. - Add set_fee_withdrawal_cap, get_fee_withdrawal_cap, set_fee_withdrawal_cooldown, get_fee_withdrawal_cooldown, and get_last_fee_withdrawal_ledger governance entrypoints. - Add 31 comprehensive tests covering defaults, governance setters, cap enforcement, cooldown enforcement, boundary conditions, combined enforcement, exact accounting, pause enforcement, and multi-cycle workflows. - Remove duplicate protocol_fees_test.rs superseded by test/protocol_fees.rs. Closes #743
The file participant_index_pagination.rs:25:30 had a colon in its name which is illegal on Windows filesystems. This prevented Git checkout on the windows-latest CI runner. Delete the 0-byte garbage file so CI can proceed.
…drawal-rate-limit feat(escrow): rate limit protocol fee withdrawals
Extract the literal 3000 and 7000 basis-point values in DisputeConfig::default() into documented named constants with rustdoc explaining each. Behaviour unchanged; values identical. Tests still pass. Closes #1058
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.
…erges preserved)
Close Talenttrust#981