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: Upscale TS to reduce precision loss #68

Merged
Merged
Changes from 1 commit
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
e1df25c
chore: cleanup
GalloDaSballo Oct 31, 2024
b18c629
chore: e2E
GalloDaSballo Oct 31, 2024
f693d5f
fix: cap amount for bribes
GalloDaSballo Oct 31, 2024
01457bd
chore: desc
GalloDaSballo Oct 31, 2024
a589a29
feat: upscale ts to u120
GalloDaSballo Nov 1, 2024
7e777ae
feat: tests somewhat compile
GalloDaSballo Nov 1, 2024
d27487f
feat: invariants compile and have a few TS tests
GalloDaSballo Nov 1, 2024
5d69f9a
chore: easy tests are fixed
GalloDaSballo Nov 1, 2024
4b75ce1
chore: fix mock tests
GalloDaSballo Nov 1, 2024
7c8a577
fix: epochStart is magnified with a hacky solution
GalloDaSballo Nov 1, 2024
105bc32
fix: test ts are magnified
GalloDaSballo Nov 1, 2024
075bf4b
chore: fix overflow
GalloDaSballo Nov 1, 2024
dc845b3
fix: abi decode
GalloDaSballo Nov 1, 2024
28fe9d9
fix: BI-07
GalloDaSballo Nov 1, 2024
56d8e86
WARNING: Add tollerance
GalloDaSballo Nov 1, 2024
d82a0c3
feat: laxer property
GalloDaSballo Nov 1, 2024
6482f51
feat: debug and fix properties
GalloDaSballo Nov 1, 2024
4db439e
fix: BI07
GalloDaSballo Nov 1, 2024
723e9e1
feat: truncation but maybe not so bad
GalloDaSballo Nov 1, 2024
90af7db
fix: we need a higher confidence range
GalloDaSballo Nov 1, 2024
d559696
feat: raise the precision to 1e26
GalloDaSballo Nov 1, 2024
81c048e
fix: upscale the precision in bribes
GalloDaSballo Nov 1, 2024
50933d0
chore: fix tests
GalloDaSballo Nov 1, 2024
bd2cc0a
feat: trying out overflow mode
GalloDaSballo Nov 1, 2024
0572a61
chore: cleanup
GalloDaSballo Nov 1, 2024
9259e26
feat: document overflow risks
GalloDaSballo Nov 1, 2024
ceffe66
fix: overflow in timestamp math
GalloDaSballo Nov 1, 2024
426de19
chore: type consistency
GalloDaSballo Nov 1, 2024
3ecb7a2
fix: ensure user TS never decreases
GalloDaSballo Nov 1, 2024
26d4414
chore: comments on overflow risk
GalloDaSballo Nov 1, 2024
55b94aa
gas: order of operations
GalloDaSballo Nov 1, 2024
9548318
chore: rename fn
GalloDaSballo Nov 1, 2024
0246b32
chore: order of operations for gas
GalloDaSballo Nov 1, 2024
3205922
chore: consistent types
GalloDaSballo Nov 1, 2024
84fcb22
chore: added precision invariant on `getInitiativeState`
GalloDaSballo Nov 1, 2024
f4b1419
chore: custom precision change
GalloDaSballo Nov 1, 2024
04d1b16
chore: remove property that doesn't really work
GalloDaSballo Nov 1, 2024
1ea9df5
feat: add a few revert tests that can help detect overflows
GalloDaSballo Nov 1, 2024
7c96bc7
chore: undo de-optimizations
GalloDaSballo Nov 1, 2024
f210e44
chore: recommendation
GalloDaSballo Nov 1, 2024
e553fea
chore: cleanup
GalloDaSballo Nov 1, 2024
d762007
fix: approve for bribes
GalloDaSballo Nov 2, 2024
1219a02
fix: clamped claim
GalloDaSballo Nov 2, 2024
7742491
chore: cleanup and simplification
GalloDaSballo Nov 2, 2024
4ded0c7
feat: repro for claim bribe
GalloDaSballo Nov 2, 2024
d60587e
feat: extra config for running locally
GalloDaSballo Nov 2, 2024
28d6425
chore: undo config changes
GalloDaSballo Nov 2, 2024
d904b26
feat: add solvency tests for Governance
GalloDaSballo Nov 2, 2024
96de709
feat: insolvency optimization tests
GalloDaSballo Nov 2, 2024
1f0b310
chore: improved coverage and removed canaries
GalloDaSballo Nov 2, 2024
2bfb2b9
chore: make precision public
GalloDaSballo Nov 3, 2024
eb42ca1
chore: local echidna command
GalloDaSballo Nov 3, 2024
4d5526f
cleanup: remove debugged properties
GalloDaSballo Nov 3, 2024
b1b5b2b
fix: remove BI11
GalloDaSballo Nov 3, 2024
36ae4c6
fix: Total and Initiative math can only be compared on state, not sna…
GalloDaSballo Nov 3, 2024
f483b06
fix: optimization properties to use state values
GalloDaSballo Nov 3, 2024
29471b2
chore: comment on possible more checks
GalloDaSballo Nov 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: remove BI11
GalloDaSballo committed Nov 3, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit b1b5b2b620f6614b58a149ffd7859fee287ce810
5 changes: 0 additions & 5 deletions test/recon/properties/BribeInitiativeProperties.sol
Original file line number Diff line number Diff line change
@@ -260,9 +260,4 @@ abstract contract BribeInitiativeProperties is BeforeAfter {
}
}

// BI-11: User can always claim a bribe amount for which they are entitled
function property_BI11() public {
// unableToClaim gets set in the call to claimBribes and checks if user had a claimable allocation that wasn't yet claimed and tried to claim it unsuccessfully
t(!unableToClaim, "BI-11: User can always claim a bribe amount for which they are entitled ");
}
}