diff --git a/.gitignore b/.gitignore index adf4b7fc2f..4ce3ebf35d 100644 --- a/.gitignore +++ b/.gitignore @@ -52,6 +52,8 @@ vagrant .dir-locals.el .vscode +.venv + # Depinject & Graphviz dependency-graph.png debug_container.dot diff --git a/store/streaming/abci/README.md b/store/streaming/abci/README.md index 08aaf12e8a..6020f5d2c7 100644 --- a/store/streaming/abci/README.md +++ b/store/streaming/abci/README.md @@ -169,12 +169,6 @@ just trying the examples, you can skip ahead to the [Testing](#testing) section. make proto-gen ``` -* stdout plugin; from inside the `store/` dir, run: - -```shell -go build -o streaming/abci/examples/stdout/stdout streaming/abci/examples/stdout/stdout.go -``` - * file plugin (writes to `~/`); from inside the `store/` dir, run: ```shell @@ -185,12 +179,6 @@ go build -o streaming/abci/examples/file/file streaming/abci/examples/file/file. Export a plugin from one of the Go or Python examples. -* stdout plugin - -```shell -export COSMOS_SDK_ABCI="{path to}/cosmos-sdk/store/streaming/abci/examples/stdout/stdout" -``` - * file plugin (writes to ~/) ```shell diff --git a/store/streaming/abci/examples/stdout/stdout b/store/streaming/abci/examples/stdout/stdout deleted file mode 100755 index 93f61a7b93..0000000000 Binary files a/store/streaming/abci/examples/stdout/stdout and /dev/null differ diff --git a/store/streaming/abci/examples/stdout/stdout.go b/store/streaming/abci/examples/stdout/stdout.go deleted file mode 100644 index f1327a5862..0000000000 --- a/store/streaming/abci/examples/stdout/stdout.go +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "context" - "fmt" - - abci "github.com/cometbft/cometbft/abci/types" - "github.com/hashicorp/go-plugin" - - streamingabci "cosmossdk.io/store/streaming/abci" - store "cosmossdk.io/store/types" -) - -// StdoutPlugin is the implementation of the ABCIListener interface -// For Go plugins this is all that is required to process data sent over gRPC. -type StdoutPlugin struct { - BlockHeight int64 -} - -func (a *StdoutPlugin) ListenFinalizeBlock(ctx context.Context, req abci.RequestFinalizeBlock, res abci.ResponseFinalizeBlock) error { - a.BlockHeight = req.Height - // process tx messages (i.e: sent to external system) - fmt.Printf("listen-finalize-block: block-height=%d req=%v res=%v", a.BlockHeight, req, res) - return nil -} - -func (a *StdoutPlugin) ListenCommit(ctx context.Context, res abci.ResponseCommit, changeSet []*store.StoreKVPair) error { - // process block commit messages (i.e: sent to external system) - fmt.Printf("listen-commit: block_height=%d res=%v data=%v", a.BlockHeight, res, changeSet) - return nil -} - -func main() { - plugin.Serve(&plugin.ServeConfig{ - HandshakeConfig: streamingabci.Handshake, - Plugins: map[string]plugin.Plugin{ - "abci": &streamingabci.ListenerGRPCPlugin{Impl: &StdoutPlugin{}}, - }, - - // A non-nil value here enables gRPC serving for this streaming... - GRPCServer: plugin.DefaultGRPCServer, - }) -}