-
Notifications
You must be signed in to change notification settings - Fork 286
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
Update to cosmos-v0.37.0 #231
Conversation
530c0c9
to
4bab8f7
Compare
Codecov Report
@@ Coverage Diff @@
## develop #231 +/- ##
==========================================
+ Coverage 65.74% 67.7% +1.95%
==========================================
Files 105 68 -37
Lines 5958 2966 -2992
==========================================
- Hits 3917 2008 -1909
+ Misses 1799 849 -950
+ Partials 242 109 -133 |
7dffed5
to
71e2f78
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainly stylistic feedback; did not review market / oracle given lots of the code will change.
tmtypes "github.com/tendermint/tendermint/types" | ||
|
||
"github.com/terra-project/core/x/slashing" | ||
"github.com/terra-project/core/x/staking" | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments for exported functions should start with the function name
cli_test/README.md
Outdated
- Test state that is needed by `tx` and `query` commands (`home`, `chain_id`, etc...) is stored on the `Fixtures` object. This makes constructing your new tests almost trivial. | ||
- Sometimes if you exit a test early there can be still running `terrad` and `terracli` processes that will interrupt subsequent runs. Still running `terracli` processes will block access to the keybase while still running `terrad` processes will block ports and prevent new tests from spinning up. You can ensure new tests spin up clean by running `pkill -9 terrad && pkill -9 terracli` before each test run. | ||
- Most `query` and `tx` commands take a variadic `flags` argument. This pattern allows for the creation of a general function which is easily modified by adding flags. See the `TxSend` function and its use for a good example. | ||
- `Tx*` functions follow a general pattern and return `(success bool, stdout string, stderr string)`. This allows for easy testing of multiple different flag configurations. See `TestGaiaCLICreateValidator` or `TestGaiaCLISubmitProposal` for a good example of the pattern. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TestGaiaCLICreateValidator
--> TestTerraCLICreateValidator
, TestGaiaCLISubmitProposal
--> TestTerraCLISubmitProposal
cli_test/README.md
Outdated
@@ -0,0 +1,51 @@ | |||
# Gaia CLI Integration tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Terra CLI Integration tests
"github.com/cosmos/cosmos-sdk/x/staking" | ||
authutils "github.com/terra-project/core/x/auth/client/utils" | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Long file; add short comment on how the test helpers are used
cmd/terrad/main.go
Outdated
rootCmd.AddCommand(version.VersionCmd) | ||
rootCmd.AddCommand(genutilcli.InitCmd(ctx, cdc, app.ModuleBasics, app.DefaultNodeHome)) | ||
rootCmd.AddCommand(genutilcli.CollectGenTxsCmd(ctx, cdc, genaccounts.AppModuleBasic{}, app.DefaultNodeHome)) | ||
// terra does not need to support migrage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
migrage --> migrate.
Why does terra not support this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recommend removing dead code altogether
x/auth/client/cli/estimate_fee.go
Outdated
|
||
cmd.Flags().Float64(client.FlagGasAdjustment, client.DefaultGasAdjustment, "adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored ") | ||
cmd.Flags().String(client.FlagGasPrices, "", "Gas prices to determine the transaction fee (e.g. 10uluna)") | ||
// cmd.MarkFlagRequired(client.FlagGasAdjustment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove dead code
"github.com/cosmos/cosmos-sdk/x/auth/types" | ||
"github.com/cosmos/cosmos-sdk/x/simulation" | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add comment for purpose of file
) | ||
|
||
// SimulateDeductFee | ||
func SimulateDeductFee(ak auth.AccountKeeper, supplyKeeper types.SupplyKeeper) simulation.Operation { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strengthen comment to add detail on exported function
return | ||
} | ||
|
||
// update luna issuance at last block of a day |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updatelastdayissuance --> updatePrevDayIssuance
x/market/abci.go
Outdated
"github.com/terra-project/core/x/market/internal/types" | ||
) | ||
|
||
// market end block functionality |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Endblocker is called at the end of every block.
063e008
to
9e1e284
Compare
c6f4f8b
to
23ea272
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary of changes
Update cosmos-sdk v0.37.0
All REST responses now wrap the original resource/result. The response
will contain two fields: height and result.
REST end points, which are changed
/bank/accounts/{address}/transfers
without fees.terracli
will compute tax amount and fill fees field containing both gas & tax fee./txs/estimate_fee
to estimate fees of StdTX, and replace StdTx.Fee.Amount to estimated fee/treasury/tax_rate
&/treasury/tax_cap
add computed tax with original gas feeThis resolves #219, resolves #175, resolves #195, resolves #197, resolves #200, resolves #209, and resolves #212
Report of required housekeeping
(FOR ADMIN) Before merging