mirror of
https://github.com/tendermint/tendermint.git
synced 2026-02-08 04:50:16 +00:00
## PR
This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events.
Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like:
"rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}]
"sender": [{"address": "...", "balance": "100uatom"}]
The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...'
ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair.
PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings.
closes: #1859
closes: #2905
## Commits:
* Implement Event ABCI type and updates responses to use events
* Update messages_test.go
* Update kvstore.go
* Update event_bus.go
* Update subscription.go
* Update pubsub.go
* Update kvstore.go
* Update query logic to handle slice of strings in events
* Update Empty#Matches and unit tests
* Update pubsub logic
* Update EventBus#Publish
* Update kv tx indexer
* Update godocs
* Update ResultEvent to use slice of strings; update RPC
* Update more tests
* Update abci.md
* Check for key in validateAndStringifyEvents
* Fix KV indexer to skip empty keys
* Fix linting errors
* Update CHANGELOG_PENDING.md
* Update docs/spec/abci/abci.md
Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
* Update abci/types/types.proto
Co-Authored-By: Ethan Buchman <ethan@coinculture.info>
* Update docs/spec/abci/abci.md
Co-Authored-By: Ethan Buchman <ethan@coinculture.info>
* Update libs/pubsub/query/query.go
Co-Authored-By: Ethan Buchman <ethan@coinculture.info>
* Update match function to match if ANY value matches
* Implement TestSubscribeDuplicateKeys
* Update TestMatches to include multi-key test cases
* Update events.go
* Update Query interface godoc
* Update match godoc
* Add godoc for matchValue
* DRY-up tx indexing
* Return error from PublishWithEvents in EventBus#Publish
* Update PublishEventNewBlockHeader to return an error
* Fix build
* Update events doc in ABCI
* Update ABCI events godoc
* Implement TestEventBusPublishEventTxDuplicateKeys
* Update TestSubscribeDuplicateKeys to be table-driven
* Remove mod file
* Remove markdown from events godoc
* Implement TestTxSearchDeprecatedIndexing test
1.4 KiB
1.4 KiB
v0.31.8
**
BREAKING CHANGES:
- #3613 Switch from golang/dep to Go 1.11 Modules to resolve dependencies:
- it is recommended to switch to Go Modules if your project has tendermint as a dependency
- read more on Modules here: https://github.com/golang/go/wiki/Modules
-
CLI/RPC/Config
- [rpc] #3616 Improve
/block_resultsresponse format (results.DeliverTx->results.deliver_tx). See docs for details.
- [rpc] #3616 Improve
-
Apps
- [abci] #1859
ResponseCheckTx,ResponseDeliverTx,ResponseBeginBlock, andResponseEndBlocknow includeEventsinstead ofTags. EachEventcontains atypeand a list ofattributes(list of key-value pairs) allowing for inclusion of multiple distinct events in each response.
- [abci] #1859
-
Go API
- [libs/db] Removed deprecated
LevelDBBackendconst- If you have
db_backendset toleveldbin your config file, please change it togoleveldborcleveldb.
- If you have
- [libs/db] Removed deprecated
- [p2p] #3521 Remove NewNetAddressStringWithOptionalID
-
Blockchain Protocol
-
P2P Protocol
FEATURES:
IMPROVEMENTS:
- [p2p] #3666 Add per channel telemtry to improve reactor observability
- [rpc] #3686
HTTPClient#Callreturns wrapped errors, so a caller could useerrors.Causeto retrieve an error code.
BUG FIXES:
- [libs/db] Fixed the BoltDB backend's Batch.Delete implementation (@Yawning)
- [libs/db] Fixed the BoltDB backend's Get and Iterator implementation (@Yawning)