Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update participation rewards to support storing lastEpoch claim records, and use these to inform intentSignalChanges * update aggegate intent to consider offchain assets as per PR claims * add tests for intent aggregation, inclusion of off chain assets in calculation * lint fixes * osmosis-upgrade: v12.0.0 - added osmosis-types/appparams; - updated osmosis-types/gamm; - updated osmosis-types/lockup; * add pr valdiation for osmosis pools * gofumpt * fix lint error * fix app.go ordering for setting of participation rewards * release/v0.9.4 - add redelegation records (not yet used), fix PR submodules, move epochblock callback from ICS to PR * use ledger-go v0.9.3 to support ledger nano s plus * fix statusCompleted bug, fix rebalance / epochInfo bug; add tests * DOCKER_BUILDKIT in makefile * revert ordering in app.go * use memo to pass epoch identifier when rebalancing * hot-fix: participation-rewards scores - fixed incorrect logic condition; * ensure we only use OPEN transfer channels, not just the first one we come across * update multi test for 0.46 * fix typo * add v0.9.5 upgrade handler * .github/workflows: add gosec + staticmajor This change adds 2 static analyzers: * Gosec with custom rules for the Cosmos-SDK & Cosmos ecosystem * Staticmajor to catch leaking resources + performance issues * fix withdrawal status complete bug; add tests; remove debug logging * fixes #29; properly wrap errors in log output * osmosis PR fixes * ancilliary changes * dragonberry; bump sdk to v0.46.2, bump ibc-go to v0.5.0 * show chain in ICQ log messages * use a constant for Osmosis PoolsPrefix * gofumpt * lint fix * further lint fixes * Bump github.com/gogo/protobuf from 1.3.1 to 1.3.2 in /ics23 * .github/workflows: disable staticmajor till WASM deps are fixed * x/*: fix expensive and unnecessary string constructions with b.WriteString(fmt.Sprint...) * Benchmarks Also while here fixed unnecessary uses of fmt.Errorf("...") to instead use errors.New("...") * participation-rewards: tests & updates (wip) - updated incorrect proto comment; - update static test addresses to use utils; - updated genesis tests; - updated epoch tests; - updated query tests; - added "epoch" to DefaultGenesis; - gofumpt update; - updated tests to use correct keys; - added grpc query tests; - test keeper updated with multiple zones; - moved UnmarshalProtocolData test to types; - added appropriate AddProtocolDataProposal tests; - HandleAddProtocolDataProposal now calls ValidateBasic on proposal; - updated proposal ValidateBasic; * tests: minor fixes * testing: participationrewards updates & fixes - go mod updates - removed PoolsPrefix from validation.go - removed incorrect comment from osmosis-types/codec.go - added osmosis-types/pool-models - added ProtocolDataType to proto - removed unnecessary protocol string - updated protocoldata query - updated callbacks - added claims_test - updated claim key usage - updated ProtocolData grpc_query - updated keeper_test - added GetCodec to keeper - added msg_server_test - updated participationrewards codec with osmosis-types - added tests in genesis_test - added new key getters - fixed TestNewMsgSubmitClaim - added SrcZone to ValidateBasic - added tests for osmosis_params - updated many tests * testing: participationrewards - LastUpdated now updates on callback - updated keeper_test with ibc/denoms (?order?) - hackey unmarshal to deal with concrete type - added intermediary for unmarshal * testing: participationrewards - fixed unmarshal test * fix icq bug * add type field to osmosis pool protocol data * add prefix to connection protocol data * tests: added pooltype and prefix to tests - fixed lint issue (naming); * add originChainId to liquidToken protocoldata * tests: updated tests for OriginChainID * testing: updates & fixes - added nil guard for balance.Amount in UpdateIntent (interchainstaking) - moved executeOsmosisPoolUpdateCallback to callback_test - restructured claim_test for reusability - added tests for IterateLastEpochUserClaims (debugging) - added fn nil guard to participationrewards iterators - participationrewards keeper test suite (wip) updates * change ordering of app.go to avoid panic in interchainstakingkeeper.UpdateIntent() * claimsmanager: prepare new module for integration * x/participationrewards/client/cli: move inexpensive/unrelated checks first in GetSubmitClaimTxCmd Noticed in an audit that it was unnecessary to read an entire file, then JSON unmarshal it then later on throw away all that work if the claimTypeStr value wasn't known in types.ClaimType_value * claimsmanager * x/participationrewards/client/cli: move inexpensive/unrelated checks first in GetSubmitClaimTxCmd Noticed in an audit that it was unnecessary to read an entire file, then JSON unmarshal it then later on throw away all that work if the claimTypeStr value wasn't known in types.ClaimType_value * testing: updates & fixes - added nil guard for balance.Amount in UpdateIntent (interchainstaking) - moved executeOsmosisPoolUpdateCallback to callback_test - restructured claim_test for reusability - added tests for IterateLastEpochUserClaims (debugging) - added fn nil guard to participationrewards iterators - participationrewards keeper test suite (wip) updates * claimsmanager: prepare new module for integration * add queries; fix missing type * gofumpt * add v0.10.0 upgrade handler * no context for logger * call upgradeStoreLoader only within upgrade handler * call setStoreLoader earlier * Add test for x/interchainstaking/keeper.AllBalancesCallback * Add test for x/interchanstaking/keeper.AccountBalanceCallback * add osmosis forceprune * update proto def tags for json * security: started a SECURITY.md file * use gogoproto.jsontag field * bump sdk / tm * update pr codec * implement legacytx.LegacyMsg interface for particitipationrewards msgs * revert jsontags * release: revert to sdk 46.2 & lint fixes * minor fixes * claim validation needs to use source zone height * prove against connectiondata connection and chain, and not zone * migrate x/participationrewards/types.Proof to x/claimsmanager; refactor x/airdrop and x/participationrewards to use x/claimsmanager.Proof * fixup queries * update field names on AllowLiquidTokenDenom protocoldata to avoid confusion * ibc 501 * Update go.mod * Update go.mod * local assets removal from intents and PR - removed unutilized AllOrdinalizedIntents func - removed local assets from AggregateIntents logic - removed local assets from UpdateIntents logic - removed local assets from calcUserHoldingsAllocations logic - updated tests * local asset removal: lint fixes * updated go.sum (ics32 v0.8.0) * temporarily remove gosec.yml * local assets removal: update - calcUserHoldingsAllocations now uses iterator * local assets removal: updated user claim calc - removed userAmount internal struct - user amount now computes across claim types * make cm user queries cross zone * fix incorrect denom, fixes #57 * revert key for osmosis params type; fixed #59 * payload in claim will always be Lock, not LockedResponse, as it refers to a kv store entry, not a query response * off by one error in the key matching logic; fixes #61 * add logic to trigger client update at the epoch boundary; fixes #60 * remove ics23 path from Dockerfile copy * Add test for x/interchainstaking/keeper.AllBalancesCallback * Add test for x/interchanstaking/keeper.AccountBalanceCallback * testing: claimsmanager - moved testaddress to keeper_test - renamed predefined claims to testClaims - added Queries tests * testing: test script updates * testing: mock validation and better coverage (wip) - added mock flag for app instantiation; - added convert address to prefix (utils); - added ProofOpsFn type; - added MockProofOps that always succeeds (wip); - added receipts and claims to PR tests; - added/extended MsgServer tests; * testing: rebase cleanup & fixes * testing: - added ValidatorSelectionRewardsCallback test; - extended keeper_test (replicating ICA setup from interchainstaking); - will be done on rebase - added appropriate callback payload for test suite - removed manual performance account for chainB - removed manual connection from connection keeper - setting validators now records rewards for test - setupChannelForICA now part of KeeperTestSuite - added PortPath capability - added and commented out channel reopen logic test (still fails) - updated claim_tests with zero value claim - added efficiency optimization to distributeToUsers - added receipts, intents and claims to core test - added and commented some debug output * testing: post rebase fixes & updates * allow callbackId to be zero-length string in makeRequest() * fix address conversion in pr distribution * relative_weight -> weight * add debug logging to intent calcs * fix claims manager lookup for user claims (ensure we include 0x00 separator) * add additional logging to update intent with claims * fix div by zero * revert clientUpdate query pruning * pass zone by reference into aggregateIntents * add json_tag to valoper_address in validator intent * ensure that query height for epoch boundary is not +1, as icq relayer already adds 1 to fetch header for ClientUpdate * change MsgSignalIntent msg to use a string representation of intent, to avoid (un)marshalling issues * bump to v0.46.4 of cosmos-sdk and v0.34.23 of tendermint * bump to ibc-go v5.1.0 * fix tests broken with MsgSignalIntent changes; * patch wasmd * add upgrade handler for v0.10.1 * Update changelog * chore: gofumpt * isActiveChannel() does not check state; use GetOpenActiveChannel() instead * add performance delegations getter/setter logic * lint * fix lsm redemption flow; do not trigger redemption queueing * allow connection_id to be changed for uninitialised zones; add protection to ensure that connections and clients are valid and active at the point the proposal runs * fix transfer channel lookup * add upgrade handler for v0.10.3 and comment out ensureICA logic * fix swapped args to hasPrefix * bump sdk, golang, math, tendermint * fix codecov.yml * add code coverage to tests * clean up plus some tests * gofumpt * minor: fix (ics): implement receipt error handling * chunk ica messages into batches, for smaller ibc txs * testing: Liquid ProtocolData test update - callback test for SetEpochBlockCallback; - issue with empty key vs empty module check; * testing: refactor - keeper_test refactored for better clarity and adaptability; - AllKeyedProtocolDatas covered; * testing: claimsmanager keys - added test for GetPrefixUserClaim; - added test for GetPrefixLastEpochUserClaim; * testing: wip update - SetEpochBlockCallback test added * patch: testing (ics): add query tests - removed debug output from icq keeper; - SetupZones renamed to setupTestZones; - add grpc_query_test.go; - removed superfluous found check in DelegatorIntent; - removed double import from ibc_packet_handlers; - intent_test now uses int64 instead of sdk.Coin; - refactor keeper_test; - TestOwnerAddress renamed to testAddress; * patch: testing (ics): fix channel status issue - UpdateTime() breaks channel status checks; * initial changes to selective delegation; validator callback test * fix callback test * gofumpt+lint * ensure unbonding always takes place before rebalance * remove unused func * update error message to be less scary * fix status for rebalancing test * make rebalancing consider existing redelegations, and check for validator status; set TG-147 #closed * gofumpmt * more linty goodness * x/interchainstaking/keeper: create Pagination if nil in DepositIntervalCallback * x/interchainstaking/keeper: create PageRequest if unmarshalled as nil * x/interchainstaking/keeper: valid Coin inside AccoutBalanceCallback to avoid crash * TG-170 #closed - initialise pagination object in repeat query * add gating to participation rewards claims and unbonding * add missing getParam methods * fix tests that were negated by unbonding and pr gating * Apply suggestions from code review * patch: tests (ics): additional test coverage - delegation store - intent store - msg_server (add some debug output) - minor fix in keeper_test * patch: tests (ics): resolve merge issues * patch: test (ics): lint - spelling... * update unbonding to respect locked tokens * lint fixes * fix request redemption tests that now require delegation objects to exist in kv store * fix param upgrades in handler * add callback tests for setting balances * bump dependencies * lint * release/v0.10.6 * lookup redelegation record by the correct address * add no-op upgrade handler * add upgrade handler for v0.10.8 * .github/workflows, Makefile: add Go vulnerability checker * CVE GO-2022-1143 https://pkg.go.dev/vuln/GO-2022-1143 * CVE GO-2022-1144 https://pkg.go.dev/vuln/GO-2022-1144 * all: use len(args) == 0 instead of bytes.Equal(args, []byte("")) * v0.46.7: important security update * patch: fix (ics): performance delegations * ensure we only build against go1.19 * Update x/interchainstaking/types/zones.go Co-authored-by: Zanicar <[email protected]> Co-authored-by: Emmanuel T Odeke <[email protected]> Co-authored-by: Elias Naur <[email protected]> Co-authored-by: Jacob Gadikian <[email protected]>
- Loading branch information