Skip to content

Bridge testnet #448

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

Merged
merged 17 commits into from
Nov 24, 2024
Merged

Bridge testnet #448

merged 17 commits into from
Nov 24, 2024

Conversation

tkernell
Copy link
Contributor

No description provided.

@tkernell tkernell marked this pull request as ready for review November 22, 2024 21:19
@brendaloya brendaloya merged commit e800173 into main Nov 24, 2024
7 checks passed
@brendaloya brendaloya deleted the bridge-testnet branch November 24, 2024 14:51
github-actions bot pushed a commit that referenced this pull request Nov 24, 2024
* reporter module

* use legacy dec for tips and commision rates

* re-add max commision rate check

* chore: mv legacy_dec.go to types/legacy_dec.go

* minor refactor for clarity

* checkpoint to pull main

* use LgeacyDec for withdraws

* remove old BigUint to LegacyDec fcns

* linting

* add test

* linting

* separate blobstream testnet child contract

---------

Co-authored-by: danflo27 <florentinodc@outlook.com>
Co-authored-by: akrem <akremstudy@gmail.com>
(cherry picked from commit e800173)
brendaloya pushed a commit that referenced this pull request Nov 24, 2024
* reporter module

* use legacy dec for tips and commision rates

* re-add max commision rate check

* chore: mv legacy_dec.go to types/legacy_dec.go

* minor refactor for clarity

* checkpoint to pull main

* use LgeacyDec for withdraws

* remove old BigUint to LegacyDec fcns

* linting

* add test

* linting

* separate blobstream testnet child contract

---------

Co-authored-by: danflo27 <florentinodc@outlook.com>
Co-authored-by: akrem <akremstudy@gmail.com>
(cherry picked from commit e800173)

Co-authored-by: tkernell <tpkernell@gmail.com>
CJPotter10 pushed a commit that referenced this pull request Dec 4, 2024
* reporter module

* use legacy dec for tips and commision rates

* re-add max commision rate check

* chore: mv legacy_dec.go to types/legacy_dec.go

* minor refactor for clarity

* checkpoint to pull main

* use LgeacyDec for withdraws

* remove old BigUint to LegacyDec fcns

* linting

* add test

* linting

* separate blobstream testnet child contract

---------

