-
Notifications
You must be signed in to change notification settings - Fork 58
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
Governance Initialization Fixes #1781
Merged
Merged
Conversation
This file contains 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
Codecov Report
@@ Coverage Diff @@
## gov-2.0.0 #1781 +/- ##
============================================
Coverage ? 71.38%
============================================
Files ? 59
Lines ? 734
Branches ? 250
============================================
Hits ? 524
Misses ? 181
Partials ? 29
*This pull request uses carry forward flags. Click here to find out more. 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
barrasso
added a commit
that referenced
this pull request
Sep 3, 2024
* update version to 2.0.0-alpha.0 * fix default epoch start date * refactor DebtShare tests location * fix first epoch index initialization * fix getting of snapshot id before the array is initialized * update assertEvent usage * fix merkle tree getter * fix debtshare initialization * fix CouncilToken proxy usage * fix CouncilToken proxy usage * fix tests * fix settings initialization * remove unnecessary check * revert xchain-pools changes * revert unneeded changes * Fix governance epoch settings storage (#1722) * fix coeverage filter * refactor proxy deployment on tests * fix core-utils tests * Fix deps * Ignore and work around subgraph AssemblyScrypt in depcheck * Fix epoch schedule tweak & next election settings update (#1725) * add epoch schedule tests * fix initialization dates * fix arrow fn usage * add BaseElectionModule tests * refactor tests location * add schedule getter * remove defaultBallotEvaluationBatchSize setting * remove individual settings getters * add Administration check * add tweakEpochSchedule outside tolerance tests * add tweakEpochSchedule happy path tests * add period validations * add test case for maxDateAdjustmentTolerance bypass * add epoch duration validation * fix lint * fix lint * rename settings names * remove modifyEpochSchedule fn * add single next election settings setter * refactor ElectionSettingsManger * fix snapshot usage * fix tests * fix settings initialization * add set settings tests * fix lint issues * fix schedule calculations from settings * add validations for not being able to nullify elections periods * add _MIN_ELECTION_PERIOD_DURATION comments * add maxDateAdjustmentTolerance to initialization * fix comments * fix ethers dependency * fix lint * restore testable router * fix repetition in cannonfile.test.toml * Xchain voting (#1728) * add UpgradeProposalModule (#1726) * Add missing modifiers * disable elections flow tests * bit of a refactor for how ballots are counted (#1734) try to simplify the flow, make it easier to identify votes through a "snapshot record" which is an interface that can declare voting power and have snapshot taken. This can work with v3 through the use of a rewards distributor (one that doesn't actually distribute rewards) * fix cannonfile build * fix a couple tests * remove unused assert * Snapshot vote power tests (#1749) * initial building of the tests and fixing of the cannonfile * implement majority of tests for SnapshotRecord * fix bugs in the recent tests * most changes in * fix lint issues --------- Co-authored-by: Matías <[email protected]> * revert crosschain storage layout. treat the first chain ID in the supported chains list as the mothership * fix tests generation (#1770) * Add Owner Guardianship (#1732) * add owner guardian contracts * fix ownershipRequestedAt usage * refactor CrossChain into core-modules (#1756) * refactor CrossChain into core-modules * fix tests * fix comment * fix ccip tests * fix OwnerModule compilation * Rename lastElectionId -> currentElectionId (#1780) * rename lastElectionId to currentElectionId * fix testable storage generation * Remove unnecessary ProxyStorage inheritance * Governance Initialization Fixes (#1781) * remove epochSeatCount param on initialization * update initializer * fix initial parameters * fix initialization dates calculation * fix calculation of days * fix tests * update usage of imports * fix lint warning * Remove guardianship & delayed upgrade functionalities (#1801) * remove guardianship & delayed upgrade functionalities * update storage dump * Add satellites NFT distribution (#1787) * refactor crosschain helper fns * add nominate during nomination period also * rename precint to chainId * add nft distribution on satellites * remove BaseElectionModule in favor of a single ElectionModule (#1826) * remove BaseElectionModule in favor of a single ElectionModule This can be done just by allowing to set the ballot size on ElectionModule * fix configs lint * fix cannonfiles * fix synthetix test cannonfile * add CrossChain module to gov cannonfile * add base ElectionModuleSatellite file * add election module satellite * refactor cannonfiles * add members dismissal logic * add CCIP epoch resolution * remove unnecessary chain number validator * refactor council members storage * fix usage of council members storage * add satellite council module initialization * fix AddressSet usage * fix cannonfiles dependencies * fix satellite cannonfile build * added sepolina support * using getter function * Refactor ccip config to extract core settings (#1853) * refactor ccip config to extract core settings * update storage dumps * fixed typo * removed unused settings * make cast func payable * support crosschain voting * update gov satellite cannonfile package name * refactor cannonfile settings * add cross chain address target setting on initialization * remove depends on cannonfiles * fix test cannonfile version * fix ccip config * fix msg.sender usage * refactor satellite init * add base for cross chain integration tests * add ccip router * add multiple chains connections * add ccip router mock to gov tests * add cross chain typechain types * add ccip interaction * fix nodes interaction * fix wallet fixture * fix dedupe * add snapshots module to satellite * Gov intergration test (#1873) * test: gov v2 integration test * push for mati * fix cross chain calls * fix ccipReceive mock * fix router mock call context * fixing func * fixing tests * cleaning up --------- Co-authored-by: Peiman <[email protected]> Co-authored-by: Matías <[email protected]> * updated the bootstrap function * refactor epoch storage * fix tests * add votingPower calculation on satellite networks * add epoch initialization on satellites * add epoch initialization on satellites * Gov 2 integration (#1876) * Remove unused supportedNetworkTargets config (#1877) * remove unused supportedNetworkTargets config * remove unused dependency * fix unused deps * refactor cannon subprocesses to be in the same process * fix tests * update cannon file * Fix inifinite amount of votes (#1878) * fix usage of ballot indexes * remove unnecessary removal of item from set * Old election test (#1881) * old test * update tests * updating tests * updated test * updated eval * refactor integration tests bootstrap --------- Co-authored-by: Matías <[email protected]> Co-authored-by: Peiman <[email protected]> * fix yarn.lock * add missing @foundry-rs/hardhat-anvil dep * fix test period helpers * fix cc voting tests in different steps * Fix mothership votes casting (#1916) * fix mothership votes casting * fix usage of voter * fix test cannonfile default config * add epoch update to satellites (#1917) * add epoch update to satellites * fix crosschain revert parsing * fix cast vote unit tests * added tests * fix payable functions * moved validation * Fix snapshot contract management (#1920) * fix snapshot contract management * fix check of disabled snapshot contract * ccip event (#1923) * push * fix events parsing * fixing test * remove error try catch * added type import --------- Co-authored-by: Matías <[email protected]> * remove possibility of gov nft transfers (#1924) * add epoch index validation on vote casting (#1925) * add refundLeftoverGas call on broadcast (#1926) * Fix small issues (#1927) * fix typo n1 * remove unused private _getCouncilToken fn * fix consistency on dates usage * refactor election module init * unify test scripts * Iosiro val candidate (#1929) * implemented feedback * remove console.log * update voting period duration * Refactor council tokenid (#1930) * refactor council token id generation * update storage dump * add multi chain dev task * add cross chain message listener * fix cross chain signer param * updated dev comnand * added candidates to event * add dummy withdrawVote fn * removed only * remove loop * add trusted_multicall_forwarder to cannonfile * fix setting location * add presets to cannonfiles * remove changes to protocol/synthetix * update yarn.lock * update storage.dump.sol * fix package.json * update hardhat-cannon to 2.10.8-alpha.1 * bump to 3.0.0-rc.0 * rename satellite package * add cannonfile for snapshot record mock * add create2 and salt to snapshot record * bump governance to 3.0.0 * fix snapshot id incorrectly resolved when starting new election (#1986) * Update mintable token extraction function to work with new incompatible version of the constructor (#1982) * Update mintable token extraction function to work with new incompatible version of the constructor * Add Sepolia * Reduce wording for mintable token name * fix snapshot id incorrectly resolved when starting new election should be using snapshot id prior to the `takeSnapshot` otherwise addresses will be able to change their voting power during hte election, which defeats the whole point. the tests were also incorrect * Move ABIs generation to deployments repo (#1987) * fixing ci * dedupe --------- Co-authored-by: Noisekit <[email protected]> Co-authored-by: max <[email protected]> * update yarn.lock * add highlight to proxies * remove CouncilToken interface from governance CoreProxy * update election module satellite init * added error * bump gov to 3.0.1 * update comments * fix test * fix tests * bump gov to 3.0.2 * update satellite cannonfile init * fix satellite tests init * fix satellite default values * rename governance's proxy from CoreProxy to GovernanceProxy (#1990) * SIP-360: Wormhole Cross Chain Integration (#2172) * wormhole cross chain * removed wormhole unused sdk * typo on git ignore file * removing unused files * removed unnecessary file * yarn install state ignore * removed install state from git diff * removed change to git ignore * deleted old cross chain files * removed old todo * some solhint fixes * trying to fix linter lol * deleted unused file * some code cleanup prior to review * reset some files to main * reset yarn.lock * update yarn.lock * update yarn.lock * yarn dedupe * fix added old contracts * fix cannon dependencies * fix tests to be compatible with latest cannon * update cannon to 2.15.2 * fix events parsing * fix chainId * fixed chain id problems * undo storage dump change * undo utils hardhat config change * prettier * * prettier .sol * fix linter * Fix deps * fix some lint issues * fixed gov tests * solhint fixed errors, not warnings * fix dev script * Remove governance ccip (#2182) * fix node export * fixed cannonfiles * fixed cannonfiles * fixed tests * sending cost to relayer * remove last ccip references on governance * remove --wipe on dev task * refactor mothership chain id usage * remove Election.resolved variable * added some comments * some more ccip cleanup * receiveWormholeMessages * interim changes * fixed test relayer addresses * fixed js lint error * rewrite settings on root cannonfiles * add temp testnet cannonfiles * passing 0 for receiver value instead of msg.value when calling transmit * update testnet cannonfiles setup * update deployer * update testnet deployment to base sepolia * update testnet salt * Moss audit fixes (#2190) * ez fixes * more fixes but tests breaking * added broadcast * added refund amount * receiveWormholeMessages fix * test changes * linting * remove unused ElectionVase file * fixed tests * lint * add base for testing council members * added refund test * add dismisal members tests * lint * removed todos in gov contracts * refactor cross chain initialization (#2194) * fix lint * fix lint errors * pushing new cannonfiles * getSupportedNetworks * bump gov to 3.0.4 * update testnets salt * update owners * fix testnet cannonfiles * fix testnet cannonfiles * added view fns and some events * fixed _recMessage * fixed _recMessage * updated cannon files * lint * @with-synthetix preset * moved gas limit * fixed salts * reset cannon * added gas limit to cannon files * updated cannon files * remove unused SetUtil import * updated cannonfiles * Migrate snapshot rewards distributor (#2206) * migrate SnapshotRewardsDistributor from https://github.com/Synthetixio/rewards-distributors * rewards distributor fixes --------- Co-authored-by: Moss <[email protected]> * lint * added view fn * Add voting power weight configuration (#2207) * poc for voting power algorithms * add voting power calculation * update implementation interface --------- Co-authored-by: Moss <[email protected]> * updated weight types * added tests * removed send msg * getGasLimit * natspec'd election module contracts * added base cannonfile * audit fixes * added test confirming remove emitter works * lint * Audit fixes for SnapshotRewardsDistributor (#2220) * update DebtShareNotFound error for AccountNorFound * fix account balance idx reference * deleting todos and added test * update synthetix-snapshot-rewards version * fix default values * pushing version * audit fixes * audit fixes 2 * lint --------- Co-authored-by: Matías <[email protected]> Co-authored-by: Matías <[email protected]> * fix * added unit test and deleted cannon files * cannonnfiles and updated snaxchain chain ids * updated snax cannonfile * saving work * Bump cannon versions to latest (#2225) * Bump cannon versions to latest * remove unsupported toml param * fix typo * attempt to fix assert-revert after upgrading deps * add contract reference in assert test * Fix type imports * Update typescript * Update cannon to 2.16.3 to fix ts build --------- Co-authored-by: Noisekit <[email protected]> * Bfp permissions (#2140) * Add and use permission for pay debt & split account * Update storage dump * Add new perms to `isPermissionValid` * Prefix bfp permissions * Add test for when trying to split account with different owner/signers * Fix flakey tests --------- Co-authored-by: 0xMithrandir <[email protected]> * Revert if reducing order makes position liquidatable (#2210) * Revert is order makes position liquidatable when reducing * Reuse the logic for fill premium for mm check * Update storage * Fix flakey tests * Foundry caching (#2228) * Compile foundry only once * Only cache forge/bin * Bump nodejs to 20.16.0 * Avoid recursive compilation * Weekly cannon cache to speed up build-testable * Cannon cache for non-testable hardhat build, separate cache for testable and non-testable cannon * Separate storage verification without cannon build (#2230) * Separate storage verification without cannon build * Always update cannon cache * Add minDelegateTime in BFP createMarket (#2227) * Add minDelegateTime in createMarket * Add comment on minDelegateTime Co-authored-by: David Vuong <[email protected]> * Add a setter function for minDelegateTime * Update utilization test --------- Co-authored-by: David Vuong <[email protected]> * fix: add OwnableStorage.onlyOwner and tests setMinDelegationTime (#2232) * Fix flakey order test (#2229) Co-authored-by: David Vuong <[email protected]> * Add missing generate-testable (#2231) * Add missing generate-testable * Add missing storage dump * ability to change token names from within synthetix core proxy for example we want to be able to change the symbol of the synthetix usd token * Revert "ability to change token names from within synthetix core proxy" This reverts commit db43572. * ability to change token names from within synthetix core proxy (#2235) * ability to change token names from within synthetix core proxy for example we want to be able to change the symbol of the synthetix usd token * Update cannonfile.toml * Update USDTokenModule.test.ts * Docgen contracts (#2236) * Remove perps docs from git * Add missing docs to the generator and fix generation for new packages * Deps * Append docs * update * changed to clone * test cannon files * fix * some fixes * removed extraneous cannonfiles * added view fn * added view fns to satellite * accidental param move * natspec * added nomination period to tweakepochschedule --------- Co-authored-by: Matías <[email protected]> Co-authored-by: meb <[email protected]> Co-authored-by: Matías Lescano <[email protected]> Co-authored-by: Noisekit <[email protected]> Co-authored-by: dbeal <[email protected]> Co-authored-by: Daniel Beal <[email protected]> Co-authored-by: max <[email protected]> Co-authored-by: max <[email protected]> Co-authored-by: Peiman <[email protected]> Co-authored-by: Peiman <[email protected]> Co-authored-by: Noisekit <[email protected]> Co-authored-by: MrX-SNX <[email protected]> Co-authored-by: Leonardo Massazza <[email protected]> Co-authored-by: Joey <[email protected]> Co-authored-by: 0xMithrandir <[email protected]> Co-authored-by: Noisekit <[email protected]> Co-authored-by: David Vuong <[email protected]>
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.
Refactor governance module initialisation to make it easier to understand.