Skip to content
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

feat: ADR-038 Part 2: StreamingService interface, file writing implementation, and configuration #8664

Merged
merged 54 commits into from
Oct 24, 2021

Conversation

i-norden
Copy link
Contributor

@i-norden i-norden commented Feb 22, 2021

Description

Hello 👋 this PR introduces the second stage of changes to support ADR-038 state listening. This is rebased on top of the first segment, which introduces the low level changes to the MultiStore and KVStore interfaces and implementations, the new WriteListener types, and the new listen.KVStore type.

In this segment we introduce the StreamingService interface, an implementation that writes out to files, and it's integration and configuration at the BaseApp level.

The idea was to have the first segment reviewed independently first but if people think it is easier/more time efficient to review both at the same time then we could start here.

Thanks!

This work is towards satisfying ADR-038


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@lgtm-com
Copy link

lgtm-com bot commented Feb 22, 2021

This pull request introduces 3 alerts when merging d3431dca3307ac2f34f3447f3cd7dff49a2f3988 into 39b816e - view on LGTM.com

new alerts:

  • 3 for Useless assignment to local variable

@i-norden i-norden changed the title Adr038 streamingservice ADR-038 Part 1: StreamingService interface, file writing implementation, and configuration Feb 22, 2021
@i-norden i-norden changed the title ADR-038 Part 1: StreamingService interface, file writing implementation, and configuration ADR-038 Part 2: StreamingService interface, file writing implementation, and configuration Feb 22, 2021
@i-norden i-norden force-pushed the adr038_streamingservice branch 6 times, most recently from c029a15 to c2025e3 Compare March 1, 2021 15:43
@i-norden i-norden force-pushed the adr038_streamingservice branch 3 times, most recently from 063b78b to be8dab6 Compare March 4, 2021 19:31
types/streaming.go Outdated Show resolved Hide resolved
types/streaming.go Outdated Show resolved Hide resolved
types/streaming.go Outdated Show resolved Hide resolved
baseapp/options.go Outdated Show resolved Hide resolved
streaming/constructor_test.go Outdated Show resolved Hide resolved
streaming/constructor.go Outdated Show resolved Hide resolved
@i-norden i-norden force-pushed the adr038_streamingservice branch 6 times, most recently from efd13c6 to dfeb736 Compare March 12, 2021 15:33
@codecov
Copy link

codecov bot commented Mar 15, 2021

Codecov Report

Merging #8664 (7a4b4f2) into master (8d70efa) will decrease coverage by 0.22%.
The diff coverage is 12.85%.

❗ Current head 7a4b4f2 differs from pull request most recent head ea352a7. Consider uploading reports for the commit ea352a7 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8664      +/-   ##
==========================================
- Coverage   64.41%   64.19%   -0.23%     
==========================================
  Files         573      575       +2     
  Lines       54649    54919     +270     
==========================================
+ Hits        35202    35253      +51     
- Misses      17449    17663     +214     
- Partials     1998     2003       +5     
Impacted Files Coverage Δ
baseapp/baseapp.go 67.11% <ø> (ø)
baseapp/options.go 62.26% <0.00%> (-3.74%) ⬇️
store/cachemulti/store.go 10.00% <0.00%> (+0.47%) ⬆️
store/streaming/file/service.go 4.09% <4.09%> (ø)
store/streaming/constructor.go 24.32% <24.32%> (ø)
simapp/app.go 81.15% <40.00%> (-0.67%) ⬇️
baseapp/abci.go 59.96% <42.85%> (-0.80%) ⬇️
x/distribution/simulation/operations.go 90.27% <0.00%> (+9.72%) ⬆️

@i-norden i-norden force-pushed the adr038_streamingservice branch 2 times, most recently from 4b04ab6 to 0a5b58c Compare March 22, 2021 14:10
Copy link
Contributor

@alessio alessio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK

@gsora
Copy link
Contributor

gsora commented Mar 26, 2021

Hi!

I've been experimenting with this implementation - great job, it looks great and actually solves some problem I'm working on.

I think I've found a bug, enabling streaming (on file) on an empty chain makes the node crash:

12:34PM INF starting ABCI with Tendermint
12:34PM INF Starting multiAppConn service impl=multiAppConn module=proxy
12:34PM INF Starting localClient service connection=query impl=localClient module=abci-client
12:34PM INF Starting localClient service connection=snapshot impl=localClient module=abci-client
12:34PM INF Starting localClient service connection=mempool impl=localClient module=abci-client
12:34PM INF Starting localClient service connection=consensus impl=localClient module=abci-client
12:34PM INF Starting EventBus service impl=EventBus module=events
12:34PM INF Starting PubSub service impl=PubSub module=pubsub
12:34PM INF Starting IndexerService service impl=IndexerService module=txindex
12:34PM INF ABCI Handshake App Info hash= height=0 module=consensus protocol-version=0 software-version=
12:34PM INF ABCI Replay Blocks appHeight=0 module=consensus stateHeight=0 storeHeight=0
12:34PM INF asserting crisis invariants inv=0/11 module=x/crisis name=gov/module-account
12:34PM INF asserting crisis invariants inv=1/11 module=x/crisis name=distribution/nonnegative-outstanding
12:34PM INF asserting crisis invariants inv=2/11 module=x/crisis name=distribution/can-withdraw
12:34PM INF asserting crisis invariants inv=3/11 module=x/crisis name=distribution/reference-count
12:34PM INF asserting crisis invariants inv=4/11 module=x/crisis name=distribution/module-account
12:34PM INF asserting crisis invariants inv=5/11 module=x/crisis name=staking/module-accounts
12:34PM INF asserting crisis invariants inv=6/11 module=x/crisis name=staking/nonnegative-power
12:34PM INF asserting crisis invariants inv=7/11 module=x/crisis name=staking/positive-delegation
12:34PM INF asserting crisis invariants inv=8/11 module=x/crisis name=staking/delegator-shares
12:34PM INF asserting crisis invariants inv=9/11 module=x/crisis name=bank/nonnegative-outstanding
12:34PM INF asserting crisis invariants inv=10/11 module=x/crisis name=bank/total-supply
12:34PM INF asserted all invariants duration=0.674567 height=0 module=x/crisis
panic: 0stake is smaller than 1000000000stake: insufficient funds

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper.notBondedTokensToBonded(0x5aae278, 0xc000574a70, 0xcb18c18, 0xc001193380, 0x5ac9d80, 0xc000fc3830, 0xcb19cd8, 0xc000176f20, 0x5ad97c0, 0xc0011d2318, ...)
	github.com/cosmos/cosmos-sdk/x/staking/keeper/pool.go:31 +0x28e
github.com/cosmos/cosmos-sdk/x/staking/keeper.Keeper.ApplyAndReturnValidatorSetUpdates(0x5aae278, 0xc000574a70, 0xcb18c18, 0xc001193380, 0x5ac9d80, 0xc000fc3830, 0xcb19cd8, 0xc000176f20, 0x5ad97c0, 0xc0011d2318, ...)
	github.com/cosmos/cosmos-sdk/x/staking/keeper/val_state_change.go:212 +0x1365
github.com/cosmos/cosmos-sdk/x/genutil.DeliverGenTxs(0x5ac5f68, 0xc0000400a0, 0x5adc260, 0xc0000f4380, 0x0, 0x0, 0xc00012aa08, 0x7, 0x0, 0xe15a2f8, ...)
	github.com/cosmos/cosmos-sdk/x/genutil/gentx.go:117 +0x95
github.com/cosmos/cosmos-sdk/x/genutil.InitGenesis(...)
	github.com/cosmos/cosmos-sdk/x/genutil/genesis.go:18
github.com/cosmos/cosmos-sdk/x/genutil.AppModule.InitGenesis(0x5ac0ce0, 0xc000fc3cb0, 0x5a94660, 0xc000fc8160, 0xc00015c180, 0xce21dd8, 0xc000fb6a00, 0x5ac5f68, 0xc0000400a0, 0x5adc260, ...)
	github.com/cosmos/cosmos-sdk/x/genutil/module.go:99 +0x198
