-
Notifications
You must be signed in to change notification settings - Fork 10
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
v0.6.0-testnet #269
Merged
v0.6.0-testnet #269
+28,036
−11,296
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
* clmcc * feat: remove bridge logic & comment test * Update contracts/ronin/validator/RoninValidatorSet.sol Co-authored-by: Bao <[email protected]> * featL remove bridge operator in applyValidatorCandidate * format: named args * feat: remove bridge reward deprecated at period * feat: remove ValidatorFlag from getValidators() * feat: remove isValidator & deprecate bridge enum * fix: fix test * Update contracts/ronin/staking/CandidateStaking.sol Co-authored-by: Duc Tho Tran <[email protected]> * format: skip test * format: add comments --------- Co-authored-by: Bao <[email protected]> Co-authored-by: Duc Tho Tran <[email protected]>
* clmcc * feat: remove bridge logic & comment test * Update contracts/ronin/validator/RoninValidatorSet.sol Co-authored-by: Bao <[email protected]> * featL remove bridge operator in applyValidatorCandidate * format: named args * feat: remove bridge reward deprecated at period * feat: remove ValidatorFlag from getValidators() * feat: remove isValidator & deprecate bridge enum * fix: fix test * Update contracts/ronin/staking/CandidateStaking.sol Co-authored-by: Duc Tho Tran <[email protected]> * format: skip test * format: add comments * feat: update bridge admin contract * feat: add more checks * feat: allow secondary address to update bridge operators * feat: auth accounts * fix: downgrade openzeppelin packages * feat: getBridgeOperatorOf * feat: bridge proposal * feat: bridge voter weight * feat: update domain separator * format: minor refactor * fix: fix logic * feat: add minor test cases * feat: add more tests * feat: update tests * feat: main chain bridge admin * format: delete unused import * format: rename function * feat: remove bridge logic * format: rename variable * format: format code * feat: update main chain bridge admin logic * Update contracts/extensions/bridge-operator-governance/BridgeAdminOperator.sol Co-authored-by: Duc Tho Tran <[email protected]> * format: fix convention * format: refactor * format: add doc for storage declarations * feat: add ErrInvalidArguments * format: rename test cases * format: add variable visibility * remove bridge in GA deploy * rename contract * add deploy script * feat: update gas snapshot * feat: update events * add test setup * fix: only Self Call instead of only Bridge contract * feat: update events * feat: add bridgeOperators when create contract * rename to Bridge Manager * fix: remove admin address * fix: add propose function for bridge manager * format: format code * Update contracts/interfaces/IBridgeManager.sol Co-authored-by: Bao <[email protected]> * feat: check non duplicate between governor and bridge operator * feat: support global vote for ronin bridge * fix: remove check empty * fix: init test * fix: redundant nonDuplicate * feat: getProposalExpiryDuration * feat: remove trusted orgs weight from ronin gateway * chore: remove console log * test: fix configuration test * test: restructure test set-type helper * fix: constructor param order * test: fix gateway pause enforcer test * feat: remove global proposal * fix: fix propose in test * fix: fix config test * fix: trusted vote count in test * fix: fix other tests of gateway * test: skip bridge set in GA test * feat: split global proposal logics * test: fix high nonce * fix: readd expiryDuration to RoninGA * test: fix mainchain GA test, add TODO * test: fix integration bridge tracking test * feat: TUint256 for custom slot uint256 * feat: add BridgeReward contract * feat: check operator address must be payable * feat: add initV3 for bridgeTracking * feat: add SlashBridgeIndicator * format: add comments, minor refactor * feat: move onlySelfCall logic to `IdentityGuard` * fix: use `RONTransferHelper` for native transfer operation * fix: handle scattering reward twice * fix: deployment scripts * fix: remove expiry mainchain, fix deploy script * fix: remove mainchainGA deploy, add bridgeAdmin deploy * format: rename bridge slash contract * format: rename `BridgeOperatorStatus` to `BridgeSlashInfo` * feat: disable initializer * refactor: re-split global GA, fix fixture * fix: bridge tracking test setup * fix: move query operator's info to tracking contract * fix: rename 'penalize' to 'penalty' to fix grammar * feat: integrate reward to slash contract * fix: fix slash logic * feat: remove auto remove functionality * fix: fix event logic * fix: order of assign to avoid misuse * fix: fixture for hardhat test * format: update comment for `execSlashBridgeOperators` * fix: fix slashing logic * feat: add common error `ErrInvalidReturnData` * fix: handle zero vote in bridge reward * feat: minor refactor * format: add doc for `BridgeManager` * fix: fix test * format: remove duplicate `ErrZeroCodeContract` definition * fix: fix test * fix: merge code issue, add topup amount to test, fix test * chore: lint coding convention * chore: remove console log * fix: fix wrong side assignment * feat: replace getRoles by array to by enum * fix: shadow declaration * fix: begin block.timestamp in test * feat: update version domain separator * feat: add BridgeSlash test * format: convention * feat: check payable address in `updateBridgeOperator` * feat: add `NewBridgeOperatorsAdded` event, `getAddedPeriodOf` * test: add `test_bridgeSlash_recordEvents_onBridgeOperatorsAdded` * feat: add `callbackRegisters` to `BridgeManager` constructor * feat: add `supportsInterface` * format: rename `BridgeManagerCallback` to `BridgeManagerCallbackRegister` * fix: modify assertion, update docs * feat: add receiveRON * feat: add `test_slashTierLogic` * fix: fix bridge manager deployments * feat: add signature's method for bridge gw, fix test * format: remove magic numbers * fix: fix method visibility * fix: default expiry duration on mainchain * refactor: bring getSig and voted method into abstract contract * fix: fix BridgeAdmin test * format: refactor `BridgeSlash` * test: add more tests * feat: add local network proposal for BridgeManager * fix: remove requireHasCode in constructor * fix: fix integration test setup * feat: add fuzz test for reward splitting logic `BridgeReward` * test: add `test_WhenTotalBallotsZero_NotValidBridgeTrackingResponse` * format: move `_requireSupportsInterface` to `IdentityGuard` * feat: update `test_ExcludeNewlyAddedOperators_ExecSlashBridgeOperators` * fix: handle share reward equally * feat: differentiate share equally vs invalid tracking * format: rename `test_SlashTierLogic` to `test_Fuzz_SlashTierLogic` * format: add comments for `BridgeSlashTest` and `BridgeRewardTest` * format: minor refactor * feat: update `gas-snapshot` and `code size` logs * fix: missing initializer in BridgeReward * fix: load single field in `_getWeight` * fix: remove error handling when callback revert * format: remove unused lib * feat: minor `extend` gas optimization * Update contracts/interfaces/bridge/IBridgeManager.sol Co-authored-by: Duc Tho Tran <[email protected]> * format: remove `ChainTypeConsumer`, `AccessControlEnumerable` * format: remove `Strings` lib * Merge branch `dev` into feat/bridge-admin * fix: fix bug `BridgeManager:updateBridgeOperator` * fix: fix `BridgeManager:_addBridgeOperators` and `BridgeManager:_removeBridgeOperators` * feat: minor gas optimization * feat: only emit `Notified` if contains registers * fix: fix `BridgeSlash:execSlashBridgeOperators` use `totalVotes` as denominator instead of `totalBallots`, feat: handle callback `IBridgeManagerCallback:onBridgeOperatorUpdated` to update slash info to new bridge operator * feat: remove `IdentityGuard:_requirePayableAddress` * fix: auto and manually sync reward * fix: comparison in sync reward * feat: `BridgeManager:_addBridgeOperators`, `BridgeManager:_removeBridgeOperators` skip add/remove operations when inputs are empty. * fix: handle call reward * fix: fix deployment * fix: only return true for status if both GVs and BOs are updated. fix: not allow BOs { B } to add A, and GVs { A } to add B * format: rename `BridgeVoter` to `Governor` feat: add `BridgeManager:getFullBridgeOperatorInfos` function _getTotalWeight() internal view virtual override returns (uint256) { fix: `RoninGatewayV2:_getVoteWeight`, `RoninGatewayV2:` format: remove `LibTUint256.sol` * feat: add `BridgeManagerCallbackRegister:getCallbackRegisters` * feat: add `bytes callData` to `IBridgeManagerCallbackRegister:Notified` event * format: rename `register` to `contractAddr` format: remove return data in `LibUint256Slot:store` * format: remove `BridgeManager:getGovernorWeight` * feat: minor optimization `BridgeManager:updateBridgeOperator` * fix: fix `RoninGatewayV2` test * format: add comment for `IdentityGuard:_requireSupportsInterface` * format: add comments and minor refactor * feat: use`IdentityGuard:_requireCreatedEOA` instead of `IdentityGuard:_requireNonZeroAddress` * refactor: minor optimization * format: minor refactor * format: rename `getSumGovernorWeights` to `sumGovernorsWeight` * fix: fix `_addBridgeOperators` branching logic * fix: fix test * feat: format `voteWeights` to `uint96` * Update contracts/extensions/bridge-operator-governance/BridgeManager.sol Co-authored-by: Duc Tho Tran <[email protected]> * Update contracts/utils/IdentityGuard.sol Co-authored-by: Duc Tho Tran <[email protected]> * fix: fix duplicate address update in `BridgeManager:updateBridgeOperator` format: remove stack too deep comment format: remove unnecessary underscore prefix * feat: move `onlyGovernor` to `BridgeManager` * feat: add `memory-safe` assembly format: minor refactor * format: remove return value `updated` for `BridgeManager:updateBridgeOperator` feat: add view methods `getBridgeOperatorWeights`, `getBridgeOperatorWeight` feat: update `MainchainGatewayV2` format: add comments for internal methods * fix: reduce risk of reentrancy * feat: minor refactor * feat: add `MainchainGatewayV2:supportsInterface` * format: minor refactor * feat: remove unused functions * format: rename `_unsafeSendRON` to `_unsafeSendRONLimitGas` * format: deprecate storage var * Update contracts/extensions/bridge-operator-governance/BridgeManager.sol Co-authored-by: Duc Tho Tran <[email protected]> * feat: minor refactor * feat: move `event`, `struct`, `enum` to to other interface format: rename variable feat: allow sync reward for multiple periods feat: add bridge tracking response validation for `BridgeSlash` fix: remove `onlyContract` guard in `BridgeReward:_syncReward` format: use named arguments feat: custom slots for `BridgeReward` format: add documentations * format: add doc * fix: remove `BridgeSlash:setContract` * feat: only slash if `totalVotes` >= `MINIMUM_VOTE_THRESHOLD` * fix: BridgeReward:LATEST_REWARDED_PERIOD_SLOT empty value when `syncReward` * fix: fix mishandle `execSyncReward` format: add comments feat: add `getTotalRewardsToppedUp`, `getTotalRewardsScattered` feat: prevent mis transfer RON to logic contract * format: rename var * feat: remove dead code * format: minor refactor * format: minor refactor * feat: add `_requireNonZeroAddress` in `_requireCreatedEOA` * fix: emit event * chore: remove plural form of `total-` var * fix: prevent reverting in `BridgeTracking:recordVote` * chore: fix convention * fix test * fix: collided vars * fix: revert when invalid`periodLength` * feat: add `ErrSyncTooFarPeriod` if `period > latestRewardedPeriod + 1` * fix: use `getBridgeOperatorOf` instead of `getBridgeOperators` * feat: add fork test * feat: allow `proxyAdmin` to query for `supportsInterface` * chore: update comment, fix test method visibility * ci: exclude fork test * fix: exclude fork test * fix: exclude fork test in ci * fix: remove `_requireCreatedEOA` --------- Co-authored-by: Bao <[email protected]> Co-authored-by: Duc Tho Tran <[email protected]>
* deploy: fix config * fix: test setup * deploy: separate deploy fixture of dpos and gateway * fix: add temp todo for contract hotfix * deploy: fix fixture and test integration * deploy: add deployment files * feat: resolve target options internally in global proposal * deploy: add new deployments * chore: add docs * feat: expose update TargetOptions * fix: remove batch getter * deploy: redeploy bridge proxy * fix: not allow update current target * deploy: redeploy contract * deploy: mainchain fix delp script and add delp * script: add s1 script * chore: restructure script folder * script: fix S1 * script: minor fix s1. add s2. * deploy: add timed migrator deploy script and artifacts * script: add s5 script * chore: remove comments * deploy: add mainchain deployment artifacts * feat: add `NewBridgeForkTest:test_Fork_DepositToGateway` * package: update hardhat to use companion network * script: change s2 to roninchain's proposal * script: add s3 and s4 script * script: fix getter of companion network name * fix: fix length mismatch bug * fix: fix `ErrQueryForDupplicated` check * script: add s1 second run script * fix: edit config to new goerli bridge * script: add rollback script * format: remove unused import * test: fix rep2 fork test * package: add sourcify command --------- Co-authored-by: TuDo1403 <[email protected]>
ducthotran2010
approved these changes
Aug 9, 2023
TuDo1403
approved these changes
Aug 9, 2023
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.
No description provided.