Commit Graph

601 Commits

Author SHA1 Message Date
Facundo Medica
ebe97e5e12
fix: Revert 16794 (#16895) 2023-07-10 07:45:48 +00:00
Facundo Medica
0fd6227a06
fix: remove setting of finalizeBlockState in FinalizeBlock + fix initialHeight + add ProcessProposal in tests/sims (#16794)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2023-07-06 13:33:10 +00:00
Julien Robert
8d80df8e3c
fix: properly use --trace flag (#16827) 2023-07-04 19:11:27 +00:00
Jacob Gadikian
f0aec3f30d
style: use thelper (#16777) 2023-07-03 13:33:05 +00:00
Julien Robert
e4e7922cea
refactor(genutil): audit (#16818) 2023-07-03 12:29:46 +00:00
Julien Robert
ae39e8e631
build(deps): use hashicorp/go-metrics instead of armon/go-metrics (#16790) 2023-06-30 14:21:57 +00:00
Julien Robert
a067ef6f37
fix: revert f235aae (part 2) (#16697) 2023-06-27 13:48:30 +00:00
yihuang
0a7bb0600b
feat: make abci handshake graceful interruptible (#16206) 2023-06-27 02:05:37 +00:00
Jacob Gadikian
8d4ff7a19a
style: bump golangci-lint (#16667) 2023-06-23 12:49:34 +00:00
Jacob Gadikian
6afece635c
style: add gci linter (#16605) 2023-06-22 15:35:51 +00:00
Emmanuel T Odeke
99a570a7aa
chore: properly propagate fmt.Errorf errors + use errors.New (#16537)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
2023-06-22 09:50:07 +00:00
yihuang
c63d5fa75e
refactor: cleanup profiling code with equivalent one (#16634) 2023-06-21 11:44:02 +00:00
cool-developer
3e18f4088b
feat: update store module for new iavl (#15568)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
2023-06-06 19:08:35 +00:00
Julien Robert
b590b09107
chore: small snapshot commands & docs improvement (#16404) 2023-06-02 12:02:08 +00:00
Julien Robert
0bded0d195
fix: do not overwrite comet config when set in InterceptConfigsPreRunHandler (#16395) 2023-06-01 11:21:28 +00:00
Aaron Craelius
82659a7477
refactor!: deprecate sdk.Msg.GetSigners (#15284)
Co-authored-by: Matt Kocubinski <mkocubinski@gmail.com>
2023-05-25 18:35:09 +00:00
Aleksandr Bezobchuk
6cee22df52
feat!: Comet v0.38 Integration (#15519)
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
Co-authored-by: cool-developer <51834436+cool-develope@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Matt Kocubinski <mkocubinski@gmail.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
2023-05-24 16:09:19 +00:00
Dev Ojha
b500b0104f
refactor: Apply Yihuang's server blocking improvement (#16252) 2023-05-23 09:25:47 +00:00
Dev Ojha
38f27e3d1a
refactor: More cleanup of server/start.go (#16238) 2023-05-22 11:25:10 +00:00
yihuang
de75e568b4
feat: make StartCmd more customizable (#16209) 2023-05-19 09:41:29 +00:00
yihuang
09ca393a19
feat: add Close method for resource cleanup in graceful shutdown (#16193)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2023-05-17 20:04:43 +00:00
Dev Ojha
9329a00e93
refactor: Split up server functions a bit (#16152)
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
2023-05-17 12:52:19 +00:00
Dev Ojha
94dec7a4d6
perf: Remove indentation in REST respones (#16142) 2023-05-13 15:10:31 +00:00
yihuang
c1ceb3bdda
feat: add local snapshots management commands (#16067)
Co-authored-by: Marko <marbar3778@yahoo.com>
2023-05-11 10:11:31 +00:00
Marko
25df90d0fc
feat!: bootstrap comet cmd for local state sync (#16061)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: HuangYi <huang@crypto.com>
2023-05-10 10:25:07 +00:00
Julien Robert
0da5e83176
feat: default to noop mempool when max-txs is negative (#16071) 2023-05-09 17:41:20 +00:00
dependabot[bot]
6403d76c48
build(deps): Bump google.golang.org/grpc from 1.54.0 to 1.55.0 in /errors (#16055)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
2023-05-08 13:04:23 +00:00
Julien Robert
16e940df55
chore: rename comet logger wrapper (#15983) 2023-04-28 14:36:09 +00:00
Facundo Medica
428e19f4f0
refactor(x/distribution)!: Use KVStoreService, context.Context and return errors instead of panic (#15948) 2023-04-27 13:26:51 +00:00
Julien Robert
ebcad58468
fix(autocli): fix simapp enhancing (#15906) 2023-04-25 14:08:02 +00:00
samricotta
e77156858f
refactor(staking, slashing, signing, misc): remove aliases from types/math.go (#15902) 2023-04-25 08:55:17 +00:00
Matt Kocubinski
86b88b1ace
refactor!: use x/tx/signing in client.TxConfig (#15822) 2023-04-20 16:20:21 +00:00
Marko
d6762e930d
refactor(groups): remove global bech32 (#15707)
Co-authored-by: Julien Robert <julien@rbrt.fr>
2023-04-14 16:25:22 +00:00
Marko
9e4fbb6db1
feat!: add node status endpoint (#15597)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
2023-04-13 13:42:52 +00:00
Marko
90e2a2ae89
style: linting (#15704)
## Description

closing in on completion of linting

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

* [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
* [ ] added `!` to the type prefix if API or client breaking change
* [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
* [ ] provided a link to the relevant issue or specification
* [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules)
* [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
* [ ] added a changelog entry to `CHANGELOG.md`
* [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
* [ ] updated the relevant documentation or specification
* [ ] reviewed "Files changed" and left comments if necessary
* [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

* [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
* [ ] confirmed `!` in the type prefix if API or client breaking change
* [ ] confirmed all author checklist items have been addressed 
* [ ] reviewed state machine logic
* [ ] reviewed API design and naming
* [ ] reviewed documentation is accurate
* [ ] reviewed tests and test coverage
* [ ] manually tested (if applicable)
2023-04-06 23:25:23 +00:00
Dhanu Saputra
17debf2efa
feat: emit more data in prom metrics (#15657) 2023-04-06 13:10:08 +00:00
Julien Robert
c1974e4b3c
refactor: remove cometbft/libs/cli import (#15673) 2023-04-03 14:48:02 +00:00
Marko
51f3e70a12
style: more linting (#15618) 2023-03-30 13:00:18 +00:00
Marko
c1ea84d583
style: more linting (#15616) 2023-03-30 12:05:50 +00:00
Julien Robert
d21f58c638
feat(log): wire logger filtering (#15601) 2023-03-30 09:48:38 +00:00
Marko
a5ad307ae6
refactor: migrate consensus to collections (#15553) 2023-03-28 20:41:12 +00:00
Jacob Gadikian
37ba88872d
style: enable strict gofumpt (#15579) 2023-03-28 18:59:21 +00:00
cipherZ
825245db1b
docs: replace Tendermint references in docs with CometBFT (#15339)
Co-authored-by: Julien Robert <julien@rbrt.fr>
2023-03-14 20:41:35 +01:00
Ergels Gaxhaj
6f3f2c9b16
refactor!: ADR-038 go-plugin system (#14207)
Co-authored-by: HuangYi <huang@crypto.com>
Co-authored-by: Ryan Christoffersen <12519942+ryanchristo@users.noreply.github.com>
2023-03-14 18:09:30 +00:00
Facundo Medica
6a03586074
fix: remove previous header in Prepare/Process Proposal + provide chain id in baseapp + fix context for verifying txs (#15303)
## Description

### Issue
Some values (like chain ID) were being leaked from the previous block/initialization into PrepareProposal and ProcessProposal, these values are only available if:
1. The node has never been stopped since the genesis block (as these values are set on `InitChain`)
2. The node has already commited a block (as the previous header was being used for the new state of prepare and process proposal).

So if a node is restarted, during the first prepare and process proposal these values won't be populated, and that will cause issues if they are being used.

### Solution

Remove any previous header information from a previous block in the prepare and process proposal contexts, making things consistent at every height.

- Added ChainID to baseapp
- Use an empty header in Commit() with only the chain id set
- Fix context for prepare and process proposal

Closes: #15269



---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
2023-03-13 17:15:39 +00:00
Julien Robert
ea8c76eb65
feat: add filtering to logger (#15212) 2023-03-13 13:16:20 +00:00
Julien Robert
abd4ac0790
feat: make logger easily replaceable (#15358) 2023-03-13 09:01:58 +00:00
Mark Rushakoff
1bb632a567
chore: prefer to panic instead of os.Exit (#15285) 2023-03-07 15:12:39 +00:00
Mark Rushakoff
e7097b1468
test: add cmdtest package (#15251)
## Description

This PR introduces the `cmdtest` package, offering a lightweight wrapper around cobra commands to simplify testing CLI utilities.

I backfilled tests for the `version` command, which was an example of a very simple test setup; and for the `export` command, which was more involved due to the server and client context requirements.

I did notice that there are some existing tests for some utilities, but the `cmdtest` package follows a simple pattern that has been easy to use successfully in [the relayer](https://github.com/cosmos/relayer/blob/main/internal/relayertest/system.go) and in other projects outside the Cosmos ecosystem.

While filling in these tests, I started removing uses of `cmd.Print`, as that is the root cause of issues like #8498, #7964, #15167, and possibly others. Internal to cobra, the print family of methods write to `cmd.OutOrStderr()` -- meaning that if the authors call `cmd.SetOutput()` before executing the command, the output will be written to stdout as expected; otherwise it will go to stderr. I don't understand why that would be the default behavior, but it is probably too late to change from cobra's side.

Instead of `cmd.Print`, we prefer to `fmt.Fprint(cmd.OutOrStdout())` or `fmt.Fprint(cmd.ErrOrStderr())` as appropriate, giving an unambiguous destination for output. And the new tests collect those outputs in plain `bytes.Buffer` values so that we can assert their content appropriately.

In the longer term, I would like to deprecate and eventually remove the `testutil` package's `ApplyMockIO` method and its `BufferWriter` and `BufferReader` types, as they are unnecessary indirection when a simpler solution exists. But that can wait until `cmdtest` has propagated through the codebase more.

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] ~~provided a link to the relevant issue or specification~~
- [x] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed all author checklist items have been addressed
- [ ] confirmed that this PR does not change production code
2023-03-06 19:40:24 +00:00
Mark Rushakoff
f151bf627a
refactor(log): require destination in calls to NewLogger (#15262) 2023-03-06 19:05:49 +00:00