Skip to content

Commit

Permalink
fix: audit issues (#494)
Browse files Browse the repository at this point in the history
* upgrade to cosmossdk.io/[email protected]

* upgrade to github.com/cometbft/[email protected]

* include all minter object fields in mint module InitGenesis and ExportGenesis

* linting

* linting pt2

* use cosmos.Dec in protos instead of cosmos.LegacyDec, set reporter commission rate max at 1

* use minter.BondDenom in CalculateBlockProvision

* return nil early if coins amt is zero in SendInflationaryRewards and gas optimization

* use SendCoinsFromModuleToModule in SendInflationaryRewards

* check if msg commission rate is LT params min comission rate in CreateReporter

* rename reporter params minTrb to minLoya

* limit max number of nested msgExec wraps at 7

* add genesis cycle list validation checks

* check that minStakeAmount has been provided

* fix tests, switch back to InputOutputCoins in mint keeper

* use declared var in mint keeper SendInflationaryRewards

* cleanup

* linting

* AddDisputeRound updates disputefeepayer

* Dont allow paying from bond for self dispute

* acommodate multiple fee submissions from same person in MsgAddFeeToDispute

* correct Pool Allocation in ReturnSlashedTokens (akrems fix)

* for disputes, move SetBlockInfo to EndBlock to account for changes within the block

* remove setblockinfo from SetNewDispute -- now called in endblocker

* remove tokenholder voting group

* transfer old team vote if MsgUpdateTeam is called during a dispute

* look for single voter existing rather than if len(allvoters) == 0 in TallyVote

* cleanup

* remove redundant teamvote query in tally

* refactor error checking in AddFeeToDispute

* fix logic for checking self dispute from bond

* move declaring account variables outside of iter

* fix num total groups in claimreward

* remove unnecessary error check

* remove redundant bool assignment

* linting

* check SetBlockInfo err in dispute endblocker

* #24 - ensure selector cannot be removed if it is the reporters own address

* #25 - reset the JailedUntil field to a default value when unjailing

* #10 - more genesis cyclelist validation

* #26 - move tip denom and amount validation to ValidateBasic, add check for empty querydata

* #27 - additional evidence must be reports by disputed reporter

* #28 - validate dataspec fields from genesis

* #29 - verify that the MaxReportBufferWindow parameter is greater than zero

* #31 - validations for msgRegisterSpec

* linting

* #32 - msgProposeDispute validations

* #34 - change removeselector comparison operator

* Dec/jan audit fixes2 tim (#504)

* remove unused returned errors in proposal_handler

* op addr used in init sig, and evm addr registered only once

* #39 - Decrease reporterVote.VoterPower by selectorTokens

* Dec/jan audit fixes2 tim (#505)

* remove unused returned errors in proposal_handler

* op addr used in init sig, and evm addr registered only once

* fix tests

* #69 - MsgSubmitValue validation

* #68 - updateDataSpec validation and sanitization

* #67 - MsgCreateReporter validation

* #65 - return if validateVoteExt errs in prepareProposalHandler

* #38 - export snapshotLimit from bridge, cyclelist from oracle, dataspecs from registry

* linting

* #32 - cleanup

* fix TestLearn

* fix registry tests

* tests

* #20 selector voting power doesnt count if selection is locked form switching reporters

* fix TestLearn

* #17 - fix

* actually fix TestLearn

* test fixes

* Fix/issue 44 major disputes (#506)

* fixed the issue with major disputes not jailing or deleting the reporter. We now will jail the reporter indefinitely but not deleting as the reporter can become unjailed upon winning the dispute

* switched jailed duration back to max int64

* dealt with an error that was missed in a test

* fixing the same merge issues again for some reason

* linting

* pushing up for help

* added logs to ensure block info is being set in end blocker

* removed fmt.Println() statements

---------

Co-authored-by: danflo27 <[email protected]>
Co-authored-by: brendaloya <[email protected]>

* Issue #42: fix WithdrawTip Function Bypasses the Staking Module (#508)

* now am using the DelegateCoinsFromAccountToModule() function to send the tokens from escrow pool to bonded pool in withdraw tip so that the staking module can apply proper hooks

* fix linting issues

* added code to make ibc tests pass

* Fix/issue 51 min tip (#507)

* added a min tip amount param in the oracle module and then added a check in the tip msg to ensure that the tip amount is not less than the minimum

* updated the tag in the proto for min tip amount

* lint fix

* fixed linting issue

* hopefully the last lint fix

* added missing pieces for ibc tests

* removed unused import

---------

Co-authored-by: brendaloya <[email protected]>

* checked the status of the validators before adjusting the stake change (#515)

---------

Co-authored-by: tkernell <[email protected]>
Co-authored-by: CJPotter10 <[email protected]>
Co-authored-by: brendaloya <[email protected]>
  • Loading branch information
4 people authored Jan 25, 2025
1 parent a75aaa2 commit 1a4eafc
Show file tree
Hide file tree
Showing 178 changed files with 4,543 additions and 3,348 deletions.
273 changes: 91 additions & 182 deletions api/layer/dispute/query.pulsar.go

Large diffs are not rendered by default.

154 changes: 38 additions & 116 deletions api/layer/dispute/vote.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1a4eafc

Please sign in to comment.