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

fix: state listener observe writes at wrong time #13516

Merged
merged 30 commits into from Dec 2, 2022

Conversation

yihuang
Copy link
Collaborator

@yihuang yihuang commented Oct 12, 2022

Description

Closes: #13457 (again)

Currently state listener is notified when the cache store write, which happens in commit event only, it breaks the current design.
The solution (as discussed in the issue) is listen state writes on rootmulti store only, and change the file streamer to output single file for the writes in the same block, we can't distinguish writes from different stage of abci events.

This PR do minimal changes to the existing interfaces, but actually there are some stuff could be cleaned up, could do in another PR?


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 in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • 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 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)

store/streaming/file/service.go Fixed Show fixed Hide fixed
store/streaming/file/service.go Fixed Show fixed Hide fixed
store/streaming/file/service.go Fixed Show fixed Hide fixed
@codecov
Copy link

codecov bot commented Oct 12, 2022

Codecov Report

Merging #13516 (4c53ebc) into main (2739f83) will increase coverage by 0.20%.
The diff coverage is 21.76%.

❗ Current head 4c53ebc differs from pull request most recent head 3559e7d. Consider uploading reports for the commit 3559e7d to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #13516      +/-   ##
==========================================
+ Coverage   56.25%   56.46%   +0.20%     
==========================================
  Files         667      648      -19     
  Lines       56576    56181     -395     
==========================================
- Hits        31829    31723     -106     
+ Misses      22165    21896     -269     
+ Partials     2582     2562      -20     
Impacted Files Coverage Δ
simapp/app.go 80.92% <0.00%> (ø)
store/cachekv/store.go 88.71% <ø> (+0.68%) ⬆️
store/cachemulti/store.go 11.76% <0.00%> (+2.67%) ⬆️
store/dbadapter/store.go 100.00% <ø> (ø)
store/gaskv/store.go 100.00% <ø> (ø)
store/iavl/store.go 58.03% <ø> (-0.38%) ⬇️
store/listenkv/store.go 96.36% <ø> (-0.13%) ⬇️
store/mem/store.go 93.33% <ø> (-0.79%) ⬇️
store/prefix/store.go 86.86% <ø> (+1.72%) ⬆️
store/streaming/file/service.go 0.00% <0.00%> (-3.89%) ⬇️
... and 65 more

@yihuang yihuang marked this pull request as ready for review October 12, 2022 10:19
@yihuang yihuang requested a review from a team as a code owner October 12, 2022 10:19
@kocubinski
Copy link
Contributor

Will this still be relevant after this changes in #13473 are merged?

@yihuang
Copy link
Collaborator Author

yihuang commented Oct 12, 2022

Will this still be relevant after this changes in #13473 are merged?

I don't see this issue being address in that PR yet, that PR is mainly about the plugin system, I left a comment there as well.

store/streaming/file/listener.go Outdated Show resolved Hide resolved
@yihuang
Copy link
Collaborator Author

yihuang commented Oct 12, 2022

Can we backport this to 0.46/0.45? @alexanderbez

@yihuang yihuang added backport/0.45.x backport/0.46.x PR scheduled for inclusion in the v0.46's next stable release labels Oct 12, 2022
@yihuang yihuang force-pushed the fix-listener-main3 branch 3 times, most recently from fe937e1 to 69b62c6 Compare October 13, 2022 02:41
@julienrbrt julienrbrt self-assigned this Oct 13, 2022
Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

Changes seem reasonable to me! I do have a bit of feedback though :)

Also, would love a review from @AmauryM or @aaronc