github.com/cosmos/cosmos-sdk/types/module.(*Manager).InitGenesis(0xc00015e2a0, 0x5ac5f68, 0xc0000400a0, 0x5adc260, 0xc0000f4380, 0x0, 0x0, 0xc00012aa08, 0x7, 0x0, ...)
	github.com/cosmos/cosmos-sdk/types/module/module.go:306 +0x2b5
github.com/cosmos/cosmos-sdk/simapp.(*SimApp).InitChainer(0xc000572c00, 0x5ac5f68, 0xc0000400a0, 0x5adc260, 0xc0000f4380, 0x0, 0x0, 0xc00012aa08, 0x7, 0x0, ...)
	github.com/cosmos/cosmos-sdk/simapp/app.go:468 +0x23c
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).InitChain(0xc000654fc0, 0xe15a2f8, 0xed7efbd7e, 0x0, 0xc00012aa08, 0x7, 0xc0000925c0, 0x662eea0, 0x0, 0x0, ...)
	github.com/cosmos/cosmos-sdk/baseapp/abci.go:62 +0x2f5
github.com/tendermint/tendermint/abci/client.(*localClient).InitChainSync(0xc000299440, 0xe15a2f8, 0xed7efbd7e, 0x0, 0xc00012aa08, 0x7, 0xc0000925c0, 0x662eea0, 0x0, 0x0, ...)
	github.com/tendermint/[email protected]/abci/client/local_client.go:266 +0x115
github.com/tendermint/tendermint/proxy.(*appConnConsensus).InitChainSync(0xc000574c30, 0xe15a2f8, 0xed7efbd7e, 0x0, 0xc00012aa08, 0x7, 0xc0000925c0, 0x662eea0, 0x0, 0x0, ...)
	github.com/tendermint/[email protected]/proxy/app_conn.go:77 +0x78
github.com/tendermint/tendermint/consensus.(*Handshaker).ReplayBlocks(0xc00103e0e8, 0xb, 0x0, 0xc00012aff8, 0x7, 0xc00012b020, 0x7, 0x1, 0x0, 0x0, ...)
	github.com/tendermint/[email protected]/consensus/replay.go:319 +0x655
github.com/tendermint/tendermint/consensus.(*Handshaker).Handshake(0xc00103e0e8, 0x5add388, 0xc0001cc9c0, 0x1f4, 0xc000d11a20)
	github.com/tendermint/[email protected]/consensus/replay.go:268 +0x458
github.com/tendermint/tendermint/node.doHandshake(0x5ad9828, 0xc000574010, 0xb, 0x0, 0xc00012aff8, 0x7, 0xc00012b020, 0x7, 0x1, 0x0, ...)
	github.com/tendermint/[email protected]/node/node.go:277 +0x1d8
github.com/tendermint/tendermint/node.NewNode(0xc00118dcc0, 0x5abe940, 0xc000166a00, 0xc00015d350, 0x5a92180, 0xc0011d3110, 0xc00015d3c0, 0x58db368, 0xc00015d4b0, 0x5ac6b70, ...)
	github.com/tendermint/[email protected]/node/node.go:685 +0x1e65
github.com/cosmos/cosmos-sdk/server.startInProcess(0xc0011f2ae0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5ace8b0, 0xc001193380, ...)
	github.com/cosmos/cosmos-sdk/server/start.go:256 +0x585
github.com/cosmos/cosmos-sdk/server.StartCmd.func2(0xc0011d7b80, 0xc001237440, 0x0, 0x1, 0x0, 0x0)
	github.com/cosmos/cosmos-sdk/server/start.go:129 +0x1c8
github.com/spf13/cobra.(*Command).execute(0xc0011d7b80, 0xc001237430, 0x1, 0x1, 0xc0011d7b80, 0xc001237430)
	github.com/spf13/[email protected]/command.go:852 +0x472