Co-authored-by: danflo27 <florentinodc@outlook.com>
Co-authored-by: akrem <akremstudy@gmail.com>
tkernell added a commit that referenced this pull request Jan 6, 2025
* Bridge testnet (#448) (#449)

* reporter module

* use legacy dec for tips and commision rates

* re-add max commision rate check

* chore: mv legacy_dec.go to types/legacy_dec.go

* minor refactor for clarity

* checkpoint to pull main

* use LgeacyDec for withdraws

* remove old BigUint to LegacyDec fcns

* linting

* add test

* linting

* separate blobstream testnet child contract

---------

Co-authored-by: danflo27 <florentinodc@outlook.com>
Co-authored-by: akrem <akremstudy@gmail.com>
(cherry picked from commit e800173)

Co-authored-by: tkernell <tpkernell@gmail.com>

* feat: snapshot limit param set by gov (#453) (#455)

* add more timestamps for tracking

* cleanup after review

* snapshot limit

* fix tests

* lint

* remove log

(cherry picked from commit 0efe1cc)

Co-authored-by: tkernell <tpkernell@gmail.com>

* Migrate to audit tag version with upgrade (#459) (#460)

* added migration functions to add new fields to bridge keeper. Set upgrade name to match software upgrade plan name

* pushing up a change that was missed

* made changes to deal with circular import

* branch is now building with no circular import errors

* removed migrations.go file in keeper and am just importing the v2 migration package into module.go

* fixed migration function to use right context

* fixed typo

* changed format around to desired format

* saving changes before branching to old tag to test

* rebased from main to hopefully solve some git issues with merge

* lint fixes

(cherry picked from commit 9129e14)

Co-authored-by: CJPotter10 <91627020+CJPotter10@users.noreply.github.com>

* Nick ad rs (#461) (#466)

* updates

* fix

(cherry picked from commit 1013652)

Co-authored-by: themandalore <fett.nicholas@yahoo.com>

* Scripts used for Setup and Testing (#462) (#467)

* scripts for setup and testing

* formatting

* typo

* more formatting

(cherry picked from commit 2c607ac)

Co-authored-by: spuddy <72078372+0xSpuddy@users.noreply.github.com>

* fix: do not crash daemon with nil querymeta (#463) (#468)

(cherry picked from commit 1f84b0c)

Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>

* merge (#470)

Co-authored-by: akrem <71235284+akremstudy@users.noreply.github.com>

* getter for checking if a reward has been claimed (#474) (#475)

(cherry picked from commit e967150)

Co-authored-by: akrem <71235284+akremstudy@users.noreply.github.com>

* avoid removing during an iterator walk (#472) (#473)

(cherry picked from commit 5a4dbf5)

Co-authored-by: akrem <71235284+akremstudy@users.noreply.github.com>

* minor (#478) (#479)

(cherry picked from commit ce2705c)

Co-authored-by: akrem <71235284+akremstudy@users.noreply.github.com>

* log bridge connection status

* bridge report sendtx retry

* handle panics

* added function to log memory and cpu stats

* added the logging of process metrics

* changed logs from debug to info

* mutex in client

* wrap gen tx calls in timeout

* gosum

* lint fix

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: CJPotter10 <91627020+CJPotter10@users.noreply.github.com>
Co-authored-by: themandalore <fett.nicholas@yahoo.com>
Co-authored-by: spuddy <72078372+0xSpuddy@users.noreply.github.com>
Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
Co-authored-by: akrem <71235284+akremstudy@users.noreply.github.com>
Co-authored-by: Cjpotter10 <caleb10joseph@gmail.com>
brendaloya pushed a commit that referenced this pull request Jan 17, 2025
* Bridge testnet (#448) (#449)

* reporter module

* use legacy dec for tips and commision rates

* re-add max commision rate check

* chore: mv legacy_dec.go to types/legacy_dec.go

* minor refactor for clarity

* checkpoint to pull main

* use LgeacyDec for withdraws

* remove old BigUint to LegacyDec fcns

* linting

* add test

* linting

* separate blobstream testnet child contract

---------

Co-authored-by: danflo27 <florentinodc@outlook.com>
Co-authored-by: akrem <akremstudy@gmail.com>
(cherry picked from commit e800173)

Co-authored-by: tkernell <tpkernell@gmail.com>

* feat: snapshot limit param set by gov (#453) (#455)

* add more timestamps for tracking

* cleanup after review

* snapshot limit

* fix tests

* lint

* remove log

(cherry picked from commit 0efe1cc)

Co-authored-by: tkernell <tpkernell@gmail.com>

* fix oracle domain separator

* add retrieveData function

* use ECDSA tryRecover for key malleability prevention

* R09 - use solidity 0.8.19

* R08 - import specific contracts

* R07 - named mappings

* R06 - emit events

* R05 - use constants

* R04 - remove unused code

* L02 - check guardian reset timestamp

* L01 - prevent dust amount lost

* L03 - getter limit values consider minting

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot pushed a commit that referenced this pull request Jan 17, 2025
* Bridge testnet (#448) (#449)

* reporter module

* use legacy dec for tips and commision rates

* re-add max commision rate check

* chore: mv legacy_dec.go to types/legacy_dec.go

* minor refactor for clarity

* checkpoint to pull main

* use LgeacyDec for withdraws

* remove old BigUint to LegacyDec fcns

* linting

* add test

* linting

* separate blobstream testnet child contract

---------

Co-authored-by: danflo27 <florentinodc@outlook.com>
Co-authored-by: akrem <akremstudy@gmail.com>
(cherry picked from commit e800173)

Co-authored-by: tkernell <tpkernell@gmail.com>

* feat: snapshot limit param set by gov (#453) (#455)

* add more timestamps for tracking

* cleanup after review

* snapshot limit

* fix tests

* lint

* remove log

(cherry picked from commit 0efe1cc)

Co-authored-by: tkernell <tpkernell@gmail.com>

* fix oracle domain separator

* add retrieveData function

* use ECDSA tryRecover for key malleability prevention

* R09 - use solidity 0.8.19

* R08 - import specific contracts

* R07 - named mappings

* R06 - emit events

* R05 - use constants

* R04 - remove unused code

* L02 - check guardian reset timestamp

* L01 - prevent dust amount lost

* L03 - getter limit values consider minting

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 341a33c)
brendaloya pushed a commit that referenced this pull request Jan 17, 2025
* Bridge testnet (#448) (#449)

* reporter module

* use legacy dec for tips and commision rates

* re-add max commision rate check

* chore: mv legacy_dec.go to types/legacy_dec.go

* minor refactor for clarity

* checkpoint to pull main

* use LgeacyDec for withdraws

* remove old BigUint to LegacyDec fcns

* linting

* add test

* linting

* separate blobstream testnet child contract

---------

Co-authored-by: danflo27 <florentinodc@outlook.com>
Co-authored-by: akrem <akremstudy@gmail.com>
(cherry picked from commit e800173)

Co-authored-by: tkernell <tpkernell@gmail.com>

* feat: snapshot limit param set by gov (#453) (#455)

* add more timestamps for tracking

* cleanup after review

* snapshot limit

* fix tests

* lint

* remove log

(cherry picked from commit 0efe1cc)

Co-authored-by: tkernell <tpkernell@gmail.com>

* fix oracle domain separator

* add retrieveData function

* use ECDSA tryRecover for key malleability prevention

* R09 - use solidity 0.8.19

* R08 - import specific contracts

* R07 - named mappings

* R06 - emit events

* R05 - use constants

* R04 - remove unused code

* L02 - check guardian reset timestamp

* L01 - prevent dust amount lost

* L03 - getter limit values consider minting

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 341a33c)

Co-authored-by: tkernell <tpkernell@gmail.com>
themandalore pushed a commit that referenced this pull request Jan 28, 2025
* Bridge testnet (#448) (#449)

* reporter module

* use legacy dec for tips and commision rates

* re-add max commision rate check

* chore: mv legacy_dec.go to types/legacy_dec.go

* minor refactor for clarity

* checkpoint to pull main

* use LgeacyDec for withdraws

* remove old BigUint to LegacyDec fcns

* linting

* add test

* linting

* separate blobstream testnet child contract

---------

Co-authored-by: danflo27 <florentinodc@outlook.com>
Co-authored-by: akrem <akremstudy@gmail.com>
(cherry picked from commit e800173)

Co-authored-by: tkernell <tpkernell@gmail.com>

* feat: snapshot limit param set by gov (#453) (#455)

* add more timestamps for tracking

* cleanup after review

* snapshot limit

* fix tests

* lint

* remove log

(cherry picked from commit 0efe1cc)

Co-authored-by: tkernell <tpkernell@gmail.com>

* fix: package upgrades, include all minter object fields in export and init genesis (#484)

* upgrade to cosmossdk.io/math@v1.4.0

* upgrade to github.com/cometbft/cometbft@v0.38.15

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

* linting

* linting pt2

* fix: audit issues  (#494)

* upgrade to cosmossdk.io/math@v1.4.0

* upgrade to github.com/cometbft/cometbft@v0.38.15

* 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 <florentinodc@outlook.com>
Co-authored-by: brendaloya <35778124+brendaloya@users.noreply.github.com>

* 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 <35778124+brendaloya@users.noreply.github.com>

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

---------

Co-authored-by: tkernell <tpkernell@gmail.com>
Co-authored-by: CJPotter10 <91627020+CJPotter10@users.noreply.github.com>
Co-authored-by: brendaloya <35778124+brendaloya@users.noreply.github.com>

* re implemented changes to withdraw.go to avoid dealing with a bunch of merge conflicts for a 1 file changed. And then edited an e2e test to make a reporter redelegate their tokens after reporting and before a dispute is proposed to ensure that we are able to escrow them in the dispute module still (#520)

* Audit dec2024 tim and dan (#526)

* #50 - block stuffing, query data limit

* Audit tim 54 (#523)

* #54 - no refund dispute round 2 and higher

* fix no refund tests

* #48 - check number of votes (#522)

* mock (#524)

* fix oracle keeper unit tests (#525)

Co-authored-by: danflo27 <florentinodc@outlook.com>

---------

Co-authored-by: danflo27 <florentinodc@outlook.com>

* audit issues (#516)

* fix: audit issue #70
capped rounds at 5 (when fee equals slashAmount)
mv fee minus burn calcultion inside refund funcs

* fix: audit issue 59

* fix: audit issue 55
make `UpdateDispute` a noop when a tie

* fix: audit issue #57
validate micro_report exists on chain

* fix: audit issue 61
use timestamp to fetch report instead of index

* fix: audit issue #62
validate cycle list before updating it

* chore: audit issue 56, clarify comments

* fix: audit issue 60
add value size limit to decodeValue getter

* fix: audit issue #53

* fix test

* fix tests and generated files

* lint

* fix e2e tests

* revert audit issue fix #41

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: tkernell <tpkernell@gmail.com>
Co-authored-by: Dan F <florentinodc@outlook.com>
Co-authored-by: CJPotter10 <91627020+CJPotter10@users.noreply.github.com>
Co-authored-by: brendaloya <35778124+brendaloya@users.noreply.github.com>
github-actions bot pushed a commit that referenced this pull request Jan 28, 2025
* Bridge testnet (#448) (#449)

* reporter module

* use legacy dec for tips and commision rates

* re-add max commision rate check

* chore: mv legacy_dec.go to types/legacy_dec.go

* minor refactor for clarity

* checkpoint to pull main

* use LgeacyDec for withdraws

* remove old BigUint to LegacyDec fcns

* linting

* add test

* linting

* separate blobstream testnet child contract

---------

Co-authored-by: danflo27 <florentinodc@outlook.com>
Co-authored-by: akrem <akremstudy@gmail.com>
(cherry picked from commit e800173)

Co-authored-by: tkernell <tpkernell@gmail.com>

* feat: snapshot limit param set by gov (#453) (#455)

* add more timestamps for tracking

* cleanup after review

* snapshot limit

* fix tests

* lint

* remove log

(cherry picked from commit 0efe1cc)

Co-authored-by: tkernell <tpkernell@gmail.com>

* fix: package upgrades, include all minter object fields in export and init genesis (#484)

* upgrade to cosmossdk.io/math@v1.4.0

* upgrade to github.com/cometbft/cometbft@v0.38.15

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

* linting

* linting pt2

* fix: audit issues  (#494)

* upgrade to cosmossdk.io/math@v1.4.0

* upgrade to github.com/cometbft/cometbft@v0.38.15

* 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 <florentinodc@outlook.com>
Co-authored-by: brendaloya <35778124+brendaloya@users.noreply.github.com>

* 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 <35778124+brendaloya@users.noreply.github.com>

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

---------

Co-authored-by: tkernell <tpkernell@gmail.com>
Co-authored-by: CJPotter10 <91627020+CJPotter10@users.noreply.github.com>
Co-authored-by: brendaloya <35778124+brendaloya@users.noreply.github.com>

* re implemented changes to withdraw.go to avoid dealing with a bunch of merge conflicts for a 1 file changed. And then edited an e2e test to make a reporter redelegate their tokens after reporting and before a dispute is proposed to ensure that we are able to escrow them in the dispute module still (#520)

* Audit dec2024 tim and dan (#526)

* #50 - block stuffing, query data limit

* Audit tim 54 (#523)

* #54 - no refund dispute round 2 and higher

* fix no refund tests

* #48 - check number of votes (#522)

* mock (#524)

* fix oracle keeper unit tests (#525)

Co-authored-by: danflo27 <florentinodc@outlook.com>

---------

Co-authored-by: danflo27 <florentinodc@outlook.com>

* audit issues (#516)

* fix: audit issue #70
capped rounds at 5 (when fee equals slashAmount)
mv fee minus burn calcultion inside refund funcs

* fix: audit issue 59

* fix: audit issue 55
make `UpdateDispute` a noop when a tie

* fix: audit issue #57
validate micro_report exists on chain

* fix: audit issue 61
use timestamp to fetch report instead of index

* fix: audit issue #62
validate cycle list before updating it

* chore: audit issue 56, clarify comments

* fix: audit issue 60
add value size limit to decodeValue getter

* fix: audit issue #53

* fix test

* fix tests and generated files

* lint

* fix e2e tests

* revert audit issue fix #41

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: tkernell <tpkernell@gmail.com>
Co-authored-by: Dan F <florentinodc@outlook.com>
Co-authored-by: CJPotter10 <91627020+CJPotter10@users.noreply.github.com>
Co-authored-by: brendaloya <35778124+brendaloya@users.noreply.github.com>
(cherry picked from commit 09a0a0d)
themandalore pushed a commit that referenced this pull request Jan 28, 2025
* Bridge testnet (#448) (#449)

* reporter module

* use legacy dec for tips and commision rates

* re-add max commision rate check

* chore: mv legacy_dec.go to types/legacy_dec.go

* minor refactor for clarity

* checkpoint to pull main

* use LgeacyDec for withdraws

* remove old BigUint to LegacyDec fcns

* linting

* add test

* linting

* separate blobstream testnet child contract

---------

Co-authored-by: danflo27 <florentinodc@outlook.com>
Co-authored-by: akrem <akremstudy@gmail.com>
(cherry picked from commit e800173)

Co-authored-by: tkernell <tpkernell@gmail.com>

* feat: snapshot limit param set by gov (#453) (#455)

* add more timestamps for tracking

* cleanup after review

* snapshot limit

* fix tests

* lint

* remove log

(cherry picked from commit 0efe1cc)

Co-authored-by: tkernell <tpkernell@gmail.com>

* fix: package upgrades, include all minter object fields in export and init genesis (#484)

* upgrade to cosmossdk.io/math@v1.4.0

* upgrade to github.com/cometbft/cometbft@v0.38.15

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

* linting

* linting pt2

* fix: audit issues  (#494)

* upgrade to cosmossdk.io/math@v1.4.0

* upgrade to github.com/cometbft/cometbft@v0.38.15

* 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 <florentinodc@outlook.com>
Co-authored-by: brendaloya <35778124+brendaloya@users.noreply.github.com>

* 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 <35778124+brendaloya@users.noreply.github.com>

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

---------

Co-authored-by: tkernell <tpkernell@gmail.com>
Co-authored-by: CJPotter10 <91627020+CJPotter10@users.noreply.github.com>
Co-authored-by: brendaloya <35778124+brendaloya@users.noreply.github.com>

* re implemented changes to withdraw.go to avoid dealing with a bunch of merge conflicts for a 1 file changed. And then edited an e2e test to make a reporter redelegate their tokens after reporting and before a dispute is proposed to ensure that we are able to escrow them in the dispute module still (#520)

* Audit dec2024 tim and dan (#526)

* #50 - block stuffing, query data limit

* Audit tim 54 (#523)

* #54 - no refund dispute round 2 and higher

* fix no refund tests

* #48 - check number of votes (#522)

* mock (#524)

* fix oracle keeper unit tests (#525)

Co-authored-by: danflo27 <florentinodc@outlook.com>

---------

Co-authored-by: danflo27 <florentinodc@outlook.com>

* audit issues (#516)

* fix: audit issue #70
capped rounds at 5 (when fee equals slashAmount)
mv fee minus burn calcultion inside refund funcs

* fix: audit issue 59

* fix: audit issue 55
make `UpdateDispute` a noop when a tie

* fix: audit issue #57
validate micro_report exists on chain

* fix: audit issue 61
use timestamp to fetch report instead of index

* fix: audit issue #62
validate cycle list before updating it

* chore: audit issue 56, clarify comments

* fix: audit issue 60
add value size limit to decodeValue getter

* fix: audit issue #53

* fix test

* fix tests and generated files

* lint

* fix e2e tests

* revert audit issue fix #41

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: tkernell <tpkernell@gmail.com>
Co-authored-by: Dan F <florentinodc@outlook.com>
Co-authored-by: CJPotter10 <91627020+CJPotter10@users.noreply.github.com>
Co-authored-by: brendaloya <35778124+brendaloya@users.noreply.github.com>
(cherry picked from commit 09a0a0d)

Co-authored-by: akrem <71235284+akremstudy@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants