Files
tendermint/CHANGELOG_PENDING.md
Alexander Bezobchuk ab0835463f abci: Refactor tagging events using list of lists (#3643)
## 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
2019-06-12 14:03:45 +02:00

1.4 KiB

v0.31.8

**

BREAKING CHANGES:

  • #3613 Switch from golang/dep to Go 1.11 Modules to resolve dependencies:
  • CLI/RPC/Config

    • [rpc] #3616 Improve /block_results response format (results.DeliverTx -> results.deliver_tx). See docs for details.
  • Apps

    • [abci] #1859 ResponseCheckTx, ResponseDeliverTx, ResponseBeginBlock, and ResponseEndBlock now include Events instead of Tags. Each Event contains a type and a list of attributes (list of key-value pairs) allowing for inclusion of multiple distinct events in each response.
  • Go API

    • [libs/db] Removed deprecated LevelDBBackend const
      • If you have db_backend set to leveldb in your config file, please change it to goleveldb or cleveldb.
  • [p2p] #3521 Remove NewNetAddressStringWithOptionalID
  • Blockchain Protocol

  • P2P Protocol

FEATURES:

IMPROVEMENTS:

  • [p2p] #3666 Add per channel telemtry to improve reactor observability
  • [rpc] #3686 HTTPClient#Call returns wrapped errors, so a caller could use errors.Cause to 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)