github.com/spf13/cobra.(*Command).ExecuteC(0xc000f16c80, 0x0, 0x0, 0xc000043608)
	github.com/spf13/[email protected]/command.go:960 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/[email protected]/command.go:897
github.com/spf13/cobra.(*Command).ExecuteContext(...)
	github.com/spf13/[email protected]/command.go:890
github.com/cosmos/cosmos-sdk/server/cmd.Execute(0xc000f16c80, 0xc000043608, 0x14, 0x5adf1d8, 0xc001193380)
	github.com/cosmos/cosmos-sdk/server/cmd/execute.go:36 +0x265
main.main()
	github.com/cosmos/cosmos-sdk/simapp/simd/main.go:15 +0x45

How to reproduce

I'm using the following script to bootstrap a simple simd node:

simd init test --chain-id testing
simd add-genesis-account $(simd keys show validator -a) 1000000000stake,1000000000validatortoken
simd gentx validator 1000000000stake --chain-id testing
simd collect-gentxs
simd start --trace

@i-norden
Copy link
Contributor Author

Hi @gsora, thank you for this feedback this is really helpful! I will look into this ASAP, and will @ you when I have a fix up.

@i-norden
Copy link
Contributor Author

Thanks for the review @robert-zaremba! I believe I've made all the requested adjustments (or commented on them). The switch to the plugin arch will entail replacing/refactoring a lot of the streaming service documentation and the ADR is still in "proposed" status at this time so I don't think we need to get this iteration of the documentation perfect.

Copy link
Collaborator

@robert-zaremba robert-zaremba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions github-actions bot removed the T: CI label Oct 20, 2021
@robert-zaremba robert-zaremba added the A:automerge Automatically merge PR once all prerequisites pass. label Oct 21, 2021
@i-norden
Copy link
Contributor Author

Hey @alexanderbez I think this is ready for your final approval/review

@tac0turtle tac0turtle dismissed alexanderbez’s stale review October 24, 2021 21:29

Talked with bez, he said we are fine to merge without another review

