These should not be replicated to docker contexts as they are local to
the build host. In addition, the golangci-lint currently doesn't assume
the host user nor add other group read permissions when writing files,
so this causes permission errors when other docker processes attempt to
copy the files.
* chore(lint): Update local make lint to match CI
This updates the `make lint` behavior to match the command being
run in CI.
In addition, we refactor the make lint command to use docker in order to
to ease cross platform install, use a local build cache that integrates
with make clean, use the same version file, and encapsulate the logic in
its own make include.
We also remove the old lint logic as to not introduce a duplicate target
and avoid confusion from a difference in behavior.
While solutions like act for running github actions locally work, it is
not as straightfoward, is slower, and uses the local git repository
instead of a clone (though I am not sure how the checkout step works
within act).
* fix(lint): Use shared timeout with .golangci.yml
Instead of using a local and different timeout in the lint makefile
target we can rely on golangci to load this configuration from
.golangci.yml instead and share this setting with CI.
* fix(lint): Fix golangci-lint cache mount path
This uses the correct cache dir default of ~/.cache enabling use
of cache between lint calls.
* fix(lint): Fix lint caching
This includes a couple fixes - 1) It adds support for full caching of go
mod and go build, speeding up the lint process quite a bit. And 2) does
not mix lint cache with make clean files -- the docker container creates
root owned files that cause make clean to error and we choose not to
require make clean to run with higher permissions. The cache must be
deleted manually.
We use three sections through-out the codebase -- standard, default, and
localmodule. This change updates the linter to enforce this pattern as
files are added or modified.
This resolves ASA-2024-008. Patched in 0.37.7 but that version has a breaking change which was reverted in 0.37.8.
The replace for golang.org/x/exp prevents breaking change in slices package causing compile error with gogoproto
* update golinter + add go sec
* add golangci.yml
Co-authored-by: @faddat jacobgadikian@gmail.com
* update
* update
* fix release version
* remove sec, update from pr comments, cleanup golangci.yml to not break on master
* remove @faddat, not valid codeowner
* remove unnecessary make command
* remove incorrectly named golangci.yml file
* add --new-from-rev
* use master instead of main
* remove extra echo
* set the exports properly
* add setup go to work with act
* add some docs to golangci linter
* test new-from-rev
* enable more linters, but app.go back
* verify issues-exit-code being gone
* put it back
* enable more linters
* remove exclusions
* add additional tests that attempt to borrow funds from the insolvent market(should fail), and attempt to borrow funds from the not insolvent market (it will fail, but shouldn't). The not insolvent market should continue to processs borrows
* remove unused code
* make tests less specific for string contains
* add new get total reserves for denoms functionality
* start utilizing GetTotalReservesForDenoms in ValidateBorrow
* update tests for Borrow to not fail when borrowing from an insolvent market
* use get total reseves in GetTotalReservesForDenoms for reusability
* refactor GetTotalReservesForDenoms to GetTotalReservesByCoinDenoms for more clarity
* change the structure for new and old tests and add more verbosity for other tests
* remove print
* remove unneeded code
* add paren
* adjust structure again after initial PR
* remove duplicate test case with invalid test name, and update to use error contains in places where it was validating if true for strings contains
* no need for keeper method
* add additional tests that attempt to borrow funds from the insolvent market(should fail), and attempt to borrow funds from the not insolvent market (it will fail, but shouldn't). The not insolvent market should continue to processs borrows
* remove unused code
* make tests less specific for string contains
* change the structure for new and old tests and add more verbosity for other tests
* remove print
* remove unneeded code
* add paren
* remove duplicate test case with invalid test name, and update to use error contains in places where it was validating if true for strings contains
---------
Co-authored-by: Sam Sheffield <sam.sheffield@kavalabs.io>
Module reserve represents fractional balances, so it should be hidden to consumers to not have a misleading total balance that doubles the fractional balances. This modifies GetBalance() and SpendableCoin() to always return zero coins when fetching the reserve address balance for fractional amounts.
Change GetBalance() to return full balances instead of spendable to align behavior with x/bank. Add SpendableCoin() method with support of akava for use in x/evm.
Emits the **total** akava amount for both ukava and akava send/mint/burns. If both akava,ukava are sent (not possible via x/evm nor cosmos messages but still an edge case), then the sum is emitted. No other denoms are emitted by x/precisebank as they will be emitted by the underlying x/bank
Fix reserve minting an extra coin when the recipient module both carries fractional over to integer balance AND remainder is insufficient. Adjusts fractional carry to simply send from reserve, instead of doing an additional mint. Add invariant to ensure reserve matches exactly with fractional balances + remainder, failing on both insufficient and excess funds.
for internal testnet deployment, record the desired deployment version
as an action variable that can be used by the checkout action instead of
using manual pull & checkout commands
* bump internal-testnet VERSION and genesis file for wbtc config
* Fix EOF on validate genesis by add missing modules; Fix validation by fixing gov params; update total escrow to default
* bump version for latest genesis
---------
Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>
## What Changes
- add a native `wbtc` contract to internal-testnet for testing
- seed the dev wallet and some e2e test wallets with funds for this new contract
the release tag CI is run when semantic versioned tags are pushed.
it is presumed that the commit and/or PR to the release branch being
tagged has already passed the lints.
this gets around Github Actions CI running check-proto-breaking-remote
which compares the pushed commit against _master_ (not the previous release)
previously, v0.47.10-kava.2 used iavl v1, but this version will be
retracted because that branch & tag should only be used for iavl v0.
this sdk version is the same as v0.47.10-kava.2, but also includes a bug
fix to the initial iavl version used when adding new modules
see https://github.com/Kava-Labs/cosmos-sdk/pull/545
* port iavlviewer to kava v0.26.x to debug app hash
* add hash subcommand to iavlviewer
additionally, use better error handling
* update changelog
* separate iavlviewer command into subcommands
---------
Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>