baseapp/abci.go Show resolved Hide resolved
baseapp/streaming.go Outdated Show resolved Hide resolved
store/rootmulti/store.go Outdated Show resolved Hide resolved
store/rootmulti/store.go Outdated Show resolved Hide resolved
store/rootmulti/store.go Outdated Show resolved Hide resolved
store/streaming/file/service.go Show resolved Hide resolved
Comment on lines +23 to +27
// DeliverTx encapulate deliver tx request and response.
message DeliverTx {
tendermint.abci.RequestDeliverTx request = 1;
tendermint.abci.ResponseDeliverTx response = 2;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this nested?

Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we even defining this type? We can use the Tendermint types directly, no? Or is this so we can just do a single file write?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't know if there's an existing type that encapsulate the deliverTx request and response.

Copy link
Collaborator Author

@yihuang yihuang Oct 14, 2022

Choose a reason for hiding this comment

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

Yes, it's for single metadata write.
Currently the file is structured as:

metadata
kvpair
kvpair
...

I plan to change it into two files:

  • block-meta, BlockMetadata without length prefix.
  • block-data, stream of length-delimited kv-pairs.
kv-pair
...

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah I like the idea of two separate files actually. For the txs, it can be delineated by newlines?

Copy link
Collaborator Author

@yihuang yihuang Oct 18, 2022

Choose a reason for hiding this comment

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

Yeah I like the idea of two separate files actually. For the txs, it can be delineated by newlines?

since we observe the writes in commit event, we can't distinguish them by txs.
do you mean the deliver txs metadata?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. I mean in the file streaming implementation. Have one file for the begin/end block structure and one for txs.

Copy link
Collaborator Author

@yihuang yihuang Oct 19, 2022

Choose a reason for hiding this comment

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

Yes. I mean in the file streaming implementation. Have one file for the begin/end block structure and one for txs.

Do you mean three files:

  • block meta, begin/end/commit block messages
  • block txs, deliver tx message stream.
  • block data, StoreKVPairs stream.

store/streaming/file/service.go Outdated Show resolved Hide resolved
store/streaming/file/service.go Outdated Show resolved Hide resolved
store/streaming/file/service.go Outdated Show resolved Hide resolved
if err != nil {
return err
}
if err := atomic.WriteFile(path.Join(fss.writeDir, metaFileName), bytes.NewReader(bz)); err != nil {

Choose a reason for hiding this comment

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

No reason to bring in a new dependency for this, os.WriteFile is sufficient.

Copy link
Collaborator Author

@yihuang yihuang Oct 19, 2022

Choose a reason for hiding this comment

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

If the files are to be read by different process concurrently, atomicity is necessary to avoid reading partially written file.
For example, we might replicate the file streamer output to distributed nodes, so the atomicity is needed here.

Copy link

Choose a reason for hiding this comment

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

  1. There is no documented guarantee that files produced by this type are written atomically. It cannot be assumed by consumers.
  2. Regardless, that property is true even without the atomic dependency: this code won't produce a partial file in any way that can be observed by consumers
  3. The content is likely only readable to out of process consumers after a sync and/or close, anyway (depending on OS/FS).
  4. Replication of a file on disk to another host doesn't rely on the file being written atomically.

Copy link
Collaborator Author

@yihuang yihuang Oct 19, 2022

Choose a reason for hiding this comment

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

  1. There is no documented guarantee that files produced by this type are written atomically. It cannot be assumed by consumers.

I can change the ADR to add this.

  1. Regardless, that property is true even without the atomic dependency: this code won't produce a partial file, since the entire content is written in a single call to Write.
  2. The content is likely only readable to out of process consumers after a sync and/or close, anyway (depending on OS/FS).

I think there's no atomicity guarantee even with a single sync/close call, I guess it depends on the block level implementation.

  1. Replication of a file on disk to another host doesn't rely on the file being written atomically.

I guess there are ways for the consumer to workaround the possible partial written file (maybe need to wait for the files of next block to appear to be sure that the last block's file is completed), but atomicity certainly make the consumer's life much easier.

Choose a reason for hiding this comment

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

There's no reason for it.

Copy link
Collaborator Author

@yihuang yihuang Oct 19, 2022

Choose a reason for hiding this comment

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

First of all, when the file is opened, it's already observable as an empty file by the reader.

About if the reader can observe partial write, here is the standard spec:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html

After a write() to a regular file has successfully returned:

Any successful read() from each byte position in the file that was modified by that write shall return the data specified by the write() for that position until such byte positions are again modified.

It only talks about byte level guarantees.
The write don't even guarantee it write the requested content in one go, it can write partial content and return the number of bytes written, and the caller is expected to retry the rest of it.
I might do the test on the machine I work with, but I'm not sure how much assurance it provides even if it success on one machine.

Copy link
Collaborator Author

@yihuang yihuang Oct 19, 2022

Choose a reason for hiding this comment

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

os.WriteFile simply do OpenFile followed by f.Write without locking, so it's definitely not atomic as a whole.
It treats the short write as an error, and it won't retry or revert, in that case, the file is left partially written.
The file is eventually ok if the error breaks consensus state machine and the block is replayed, but still problematic for a consumer.

Copy link
Collaborator Author

@yihuang yihuang Oct 20, 2022

Choose a reason for hiding this comment

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

but the atomic library do a fsync, which could have a visible performance impact, so let me write the size of the file at the beginning, and do normal file writing, so at least consumer can detect a corrupted file.

Copy link

Choose a reason for hiding this comment

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

Previously consumers could do e.g.

buf, ... := os.ReadFile(filename)
val, ... := whatever.ParseBytes(buf)

Which, for the record, will certainly error out during ParseBytes in the case that the file is only partially written. Now, consumers must do e.g.

buf, ... := os.ReadFile(filename)
u, dat := buf[:8, 8:]
sz, ... := (parse u as uint64 or error)
(verify len(dat) == sz or error) 
val, ... := whatever.ParseBytes(dat)

Where is this uint64-length-prefixed file format documented? What affordances are you providing consumers to read values from these files? Are you expecting them to do this work manually? How should they do that work if they aren't consuming the file from a Go (or other) program? In which circumstances is this approach safer than simply calling os.WriteFile?

Copy link
Collaborator Author

@yihuang yihuang Oct 21, 2022

Choose a reason for hiding this comment

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

Which, for the record, will certainly error out during ParseBytes in the case that the file is only partially written.

When truncated at field boundary a partial file could still be a valid protobuf message, and if the data file if truncated at kvpair message boundary, it can be parsed successfully too. this is the exact issue the prefixed length to solve.

How should they do that work if they aren't consuming the file from a Go (or other) program?

It's just a big endianness encoded 8 bytes integer, should be easy to parse from any language.

Where is this uint64-length-prefixed file format documented?

good catch, I'll update the file streamer's README.md to reflect the new changes, I'll write the pseudo-code for decoding in the doc.

EDIT: here it is

Copy link

@peterbourgon peterbourgon left a comment

Choose a reason for hiding this comment

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

Comment on lines -225 to +251
// HaltAppOnDeliveryError whether or not to halt the application when delivery of massages fails
// in ListenBeginBlock, ListenEndBlock, ListenDeliverTx. When `false, the app will operate in fire-and-forget mode.
// When `true`, the app will gracefully halt and stop the running node. Uncommitted blocks will
// be replayed to all listeners when the node restarts and all successful listeners that received data
// prior to the halt will receive duplicate data. Whether or not a listener operates in a fire-and-forget mode
// is determined by the listener's configuration property `halt_app_on_delivery_error = true|false`.
HaltAppOnDeliveryError() bool
// ListenCommit updates the steaming service with the latest Commit message,
// All the state writes of current block should have notified before this message.
ListenCommit(ctx types.Context, res abci.ResponseCommit) error
Copy link

Choose a reason for hiding this comment

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

This PR changes the semantics of ABCIListener such that all implementations will HaltAppOnDeliveryError = true by default (as expressed by the panic exprs in the impl). This is an enormous change to the behavior of Cosmos nodes which has not been motivated, analyzed, tested, or captured in the changelog.

Copy link
Collaborator Author

@yihuang yihuang Dec 1, 2022

Choose a reason for hiding this comment

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

My assumption is that there's no existing user of this feature other than us, after all, the feature is broken in released versions, and we are the first to find it out.
I'll mention it in the changelog.

EDIT: done

CHANGELOG.md Outdated Show resolved Hide resolved
@@ -330,7 +330,7 @@ func (app *BaseApp) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliv
defer func() {
for _, streamingListener := range app.abciListeners {

Choose a reason for hiding this comment

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

This isn't your fault @yihuang but app.abciListeners is both read-from and written-to without synchronization, which is a memory model violation. Reads occur throughout baseapp/abci.go and writes occur at baseapp/options.go SetStreamingService.

Copy link
Collaborator Author

@yihuang yihuang Dec 1, 2022

Choose a reason for hiding this comment

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

the abci methods are not called concurrently, the SetStreamingService is supposed to be called on initialization only. So I believe we don't need to be thread-safe here.

Basically the abciListeners is supposed to be initialized on startup, then read-only after.

@tac0turtle tac0turtle merged commit 1f91ee2 into cosmos:main Dec 2, 2022
mergify bot pushed a commit that referenced this pull request Dec 2, 2022
* fix: state listener observe writes at wrong time

Closes: #13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

* synchronous abci call, and format doc

* fix comment

* update file streamer readme and fix typos

* typo

* fix: state listener observe writes at wrong time

Closes: #13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

synchronous abci call, and format doc

fix comment

update file streamer readme and fix typos

typo

* improve UX of file streamer, make it immediately usable after enabled

- set default value to write_dir.
- make write_dir based on home directory by default.
- auto-create the directory if not exists.

* get homePage from opts

Co-authored-by: Marko <marbar3778@yahoo.com>
(cherry picked from commit 1f91ee2)

# Conflicts:
#	CHANGELOG.md
#	baseapp/streaming.go
#	store/streaming/constructor.go
#	store/streaming/file/service.go
mergify bot pushed a commit that referenced this pull request Dec 2, 2022
* fix: state listener observe writes at wrong time

Closes: #13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

* synchronous abci call, and format doc

* fix comment

* update file streamer readme and fix typos

* typo

* fix: state listener observe writes at wrong time

Closes: #13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

synchronous abci call, and format doc

fix comment

update file streamer readme and fix typos

typo

* improve UX of file streamer, make it immediately usable after enabled

- set default value to write_dir.
- make write_dir based on home directory by default.
- auto-create the directory if not exists.

* get homePage from opts

Co-authored-by: Marko <marbar3778@yahoo.com>
(cherry picked from commit 1f91ee2)

# Conflicts:
#	CHANGELOG.md
#	api/cosmos/base/store/v1beta1/listening.pulsar.go
#	baseapp/streaming.go
#	docs/architecture/adr-038-state-listening.md
#	server/config/toml.go
#	simapp/app_v2.go
#	store/cachemulti/store.go
#	store/iavl/store.go
#	store/mem/store.go
#	store/streaming/constructor.go
#	store/streaming/file/service.go
#	store/streaming/file/service_test.go
#	store/types/listening.pb.go
#	store/types/store.go
mergify bot pushed a commit that referenced this pull request Dec 2, 2022
* fix: state listener observe writes at wrong time

Closes: #13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

* synchronous abci call, and format doc

* fix comment

* update file streamer readme and fix typos

* typo

* fix: state listener observe writes at wrong time

Closes: #13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

synchronous abci call, and format doc

fix comment

update file streamer readme and fix typos

typo

* improve UX of file streamer, make it immediately usable after enabled

- set default value to write_dir.
- make write_dir based on home directory by default.
- auto-create the directory if not exists.

* get homePage from opts

Co-authored-by: Marko <marbar3778@yahoo.com>
(cherry picked from commit 1f91ee2)

# Conflicts:
#	CHANGELOG.md
#	api/cosmos/base/store/v1beta1/listening.pulsar.go
#	baseapp/abci.go
#	baseapp/streaming.go
#	docs/architecture/adr-038-state-listening.md
#	server/config/config.go
#	server/config/toml.go
#	simapp/app.go
#	simapp/app_v2.go
#	store/cachemulti/store.go
#	store/iavl/store.go
#	store/mem/store.go
#	store/rootmulti/store.go
#	store/streaming/constructor.go
#	store/streaming/constructor_test.go
#	store/streaming/file/README.md
#	store/streaming/file/service.go
#	store/streaming/file/service_test.go
#	store/types/listening.pb.go
#	store/types/store.go
@yihuang yihuang deleted the fix-listener-main3 branch December 2, 2022 14:46
tac0turtle pushed a commit that referenced this pull request Dec 5, 2022
…14137)

* fix: state listener observe writes at wrong time (#13516)

* fix: state listener observe writes at wrong time

Closes: #13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

* synchronous abci call, and format doc

* fix comment

* update file streamer readme and fix typos

* typo

* fix: state listener observe writes at wrong time

Closes: #13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

synchronous abci call, and format doc

fix comment

update file streamer readme and fix typos

typo

* improve UX of file streamer, make it immediately usable after enabled

- set default value to write_dir.
- make write_dir based on home directory by default.
- auto-create the directory if not exists.

* get homePage from opts

Co-authored-by: Marko <marbar3778@yahoo.com>
(cherry picked from commit 1f91ee2)

# Conflicts:
#	CHANGELOG.md
#	baseapp/streaming.go
#	store/streaming/constructor.go
#	store/streaming/file/service.go

* fix changelog

* fix conflicts

Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
tac0turtle pushed a commit that referenced this pull request Dec 6, 2022
…14139)

* fix: state listener observe writes at wrong time (#13516)

* fix: state listener observe writes at wrong time

Closes: #13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

* synchronous abci call, and format doc

* fix comment

* update file streamer readme and fix typos

* typo

* fix: state listener observe writes at wrong time

Closes: #13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

synchronous abci call, and format doc

fix comment

update file streamer readme and fix typos

typo

* improve UX of file streamer, make it immediately usable after enabled

- set default value to write_dir.
- make write_dir based on home directory by default.
- auto-create the directory if not exists.

* get homePage from opts

Co-authored-by: Marko <marbar3778@yahoo.com>
(cherry picked from commit 1f91ee2)

# Conflicts:
#	CHANGELOG.md
#	api/cosmos/base/store/v1beta1/listening.pulsar.go
#	baseapp/abci.go
#	baseapp/streaming.go
#	docs/architecture/adr-038-state-listening.md
#	server/config/config.go
#	server/config/toml.go
#	simapp/app.go
#	simapp/app_v2.go
#	store/cachemulti/store.go
#	store/iavl/store.go
#	store/mem/store.go
#	store/rootmulti/store.go
#	store/streaming/constructor.go
#	store/streaming/constructor_test.go
#	store/streaming/file/README.md
#	store/streaming/file/service.go
#	store/streaming/file/service_test.go
#	store/types/listening.pb.go
#	store/types/store.go

* `make proto-gen`, update changelog, delete uncessary files

* fix conflicts

* fix GetConfig

Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
tac0turtle added a commit that referenced this pull request Dec 6, 2022
…14138)

* fix: state listener observe writes at wrong time (#13516)

* fix: state listener observe writes at wrong time

Closes: #13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

* synchronous abci call, and format doc

* fix comment

* update file streamer readme and fix typos

* typo

* fix: state listener observe writes at wrong time

Closes: #13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

synchronous abci call, and format doc

fix comment

update file streamer readme and fix typos

typo

* improve UX of file streamer, make it immediately usable after enabled

- set default value to write_dir.
- make write_dir based on home directory by default.
- auto-create the directory if not exists.

* get homePage from opts

Co-authored-by: Marko <marbar3778@yahoo.com>
(cherry picked from commit 1f91ee2)

# Conflicts:
#	CHANGELOG.md
#	api/cosmos/base/store/v1beta1/listening.pulsar.go
#	baseapp/streaming.go
#	docs/architecture/adr-038-state-listening.md
#	server/config/toml.go
#	simapp/app_v2.go
#	store/cachemulti/store.go
#	store/iavl/store.go
#	store/mem/store.go
#	store/streaming/constructor.go
#	store/streaming/file/service.go
#	store/streaming/file/service_test.go
#	store/types/listening.pb.go
#	store/types/store.go

* `make proto-gen`, update changelog, delete uncessary files

* fix conflicts

* fix conflicts

* revert api breaking change

* fix build

* fix unit test

Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: Marko <marbar3778@yahoo.com>
SpicyLemon added a commit to provenance-io/cosmos-sdk that referenced this pull request Dec 14, 2022
* docs: add ApplicationQueryService release notes (cosmos#13587)

* docs: add ApplicationQueryService release notes

* updates

Co-authored-by: Julien Robert <julien@rbrt.fr>

* feat(cli): add module-account cli cmd and grpc get api (backport cosmos#13612) (cosmos#13616)

* feat(cli): add module-account cli cmd and grpc get api (cosmos#13612)

(cherry picked from commit ddf5cf0)

# Conflicts:
#	CHANGELOG.md
#	api/cosmos/auth/v1beta1/query.pulsar.go
#	api/cosmos/auth/v1beta1/query_grpc.pb.go
#	x/auth/client/testutil/suite.go
#	x/auth/types/query.pb.go

* fix conflicts

* updates

* updates

Co-authored-by: Sai Kumar <17549398+gsk967@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix(x/auth): allow multiple = signs in `GetTxsEvent` (backport cosmos#12474) (cosmos#13598)

* fix(x/auth): allow multiple = signs in `GetTxsEvent` (cosmos#12474)

(cherry picked from commit 18da0e9)

# Conflicts:
#	CHANGELOG.md

* fix changelog

* changelog

* fix: flakey test

Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix: app-hash mismatch if upgrade migration commit is interrupted (backport cosmos#13530) (cosmos#13627)

* feat(cli): Add iavl-disable-fastnode cmd flag with proper description (cosmos#13656) (cosmos#13659)

(cherry picked from commit c833190)

Co-authored-by: William Chong <6198816+williamchong@users.noreply.github.com>

* build(deps): Bump github.com/cosmos/iavl from 0.19.3 to 0.19.4 (cosmos#13680)

* feat: emit cached context events (backport cosmos#13063) (cosmos#13702)

* chore: prepare 0.46.4 changelog (cosmos#13716)

* chore: prepare 0.46.4 changelog

* wording

* updates

* updates

* ci: notify for 0.46.x releases (cosmos#13719)

* feat: notify for 0.46.x releases

* updates changelog

* docs: fix algolia on 0.46 (cosmos#13730)

* ci: modifying docs in 0.46 should not redeploy docs (cosmos#13732)

* ci: modifying docs in 0.46 should not redeploy docs

* updates

* fix: propagate msg events correctly in x/gov (backport cosmos#13728) (cosmos#13748)

* refactor: add error log when iavl set failed (backport cosmos#13803) (cosmos#13804)

* refactor: add error log when iavl set failed (cosmos#13803)

* add error log when iavl set failed

Ref: cosmos#12012

* Update CHANGELOG.md

* play safe

(cherry picked from commit 22f3261)

# Conflicts:
#	CHANGELOG.md

* fix conflicts

Co-authored-by: yihuang <huang@crypto.com>

* chore: bump tendermint to `0.34.23` (cosmos#13814)

* fix: propagate events in x/group through sdk.Results (backport cosmos#13808) (cosmos#13809)

* docs: update algolia index (cosmos#13823)

* fix: bank store migration (backport cosmos#13821) (cosmos#13829)

* fix: bank store migration (cosmos#13821)

(cherry picked from commit d314a12)

# Conflicts:
#	x/bank/migrations/v3/store.go
#	x/bank/migrations/v3/store_test.go

* updates

Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* feat(types): set custom GasConfig on Context for GasKVStore (backport cosmos#13826) (cosmos#13833)

* feat(types): set custom GasConfig on Context for GasKVStore (cosmos#13826)

(cherry picked from commit f001b46)

# Conflicts:
#	CHANGELOG.md
#	types/context.go
#	types/context_test.go

* fix conflicts

* updates

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* chore: prepare 0.46.5 release (cosmos#13816)

* fix: Allow underscores in EventRegex (backport cosmos#13861) (cosmos#13864)

* fix: Allow underscores in EventRegex (cosmos#13861)

(cherry picked from commit 14c582f)

# Conflicts:
#	CHANGELOG.md
#	tests/e2e/tx/service_test.go

* updates

* updates

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix(group): add group members weight checks (backport cosmos#13869) (cosmos#13880)

* fix(group): add group members weight checks (cosmos#13869)

(cherry picked from commit 3423442)

# Conflicts:
#	CHANGELOG.md
#	api/cosmos/tx/v1beta1/service.pulsar.go
#	types/tx/service.pb.go
#	x/group/keeper/keeper.go

* fix conflicts

* updates

* updates

Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix(group)!: Fix group min execution period (backport cosmos#13876) (cosmos#13885)

* fix(group)!: Fix group min execution period (cosmos#13876)

* fix: don't check MinExecutionPeriod in `Allow`

* Check MinExecutionPeriod on doExecuteMsgs

* Fix TestExec

* Fix TestExec

* test exec pruned

* Fix submitproposal

* Add changelog

* typo

* revert some changes

* add minExecutionPeriod

* Add docs and specs

(cherry picked from commit 7661f62)

# Conflicts:
#	CHANGELOG.md
#	x/group/README.md
#	x/group/keeper/keeper_test.go

* fix docs

* fix other conflicts

* fix test

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* feat(bank): Add helper for v0.46 denom migration (cosmos#13891)

* feat(bank): Add helper for v0.46 denom migration

* CL

* Clearer name

* Update x/bank/migrations/v046/store.go

Co-authored-by: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com>

* rename

Co-authored-by: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com>

* chore: impove 0.46.5 release notes (cosmos#13898)

* chore: impove 0.46.5 release notes

* update changelog

* refactor: State Streaming Docs + Explicit Config Support (backport cosmos#13894) (cosmos#13909)

* chore: remove typo (cosmos#13914) (cosmos#13917)

(cherry picked from commit 34dcca7)

Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix: correctly propagate msg errors in gov (backport cosmos#13918) (cosmos#13928)

* fix: correctly propagate msg errors in gov (cosmos#13918)

* fix: correctly propagate msg errors in gov

* chore: update changelog

* fix: correctly check proposal status in tests

* chore: delete unused var

(cherry picked from commit 5581f7f)

# Conflicts:
#	CHANGELOG.md
#	x/gov/abci_test.go

* fix conflicts

* updates

Co-authored-by: John Letey <j@letey.de>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* feat(bank): enable 0.46.5 bank migration fix through migrator keeper (cosmos#13929)

* chore: bump tendermint to 0.34.24 (cosmos#13972)

* chore: add group and gov/v1 in swagger (backport cosmos#13984) (cosmos#13996)

* chore: add group and gov/v1 in swagger (cosmos#13984)

Co-authored-by: Marko <marbar3778@yahoo.com>
(cherry picked from commit cfa224c)

# Conflicts:
#	client/docs/config.json
#	client/docs/swagger-ui/swagger.yaml

* updates

Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix(baseapp): fix snapshot interval bug (backport cosmos#14049) (cosmos#14053)

* refactor: use viper unmarshal in `config.GetConfig` function (backport cosmos#13651) (cosmos#14082)

* fix(group)!: Don't re-tally proposals after VP end (backport cosmos#14071) (cosmos#14091)

* fix(group)!: Don't re-tally proposals after VP end (cosmos#14071)

(cherry picked from commit 4ebe3aa)

# Conflicts:
#	CHANGELOG.md

* fix changelog and test

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix: do not shadow clientCtx in start.go (backport cosmos#14086) (cosmos#14101)

* fix: do not shadow clientCtx in start.go (cosmos#14086)

(cherry picked from commit f96072d)

# Conflicts:
#	server/start.go

* updates

Co-authored-by: Julien Robert <julien@rbrt.fr>

* chore: Test for Server Config Read cosmos#14125 (cosmos#14127)

(cherry picked from commit 9f46665)

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* fix: remove duplicate ante events (backport cosmos#13983) (cosmos#14142)

* fix: remove duplicate ante events (cosmos#13983)

## Description

After enabling the post-handler on our chain, we realised something odd with our transaction events. The ordering was `[ANTE, MSGS, ANTE, POST]`. After doing some digging, we realised that the context used inside the post-handler still contains the events from the ante-handler.

This should be backported to v0.46.x and v0.47.x 😄
Happy to make it compatible with cosmos#13940 when that gets merged!

cc @mbreithecker

---

### 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/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)

(cherry picked from commit 25449b5)

# Conflicts:
#	CHANGELOG.md

* fix changelog

Co-authored-by: John Letey <john@kyve.network>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* feat: support alternative query multistore (backport cosmos#13529) (cosmos#14169)

* feat: support alternative query multistore (cosmos#13529)

* support customize query multistore

* Update CHANGELOG.md

* fix test

* Update baseapp/abci.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update baseapp/baseapp.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update baseapp/options.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
(cherry picked from commit 15accd7)

# Conflicts:
#	CHANGELOG.md
#	baseapp/baseapp.go
#	baseapp/options.go

* fix conflicts

Co-authored-by: yihuang <huang@crypto.com>

* fix: state listener observe writes at wrong time (backport cosmos#13516) (cosmos#14138)

* fix: state listener observe writes at wrong time (cosmos#13516)

* fix: state listener observe writes at wrong time

Closes: cosmos#13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

* synchronous abci call, and format doc

* fix comment

* update file streamer readme and fix typos

* typo

* fix: state listener observe writes at wrong time

Closes: cosmos#13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

synchronous abci call, and format doc

fix comment

update file streamer readme and fix typos

typo

* improve UX of file streamer, make it immediately usable after enabled

- set default value to write_dir.
- make write_dir based on home directory by default.
- auto-create the directory if not exists.

* get homePage from opts

Co-authored-by: Marko <marbar3778@yahoo.com>
(cherry picked from commit 1f91ee2)

# Conflicts:
#	CHANGELOG.md
#	api/cosmos/base/store/v1beta1/listening.pulsar.go
#	baseapp/streaming.go
#	docs/architecture/adr-038-state-listening.md
#	server/config/toml.go
#	simapp/app_v2.go
#	store/cachemulti/store.go
#	store/iavl/store.go
#	store/mem/store.go
#	store/streaming/constructor.go
#	store/streaming/file/service.go
#	store/streaming/file/service_test.go
#	store/types/listening.pb.go
#	store/types/store.go

* `make proto-gen`, update changelog, delete uncessary files

* fix conflicts

* fix conflicts

* revert api breaking change

* fix build

* fix unit test

Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: Marko <marbar3778@yahoo.com>

* refactor: provide a helper for baseapp options (backport cosmos#14175) (cosmos#14178)

* refactor: provide a helper for baseapp options (cosmos#14175)

* provide a helper for baseapp options

* rename

* changelog entry

* fix spelling

(cherry picked from commit 1b6192f)

# Conflicts:
#	CHANGELOG.md
#	server/mock/app_test.go
#	simapp/simd/cmd/root.go

* conflicts

* lint

Co-authored-by: Marko <marbar3778@yahoo.com>

* feat: add --grpc client option (backport cosmos#14051) (cosmos#14192)

Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* refactor: cleanup store/streaming/constructor.go (backport cosmos#14044) (cosmos#14236)

* chore: audit store/streaming/file/service.go (backport cosmos#14234) (cosmos#14241)

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix: fix grpc flag conflict (backport cosmos#14244) (cosmos#14248)

* chore: prepare 0.46.7 release (cosmos#14103)

* fix(gov): Fix v3 votes migrations (backport cosmos#14214) (cosmos#14277)

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* Add changelog entry for bringing in v0.46.7 changes.

* Fix the changelog. The merge duplicated several SDK sections.

* Fix the TestFileStreamingService.

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Sai Kumar <17549398+gsk967@users.noreply.github.com>
Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
Co-authored-by: William Chong <6198816+williamchong@users.noreply.github.com>
Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com>
Co-authored-by: John Letey <j@letey.de>
Co-authored-by: John Letey <john@kyve.network>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
SpicyLemon added a commit to provenance-io/cosmos-sdk that referenced this pull request Dec 14, 2022
* docs: add ApplicationQueryService release notes (cosmos#13587)

* docs: add ApplicationQueryService release notes

* updates

Co-authored-by: Julien Robert <julien@rbrt.fr>

* feat(cli): add module-account cli cmd and grpc get api (backport cosmos#13612) (cosmos#13616)

* feat(cli): add module-account cli cmd and grpc get api (cosmos#13612)

(cherry picked from commit ddf5cf0)

* fix conflicts

* updates

* updates

Co-authored-by: Sai Kumar <17549398+gsk967@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix(x/auth): allow multiple = signs in `GetTxsEvent` (backport cosmos#12474) (cosmos#13598)

* fix(x/auth): allow multiple = signs in `GetTxsEvent` (cosmos#12474)

(cherry picked from commit 18da0e9)

* fix changelog

* changelog

* fix: flakey test

Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix: app-hash mismatch if upgrade migration commit is interrupted (backport cosmos#13530) (cosmos#13627)

* feat(cli): Add iavl-disable-fastnode cmd flag with proper description (cosmos#13656) (cosmos#13659)

(cherry picked from commit c833190)

Co-authored-by: William Chong <6198816+williamchong@users.noreply.github.com>

* build(deps): Bump github.com/cosmos/iavl from 0.19.3 to 0.19.4 (cosmos#13680)

* feat: emit cached context events (backport cosmos#13063) (cosmos#13702)

* chore: prepare 0.46.4 changelog (cosmos#13716)

* chore: prepare 0.46.4 changelog

* wording

* updates

* updates

* ci: notify for 0.46.x releases (cosmos#13719)

* feat: notify for 0.46.x releases

* updates changelog

* docs: fix algolia on 0.46 (cosmos#13730)

* ci: modifying docs in 0.46 should not redeploy docs (cosmos#13732)

* ci: modifying docs in 0.46 should not redeploy docs

* updates

* fix: propagate msg events correctly in x/gov (backport cosmos#13728) (cosmos#13748)

* refactor: add error log when iavl set failed (backport cosmos#13803) (cosmos#13804)

* refactor: add error log when iavl set failed (cosmos#13803)

* add error log when iavl set failed

Ref: cosmos#12012

* Update CHANGELOG.md

* play safe

(cherry picked from commit 22f3261)

* fix conflicts

Co-authored-by: yihuang <huang@crypto.com>

* chore: bump tendermint to `0.34.23` (cosmos#13814)

* fix: propagate events in x/group through sdk.Results (backport cosmos#13808) (cosmos#13809)

* docs: update algolia index (cosmos#13823)

* fix: bank store migration (backport cosmos#13821) (cosmos#13829)

* fix: bank store migration (cosmos#13821)

(cherry picked from commit d314a12)

* updates

Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* feat(types): set custom GasConfig on Context for GasKVStore (backport cosmos#13826) (cosmos#13833)

* feat(types): set custom GasConfig on Context for GasKVStore (cosmos#13826)

(cherry picked from commit f001b46)

* fix conflicts

* updates

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* chore: prepare 0.46.5 release (cosmos#13816)

* fix: Allow underscores in EventRegex (backport cosmos#13861) (cosmos#13864)

* fix: Allow underscores in EventRegex (cosmos#13861)

(cherry picked from commit 14c582f)

* updates

* updates

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix(group): add group members weight checks (backport cosmos#13869) (cosmos#13880)

* fix(group): add group members weight checks (cosmos#13869)

(cherry picked from commit 3423442)

* fix conflicts

* updates

* updates

Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix(group)!: Fix group min execution period (backport cosmos#13876) (cosmos#13885)

* fix(group)!: Fix group min execution period (cosmos#13876)

* fix: don't check MinExecutionPeriod in `Allow`

* Check MinExecutionPeriod on doExecuteMsgs

* Fix TestExec

* Fix TestExec

* test exec pruned

* Fix submitproposal

* Add changelog

* typo

* revert some changes

* add minExecutionPeriod

* Add docs and specs

(cherry picked from commit 7661f62)

* fix docs

* fix other conflicts

* fix test

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* feat(bank): Add helper for v0.46 denom migration (cosmos#13891)

* feat(bank): Add helper for v0.46 denom migration

* CL

* Clearer name

* Update x/bank/migrations/v046/store.go

Co-authored-by: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com>

* rename

Co-authored-by: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com>

* chore: impove 0.46.5 release notes (cosmos#13898)

* chore: impove 0.46.5 release notes

* update changelog

* refactor: State Streaming Docs + Explicit Config Support (backport cosmos#13894) (cosmos#13909)

* chore: remove typo (cosmos#13914) (cosmos#13917)

(cherry picked from commit 34dcca7)

Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix: correctly propagate msg errors in gov (backport cosmos#13918) (cosmos#13928)

* fix: correctly propagate msg errors in gov (cosmos#13918)

* fix: correctly propagate msg errors in gov

* chore: update changelog

* fix: correctly check proposal status in tests

* chore: delete unused var

(cherry picked from commit 5581f7f)

* fix conflicts

* updates

Co-authored-by: John Letey <j@letey.de>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* feat(bank): enable 0.46.5 bank migration fix through migrator keeper (cosmos#13929)

* chore: bump tendermint to 0.34.24 (cosmos#13972)

* chore: add group and gov/v1 in swagger (backport cosmos#13984) (cosmos#13996)

* chore: add group and gov/v1 in swagger (cosmos#13984)

Co-authored-by: Marko <marbar3778@yahoo.com>
(cherry picked from commit cfa224c)

* updates

Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix(baseapp): fix snapshot interval bug (backport cosmos#14049) (cosmos#14053)

* refactor: use viper unmarshal in `config.GetConfig` function (backport cosmos#13651) (cosmos#14082)

* fix(group)!: Don't re-tally proposals after VP end (backport cosmos#14071) (cosmos#14091)

* fix(group)!: Don't re-tally proposals after VP end (cosmos#14071)

(cherry picked from commit 4ebe3aa)

* fix changelog and test

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix: do not shadow clientCtx in start.go (backport cosmos#14086) (cosmos#14101)

* fix: do not shadow clientCtx in start.go (cosmos#14086)

(cherry picked from commit f96072d)

* updates

Co-authored-by: Julien Robert <julien@rbrt.fr>

* chore: Test for Server Config Read cosmos#14125 (cosmos#14127)

(cherry picked from commit 9f46665)

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* fix: remove duplicate ante events (backport cosmos#13983) (cosmos#14142)

* fix: remove duplicate ante events (cosmos#13983)

After enabling the post-handler on our chain, we realised something odd with our transaction events. The ordering was `[ANTE, MSGS, ANTE, POST]`. After doing some digging, we realised that the context used inside the post-handler still contains the events from the ante-handler.

This should be backported to v0.46.x and v0.47.x 😄
Happy to make it compatible with cosmos#13940 when that gets merged!

cc @mbreithecker

---

*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/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

*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)

(cherry picked from commit 25449b5)

* fix changelog

Co-authored-by: John Letey <john@kyve.network>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* feat: support alternative query multistore (backport cosmos#13529) (cosmos#14169)

* feat: support alternative query multistore (cosmos#13529)

* support customize query multistore

* Update CHANGELOG.md

* fix test

* Update baseapp/abci.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update baseapp/baseapp.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update baseapp/options.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
(cherry picked from commit 15accd7)

* fix conflicts

Co-authored-by: yihuang <huang@crypto.com>

* fix: state listener observe writes at wrong time (backport cosmos#13516) (cosmos#14138)

* fix: state listener observe writes at wrong time (cosmos#13516)

* fix: state listener observe writes at wrong time

Closes: cosmos#13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

* synchronous abci call, and format doc

* fix comment

* update file streamer readme and fix typos

* typo

* fix: state listener observe writes at wrong time

Closes: cosmos#13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

synchronous abci call, and format doc

fix comment

update file streamer readme and fix typos

typo

* improve UX of file streamer, make it immediately usable after enabled

- set default value to write_dir.
- make write_dir based on home directory by default.
- auto-create the directory if not exists.

* get homePage from opts

Co-authored-by: Marko <marbar3778@yahoo.com>
(cherry picked from commit 1f91ee2)

* `make proto-gen`, update changelog, delete uncessary files

* fix conflicts

* fix conflicts

* revert api breaking change

* fix build

* fix unit test

Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: Marko <marbar3778@yahoo.com>

* refactor: provide a helper for baseapp options (backport cosmos#14175) (cosmos#14178)

* refactor: provide a helper for baseapp options (cosmos#14175)

* provide a helper for baseapp options

* rename

* changelog entry

* fix spelling

(cherry picked from commit 1b6192f)

* conflicts

* lint

Co-authored-by: Marko <marbar3778@yahoo.com>

* feat: add --grpc client option (backport cosmos#14051) (cosmos#14192)

Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* refactor: cleanup store/streaming/constructor.go (backport cosmos#14044) (cosmos#14236)

* chore: audit store/streaming/file/service.go (backport cosmos#14234) (cosmos#14241)

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix: fix grpc flag conflict (backport cosmos#14244) (cosmos#14248)

* chore: prepare 0.46.7 release (cosmos#14103)

* fix(gov): Fix v3 votes migrations (backport cosmos#14214) (cosmos#14277)

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* Add changelog entry for bringing in v0.46.7 changes.

* Fix the changelog. The merge duplicated several SDK sections.

* Fix the TestFileStreamingService.

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Sai Kumar <17549398+gsk967@users.noreply.github.com>
Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
Co-authored-by: William Chong <6198816+williamchong@users.noreply.github.com>
Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com>
Co-authored-by: John Letey <j@letey.de>
Co-authored-by: John Letey <john@kyve.network>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
cmwaters added a commit to celestiaorg/cosmos-sdk that referenced this pull request Jan 11, 2023
* chore: bump tendermint to 0.34.24 (cosmos#13972)

* chore: add group and gov/v1 in swagger (backport cosmos#13984) (cosmos#13996)

* chore: add group and gov/v1 in swagger (cosmos#13984)

Co-authored-by: Marko <marbar3778@yahoo.com>
(cherry picked from commit cfa224c)

# Conflicts:
#	client/docs/config.json
#	client/docs/swagger-ui/swagger.yaml

* updates

Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix(baseapp): fix snapshot interval bug (backport cosmos#14049) (cosmos#14053)

* refactor: use viper unmarshal in `config.GetConfig` function (backport cosmos#13651) (cosmos#14082)

* fix(group)!: Don't re-tally proposals after VP end (backport cosmos#14071) (cosmos#14091)

* fix(group)!: Don't re-tally proposals after VP end (cosmos#14071)

(cherry picked from commit 4ebe3aa)

# Conflicts:
#	CHANGELOG.md

* fix changelog and test

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix: do not shadow clientCtx in start.go (backport cosmos#14086) (cosmos#14101)

* fix: do not shadow clientCtx in start.go (cosmos#14086)

(cherry picked from commit f96072d)

# Conflicts:
#	server/start.go

* updates

Co-authored-by: Julien Robert <julien@rbrt.fr>

* chore: Test for Server Config Read cosmos#14125 (cosmos#14127)

(cherry picked from commit 9f46665)

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* fix: remove duplicate ante events (backport cosmos#13983) (cosmos#14142)

* fix: remove duplicate ante events (cosmos#13983)

## Description

After enabling the post-handler on our chain, we realised something odd with our transaction events. The ordering was `[ANTE, MSGS, ANTE, POST]`. After doing some digging, we realised that the context used inside the post-handler still contains the events from the ante-handler.

This should be backported to v0.46.x and v0.47.x 😄
Happy to make it compatible with cosmos#13940 when that gets merged!

cc @mbreithecker

---

### 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/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)

(cherry picked from commit 25449b5)

# Conflicts:
#	CHANGELOG.md

* fix changelog

Co-authored-by: John Letey <john@kyve.network>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* feat: support alternative query multistore (backport cosmos#13529) (cosmos#14169)

* feat: support alternative query multistore (cosmos#13529)

* support customize query multistore

* Update CHANGELOG.md

* fix test

* Update baseapp/abci.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update baseapp/baseapp.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update baseapp/options.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
(cherry picked from commit 15accd7)

# Conflicts:
#	CHANGELOG.md
#	baseapp/baseapp.go
#	baseapp/options.go

* fix conflicts

Co-authored-by: yihuang <huang@crypto.com>

* fix: state listener observe writes at wrong time (backport cosmos#13516) (cosmos#14138)

* fix: state listener observe writes at wrong time (cosmos#13516)

* fix: state listener observe writes at wrong time

Closes: cosmos#13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

* synchronous abci call, and format doc

* fix comment

* update file streamer readme and fix typos

* typo

* fix: state listener observe writes at wrong time

Closes: cosmos#13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

synchronous abci call, and format doc

fix comment

update file streamer readme and fix typos

typo

* improve UX of file streamer, make it immediately usable after enabled

- set default value to write_dir.
- make write_dir based on home directory by default.
- auto-create the directory if not exists.

* get homePage from opts

Co-authored-by: Marko <marbar3778@yahoo.com>
(cherry picked from commit 1f91ee2)

# Conflicts:
#	CHANGELOG.md
#	api/cosmos/base/store/v1beta1/listening.pulsar.go
#	baseapp/streaming.go
#	docs/architecture/adr-038-state-listening.md
#	server/config/toml.go
#	simapp/app_v2.go
#	store/cachemulti/store.go
#	store/iavl/store.go
#	store/mem/store.go
#	store/streaming/constructor.go
#	store/streaming/file/service.go
#	store/streaming/file/service_test.go
#	store/types/listening.pb.go
#	store/types/store.go

* `make proto-gen`, update changelog, delete uncessary files

* fix conflicts

* fix conflicts

* revert api breaking change

* fix build

* fix unit test

Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: Marko <marbar3778@yahoo.com>

* refactor: provide a helper for baseapp options (backport cosmos#14175) (cosmos#14178)

* refactor: provide a helper for baseapp options (cosmos#14175)

* provide a helper for baseapp options

* rename

* changelog entry

* fix spelling

(cherry picked from commit 1b6192f)

# Conflicts:
#	CHANGELOG.md
#	server/mock/app_test.go
#	simapp/simd/cmd/root.go

* conflicts

* lint

Co-authored-by: Marko <marbar3778@yahoo.com>

* feat: add --grpc client option (backport cosmos#14051) (cosmos#14192)

Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* refactor: cleanup store/streaming/constructor.go (backport cosmos#14044) (cosmos#14236)

* chore: audit store/streaming/file/service.go (backport cosmos#14234) (cosmos#14241)

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix: fix grpc flag conflict (backport cosmos#14244) (cosmos#14248)

* chore: prepare 0.46.7 release (cosmos#14103)

* fix(gov): Fix v3 votes migrations (backport cosmos#14214) (cosmos#14277)

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: John Letey <john@kyve.network>
Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
SpicyLemon added a commit to provenance-io/cosmos-sdk that referenced this pull request Feb 1, 2023
* Revert "Merge pull request #270 from provenance-io/llama/add-fee-denom-change-proposal"

This reverts commit 7462a84, reversing
changes made to 23ba5dc.

* Bring in v0.46.4 changes. (#362)

* docs: add ApplicationQueryService release notes (cosmos#13587)

* docs: add ApplicationQueryService release notes

* updates

Co-authored-by: Julien Robert <julien@rbrt.fr>

* feat(cli): add module-account cli cmd and grpc get api (backport cosmos#13612) (cosmos#13616)

* feat(cli): add module-account cli cmd and grpc get api (cosmos#13612)

(cherry picked from commit ddf5cf0)

# Conflicts:
#	CHANGELOG.md
#	api/cosmos/auth/v1beta1/query.pulsar.go
#	api/cosmos/auth/v1beta1/query_grpc.pb.go
#	x/auth/client/testutil/suite.go
#	x/auth/types/query.pb.go

* fix conflicts

* updates

* updates

Co-authored-by: Sai Kumar <17549398+gsk967@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix(x/auth): allow multiple = signs in `GetTxsEvent` (backport cosmos#12474) (cosmos#13598)

* fix(x/auth): allow multiple = signs in `GetTxsEvent` (cosmos#12474)

(cherry picked from commit 18da0e9)

# Conflicts:
#	CHANGELOG.md

* fix changelog

* changelog

* fix: flakey test

Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix: app-hash mismatch if upgrade migration commit is interrupted (backport cosmos#13530) (cosmos#13627)

* feat(cli): Add iavl-disable-fastnode cmd flag with proper description (cosmos#13656) (cosmos#13659)

(cherry picked from commit c833190)

Co-authored-by: William Chong <6198816+williamchong@users.noreply.github.com>

* build(deps): Bump github.com/cosmos/iavl from 0.19.3 to 0.19.4 (cosmos#13680)

* feat: emit cached context events (backport cosmos#13063) (cosmos#13702)

* chore: prepare 0.46.4 changelog (cosmos#13716)

* chore: prepare 0.46.4 changelog

* wording

* updates

* updates

* Change the default for the iavl-disable-fastnode flag to true (from false) to match the actual config default.

* Add changelog entry for the iavl fastnode flag default.

* Update swagger docs.

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Sai Kumar <17549398+gsk967@users.noreply.github.com>
Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
Co-authored-by: William Chong <6198816+williamchong@users.noreply.github.com>

* Mark v0.46.4-pio-1 in the changelog and release notes.

* Bring in v0.46.5 changes. (#365)

* Bring in changes from Cosmos-SDK v0.46.6 (#367)

* docs: add ApplicationQueryService release notes (cosmos#13587)

* docs: add ApplicationQueryService release notes

* updates

Co-authored-by: Julien Robert <julien@rbrt.fr>

* feat(cli): add module-account cli cmd and grpc get api (backport cosmos#13612) (cosmos#13616)

* feat(cli): add module-account cli cmd and grpc get api (cosmos#13612)

(cherry picked from commit ddf5cf0)

# Conflicts:
#	CHANGELOG.md
#	api/cosmos/auth/v1beta1/query.pulsar.go
#	api/cosmos/auth/v1beta1/query_grpc.pb.go
#	x/auth/client/testutil/suite.go
#	x/auth/types/query.pb.go

* fix conflicts

* updates

* updates

Co-authored-by: Sai Kumar <17549398+gsk967@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix(x/auth): allow multiple = signs in `GetTxsEvent` (backport cosmos#12474) (cosmos#13598)

* fix(x/auth): allow multiple = signs in `GetTxsEvent` (cosmos#12474)

(cherry picked from commit 18da0e9)

# Conflicts:
#	CHANGELOG.md

* fix changelog

* changelog

* fix: flakey test

Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix: app-hash mismatch if upgrade migration commit is interrupted (backport cosmos#13530) (cosmos#13627)

* feat(cli): Add iavl-disable-fastnode cmd flag with proper description (cosmos#13656) (cosmos#13659)

(cherry picked from commit c833190)

Co-authored-by: William Chong <6198816+williamchong@users.noreply.github.com>

* build(deps): Bump github.com/cosmos/iavl from 0.19.3 to 0.19.4 (cosmos#13680)

* feat: emit cached context events (backport cosmos#13063) (cosmos#13702)

* chore: prepare 0.46.4 changelog (cosmos#13716)

* chore: prepare 0.46.4 changelog

* wording

* updates

* updates

* ci: notify for 0.46.x releases (cosmos#13719)

* feat: notify for 0.46.x releases

* updates changelog

* docs: fix algolia on 0.46 (cosmos#13730)

* ci: modifying docs in 0.46 should not redeploy docs (cosmos#13732)

* ci: modifying docs in 0.46 should not redeploy docs

* updates

* fix: propagate msg events correctly in x/gov (backport cosmos#13728) (cosmos#13748)

* refactor: add error log when iavl set failed (backport cosmos#13803) (cosmos#13804)

* refactor: add error log when iavl set failed (cosmos#13803)

* add error log when iavl set failed

Ref: cosmos#12012

* Update CHANGELOG.md

* play safe

(cherry picked from commit 22f3261)

# Conflicts:
#	CHANGELOG.md

* fix conflicts

Co-authored-by: yihuang <huang@crypto.com>

* chore: bump tendermint to `0.34.23` (cosmos#13814)

* fix: propagate events in x/group through sdk.Results (backport cosmos#13808) (cosmos#13809)

* docs: update algolia index (cosmos#13823)

* fix: bank store migration (backport cosmos#13821) (cosmos#13829)

* fix: bank store migration (cosmos#13821)

(cherry picked from commit d314a12)

# Conflicts:
#	x/bank/migrations/v3/store.go
#	x/bank/migrations/v3/store_test.go

* updates

Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* feat(types): set custom GasConfig on Context for GasKVStore (backport cosmos#13826) (cosmos#13833)

* feat(types): set custom GasConfig on Context for GasKVStore (cosmos#13826)

(cherry picked from commit f001b46)

# Conflicts:
#	CHANGELOG.md
#	types/context.go
#	types/context_test.go

* fix conflicts

* updates

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* chore: prepare 0.46.5 release (cosmos#13816)

* fix: Allow underscores in EventRegex (backport cosmos#13861) (cosmos#13864)

* fix: Allow underscores in EventRegex (cosmos#13861)

(cherry picked from commit 14c582f)

# Conflicts:
#	CHANGELOG.md
#	tests/e2e/tx/service_test.go

* updates

* updates

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix(group): add group members weight checks (backport cosmos#13869) (cosmos#13880)

* fix(group): add group members weight checks (cosmos#13869)

(cherry picked from commit 3423442)

# Conflicts:
#	CHANGELOG.md
#	api/cosmos/tx/v1beta1/service.pulsar.go
#	types/tx/service.pb.go
#	x/group/keeper/keeper.go

* fix conflicts

* updates

* updates

Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix(group)!: Fix group min execution period (backport cosmos#13876) (cosmos#13885)

* fix(group)!: Fix group min execution period (cosmos#13876)

* fix: don't check MinExecutionPeriod in `Allow`

* Check MinExecutionPeriod on doExecuteMsgs

* Fix TestExec

* Fix TestExec

* test exec pruned

* Fix submitproposal

* Add changelog

* typo

* revert some changes

* add minExecutionPeriod

* Add docs and specs

(cherry picked from commit 7661f62)

# Conflicts:
#	CHANGELOG.md
#	x/group/README.md
#	x/group/keeper/keeper_test.go

* fix docs

* fix other conflicts

* fix test

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* feat(bank): Add helper for v0.46 denom migration (cosmos#13891)

* feat(bank): Add helper for v0.46 denom migration

* CL

* Clearer name

* Update x/bank/migrations/v046/store.go

Co-authored-by: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com>

* rename

Co-authored-by: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com>

* chore: impove 0.46.5 release notes (cosmos#13898)

* chore: impove 0.46.5 release notes

* update changelog

* refactor: State Streaming Docs + Explicit Config Support (backport cosmos#13894) (cosmos#13909)

* chore: remove typo (cosmos#13914) (cosmos#13917)

(cherry picked from commit 34dcca7)

Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix: correctly propagate msg errors in gov (backport cosmos#13918) (cosmos#13928)

* fix: correctly propagate msg errors in gov (cosmos#13918)

* fix: correctly propagate msg errors in gov

* chore: update changelog

* fix: correctly check proposal status in tests

* chore: delete unused var

(cherry picked from commit 5581f7f)

# Conflicts:
#	CHANGELOG.md
#	x/gov/abci_test.go

* fix conflicts

* updates

Co-authored-by: John Letey <j@letey.de>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* feat(bank): enable 0.46.5 bank migration fix through migrator keeper (cosmos#13929)

* Update changelog for version bump.

* Bring in Cosmos-SDK PR 13651 that overhauls/cleans up the GetConfig function to not require manual addition of stuff in order for it to be read.

* Fix the pruning command to use the existing viper instance (that has everything loaded into it) instead of creating a new one.

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Sai Kumar <17549398+gsk967@users.noreply.github.com>
Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
Co-authored-by: William Chong <6198816+williamchong@users.noreply.github.com>
Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com>
Co-authored-by: John Letey <j@letey.de>

* Backport to v0.46.x: feat: Add x/authz SendAuthorization AllowList cosmos#12648 (#368)

* feat: Add x/authz SendAuthorization AllowList (cosmos#12648)

Closes: cosmos#12609

---

*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/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

*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)

* Fix a unit test that for whatever reason didn't get updated in the merge.

Co-authored-by: likhita-809 <78951027+likhita-809@users.noreply.github.com>

* Mark v0.46.6-pio-1 in the changelog and release notes.

* use hashicorp go-plugin

* python example

* implement streaming to baseapp

* abci listener wiring

* update test files

* update test files

* kafka plugin python example

* update package name

* update proto and services

* tx and kvpair indexing

* tidy up

* add readme

* update readme

* add testing section

* listeners need to be async

* remove goroutine on blocking call

* terminate with os.Exit on stopNodeOnErr

* dumb pipe bridge

* fix: listen state writes on rootmulti store only

and refactoring file streamer to output single file for each block

update spec

sort storeKey once at first

move MemoryListener store package

* introduce memory listener and OnCommit listener

* remove WriteListener and use MemoryListener

* internalize listener init to cache layer

* determenistic PopStateCache, grpc service

* add Go file plugin

* multiple service support

* add \n

* add proto dir

* append to file

* support in-process listeners

* use setStreamingService

* enable plugins as managed clients

* fix after cherry pick

* add default to toml config

* format toml config

* update template

* update template

* update documentation

* fix test

* write request to single topics

* fix lint errors

* remove python examples, CI cannot verify

* fix gosec findings

* move plugin proto with sdk proto files, regen plugin code

* update readme

* update deps

remove unused dep

* Bring in v0.46.7 updates. (#402)

* docs: add ApplicationQueryService release notes (cosmos#13587)

* docs: add ApplicationQueryService release notes

* updates

Co-authored-by: Julien Robert <julien@rbrt.fr>

* feat(cli): add module-account cli cmd and grpc get api (backport cosmos#13612) (cosmos#13616)

* feat(cli): add module-account cli cmd and grpc get api (cosmos#13612)

(cherry picked from commit ddf5cf0)

# Conflicts:
#	CHANGELOG.md
#	api/cosmos/auth/v1beta1/query.pulsar.go
#	api/cosmos/auth/v1beta1/query_grpc.pb.go
#	x/auth/client/testutil/suite.go
#	x/auth/types/query.pb.go

* fix conflicts

* updates

* updates

Co-authored-by: Sai Kumar <17549398+gsk967@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix(x/auth): allow multiple = signs in `GetTxsEvent` (backport cosmos#12474) (cosmos#13598)

* fix(x/auth): allow multiple = signs in `GetTxsEvent` (cosmos#12474)

(cherry picked from commit 18da0e9)

# Conflicts:
#	CHANGELOG.md

* fix changelog

* changelog

* fix: flakey test

Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix: app-hash mismatch if upgrade migration commit is interrupted (backport cosmos#13530) (cosmos#13627)

* feat(cli): Add iavl-disable-fastnode cmd flag with proper description (cosmos#13656) (cosmos#13659)

(cherry picked from commit c833190)

Co-authored-by: William Chong <6198816+williamchong@users.noreply.github.com>

* build(deps): Bump github.com/cosmos/iavl from 0.19.3 to 0.19.4 (cosmos#13680)

* feat: emit cached context events (backport cosmos#13063) (cosmos#13702)

* chore: prepare 0.46.4 changelog (cosmos#13716)

* chore: prepare 0.46.4 changelog

* wording

* updates

* updates

* ci: notify for 0.46.x releases (cosmos#13719)

* feat: notify for 0.46.x releases

* updates changelog

* docs: fix algolia on 0.46 (cosmos#13730)

* ci: modifying docs in 0.46 should not redeploy docs (cosmos#13732)

* ci: modifying docs in 0.46 should not redeploy docs

* updates

* fix: propagate msg events correctly in x/gov (backport cosmos#13728) (cosmos#13748)

* refactor: add error log when iavl set failed (backport cosmos#13803) (cosmos#13804)

* refactor: add error log when iavl set failed (cosmos#13803)

* add error log when iavl set failed

Ref: cosmos#12012

* Update CHANGELOG.md

* play safe

(cherry picked from commit 22f3261)

# Conflicts:
#	CHANGELOG.md

* fix conflicts

Co-authored-by: yihuang <huang@crypto.com>

* chore: bump tendermint to `0.34.23` (cosmos#13814)

* fix: propagate events in x/group through sdk.Results (backport cosmos#13808) (cosmos#13809)

* docs: update algolia index (cosmos#13823)

* fix: bank store migration (backport cosmos#13821) (cosmos#13829)

* fix: bank store migration (cosmos#13821)

(cherry picked from commit d314a12)

# Conflicts:
#	x/bank/migrations/v3/store.go
#	x/bank/migrations/v3/store_test.go

* updates

Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* feat(types): set custom GasConfig on Context for GasKVStore (backport cosmos#13826) (cosmos#13833)

* feat(types): set custom GasConfig on Context for GasKVStore (cosmos#13826)

(cherry picked from commit f001b46)

# Conflicts:
#	CHANGELOG.md
#	types/context.go
#	types/context_test.go

* fix conflicts

* updates

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* chore: prepare 0.46.5 release (cosmos#13816)

* fix: Allow underscores in EventRegex (backport cosmos#13861) (cosmos#13864)

* fix: Allow underscores in EventRegex (cosmos#13861)

(cherry picked from commit 14c582f)

# Conflicts:
#	CHANGELOG.md
#	tests/e2e/tx/service_test.go

* updates

* updates

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix(group): add group members weight checks (backport cosmos#13869) (cosmos#13880)

* fix(group): add group members weight checks (cosmos#13869)

(cherry picked from commit 3423442)

# Conflicts:
#	CHANGELOG.md
#	api/cosmos/tx/v1beta1/service.pulsar.go
#	types/tx/service.pb.go
#	x/group/keeper/keeper.go

* fix conflicts

* updates

* updates

Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix(group)!: Fix group min execution period (backport cosmos#13876) (cosmos#13885)

* fix(group)!: Fix group min execution period (cosmos#13876)

* fix: don't check MinExecutionPeriod in `Allow`

* Check MinExecutionPeriod on doExecuteMsgs

* Fix TestExec

* Fix TestExec

* test exec pruned

* Fix submitproposal

* Add changelog

* typo

* revert some changes

* add minExecutionPeriod

* Add docs and specs

(cherry picked from commit 7661f62)

# Conflicts:
#	CHANGELOG.md
#	x/group/README.md
#	x/group/keeper/keeper_test.go

* fix docs

* fix other conflicts

* fix test

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* feat(bank): Add helper for v0.46 denom migration (cosmos#13891)

* feat(bank): Add helper for v0.46 denom migration

* CL

* Clearer name

* Update x/bank/migrations/v046/store.go

Co-authored-by: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com>

* rename

Co-authored-by: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com>

* chore: impove 0.46.5 release notes (cosmos#13898)

* chore: impove 0.46.5 release notes

* update changelog

* refactor: State Streaming Docs + Explicit Config Support (backport cosmos#13894) (cosmos#13909)

* chore: remove typo (cosmos#13914) (cosmos#13917)

(cherry picked from commit 34dcca7)

Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix: correctly propagate msg errors in gov (backport cosmos#13918) (cosmos#13928)

* fix: correctly propagate msg errors in gov (cosmos#13918)

* fix: correctly propagate msg errors in gov

* chore: update changelog

* fix: correctly check proposal status in tests

* chore: delete unused var

(cherry picked from commit 5581f7f)

# Conflicts:
#	CHANGELOG.md
#	x/gov/abci_test.go

* fix conflicts

* updates

Co-authored-by: John Letey <j@letey.de>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* feat(bank): enable 0.46.5 bank migration fix through migrator keeper (cosmos#13929)

* chore: bump tendermint to 0.34.24 (cosmos#13972)

* chore: add group and gov/v1 in swagger (backport cosmos#13984) (cosmos#13996)

* chore: add group and gov/v1 in swagger (cosmos#13984)

Co-authored-by: Marko <marbar3778@yahoo.com>
(cherry picked from commit cfa224c)

# Conflicts:
#	client/docs/config.json
#	client/docs/swagger-ui/swagger.yaml

* updates

Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix(baseapp): fix snapshot interval bug (backport cosmos#14049) (cosmos#14053)

* refactor: use viper unmarshal in `config.GetConfig` function (backport cosmos#13651) (cosmos#14082)

* fix(group)!: Don't re-tally proposals after VP end (backport cosmos#14071) (cosmos#14091)

* fix(group)!: Don't re-tally proposals after VP end (cosmos#14071)

(cherry picked from commit 4ebe3aa)

# Conflicts:
#	CHANGELOG.md

* fix changelog and test

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix: do not shadow clientCtx in start.go (backport cosmos#14086) (cosmos#14101)

* fix: do not shadow clientCtx in start.go (cosmos#14086)

(cherry picked from commit f96072d)

# Conflicts:
#	server/start.go

* updates

Co-authored-by: Julien Robert <julien@rbrt.fr>

* chore: Test for Server Config Read cosmos#14125 (cosmos#14127)

(cherry picked from commit 9f46665)

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* fix: remove duplicate ante events (backport cosmos#13983) (cosmos#14142)

* fix: remove duplicate ante events (cosmos#13983)

## Description

After enabling the post-handler on our chain, we realised something odd with our transaction events. The ordering was `[ANTE, MSGS, ANTE, POST]`. After doing some digging, we realised that the context used inside the post-handler still contains the events from the ante-handler.

This should be backported to v0.46.x and v0.47.x 😄
Happy to make it compatible with cosmos#13940 when that gets merged!

cc @mbreithecker

---

### 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/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)

(cherry picked from commit 25449b5)

# Conflicts:
#	CHANGELOG.md

* fix changelog

Co-authored-by: John Letey <john@kyve.network>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* feat: support alternative query multistore (backport cosmos#13529) (cosmos#14169)

* feat: support alternative query multistore (cosmos#13529)

* support customize query multistore

* Update CHANGELOG.md

* fix test

* Update baseapp/abci.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update baseapp/baseapp.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update baseapp/options.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
(cherry picked from commit 15accd7)

# Conflicts:
#	CHANGELOG.md
#	baseapp/baseapp.go
#	baseapp/options.go

* fix conflicts

Co-authored-by: yihuang <huang@crypto.com>

* fix: state listener observe writes at wrong time (backport cosmos#13516) (cosmos#14138)

* fix: state listener observe writes at wrong time (cosmos#13516)

* fix: state listener observe writes at wrong time

Closes: cosmos#13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

* synchronous abci call, and format doc

* fix comment

* update file streamer readme and fix typos

* typo

* fix: state listener observe writes at wrong time

Closes: cosmos#13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

synchronous abci call, and format doc

fix comment

update file streamer readme and fix typos

typo

* improve UX of file streamer, make it immediately usable after enabled

- set default value to write_dir.
- make write_dir based on home directory by default.
- auto-create the directory if not exists.

* get homePage from opts

Co-authored-by: Marko <marbar3778@yahoo.com>
(cherry picked from commit 1f91ee2)

# Conflicts:
#	CHANGELOG.md
#	api/cosmos/base/store/v1beta1/listening.pulsar.go
#	baseapp/streaming.go
#	docs/architecture/adr-038-state-listening.md
#	server/config/toml.go
#	simapp/app_v2.go
#	store/cachemulti/store.go
#	store/iavl/store.go
#	store/mem/store.go
#	store/streaming/constructor.go
#	store/streaming/file/service.go
#	store/streaming/file/service_test.go
#	store/types/listening.pb.go
#	store/types/store.go

* `make proto-gen`, update changelog, delete uncessary files

* fix conflicts

* fix conflicts

* revert api breaking change

* fix build

* fix unit test

Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: Marko <marbar3778@yahoo.com>

* refactor: provide a helper for baseapp options (backport cosmos#14175) (cosmos#14178)

* refactor: provide a helper for baseapp options (cosmos#14175)

* provide a helper for baseapp options

* rename

* changelog entry

* fix spelling

(cherry picked from commit 1b6192f)

# Conflicts:
#	CHANGELOG.md
#	server/mock/app_test.go
#	simapp/simd/cmd/root.go

* conflicts

* lint

Co-authored-by: Marko <marbar3778@yahoo.com>

* feat: add --grpc client option (backport cosmos#14051) (cosmos#14192)

Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* refactor: cleanup store/streaming/constructor.go (backport cosmos#14044) (cosmos#14236)

* chore: audit store/streaming/file/service.go (backport cosmos#14234) (cosmos#14241)

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* fix: fix grpc flag conflict (backport cosmos#14244) (cosmos#14248)

* chore: prepare 0.46.7 release (cosmos#14103)

* fix(gov): Fix v3 votes migrations (backport cosmos#14214) (cosmos#14277)

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>

* Add changelog entry for bringing in v0.46.7 changes.

* Fix the changelog. The merge duplicated several SDK sections.

* Fix the TestFileStreamingService.

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Sai Kumar <17549398+gsk967@users.noreply.github.com>
Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
Co-authored-by: William Chong <6198816+williamchong@users.noreply.github.com>
Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com>
Co-authored-by: John Letey <j@letey.de>
Co-authored-by: John Letey <john@kyve.network>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>

* Mark v0.46.7-pio-1 in the changelog and release notes.

* Note v0.46.6-pio-3 in the changelog.

* cherry-pick cosmos-sdk authz validatebasic fix (#429)

* cherry-pick cosmos-sdk authz validatebasic fix

* Add change log entry

Co-authored-by: bruce-wayne2 <97930236+bruce-wayne2@users.noreply.github.com>

* set res for delivertx

* Revert "Revert "Merge pull request #270 from provenance-io/llama/add-fee-denom-change-proposal""

This reverts commit 648ae0c.

* Mark v0.46.8-pio-1 in the changelog and release notes.

* improvements from upstream feedback

* fix tests

* remove release notes

* add changelog entry

* changes based on feedback

* fix tests

* default to empty keys

* feadback fixes

---------

Co-authored-by: Daniel Wedul <github@wedul.com>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Sai Kumar <17549398+gsk967@users.noreply.github.com>
Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
Co-authored-by: William Chong <6198816+williamchong@users.noreply.github.com>
Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com>
Co-authored-by: John Letey <j@letey.de>
Co-authored-by: John Letey <john@kyve.network>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Carlton Hanna <nullpointer0x00@gmail.com>
Co-authored-by: bruce-wayne2 <97930236+bruce-wayne2@users.noreply.github.com>
@faddat faddat mentioned this pull request Mar 23, 2023
19 tasks
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
* fix: state listener observe writes at wrong time

Closes: cosmos#13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

* synchronous abci call, and format doc

* fix comment

* update file streamer readme and fix typos

* typo

* fix: state listener observe writes at wrong time

Closes: cosmos#13457

Currently state listener is notified when the cache store write, which happens in commit event only, which breaks the current design.
The solution (as discussed in the issue) is to listen state writes on rootmulti store only.

It also changes the file streamer to output single data file for the writes in the whole block, since we can't distinguish writes from different stage of abci events.

It adds new config items for file streamer:
- streamers.file.output-metadata
- streamers.file.stop-node-on-error
- streamers.file.fsync

synchronous abci call, and format doc

fix comment

update file streamer readme and fix typos

typo

* improve UX of file streamer, make it immediately usable after enabled

- set default value to write_dir.
- make write_dir based on home directory by default.
- auto-create the directory if not exists.

* get homePage from opts

Co-authored-by: Marko <marbar3778@yahoo.com>
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. backport/v0.47.x PR scheduled for inclusion in the v0.47's next stable release backport/0.46.x PR scheduled for inclusion in the v0.46's next stable release C:Store Type: ADR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

adr-038 state listener could observe uncommitted writes
9 participants