Skip to content
Merged

Dev #25

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
a0f4e77
feat(counting): add RulesetCounting base with mutable votes (D12–D14)
LeonardoVieira1630 Jul 14, 2026
82da953
refactor(ruleset): StandardRuleset inherits the counting base — votes…
LeonardoVieira1630 Jul 14, 2026
1e6d3ca
docs: README — mutable votes section, counting-base layout rows
LeonardoVieira1630 Jul 14, 2026
2f03bdb
feat(counting): key tallies by support + expose tally(id, support)
LeonardoVieira1630 Jul 14, 2026
0ea97d5
fix(governor): spend the voter's nonce on direct casts (D21)
LeonardoVieira1630 Jul 14, 2026
a2a8f05
docs(ruleset): lift the D16 non-monotonicity contract onto IRuleset
LeonardoVieira1630 Jul 14, 2026
5c91953
refactor(counting): split tally/_tally, pin _isValidSupport pure, har…
LeonardoVieira1630 Jul 14, 2026
60015cf
docs: README — note the direct-cast nonce spend for gasless relayers …
LeonardoVieira1630 Jul 14, 2026
af6713b
docs(readme): normalize mutable-votes notes to descriptive voice
LeonardoVieira1630 Jul 14, 2026
1dacf5b
Update Parity.t.sol
LeonardoVieira1630 Jul 14, 2026
bf7fb5f
ci: add ClickUp sync workflow
brunod-e Jul 15, 2026
ded3bdc
feat(governor): per-proposer cap on live proposals — Nexus 4 spam lim…
LeonardoVieira1630 Jul 16, 2026
0e9c590
feat(governor): castVoteBatch — all-or-nothing multi-proposal voting …
LeonardoVieira1630 Jul 16, 2026
b291701
fix(governor): batch cast spends the voter's nonce (D30)
LeonardoVieira1630 Jul 16, 2026
c22c085
test(governor): pin duplicate-id and re-vote-via-batch semantics (D32)
LeonardoVieira1630 Jul 16, 2026
123c64e
test(governor): pin all-or-nothing batch semantics under mid-batch fa…
LeonardoVieira1630 Jul 16, 2026
23ecc52
test(governor): pin per-item params event dispatch in castVoteBatch (…
LeonardoVieira1630 Jul 16, 2026
1643e2c
test(governor): batch/single equivalence fuzz + gas comparison
LeonardoVieira1630 Jul 16, 2026
3d3109f
docs(readme): note castVoteBatch — batch semantics and the D30 nonce …
LeonardoVieira1630 Jul 16, 2026
1ec6f2c
docs(governor): drop spec/decision-record citations from Nexus 4 comm…
LeonardoVieira1630 Jul 16, 2026
a5db5b3
test(governor): pin per-item snapshot weights; fuzz all-distinct batc…
LeonardoVieira1630 Jul 16, 2026
23c2b86
docs(governor): fix stale invariant claim, document spam limit in README
LeonardoVieira1630 Jul 17, 2026
7cb1d16
docs(batch): decouple code comments from task/spec tracking labels
LeonardoVieira1630 Jul 17, 2026
203ee56
refactor(governor)!: rename castVoteBatch to castVoteWithReasonAndPar…
LeonardoVieira1630 Jul 17, 2026
680214d
feat: extend voting 48h on a late failing-to-passing flip (D33-D37)
LeonardoVieira1630 Jul 17, 2026
f2d5b5d
test: pin fork divergence #5 - live governor never extends on late flip
LeonardoVieira1630 Jul 17, 2026
9ac735c
docs: late-flip extension section + IRuleset compliant-consumer note
LeonardoVieira1630 Jul 17, 2026
970f95f
style: keep code comments about the code
LeonardoVieira1630 Jul 17, 2026
6ceb304
Update ENSParams.sol
LeonardoVieira1630 Jul 17, 2026
cd79d23
docs: spell out the degenerate case behind the voting-period guard
LeonardoVieira1630 Jul 17, 2026
c7db2f5
docs: drop remaining RFC references from test comments
LeonardoVieira1630 Jul 17, 2026
6abc0d9
refactor: extract the anti-snipe mechanism into GovernorPreventLateFlip
LeonardoVieira1630 Jul 17, 2026
c45282f
Update GovernorNexus.sol
LeonardoVieira1630 Jul 17, 2026
13a2dcf
test: drop the optimistic-mock genericity test
LeonardoVieira1630 Jul 17, 2026
f991af1
docs: move mechanism essays from natspec to the spec, keep constraints
LeonardoVieira1630 Jul 20, 2026
c4c2ea9
docs(readme): decouple from milestone vocabulary
LeonardoVieira1630 Jul 20, 2026
d5e808f
Update GovernorPreventLateFlip.sol
LeonardoVieira1630 Jul 20, 2026
b000da3
Update GovernorPreventLateFlip.sol
LeonardoVieira1630 Jul 20, 2026
0ee0069
refactor: encode the late-flip state as a monotone stage enum
LeonardoVieira1630 Jul 20, 2026
88c1e67
docs: fix stale reverting-views blast-radius claims, pin the real one
LeonardoVieira1630 Jul 20, 2026
da862e7
Merge pull request #6 from blockful/ci/clickup-sync
pikonha Jul 20, 2026
49ee41f
Merge pull request #8 from blockful/claude/clickup-DEV-1002
LeonardoVieira1630 Jul 21, 2026
d6640b9
Merge branch 'claude/clickup-DEV-998' into claude/clickup-DEV-999
LeonardoVieira1630 Jul 21, 2026
f1eaf24
Merge pull request #9 from blockful/claude/clickup-DEV-999
LeonardoVieira1630 Jul 21, 2026
bf713bf
refactor(counting): collapse _tally into the checked tally()
LeonardoVieira1630 Jul 21, 2026
8878a23
Merge pull request #4 from blockful/claude/clickup-DEV-998
LeonardoVieira1630 Jul 21, 2026
d0f94f2
Merge branch 'dev' into claude/clickup-DEV-1000
LeonardoVieira1630 Jul 21, 2026
dcdbf69
fix: repair constructor call sites broken by merge conflict resolution
LeonardoVieira1630 Jul 21, 2026
cc38210
Merge pull request #7 from blockful/claude/clickup-DEV-1000
LeonardoVieira1630 Jul 21, 2026
1538d21
feat(cancel): continuous proposer threshold + proposer self-cancel
LeonardoVieira1630 Jul 21, 2026
73f2d98
docs: slim contract comments to function-level NatSpec, move context …
LeonardoVieira1630 Jul 21, 2026
3f8ce4d
fix(cancel): bound all cancellation to Pending|Active
LeonardoVieira1630 Jul 21, 2026
aaf4b56
docs: trim _validateCancel natspec to the policy itself
LeonardoVieira1630 Jul 21, 2026
cb4f706
feat(ruleset): add OptimisticRuleset — pass-unless-vetoed with propos…
LeonardoVieira1630 Jul 22, 2026
efcaa2b
feat(core): gate propose on rulesets advertising IProposalValidator
LeonardoVieira1630 Jul 22, 2026
b82680c
docs(readme): optimistic ruleset section, layout rows, milestone deco…
LeonardoVieira1630 Jul 22, 2026
b81a95f
Update GovernorNexus.sol
LeonardoVieira1630 Jul 22, 2026
20e7993
Update GovernorNexus.sol
LeonardoVieira1630 Jul 22, 2026
ee4a913
Update GovernorNexus.sol
LeonardoVieira1630 Jul 22, 2026
4504309
Update IProposalValidator.sol
LeonardoVieira1630 Jul 22, 2026
739cd12
refactor(core): rename TypeConfig.gated to hasValidator
LeonardoVieira1630 Jul 22, 2026
8d151bc
docs(ruleset): trim OptimisticRuleset natspec to behavior and invariants
LeonardoVieira1630 Jul 22, 2026
71fc35a
refactor(core): rename TypeConfig.hasValidator to hasProposalValidation
LeonardoVieira1630 Jul 22, 2026
6c8340f
test: split validation-gate suite out of the optimistic suite
LeonardoVieira1630 Jul 22, 2026
026520d
Merge branch 'claude/clickup-DEV-1001' into claude/clickup-DEV-1003
LeonardoVieira1630 Jul 23, 2026
9707a21
feat(core): carry descriptionHash into the IProposalValidator hook (D62)
LeonardoVieira1630 Jul 23, 2026
7dba5f2
feat(core): record cancel timepoint, expose proposalCanceledAt
LeonardoVieira1630 Jul 22, 2026
618dfa3
feat(bond): BondRuleset skeleton — immutables, four-bucket counting s…
LeonardoVieira1630 Jul 22, 2026
f1d6f7d
feat(bond): outcome semantics — slash bucket is opposition, quorum is…
LeonardoVieira1630 Jul 22, 2026
c5528f3
feat(bond): lock — measured-delta custody keyed by canonical proposal id
LeonardoVieira1630 Jul 22, 2026
b8344b4
feat(bond): permissionless one-shot resolveBond — EP 5.15 predicate w…
LeonardoVieira1630 Jul 22, 2026
89d4d88
test(bond): cancel partition — pending refund, active forfeit, counci…
LeonardoVieira1630 Jul 22, 2026
ea1713d
test(bond): fuzzed bond-conservation and one-shot-settlement invariants
LeonardoVieira1630 Jul 22, 2026
eefea58
test(bond): broaden invariant handler to Executed + self-cancel settl…
LeonardoVieira1630 Jul 22, 2026
49953cc
test(bond): batch voting, mutable-vote drain, late-flip extension on …
LeonardoVieira1630 Jul 22, 2026
0a5dad8
docs(bond): README mechanism section + production BOND_AMOUNT param
LeonardoVieira1630 Jul 22, 2026
7f48241
docs(bond): document gated-ruleset-trust and unexecutable-strand resi…
LeonardoVieira1630 Jul 23, 2026
d43c477
Update ENSParams.sol
LeonardoVieira1630 Jul 23, 2026
991bc0e
Update GovernorNexus.sol
LeonardoVieira1630 Jul 23, 2026
a331602
Update IProposalValidator.sol
LeonardoVieira1630 Jul 23, 2026
c0fc456
fix(ci): pass fmt & static analysis; make bond docs and comments agno…
LeonardoVieira1630 Jul 23, 2026
83a6f4b
Update README.md
LeonardoVieira1630 Jul 23, 2026
57b3c69
Update README.md
LeonardoVieira1630 Jul 23, 2026
2c95a77
fix(ci): suppress aderyn reentrancy-state-change on the bond lock
LeonardoVieira1630 Jul 23, 2026
544ba1c
Update BondRuleset.sol
LeonardoVieira1630 Jul 23, 2026
c2c6317
Update BondRuleset.sol
LeonardoVieira1630 Jul 23, 2026
3f7df1a
Update BondRuleset.sol
LeonardoVieira1630 Jul 23, 2026
d674d30
Update BondRuleset.sol
LeonardoVieira1630 Jul 23, 2026
d6ef6ad
refactor(bond): flatten resolveBond into a decision helper + single s…
LeonardoVieira1630 Jul 23, 2026
e0a474f
refactor(bond): write the bond before pulling it (CEI), reject under-…
LeonardoVieira1630 Jul 23, 2026
5579cae
Update FeeOnTransferToken.sol
LeonardoVieira1630 Jul 23, 2026
427a319
Update BondRulesetTestBase.sol
LeonardoVieira1630 Jul 23, 2026
cec4652
Update BondRuleset.t.sol
LeonardoVieira1630 Jul 23, 2026
bb70d5f
Update GovernorNexus.bond.t.sol
LeonardoVieira1630 Jul 23, 2026
0d64053
chore: strip development-process references from code and docs
LeonardoVieira1630 Jul 24, 2026
73474e7
chore: remove ENSGovernor scaffold and its unit suite
LeonardoVieira1630 Jul 24, 2026
d060d89
docs: refresh gas benchmark numbers from current code
LeonardoVieira1630 Jul 24, 2026
42c7eac
docs: restructure README for readability
LeonardoVieira1630 Jul 24, 2026
163e735
chore: group src/ and test/ into interfaces, rulesets and governor fo…
LeonardoVieira1630 Jul 24, 2026
85d1db6
docs: rebase README framing on the RFC
LeonardoVieira1630 Jul 24, 2026
f737792
docs: simplify architecture diagram (plain core<->rulesets arrow, dro…
LeonardoVieira1630 Jul 24, 2026
5965a00
Merge pull request #15 from blockful/chore/repo-structure
LeonardoVieira1630 Jul 24, 2026
3329559
Merge pull request #14 from blockful/chore/comment-hygiene
LeonardoVieira1630 Jul 24, 2026
367ec6b
Merge pull request #13 from blockful/claude/clickup-DEV-1004-on-n7
LeonardoVieira1630 Jul 24, 2026
1ab0cfa
Merge pull request #11 from blockful/claude/clickup-DEV-1003
LeonardoVieira1630 Jul 24, 2026
8cc4a45
Merge pull request #10 from blockful/claude/clickup-DEV-1001
LeonardoVieira1630 Jul 24, 2026
3891622
fix(governor): keep _isLive ruleset-free so a poisoned ruleset can't …
LeonardoVieira1630 Jul 24, 2026
e0b953a
fix(bond): slash only on strict plurality over raw tallies
LeonardoVieira1630 Jul 27, 2026
97e6351
fix(bond): apply the EP 5.15 ratified slash predicate verbatim
LeonardoVieira1630 Jul 27, 2026
b68f1f5
feat(registry): reject mis-bound rulesets and zero quorum numerators …
LeonardoVieira1630 Jul 27, 2026
be02724
fix(cancel): bar cancel in the propose block, reject zero votingDelay
LeonardoVieira1630 Jul 27, 2026
f4bd931
refactor(validator): governor-computed proposalId flows through IProp…
LeonardoVieira1630 Jul 27, 2026
1965b2c
refactor(rulesets): extract RulesetQuorumFraction mixin (QUAL-18)
LeonardoVieira1630 Jul 27, 2026
b512fc6
refactor(bond): drop the provably-constant Bond.amount field (QUAL-16)
LeonardoVieira1630 Jul 27, 2026
7b822e6
refactor(bond): resolution is a single SlashReason, not a redundant t…
LeonardoVieira1630 Jul 27, 2026
1d8d2ee
chore: sweep leftovers — orphan param, sentinel + admin docs (QUAL-21)
LeonardoVieira1630 Jul 27, 2026
a965d92
docs: move _isLive rationale from code comment to README
LeonardoVieira1630 Jul 28, 2026
00b840c
Update IProposalValidator.sol
LeonardoVieira1630 Jul 28, 2026
dff3d7b
Update BondRuleset.sol
LeonardoVieira1630 Jul 28, 2026
559929d
Update GovernorNexus.sol
LeonardoVieira1630 Jul 28, 2026
2e06582
Update OptimisticRuleset.sol
LeonardoVieira1630 Jul 28, 2026
3e93517
Merge pull request #21 from blockful/claude/qual-cleanup-dedup
LeonardoVieira1630 Jul 28, 2026
6c25778
Merge pull request #20 from blockful/claude/qual-interface-proposalid
LeonardoVieira1630 Jul 28, 2026
239450f
Merge pull request #19 from blockful/claude/lead10-sameblock-cancel
LeonardoVieira1630 Jul 28, 2026
c228a99
Merge pull request #18 from blockful/claude/registration-guards
LeonardoVieira1630 Jul 28, 2026
ea8819c
Merge pull request #17 from blockful/claude/sec2-slash-plurality
LeonardoVieira1630 Jul 28, 2026
3e54c78
Merge pull request #16 from blockful/claude/sec1-islive-containment
LeonardoVieira1630 Jul 29, 2026
791ca67
feat: resolveBond refunds in Succeeded/Queued
LeonardoVieira1630 Aug 3, 2026
8b5aa5c
docs: README — bond refunds open at Succeeded, veto forfeit best-effort
LeonardoVieira1630 Aug 3, 2026
61a6bca
Update README.md
LeonardoVieira1630 Aug 3, 2026
f126b77
refactor: merge refund states into a single branch in _bondResolution
LeonardoVieira1630 Aug 3, 2026
c7a0bfd
feat: scope vote-signature nonce per (proposal, voter)
LeonardoVieira1630 Aug 3, 2026
bbcc218
docs: per-proposal ballot nonce semantics in README
LeonardoVieira1630 Aug 3, 2026
aaa30b3
Merge pull request #22 from blockful/claude/nexus8-bond-early-refund
LeonardoVieira1630 Aug 3, 2026
cf19e57
fix: harden per-proposal nonce — spend before dispatch (DR-4), view v…
LeonardoVieira1630 Aug 3, 2026
cf5a4b5
Update GovernorNexus.voteNonce.t.sol
LeonardoVieira1630 Aug 4, 2026
0eafa8e
Delete test/mocks/MockERC1271Wallet.sol
LeonardoVieira1630 Aug 4, 2026
68eedff
fix: legacy dependency
LeonardoVieira1630 Aug 4, 2026
e2e0b94
Merge pull request #23 from blockful/worktree-nonce-per-proposal
LeonardoVieira1630 Aug 4, 2026
3aa3ebf
docs(readme): fix stale claims ahead of the implementation report
LeonardoVieira1630 Aug 19, 2026
0364ad0
chore: add MIT license and security policy
LeonardoVieira1630 Aug 19, 2026
66a4b9b
chore: align comments with the shipped AgainstAndSlash naming
LeonardoVieira1630 Aug 19, 2026
cc407ef
feat(params): pin the intended bond and veto values in ENSParams
LeonardoVieira1630 Aug 19, 2026
c3de64a
ci: remove the task-sync workflow
LeonardoVieira1630 Aug 19, 2026
db81e3b
Update ENSParams.sol
LeonardoVieira1630 Aug 19, 2026
e99b68c
Delete SECURITY.md
LeonardoVieira1630 Aug 19, 2026
2b22fda
Merge pull request #24 from blockful/chore/pre-announcement-cleanup
LeonardoVieira1630 Aug 19, 2026
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
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 blockful

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
462 changes: 422 additions & 40 deletions README.md

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions foundry.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"lib/forge-std": {
"rev": "bf647bd6046f2f7da30d0c2bf435e5c76a780c1b"
},
"lib/openzeppelin-contracts": {
"rev": "5fd1781b1454fd1ef8e722282f86f9293cacf256"
}
}
11 changes: 7 additions & 4 deletions script/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import {TimelockController} from "@openzeppelin/contracts/governance/TimelockCon
import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";

import {GovernorNexus} from "../src/GovernorNexus.sol";
import {StandardRuleset} from "../src/StandardRuleset.sol";
import {StandardRuleset} from "../src/rulesets/StandardRuleset.sol";
import {ENSParams} from "../src/ENSParams.sol";

/// @notice Deploys the Nexus system — `StandardRuleset` + `GovernorNexus` — wired to the
/// real ENS token and timelock with the live governor's current parameters. Neither
/// contract is granted timelock roles here; migration onto the live timelock is a
/// DAO proposal granting PROPOSER + EXECUTOR (the live timelock is OZ v4.3:
/// CANCELLER_ROLE does not exist there).
/// @dev Wiring (spec §Wiring note): `StandardRuleset.countVote` is `onlyGovernor` and
/// @dev Wiring: `StandardRuleset.countVote` is `onlyGovernor` and
/// `quorumReached` reads `governor.proposalSnapshot`, so the ruleset must be
/// constructed with the governor's address — but the governor's constructor needs the
/// ruleset (it registers row 0 with it). Break the cycle by precomputing the
Expand Down Expand Up @@ -46,15 +46,18 @@ contract Deploy is Script {
standardRuleset = new StandardRuleset(predictedGovernor, IVotes(ENSParams.TOKEN), ENSParams.QUORUM_NUMERATOR);

// Name "ENS Governor" so `name()` and the EIP-712 vote-by-sig domain match the live
// governor (spec D11).
// governor.
governor = new GovernorNexus(
"ENS Governor",
IVotes(ENSParams.TOKEN),
TimelockController(ENSParams.TIMELOCK),
standardRuleset,
ENSParams.VOTING_DELAY,
ENSParams.VOTING_PERIOD,
ENSParams.PROPOSAL_THRESHOLD
ENSParams.PROPOSAL_THRESHOLD,
ENSParams.MAX_ACTIVE_PROPOSALS,
ENSParams.EXTENSION_WINDOW,
ENSParams.EXTENSION_DURATION
);
require(address(governor) == predictedGovernor, "Deploy: governor address prediction failed");

Expand Down
107 changes: 0 additions & 107 deletions src/ENSGovernor.sol

This file was deleted.

15 changes: 13 additions & 2 deletions src/ENSParams.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,19 @@ library ENSParams {
uint48 internal constant VOTING_DELAY = 1; // blocks
uint32 internal constant VOTING_PERIOD = 45_818; // blocks (~1 week)
uint256 internal constant PROPOSAL_THRESHOLD = 100_000e18; // 100k ENS
// Not read from the live governor (it has no such mechanism): per-proposer cap on
// concurrently live proposals.
uint8 internal constant MAX_ACTIVE_PROPOSALS = 2;
// Live governor expresses quorum as 100/10000; OZ v5's default denominator is 100,
// so numerator 1 encodes the same 1%. Parity is asserted on quorum() output, which
// is denominator-independent.
// so numerator 1 encodes the same 1%.
uint256 internal constant QUORUM_NUMERATOR = 1;

// Intended ENS registration values for the additional rulesets.
uint256 internal constant BOND_AMOUNT = 1_000e18; // 1,000 ENS
uint256 internal constant VETO_THRESHOLD = 500_000e18; // 500k ENS

// Late-flip extension: final-24h trigger window and 48h extension, in
// blocks (~12s/block), matching the block-denominated voting period above.
uint48 internal constant EXTENSION_WINDOW = 7200; // 24h
uint48 internal constant EXTENSION_DURATION = 14_400; // 48h
}
Loading
Loading