-
Notifications
You must be signed in to change notification settings - Fork 8
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
Base queries #48
Merged
Merged
Base queries #48
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
themandalore
approved these changes
Dec 28, 2023
tkernell
added a commit
that referenced
this pull request
Jan 22, 2025
tkernell
added a commit
that referenced
this pull request
Jan 27, 2025
tkernell
added a commit
that referenced
this pull request
Jan 27, 2025
tkernell
added a commit
that referenced
this pull request
Jan 27, 2025
* #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 <[email protected]> --------- Co-authored-by: danflo27 <[email protected]>
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 <[email protected]> Co-authored-by: akrem <[email protected]> (cherry picked from commit e800173) Co-authored-by: tkernell <[email protected]> * 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 <[email protected]> * fix: package upgrades, include all minter object fields in export and init genesis (#484) * 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 * fix: audit issues (#494) * 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]> * 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 <[email protected]> --------- Co-authored-by: danflo27 <[email protected]> * 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 <[email protected]> Co-authored-by: Dan F <[email protected]> Co-authored-by: CJPotter10 <[email protected]> Co-authored-by: brendaloya <[email protected]>
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 <[email protected]> Co-authored-by: akrem <[email protected]> (cherry picked from commit e800173) Co-authored-by: tkernell <[email protected]> * 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 <[email protected]> * fix: package upgrades, include all minter object fields in export and init genesis (#484) * 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 * fix: audit issues (#494) * 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]> * 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 <[email protected]> --------- Co-authored-by: danflo27 <[email protected]> * 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 <[email protected]> Co-authored-by: Dan F <[email protected]> Co-authored-by: CJPotter10 <[email protected]> Co-authored-by: brendaloya <[email protected]> (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 <[email protected]> Co-authored-by: akrem <[email protected]> (cherry picked from commit e800173) Co-authored-by: tkernell <[email protected]> * 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 <[email protected]> * fix: package upgrades, include all minter object fields in export and init genesis (#484) * 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 * fix: audit issues (#494) * 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]> * 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 <[email protected]> --------- Co-authored-by: danflo27 <[email protected]> * 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 <[email protected]> Co-authored-by: Dan F <[email protected]> Co-authored-by: CJPotter10 <[email protected]> Co-authored-by: brendaloya <[email protected]> (cherry picked from commit 09a0a0d) Co-authored-by: akrem <[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.
No description provided.