@mergify mergify bot merged commit 1326fa2 into cosmos:master Oct 24, 2021
yihuang pushed a commit to yihuang/cosmos-sdk that referenced this pull request Sep 19, 2022
…entation, and configuration (cosmos#8664)

<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰
v    Before smashing the submit button please review the checkboxes.
v    If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review.
-->

Hello 👋 this PR introduces the second stage of changes to support [ADR-038](cosmos#8012) state listening. This is rebased on top of the [first segment](cosmos#8551), which introduces the low level changes to the MultiStore and KVStore interfaces and implementations, the new WriteListener types, and the new listen.KVStore type.

In this segment we introduce the StreamingService interface, an implementation that writes out to files, and it's integration and configuration at the BaseApp level.

The idea was to have the first segment reviewed independently first but if people think it is easier/more time efficient to review both at the same time then we could start here.

Thanks!

This work is towards satisfying [ADR-038](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-038-state-listening.md)

---

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

- [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [x] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [x] Wrote unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [x] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [x] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [x] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [x] Re-reviewed `Files changed` in the Github PR explorer
- [x] Review `Codecov Report` in the comment section below once CI passes
yihuang pushed a commit to yihuang/cosmos-sdk that referenced this pull request Sep 19, 2022
…entation, and configuration (backport cosmos#8664)

<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰
v    Before smashing the submit button please review the checkboxes.
v    If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review.
-->

Hello 👋 this PR introduces the second stage of changes to support [ADR-038](cosmos#8012) state listening. This is rebased on top of the [first segment](cosmos#8551), which introduces the low level changes to the MultiStore and KVStore interfaces and implementations, the new WriteListener types, and the new listen.KVStore type.

In this segment we introduce the StreamingService interface, an implementation that writes out to files, and it's integration and configuration at the BaseApp level.

The idea was to have the first segment reviewed independently first but if people think it is easier/more time efficient to review both at the same time then we could start here.

Thanks!

This work is towards satisfying [ADR-038](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-038-state-listening.md)

---

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

- [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [x] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [x] Wrote unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [x] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [x] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [x] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [x] Re-reviewed `Files changed` in the Github PR explorer
- [x] Review `Codecov Report` in the comment section below once CI passes
yihuang pushed a commit to yihuang/cosmos-sdk that referenced this pull request Sep 20, 2022
…entation, and configuration (cosmos#8664)

<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰
v    Before smashing the submit button please review the checkboxes.
v    If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review.
-->

Hello 👋 this PR introduces the second stage of changes to support [ADR-038](cosmos#8012) state listening. This is rebased on top of the [first segment](cosmos#8551), which introduces the low level changes to the MultiStore and KVStore interfaces and implementations, the new WriteListener types, and the new listen.KVStore type.

In this segment we introduce the StreamingService interface, an implementation that writes out to files, and it's integration and configuration at the BaseApp level.

The idea was to have the first segment reviewed independently first but if people think it is easier/more time efficient to review both at the same time then we could start here.

Thanks!

This work is towards satisfying [ADR-038](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-038-state-listening.md)

---

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

- [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [x] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [x] Wrote unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [x] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [x] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [x] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [x] Re-reviewed `Files changed` in the Github PR explorer
- [x] Review `Codecov Report` in the comment section below once CI passes
yihuang pushed a commit to yihuang/cosmos-sdk that referenced this pull request Sep 23, 2022
…entation, and configuration (cosmos#8664)

<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰
v    Before smashing the submit button please review the checkboxes.
v    If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review.
-->

Hello 👋 this PR introduces the second stage of changes to support [ADR-038](cosmos#8012) state listening. This is rebased on top of the [first segment](cosmos#8551), which introduces the low level changes to the MultiStore and KVStore interfaces and implementations, the new WriteListener types, and the new listen.KVStore type.

In this segment we introduce the StreamingService interface, an implementation that writes out to files, and it's integration and configuration at the BaseApp level.

The idea was to have the first segment reviewed independently first but if people think it is easier/more time efficient to review both at the same time then we could start here.

Thanks!

This work is towards satisfying [ADR-038](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-038-state-listening.md)

---

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

- [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [x] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [x] Wrote unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [x] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [x] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [x] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [x] Re-reviewed `Files changed` in the Github PR explorer
- [x] Review `Codecov Report` in the comment section below once CI passes
tomtau pushed a commit to crypto-org-chain/cosmos-sdk that referenced this pull request Sep 29, 2022
…entation, and configuration (cosmos#8664)

<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰
v    Before smashing the submit button please review the checkboxes.
v    If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review.
-->

Hello 👋 this PR introduces the second stage of changes to support [ADR-038](cosmos#8012) state listening. This is rebased on top of the [first segment](cosmos#8551), which introduces the low level changes to the MultiStore and KVStore interfaces and implementations, the new WriteListener types, and the new listen.KVStore type.

In this segment we introduce the StreamingService interface, an implementation that writes out to files, and it's integration and configuration at the BaseApp level.

The idea was to have the first segment reviewed independently first but if people think it is easier/more time efficient to review both at the same time then we could start here.

Thanks!

This work is towards satisfying [ADR-038](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-038-state-listening.md)

---

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

- [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [x] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [x] Wrote unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [x] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [x] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [x] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [x] Re-reviewed `Files changed` in the Github PR explorer
- [x] Review `Codecov Report` in the comment section below once CI passes
tac0turtle pushed a commit that referenced this pull request Oct 2, 2022
…entation, and configuration (backport #8664) (#13325)

* feat: ADR-038 Part 2: StreamingService interface, file writing implementation, and configuration (backport #8664)

<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰
v    Before smashing the submit button please review the checkboxes.
v    If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review.
-->

Hello 👋 this PR introduces the second stage of changes to support [ADR-038](#8012) state listening. This is rebased on top of the [first segment](#8551), which introduces the low level changes to the MultiStore and KVStore interfaces and implementations, the new WriteListener types, and the new listen.KVStore type.

In this segment we introduce the StreamingService interface, an implementation that writes out to files, and it's integration and configuration at the BaseApp level.

The idea was to have the first segment reviewed independently first but if people think it is easier/more time efficient to review both at the same time then we could start here.

Thanks!

This work is towards satisfying [ADR-038](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-038-state-listening.md)

---

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

- [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [x] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [x] Wrote unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [x] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [x] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [x] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [x] Re-reviewed `Files changed` in the Github PR explorer
- [x] Review `Codecov Report` in the comment section below once CI passes

* Update CHANGELOG.md

Co-authored-by: Ian Norden <[email protected]>
tac0turtle pushed a commit that referenced this pull request Oct 3, 2022
…entation, and configuration (#8664) (#13326)

* feat: ADR-038 Part 2: StreamingService interface, file writing implementation, and configuration (#8664)

<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰
v    Before smashing the submit button please review the checkboxes.
v    If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review.
-->

Hello 👋 this PR introduces the second stage of changes to support [ADR-038](#8012) state listening. This is rebased on top of the [first segment](#8551), which introduces the low level changes to the MultiStore and KVStore interfaces and implementations, the new WriteListener types, and the new listen.KVStore type.

In this segment we introduce the StreamingService interface, an implementation that writes out to files, and it's integration and configuration at the BaseApp level.

The idea was to have the first segment reviewed independently first but if people think it is easier/more time efficient to review both at the same time then we could start here.

Thanks!

This work is towards satisfying [ADR-038](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-038-state-listening.md)

---

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

- [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [x] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [x] Wrote unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [x] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [x] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [x] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [x] Re-reviewed `Files changed` in the Github PR explorer
- [x] Review `Codecov Report` in the comment section below once CI passes

* fix lint

* Update CHANGELOG.md

Co-authored-by: Ian Norden <[email protected]>
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
…entation, and configuration (cosmos#8664)

<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰
v    Before smashing the submit button please review the checkboxes.
v    If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

## Description

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review.
-->

Hello 👋 this PR introduces the second stage of changes to support [ADR-038](cosmos#8012) state listening. This is rebased on top of the [first segment](cosmos#8551), which introduces the low level changes to the MultiStore and KVStore interfaces and implementations, the new WriteListener types, and the new listen.KVStore type.

In this segment we introduce the StreamingService interface, an implementation that writes out to files, and it's integration and configuration at the BaseApp level.

The idea was to have the first segment reviewed independently first but if people think it is easier/more time efficient to review both at the same time then we could start here.

Thanks!



This work is towards satisfying [ADR-038](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-038-state-listening.md)

---

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

- [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [x] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [x] Wrote unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [x] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [x] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [x] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [x] Re-reviewed `Files changed` in the Github PR explorer
- [x] Review `Codecov Report` in the comment section below once CI passes
JeancarloBarrios pushed a commit to agoric-labs/cosmos-sdk that referenced this pull request Sep 28, 2024
…entation, and configuration (cosmos#8664) (cosmos#13326)

* feat: ADR-038 Part 2: StreamingService interface, file writing implementation, and configuration (cosmos#8664)

<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰
v    Before smashing the submit button please review the checkboxes.
v    If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review.
-->

Hello 👋 this PR introduces the second stage of changes to support [ADR-038](cosmos#8012) state listening. This is rebased on top of the [first segment](cosmos#8551), which introduces the low level changes to the MultiStore and KVStore interfaces and implementations, the new WriteListener types, and the new listen.KVStore type.

In this segment we introduce the StreamingService interface, an implementation that writes out to files, and it's integration and configuration at the BaseApp level.

The idea was to have the first segment reviewed independently first but if people think it is easier/more time efficient to review both at the same time then we could start here.

Thanks!

This work is towards satisfying [ADR-038](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-038-state-listening.md)

---

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

- [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [x] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [x] Wrote unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [x] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [x] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [x] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [x] Re-reviewed `Files changed` in the Github PR explorer
- [x] Review `Codecov Report` in the comment section below once CI passes

* fix lint

* Update CHANGELOG.md

Co-authored-by: Ian Norden <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. T: ADR An issue or PR relating to an architectural decision record T:Docs Changes and features related to documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants