You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13375 lines
320 KiB

7 years ago
7 years ago
7 years ago
7 years ago
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
6 years ago
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
6 years ago
7 years ago
7 years ago
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
6 years ago
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
6 years ago
7 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
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
6 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
add support for block pruning via ABCI Commit response (#4588) * Added BlockStore.DeleteBlock() * Added initial block pruner prototype * wip * Added BlockStore.PruneBlocks() * Added consensus setting for block pruning * Added BlockStore base * Error on replay if base does not have blocks * Handle missing blocks when sending VoteSetMaj23Message * Error message tweak * Properly update blockstore state * Error message fix again * blockchain: ignore peer missing blocks * Added FIXME * Added test for block replay with truncated history * Handle peer base in blockchain reactor * Improved replay error handling * Added tests for Store.PruneBlocks() * Fix non-RPC handling of truncated block history * Panic on missing block meta in needProofBlock() * Updated changelog * Handle truncated block history in RPC layer * Added info about earliest block in /status RPC * Reorder height and base in blockchain reactor messages * Updated changelog * Fix tests * Appease linter * Minor review fixes * Non-empty BlockStores should always have base > 0 * Update code to assume base > 0 invariant * Added blockstore tests for pruning to 0 * Make sure we don't prune below the current base * Added BlockStore.Size() * config: added retain_blocks recommendations * Update v1 blockchain reactor to handle blockstore base * Added state database pruning * Propagate errors on missing validator sets * Comment tweaks * Improved error message Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * use ABCI field ResponseCommit.retain_height instead of retain-blocks config option * remove State.RetainHeight, return value instead * fix minor issues * rename pruneHeights() to pruneBlocks() * noop to fix GitHub borkage Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
5 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
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
6 years ago
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: tendermint/abci/types.proto
  3. package types
  4. import (
  5. context "context"
  6. fmt "fmt"
  7. _ "github.com/gogo/protobuf/gogoproto"
  8. proto "github.com/gogo/protobuf/proto"
  9. _ "github.com/gogo/protobuf/types"
  10. github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
  11. crypto "github.com/tendermint/tendermint/proto/tendermint/crypto"
  12. types1 "github.com/tendermint/tendermint/proto/tendermint/types"
  13. grpc "google.golang.org/grpc"
  14. codes "google.golang.org/grpc/codes"
  15. status "google.golang.org/grpc/status"
  16. io "io"
  17. math "math"
  18. math_bits "math/bits"
  19. time "time"
  20. )
  21. // Reference imports to suppress errors if they are not otherwise used.
  22. var _ = proto.Marshal
  23. var _ = fmt.Errorf
  24. var _ = math.Inf
  25. var _ = time.Kitchen
  26. // This is a compile-time assertion to ensure that this generated file
  27. // is compatible with the proto package it is being compiled against.
  28. // A compilation error at this line likely means your copy of the
  29. // proto package needs to be updated.
  30. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  31. type CheckTxType int32
  32. const (
  33. CheckTxType_New CheckTxType = 0
  34. CheckTxType_Recheck CheckTxType = 1
  35. )
  36. var CheckTxType_name = map[int32]string{
  37. 0: "NEW",
  38. 1: "RECHECK",
  39. }
  40. var CheckTxType_value = map[string]int32{
  41. "NEW": 0,
  42. "RECHECK": 1,
  43. }
  44. func (x CheckTxType) String() string {
  45. return proto.EnumName(CheckTxType_name, int32(x))
  46. }
  47. func (CheckTxType) EnumDescriptor() ([]byte, []int) {
  48. return fileDescriptor_252557cfdd89a31a, []int{0}
  49. }
  50. type EvidenceType int32
  51. const (
  52. EvidenceType_UNKNOWN EvidenceType = 0
  53. EvidenceType_DUPLICATE_VOTE EvidenceType = 1
  54. EvidenceType_LIGHT_CLIENT_ATTACK EvidenceType = 2
  55. )
  56. var EvidenceType_name = map[int32]string{
  57. 0: "UNKNOWN",
  58. 1: "DUPLICATE_VOTE",
  59. 2: "LIGHT_CLIENT_ATTACK",
  60. }
  61. var EvidenceType_value = map[string]int32{
  62. "UNKNOWN": 0,
  63. "DUPLICATE_VOTE": 1,
  64. "LIGHT_CLIENT_ATTACK": 2,
  65. }
  66. func (x EvidenceType) String() string {
  67. return proto.EnumName(EvidenceType_name, int32(x))
  68. }
  69. func (EvidenceType) EnumDescriptor() ([]byte, []int) {
  70. return fileDescriptor_252557cfdd89a31a, []int{1}
  71. }
  72. type ResponseOfferSnapshot_Result int32
  73. const (
  74. ResponseOfferSnapshot_UNKNOWN ResponseOfferSnapshot_Result = 0
  75. ResponseOfferSnapshot_ACCEPT ResponseOfferSnapshot_Result = 1
  76. ResponseOfferSnapshot_ABORT ResponseOfferSnapshot_Result = 2
  77. ResponseOfferSnapshot_REJECT ResponseOfferSnapshot_Result = 3
  78. ResponseOfferSnapshot_REJECT_FORMAT ResponseOfferSnapshot_Result = 4
  79. ResponseOfferSnapshot_REJECT_SENDER ResponseOfferSnapshot_Result = 5
  80. )
  81. var ResponseOfferSnapshot_Result_name = map[int32]string{
  82. 0: "UNKNOWN",
  83. 1: "ACCEPT",
  84. 2: "ABORT",
  85. 3: "REJECT",
  86. 4: "REJECT_FORMAT",
  87. 5: "REJECT_SENDER",
  88. }
  89. var ResponseOfferSnapshot_Result_value = map[string]int32{
  90. "UNKNOWN": 0,
  91. "ACCEPT": 1,
  92. "ABORT": 2,
  93. "REJECT": 3,
  94. "REJECT_FORMAT": 4,
  95. "REJECT_SENDER": 5,
  96. }
  97. func (x ResponseOfferSnapshot_Result) String() string {
  98. return proto.EnumName(ResponseOfferSnapshot_Result_name, int32(x))
  99. }
  100. func (ResponseOfferSnapshot_Result) EnumDescriptor() ([]byte, []int) {
  101. return fileDescriptor_252557cfdd89a31a, []int{28, 0}
  102. }
  103. type ResponseApplySnapshotChunk_Result int32
  104. const (
  105. ResponseApplySnapshotChunk_UNKNOWN ResponseApplySnapshotChunk_Result = 0
  106. ResponseApplySnapshotChunk_ACCEPT ResponseApplySnapshotChunk_Result = 1
  107. ResponseApplySnapshotChunk_ABORT ResponseApplySnapshotChunk_Result = 2
  108. ResponseApplySnapshotChunk_RETRY ResponseApplySnapshotChunk_Result = 3
  109. ResponseApplySnapshotChunk_RETRY_SNAPSHOT ResponseApplySnapshotChunk_Result = 4
  110. ResponseApplySnapshotChunk_REJECT_SNAPSHOT ResponseApplySnapshotChunk_Result = 5
  111. )
  112. var ResponseApplySnapshotChunk_Result_name = map[int32]string{
  113. 0: "UNKNOWN",
  114. 1: "ACCEPT",
  115. 2: "ABORT",
  116. 3: "RETRY",
  117. 4: "RETRY_SNAPSHOT",
  118. 5: "REJECT_SNAPSHOT",
  119. }
  120. var ResponseApplySnapshotChunk_Result_value = map[string]int32{
  121. "UNKNOWN": 0,
  122. "ACCEPT": 1,
  123. "ABORT": 2,
  124. "RETRY": 3,
  125. "RETRY_SNAPSHOT": 4,
  126. "REJECT_SNAPSHOT": 5,
  127. }
  128. func (x ResponseApplySnapshotChunk_Result) String() string {
  129. return proto.EnumName(ResponseApplySnapshotChunk_Result_name, int32(x))
  130. }
  131. func (ResponseApplySnapshotChunk_Result) EnumDescriptor() ([]byte, []int) {
  132. return fileDescriptor_252557cfdd89a31a, []int{30, 0}
  133. }
  134. type Request struct {
  135. // Types that are valid to be assigned to Value:
  136. // *Request_Echo
  137. // *Request_Flush
  138. // *Request_Info
  139. // *Request_InitChain
  140. // *Request_Query
  141. // *Request_BeginBlock
  142. // *Request_CheckTx
  143. // *Request_DeliverTx
  144. // *Request_EndBlock
  145. // *Request_Commit
  146. // *Request_ListSnapshots
  147. // *Request_OfferSnapshot
  148. // *Request_LoadSnapshotChunk
  149. // *Request_ApplySnapshotChunk
  150. Value isRequest_Value `protobuf_oneof:"value"`
  151. }
  152. func (m *Request) Reset() { *m = Request{} }
  153. func (m *Request) String() string { return proto.CompactTextString(m) }
  154. func (*Request) ProtoMessage() {}
  155. func (*Request) Descriptor() ([]byte, []int) {
  156. return fileDescriptor_252557cfdd89a31a, []int{0}
  157. }
  158. func (m *Request) XXX_Unmarshal(b []byte) error {
  159. return m.Unmarshal(b)
  160. }
  161. func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  162. if deterministic {
  163. return xxx_messageInfo_Request.Marshal(b, m, deterministic)
  164. } else {
  165. b = b[:cap(b)]
  166. n, err := m.MarshalToSizedBuffer(b)
  167. if err != nil {
  168. return nil, err
  169. }
  170. return b[:n], nil
  171. }
  172. }
  173. func (m *Request) XXX_Merge(src proto.Message) {
  174. xxx_messageInfo_Request.Merge(m, src)
  175. }
  176. func (m *Request) XXX_Size() int {
  177. return m.Size()
  178. }
  179. func (m *Request) XXX_DiscardUnknown() {
  180. xxx_messageInfo_Request.DiscardUnknown(m)
  181. }
  182. var xxx_messageInfo_Request proto.InternalMessageInfo
  183. type isRequest_Value interface {
  184. isRequest_Value()
  185. MarshalTo([]byte) (int, error)
  186. Size() int
  187. }
  188. type Request_Echo struct {
  189. Echo *RequestEcho `protobuf:"bytes,1,opt,name=echo,proto3,oneof" json:"echo,omitempty"`
  190. }
  191. type Request_Flush struct {
  192. Flush *RequestFlush `protobuf:"bytes,2,opt,name=flush,proto3,oneof" json:"flush,omitempty"`
  193. }
  194. type Request_Info struct {
  195. Info *RequestInfo `protobuf:"bytes,3,opt,name=info,proto3,oneof" json:"info,omitempty"`
  196. }
  197. type Request_InitChain struct {
  198. InitChain *RequestInitChain `protobuf:"bytes,4,opt,name=init_chain,json=initChain,proto3,oneof" json:"init_chain,omitempty"`
  199. }
  200. type Request_Query struct {
  201. Query *RequestQuery `protobuf:"bytes,5,opt,name=query,proto3,oneof" json:"query,omitempty"`
  202. }
  203. type Request_BeginBlock struct {
  204. BeginBlock *RequestBeginBlock `protobuf:"bytes,6,opt,name=begin_block,json=beginBlock,proto3,oneof" json:"begin_block,omitempty"`
  205. }
  206. type Request_CheckTx struct {
  207. CheckTx *RequestCheckTx `protobuf:"bytes,7,opt,name=check_tx,json=checkTx,proto3,oneof" json:"check_tx,omitempty"`
  208. }
  209. type Request_DeliverTx struct {
  210. DeliverTx *RequestDeliverTx `protobuf:"bytes,8,opt,name=deliver_tx,json=deliverTx,proto3,oneof" json:"deliver_tx,omitempty"`
  211. }
  212. type Request_EndBlock struct {
  213. EndBlock *RequestEndBlock `protobuf:"bytes,9,opt,name=end_block,json=endBlock,proto3,oneof" json:"end_block,omitempty"`
  214. }
  215. type Request_Commit struct {
  216. Commit *RequestCommit `protobuf:"bytes,10,opt,name=commit,proto3,oneof" json:"commit,omitempty"`
  217. }
  218. type Request_ListSnapshots struct {
  219. ListSnapshots *RequestListSnapshots `protobuf:"bytes,11,opt,name=list_snapshots,json=listSnapshots,proto3,oneof" json:"list_snapshots,omitempty"`
  220. }
  221. type Request_OfferSnapshot struct {
  222. OfferSnapshot *RequestOfferSnapshot `protobuf:"bytes,12,opt,name=offer_snapshot,json=offerSnapshot,proto3,oneof" json:"offer_snapshot,omitempty"`
  223. }
  224. type Request_LoadSnapshotChunk struct {
  225. LoadSnapshotChunk *RequestLoadSnapshotChunk `protobuf:"bytes,13,opt,name=load_snapshot_chunk,json=loadSnapshotChunk,proto3,oneof" json:"load_snapshot_chunk,omitempty"`
  226. }
  227. type Request_ApplySnapshotChunk struct {
  228. ApplySnapshotChunk *RequestApplySnapshotChunk `protobuf:"bytes,14,opt,name=apply_snapshot_chunk,json=applySnapshotChunk,proto3,oneof" json:"apply_snapshot_chunk,omitempty"`
  229. }
  230. func (*Request_Echo) isRequest_Value() {}
  231. func (*Request_Flush) isRequest_Value() {}
  232. func (*Request_Info) isRequest_Value() {}
  233. func (*Request_InitChain) isRequest_Value() {}
  234. func (*Request_Query) isRequest_Value() {}
  235. func (*Request_BeginBlock) isRequest_Value() {}
  236. func (*Request_CheckTx) isRequest_Value() {}
  237. func (*Request_DeliverTx) isRequest_Value() {}
  238. func (*Request_EndBlock) isRequest_Value() {}
  239. func (*Request_Commit) isRequest_Value() {}
  240. func (*Request_ListSnapshots) isRequest_Value() {}
  241. func (*Request_OfferSnapshot) isRequest_Value() {}
  242. func (*Request_LoadSnapshotChunk) isRequest_Value() {}
  243. func (*Request_ApplySnapshotChunk) isRequest_Value() {}
  244. func (m *Request) GetValue() isRequest_Value {
  245. if m != nil {
  246. return m.Value
  247. }
  248. return nil
  249. }
  250. func (m *Request) GetEcho() *RequestEcho {
  251. if x, ok := m.GetValue().(*Request_Echo); ok {
  252. return x.Echo
  253. }
  254. return nil
  255. }
  256. func (m *Request) GetFlush() *RequestFlush {
  257. if x, ok := m.GetValue().(*Request_Flush); ok {
  258. return x.Flush
  259. }
  260. return nil
  261. }
  262. func (m *Request) GetInfo() *RequestInfo {
  263. if x, ok := m.GetValue().(*Request_Info); ok {
  264. return x.Info
  265. }
  266. return nil
  267. }
  268. func (m *Request) GetInitChain() *RequestInitChain {
  269. if x, ok := m.GetValue().(*Request_InitChain); ok {
  270. return x.InitChain
  271. }
  272. return nil
  273. }
  274. func (m *Request) GetQuery() *RequestQuery {
  275. if x, ok := m.GetValue().(*Request_Query); ok {
  276. return x.Query
  277. }
  278. return nil
  279. }
  280. func (m *Request) GetBeginBlock() *RequestBeginBlock {
  281. if x, ok := m.GetValue().(*Request_BeginBlock); ok {
  282. return x.BeginBlock
  283. }
  284. return nil
  285. }
  286. func (m *Request) GetCheckTx() *RequestCheckTx {
  287. if x, ok := m.GetValue().(*Request_CheckTx); ok {
  288. return x.CheckTx
  289. }
  290. return nil
  291. }
  292. func (m *Request) GetDeliverTx() *RequestDeliverTx {
  293. if x, ok := m.GetValue().(*Request_DeliverTx); ok {
  294. return x.DeliverTx
  295. }
  296. return nil
  297. }
  298. func (m *Request) GetEndBlock() *RequestEndBlock {
  299. if x, ok := m.GetValue().(*Request_EndBlock); ok {
  300. return x.EndBlock
  301. }
  302. return nil
  303. }
  304. func (m *Request) GetCommit() *RequestCommit {
  305. if x, ok := m.GetValue().(*Request_Commit); ok {
  306. return x.Commit
  307. }
  308. return nil
  309. }
  310. func (m *Request) GetListSnapshots() *RequestListSnapshots {
  311. if x, ok := m.GetValue().(*Request_ListSnapshots); ok {
  312. return x.ListSnapshots
  313. }
  314. return nil
  315. }
  316. func (m *Request) GetOfferSnapshot() *RequestOfferSnapshot {
  317. if x, ok := m.GetValue().(*Request_OfferSnapshot); ok {
  318. return x.OfferSnapshot
  319. }
  320. return nil
  321. }
  322. func (m *Request) GetLoadSnapshotChunk() *RequestLoadSnapshotChunk {
  323. if x, ok := m.GetValue().(*Request_LoadSnapshotChunk); ok {
  324. return x.LoadSnapshotChunk
  325. }
  326. return nil
  327. }
  328. func (m *Request) GetApplySnapshotChunk() *RequestApplySnapshotChunk {
  329. if x, ok := m.GetValue().(*Request_ApplySnapshotChunk); ok {
  330. return x.ApplySnapshotChunk
  331. }
  332. return nil
  333. }
  334. // XXX_OneofWrappers is for the internal use of the proto package.
  335. func (*Request) XXX_OneofWrappers() []interface{} {
  336. return []interface{}{
  337. (*Request_Echo)(nil),
  338. (*Request_Flush)(nil),
  339. (*Request_Info)(nil),
  340. (*Request_InitChain)(nil),
  341. (*Request_Query)(nil),
  342. (*Request_BeginBlock)(nil),
  343. (*Request_CheckTx)(nil),
  344. (*Request_DeliverTx)(nil),
  345. (*Request_EndBlock)(nil),
  346. (*Request_Commit)(nil),
  347. (*Request_ListSnapshots)(nil),
  348. (*Request_OfferSnapshot)(nil),
  349. (*Request_LoadSnapshotChunk)(nil),
  350. (*Request_ApplySnapshotChunk)(nil),
  351. }
  352. }
  353. type RequestEcho struct {
  354. Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
  355. }
  356. func (m *RequestEcho) Reset() { *m = RequestEcho{} }
  357. func (m *RequestEcho) String() string { return proto.CompactTextString(m) }
  358. func (*RequestEcho) ProtoMessage() {}
  359. func (*RequestEcho) Descriptor() ([]byte, []int) {
  360. return fileDescriptor_252557cfdd89a31a, []int{1}
  361. }
  362. func (m *RequestEcho) XXX_Unmarshal(b []byte) error {
  363. return m.Unmarshal(b)
  364. }
  365. func (m *RequestEcho) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  366. if deterministic {
  367. return xxx_messageInfo_RequestEcho.Marshal(b, m, deterministic)
  368. } else {
  369. b = b[:cap(b)]
  370. n, err := m.MarshalToSizedBuffer(b)
  371. if err != nil {
  372. return nil, err
  373. }
  374. return b[:n], nil
  375. }
  376. }
  377. func (m *RequestEcho) XXX_Merge(src proto.Message) {
  378. xxx_messageInfo_RequestEcho.Merge(m, src)
  379. }
  380. func (m *RequestEcho) XXX_Size() int {
  381. return m.Size()
  382. }
  383. func (m *RequestEcho) XXX_DiscardUnknown() {
  384. xxx_messageInfo_RequestEcho.DiscardUnknown(m)
  385. }
  386. var xxx_messageInfo_RequestEcho proto.InternalMessageInfo
  387. func (m *RequestEcho) GetMessage() string {
  388. if m != nil {
  389. return m.Message
  390. }
  391. return ""
  392. }
  393. type RequestFlush struct {
  394. }
  395. func (m *RequestFlush) Reset() { *m = RequestFlush{} }
  396. func (m *RequestFlush) String() string { return proto.CompactTextString(m) }
  397. func (*RequestFlush) ProtoMessage() {}
  398. func (*RequestFlush) Descriptor() ([]byte, []int) {
  399. return fileDescriptor_252557cfdd89a31a, []int{2}
  400. }
  401. func (m *RequestFlush) XXX_Unmarshal(b []byte) error {
  402. return m.Unmarshal(b)
  403. }
  404. func (m *RequestFlush) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  405. if deterministic {
  406. return xxx_messageInfo_RequestFlush.Marshal(b, m, deterministic)
  407. } else {
  408. b = b[:cap(b)]
  409. n, err := m.MarshalToSizedBuffer(b)
  410. if err != nil {
  411. return nil, err
  412. }
  413. return b[:n], nil
  414. }
  415. }
  416. func (m *RequestFlush) XXX_Merge(src proto.Message) {
  417. xxx_messageInfo_RequestFlush.Merge(m, src)
  418. }
  419. func (m *RequestFlush) XXX_Size() int {
  420. return m.Size()
  421. }
  422. func (m *RequestFlush) XXX_DiscardUnknown() {
  423. xxx_messageInfo_RequestFlush.DiscardUnknown(m)
  424. }
  425. var xxx_messageInfo_RequestFlush proto.InternalMessageInfo
  426. type RequestInfo struct {
  427. Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
  428. BlockVersion uint64 `protobuf:"varint,2,opt,name=block_version,json=blockVersion,proto3" json:"block_version,omitempty"`
  429. P2PVersion uint64 `protobuf:"varint,3,opt,name=p2p_version,json=p2pVersion,proto3" json:"p2p_version,omitempty"`
  430. AbciVersion string `protobuf:"bytes,4,opt,name=abci_version,json=abciVersion,proto3" json:"abci_version,omitempty"`
  431. }
  432. func (m *RequestInfo) Reset() { *m = RequestInfo{} }
  433. func (m *RequestInfo) String() string { return proto.CompactTextString(m) }
  434. func (*RequestInfo) ProtoMessage() {}
  435. func (*RequestInfo) Descriptor() ([]byte, []int) {
  436. return fileDescriptor_252557cfdd89a31a, []int{3}
  437. }
  438. func (m *RequestInfo) XXX_Unmarshal(b []byte) error {
  439. return m.Unmarshal(b)
  440. }
  441. func (m *RequestInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  442. if deterministic {
  443. return xxx_messageInfo_RequestInfo.Marshal(b, m, deterministic)
  444. } else {
  445. b = b[:cap(b)]
  446. n, err := m.MarshalToSizedBuffer(b)
  447. if err != nil {
  448. return nil, err
  449. }
  450. return b[:n], nil
  451. }
  452. }
  453. func (m *RequestInfo) XXX_Merge(src proto.Message) {
  454. xxx_messageInfo_RequestInfo.Merge(m, src)
  455. }
  456. func (m *RequestInfo) XXX_Size() int {
  457. return m.Size()
  458. }
  459. func (m *RequestInfo) XXX_DiscardUnknown() {
  460. xxx_messageInfo_RequestInfo.DiscardUnknown(m)
  461. }
  462. var xxx_messageInfo_RequestInfo proto.InternalMessageInfo
  463. func (m *RequestInfo) GetVersion() string {
  464. if m != nil {
  465. return m.Version
  466. }
  467. return ""
  468. }
  469. func (m *RequestInfo) GetBlockVersion() uint64 {
  470. if m != nil {
  471. return m.BlockVersion
  472. }
  473. return 0
  474. }
  475. func (m *RequestInfo) GetP2PVersion() uint64 {
  476. if m != nil {
  477. return m.P2PVersion
  478. }
  479. return 0
  480. }
  481. func (m *RequestInfo) GetAbciVersion() string {
  482. if m != nil {
  483. return m.AbciVersion
  484. }
  485. return ""
  486. }
  487. type RequestInitChain struct {
  488. Time time.Time `protobuf:"bytes,1,opt,name=time,proto3,stdtime" json:"time"`
  489. ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
  490. ConsensusParams *types1.ConsensusParams `protobuf:"bytes,3,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params,omitempty"`
  491. Validators []ValidatorUpdate `protobuf:"bytes,4,rep,name=validators,proto3" json:"validators"`
  492. AppStateBytes []byte `protobuf:"bytes,5,opt,name=app_state_bytes,json=appStateBytes,proto3" json:"app_state_bytes,omitempty"`
  493. InitialHeight int64 `protobuf:"varint,6,opt,name=initial_height,json=initialHeight,proto3" json:"initial_height,omitempty"`
  494. }
  495. func (m *RequestInitChain) Reset() { *m = RequestInitChain{} }
  496. func (m *RequestInitChain) String() string { return proto.CompactTextString(m) }
  497. func (*RequestInitChain) ProtoMessage() {}
  498. func (*RequestInitChain) Descriptor() ([]byte, []int) {
  499. return fileDescriptor_252557cfdd89a31a, []int{4}
  500. }
  501. func (m *RequestInitChain) XXX_Unmarshal(b []byte) error {
  502. return m.Unmarshal(b)
  503. }
  504. func (m *RequestInitChain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  505. if deterministic {
  506. return xxx_messageInfo_RequestInitChain.Marshal(b, m, deterministic)
  507. } else {
  508. b = b[:cap(b)]
  509. n, err := m.MarshalToSizedBuffer(b)
  510. if err != nil {
  511. return nil, err
  512. }
  513. return b[:n], nil
  514. }
  515. }
  516. func (m *RequestInitChain) XXX_Merge(src proto.Message) {
  517. xxx_messageInfo_RequestInitChain.Merge(m, src)
  518. }
  519. func (m *RequestInitChain) XXX_Size() int {
  520. return m.Size()
  521. }
  522. func (m *RequestInitChain) XXX_DiscardUnknown() {
  523. xxx_messageInfo_RequestInitChain.DiscardUnknown(m)
  524. }
  525. var xxx_messageInfo_RequestInitChain proto.InternalMessageInfo
  526. func (m *RequestInitChain) GetTime() time.Time {
  527. if m != nil {
  528. return m.Time
  529. }
  530. return time.Time{}
  531. }
  532. func (m *RequestInitChain) GetChainId() string {
  533. if m != nil {
  534. return m.ChainId
  535. }
  536. return ""
  537. }
  538. func (m *RequestInitChain) GetConsensusParams() *types1.ConsensusParams {
  539. if m != nil {
  540. return m.ConsensusParams
  541. }
  542. return nil
  543. }
  544. func (m *RequestInitChain) GetValidators() []ValidatorUpdate {
  545. if m != nil {
  546. return m.Validators
  547. }
  548. return nil
  549. }
  550. func (m *RequestInitChain) GetAppStateBytes() []byte {
  551. if m != nil {
  552. return m.AppStateBytes
  553. }
  554. return nil
  555. }
  556. func (m *RequestInitChain) GetInitialHeight() int64 {
  557. if m != nil {
  558. return m.InitialHeight
  559. }
  560. return 0
  561. }
  562. type RequestQuery struct {
  563. Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
  564. Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
  565. Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
  566. Prove bool `protobuf:"varint,4,opt,name=prove,proto3" json:"prove,omitempty"`
  567. }
  568. func (m *RequestQuery) Reset() { *m = RequestQuery{} }
  569. func (m *RequestQuery) String() string { return proto.CompactTextString(m) }
  570. func (*RequestQuery) ProtoMessage() {}
  571. func (*RequestQuery) Descriptor() ([]byte, []int) {
  572. return fileDescriptor_252557cfdd89a31a, []int{5}
  573. }
  574. func (m *RequestQuery) XXX_Unmarshal(b []byte) error {
  575. return m.Unmarshal(b)
  576. }
  577. func (m *RequestQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  578. if deterministic {
  579. return xxx_messageInfo_RequestQuery.Marshal(b, m, deterministic)
  580. } else {
  581. b = b[:cap(b)]
  582. n, err := m.MarshalToSizedBuffer(b)
  583. if err != nil {
  584. return nil, err
  585. }
  586. return b[:n], nil
  587. }
  588. }
  589. func (m *RequestQuery) XXX_Merge(src proto.Message) {
  590. xxx_messageInfo_RequestQuery.Merge(m, src)
  591. }
  592. func (m *RequestQuery) XXX_Size() int {
  593. return m.Size()
  594. }
  595. func (m *RequestQuery) XXX_DiscardUnknown() {
  596. xxx_messageInfo_RequestQuery.DiscardUnknown(m)
  597. }
  598. var xxx_messageInfo_RequestQuery proto.InternalMessageInfo
  599. func (m *RequestQuery) GetData() []byte {
  600. if m != nil {
  601. return m.Data
  602. }
  603. return nil
  604. }
  605. func (m *RequestQuery) GetPath() string {
  606. if m != nil {
  607. return m.Path
  608. }
  609. return ""
  610. }
  611. func (m *RequestQuery) GetHeight() int64 {
  612. if m != nil {
  613. return m.Height
  614. }
  615. return 0
  616. }
  617. func (m *RequestQuery) GetProve() bool {
  618. if m != nil {
  619. return m.Prove
  620. }
  621. return false
  622. }
  623. type RequestBeginBlock struct {
  624. Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
  625. Header types1.Header `protobuf:"bytes,2,opt,name=header,proto3" json:"header"`
  626. LastCommitInfo LastCommitInfo `protobuf:"bytes,3,opt,name=last_commit_info,json=lastCommitInfo,proto3" json:"last_commit_info"`
  627. ByzantineValidators []Evidence `protobuf:"bytes,4,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators"`
  628. }
  629. func (m *RequestBeginBlock) Reset() { *m = RequestBeginBlock{} }
  630. func (m *RequestBeginBlock) String() string { return proto.CompactTextString(m) }
  631. func (*RequestBeginBlock) ProtoMessage() {}
  632. func (*RequestBeginBlock) Descriptor() ([]byte, []int) {
  633. return fileDescriptor_252557cfdd89a31a, []int{6}
  634. }
  635. func (m *RequestBeginBlock) XXX_Unmarshal(b []byte) error {
  636. return m.Unmarshal(b)
  637. }
  638. func (m *RequestBeginBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  639. if deterministic {
  640. return xxx_messageInfo_RequestBeginBlock.Marshal(b, m, deterministic)
  641. } else {
  642. b = b[:cap(b)]
  643. n, err := m.MarshalToSizedBuffer(b)
  644. if err != nil {
  645. return nil, err
  646. }
  647. return b[:n], nil
  648. }
  649. }
  650. func (m *RequestBeginBlock) XXX_Merge(src proto.Message) {
  651. xxx_messageInfo_RequestBeginBlock.Merge(m, src)
  652. }
  653. func (m *RequestBeginBlock) XXX_Size() int {
  654. return m.Size()
  655. }
  656. func (m *RequestBeginBlock) XXX_DiscardUnknown() {
  657. xxx_messageInfo_RequestBeginBlock.DiscardUnknown(m)
  658. }
  659. var xxx_messageInfo_RequestBeginBlock proto.InternalMessageInfo
  660. func (m *RequestBeginBlock) GetHash() []byte {
  661. if m != nil {
  662. return m.Hash
  663. }
  664. return nil
  665. }
  666. func (m *RequestBeginBlock) GetHeader() types1.Header {
  667. if m != nil {
  668. return m.Header
  669. }
  670. return types1.Header{}
  671. }
  672. func (m *RequestBeginBlock) GetLastCommitInfo() LastCommitInfo {
  673. if m != nil {
  674. return m.LastCommitInfo
  675. }
  676. return LastCommitInfo{}
  677. }
  678. func (m *RequestBeginBlock) GetByzantineValidators() []Evidence {
  679. if m != nil {
  680. return m.ByzantineValidators
  681. }
  682. return nil
  683. }
  684. type RequestCheckTx struct {
  685. Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
  686. Type CheckTxType `protobuf:"varint,2,opt,name=type,proto3,enum=tendermint.abci.CheckTxType" json:"type,omitempty"`
  687. }
  688. func (m *RequestCheckTx) Reset() { *m = RequestCheckTx{} }
  689. func (m *RequestCheckTx) String() string { return proto.CompactTextString(m) }
  690. func (*RequestCheckTx) ProtoMessage() {}
  691. func (*RequestCheckTx) Descriptor() ([]byte, []int) {
  692. return fileDescriptor_252557cfdd89a31a, []int{7}
  693. }
  694. func (m *RequestCheckTx) XXX_Unmarshal(b []byte) error {
  695. return m.Unmarshal(b)
  696. }
  697. func (m *RequestCheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  698. if deterministic {
  699. return xxx_messageInfo_RequestCheckTx.Marshal(b, m, deterministic)
  700. } else {
  701. b = b[:cap(b)]
  702. n, err := m.MarshalToSizedBuffer(b)
  703. if err != nil {
  704. return nil, err
  705. }
  706. return b[:n], nil
  707. }
  708. }
  709. func (m *RequestCheckTx) XXX_Merge(src proto.Message) {
  710. xxx_messageInfo_RequestCheckTx.Merge(m, src)
  711. }
  712. func (m *RequestCheckTx) XXX_Size() int {
  713. return m.Size()
  714. }
  715. func (m *RequestCheckTx) XXX_DiscardUnknown() {
  716. xxx_messageInfo_RequestCheckTx.DiscardUnknown(m)
  717. }
  718. var xxx_messageInfo_RequestCheckTx proto.InternalMessageInfo
  719. func (m *RequestCheckTx) GetTx() []byte {
  720. if m != nil {
  721. return m.Tx
  722. }
  723. return nil
  724. }
  725. func (m *RequestCheckTx) GetType() CheckTxType {
  726. if m != nil {
  727. return m.Type
  728. }
  729. return CheckTxType_New
  730. }
  731. type RequestDeliverTx struct {
  732. Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
  733. }
  734. func (m *RequestDeliverTx) Reset() { *m = RequestDeliverTx{} }
  735. func (m *RequestDeliverTx) String() string { return proto.CompactTextString(m) }
  736. func (*RequestDeliverTx) ProtoMessage() {}
  737. func (*RequestDeliverTx) Descriptor() ([]byte, []int) {
  738. return fileDescriptor_252557cfdd89a31a, []int{8}
  739. }
  740. func (m *RequestDeliverTx) XXX_Unmarshal(b []byte) error {
  741. return m.Unmarshal(b)
  742. }
  743. func (m *RequestDeliverTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  744. if deterministic {
  745. return xxx_messageInfo_RequestDeliverTx.Marshal(b, m, deterministic)
  746. } else {
  747. b = b[:cap(b)]
  748. n, err := m.MarshalToSizedBuffer(b)
  749. if err != nil {
  750. return nil, err
  751. }
  752. return b[:n], nil
  753. }
  754. }
  755. func (m *RequestDeliverTx) XXX_Merge(src proto.Message) {
  756. xxx_messageInfo_RequestDeliverTx.Merge(m, src)
  757. }
  758. func (m *RequestDeliverTx) XXX_Size() int {
  759. return m.Size()
  760. }
  761. func (m *RequestDeliverTx) XXX_DiscardUnknown() {
  762. xxx_messageInfo_RequestDeliverTx.DiscardUnknown(m)
  763. }
  764. var xxx_messageInfo_RequestDeliverTx proto.InternalMessageInfo
  765. func (m *RequestDeliverTx) GetTx() []byte {
  766. if m != nil {
  767. return m.Tx
  768. }
  769. return nil
  770. }
  771. type RequestEndBlock struct {
  772. Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  773. }
  774. func (m *RequestEndBlock) Reset() { *m = RequestEndBlock{} }
  775. func (m *RequestEndBlock) String() string { return proto.CompactTextString(m) }
  776. func (*RequestEndBlock) ProtoMessage() {}
  777. func (*RequestEndBlock) Descriptor() ([]byte, []int) {
  778. return fileDescriptor_252557cfdd89a31a, []int{9}
  779. }
  780. func (m *RequestEndBlock) XXX_Unmarshal(b []byte) error {
  781. return m.Unmarshal(b)
  782. }
  783. func (m *RequestEndBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  784. if deterministic {
  785. return xxx_messageInfo_RequestEndBlock.Marshal(b, m, deterministic)
  786. } else {
  787. b = b[:cap(b)]
  788. n, err := m.MarshalToSizedBuffer(b)
  789. if err != nil {
  790. return nil, err
  791. }
  792. return b[:n], nil
  793. }
  794. }
  795. func (m *RequestEndBlock) XXX_Merge(src proto.Message) {
  796. xxx_messageInfo_RequestEndBlock.Merge(m, src)
  797. }
  798. func (m *RequestEndBlock) XXX_Size() int {
  799. return m.Size()
  800. }
  801. func (m *RequestEndBlock) XXX_DiscardUnknown() {
  802. xxx_messageInfo_RequestEndBlock.DiscardUnknown(m)
  803. }
  804. var xxx_messageInfo_RequestEndBlock proto.InternalMessageInfo
  805. func (m *RequestEndBlock) GetHeight() int64 {
  806. if m != nil {
  807. return m.Height
  808. }
  809. return 0
  810. }
  811. type RequestCommit struct {
  812. }
  813. func (m *RequestCommit) Reset() { *m = RequestCommit{} }
  814. func (m *RequestCommit) String() string { return proto.CompactTextString(m) }
  815. func (*RequestCommit) ProtoMessage() {}
  816. func (*RequestCommit) Descriptor() ([]byte, []int) {
  817. return fileDescriptor_252557cfdd89a31a, []int{10}
  818. }
  819. func (m *RequestCommit) XXX_Unmarshal(b []byte) error {
  820. return m.Unmarshal(b)
  821. }
  822. func (m *RequestCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  823. if deterministic {
  824. return xxx_messageInfo_RequestCommit.Marshal(b, m, deterministic)
  825. } else {
  826. b = b[:cap(b)]
  827. n, err := m.MarshalToSizedBuffer(b)
  828. if err != nil {
  829. return nil, err
  830. }
  831. return b[:n], nil
  832. }
  833. }
  834. func (m *RequestCommit) XXX_Merge(src proto.Message) {
  835. xxx_messageInfo_RequestCommit.Merge(m, src)
  836. }
  837. func (m *RequestCommit) XXX_Size() int {
  838. return m.Size()
  839. }
  840. func (m *RequestCommit) XXX_DiscardUnknown() {
  841. xxx_messageInfo_RequestCommit.DiscardUnknown(m)
  842. }
  843. var xxx_messageInfo_RequestCommit proto.InternalMessageInfo
  844. // lists available snapshots
  845. type RequestListSnapshots struct {
  846. }
  847. func (m *RequestListSnapshots) Reset() { *m = RequestListSnapshots{} }
  848. func (m *RequestListSnapshots) String() string { return proto.CompactTextString(m) }
  849. func (*RequestListSnapshots) ProtoMessage() {}
  850. func (*RequestListSnapshots) Descriptor() ([]byte, []int) {
  851. return fileDescriptor_252557cfdd89a31a, []int{11}
  852. }
  853. func (m *RequestListSnapshots) XXX_Unmarshal(b []byte) error {
  854. return m.Unmarshal(b)
  855. }
  856. func (m *RequestListSnapshots) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  857. if deterministic {
  858. return xxx_messageInfo_RequestListSnapshots.Marshal(b, m, deterministic)
  859. } else {
  860. b = b[:cap(b)]
  861. n, err := m.MarshalToSizedBuffer(b)
  862. if err != nil {
  863. return nil, err
  864. }
  865. return b[:n], nil
  866. }
  867. }
  868. func (m *RequestListSnapshots) XXX_Merge(src proto.Message) {
  869. xxx_messageInfo_RequestListSnapshots.Merge(m, src)
  870. }
  871. func (m *RequestListSnapshots) XXX_Size() int {
  872. return m.Size()
  873. }
  874. func (m *RequestListSnapshots) XXX_DiscardUnknown() {
  875. xxx_messageInfo_RequestListSnapshots.DiscardUnknown(m)
  876. }
  877. var xxx_messageInfo_RequestListSnapshots proto.InternalMessageInfo
  878. // offers a snapshot to the application
  879. type RequestOfferSnapshot struct {
  880. Snapshot *Snapshot `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"`
  881. AppHash []byte `protobuf:"bytes,2,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
  882. }
  883. func (m *RequestOfferSnapshot) Reset() { *m = RequestOfferSnapshot{} }
  884. func (m *RequestOfferSnapshot) String() string { return proto.CompactTextString(m) }
  885. func (*RequestOfferSnapshot) ProtoMessage() {}
  886. func (*RequestOfferSnapshot) Descriptor() ([]byte, []int) {
  887. return fileDescriptor_252557cfdd89a31a, []int{12}
  888. }
  889. func (m *RequestOfferSnapshot) XXX_Unmarshal(b []byte) error {
  890. return m.Unmarshal(b)
  891. }
  892. func (m *RequestOfferSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  893. if deterministic {
  894. return xxx_messageInfo_RequestOfferSnapshot.Marshal(b, m, deterministic)
  895. } else {
  896. b = b[:cap(b)]
  897. n, err := m.MarshalToSizedBuffer(b)
  898. if err != nil {
  899. return nil, err
  900. }
  901. return b[:n], nil
  902. }
  903. }
  904. func (m *RequestOfferSnapshot) XXX_Merge(src proto.Message) {
  905. xxx_messageInfo_RequestOfferSnapshot.Merge(m, src)
  906. }
  907. func (m *RequestOfferSnapshot) XXX_Size() int {
  908. return m.Size()
  909. }
  910. func (m *RequestOfferSnapshot) XXX_DiscardUnknown() {
  911. xxx_messageInfo_RequestOfferSnapshot.DiscardUnknown(m)
  912. }
  913. var xxx_messageInfo_RequestOfferSnapshot proto.InternalMessageInfo
  914. func (m *RequestOfferSnapshot) GetSnapshot() *Snapshot {
  915. if m != nil {
  916. return m.Snapshot
  917. }
  918. return nil
  919. }
  920. func (m *RequestOfferSnapshot) GetAppHash() []byte {
  921. if m != nil {
  922. return m.AppHash
  923. }
  924. return nil
  925. }
  926. // loads a snapshot chunk
  927. type RequestLoadSnapshotChunk struct {
  928. Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  929. Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"`
  930. Chunk uint32 `protobuf:"varint,3,opt,name=chunk,proto3" json:"chunk,omitempty"`
  931. }
  932. func (m *RequestLoadSnapshotChunk) Reset() { *m = RequestLoadSnapshotChunk{} }
  933. func (m *RequestLoadSnapshotChunk) String() string { return proto.CompactTextString(m) }
  934. func (*RequestLoadSnapshotChunk) ProtoMessage() {}
  935. func (*RequestLoadSnapshotChunk) Descriptor() ([]byte, []int) {
  936. return fileDescriptor_252557cfdd89a31a, []int{13}
  937. }
  938. func (m *RequestLoadSnapshotChunk) XXX_Unmarshal(b []byte) error {
  939. return m.Unmarshal(b)
  940. }
  941. func (m *RequestLoadSnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  942. if deterministic {
  943. return xxx_messageInfo_RequestLoadSnapshotChunk.Marshal(b, m, deterministic)
  944. } else {
  945. b = b[:cap(b)]
  946. n, err := m.MarshalToSizedBuffer(b)
  947. if err != nil {
  948. return nil, err
  949. }
  950. return b[:n], nil
  951. }
  952. }
  953. func (m *RequestLoadSnapshotChunk) XXX_Merge(src proto.Message) {
  954. xxx_messageInfo_RequestLoadSnapshotChunk.Merge(m, src)
  955. }
  956. func (m *RequestLoadSnapshotChunk) XXX_Size() int {
  957. return m.Size()
  958. }
  959. func (m *RequestLoadSnapshotChunk) XXX_DiscardUnknown() {
  960. xxx_messageInfo_RequestLoadSnapshotChunk.DiscardUnknown(m)
  961. }
  962. var xxx_messageInfo_RequestLoadSnapshotChunk proto.InternalMessageInfo
  963. func (m *RequestLoadSnapshotChunk) GetHeight() uint64 {
  964. if m != nil {
  965. return m.Height
  966. }
  967. return 0
  968. }
  969. func (m *RequestLoadSnapshotChunk) GetFormat() uint32 {
  970. if m != nil {
  971. return m.Format
  972. }
  973. return 0
  974. }
  975. func (m *RequestLoadSnapshotChunk) GetChunk() uint32 {
  976. if m != nil {
  977. return m.Chunk
  978. }
  979. return 0
  980. }
  981. // Applies a snapshot chunk
  982. type RequestApplySnapshotChunk struct {
  983. Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
  984. Chunk []byte `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"`
  985. Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"`
  986. }
  987. func (m *RequestApplySnapshotChunk) Reset() { *m = RequestApplySnapshotChunk{} }
  988. func (m *RequestApplySnapshotChunk) String() string { return proto.CompactTextString(m) }
  989. func (*RequestApplySnapshotChunk) ProtoMessage() {}
  990. func (*RequestApplySnapshotChunk) Descriptor() ([]byte, []int) {
  991. return fileDescriptor_252557cfdd89a31a, []int{14}
  992. }
  993. func (m *RequestApplySnapshotChunk) XXX_Unmarshal(b []byte) error {
  994. return m.Unmarshal(b)
  995. }
  996. func (m *RequestApplySnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  997. if deterministic {
  998. return xxx_messageInfo_RequestApplySnapshotChunk.Marshal(b, m, deterministic)
  999. } else {
  1000. b = b[:cap(b)]
  1001. n, err := m.MarshalToSizedBuffer(b)
  1002. if err != nil {
  1003. return nil, err
  1004. }
  1005. return b[:n], nil
  1006. }
  1007. }
  1008. func (m *RequestApplySnapshotChunk) XXX_Merge(src proto.Message) {
  1009. xxx_messageInfo_RequestApplySnapshotChunk.Merge(m, src)
  1010. }
  1011. func (m *RequestApplySnapshotChunk) XXX_Size() int {
  1012. return m.Size()
  1013. }
  1014. func (m *RequestApplySnapshotChunk) XXX_DiscardUnknown() {
  1015. xxx_messageInfo_RequestApplySnapshotChunk.DiscardUnknown(m)
  1016. }
  1017. var xxx_messageInfo_RequestApplySnapshotChunk proto.InternalMessageInfo
  1018. func (m *RequestApplySnapshotChunk) GetIndex() uint32 {
  1019. if m != nil {
  1020. return m.Index
  1021. }
  1022. return 0
  1023. }
  1024. func (m *RequestApplySnapshotChunk) GetChunk() []byte {
  1025. if m != nil {
  1026. return m.Chunk
  1027. }
  1028. return nil
  1029. }
  1030. func (m *RequestApplySnapshotChunk) GetSender() string {
  1031. if m != nil {
  1032. return m.Sender
  1033. }
  1034. return ""
  1035. }
  1036. type Response struct {
  1037. // Types that are valid to be assigned to Value:
  1038. // *Response_Exception
  1039. // *Response_Echo
  1040. // *Response_Flush
  1041. // *Response_Info
  1042. // *Response_InitChain
  1043. // *Response_Query
  1044. // *Response_BeginBlock
  1045. // *Response_CheckTx
  1046. // *Response_DeliverTx
  1047. // *Response_EndBlock
  1048. // *Response_Commit
  1049. // *Response_ListSnapshots
  1050. // *Response_OfferSnapshot
  1051. // *Response_LoadSnapshotChunk
  1052. // *Response_ApplySnapshotChunk
  1053. Value isResponse_Value `protobuf_oneof:"value"`
  1054. }
  1055. func (m *Response) Reset() { *m = Response{} }
  1056. func (m *Response) String() string { return proto.CompactTextString(m) }
  1057. func (*Response) ProtoMessage() {}
  1058. func (*Response) Descriptor() ([]byte, []int) {
  1059. return fileDescriptor_252557cfdd89a31a, []int{15}
  1060. }
  1061. func (m *Response) XXX_Unmarshal(b []byte) error {
  1062. return m.Unmarshal(b)
  1063. }
  1064. func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1065. if deterministic {
  1066. return xxx_messageInfo_Response.Marshal(b, m, deterministic)
  1067. } else {
  1068. b = b[:cap(b)]
  1069. n, err := m.MarshalToSizedBuffer(b)
  1070. if err != nil {
  1071. return nil, err
  1072. }
  1073. return b[:n], nil
  1074. }
  1075. }
  1076. func (m *Response) XXX_Merge(src proto.Message) {
  1077. xxx_messageInfo_Response.Merge(m, src)
  1078. }
  1079. func (m *Response) XXX_Size() int {
  1080. return m.Size()
  1081. }
  1082. func (m *Response) XXX_DiscardUnknown() {
  1083. xxx_messageInfo_Response.DiscardUnknown(m)
  1084. }
  1085. var xxx_messageInfo_Response proto.InternalMessageInfo
  1086. type isResponse_Value interface {
  1087. isResponse_Value()
  1088. MarshalTo([]byte) (int, error)
  1089. Size() int
  1090. }
  1091. type Response_Exception struct {
  1092. Exception *ResponseException `protobuf:"bytes,1,opt,name=exception,proto3,oneof" json:"exception,omitempty"`
  1093. }
  1094. type Response_Echo struct {
  1095. Echo *ResponseEcho `protobuf:"bytes,2,opt,name=echo,proto3,oneof" json:"echo,omitempty"`
  1096. }
  1097. type Response_Flush struct {
  1098. Flush *ResponseFlush `protobuf:"bytes,3,opt,name=flush,proto3,oneof" json:"flush,omitempty"`
  1099. }
  1100. type Response_Info struct {
  1101. Info *ResponseInfo `protobuf:"bytes,4,opt,name=info,proto3,oneof" json:"info,omitempty"`
  1102. }
  1103. type Response_InitChain struct {
  1104. InitChain *ResponseInitChain `protobuf:"bytes,5,opt,name=init_chain,json=initChain,proto3,oneof" json:"init_chain,omitempty"`
  1105. }
  1106. type Response_Query struct {
  1107. Query *ResponseQuery `protobuf:"bytes,6,opt,name=query,proto3,oneof" json:"query,omitempty"`
  1108. }
  1109. type Response_BeginBlock struct {
  1110. BeginBlock *ResponseBeginBlock `protobuf:"bytes,7,opt,name=begin_block,json=beginBlock,proto3,oneof" json:"begin_block,omitempty"`
  1111. }
  1112. type Response_CheckTx struct {
  1113. CheckTx *ResponseCheckTx `protobuf:"bytes,8,opt,name=check_tx,json=checkTx,proto3,oneof" json:"check_tx,omitempty"`
  1114. }
  1115. type Response_DeliverTx struct {
  1116. DeliverTx *ResponseDeliverTx `protobuf:"bytes,9,opt,name=deliver_tx,json=deliverTx,proto3,oneof" json:"deliver_tx,omitempty"`
  1117. }
  1118. type Response_EndBlock struct {
  1119. EndBlock *ResponseEndBlock `protobuf:"bytes,10,opt,name=end_block,json=endBlock,proto3,oneof" json:"end_block,omitempty"`
  1120. }
  1121. type Response_Commit struct {
  1122. Commit *ResponseCommit `protobuf:"bytes,11,opt,name=commit,proto3,oneof" json:"commit,omitempty"`
  1123. }
  1124. type Response_ListSnapshots struct {
  1125. ListSnapshots *ResponseListSnapshots `protobuf:"bytes,12,opt,name=list_snapshots,json=listSnapshots,proto3,oneof" json:"list_snapshots,omitempty"`
  1126. }
  1127. type Response_OfferSnapshot struct {
  1128. OfferSnapshot *ResponseOfferSnapshot `protobuf:"bytes,13,opt,name=offer_snapshot,json=offerSnapshot,proto3,oneof" json:"offer_snapshot,omitempty"`
  1129. }
  1130. type Response_LoadSnapshotChunk struct {
  1131. LoadSnapshotChunk *ResponseLoadSnapshotChunk `protobuf:"bytes,14,opt,name=load_snapshot_chunk,json=loadSnapshotChunk,proto3,oneof" json:"load_snapshot_chunk,omitempty"`
  1132. }
  1133. type Response_ApplySnapshotChunk struct {
  1134. ApplySnapshotChunk *ResponseApplySnapshotChunk `protobuf:"bytes,15,opt,name=apply_snapshot_chunk,json=applySnapshotChunk,proto3,oneof" json:"apply_snapshot_chunk,omitempty"`
  1135. }
  1136. func (*Response_Exception) isResponse_Value() {}
  1137. func (*Response_Echo) isResponse_Value() {}
  1138. func (*Response_Flush) isResponse_Value() {}
  1139. func (*Response_Info) isResponse_Value() {}
  1140. func (*Response_InitChain) isResponse_Value() {}
  1141. func (*Response_Query) isResponse_Value() {}
  1142. func (*Response_BeginBlock) isResponse_Value() {}
  1143. func (*Response_CheckTx) isResponse_Value() {}
  1144. func (*Response_DeliverTx) isResponse_Value() {}
  1145. func (*Response_EndBlock) isResponse_Value() {}
  1146. func (*Response_Commit) isResponse_Value() {}
  1147. func (*Response_ListSnapshots) isResponse_Value() {}
  1148. func (*Response_OfferSnapshot) isResponse_Value() {}
  1149. func (*Response_LoadSnapshotChunk) isResponse_Value() {}
  1150. func (*Response_ApplySnapshotChunk) isResponse_Value() {}
  1151. func (m *Response) GetValue() isResponse_Value {
  1152. if m != nil {
  1153. return m.Value
  1154. }
  1155. return nil
  1156. }
  1157. func (m *Response) GetException() *ResponseException {
  1158. if x, ok := m.GetValue().(*Response_Exception); ok {
  1159. return x.Exception
  1160. }
  1161. return nil
  1162. }
  1163. func (m *Response) GetEcho() *ResponseEcho {
  1164. if x, ok := m.GetValue().(*Response_Echo); ok {
  1165. return x.Echo
  1166. }
  1167. return nil
  1168. }
  1169. func (m *Response) GetFlush() *ResponseFlush {
  1170. if x, ok := m.GetValue().(*Response_Flush); ok {
  1171. return x.Flush
  1172. }
  1173. return nil
  1174. }
  1175. func (m *Response) GetInfo() *ResponseInfo {
  1176. if x, ok := m.GetValue().(*Response_Info); ok {
  1177. return x.Info
  1178. }
  1179. return nil
  1180. }
  1181. func (m *Response) GetInitChain() *ResponseInitChain {
  1182. if x, ok := m.GetValue().(*Response_InitChain); ok {
  1183. return x.InitChain
  1184. }
  1185. return nil
  1186. }
  1187. func (m *Response) GetQuery() *ResponseQuery {
  1188. if x, ok := m.GetValue().(*Response_Query); ok {
  1189. return x.Query
  1190. }
  1191. return nil
  1192. }
  1193. func (m *Response) GetBeginBlock() *ResponseBeginBlock {
  1194. if x, ok := m.GetValue().(*Response_BeginBlock); ok {
  1195. return x.BeginBlock
  1196. }
  1197. return nil
  1198. }
  1199. func (m *Response) GetCheckTx() *ResponseCheckTx {
  1200. if x, ok := m.GetValue().(*Response_CheckTx); ok {
  1201. return x.CheckTx
  1202. }
  1203. return nil
  1204. }
  1205. func (m *Response) GetDeliverTx() *ResponseDeliverTx {
  1206. if x, ok := m.GetValue().(*Response_DeliverTx); ok {
  1207. return x.DeliverTx
  1208. }
  1209. return nil
  1210. }
  1211. func (m *Response) GetEndBlock() *ResponseEndBlock {
  1212. if x, ok := m.GetValue().(*Response_EndBlock); ok {
  1213. return x.EndBlock
  1214. }
  1215. return nil
  1216. }
  1217. func (m *Response) GetCommit() *ResponseCommit {
  1218. if x, ok := m.GetValue().(*Response_Commit); ok {
  1219. return x.Commit
  1220. }
  1221. return nil
  1222. }
  1223. func (m *Response) GetListSnapshots() *ResponseListSnapshots {
  1224. if x, ok := m.GetValue().(*Response_ListSnapshots); ok {
  1225. return x.ListSnapshots
  1226. }
  1227. return nil
  1228. }
  1229. func (m *Response) GetOfferSnapshot() *ResponseOfferSnapshot {
  1230. if x, ok := m.GetValue().(*Response_OfferSnapshot); ok {
  1231. return x.OfferSnapshot
  1232. }
  1233. return nil
  1234. }
  1235. func (m *Response) GetLoadSnapshotChunk() *ResponseLoadSnapshotChunk {
  1236. if x, ok := m.GetValue().(*Response_LoadSnapshotChunk); ok {
  1237. return x.LoadSnapshotChunk
  1238. }
  1239. return nil
  1240. }
  1241. func (m *Response) GetApplySnapshotChunk() *ResponseApplySnapshotChunk {
  1242. if x, ok := m.GetValue().(*Response_ApplySnapshotChunk); ok {
  1243. return x.ApplySnapshotChunk
  1244. }
  1245. return nil
  1246. }
  1247. // XXX_OneofWrappers is for the internal use of the proto package.
  1248. func (*Response) XXX_OneofWrappers() []interface{} {
  1249. return []interface{}{
  1250. (*Response_Exception)(nil),
  1251. (*Response_Echo)(nil),
  1252. (*Response_Flush)(nil),
  1253. (*Response_Info)(nil),
  1254. (*Response_InitChain)(nil),
  1255. (*Response_Query)(nil),
  1256. (*Response_BeginBlock)(nil),
  1257. (*Response_CheckTx)(nil),
  1258. (*Response_DeliverTx)(nil),
  1259. (*Response_EndBlock)(nil),
  1260. (*Response_Commit)(nil),
  1261. (*Response_ListSnapshots)(nil),
  1262. (*Response_OfferSnapshot)(nil),
  1263. (*Response_LoadSnapshotChunk)(nil),
  1264. (*Response_ApplySnapshotChunk)(nil),
  1265. }
  1266. }
  1267. // nondeterministic
  1268. type ResponseException struct {
  1269. Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
  1270. }
  1271. func (m *ResponseException) Reset() { *m = ResponseException{} }
  1272. func (m *ResponseException) String() string { return proto.CompactTextString(m) }
  1273. func (*ResponseException) ProtoMessage() {}
  1274. func (*ResponseException) Descriptor() ([]byte, []int) {
  1275. return fileDescriptor_252557cfdd89a31a, []int{16}
  1276. }
  1277. func (m *ResponseException) XXX_Unmarshal(b []byte) error {
  1278. return m.Unmarshal(b)
  1279. }
  1280. func (m *ResponseException) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1281. if deterministic {
  1282. return xxx_messageInfo_ResponseException.Marshal(b, m, deterministic)
  1283. } else {
  1284. b = b[:cap(b)]
  1285. n, err := m.MarshalToSizedBuffer(b)
  1286. if err != nil {
  1287. return nil, err
  1288. }
  1289. return b[:n], nil
  1290. }
  1291. }
  1292. func (m *ResponseException) XXX_Merge(src proto.Message) {
  1293. xxx_messageInfo_ResponseException.Merge(m, src)
  1294. }
  1295. func (m *ResponseException) XXX_Size() int {
  1296. return m.Size()
  1297. }
  1298. func (m *ResponseException) XXX_DiscardUnknown() {
  1299. xxx_messageInfo_ResponseException.DiscardUnknown(m)
  1300. }
  1301. var xxx_messageInfo_ResponseException proto.InternalMessageInfo
  1302. func (m *ResponseException) GetError() string {
  1303. if m != nil {
  1304. return m.Error
  1305. }
  1306. return ""
  1307. }
  1308. type ResponseEcho struct {
  1309. Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
  1310. }
  1311. func (m *ResponseEcho) Reset() { *m = ResponseEcho{} }
  1312. func (m *ResponseEcho) String() string { return proto.CompactTextString(m) }
  1313. func (*ResponseEcho) ProtoMessage() {}
  1314. func (*ResponseEcho) Descriptor() ([]byte, []int) {
  1315. return fileDescriptor_252557cfdd89a31a, []int{17}
  1316. }
  1317. func (m *ResponseEcho) XXX_Unmarshal(b []byte) error {
  1318. return m.Unmarshal(b)
  1319. }
  1320. func (m *ResponseEcho) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1321. if deterministic {
  1322. return xxx_messageInfo_ResponseEcho.Marshal(b, m, deterministic)
  1323. } else {
  1324. b = b[:cap(b)]
  1325. n, err := m.MarshalToSizedBuffer(b)
  1326. if err != nil {
  1327. return nil, err
  1328. }
  1329. return b[:n], nil
  1330. }
  1331. }
  1332. func (m *ResponseEcho) XXX_Merge(src proto.Message) {
  1333. xxx_messageInfo_ResponseEcho.Merge(m, src)
  1334. }
  1335. func (m *ResponseEcho) XXX_Size() int {
  1336. return m.Size()
  1337. }
  1338. func (m *ResponseEcho) XXX_DiscardUnknown() {
  1339. xxx_messageInfo_ResponseEcho.DiscardUnknown(m)
  1340. }
  1341. var xxx_messageInfo_ResponseEcho proto.InternalMessageInfo
  1342. func (m *ResponseEcho) GetMessage() string {
  1343. if m != nil {
  1344. return m.Message
  1345. }
  1346. return ""
  1347. }
  1348. type ResponseFlush struct {
  1349. }
  1350. func (m *ResponseFlush) Reset() { *m = ResponseFlush{} }
  1351. func (m *ResponseFlush) String() string { return proto.CompactTextString(m) }
  1352. func (*ResponseFlush) ProtoMessage() {}
  1353. func (*ResponseFlush) Descriptor() ([]byte, []int) {
  1354. return fileDescriptor_252557cfdd89a31a, []int{18}
  1355. }
  1356. func (m *ResponseFlush) XXX_Unmarshal(b []byte) error {
  1357. return m.Unmarshal(b)
  1358. }
  1359. func (m *ResponseFlush) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1360. if deterministic {
  1361. return xxx_messageInfo_ResponseFlush.Marshal(b, m, deterministic)
  1362. } else {
  1363. b = b[:cap(b)]
  1364. n, err := m.MarshalToSizedBuffer(b)
  1365. if err != nil {
  1366. return nil, err
  1367. }
  1368. return b[:n], nil
  1369. }
  1370. }
  1371. func (m *ResponseFlush) XXX_Merge(src proto.Message) {
  1372. xxx_messageInfo_ResponseFlush.Merge(m, src)
  1373. }
  1374. func (m *ResponseFlush) XXX_Size() int {
  1375. return m.Size()
  1376. }
  1377. func (m *ResponseFlush) XXX_DiscardUnknown() {
  1378. xxx_messageInfo_ResponseFlush.DiscardUnknown(m)
  1379. }
  1380. var xxx_messageInfo_ResponseFlush proto.InternalMessageInfo
  1381. type ResponseInfo struct {
  1382. Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
  1383. // this is the software version of the application. TODO: remove?
  1384. Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
  1385. AppVersion uint64 `protobuf:"varint,3,opt,name=app_version,json=appVersion,proto3" json:"app_version,omitempty"`
  1386. LastBlockHeight int64 `protobuf:"varint,4,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"`
  1387. LastBlockAppHash []byte `protobuf:"bytes,5,opt,name=last_block_app_hash,json=lastBlockAppHash,proto3" json:"last_block_app_hash,omitempty"`
  1388. }
  1389. func (m *ResponseInfo) Reset() { *m = ResponseInfo{} }
  1390. func (m *ResponseInfo) String() string { return proto.CompactTextString(m) }
  1391. func (*ResponseInfo) ProtoMessage() {}
  1392. func (*ResponseInfo) Descriptor() ([]byte, []int) {
  1393. return fileDescriptor_252557cfdd89a31a, []int{19}
  1394. }
  1395. func (m *ResponseInfo) XXX_Unmarshal(b []byte) error {
  1396. return m.Unmarshal(b)
  1397. }
  1398. func (m *ResponseInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1399. if deterministic {
  1400. return xxx_messageInfo_ResponseInfo.Marshal(b, m, deterministic)
  1401. } else {
  1402. b = b[:cap(b)]
  1403. n, err := m.MarshalToSizedBuffer(b)
  1404. if err != nil {
  1405. return nil, err
  1406. }
  1407. return b[:n], nil
  1408. }
  1409. }
  1410. func (m *ResponseInfo) XXX_Merge(src proto.Message) {
  1411. xxx_messageInfo_ResponseInfo.Merge(m, src)
  1412. }
  1413. func (m *ResponseInfo) XXX_Size() int {
  1414. return m.Size()
  1415. }
  1416. func (m *ResponseInfo) XXX_DiscardUnknown() {
  1417. xxx_messageInfo_ResponseInfo.DiscardUnknown(m)
  1418. }
  1419. var xxx_messageInfo_ResponseInfo proto.InternalMessageInfo
  1420. func (m *ResponseInfo) GetData() string {
  1421. if m != nil {
  1422. return m.Data
  1423. }
  1424. return ""
  1425. }
  1426. func (m *ResponseInfo) GetVersion() string {
  1427. if m != nil {
  1428. return m.Version
  1429. }
  1430. return ""
  1431. }
  1432. func (m *ResponseInfo) GetAppVersion() uint64 {
  1433. if m != nil {
  1434. return m.AppVersion
  1435. }
  1436. return 0
  1437. }
  1438. func (m *ResponseInfo) GetLastBlockHeight() int64 {
  1439. if m != nil {
  1440. return m.LastBlockHeight
  1441. }
  1442. return 0
  1443. }
  1444. func (m *ResponseInfo) GetLastBlockAppHash() []byte {
  1445. if m != nil {
  1446. return m.LastBlockAppHash
  1447. }
  1448. return nil
  1449. }
  1450. type ResponseInitChain struct {
  1451. ConsensusParams *types1.ConsensusParams `protobuf:"bytes,1,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params,omitempty"`
  1452. Validators []ValidatorUpdate `protobuf:"bytes,2,rep,name=validators,proto3" json:"validators"`
  1453. AppHash []byte `protobuf:"bytes,3,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
  1454. }
  1455. func (m *ResponseInitChain) Reset() { *m = ResponseInitChain{} }
  1456. func (m *ResponseInitChain) String() string { return proto.CompactTextString(m) }
  1457. func (*ResponseInitChain) ProtoMessage() {}
  1458. func (*ResponseInitChain) Descriptor() ([]byte, []int) {
  1459. return fileDescriptor_252557cfdd89a31a, []int{20}
  1460. }
  1461. func (m *ResponseInitChain) XXX_Unmarshal(b []byte) error {
  1462. return m.Unmarshal(b)
  1463. }
  1464. func (m *ResponseInitChain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1465. if deterministic {
  1466. return xxx_messageInfo_ResponseInitChain.Marshal(b, m, deterministic)
  1467. } else {
  1468. b = b[:cap(b)]
  1469. n, err := m.MarshalToSizedBuffer(b)
  1470. if err != nil {
  1471. return nil, err
  1472. }
  1473. return b[:n], nil
  1474. }
  1475. }
  1476. func (m *ResponseInitChain) XXX_Merge(src proto.Message) {
  1477. xxx_messageInfo_ResponseInitChain.Merge(m, src)
  1478. }
  1479. func (m *ResponseInitChain) XXX_Size() int {
  1480. return m.Size()
  1481. }
  1482. func (m *ResponseInitChain) XXX_DiscardUnknown() {
  1483. xxx_messageInfo_ResponseInitChain.DiscardUnknown(m)
  1484. }
  1485. var xxx_messageInfo_ResponseInitChain proto.InternalMessageInfo
  1486. func (m *ResponseInitChain) GetConsensusParams() *types1.ConsensusParams {
  1487. if m != nil {
  1488. return m.ConsensusParams
  1489. }
  1490. return nil
  1491. }
  1492. func (m *ResponseInitChain) GetValidators() []ValidatorUpdate {
  1493. if m != nil {
  1494. return m.Validators
  1495. }
  1496. return nil
  1497. }
  1498. func (m *ResponseInitChain) GetAppHash() []byte {
  1499. if m != nil {
  1500. return m.AppHash
  1501. }
  1502. return nil
  1503. }
  1504. type ResponseQuery struct {
  1505. Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
  1506. // bytes data = 2; // use "value" instead.
  1507. Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
  1508. Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
  1509. Index int64 `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"`
  1510. Key []byte `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"`
  1511. Value []byte `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"`
  1512. ProofOps *crypto.ProofOps `protobuf:"bytes,8,opt,name=proof_ops,json=proofOps,proto3" json:"proof_ops,omitempty"`
  1513. Height int64 `protobuf:"varint,9,opt,name=height,proto3" json:"height,omitempty"`
  1514. Codespace string `protobuf:"bytes,10,opt,name=codespace,proto3" json:"codespace,omitempty"`
  1515. }
  1516. func (m *ResponseQuery) Reset() { *m = ResponseQuery{} }
  1517. func (m *ResponseQuery) String() string { return proto.CompactTextString(m) }
  1518. func (*ResponseQuery) ProtoMessage() {}
  1519. func (*ResponseQuery) Descriptor() ([]byte, []int) {
  1520. return fileDescriptor_252557cfdd89a31a, []int{21}
  1521. }
  1522. func (m *ResponseQuery) XXX_Unmarshal(b []byte) error {
  1523. return m.Unmarshal(b)
  1524. }
  1525. func (m *ResponseQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1526. if deterministic {
  1527. return xxx_messageInfo_ResponseQuery.Marshal(b, m, deterministic)
  1528. } else {
  1529. b = b[:cap(b)]
  1530. n, err := m.MarshalToSizedBuffer(b)
  1531. if err != nil {
  1532. return nil, err
  1533. }
  1534. return b[:n], nil
  1535. }
  1536. }
  1537. func (m *ResponseQuery) XXX_Merge(src proto.Message) {
  1538. xxx_messageInfo_ResponseQuery.Merge(m, src)
  1539. }
  1540. func (m *ResponseQuery) XXX_Size() int {
  1541. return m.Size()
  1542. }
  1543. func (m *ResponseQuery) XXX_DiscardUnknown() {
  1544. xxx_messageInfo_ResponseQuery.DiscardUnknown(m)
  1545. }
  1546. var xxx_messageInfo_ResponseQuery proto.InternalMessageInfo
  1547. func (m *ResponseQuery) GetCode() uint32 {
  1548. if m != nil {
  1549. return m.Code
  1550. }
  1551. return 0
  1552. }
  1553. func (m *ResponseQuery) GetLog() string {
  1554. if m != nil {
  1555. return m.Log
  1556. }
  1557. return ""
  1558. }
  1559. func (m *ResponseQuery) GetInfo() string {
  1560. if m != nil {
  1561. return m.Info
  1562. }
  1563. return ""
  1564. }
  1565. func (m *ResponseQuery) GetIndex() int64 {
  1566. if m != nil {
  1567. return m.Index
  1568. }
  1569. return 0
  1570. }
  1571. func (m *ResponseQuery) GetKey() []byte {
  1572. if m != nil {
  1573. return m.Key
  1574. }
  1575. return nil
  1576. }
  1577. func (m *ResponseQuery) GetValue() []byte {
  1578. if m != nil {
  1579. return m.Value
  1580. }
  1581. return nil
  1582. }
  1583. func (m *ResponseQuery) GetProofOps() *crypto.ProofOps {
  1584. if m != nil {
  1585. return m.ProofOps
  1586. }
  1587. return nil
  1588. }
  1589. func (m *ResponseQuery) GetHeight() int64 {
  1590. if m != nil {
  1591. return m.Height
  1592. }
  1593. return 0
  1594. }
  1595. func (m *ResponseQuery) GetCodespace() string {
  1596. if m != nil {
  1597. return m.Codespace
  1598. }
  1599. return ""
  1600. }
  1601. type ResponseBeginBlock struct {
  1602. Events []Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
  1603. }
  1604. func (m *ResponseBeginBlock) Reset() { *m = ResponseBeginBlock{} }
  1605. func (m *ResponseBeginBlock) String() string { return proto.CompactTextString(m) }
  1606. func (*ResponseBeginBlock) ProtoMessage() {}
  1607. func (*ResponseBeginBlock) Descriptor() ([]byte, []int) {
  1608. return fileDescriptor_252557cfdd89a31a, []int{22}
  1609. }
  1610. func (m *ResponseBeginBlock) XXX_Unmarshal(b []byte) error {
  1611. return m.Unmarshal(b)
  1612. }
  1613. func (m *ResponseBeginBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1614. if deterministic {
  1615. return xxx_messageInfo_ResponseBeginBlock.Marshal(b, m, deterministic)
  1616. } else {
  1617. b = b[:cap(b)]
  1618. n, err := m.MarshalToSizedBuffer(b)
  1619. if err != nil {
  1620. return nil, err
  1621. }
  1622. return b[:n], nil
  1623. }
  1624. }
  1625. func (m *ResponseBeginBlock) XXX_Merge(src proto.Message) {
  1626. xxx_messageInfo_ResponseBeginBlock.Merge(m, src)
  1627. }
  1628. func (m *ResponseBeginBlock) XXX_Size() int {
  1629. return m.Size()
  1630. }
  1631. func (m *ResponseBeginBlock) XXX_DiscardUnknown() {
  1632. xxx_messageInfo_ResponseBeginBlock.DiscardUnknown(m)
  1633. }
  1634. var xxx_messageInfo_ResponseBeginBlock proto.InternalMessageInfo
  1635. func (m *ResponseBeginBlock) GetEvents() []Event {
  1636. if m != nil {
  1637. return m.Events
  1638. }
  1639. return nil
  1640. }
  1641. type ResponseCheckTx struct {
  1642. Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
  1643. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  1644. Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
  1645. Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
  1646. GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,proto3" json:"gas_wanted,omitempty"`
  1647. GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,proto3" json:"gas_used,omitempty"`
  1648. Events []Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"`
  1649. Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"`
  1650. Sender string `protobuf:"bytes,9,opt,name=sender,proto3" json:"sender,omitempty"`
  1651. Priority int64 `protobuf:"varint,10,opt,name=priority,proto3" json:"priority,omitempty"`
  1652. // mempool_error is set by Tendermint.
  1653. // ABCI applictions creating a ResponseCheckTX should not set mempool_error.
  1654. MempoolError string `protobuf:"bytes,11,opt,name=mempool_error,json=mempoolError,proto3" json:"mempool_error,omitempty"`
  1655. }
  1656. func (m *ResponseCheckTx) Reset() { *m = ResponseCheckTx{} }
  1657. func (m *ResponseCheckTx) String() string { return proto.CompactTextString(m) }
  1658. func (*ResponseCheckTx) ProtoMessage() {}
  1659. func (*ResponseCheckTx) Descriptor() ([]byte, []int) {
  1660. return fileDescriptor_252557cfdd89a31a, []int{23}
  1661. }
  1662. func (m *ResponseCheckTx) XXX_Unmarshal(b []byte) error {
  1663. return m.Unmarshal(b)
  1664. }
  1665. func (m *ResponseCheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1666. if deterministic {
  1667. return xxx_messageInfo_ResponseCheckTx.Marshal(b, m, deterministic)
  1668. } else {
  1669. b = b[:cap(b)]
  1670. n, err := m.MarshalToSizedBuffer(b)
  1671. if err != nil {
  1672. return nil, err
  1673. }
  1674. return b[:n], nil
  1675. }
  1676. }
  1677. func (m *ResponseCheckTx) XXX_Merge(src proto.Message) {
  1678. xxx_messageInfo_ResponseCheckTx.Merge(m, src)
  1679. }
  1680. func (m *ResponseCheckTx) XXX_Size() int {
  1681. return m.Size()
  1682. }
  1683. func (m *ResponseCheckTx) XXX_DiscardUnknown() {
  1684. xxx_messageInfo_ResponseCheckTx.DiscardUnknown(m)
  1685. }
  1686. var xxx_messageInfo_ResponseCheckTx proto.InternalMessageInfo
  1687. func (m *ResponseCheckTx) GetCode() uint32 {
  1688. if m != nil {
  1689. return m.Code
  1690. }
  1691. return 0
  1692. }
  1693. func (m *ResponseCheckTx) GetData() []byte {
  1694. if m != nil {
  1695. return m.Data
  1696. }
  1697. return nil
  1698. }
  1699. func (m *ResponseCheckTx) GetLog() string {
  1700. if m != nil {
  1701. return m.Log
  1702. }
  1703. return ""
  1704. }
  1705. func (m *ResponseCheckTx) GetInfo() string {
  1706. if m != nil {
  1707. return m.Info
  1708. }
  1709. return ""
  1710. }
  1711. func (m *ResponseCheckTx) GetGasWanted() int64 {
  1712. if m != nil {
  1713. return m.GasWanted
  1714. }
  1715. return 0
  1716. }
  1717. func (m *ResponseCheckTx) GetGasUsed() int64 {
  1718. if m != nil {
  1719. return m.GasUsed
  1720. }
  1721. return 0
  1722. }
  1723. func (m *ResponseCheckTx) GetEvents() []Event {
  1724. if m != nil {
  1725. return m.Events
  1726. }
  1727. return nil
  1728. }
  1729. func (m *ResponseCheckTx) GetCodespace() string {
  1730. if m != nil {
  1731. return m.Codespace
  1732. }
  1733. return ""
  1734. }
  1735. func (m *ResponseCheckTx) GetSender() string {
  1736. if m != nil {
  1737. return m.Sender
  1738. }
  1739. return ""
  1740. }
  1741. func (m *ResponseCheckTx) GetPriority() int64 {
  1742. if m != nil {
  1743. return m.Priority
  1744. }
  1745. return 0
  1746. }
  1747. func (m *ResponseCheckTx) GetMempoolError() string {
  1748. if m != nil {
  1749. return m.MempoolError
  1750. }
  1751. return ""
  1752. }
  1753. type ResponseDeliverTx struct {
  1754. Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
  1755. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  1756. Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
  1757. Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
  1758. GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,proto3" json:"gas_wanted,omitempty"`
  1759. GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,proto3" json:"gas_used,omitempty"`
  1760. Events []Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"`
  1761. Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"`
  1762. }
  1763. func (m *ResponseDeliverTx) Reset() { *m = ResponseDeliverTx{} }
  1764. func (m *ResponseDeliverTx) String() string { return proto.CompactTextString(m) }
  1765. func (*ResponseDeliverTx) ProtoMessage() {}
  1766. func (*ResponseDeliverTx) Descriptor() ([]byte, []int) {
  1767. return fileDescriptor_252557cfdd89a31a, []int{24}
  1768. }
  1769. func (m *ResponseDeliverTx) XXX_Unmarshal(b []byte) error {
  1770. return m.Unmarshal(b)
  1771. }
  1772. func (m *ResponseDeliverTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1773. if deterministic {
  1774. return xxx_messageInfo_ResponseDeliverTx.Marshal(b, m, deterministic)
  1775. } else {
  1776. b = b[:cap(b)]
  1777. n, err := m.MarshalToSizedBuffer(b)
  1778. if err != nil {
  1779. return nil, err
  1780. }
  1781. return b[:n], nil
  1782. }
  1783. }
  1784. func (m *ResponseDeliverTx) XXX_Merge(src proto.Message) {
  1785. xxx_messageInfo_ResponseDeliverTx.Merge(m, src)
  1786. }
  1787. func (m *ResponseDeliverTx) XXX_Size() int {
  1788. return m.Size()
  1789. }
  1790. func (m *ResponseDeliverTx) XXX_DiscardUnknown() {
  1791. xxx_messageInfo_ResponseDeliverTx.DiscardUnknown(m)
  1792. }
  1793. var xxx_messageInfo_ResponseDeliverTx proto.InternalMessageInfo
  1794. func (m *ResponseDeliverTx) GetCode() uint32 {
  1795. if m != nil {
  1796. return m.Code
  1797. }
  1798. return 0
  1799. }
  1800. func (m *ResponseDeliverTx) GetData() []byte {
  1801. if m != nil {
  1802. return m.Data
  1803. }
  1804. return nil
  1805. }
  1806. func (m *ResponseDeliverTx) GetLog() string {
  1807. if m != nil {
  1808. return m.Log
  1809. }
  1810. return ""
  1811. }
  1812. func (m *ResponseDeliverTx) GetInfo() string {
  1813. if m != nil {
  1814. return m.Info
  1815. }
  1816. return ""
  1817. }
  1818. func (m *ResponseDeliverTx) GetGasWanted() int64 {
  1819. if m != nil {
  1820. return m.GasWanted
  1821. }
  1822. return 0
  1823. }
  1824. func (m *ResponseDeliverTx) GetGasUsed() int64 {
  1825. if m != nil {
  1826. return m.GasUsed
  1827. }
  1828. return 0
  1829. }
  1830. func (m *ResponseDeliverTx) GetEvents() []Event {
  1831. if m != nil {
  1832. return m.Events
  1833. }
  1834. return nil
  1835. }
  1836. func (m *ResponseDeliverTx) GetCodespace() string {
  1837. if m != nil {
  1838. return m.Codespace
  1839. }
  1840. return ""
  1841. }
  1842. type ResponseEndBlock struct {
  1843. ValidatorUpdates []ValidatorUpdate `protobuf:"bytes,1,rep,name=validator_updates,json=validatorUpdates,proto3" json:"validator_updates"`
  1844. ConsensusParamUpdates *types1.ConsensusParams `protobuf:"bytes,2,opt,name=consensus_param_updates,json=consensusParamUpdates,proto3" json:"consensus_param_updates,omitempty"`
  1845. Events []Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"`
  1846. }
  1847. func (m *ResponseEndBlock) Reset() { *m = ResponseEndBlock{} }
  1848. func (m *ResponseEndBlock) String() string { return proto.CompactTextString(m) }
  1849. func (*ResponseEndBlock) ProtoMessage() {}
  1850. func (*ResponseEndBlock) Descriptor() ([]byte, []int) {
  1851. return fileDescriptor_252557cfdd89a31a, []int{25}
  1852. }
  1853. func (m *ResponseEndBlock) XXX_Unmarshal(b []byte) error {
  1854. return m.Unmarshal(b)
  1855. }
  1856. func (m *ResponseEndBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1857. if deterministic {
  1858. return xxx_messageInfo_ResponseEndBlock.Marshal(b, m, deterministic)
  1859. } else {
  1860. b = b[:cap(b)]
  1861. n, err := m.MarshalToSizedBuffer(b)
  1862. if err != nil {
  1863. return nil, err
  1864. }
  1865. return b[:n], nil
  1866. }
  1867. }
  1868. func (m *ResponseEndBlock) XXX_Merge(src proto.Message) {
  1869. xxx_messageInfo_ResponseEndBlock.Merge(m, src)
  1870. }
  1871. func (m *ResponseEndBlock) XXX_Size() int {
  1872. return m.Size()
  1873. }
  1874. func (m *ResponseEndBlock) XXX_DiscardUnknown() {
  1875. xxx_messageInfo_ResponseEndBlock.DiscardUnknown(m)
  1876. }
  1877. var xxx_messageInfo_ResponseEndBlock proto.InternalMessageInfo
  1878. func (m *ResponseEndBlock) GetValidatorUpdates() []ValidatorUpdate {
  1879. if m != nil {
  1880. return m.ValidatorUpdates
  1881. }
  1882. return nil
  1883. }
  1884. func (m *ResponseEndBlock) GetConsensusParamUpdates() *types1.ConsensusParams {
  1885. if m != nil {
  1886. return m.ConsensusParamUpdates
  1887. }
  1888. return nil
  1889. }
  1890. func (m *ResponseEndBlock) GetEvents() []Event {
  1891. if m != nil {
  1892. return m.Events
  1893. }
  1894. return nil
  1895. }
  1896. type ResponseCommit struct {
  1897. // reserve 1
  1898. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  1899. RetainHeight int64 `protobuf:"varint,3,opt,name=retain_height,json=retainHeight,proto3" json:"retain_height,omitempty"`
  1900. }
  1901. func (m *ResponseCommit) Reset() { *m = ResponseCommit{} }
  1902. func (m *ResponseCommit) String() string { return proto.CompactTextString(m) }
  1903. func (*ResponseCommit) ProtoMessage() {}
  1904. func (*ResponseCommit) Descriptor() ([]byte, []int) {
  1905. return fileDescriptor_252557cfdd89a31a, []int{26}
  1906. }
  1907. func (m *ResponseCommit) XXX_Unmarshal(b []byte) error {
  1908. return m.Unmarshal(b)
  1909. }
  1910. func (m *ResponseCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1911. if deterministic {
  1912. return xxx_messageInfo_ResponseCommit.Marshal(b, m, deterministic)
  1913. } else {
  1914. b = b[:cap(b)]
  1915. n, err := m.MarshalToSizedBuffer(b)
  1916. if err != nil {
  1917. return nil, err
  1918. }
  1919. return b[:n], nil
  1920. }
  1921. }
  1922. func (m *ResponseCommit) XXX_Merge(src proto.Message) {
  1923. xxx_messageInfo_ResponseCommit.Merge(m, src)
  1924. }
  1925. func (m *ResponseCommit) XXX_Size() int {
  1926. return m.Size()
  1927. }
  1928. func (m *ResponseCommit) XXX_DiscardUnknown() {
  1929. xxx_messageInfo_ResponseCommit.DiscardUnknown(m)
  1930. }
  1931. var xxx_messageInfo_ResponseCommit proto.InternalMessageInfo
  1932. func (m *ResponseCommit) GetData() []byte {
  1933. if m != nil {
  1934. return m.Data
  1935. }
  1936. return nil
  1937. }
  1938. func (m *ResponseCommit) GetRetainHeight() int64 {
  1939. if m != nil {
  1940. return m.RetainHeight
  1941. }
  1942. return 0
  1943. }
  1944. type ResponseListSnapshots struct {
  1945. Snapshots []*Snapshot `protobuf:"bytes,1,rep,name=snapshots,proto3" json:"snapshots,omitempty"`
  1946. }
  1947. func (m *ResponseListSnapshots) Reset() { *m = ResponseListSnapshots{} }
  1948. func (m *ResponseListSnapshots) String() string { return proto.CompactTextString(m) }
  1949. func (*ResponseListSnapshots) ProtoMessage() {}
  1950. func (*ResponseListSnapshots) Descriptor() ([]byte, []int) {
  1951. return fileDescriptor_252557cfdd89a31a, []int{27}
  1952. }
  1953. func (m *ResponseListSnapshots) XXX_Unmarshal(b []byte) error {
  1954. return m.Unmarshal(b)
  1955. }
  1956. func (m *ResponseListSnapshots) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1957. if deterministic {
  1958. return xxx_messageInfo_ResponseListSnapshots.Marshal(b, m, deterministic)
  1959. } else {
  1960. b = b[:cap(b)]
  1961. n, err := m.MarshalToSizedBuffer(b)
  1962. if err != nil {
  1963. return nil, err
  1964. }
  1965. return b[:n], nil
  1966. }
  1967. }
  1968. func (m *ResponseListSnapshots) XXX_Merge(src proto.Message) {
  1969. xxx_messageInfo_ResponseListSnapshots.Merge(m, src)
  1970. }
  1971. func (m *ResponseListSnapshots) XXX_Size() int {
  1972. return m.Size()
  1973. }
  1974. func (m *ResponseListSnapshots) XXX_DiscardUnknown() {
  1975. xxx_messageInfo_ResponseListSnapshots.DiscardUnknown(m)
  1976. }
  1977. var xxx_messageInfo_ResponseListSnapshots proto.InternalMessageInfo
  1978. func (m *ResponseListSnapshots) GetSnapshots() []*Snapshot {
  1979. if m != nil {
  1980. return m.Snapshots
  1981. }
  1982. return nil
  1983. }
  1984. type ResponseOfferSnapshot struct {
  1985. Result ResponseOfferSnapshot_Result `protobuf:"varint,1,opt,name=result,proto3,enum=tendermint.abci.ResponseOfferSnapshot_Result" json:"result,omitempty"`
  1986. }
  1987. func (m *ResponseOfferSnapshot) Reset() { *m = ResponseOfferSnapshot{} }
  1988. func (m *ResponseOfferSnapshot) String() string { return proto.CompactTextString(m) }
  1989. func (*ResponseOfferSnapshot) ProtoMessage() {}
  1990. func (*ResponseOfferSnapshot) Descriptor() ([]byte, []int) {
  1991. return fileDescriptor_252557cfdd89a31a, []int{28}
  1992. }
  1993. func (m *ResponseOfferSnapshot) XXX_Unmarshal(b []byte) error {
  1994. return m.Unmarshal(b)
  1995. }
  1996. func (m *ResponseOfferSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1997. if deterministic {
  1998. return xxx_messageInfo_ResponseOfferSnapshot.Marshal(b, m, deterministic)
  1999. } else {
  2000. b = b[:cap(b)]
  2001. n, err := m.MarshalToSizedBuffer(b)
  2002. if err != nil {
  2003. return nil, err
  2004. }
  2005. return b[:n], nil
  2006. }
  2007. }
  2008. func (m *ResponseOfferSnapshot) XXX_Merge(src proto.Message) {
  2009. xxx_messageInfo_ResponseOfferSnapshot.Merge(m, src)
  2010. }
  2011. func (m *ResponseOfferSnapshot) XXX_Size() int {
  2012. return m.Size()
  2013. }
  2014. func (m *ResponseOfferSnapshot) XXX_DiscardUnknown() {
  2015. xxx_messageInfo_ResponseOfferSnapshot.DiscardUnknown(m)
  2016. }
  2017. var xxx_messageInfo_ResponseOfferSnapshot proto.InternalMessageInfo
  2018. func (m *ResponseOfferSnapshot) GetResult() ResponseOfferSnapshot_Result {
  2019. if m != nil {
  2020. return m.Result
  2021. }
  2022. return ResponseOfferSnapshot_UNKNOWN
  2023. }
  2024. type ResponseLoadSnapshotChunk struct {
  2025. Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"`
  2026. }
  2027. func (m *ResponseLoadSnapshotChunk) Reset() { *m = ResponseLoadSnapshotChunk{} }
  2028. func (m *ResponseLoadSnapshotChunk) String() string { return proto.CompactTextString(m) }
  2029. func (*ResponseLoadSnapshotChunk) ProtoMessage() {}
  2030. func (*ResponseLoadSnapshotChunk) Descriptor() ([]byte, []int) {
  2031. return fileDescriptor_252557cfdd89a31a, []int{29}
  2032. }
  2033. func (m *ResponseLoadSnapshotChunk) XXX_Unmarshal(b []byte) error {
  2034. return m.Unmarshal(b)
  2035. }
  2036. func (m *ResponseLoadSnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2037. if deterministic {
  2038. return xxx_messageInfo_ResponseLoadSnapshotChunk.Marshal(b, m, deterministic)
  2039. } else {
  2040. b = b[:cap(b)]
  2041. n, err := m.MarshalToSizedBuffer(b)
  2042. if err != nil {
  2043. return nil, err
  2044. }
  2045. return b[:n], nil
  2046. }
  2047. }
  2048. func (m *ResponseLoadSnapshotChunk) XXX_Merge(src proto.Message) {
  2049. xxx_messageInfo_ResponseLoadSnapshotChunk.Merge(m, src)
  2050. }
  2051. func (m *ResponseLoadSnapshotChunk) XXX_Size() int {
  2052. return m.Size()
  2053. }
  2054. func (m *ResponseLoadSnapshotChunk) XXX_DiscardUnknown() {
  2055. xxx_messageInfo_ResponseLoadSnapshotChunk.DiscardUnknown(m)
  2056. }
  2057. var xxx_messageInfo_ResponseLoadSnapshotChunk proto.InternalMessageInfo
  2058. func (m *ResponseLoadSnapshotChunk) GetChunk() []byte {
  2059. if m != nil {
  2060. return m.Chunk
  2061. }
  2062. return nil
  2063. }
  2064. type ResponseApplySnapshotChunk struct {
  2065. Result ResponseApplySnapshotChunk_Result `protobuf:"varint,1,opt,name=result,proto3,enum=tendermint.abci.ResponseApplySnapshotChunk_Result" json:"result,omitempty"`
  2066. RefetchChunks []uint32 `protobuf:"varint,2,rep,packed,name=refetch_chunks,json=refetchChunks,proto3" json:"refetch_chunks,omitempty"`
  2067. RejectSenders []string `protobuf:"bytes,3,rep,name=reject_senders,json=rejectSenders,proto3" json:"reject_senders,omitempty"`
  2068. }
  2069. func (m *ResponseApplySnapshotChunk) Reset() { *m = ResponseApplySnapshotChunk{} }
  2070. func (m *ResponseApplySnapshotChunk) String() string { return proto.CompactTextString(m) }
  2071. func (*ResponseApplySnapshotChunk) ProtoMessage() {}
  2072. func (*ResponseApplySnapshotChunk) Descriptor() ([]byte, []int) {
  2073. return fileDescriptor_252557cfdd89a31a, []int{30}
  2074. }
  2075. func (m *ResponseApplySnapshotChunk) XXX_Unmarshal(b []byte) error {
  2076. return m.Unmarshal(b)
  2077. }
  2078. func (m *ResponseApplySnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2079. if deterministic {
  2080. return xxx_messageInfo_ResponseApplySnapshotChunk.Marshal(b, m, deterministic)
  2081. } else {
  2082. b = b[:cap(b)]
  2083. n, err := m.MarshalToSizedBuffer(b)
  2084. if err != nil {
  2085. return nil, err
  2086. }
  2087. return b[:n], nil
  2088. }
  2089. }
  2090. func (m *ResponseApplySnapshotChunk) XXX_Merge(src proto.Message) {
  2091. xxx_messageInfo_ResponseApplySnapshotChunk.Merge(m, src)
  2092. }
  2093. func (m *ResponseApplySnapshotChunk) XXX_Size() int {
  2094. return m.Size()
  2095. }
  2096. func (m *ResponseApplySnapshotChunk) XXX_DiscardUnknown() {
  2097. xxx_messageInfo_ResponseApplySnapshotChunk.DiscardUnknown(m)
  2098. }
  2099. var xxx_messageInfo_ResponseApplySnapshotChunk proto.InternalMessageInfo
  2100. func (m *ResponseApplySnapshotChunk) GetResult() ResponseApplySnapshotChunk_Result {
  2101. if m != nil {
  2102. return m.Result
  2103. }
  2104. return ResponseApplySnapshotChunk_UNKNOWN
  2105. }
  2106. func (m *ResponseApplySnapshotChunk) GetRefetchChunks() []uint32 {
  2107. if m != nil {
  2108. return m.RefetchChunks
  2109. }
  2110. return nil
  2111. }
  2112. func (m *ResponseApplySnapshotChunk) GetRejectSenders() []string {
  2113. if m != nil {
  2114. return m.RejectSenders
  2115. }
  2116. return nil
  2117. }
  2118. type LastCommitInfo struct {
  2119. Round int32 `protobuf:"varint,1,opt,name=round,proto3" json:"round,omitempty"`
  2120. Votes []VoteInfo `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes"`
  2121. }
  2122. func (m *LastCommitInfo) Reset() { *m = LastCommitInfo{} }
  2123. func (m *LastCommitInfo) String() string { return proto.CompactTextString(m) }
  2124. func (*LastCommitInfo) ProtoMessage() {}
  2125. func (*LastCommitInfo) Descriptor() ([]byte, []int) {
  2126. return fileDescriptor_252557cfdd89a31a, []int{31}
  2127. }
  2128. func (m *LastCommitInfo) XXX_Unmarshal(b []byte) error {
  2129. return m.Unmarshal(b)
  2130. }
  2131. func (m *LastCommitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2132. if deterministic {
  2133. return xxx_messageInfo_LastCommitInfo.Marshal(b, m, deterministic)
  2134. } else {
  2135. b = b[:cap(b)]
  2136. n, err := m.MarshalToSizedBuffer(b)
  2137. if err != nil {
  2138. return nil, err
  2139. }
  2140. return b[:n], nil
  2141. }
  2142. }
  2143. func (m *LastCommitInfo) XXX_Merge(src proto.Message) {
  2144. xxx_messageInfo_LastCommitInfo.Merge(m, src)
  2145. }
  2146. func (m *LastCommitInfo) XXX_Size() int {
  2147. return m.Size()
  2148. }
  2149. func (m *LastCommitInfo) XXX_DiscardUnknown() {
  2150. xxx_messageInfo_LastCommitInfo.DiscardUnknown(m)
  2151. }
  2152. var xxx_messageInfo_LastCommitInfo proto.InternalMessageInfo
  2153. func (m *LastCommitInfo) GetRound() int32 {
  2154. if m != nil {
  2155. return m.Round
  2156. }
  2157. return 0
  2158. }
  2159. func (m *LastCommitInfo) GetVotes() []VoteInfo {
  2160. if m != nil {
  2161. return m.Votes
  2162. }
  2163. return nil
  2164. }
  2165. // Event allows application developers to attach additional information to
  2166. // ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx.
  2167. // Later, transactions may be queried using these events.
  2168. type Event struct {
  2169. Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
  2170. Attributes []EventAttribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"`
  2171. }
  2172. func (m *Event) Reset() { *m = Event{} }
  2173. func (m *Event) String() string { return proto.CompactTextString(m) }
  2174. func (*Event) ProtoMessage() {}
  2175. func (*Event) Descriptor() ([]byte, []int) {
  2176. return fileDescriptor_252557cfdd89a31a, []int{32}
  2177. }
  2178. func (m *Event) XXX_Unmarshal(b []byte) error {
  2179. return m.Unmarshal(b)
  2180. }
  2181. func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2182. if deterministic {
  2183. return xxx_messageInfo_Event.Marshal(b, m, deterministic)
  2184. } else {
  2185. b = b[:cap(b)]
  2186. n, err := m.MarshalToSizedBuffer(b)
  2187. if err != nil {
  2188. return nil, err
  2189. }
  2190. return b[:n], nil
  2191. }
  2192. }
  2193. func (m *Event) XXX_Merge(src proto.Message) {
  2194. xxx_messageInfo_Event.Merge(m, src)
  2195. }
  2196. func (m *Event) XXX_Size() int {
  2197. return m.Size()
  2198. }
  2199. func (m *Event) XXX_DiscardUnknown() {
  2200. xxx_messageInfo_Event.DiscardUnknown(m)
  2201. }
  2202. var xxx_messageInfo_Event proto.InternalMessageInfo
  2203. func (m *Event) GetType() string {
  2204. if m != nil {
  2205. return m.Type
  2206. }
  2207. return ""
  2208. }
  2209. func (m *Event) GetAttributes() []EventAttribute {
  2210. if m != nil {
  2211. return m.Attributes
  2212. }
  2213. return nil
  2214. }
  2215. // EventAttribute is a single key-value pair, associated with an event.
  2216. type EventAttribute struct {
  2217. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  2218. Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
  2219. Index bool `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
  2220. }
  2221. func (m *EventAttribute) Reset() { *m = EventAttribute{} }
  2222. func (m *EventAttribute) String() string { return proto.CompactTextString(m) }
  2223. func (*EventAttribute) ProtoMessage() {}
  2224. func (*EventAttribute) Descriptor() ([]byte, []int) {
  2225. return fileDescriptor_252557cfdd89a31a, []int{33}
  2226. }
  2227. func (m *EventAttribute) XXX_Unmarshal(b []byte) error {
  2228. return m.Unmarshal(b)
  2229. }
  2230. func (m *EventAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2231. if deterministic {
  2232. return xxx_messageInfo_EventAttribute.Marshal(b, m, deterministic)
  2233. } else {
  2234. b = b[:cap(b)]
  2235. n, err := m.MarshalToSizedBuffer(b)
  2236. if err != nil {
  2237. return nil, err
  2238. }
  2239. return b[:n], nil
  2240. }
  2241. }
  2242. func (m *EventAttribute) XXX_Merge(src proto.Message) {
  2243. xxx_messageInfo_EventAttribute.Merge(m, src)
  2244. }
  2245. func (m *EventAttribute) XXX_Size() int {
  2246. return m.Size()
  2247. }
  2248. func (m *EventAttribute) XXX_DiscardUnknown() {
  2249. xxx_messageInfo_EventAttribute.DiscardUnknown(m)
  2250. }
  2251. var xxx_messageInfo_EventAttribute proto.InternalMessageInfo
  2252. func (m *EventAttribute) GetKey() string {
  2253. if m != nil {
  2254. return m.Key
  2255. }
  2256. return ""
  2257. }
  2258. func (m *EventAttribute) GetValue() string {
  2259. if m != nil {
  2260. return m.Value
  2261. }
  2262. return ""
  2263. }
  2264. func (m *EventAttribute) GetIndex() bool {
  2265. if m != nil {
  2266. return m.Index
  2267. }
  2268. return false
  2269. }
  2270. // TxResult contains results of executing the transaction.
  2271. //
  2272. // One usage is indexing transaction results.
  2273. type TxResult struct {
  2274. Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  2275. Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
  2276. Tx []byte `protobuf:"bytes,3,opt,name=tx,proto3" json:"tx,omitempty"`
  2277. Result ResponseDeliverTx `protobuf:"bytes,4,opt,name=result,proto3" json:"result"`
  2278. }
  2279. func (m *TxResult) Reset() { *m = TxResult{} }
  2280. func (m *TxResult) String() string { return proto.CompactTextString(m) }
  2281. func (*TxResult) ProtoMessage() {}
  2282. func (*TxResult) Descriptor() ([]byte, []int) {
  2283. return fileDescriptor_252557cfdd89a31a, []int{34}
  2284. }
  2285. func (m *TxResult) XXX_Unmarshal(b []byte) error {
  2286. return m.Unmarshal(b)
  2287. }
  2288. func (m *TxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2289. if deterministic {
  2290. return xxx_messageInfo_TxResult.Marshal(b, m, deterministic)
  2291. } else {
  2292. b = b[:cap(b)]
  2293. n, err := m.MarshalToSizedBuffer(b)
  2294. if err != nil {
  2295. return nil, err
  2296. }
  2297. return b[:n], nil
  2298. }
  2299. }
  2300. func (m *TxResult) XXX_Merge(src proto.Message) {
  2301. xxx_messageInfo_TxResult.Merge(m, src)
  2302. }
  2303. func (m *TxResult) XXX_Size() int {
  2304. return m.Size()
  2305. }
  2306. func (m *TxResult) XXX_DiscardUnknown() {
  2307. xxx_messageInfo_TxResult.DiscardUnknown(m)
  2308. }
  2309. var xxx_messageInfo_TxResult proto.InternalMessageInfo
  2310. func (m *TxResult) GetHeight() int64 {
  2311. if m != nil {
  2312. return m.Height
  2313. }
  2314. return 0
  2315. }
  2316. func (m *TxResult) GetIndex() uint32 {
  2317. if m != nil {
  2318. return m.Index
  2319. }
  2320. return 0
  2321. }
  2322. func (m *TxResult) GetTx() []byte {
  2323. if m != nil {
  2324. return m.Tx
  2325. }
  2326. return nil
  2327. }
  2328. func (m *TxResult) GetResult() ResponseDeliverTx {
  2329. if m != nil {
  2330. return m.Result
  2331. }
  2332. return ResponseDeliverTx{}
  2333. }
  2334. // Validator
  2335. type Validator struct {
  2336. Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
  2337. // PubKey pub_key = 2 [(gogoproto.nullable)=false];
  2338. Power int64 `protobuf:"varint,3,opt,name=power,proto3" json:"power,omitempty"`
  2339. }
  2340. func (m *Validator) Reset() { *m = Validator{} }
  2341. func (m *Validator) String() string { return proto.CompactTextString(m) }
  2342. func (*Validator) ProtoMessage() {}
  2343. func (*Validator) Descriptor() ([]byte, []int) {
  2344. return fileDescriptor_252557cfdd89a31a, []int{35}
  2345. }
  2346. func (m *Validator) XXX_Unmarshal(b []byte) error {
  2347. return m.Unmarshal(b)
  2348. }
  2349. func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2350. if deterministic {
  2351. return xxx_messageInfo_Validator.Marshal(b, m, deterministic)
  2352. } else {
  2353. b = b[:cap(b)]
  2354. n, err := m.MarshalToSizedBuffer(b)
  2355. if err != nil {
  2356. return nil, err
  2357. }
  2358. return b[:n], nil
  2359. }
  2360. }
  2361. func (m *Validator) XXX_Merge(src proto.Message) {
  2362. xxx_messageInfo_Validator.Merge(m, src)
  2363. }
  2364. func (m *Validator) XXX_Size() int {
  2365. return m.Size()
  2366. }
  2367. func (m *Validator) XXX_DiscardUnknown() {
  2368. xxx_messageInfo_Validator.DiscardUnknown(m)
  2369. }
  2370. var xxx_messageInfo_Validator proto.InternalMessageInfo
  2371. func (m *Validator) GetAddress() []byte {
  2372. if m != nil {
  2373. return m.Address
  2374. }
  2375. return nil
  2376. }
  2377. func (m *Validator) GetPower() int64 {
  2378. if m != nil {
  2379. return m.Power
  2380. }
  2381. return 0
  2382. }
  2383. // ValidatorUpdate
  2384. type ValidatorUpdate struct {
  2385. PubKey crypto.PublicKey `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key"`
  2386. Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"`
  2387. }
  2388. func (m *ValidatorUpdate) Reset() { *m = ValidatorUpdate{} }
  2389. func (m *ValidatorUpdate) String() string { return proto.CompactTextString(m) }
  2390. func (*ValidatorUpdate) ProtoMessage() {}
  2391. func (*ValidatorUpdate) Descriptor() ([]byte, []int) {
  2392. return fileDescriptor_252557cfdd89a31a, []int{36}
  2393. }
  2394. func (m *ValidatorUpdate) XXX_Unmarshal(b []byte) error {
  2395. return m.Unmarshal(b)
  2396. }
  2397. func (m *ValidatorUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2398. if deterministic {
  2399. return xxx_messageInfo_ValidatorUpdate.Marshal(b, m, deterministic)
  2400. } else {
  2401. b = b[:cap(b)]
  2402. n, err := m.MarshalToSizedBuffer(b)
  2403. if err != nil {
  2404. return nil, err
  2405. }
  2406. return b[:n], nil
  2407. }
  2408. }
  2409. func (m *ValidatorUpdate) XXX_Merge(src proto.Message) {
  2410. xxx_messageInfo_ValidatorUpdate.Merge(m, src)
  2411. }
  2412. func (m *ValidatorUpdate) XXX_Size() int {
  2413. return m.Size()
  2414. }
  2415. func (m *ValidatorUpdate) XXX_DiscardUnknown() {
  2416. xxx_messageInfo_ValidatorUpdate.DiscardUnknown(m)
  2417. }
  2418. var xxx_messageInfo_ValidatorUpdate proto.InternalMessageInfo
  2419. func (m *ValidatorUpdate) GetPubKey() crypto.PublicKey {
  2420. if m != nil {
  2421. return m.PubKey
  2422. }
  2423. return crypto.PublicKey{}
  2424. }
  2425. func (m *ValidatorUpdate) GetPower() int64 {
  2426. if m != nil {
  2427. return m.Power
  2428. }
  2429. return 0
  2430. }
  2431. // VoteInfo
  2432. type VoteInfo struct {
  2433. Validator Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"`
  2434. SignedLastBlock bool `protobuf:"varint,2,opt,name=signed_last_block,json=signedLastBlock,proto3" json:"signed_last_block,omitempty"`
  2435. }
  2436. func (m *VoteInfo) Reset() { *m = VoteInfo{} }
  2437. func (m *VoteInfo) String() string { return proto.CompactTextString(m) }
  2438. func (*VoteInfo) ProtoMessage() {}
  2439. func (*VoteInfo) Descriptor() ([]byte, []int) {
  2440. return fileDescriptor_252557cfdd89a31a, []int{37}
  2441. }
  2442. func (m *VoteInfo) XXX_Unmarshal(b []byte) error {
  2443. return m.Unmarshal(b)
  2444. }
  2445. func (m *VoteInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2446. if deterministic {
  2447. return xxx_messageInfo_VoteInfo.Marshal(b, m, deterministic)
  2448. } else {
  2449. b = b[:cap(b)]
  2450. n, err := m.MarshalToSizedBuffer(b)
  2451. if err != nil {
  2452. return nil, err
  2453. }
  2454. return b[:n], nil
  2455. }
  2456. }
  2457. func (m *VoteInfo) XXX_Merge(src proto.Message) {
  2458. xxx_messageInfo_VoteInfo.Merge(m, src)
  2459. }
  2460. func (m *VoteInfo) XXX_Size() int {
  2461. return m.Size()
  2462. }
  2463. func (m *VoteInfo) XXX_DiscardUnknown() {
  2464. xxx_messageInfo_VoteInfo.DiscardUnknown(m)
  2465. }
  2466. var xxx_messageInfo_VoteInfo proto.InternalMessageInfo
  2467. func (m *VoteInfo) GetValidator() Validator {
  2468. if m != nil {
  2469. return m.Validator
  2470. }
  2471. return Validator{}
  2472. }
  2473. func (m *VoteInfo) GetSignedLastBlock() bool {
  2474. if m != nil {
  2475. return m.SignedLastBlock
  2476. }
  2477. return false
  2478. }
  2479. type Evidence struct {
  2480. Type EvidenceType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.abci.EvidenceType" json:"type,omitempty"`
  2481. // The offending validator
  2482. Validator Validator `protobuf:"bytes,2,opt,name=validator,proto3" json:"validator"`
  2483. // The height when the offense occurred
  2484. Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
  2485. // The corresponding time where the offense occurred
  2486. Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"`
  2487. // Total voting power of the validator set in case the ABCI application does
  2488. // not store historical validators.
  2489. // https://github.com/tendermint/tendermint/issues/4581
  2490. TotalVotingPower int64 `protobuf:"varint,5,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"`
  2491. }
  2492. func (m *Evidence) Reset() { *m = Evidence{} }
  2493. func (m *Evidence) String() string { return proto.CompactTextString(m) }
  2494. func (*Evidence) ProtoMessage() {}
  2495. func (*Evidence) Descriptor() ([]byte, []int) {
  2496. return fileDescriptor_252557cfdd89a31a, []int{38}
  2497. }
  2498. func (m *Evidence) XXX_Unmarshal(b []byte) error {
  2499. return m.Unmarshal(b)
  2500. }
  2501. func (m *Evidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2502. if deterministic {
  2503. return xxx_messageInfo_Evidence.Marshal(b, m, deterministic)
  2504. } else {
  2505. b = b[:cap(b)]
  2506. n, err := m.MarshalToSizedBuffer(b)
  2507. if err != nil {
  2508. return nil, err
  2509. }
  2510. return b[:n], nil
  2511. }
  2512. }
  2513. func (m *Evidence) XXX_Merge(src proto.Message) {
  2514. xxx_messageInfo_Evidence.Merge(m, src)
  2515. }
  2516. func (m *Evidence) XXX_Size() int {
  2517. return m.Size()
  2518. }
  2519. func (m *Evidence) XXX_DiscardUnknown() {
  2520. xxx_messageInfo_Evidence.DiscardUnknown(m)
  2521. }
  2522. var xxx_messageInfo_Evidence proto.InternalMessageInfo
  2523. func (m *Evidence) GetType() EvidenceType {
  2524. if m != nil {
  2525. return m.Type
  2526. }
  2527. return EvidenceType_UNKNOWN
  2528. }
  2529. func (m *Evidence) GetValidator() Validator {
  2530. if m != nil {
  2531. return m.Validator
  2532. }
  2533. return Validator{}
  2534. }
  2535. func (m *Evidence) GetHeight() int64 {
  2536. if m != nil {
  2537. return m.Height
  2538. }
  2539. return 0
  2540. }
  2541. func (m *Evidence) GetTime() time.Time {
  2542. if m != nil {
  2543. return m.Time
  2544. }
  2545. return time.Time{}
  2546. }
  2547. func (m *Evidence) GetTotalVotingPower() int64 {
  2548. if m != nil {
  2549. return m.TotalVotingPower
  2550. }
  2551. return 0
  2552. }
  2553. type Snapshot struct {
  2554. Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  2555. Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"`
  2556. Chunks uint32 `protobuf:"varint,3,opt,name=chunks,proto3" json:"chunks,omitempty"`
  2557. Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"`
  2558. Metadata []byte `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
  2559. }
  2560. func (m *Snapshot) Reset() { *m = Snapshot{} }
  2561. func (m *Snapshot) String() string { return proto.CompactTextString(m) }
  2562. func (*Snapshot) ProtoMessage() {}
  2563. func (*Snapshot) Descriptor() ([]byte, []int) {
  2564. return fileDescriptor_252557cfdd89a31a, []int{39}
  2565. }
  2566. func (m *Snapshot) XXX_Unmarshal(b []byte) error {
  2567. return m.Unmarshal(b)
  2568. }
  2569. func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2570. if deterministic {
  2571. return xxx_messageInfo_Snapshot.Marshal(b, m, deterministic)
  2572. } else {
  2573. b = b[:cap(b)]
  2574. n, err := m.MarshalToSizedBuffer(b)
  2575. if err != nil {
  2576. return nil, err
  2577. }
  2578. return b[:n], nil
  2579. }
  2580. }
  2581. func (m *Snapshot) XXX_Merge(src proto.Message) {
  2582. xxx_messageInfo_Snapshot.Merge(m, src)
  2583. }
  2584. func (m *Snapshot) XXX_Size() int {
  2585. return m.Size()
  2586. }
  2587. func (m *Snapshot) XXX_DiscardUnknown() {
  2588. xxx_messageInfo_Snapshot.DiscardUnknown(m)
  2589. }
  2590. var xxx_messageInfo_Snapshot proto.InternalMessageInfo
  2591. func (m *Snapshot) GetHeight() uint64 {
  2592. if m != nil {
  2593. return m.Height
  2594. }
  2595. return 0
  2596. }
  2597. func (m *Snapshot) GetFormat() uint32 {
  2598. if m != nil {
  2599. return m.Format
  2600. }
  2601. return 0
  2602. }
  2603. func (m *Snapshot) GetChunks() uint32 {
  2604. if m != nil {
  2605. return m.Chunks
  2606. }
  2607. return 0
  2608. }
  2609. func (m *Snapshot) GetHash() []byte {
  2610. if m != nil {
  2611. return m.Hash
  2612. }
  2613. return nil
  2614. }
  2615. func (m *Snapshot) GetMetadata() []byte {
  2616. if m != nil {
  2617. return m.Metadata
  2618. }
  2619. return nil
  2620. }
  2621. func init() {
  2622. proto.RegisterEnum("tendermint.abci.CheckTxType", CheckTxType_name, CheckTxType_value)
  2623. proto.RegisterEnum("tendermint.abci.EvidenceType", EvidenceType_name, EvidenceType_value)
  2624. proto.RegisterEnum("tendermint.abci.ResponseOfferSnapshot_Result", ResponseOfferSnapshot_Result_name, ResponseOfferSnapshot_Result_value)
  2625. proto.RegisterEnum("tendermint.abci.ResponseApplySnapshotChunk_Result", ResponseApplySnapshotChunk_Result_name, ResponseApplySnapshotChunk_Result_value)
  2626. proto.RegisterType((*Request)(nil), "tendermint.abci.Request")
  2627. proto.RegisterType((*RequestEcho)(nil), "tendermint.abci.RequestEcho")
  2628. proto.RegisterType((*RequestFlush)(nil), "tendermint.abci.RequestFlush")
  2629. proto.RegisterType((*RequestInfo)(nil), "tendermint.abci.RequestInfo")
  2630. proto.RegisterType((*RequestInitChain)(nil), "tendermint.abci.RequestInitChain")
  2631. proto.RegisterType((*RequestQuery)(nil), "tendermint.abci.RequestQuery")
  2632. proto.RegisterType((*RequestBeginBlock)(nil), "tendermint.abci.RequestBeginBlock")
  2633. proto.RegisterType((*RequestCheckTx)(nil), "tendermint.abci.RequestCheckTx")
  2634. proto.RegisterType((*RequestDeliverTx)(nil), "tendermint.abci.RequestDeliverTx")
  2635. proto.RegisterType((*RequestEndBlock)(nil), "tendermint.abci.RequestEndBlock")
  2636. proto.RegisterType((*RequestCommit)(nil), "tendermint.abci.RequestCommit")
  2637. proto.RegisterType((*RequestListSnapshots)(nil), "tendermint.abci.RequestListSnapshots")
  2638. proto.RegisterType((*RequestOfferSnapshot)(nil), "tendermint.abci.RequestOfferSnapshot")
  2639. proto.RegisterType((*RequestLoadSnapshotChunk)(nil), "tendermint.abci.RequestLoadSnapshotChunk")
  2640. proto.RegisterType((*RequestApplySnapshotChunk)(nil), "tendermint.abci.RequestApplySnapshotChunk")
  2641. proto.RegisterType((*Response)(nil), "tendermint.abci.Response")
  2642. proto.RegisterType((*ResponseException)(nil), "tendermint.abci.ResponseException")
  2643. proto.RegisterType((*ResponseEcho)(nil), "tendermint.abci.ResponseEcho")
  2644. proto.RegisterType((*ResponseFlush)(nil), "tendermint.abci.ResponseFlush")
  2645. proto.RegisterType((*ResponseInfo)(nil), "tendermint.abci.ResponseInfo")
  2646. proto.RegisterType((*ResponseInitChain)(nil), "tendermint.abci.ResponseInitChain")
  2647. proto.RegisterType((*ResponseQuery)(nil), "tendermint.abci.ResponseQuery")
  2648. proto.RegisterType((*ResponseBeginBlock)(nil), "tendermint.abci.ResponseBeginBlock")
  2649. proto.RegisterType((*ResponseCheckTx)(nil), "tendermint.abci.ResponseCheckTx")
  2650. proto.RegisterType((*ResponseDeliverTx)(nil), "tendermint.abci.ResponseDeliverTx")
  2651. proto.RegisterType((*ResponseEndBlock)(nil), "tendermint.abci.ResponseEndBlock")
  2652. proto.RegisterType((*ResponseCommit)(nil), "tendermint.abci.ResponseCommit")
  2653. proto.RegisterType((*ResponseListSnapshots)(nil), "tendermint.abci.ResponseListSnapshots")
  2654. proto.RegisterType((*ResponseOfferSnapshot)(nil), "tendermint.abci.ResponseOfferSnapshot")
  2655. proto.RegisterType((*ResponseLoadSnapshotChunk)(nil), "tendermint.abci.ResponseLoadSnapshotChunk")
  2656. proto.RegisterType((*ResponseApplySnapshotChunk)(nil), "tendermint.abci.ResponseApplySnapshotChunk")
  2657. proto.RegisterType((*LastCommitInfo)(nil), "tendermint.abci.LastCommitInfo")
  2658. proto.RegisterType((*Event)(nil), "tendermint.abci.Event")
  2659. proto.RegisterType((*EventAttribute)(nil), "tendermint.abci.EventAttribute")
  2660. proto.RegisterType((*TxResult)(nil), "tendermint.abci.TxResult")
  2661. proto.RegisterType((*Validator)(nil), "tendermint.abci.Validator")
  2662. proto.RegisterType((*ValidatorUpdate)(nil), "tendermint.abci.ValidatorUpdate")
  2663. proto.RegisterType((*VoteInfo)(nil), "tendermint.abci.VoteInfo")
  2664. proto.RegisterType((*Evidence)(nil), "tendermint.abci.Evidence")
  2665. proto.RegisterType((*Snapshot)(nil), "tendermint.abci.Snapshot")
  2666. }
  2667. func init() { proto.RegisterFile("tendermint/abci/types.proto", fileDescriptor_252557cfdd89a31a) }
  2668. var fileDescriptor_252557cfdd89a31a = []byte{
  2669. // 2627 bytes of a gzipped FileDescriptorProto
  2670. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5a, 0xcd, 0x73, 0xdb, 0xc6,
  2671. 0x15, 0xe7, 0x37, 0x89, 0x47, 0x91, 0xa2, 0xd6, 0x8a, 0x43, 0x33, 0xb6, 0xe4, 0xc0, 0xe3, 0x34,
  2672. 0x76, 0x12, 0xa9, 0x91, 0xc7, 0xae, 0x33, 0xe9, 0x47, 0x44, 0x9a, 0x2e, 0x15, 0xab, 0x92, 0xba,
  2673. 0xa2, 0x9d, 0x49, 0xdb, 0x18, 0x01, 0x89, 0x15, 0x89, 0x98, 0x04, 0x10, 0x60, 0x29, 0x4b, 0x39,
  2674. 0x76, 0xda, 0x8b, 0xa7, 0x07, 0x1f, 0x7b, 0xc9, 0x4c, 0xff, 0x83, 0x5e, 0x7b, 0xea, 0xa9, 0x87,
  2675. 0x1c, 0xda, 0x99, 0x1c, 0x7b, 0xe8, 0xa4, 0x1d, 0xfb, 0xd6, 0x7f, 0xa0, 0xa7, 0xce, 0x74, 0xf6,
  2676. 0x03, 0x20, 0x40, 0x12, 0x22, 0xd5, 0xf4, 0xd6, 0xdb, 0xee, 0xc3, 0x7b, 0x8f, 0xbb, 0x6f, 0xf7,
  2677. 0xfd, 0xf6, 0xb7, 0x6f, 0x09, 0xaf, 0x51, 0x62, 0x19, 0xc4, 0x1d, 0x9a, 0x16, 0xdd, 0xd4, 0x3b,
  2678. 0x5d, 0x73, 0x93, 0x9e, 0x3a, 0xc4, 0xdb, 0x70, 0x5c, 0x9b, 0xda, 0x68, 0x79, 0xfc, 0x71, 0x83,
  2679. 0x7d, 0xac, 0x5d, 0x09, 0x69, 0x77, 0xdd, 0x53, 0x87, 0xda, 0x9b, 0x8e, 0x6b, 0xdb, 0x47, 0x42,
  2680. 0xbf, 0x76, 0x39, 0xf4, 0x99, 0xfb, 0x09, 0x7b, 0x8b, 0x7c, 0x95, 0xc6, 0x4f, 0xc8, 0xa9, 0xff,
  2681. 0xf5, 0xca, 0x94, 0xad, 0xa3, 0xbb, 0xfa, 0xd0, 0xff, 0xbc, 0xde, 0xb3, 0xed, 0xde, 0x80, 0x6c,
  2682. 0xf2, 0x5e, 0x67, 0x74, 0xb4, 0x49, 0xcd, 0x21, 0xf1, 0xa8, 0x3e, 0x74, 0xa4, 0xc2, 0x6a, 0xcf,
  2683. 0xee, 0xd9, 0xbc, 0xb9, 0xc9, 0x5a, 0x42, 0xaa, 0xfe, 0x25, 0x0f, 0x79, 0x4c, 0x3e, 0x1f, 0x11,
  2684. 0x8f, 0xa2, 0x2d, 0xc8, 0x90, 0x6e, 0xdf, 0xae, 0x26, 0xaf, 0x26, 0xdf, 0x2c, 0x6e, 0x5d, 0xde,
  2685. 0x98, 0x98, 0xdc, 0x86, 0xd4, 0x6b, 0x76, 0xfb, 0x76, 0x2b, 0x81, 0xb9, 0x2e, 0xba, 0x0d, 0xd9,
  2686. 0xa3, 0xc1, 0xc8, 0xeb, 0x57, 0x53, 0xdc, 0xe8, 0x4a, 0x9c, 0xd1, 0x7d, 0xa6, 0xd4, 0x4a, 0x60,
  2687. 0xa1, 0xcd, 0x7e, 0xca, 0xb4, 0x8e, 0xec, 0x6a, 0xfa, 0xec, 0x9f, 0xda, 0xb1, 0x8e, 0xf8, 0x4f,
  2688. 0x31, 0x5d, 0x54, 0x07, 0x30, 0x2d, 0x93, 0x6a, 0xdd, 0xbe, 0x6e, 0x5a, 0xd5, 0x0c, 0xb7, 0x7c,
  2689. 0x3d, 0xde, 0xd2, 0xa4, 0x0d, 0xa6, 0xd8, 0x4a, 0x60, 0xc5, 0xf4, 0x3b, 0x6c, 0xb8, 0x9f, 0x8f,
  2690. 0x88, 0x7b, 0x5a, 0xcd, 0x9e, 0x3d, 0xdc, 0x9f, 0x32, 0x25, 0x36, 0x5c, 0xae, 0x8d, 0x9a, 0x50,
  2691. 0xec, 0x90, 0x9e, 0x69, 0x69, 0x9d, 0x81, 0xdd, 0x7d, 0x52, 0xcd, 0x71, 0x63, 0x35, 0xce, 0xb8,
  2692. 0xce, 0x54, 0xeb, 0x4c, 0xb3, 0x95, 0xc0, 0xd0, 0x09, 0x7a, 0xe8, 0xfb, 0x50, 0xe8, 0xf6, 0x49,
  2693. 0xf7, 0x89, 0x46, 0x4f, 0xaa, 0x79, 0xee, 0x63, 0x3d, 0xce, 0x47, 0x83, 0xe9, 0xb5, 0x4f, 0x5a,
  2694. 0x09, 0x9c, 0xef, 0x8a, 0x26, 0x9b, 0xbf, 0x41, 0x06, 0xe6, 0x31, 0x71, 0x99, 0x7d, 0xe1, 0xec,
  2695. 0xf9, 0xdf, 0x13, 0x9a, 0xdc, 0x83, 0x62, 0xf8, 0x1d, 0xf4, 0x23, 0x50, 0x88, 0x65, 0xc8, 0x69,
  2696. 0x28, 0xdc, 0xc5, 0xd5, 0xd8, 0x75, 0xb6, 0x0c, 0x7f, 0x12, 0x05, 0x22, 0xdb, 0xe8, 0x2e, 0xe4,
  2697. 0xba, 0xf6, 0x70, 0x68, 0xd2, 0x2a, 0x70, 0xeb, 0xb5, 0xd8, 0x09, 0x70, 0xad, 0x56, 0x02, 0x4b,
  2698. 0x7d, 0xb4, 0x07, 0xe5, 0x81, 0xe9, 0x51, 0xcd, 0xb3, 0x74, 0xc7, 0xeb, 0xdb, 0xd4, 0xab, 0x16,
  2699. 0xb9, 0x87, 0xeb, 0x71, 0x1e, 0x76, 0x4d, 0x8f, 0x1e, 0xfa, 0xca, 0xad, 0x04, 0x2e, 0x0d, 0xc2,
  2700. 0x02, 0xe6, 0xcf, 0x3e, 0x3a, 0x22, 0x6e, 0xe0, 0xb0, 0xba, 0x74, 0xb6, 0xbf, 0x7d, 0xa6, 0xed,
  2701. 0xdb, 0x33, 0x7f, 0x76, 0x58, 0x80, 0x7e, 0x0e, 0x17, 0x06, 0xb6, 0x6e, 0x04, 0xee, 0xb4, 0x6e,
  2702. 0x7f, 0x64, 0x3d, 0xa9, 0x96, 0xb8, 0xd3, 0x1b, 0xb1, 0x83, 0xb4, 0x75, 0xc3, 0x77, 0xd1, 0x60,
  2703. 0x06, 0xad, 0x04, 0x5e, 0x19, 0x4c, 0x0a, 0xd1, 0x63, 0x58, 0xd5, 0x1d, 0x67, 0x70, 0x3a, 0xe9,
  2704. 0xbd, 0xcc, 0xbd, 0xdf, 0x8c, 0xf3, 0xbe, 0xcd, 0x6c, 0x26, 0xdd, 0x23, 0x7d, 0x4a, 0x5a, 0xcf,
  2705. 0x43, 0xf6, 0x58, 0x1f, 0x8c, 0x88, 0xfa, 0x1d, 0x28, 0x86, 0xd2, 0x14, 0x55, 0x21, 0x3f, 0x24,
  2706. 0x9e, 0xa7, 0xf7, 0x08, 0xcf, 0x6a, 0x05, 0xfb, 0x5d, 0xb5, 0x0c, 0x4b, 0xe1, 0xd4, 0x54, 0x9f,
  2707. 0x27, 0x03, 0x4b, 0x96, 0x75, 0xcc, 0xf2, 0x98, 0xb8, 0x9e, 0x69, 0x5b, 0xbe, 0xa5, 0xec, 0xa2,
  2708. 0x6b, 0x50, 0xe2, 0xfb, 0x47, 0xf3, 0xbf, 0xb3, 0xd4, 0xcf, 0xe0, 0x25, 0x2e, 0x7c, 0x24, 0x95,
  2709. 0xd6, 0xa1, 0xe8, 0x6c, 0x39, 0x81, 0x4a, 0x9a, 0xab, 0x80, 0xb3, 0xe5, 0xf8, 0x0a, 0xaf, 0xc3,
  2710. 0x12, 0x9b, 0x69, 0xa0, 0x91, 0xe1, 0x3f, 0x52, 0x64, 0x32, 0xa9, 0xa2, 0xfe, 0x39, 0x05, 0x95,
  2711. 0xc9, 0x74, 0x46, 0x77, 0x21, 0xc3, 0x90, 0x4d, 0x82, 0x54, 0x6d, 0x43, 0xc0, 0xde, 0x86, 0x0f,
  2712. 0x7b, 0x1b, 0x6d, 0x1f, 0xf6, 0xea, 0x85, 0xaf, 0xbe, 0x59, 0x4f, 0x3c, 0xff, 0xfb, 0x7a, 0x12,
  2713. 0x73, 0x0b, 0x74, 0x89, 0x65, 0x9f, 0x6e, 0x5a, 0x9a, 0x69, 0xf0, 0x21, 0x2b, 0x2c, 0xb5, 0x74,
  2714. 0xd3, 0xda, 0x31, 0xd0, 0x2e, 0x54, 0xba, 0xb6, 0xe5, 0x11, 0xcb, 0x1b, 0x79, 0x9a, 0x80, 0x55,
  2715. 0x09, 0x4d, 0x91, 0x04, 0x13, 0x60, 0xdd, 0xf0, 0x35, 0x0f, 0xb8, 0x22, 0x5e, 0xee, 0x46, 0x05,
  2716. 0xe8, 0x3e, 0xc0, 0xb1, 0x3e, 0x30, 0x0d, 0x9d, 0xda, 0xae, 0x57, 0xcd, 0x5c, 0x4d, 0xcf, 0xcc,
  2717. 0xb2, 0x47, 0xbe, 0xca, 0x43, 0xc7, 0xd0, 0x29, 0xa9, 0x67, 0xd8, 0x70, 0x71, 0xc8, 0x12, 0xbd,
  2718. 0x01, 0xcb, 0xba, 0xe3, 0x68, 0x1e, 0xd5, 0x29, 0xd1, 0x3a, 0xa7, 0x94, 0x78, 0x1c, 0xb6, 0x96,
  2719. 0x70, 0x49, 0x77, 0x9c, 0x43, 0x26, 0xad, 0x33, 0x21, 0xba, 0x0e, 0x65, 0x86, 0x70, 0xa6, 0x3e,
  2720. 0xd0, 0xfa, 0xc4, 0xec, 0xf5, 0x29, 0x07, 0xa8, 0x34, 0x2e, 0x49, 0x69, 0x8b, 0x0b, 0x55, 0x23,
  2721. 0x58, 0x71, 0x8e, 0x6e, 0x08, 0x41, 0xc6, 0xd0, 0xa9, 0xce, 0x23, 0xb9, 0x84, 0x79, 0x9b, 0xc9,
  2722. 0x1c, 0x9d, 0xf6, 0x65, 0x7c, 0x78, 0x1b, 0x5d, 0x84, 0x9c, 0x74, 0x9b, 0xe6, 0x6e, 0x65, 0x0f,
  2723. 0xad, 0x42, 0xd6, 0x71, 0xed, 0x63, 0xc2, 0x97, 0xae, 0x80, 0x45, 0x47, 0xfd, 0x55, 0x0a, 0x56,
  2724. 0xa6, 0x70, 0x90, 0xf9, 0xed, 0xeb, 0x5e, 0xdf, 0xff, 0x2d, 0xd6, 0x46, 0x77, 0x98, 0x5f, 0xdd,
  2725. 0x20, 0xae, 0x3c, 0x3b, 0xaa, 0xd3, 0xa1, 0x6e, 0xf1, 0xef, 0x32, 0x34, 0x52, 0x1b, 0xed, 0x43,
  2726. 0x65, 0xa0, 0x7b, 0x54, 0x13, 0xb8, 0xa2, 0x85, 0xce, 0x91, 0x69, 0x34, 0xdd, 0xd5, 0x7d, 0x24,
  2727. 0x62, 0x9b, 0x5a, 0x3a, 0x2a, 0x0f, 0x22, 0x52, 0x84, 0x61, 0xb5, 0x73, 0xfa, 0x85, 0x6e, 0x51,
  2728. 0xd3, 0x22, 0xda, 0xd4, 0xca, 0x5d, 0x9a, 0x72, 0xda, 0x3c, 0x36, 0x0d, 0x62, 0x75, 0xfd, 0x25,
  2729. 0xbb, 0x10, 0x18, 0x07, 0x4b, 0xea, 0xa9, 0x18, 0xca, 0x51, 0x24, 0x47, 0x65, 0x48, 0xd1, 0x13,
  2730. 0x19, 0x80, 0x14, 0x3d, 0x41, 0xdf, 0x85, 0x0c, 0x9b, 0x24, 0x9f, 0x7c, 0x79, 0xc6, 0x11, 0x28,
  2731. 0xed, 0xda, 0xa7, 0x0e, 0xc1, 0x5c, 0x53, 0x55, 0x83, 0x74, 0x08, 0xd0, 0x7d, 0xd2, 0xab, 0x7a,
  2732. 0x03, 0x96, 0x27, 0xe0, 0x3b, 0xb4, 0x7e, 0xc9, 0xf0, 0xfa, 0xa9, 0xcb, 0x50, 0x8a, 0x60, 0xb5,
  2733. 0x7a, 0x11, 0x56, 0x67, 0x41, 0xaf, 0xda, 0x0f, 0xe4, 0x11, 0x08, 0x45, 0xb7, 0xa1, 0x10, 0x60,
  2734. 0xaf, 0x48, 0xc7, 0xe9, 0x58, 0xf9, 0xca, 0x38, 0x50, 0x65, 0x79, 0xc8, 0xb6, 0x35, 0xdf, 0x0f,
  2735. 0x29, 0x3e, 0xf0, 0xbc, 0xee, 0x38, 0x2d, 0xdd, 0xeb, 0xab, 0x9f, 0x42, 0x35, 0x0e, 0x57, 0x27,
  2736. 0xa6, 0x91, 0x09, 0xb6, 0xe1, 0x45, 0xc8, 0x1d, 0xd9, 0xee, 0x50, 0xa7, 0xdc, 0x59, 0x09, 0xcb,
  2737. 0x1e, 0xdb, 0x9e, 0x02, 0x63, 0xd3, 0x5c, 0x2c, 0x3a, 0xaa, 0x06, 0x97, 0x62, 0xb1, 0x95, 0x99,
  2738. 0x98, 0x96, 0x41, 0x44, 0x3c, 0x4b, 0x58, 0x74, 0xc6, 0x8e, 0xc4, 0x60, 0x45, 0x87, 0xfd, 0xac,
  2739. 0xc7, 0xe7, 0xca, 0xfd, 0x2b, 0x58, 0xf6, 0xd4, 0xdf, 0x15, 0xa0, 0x80, 0x89, 0xe7, 0x30, 0x4c,
  2740. 0x40, 0x75, 0x50, 0xc8, 0x49, 0x97, 0x38, 0xd4, 0x87, 0xd1, 0xd9, 0xac, 0x41, 0x68, 0x37, 0x7d,
  2741. 0x4d, 0x76, 0x64, 0x07, 0x66, 0xe8, 0x96, 0x64, 0x65, 0xf1, 0x04, 0x4b, 0x9a, 0x87, 0x69, 0xd9,
  2742. 0x1d, 0x9f, 0x96, 0xa5, 0x63, 0x4f, 0x69, 0x61, 0x35, 0xc1, 0xcb, 0x6e, 0x49, 0x5e, 0x96, 0x99,
  2743. 0xf3, 0x63, 0x11, 0x62, 0xd6, 0x88, 0x10, 0xb3, 0xec, 0x9c, 0x69, 0xc6, 0x30, 0xb3, 0x3b, 0x3e,
  2744. 0x33, 0xcb, 0xcd, 0x19, 0xf1, 0x04, 0x35, 0xbb, 0x1f, 0xa5, 0x66, 0x82, 0x56, 0x5d, 0x8b, 0xb5,
  2745. 0x8e, 0xe5, 0x66, 0x3f, 0x08, 0x71, 0xb3, 0x42, 0x2c, 0x31, 0x12, 0x4e, 0x66, 0x90, 0xb3, 0x46,
  2746. 0x84, 0x9c, 0x29, 0x73, 0x62, 0x10, 0xc3, 0xce, 0x3e, 0x08, 0xb3, 0x33, 0x88, 0x25, 0x78, 0x72,
  2747. 0xbd, 0x67, 0xd1, 0xb3, 0xf7, 0x02, 0x7a, 0x56, 0x8c, 0xe5, 0x97, 0x72, 0x0e, 0x93, 0xfc, 0x6c,
  2748. 0x7f, 0x8a, 0x9f, 0x09, 0x3e, 0xf5, 0x46, 0xac, 0x8b, 0x39, 0x04, 0x6d, 0x7f, 0x8a, 0xa0, 0x95,
  2749. 0xe6, 0x38, 0x9c, 0xc3, 0xd0, 0x7e, 0x31, 0x9b, 0xa1, 0xc5, 0x73, 0x28, 0x39, 0xcc, 0xc5, 0x28,
  2750. 0x9a, 0x16, 0x43, 0xd1, 0x96, 0xb9, 0xfb, 0xb7, 0x62, 0xdd, 0x9f, 0x9f, 0xa3, 0xdd, 0x60, 0x27,
  2751. 0xe4, 0x44, 0xce, 0x33, 0x94, 0x21, 0xae, 0x6b, 0xbb, 0x92, 0x6d, 0x89, 0x8e, 0xfa, 0x26, 0x3b,
  2752. 0xb3, 0xc7, 0xf9, 0x7d, 0x06, 0x9f, 0xe3, 0x68, 0x1e, 0xca, 0x69, 0xf5, 0x0f, 0xc9, 0xb1, 0x2d,
  2753. 0x3f, 0xe6, 0xc2, 0xe7, 0xbd, 0x22, 0xcf, 0xfb, 0x10, 0xcb, 0x4b, 0x45, 0x59, 0xde, 0x3a, 0x14,
  2754. 0x19, 0x4a, 0x4f, 0x10, 0x38, 0xdd, 0x09, 0x08, 0xdc, 0x4d, 0x58, 0xe1, 0xc7, 0xb0, 0xe0, 0x82,
  2755. 0x12, 0x9a, 0x33, 0xfc, 0x84, 0x59, 0x66, 0x1f, 0xc4, 0xe6, 0x14, 0x18, 0xfd, 0x0e, 0x5c, 0x08,
  2756. 0xe9, 0x06, 0xe8, 0x2f, 0xd8, 0x4c, 0x25, 0xd0, 0xde, 0x96, 0xc7, 0xc0, 0x9f, 0x92, 0xe3, 0x08,
  2757. 0x8d, 0x99, 0xdf, 0x2c, 0x92, 0x96, 0xfc, 0x1f, 0x91, 0xb4, 0xd4, 0x7f, 0x4d, 0xd2, 0xc2, 0xa7,
  2758. 0x59, 0x3a, 0x7a, 0x9a, 0xfd, 0x2b, 0x39, 0x5e, 0x93, 0x80, 0x72, 0x75, 0x6d, 0x83, 0xc8, 0xf3,
  2759. 0x85, 0xb7, 0x51, 0x05, 0xd2, 0x03, 0xbb, 0x27, 0x4f, 0x11, 0xd6, 0x64, 0x5a, 0x01, 0x08, 0x2b,
  2760. 0x12, 0x63, 0x83, 0xa3, 0x29, 0xcb, 0x23, 0x2c, 0x8f, 0xa6, 0x0a, 0xa4, 0x9f, 0x10, 0x01, 0x99,
  2761. 0x4b, 0x98, 0x35, 0x99, 0x1e, 0xdf, 0x64, 0x1c, 0x08, 0x97, 0xb0, 0xe8, 0xa0, 0xbb, 0xa0, 0xf0,
  2762. 0x32, 0x84, 0x66, 0x3b, 0x9e, 0x44, 0xb7, 0xd7, 0xc2, 0x73, 0x15, 0xd5, 0x86, 0x8d, 0x03, 0xa6,
  2763. 0xb3, 0xef, 0x78, 0xb8, 0xe0, 0xc8, 0x56, 0xe8, 0xd4, 0x55, 0x22, 0xe4, 0xef, 0x32, 0x28, 0x6c,
  2764. 0xf4, 0x9e, 0xa3, 0x77, 0x09, 0x87, 0x2a, 0x05, 0x8f, 0x05, 0xea, 0x63, 0x40, 0xd3, 0x80, 0x8b,
  2765. 0x5a, 0x90, 0x23, 0xc7, 0xc4, 0xa2, 0x6c, 0xd9, 0x58, 0xb8, 0x2f, 0xce, 0x60, 0x56, 0xc4, 0xa2,
  2766. 0xf5, 0x2a, 0x0b, 0xf2, 0x3f, 0xbf, 0x59, 0xaf, 0x08, 0xed, 0xb7, 0xed, 0xa1, 0x49, 0xc9, 0xd0,
  2767. 0xa1, 0xa7, 0x58, 0xda, 0xab, 0x7f, 0x4b, 0x31, 0x9a, 0x13, 0x01, 0xe3, 0x99, 0xb1, 0xf5, 0xb7,
  2768. 0x7c, 0x2a, 0x44, 0x71, 0x17, 0x8b, 0xf7, 0x1a, 0x40, 0x4f, 0xf7, 0xb4, 0xa7, 0xba, 0x45, 0x89,
  2769. 0x21, 0x83, 0x1e, 0x92, 0xa0, 0x1a, 0x14, 0x58, 0x6f, 0xe4, 0x11, 0x43, 0xb2, 0xed, 0xa0, 0x1f,
  2770. 0x9a, 0x67, 0xfe, 0xdb, 0xcd, 0x33, 0x1a, 0xe5, 0xc2, 0x44, 0x94, 0x43, 0x14, 0x44, 0x09, 0x53,
  2771. 0x10, 0x36, 0x36, 0xc7, 0x35, 0x6d, 0xd7, 0xa4, 0xa7, 0x7c, 0x69, 0xd2, 0x38, 0xe8, 0xb3, 0xcb,
  2772. 0xdb, 0x90, 0x0c, 0x1d, 0xdb, 0x1e, 0x68, 0x02, 0x6e, 0x8a, 0xdc, 0x74, 0x49, 0x0a, 0x9b, 0x1c,
  2773. 0x75, 0x7e, 0x9d, 0x1a, 0xe7, 0xdf, 0x98, 0x6a, 0xfe, 0xdf, 0x05, 0x58, 0xfd, 0x0d, 0xbf, 0x80,
  2774. 0x46, 0x8f, 0x5b, 0x74, 0x08, 0x2b, 0x41, 0xfa, 0x6b, 0x23, 0x0e, 0x0b, 0xfe, 0x86, 0x5e, 0x14,
  2775. 0x3f, 0x2a, 0xc7, 0x51, 0xb1, 0x87, 0x3e, 0x86, 0x57, 0x27, 0xb0, 0x2d, 0x70, 0x9d, 0x5a, 0x14,
  2776. 0xe2, 0x5e, 0x89, 0x42, 0x9c, 0xef, 0x7a, 0x1c, 0xac, 0xf4, 0xb7, 0xcc, 0xba, 0x1d, 0x76, 0xa7,
  2777. 0x09, 0xb3, 0x87, 0x99, 0xcb, 0x7f, 0x0d, 0x4a, 0x2e, 0xa1, 0xec, 0x9e, 0x1d, 0xb9, 0x35, 0x2e,
  2778. 0x09, 0xa1, 0xbc, 0x8b, 0x1e, 0xc0, 0x2b, 0x33, 0x59, 0x04, 0xfa, 0x1e, 0x28, 0x63, 0x02, 0x92,
  2779. 0x8c, 0xb9, 0x80, 0x05, 0x97, 0x8a, 0xb1, 0xae, 0xfa, 0xc7, 0xe4, 0xd8, 0x65, 0xf4, 0x9a, 0xd2,
  2780. 0x84, 0x9c, 0x4b, 0xbc, 0xd1, 0x40, 0x5c, 0x1c, 0xca, 0x5b, 0xef, 0x2c, 0xc6, 0x3f, 0x98, 0x74,
  2781. 0x34, 0xa0, 0x58, 0x1a, 0xab, 0x8f, 0x21, 0x27, 0x24, 0xa8, 0x08, 0xf9, 0x87, 0x7b, 0x0f, 0xf6,
  2782. 0xf6, 0x3f, 0xda, 0xab, 0x24, 0x10, 0x40, 0x6e, 0xbb, 0xd1, 0x68, 0x1e, 0xb4, 0x2b, 0x49, 0xa4,
  2783. 0x40, 0x76, 0xbb, 0xbe, 0x8f, 0xdb, 0x95, 0x14, 0x13, 0xe3, 0xe6, 0x87, 0xcd, 0x46, 0xbb, 0x92,
  2784. 0x46, 0x2b, 0x50, 0x12, 0x6d, 0xed, 0xfe, 0x3e, 0xfe, 0xc9, 0x76, 0xbb, 0x92, 0x09, 0x89, 0x0e,
  2785. 0x9b, 0x7b, 0xf7, 0x9a, 0xb8, 0x92, 0x55, 0xdf, 0x65, 0x37, 0x93, 0x18, 0xc6, 0x32, 0xbe, 0x83,
  2786. 0x24, 0x43, 0x77, 0x10, 0xf5, 0xb7, 0x29, 0xa8, 0xc5, 0xd3, 0x10, 0xf4, 0xe1, 0xc4, 0xc4, 0xb7,
  2787. 0xce, 0xc1, 0x61, 0x26, 0x66, 0x8f, 0xae, 0x43, 0xd9, 0x25, 0x47, 0x84, 0x76, 0xfb, 0x82, 0x16,
  2788. 0x89, 0x23, 0xb3, 0x84, 0x4b, 0x52, 0xca, 0x8d, 0x3c, 0xa1, 0xf6, 0x19, 0xe9, 0x52, 0x4d, 0x60,
  2789. 0x91, 0xd8, 0x74, 0x0a, 0x53, 0x63, 0xd2, 0x43, 0x21, 0x54, 0x3f, 0x3d, 0x57, 0x2c, 0x15, 0xc8,
  2790. 0xe2, 0x66, 0x1b, 0x7f, 0x5c, 0x49, 0x23, 0x04, 0x65, 0xde, 0xd4, 0x0e, 0xf7, 0xb6, 0x0f, 0x0e,
  2791. 0x5b, 0xfb, 0x2c, 0x96, 0x17, 0x60, 0xd9, 0x8f, 0xa5, 0x2f, 0xcc, 0xaa, 0x9f, 0x40, 0x39, 0x7a,
  2792. 0xf7, 0x67, 0x21, 0x74, 0xed, 0x91, 0x65, 0xf0, 0x60, 0x64, 0xb1, 0xe8, 0xa0, 0xdb, 0x90, 0x3d,
  2793. 0xb6, 0x45, 0x9a, 0xcd, 0xde, 0x6b, 0x8f, 0x6c, 0x4a, 0x42, 0xb5, 0x03, 0xa1, 0xad, 0x7e, 0x01,
  2794. 0x59, 0x9e, 0x35, 0x2c, 0x03, 0xf8, 0x2d, 0x5e, 0x92, 0x2a, 0xd6, 0x46, 0x9f, 0x00, 0xe8, 0x94,
  2795. 0xba, 0x66, 0x67, 0x34, 0x76, 0xbc, 0x3e, 0x3b, 0xeb, 0xb6, 0x7d, 0xbd, 0xfa, 0x65, 0x99, 0x7e,
  2796. 0xab, 0x63, 0xd3, 0x50, 0x0a, 0x86, 0x1c, 0xaa, 0x7b, 0x50, 0x8e, 0xda, 0xfa, 0x34, 0x40, 0x8c,
  2797. 0x21, 0x4a, 0x03, 0x04, 0xab, 0x93, 0x34, 0x20, 0x20, 0x11, 0x69, 0x51, 0xb1, 0xe1, 0x1d, 0xf5,
  2798. 0x59, 0x12, 0x0a, 0xed, 0x13, 0xb9, 0x1e, 0x31, 0xc5, 0x82, 0xb1, 0x69, 0x2a, 0x7c, 0x35, 0x16,
  2799. 0xd5, 0x87, 0x74, 0x50, 0xd3, 0xf8, 0x20, 0xd8, 0x71, 0x99, 0x45, 0x6f, 0x40, 0x7e, 0x71, 0x47,
  2800. 0x66, 0xd9, 0xfb, 0xa0, 0x04, 0x98, 0xc9, 0xd8, 0xa9, 0x6e, 0x18, 0x2e, 0xf1, 0x3c, 0xb9, 0xef,
  2801. 0xfd, 0x2e, 0xaf, 0x3d, 0xd9, 0x4f, 0xe5, 0xe5, 0x3b, 0x8d, 0x45, 0x47, 0x35, 0x60, 0x79, 0x02,
  2802. 0x70, 0xd1, 0xfb, 0x90, 0x77, 0x46, 0x1d, 0xcd, 0x0f, 0xcf, 0xc4, 0x5b, 0x83, 0xcf, 0x7b, 0x46,
  2803. 0x9d, 0x81, 0xd9, 0x7d, 0x40, 0x4e, 0xfd, 0xc1, 0x38, 0xa3, 0xce, 0x03, 0x11, 0x45, 0xf1, 0x2b,
  2804. 0xa9, 0xf0, 0xaf, 0x1c, 0x43, 0xc1, 0xdf, 0x14, 0xe8, 0x87, 0xa0, 0x04, 0x58, 0x1e, 0x94, 0x24,
  2805. 0x63, 0x0f, 0x01, 0xe9, 0x7e, 0x6c, 0xc2, 0x48, 0xb4, 0x67, 0xf6, 0x2c, 0x62, 0x68, 0x63, 0x7e,
  2806. 0xcc, 0x7f, 0xad, 0x80, 0x97, 0xc5, 0x87, 0x5d, 0x9f, 0x1c, 0xab, 0xff, 0x4e, 0x42, 0xc1, 0x2f,
  2807. 0x3d, 0xa1, 0x77, 0x43, 0xfb, 0xae, 0x3c, 0xe3, 0xa2, 0xee, 0x2b, 0x8e, 0xcb, 0x47, 0xd1, 0xb1,
  2808. 0xa6, 0xce, 0x3f, 0xd6, 0xb8, 0x3a, 0xa0, 0x5f, 0x91, 0xcd, 0x9c, 0xbb, 0x22, 0xfb, 0x36, 0x20,
  2809. 0x6a, 0x53, 0x7d, 0xa0, 0x1d, 0xdb, 0xd4, 0xb4, 0x7a, 0x9a, 0x08, 0xb6, 0xe0, 0x02, 0x15, 0xfe,
  2810. 0xe5, 0x11, 0xff, 0x70, 0xc0, 0xe3, 0xfe, 0xcb, 0x24, 0x14, 0x02, 0x50, 0x3f, 0x6f, 0x35, 0xe8,
  2811. 0x22, 0xe4, 0x24, 0x6e, 0x89, 0x72, 0x90, 0xec, 0x05, 0x85, 0xc9, 0x4c, 0xa8, 0x30, 0x59, 0x83,
  2812. 0xc2, 0x90, 0x50, 0x9d, 0x9f, 0x6c, 0xe2, 0x8a, 0x12, 0xf4, 0x6f, 0xbe, 0x07, 0xc5, 0x50, 0x61,
  2813. 0x8e, 0x65, 0xde, 0x5e, 0xf3, 0xa3, 0x4a, 0xa2, 0x96, 0x7f, 0xf6, 0xe5, 0xd5, 0xf4, 0x1e, 0x79,
  2814. 0xca, 0xf6, 0x2c, 0x6e, 0x36, 0x5a, 0xcd, 0xc6, 0x83, 0x4a, 0xb2, 0x56, 0x7c, 0xf6, 0xe5, 0xd5,
  2815. 0x3c, 0x26, 0xbc, 0x48, 0x70, 0xb3, 0x05, 0x4b, 0xe1, 0x55, 0x89, 0x42, 0x1f, 0x82, 0xf2, 0xbd,
  2816. 0x87, 0x07, 0xbb, 0x3b, 0x8d, 0xed, 0x76, 0x53, 0x7b, 0xb4, 0xdf, 0x6e, 0x56, 0x92, 0xe8, 0x55,
  2817. 0xb8, 0xb0, 0xbb, 0xf3, 0xe3, 0x56, 0x5b, 0x6b, 0xec, 0xee, 0x34, 0xf7, 0xda, 0xda, 0x76, 0xbb,
  2818. 0xbd, 0xdd, 0x78, 0x50, 0x49, 0x6d, 0xfd, 0x5e, 0x81, 0xe5, 0xed, 0x7a, 0x63, 0x87, 0xc1, 0xb6,
  2819. 0xd9, 0xd5, 0xf9, 0xfd, 0xb1, 0x01, 0x19, 0x7e, 0x43, 0x3c, 0xf3, 0xd9, 0xae, 0x76, 0x76, 0xf9,
  2820. 0x08, 0xdd, 0x87, 0x2c, 0xbf, 0x3c, 0xa2, 0xb3, 0xdf, 0xf1, 0x6a, 0x73, 0xea, 0x49, 0x6c, 0x30,
  2821. 0x3c, 0x3d, 0xce, 0x7c, 0xd8, 0xab, 0x9d, 0x5d, 0x5e, 0x42, 0x18, 0x94, 0x31, 0xf9, 0x9c, 0xff,
  2822. 0xd0, 0x55, 0x5b, 0x00, 0x6c, 0xd0, 0x2e, 0xe4, 0xfd, 0xfb, 0xc2, 0xbc, 0xa7, 0xb7, 0xda, 0xdc,
  2823. 0xfa, 0x0f, 0x0b, 0x97, 0xb8, 0xd7, 0x9d, 0xfd, 0x8e, 0x58, 0x9b, 0x53, 0xcc, 0x42, 0x3b, 0x90,
  2824. 0x93, 0x84, 0x6a, 0xce, 0x73, 0x5a, 0x6d, 0x5e, 0x3d, 0x87, 0x05, 0x6d, 0x7c, 0x63, 0x9e, 0xff,
  2825. 0x3a, 0x5a, 0x5b, 0xa0, 0x4e, 0x87, 0x1e, 0x02, 0x84, 0x6e, 0x71, 0x0b, 0x3c, 0x7b, 0xd6, 0x16,
  2826. 0xa9, 0xbf, 0xa1, 0x7d, 0x28, 0x04, 0xa4, 0x7a, 0xee, 0x23, 0x64, 0x6d, 0x7e, 0x21, 0x0c, 0x3d,
  2827. 0x86, 0x52, 0x94, 0x4c, 0x2e, 0xf6, 0xb4, 0x58, 0x5b, 0xb0, 0xc2, 0xc5, 0xfc, 0x47, 0x99, 0xe5,
  2828. 0x62, 0x4f, 0x8d, 0xb5, 0x05, 0x0b, 0x5e, 0xe8, 0x33, 0x58, 0x99, 0x66, 0x7e, 0x8b, 0xbf, 0x3c,
  2829. 0xd6, 0xce, 0x51, 0x02, 0x43, 0x43, 0x40, 0x33, 0x18, 0xe3, 0x39, 0x1e, 0x22, 0x6b, 0xe7, 0xa9,
  2830. 0x88, 0xd5, 0x9b, 0x5f, 0xbd, 0x58, 0x4b, 0x7e, 0xfd, 0x62, 0x2d, 0xf9, 0x8f, 0x17, 0x6b, 0xc9,
  2831. 0xe7, 0x2f, 0xd7, 0x12, 0x5f, 0xbf, 0x5c, 0x4b, 0xfc, 0xf5, 0xe5, 0x5a, 0xe2, 0x67, 0x6f, 0xf5,
  2832. 0x4c, 0xda, 0x1f, 0x75, 0x36, 0xba, 0xf6, 0x70, 0x33, 0xfc, 0x0f, 0x87, 0x59, 0xff, 0xba, 0xe8,
  2833. 0xe4, 0xf8, 0xa1, 0x72, 0xeb, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x92, 0xa5, 0x39, 0xcc, 0x95,
  2834. 0x21, 0x00, 0x00,
  2835. }
  2836. // Reference imports to suppress errors if they are not otherwise used.
  2837. var _ context.Context
  2838. var _ grpc.ClientConn
  2839. // This is a compile-time assertion to ensure that this generated file
  2840. // is compatible with the grpc package it is being compiled against.
  2841. const _ = grpc.SupportPackageIsVersion4
  2842. // ABCIApplicationClient is the client API for ABCIApplication service.
  2843. //
  2844. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  2845. type ABCIApplicationClient interface {
  2846. Echo(ctx context.Context, in *RequestEcho, opts ...grpc.CallOption) (*ResponseEcho, error)
  2847. Flush(ctx context.Context, in *RequestFlush, opts ...grpc.CallOption) (*ResponseFlush, error)
  2848. Info(ctx context.Context, in *RequestInfo, opts ...grpc.CallOption) (*ResponseInfo, error)
  2849. DeliverTx(ctx context.Context, in *RequestDeliverTx, opts ...grpc.CallOption) (*ResponseDeliverTx, error)
  2850. CheckTx(ctx context.Context, in *RequestCheckTx, opts ...grpc.CallOption) (*ResponseCheckTx, error)
  2851. Query(ctx context.Context, in *RequestQuery, opts ...grpc.CallOption) (*ResponseQuery, error)
  2852. Commit(ctx context.Context, in *RequestCommit, opts ...grpc.CallOption) (*ResponseCommit, error)
  2853. InitChain(ctx context.Context, in *RequestInitChain, opts ...grpc.CallOption) (*ResponseInitChain, error)
  2854. BeginBlock(ctx context.Context, in *RequestBeginBlock, opts ...grpc.CallOption) (*ResponseBeginBlock, error)
  2855. EndBlock(ctx context.Context, in *RequestEndBlock, opts ...grpc.CallOption) (*ResponseEndBlock, error)
  2856. ListSnapshots(ctx context.Context, in *RequestListSnapshots, opts ...grpc.CallOption) (*ResponseListSnapshots, error)
  2857. OfferSnapshot(ctx context.Context, in *RequestOfferSnapshot, opts ...grpc.CallOption) (*ResponseOfferSnapshot, error)
  2858. LoadSnapshotChunk(ctx context.Context, in *RequestLoadSnapshotChunk, opts ...grpc.CallOption) (*ResponseLoadSnapshotChunk, error)
  2859. ApplySnapshotChunk(ctx context.Context, in *RequestApplySnapshotChunk, opts ...grpc.CallOption) (*ResponseApplySnapshotChunk, error)
  2860. }
  2861. type aBCIApplicationClient struct {
  2862. cc *grpc.ClientConn
  2863. }
  2864. func NewABCIApplicationClient(cc *grpc.ClientConn) ABCIApplicationClient {
  2865. return &aBCIApplicationClient{cc}
  2866. }
  2867. func (c *aBCIApplicationClient) Echo(ctx context.Context, in *RequestEcho, opts ...grpc.CallOption) (*ResponseEcho, error) {
  2868. out := new(ResponseEcho)
  2869. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Echo", in, out, opts...)
  2870. if err != nil {
  2871. return nil, err
  2872. }
  2873. return out, nil
  2874. }
  2875. func (c *aBCIApplicationClient) Flush(ctx context.Context, in *RequestFlush, opts ...grpc.CallOption) (*ResponseFlush, error) {
  2876. out := new(ResponseFlush)
  2877. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Flush", in, out, opts...)
  2878. if err != nil {
  2879. return nil, err
  2880. }
  2881. return out, nil
  2882. }
  2883. func (c *aBCIApplicationClient) Info(ctx context.Context, in *RequestInfo, opts ...grpc.CallOption) (*ResponseInfo, error) {
  2884. out := new(ResponseInfo)
  2885. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Info", in, out, opts...)
  2886. if err != nil {
  2887. return nil, err
  2888. }
  2889. return out, nil
  2890. }
  2891. func (c *aBCIApplicationClient) DeliverTx(ctx context.Context, in *RequestDeliverTx, opts ...grpc.CallOption) (*ResponseDeliverTx, error) {
  2892. out := new(ResponseDeliverTx)
  2893. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/DeliverTx", in, out, opts...)
  2894. if err != nil {
  2895. return nil, err
  2896. }
  2897. return out, nil
  2898. }
  2899. func (c *aBCIApplicationClient) CheckTx(ctx context.Context, in *RequestCheckTx, opts ...grpc.CallOption) (*ResponseCheckTx, error) {
  2900. out := new(ResponseCheckTx)
  2901. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/CheckTx", in, out, opts...)
  2902. if err != nil {
  2903. return nil, err
  2904. }
  2905. return out, nil
  2906. }
  2907. func (c *aBCIApplicationClient) Query(ctx context.Context, in *RequestQuery, opts ...grpc.CallOption) (*ResponseQuery, error) {
  2908. out := new(ResponseQuery)
  2909. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Query", in, out, opts...)
  2910. if err != nil {
  2911. return nil, err
  2912. }
  2913. return out, nil
  2914. }
  2915. func (c *aBCIApplicationClient) Commit(ctx context.Context, in *RequestCommit, opts ...grpc.CallOption) (*ResponseCommit, error) {
  2916. out := new(ResponseCommit)
  2917. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Commit", in, out, opts...)
  2918. if err != nil {
  2919. return nil, err
  2920. }
  2921. return out, nil
  2922. }
  2923. func (c *aBCIApplicationClient) InitChain(ctx context.Context, in *RequestInitChain, opts ...grpc.CallOption) (*ResponseInitChain, error) {
  2924. out := new(ResponseInitChain)
  2925. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/InitChain", in, out, opts...)
  2926. if err != nil {
  2927. return nil, err
  2928. }
  2929. return out, nil
  2930. }
  2931. func (c *aBCIApplicationClient) BeginBlock(ctx context.Context, in *RequestBeginBlock, opts ...grpc.CallOption) (*ResponseBeginBlock, error) {
  2932. out := new(ResponseBeginBlock)
  2933. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/BeginBlock", in, out, opts...)
  2934. if err != nil {
  2935. return nil, err
  2936. }
  2937. return out, nil
  2938. }
  2939. func (c *aBCIApplicationClient) EndBlock(ctx context.Context, in *RequestEndBlock, opts ...grpc.CallOption) (*ResponseEndBlock, error) {
  2940. out := new(ResponseEndBlock)
  2941. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/EndBlock", in, out, opts...)
  2942. if err != nil {
  2943. return nil, err
  2944. }
  2945. return out, nil
  2946. }
  2947. func (c *aBCIApplicationClient) ListSnapshots(ctx context.Context, in *RequestListSnapshots, opts ...grpc.CallOption) (*ResponseListSnapshots, error) {
  2948. out := new(ResponseListSnapshots)
  2949. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/ListSnapshots", in, out, opts...)
  2950. if err != nil {
  2951. return nil, err
  2952. }
  2953. return out, nil
  2954. }
  2955. func (c *aBCIApplicationClient) OfferSnapshot(ctx context.Context, in *RequestOfferSnapshot, opts ...grpc.CallOption) (*ResponseOfferSnapshot, error) {
  2956. out := new(ResponseOfferSnapshot)
  2957. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/OfferSnapshot", in, out, opts...)
  2958. if err != nil {
  2959. return nil, err
  2960. }
  2961. return out, nil
  2962. }
  2963. func (c *aBCIApplicationClient) LoadSnapshotChunk(ctx context.Context, in *RequestLoadSnapshotChunk, opts ...grpc.CallOption) (*ResponseLoadSnapshotChunk, error) {
  2964. out := new(ResponseLoadSnapshotChunk)
  2965. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/LoadSnapshotChunk", in, out, opts...)
  2966. if err != nil {
  2967. return nil, err
  2968. }
  2969. return out, nil
  2970. }
  2971. func (c *aBCIApplicationClient) ApplySnapshotChunk(ctx context.Context, in *RequestApplySnapshotChunk, opts ...grpc.CallOption) (*ResponseApplySnapshotChunk, error) {
  2972. out := new(ResponseApplySnapshotChunk)
  2973. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/ApplySnapshotChunk", in, out, opts...)
  2974. if err != nil {
  2975. return nil, err
  2976. }
  2977. return out, nil
  2978. }
  2979. // ABCIApplicationServer is the server API for ABCIApplication service.
  2980. type ABCIApplicationServer interface {
  2981. Echo(context.Context, *RequestEcho) (*ResponseEcho, error)
  2982. Flush(context.Context, *RequestFlush) (*ResponseFlush, error)
  2983. Info(context.Context, *RequestInfo) (*ResponseInfo, error)
  2984. DeliverTx(context.Context, *RequestDeliverTx) (*ResponseDeliverTx, error)
  2985. CheckTx(context.Context, *RequestCheckTx) (*ResponseCheckTx, error)
  2986. Query(context.Context, *RequestQuery) (*ResponseQuery, error)
  2987. Commit(context.Context, *RequestCommit) (*ResponseCommit, error)
  2988. InitChain(context.Context, *RequestInitChain) (*ResponseInitChain, error)
  2989. BeginBlock(context.Context, *RequestBeginBlock) (*ResponseBeginBlock, error)
  2990. EndBlock(context.Context, *RequestEndBlock) (*ResponseEndBlock, error)
  2991. ListSnapshots(context.Context, *RequestListSnapshots) (*ResponseListSnapshots, error)
  2992. OfferSnapshot(context.Context, *RequestOfferSnapshot) (*ResponseOfferSnapshot, error)
  2993. LoadSnapshotChunk(context.Context, *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error)
  2994. ApplySnapshotChunk(context.Context, *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error)
  2995. }
  2996. // UnimplementedABCIApplicationServer can be embedded to have forward compatible implementations.
  2997. type UnimplementedABCIApplicationServer struct {
  2998. }
  2999. func (*UnimplementedABCIApplicationServer) Echo(ctx context.Context, req *RequestEcho) (*ResponseEcho, error) {
  3000. return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented")
  3001. }
  3002. func (*UnimplementedABCIApplicationServer) Flush(ctx context.Context, req *RequestFlush) (*ResponseFlush, error) {
  3003. return nil, status.Errorf(codes.Unimplemented, "method Flush not implemented")
  3004. }
  3005. func (*UnimplementedABCIApplicationServer) Info(ctx context.Context, req *RequestInfo) (*ResponseInfo, error) {
  3006. return nil, status.Errorf(codes.Unimplemented, "method Info not implemented")
  3007. }
  3008. func (*UnimplementedABCIApplicationServer) DeliverTx(ctx context.Context, req *RequestDeliverTx) (*ResponseDeliverTx, error) {
  3009. return nil, status.Errorf(codes.Unimplemented, "method DeliverTx not implemented")
  3010. }
  3011. func (*UnimplementedABCIApplicationServer) CheckTx(ctx context.Context, req *RequestCheckTx) (*ResponseCheckTx, error) {
  3012. return nil, status.Errorf(codes.Unimplemented, "method CheckTx not implemented")
  3013. }
  3014. func (*UnimplementedABCIApplicationServer) Query(ctx context.Context, req *RequestQuery) (*ResponseQuery, error) {
  3015. return nil, status.Errorf(codes.Unimplemented, "method Query not implemented")
  3016. }
  3017. func (*UnimplementedABCIApplicationServer) Commit(ctx context.Context, req *RequestCommit) (*ResponseCommit, error) {
  3018. return nil, status.Errorf(codes.Unimplemented, "method Commit not implemented")
  3019. }
  3020. func (*UnimplementedABCIApplicationServer) InitChain(ctx context.Context, req *RequestInitChain) (*ResponseInitChain, error) {
  3021. return nil, status.Errorf(codes.Unimplemented, "method InitChain not implemented")
  3022. }
  3023. func (*UnimplementedABCIApplicationServer) BeginBlock(ctx context.Context, req *RequestBeginBlock) (*ResponseBeginBlock, error) {
  3024. return nil, status.Errorf(codes.Unimplemented, "method BeginBlock not implemented")
  3025. }
  3026. func (*UnimplementedABCIApplicationServer) EndBlock(ctx context.Context, req *RequestEndBlock) (*ResponseEndBlock, error) {
  3027. return nil, status.Errorf(codes.Unimplemented, "method EndBlock not implemented")
  3028. }
  3029. func (*UnimplementedABCIApplicationServer) ListSnapshots(ctx context.Context, req *RequestListSnapshots) (*ResponseListSnapshots, error) {
  3030. return nil, status.Errorf(codes.Unimplemented, "method ListSnapshots not implemented")
  3031. }
  3032. func (*UnimplementedABCIApplicationServer) OfferSnapshot(ctx context.Context, req *RequestOfferSnapshot) (*ResponseOfferSnapshot, error) {
  3033. return nil, status.Errorf(codes.Unimplemented, "method OfferSnapshot not implemented")
  3034. }
  3035. func (*UnimplementedABCIApplicationServer) LoadSnapshotChunk(ctx context.Context, req *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error) {
  3036. return nil, status.Errorf(codes.Unimplemented, "method LoadSnapshotChunk not implemented")
  3037. }
  3038. func (*UnimplementedABCIApplicationServer) ApplySnapshotChunk(ctx context.Context, req *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error) {
  3039. return nil, status.Errorf(codes.Unimplemented, "method ApplySnapshotChunk not implemented")
  3040. }
  3041. func RegisterABCIApplicationServer(s *grpc.Server, srv ABCIApplicationServer) {
  3042. s.RegisterService(&_ABCIApplication_serviceDesc, srv)
  3043. }
  3044. func _ABCIApplication_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3045. in := new(RequestEcho)
  3046. if err := dec(in); err != nil {
  3047. return nil, err
  3048. }
  3049. if interceptor == nil {
  3050. return srv.(ABCIApplicationServer).Echo(ctx, in)
  3051. }
  3052. info := &grpc.UnaryServerInfo{
  3053. Server: srv,
  3054. FullMethod: "/tendermint.abci.ABCIApplication/Echo",
  3055. }
  3056. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3057. return srv.(ABCIApplicationServer).Echo(ctx, req.(*RequestEcho))
  3058. }
  3059. return interceptor(ctx, in, info, handler)
  3060. }
  3061. func _ABCIApplication_Flush_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3062. in := new(RequestFlush)
  3063. if err := dec(in); err != nil {
  3064. return nil, err
  3065. }
  3066. if interceptor == nil {
  3067. return srv.(ABCIApplicationServer).Flush(ctx, in)
  3068. }
  3069. info := &grpc.UnaryServerInfo{
  3070. Server: srv,
  3071. FullMethod: "/tendermint.abci.ABCIApplication/Flush",
  3072. }
  3073. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3074. return srv.(ABCIApplicationServer).Flush(ctx, req.(*RequestFlush))
  3075. }
  3076. return interceptor(ctx, in, info, handler)
  3077. }
  3078. func _ABCIApplication_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3079. in := new(RequestInfo)
  3080. if err := dec(in); err != nil {
  3081. return nil, err
  3082. }
  3083. if interceptor == nil {
  3084. return srv.(ABCIApplicationServer).Info(ctx, in)
  3085. }
  3086. info := &grpc.UnaryServerInfo{
  3087. Server: srv,
  3088. FullMethod: "/tendermint.abci.ABCIApplication/Info",
  3089. }
  3090. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3091. return srv.(ABCIApplicationServer).Info(ctx, req.(*RequestInfo))
  3092. }
  3093. return interceptor(ctx, in, info, handler)
  3094. }
  3095. func _ABCIApplication_DeliverTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3096. in := new(RequestDeliverTx)
  3097. if err := dec(in); err != nil {
  3098. return nil, err
  3099. }
  3100. if interceptor == nil {
  3101. return srv.(ABCIApplicationServer).DeliverTx(ctx, in)
  3102. }
  3103. info := &grpc.UnaryServerInfo{
  3104. Server: srv,
  3105. FullMethod: "/tendermint.abci.ABCIApplication/DeliverTx",
  3106. }
  3107. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3108. return srv.(ABCIApplicationServer).DeliverTx(ctx, req.(*RequestDeliverTx))
  3109. }
  3110. return interceptor(ctx, in, info, handler)
  3111. }
  3112. func _ABCIApplication_CheckTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3113. in := new(RequestCheckTx)
  3114. if err := dec(in); err != nil {
  3115. return nil, err
  3116. }
  3117. if interceptor == nil {
  3118. return srv.(ABCIApplicationServer).CheckTx(ctx, in)
  3119. }
  3120. info := &grpc.UnaryServerInfo{
  3121. Server: srv,
  3122. FullMethod: "/tendermint.abci.ABCIApplication/CheckTx",
  3123. }
  3124. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3125. return srv.(ABCIApplicationServer).CheckTx(ctx, req.(*RequestCheckTx))
  3126. }
  3127. return interceptor(ctx, in, info, handler)
  3128. }
  3129. func _ABCIApplication_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3130. in := new(RequestQuery)
  3131. if err := dec(in); err != nil {
  3132. return nil, err
  3133. }
  3134. if interceptor == nil {
  3135. return srv.(ABCIApplicationServer).Query(ctx, in)
  3136. }
  3137. info := &grpc.UnaryServerInfo{
  3138. Server: srv,
  3139. FullMethod: "/tendermint.abci.ABCIApplication/Query",
  3140. }
  3141. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3142. return srv.(ABCIApplicationServer).Query(ctx, req.(*RequestQuery))
  3143. }
  3144. return interceptor(ctx, in, info, handler)
  3145. }
  3146. func _ABCIApplication_Commit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3147. in := new(RequestCommit)
  3148. if err := dec(in); err != nil {
  3149. return nil, err
  3150. }
  3151. if interceptor == nil {
  3152. return srv.(ABCIApplicationServer).Commit(ctx, in)
  3153. }
  3154. info := &grpc.UnaryServerInfo{
  3155. Server: srv,
  3156. FullMethod: "/tendermint.abci.ABCIApplication/Commit",
  3157. }
  3158. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3159. return srv.(ABCIApplicationServer).Commit(ctx, req.(*RequestCommit))
  3160. }
  3161. return interceptor(ctx, in, info, handler)
  3162. }
  3163. func _ABCIApplication_InitChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3164. in := new(RequestInitChain)
  3165. if err := dec(in); err != nil {
  3166. return nil, err
  3167. }
  3168. if interceptor == nil {
  3169. return srv.(ABCIApplicationServer).InitChain(ctx, in)
  3170. }
  3171. info := &grpc.UnaryServerInfo{
  3172. Server: srv,
  3173. FullMethod: "/tendermint.abci.ABCIApplication/InitChain",
  3174. }
  3175. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3176. return srv.(ABCIApplicationServer).InitChain(ctx, req.(*RequestInitChain))
  3177. }
  3178. return interceptor(ctx, in, info, handler)
  3179. }
  3180. func _ABCIApplication_BeginBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3181. in := new(RequestBeginBlock)
  3182. if err := dec(in); err != nil {
  3183. return nil, err
  3184. }
  3185. if interceptor == nil {
  3186. return srv.(ABCIApplicationServer).BeginBlock(ctx, in)
  3187. }
  3188. info := &grpc.UnaryServerInfo{
  3189. Server: srv,
  3190. FullMethod: "/tendermint.abci.ABCIApplication/BeginBlock",
  3191. }
  3192. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3193. return srv.(ABCIApplicationServer).BeginBlock(ctx, req.(*RequestBeginBlock))
  3194. }
  3195. return interceptor(ctx, in, info, handler)
  3196. }
  3197. func _ABCIApplication_EndBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3198. in := new(RequestEndBlock)
  3199. if err := dec(in); err != nil {
  3200. return nil, err
  3201. }
  3202. if interceptor == nil {
  3203. return srv.(ABCIApplicationServer).EndBlock(ctx, in)
  3204. }
  3205. info := &grpc.UnaryServerInfo{
  3206. Server: srv,
  3207. FullMethod: "/tendermint.abci.ABCIApplication/EndBlock",
  3208. }
  3209. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3210. return srv.(ABCIApplicationServer).EndBlock(ctx, req.(*RequestEndBlock))
  3211. }
  3212. return interceptor(ctx, in, info, handler)
  3213. }
  3214. func _ABCIApplication_ListSnapshots_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3215. in := new(RequestListSnapshots)
  3216. if err := dec(in); err != nil {
  3217. return nil, err
  3218. }
  3219. if interceptor == nil {
  3220. return srv.(ABCIApplicationServer).ListSnapshots(ctx, in)
  3221. }
  3222. info := &grpc.UnaryServerInfo{
  3223. Server: srv,
  3224. FullMethod: "/tendermint.abci.ABCIApplication/ListSnapshots",
  3225. }
  3226. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3227. return srv.(ABCIApplicationServer).ListSnapshots(ctx, req.(*RequestListSnapshots))
  3228. }
  3229. return interceptor(ctx, in, info, handler)
  3230. }
  3231. func _ABCIApplication_OfferSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3232. in := new(RequestOfferSnapshot)
  3233. if err := dec(in); err != nil {
  3234. return nil, err
  3235. }
  3236. if interceptor == nil {
  3237. return srv.(ABCIApplicationServer).OfferSnapshot(ctx, in)
  3238. }
  3239. info := &grpc.UnaryServerInfo{
  3240. Server: srv,
  3241. FullMethod: "/tendermint.abci.ABCIApplication/OfferSnapshot",
  3242. }
  3243. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3244. return srv.(ABCIApplicationServer).OfferSnapshot(ctx, req.(*RequestOfferSnapshot))
  3245. }
  3246. return interceptor(ctx, in, info, handler)
  3247. }
  3248. func _ABCIApplication_LoadSnapshotChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3249. in := new(RequestLoadSnapshotChunk)
  3250. if err := dec(in); err != nil {
  3251. return nil, err
  3252. }
  3253. if interceptor == nil {
  3254. return srv.(ABCIApplicationServer).LoadSnapshotChunk(ctx, in)
  3255. }
  3256. info := &grpc.UnaryServerInfo{
  3257. Server: srv,
  3258. FullMethod: "/tendermint.abci.ABCIApplication/LoadSnapshotChunk",
  3259. }
  3260. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3261. return srv.(ABCIApplicationServer).LoadSnapshotChunk(ctx, req.(*RequestLoadSnapshotChunk))
  3262. }
  3263. return interceptor(ctx, in, info, handler)
  3264. }
  3265. func _ABCIApplication_ApplySnapshotChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3266. in := new(RequestApplySnapshotChunk)
  3267. if err := dec(in); err != nil {
  3268. return nil, err
  3269. }
  3270. if interceptor == nil {
  3271. return srv.(ABCIApplicationServer).ApplySnapshotChunk(ctx, in)
  3272. }
  3273. info := &grpc.UnaryServerInfo{
  3274. Server: srv,
  3275. FullMethod: "/tendermint.abci.ABCIApplication/ApplySnapshotChunk",
  3276. }
  3277. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3278. return srv.(ABCIApplicationServer).ApplySnapshotChunk(ctx, req.(*RequestApplySnapshotChunk))
  3279. }
  3280. return interceptor(ctx, in, info, handler)
  3281. }
  3282. var _ABCIApplication_serviceDesc = grpc.ServiceDesc{
  3283. ServiceName: "tendermint.abci.ABCIApplication",
  3284. HandlerType: (*ABCIApplicationServer)(nil),
  3285. Methods: []grpc.MethodDesc{
  3286. {
  3287. MethodName: "Echo",
  3288. Handler: _ABCIApplication_Echo_Handler,
  3289. },
  3290. {
  3291. MethodName: "Flush",
  3292. Handler: _ABCIApplication_Flush_Handler,
  3293. },
  3294. {
  3295. MethodName: "Info",
  3296. Handler: _ABCIApplication_Info_Handler,
  3297. },
  3298. {
  3299. MethodName: "DeliverTx",
  3300. Handler: _ABCIApplication_DeliverTx_Handler,
  3301. },
  3302. {
  3303. MethodName: "CheckTx",
  3304. Handler: _ABCIApplication_CheckTx_Handler,
  3305. },
  3306. {
  3307. MethodName: "Query",
  3308. Handler: _ABCIApplication_Query_Handler,
  3309. },
  3310. {
  3311. MethodName: "Commit",
  3312. Handler: _ABCIApplication_Commit_Handler,
  3313. },
  3314. {
  3315. MethodName: "InitChain",
  3316. Handler: _ABCIApplication_InitChain_Handler,
  3317. },
  3318. {
  3319. MethodName: "BeginBlock",
  3320. Handler: _ABCIApplication_BeginBlock_Handler,
  3321. },
  3322. {
  3323. MethodName: "EndBlock",
  3324. Handler: _ABCIApplication_EndBlock_Handler,
  3325. },
  3326. {
  3327. MethodName: "ListSnapshots",
  3328. Handler: _ABCIApplication_ListSnapshots_Handler,
  3329. },
  3330. {
  3331. MethodName: "OfferSnapshot",
  3332. Handler: _ABCIApplication_OfferSnapshot_Handler,
  3333. },
  3334. {
  3335. MethodName: "LoadSnapshotChunk",
  3336. Handler: _ABCIApplication_LoadSnapshotChunk_Handler,
  3337. },
  3338. {
  3339. MethodName: "ApplySnapshotChunk",
  3340. Handler: _ABCIApplication_ApplySnapshotChunk_Handler,
  3341. },
  3342. },
  3343. Streams: []grpc.StreamDesc{},
  3344. Metadata: "tendermint/abci/types.proto",
  3345. }
  3346. func (m *Request) Marshal() (dAtA []byte, err error) {
  3347. size := m.Size()
  3348. dAtA = make([]byte, size)
  3349. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3350. if err != nil {
  3351. return nil, err
  3352. }
  3353. return dAtA[:n], nil
  3354. }
  3355. func (m *Request) MarshalTo(dAtA []byte) (int, error) {
  3356. size := m.Size()
  3357. return m.MarshalToSizedBuffer(dAtA[:size])
  3358. }
  3359. func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3360. i := len(dAtA)
  3361. _ = i
  3362. var l int
  3363. _ = l
  3364. if m.Value != nil {
  3365. {
  3366. size := m.Value.Size()
  3367. i -= size
  3368. if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil {
  3369. return 0, err
  3370. }
  3371. }
  3372. }
  3373. return len(dAtA) - i, nil
  3374. }
  3375. func (m *Request_Echo) MarshalTo(dAtA []byte) (int, error) {
  3376. size := m.Size()
  3377. return m.MarshalToSizedBuffer(dAtA[:size])
  3378. }
  3379. func (m *Request_Echo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3380. i := len(dAtA)
  3381. if m.Echo != nil {
  3382. {
  3383. size, err := m.Echo.MarshalToSizedBuffer(dAtA[:i])
  3384. if err != nil {
  3385. return 0, err
  3386. }
  3387. i -= size
  3388. i = encodeVarintTypes(dAtA, i, uint64(size))
  3389. }
  3390. i--
  3391. dAtA[i] = 0xa
  3392. }
  3393. return len(dAtA) - i, nil
  3394. }
  3395. func (m *Request_Flush) MarshalTo(dAtA []byte) (int, error) {
  3396. size := m.Size()
  3397. return m.MarshalToSizedBuffer(dAtA[:size])
  3398. }
  3399. func (m *Request_Flush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3400. i := len(dAtA)
  3401. if m.Flush != nil {
  3402. {
  3403. size, err := m.Flush.MarshalToSizedBuffer(dAtA[:i])
  3404. if err != nil {
  3405. return 0, err
  3406. }
  3407. i -= size
  3408. i = encodeVarintTypes(dAtA, i, uint64(size))
  3409. }
  3410. i--
  3411. dAtA[i] = 0x12
  3412. }
  3413. return len(dAtA) - i, nil
  3414. }
  3415. func (m *Request_Info) MarshalTo(dAtA []byte) (int, error) {
  3416. size := m.Size()
  3417. return m.MarshalToSizedBuffer(dAtA[:size])
  3418. }
  3419. func (m *Request_Info) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3420. i := len(dAtA)
  3421. if m.Info != nil {
  3422. {
  3423. size, err := m.Info.MarshalToSizedBuffer(dAtA[:i])
  3424. if err != nil {
  3425. return 0, err
  3426. }
  3427. i -= size
  3428. i = encodeVarintTypes(dAtA, i, uint64(size))
  3429. }
  3430. i--
  3431. dAtA[i] = 0x1a
  3432. }
  3433. return len(dAtA) - i, nil
  3434. }
  3435. func (m *Request_InitChain) MarshalTo(dAtA []byte) (int, error) {
  3436. size := m.Size()
  3437. return m.MarshalToSizedBuffer(dAtA[:size])
  3438. }
  3439. func (m *Request_InitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3440. i := len(dAtA)
  3441. if m.InitChain != nil {
  3442. {
  3443. size, err := m.InitChain.MarshalToSizedBuffer(dAtA[:i])
  3444. if err != nil {
  3445. return 0, err
  3446. }
  3447. i -= size
  3448. i = encodeVarintTypes(dAtA, i, uint64(size))
  3449. }
  3450. i--
  3451. dAtA[i] = 0x22
  3452. }
  3453. return len(dAtA) - i, nil
  3454. }
  3455. func (m *Request_Query) MarshalTo(dAtA []byte) (int, error) {
  3456. size := m.Size()
  3457. return m.MarshalToSizedBuffer(dAtA[:size])
  3458. }
  3459. func (m *Request_Query) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3460. i := len(dAtA)
  3461. if m.Query != nil {
  3462. {
  3463. size, err := m.Query.MarshalToSizedBuffer(dAtA[:i])
  3464. if err != nil {
  3465. return 0, err
  3466. }
  3467. i -= size
  3468. i = encodeVarintTypes(dAtA, i, uint64(size))
  3469. }
  3470. i--
  3471. dAtA[i] = 0x2a
  3472. }
  3473. return len(dAtA) - i, nil
  3474. }
  3475. func (m *Request_BeginBlock) MarshalTo(dAtA []byte) (int, error) {
  3476. size := m.Size()
  3477. return m.MarshalToSizedBuffer(dAtA[:size])
  3478. }
  3479. func (m *Request_BeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3480. i := len(dAtA)
  3481. if m.BeginBlock != nil {
  3482. {
  3483. size, err := m.BeginBlock.MarshalToSizedBuffer(dAtA[:i])
  3484. if err != nil {
  3485. return 0, err
  3486. }
  3487. i -= size
  3488. i = encodeVarintTypes(dAtA, i, uint64(size))
  3489. }
  3490. i--
  3491. dAtA[i] = 0x32
  3492. }
  3493. return len(dAtA) - i, nil
  3494. }
  3495. func (m *Request_CheckTx) MarshalTo(dAtA []byte) (int, error) {
  3496. size := m.Size()
  3497. return m.MarshalToSizedBuffer(dAtA[:size])
  3498. }
  3499. func (m *Request_CheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3500. i := len(dAtA)
  3501. if m.CheckTx != nil {
  3502. {
  3503. size, err := m.CheckTx.MarshalToSizedBuffer(dAtA[:i])
  3504. if err != nil {
  3505. return 0, err
  3506. }
  3507. i -= size
  3508. i = encodeVarintTypes(dAtA, i, uint64(size))
  3509. }
  3510. i--
  3511. dAtA[i] = 0x3a
  3512. }
  3513. return len(dAtA) - i, nil
  3514. }
  3515. func (m *Request_DeliverTx) MarshalTo(dAtA []byte) (int, error) {
  3516. size := m.Size()
  3517. return m.MarshalToSizedBuffer(dAtA[:size])
  3518. }
  3519. func (m *Request_DeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3520. i := len(dAtA)
  3521. if m.DeliverTx != nil {
  3522. {
  3523. size, err := m.DeliverTx.MarshalToSizedBuffer(dAtA[:i])
  3524. if err != nil {
  3525. return 0, err
  3526. }
  3527. i -= size
  3528. i = encodeVarintTypes(dAtA, i, uint64(size))
  3529. }
  3530. i--
  3531. dAtA[i] = 0x42
  3532. }
  3533. return len(dAtA) - i, nil
  3534. }
  3535. func (m *Request_EndBlock) MarshalTo(dAtA []byte) (int, error) {
  3536. size := m.Size()
  3537. return m.MarshalToSizedBuffer(dAtA[:size])
  3538. }
  3539. func (m *Request_EndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3540. i := len(dAtA)
  3541. if m.EndBlock != nil {
  3542. {
  3543. size, err := m.EndBlock.MarshalToSizedBuffer(dAtA[:i])
  3544. if err != nil {
  3545. return 0, err
  3546. }
  3547. i -= size
  3548. i = encodeVarintTypes(dAtA, i, uint64(size))
  3549. }
  3550. i--
  3551. dAtA[i] = 0x4a
  3552. }
  3553. return len(dAtA) - i, nil
  3554. }
  3555. func (m *Request_Commit) MarshalTo(dAtA []byte) (int, error) {
  3556. size := m.Size()
  3557. return m.MarshalToSizedBuffer(dAtA[:size])
  3558. }
  3559. func (m *Request_Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3560. i := len(dAtA)
  3561. if m.Commit != nil {
  3562. {
  3563. size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i])
  3564. if err != nil {
  3565. return 0, err
  3566. }
  3567. i -= size
  3568. i = encodeVarintTypes(dAtA, i, uint64(size))
  3569. }
  3570. i--
  3571. dAtA[i] = 0x52
  3572. }
  3573. return len(dAtA) - i, nil
  3574. }
  3575. func (m *Request_ListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  3576. size := m.Size()
  3577. return m.MarshalToSizedBuffer(dAtA[:size])
  3578. }
  3579. func (m *Request_ListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3580. i := len(dAtA)
  3581. if m.ListSnapshots != nil {
  3582. {
  3583. size, err := m.ListSnapshots.MarshalToSizedBuffer(dAtA[:i])
  3584. if err != nil {
  3585. return 0, err
  3586. }
  3587. i -= size
  3588. i = encodeVarintTypes(dAtA, i, uint64(size))
  3589. }
  3590. i--
  3591. dAtA[i] = 0x5a
  3592. }
  3593. return len(dAtA) - i, nil
  3594. }
  3595. func (m *Request_OfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  3596. size := m.Size()
  3597. return m.MarshalToSizedBuffer(dAtA[:size])
  3598. }
  3599. func (m *Request_OfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3600. i := len(dAtA)
  3601. if m.OfferSnapshot != nil {
  3602. {
  3603. size, err := m.OfferSnapshot.MarshalToSizedBuffer(dAtA[:i])
  3604. if err != nil {
  3605. return 0, err
  3606. }
  3607. i -= size
  3608. i = encodeVarintTypes(dAtA, i, uint64(size))
  3609. }
  3610. i--
  3611. dAtA[i] = 0x62
  3612. }
  3613. return len(dAtA) - i, nil
  3614. }
  3615. func (m *Request_LoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  3616. size := m.Size()
  3617. return m.MarshalToSizedBuffer(dAtA[:size])
  3618. }
  3619. func (m *Request_LoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3620. i := len(dAtA)
  3621. if m.LoadSnapshotChunk != nil {
  3622. {
  3623. size, err := m.LoadSnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  3624. if err != nil {
  3625. return 0, err
  3626. }
  3627. i -= size
  3628. i = encodeVarintTypes(dAtA, i, uint64(size))
  3629. }
  3630. i--
  3631. dAtA[i] = 0x6a
  3632. }
  3633. return len(dAtA) - i, nil
  3634. }
  3635. func (m *Request_ApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  3636. size := m.Size()
  3637. return m.MarshalToSizedBuffer(dAtA[:size])
  3638. }
  3639. func (m *Request_ApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3640. i := len(dAtA)
  3641. if m.ApplySnapshotChunk != nil {
  3642. {
  3643. size, err := m.ApplySnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  3644. if err != nil {
  3645. return 0, err
  3646. }
  3647. i -= size
  3648. i = encodeVarintTypes(dAtA, i, uint64(size))
  3649. }
  3650. i--
  3651. dAtA[i] = 0x72
  3652. }
  3653. return len(dAtA) - i, nil
  3654. }
  3655. func (m *RequestEcho) Marshal() (dAtA []byte, err error) {
  3656. size := m.Size()
  3657. dAtA = make([]byte, size)
  3658. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3659. if err != nil {
  3660. return nil, err
  3661. }
  3662. return dAtA[:n], nil
  3663. }
  3664. func (m *RequestEcho) MarshalTo(dAtA []byte) (int, error) {
  3665. size := m.Size()
  3666. return m.MarshalToSizedBuffer(dAtA[:size])
  3667. }
  3668. func (m *RequestEcho) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3669. i := len(dAtA)
  3670. _ = i
  3671. var l int
  3672. _ = l
  3673. if len(m.Message) > 0 {
  3674. i -= len(m.Message)
  3675. copy(dAtA[i:], m.Message)
  3676. i = encodeVarintTypes(dAtA, i, uint64(len(m.Message)))
  3677. i--
  3678. dAtA[i] = 0xa
  3679. }
  3680. return len(dAtA) - i, nil
  3681. }
  3682. func (m *RequestFlush) Marshal() (dAtA []byte, err error) {
  3683. size := m.Size()
  3684. dAtA = make([]byte, size)
  3685. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3686. if err != nil {
  3687. return nil, err
  3688. }
  3689. return dAtA[:n], nil
  3690. }
  3691. func (m *RequestFlush) MarshalTo(dAtA []byte) (int, error) {
  3692. size := m.Size()
  3693. return m.MarshalToSizedBuffer(dAtA[:size])
  3694. }
  3695. func (m *RequestFlush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3696. i := len(dAtA)
  3697. _ = i
  3698. var l int
  3699. _ = l
  3700. return len(dAtA) - i, nil
  3701. }
  3702. func (m *RequestInfo) Marshal() (dAtA []byte, err error) {
  3703. size := m.Size()
  3704. dAtA = make([]byte, size)
  3705. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3706. if err != nil {
  3707. return nil, err
  3708. }
  3709. return dAtA[:n], nil
  3710. }
  3711. func (m *RequestInfo) MarshalTo(dAtA []byte) (int, error) {
  3712. size := m.Size()
  3713. return m.MarshalToSizedBuffer(dAtA[:size])
  3714. }
  3715. func (m *RequestInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3716. i := len(dAtA)
  3717. _ = i
  3718. var l int
  3719. _ = l
  3720. if len(m.AbciVersion) > 0 {
  3721. i -= len(m.AbciVersion)
  3722. copy(dAtA[i:], m.AbciVersion)
  3723. i = encodeVarintTypes(dAtA, i, uint64(len(m.AbciVersion)))
  3724. i--
  3725. dAtA[i] = 0x22
  3726. }
  3727. if m.P2PVersion != 0 {
  3728. i = encodeVarintTypes(dAtA, i, uint64(m.P2PVersion))
  3729. i--
  3730. dAtA[i] = 0x18
  3731. }
  3732. if m.BlockVersion != 0 {
  3733. i = encodeVarintTypes(dAtA, i, uint64(m.BlockVersion))
  3734. i--
  3735. dAtA[i] = 0x10
  3736. }
  3737. if len(m.Version) > 0 {
  3738. i -= len(m.Version)
  3739. copy(dAtA[i:], m.Version)
  3740. i = encodeVarintTypes(dAtA, i, uint64(len(m.Version)))
  3741. i--
  3742. dAtA[i] = 0xa
  3743. }
  3744. return len(dAtA) - i, nil
  3745. }
  3746. func (m *RequestInitChain) Marshal() (dAtA []byte, err error) {
  3747. size := m.Size()
  3748. dAtA = make([]byte, size)
  3749. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3750. if err != nil {
  3751. return nil, err
  3752. }
  3753. return dAtA[:n], nil
  3754. }
  3755. func (m *RequestInitChain) MarshalTo(dAtA []byte) (int, error) {
  3756. size := m.Size()
  3757. return m.MarshalToSizedBuffer(dAtA[:size])
  3758. }
  3759. func (m *RequestInitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3760. i := len(dAtA)
  3761. _ = i
  3762. var l int
  3763. _ = l
  3764. if m.InitialHeight != 0 {
  3765. i = encodeVarintTypes(dAtA, i, uint64(m.InitialHeight))
  3766. i--
  3767. dAtA[i] = 0x30
  3768. }
  3769. if len(m.AppStateBytes) > 0 {
  3770. i -= len(m.AppStateBytes)
  3771. copy(dAtA[i:], m.AppStateBytes)
  3772. i = encodeVarintTypes(dAtA, i, uint64(len(m.AppStateBytes)))
  3773. i--
  3774. dAtA[i] = 0x2a
  3775. }
  3776. if len(m.Validators) > 0 {
  3777. for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- {
  3778. {
  3779. size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  3780. if err != nil {
  3781. return 0, err
  3782. }
  3783. i -= size
  3784. i = encodeVarintTypes(dAtA, i, uint64(size))
  3785. }
  3786. i--
  3787. dAtA[i] = 0x22
  3788. }
  3789. }
  3790. if m.ConsensusParams != nil {
  3791. {
  3792. size, err := m.ConsensusParams.MarshalToSizedBuffer(dAtA[:i])
  3793. if err != nil {
  3794. return 0, err
  3795. }
  3796. i -= size
  3797. i = encodeVarintTypes(dAtA, i, uint64(size))
  3798. }
  3799. i--
  3800. dAtA[i] = 0x1a
  3801. }
  3802. if len(m.ChainId) > 0 {
  3803. i -= len(m.ChainId)
  3804. copy(dAtA[i:], m.ChainId)
  3805. i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId)))
  3806. i--
  3807. dAtA[i] = 0x12
  3808. }
  3809. n16, err16 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):])
  3810. if err16 != nil {
  3811. return 0, err16
  3812. }
  3813. i -= n16
  3814. i = encodeVarintTypes(dAtA, i, uint64(n16))
  3815. i--
  3816. dAtA[i] = 0xa
  3817. return len(dAtA) - i, nil
  3818. }
  3819. func (m *RequestQuery) Marshal() (dAtA []byte, err error) {
  3820. size := m.Size()
  3821. dAtA = make([]byte, size)
  3822. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3823. if err != nil {
  3824. return nil, err
  3825. }
  3826. return dAtA[:n], nil
  3827. }
  3828. func (m *RequestQuery) MarshalTo(dAtA []byte) (int, error) {
  3829. size := m.Size()
  3830. return m.MarshalToSizedBuffer(dAtA[:size])
  3831. }
  3832. func (m *RequestQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3833. i := len(dAtA)
  3834. _ = i
  3835. var l int
  3836. _ = l
  3837. if m.Prove {
  3838. i--
  3839. if m.Prove {
  3840. dAtA[i] = 1
  3841. } else {
  3842. dAtA[i] = 0
  3843. }
  3844. i--
  3845. dAtA[i] = 0x20
  3846. }
  3847. if m.Height != 0 {
  3848. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  3849. i--
  3850. dAtA[i] = 0x18
  3851. }
  3852. if len(m.Path) > 0 {
  3853. i -= len(m.Path)
  3854. copy(dAtA[i:], m.Path)
  3855. i = encodeVarintTypes(dAtA, i, uint64(len(m.Path)))
  3856. i--
  3857. dAtA[i] = 0x12
  3858. }
  3859. if len(m.Data) > 0 {
  3860. i -= len(m.Data)
  3861. copy(dAtA[i:], m.Data)
  3862. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  3863. i--
  3864. dAtA[i] = 0xa
  3865. }
  3866. return len(dAtA) - i, nil
  3867. }
  3868. func (m *RequestBeginBlock) Marshal() (dAtA []byte, err error) {
  3869. size := m.Size()
  3870. dAtA = make([]byte, size)
  3871. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3872. if err != nil {
  3873. return nil, err
  3874. }
  3875. return dAtA[:n], nil
  3876. }
  3877. func (m *RequestBeginBlock) MarshalTo(dAtA []byte) (int, error) {
  3878. size := m.Size()
  3879. return m.MarshalToSizedBuffer(dAtA[:size])
  3880. }
  3881. func (m *RequestBeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3882. i := len(dAtA)
  3883. _ = i
  3884. var l int
  3885. _ = l
  3886. if len(m.ByzantineValidators) > 0 {
  3887. for iNdEx := len(m.ByzantineValidators) - 1; iNdEx >= 0; iNdEx-- {
  3888. {
  3889. size, err := m.ByzantineValidators[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  3890. if err != nil {
  3891. return 0, err
  3892. }
  3893. i -= size
  3894. i = encodeVarintTypes(dAtA, i, uint64(size))
  3895. }
  3896. i--
  3897. dAtA[i] = 0x22
  3898. }
  3899. }
  3900. {
  3901. size, err := m.LastCommitInfo.MarshalToSizedBuffer(dAtA[:i])
  3902. if err != nil {
  3903. return 0, err
  3904. }
  3905. i -= size
  3906. i = encodeVarintTypes(dAtA, i, uint64(size))
  3907. }
  3908. i--
  3909. dAtA[i] = 0x1a
  3910. {
  3911. size, err := m.Header.MarshalToSizedBuffer(dAtA[:i])
  3912. if err != nil {
  3913. return 0, err
  3914. }
  3915. i -= size
  3916. i = encodeVarintTypes(dAtA, i, uint64(size))
  3917. }
  3918. i--
  3919. dAtA[i] = 0x12
  3920. if len(m.Hash) > 0 {
  3921. i -= len(m.Hash)
  3922. copy(dAtA[i:], m.Hash)
  3923. i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash)))
  3924. i--
  3925. dAtA[i] = 0xa
  3926. }
  3927. return len(dAtA) - i, nil
  3928. }
  3929. func (m *RequestCheckTx) Marshal() (dAtA []byte, err error) {
  3930. size := m.Size()
  3931. dAtA = make([]byte, size)
  3932. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3933. if err != nil {
  3934. return nil, err
  3935. }
  3936. return dAtA[:n], nil
  3937. }
  3938. func (m *RequestCheckTx) MarshalTo(dAtA []byte) (int, error) {
  3939. size := m.Size()
  3940. return m.MarshalToSizedBuffer(dAtA[:size])
  3941. }
  3942. func (m *RequestCheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3943. i := len(dAtA)
  3944. _ = i
  3945. var l int
  3946. _ = l
  3947. if m.Type != 0 {
  3948. i = encodeVarintTypes(dAtA, i, uint64(m.Type))
  3949. i--
  3950. dAtA[i] = 0x10
  3951. }
  3952. if len(m.Tx) > 0 {
  3953. i -= len(m.Tx)
  3954. copy(dAtA[i:], m.Tx)
  3955. i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx)))
  3956. i--
  3957. dAtA[i] = 0xa
  3958. }
  3959. return len(dAtA) - i, nil
  3960. }
  3961. func (m *RequestDeliverTx) Marshal() (dAtA []byte, err error) {
  3962. size := m.Size()
  3963. dAtA = make([]byte, size)
  3964. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3965. if err != nil {
  3966. return nil, err
  3967. }
  3968. return dAtA[:n], nil
  3969. }
  3970. func (m *RequestDeliverTx) MarshalTo(dAtA []byte) (int, error) {
  3971. size := m.Size()
  3972. return m.MarshalToSizedBuffer(dAtA[:size])
  3973. }
  3974. func (m *RequestDeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3975. i := len(dAtA)
  3976. _ = i
  3977. var l int
  3978. _ = l
  3979. if len(m.Tx) > 0 {
  3980. i -= len(m.Tx)
  3981. copy(dAtA[i:], m.Tx)
  3982. i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx)))
  3983. i--
  3984. dAtA[i] = 0xa
  3985. }
  3986. return len(dAtA) - i, nil
  3987. }
  3988. func (m *RequestEndBlock) Marshal() (dAtA []byte, err error) {
  3989. size := m.Size()
  3990. dAtA = make([]byte, size)
  3991. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3992. if err != nil {
  3993. return nil, err
  3994. }
  3995. return dAtA[:n], nil
  3996. }
  3997. func (m *RequestEndBlock) MarshalTo(dAtA []byte) (int, error) {
  3998. size := m.Size()
  3999. return m.MarshalToSizedBuffer(dAtA[:size])
  4000. }
  4001. func (m *RequestEndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4002. i := len(dAtA)
  4003. _ = i
  4004. var l int
  4005. _ = l
  4006. if m.Height != 0 {
  4007. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  4008. i--
  4009. dAtA[i] = 0x8
  4010. }
  4011. return len(dAtA) - i, nil
  4012. }
  4013. func (m *RequestCommit) Marshal() (dAtA []byte, err error) {
  4014. size := m.Size()
  4015. dAtA = make([]byte, size)
  4016. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4017. if err != nil {
  4018. return nil, err
  4019. }
  4020. return dAtA[:n], nil
  4021. }
  4022. func (m *RequestCommit) MarshalTo(dAtA []byte) (int, error) {
  4023. size := m.Size()
  4024. return m.MarshalToSizedBuffer(dAtA[:size])
  4025. }
  4026. func (m *RequestCommit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4027. i := len(dAtA)
  4028. _ = i
  4029. var l int
  4030. _ = l
  4031. return len(dAtA) - i, nil
  4032. }
  4033. func (m *RequestListSnapshots) Marshal() (dAtA []byte, err error) {
  4034. size := m.Size()
  4035. dAtA = make([]byte, size)
  4036. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4037. if err != nil {
  4038. return nil, err
  4039. }
  4040. return dAtA[:n], nil
  4041. }
  4042. func (m *RequestListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  4043. size := m.Size()
  4044. return m.MarshalToSizedBuffer(dAtA[:size])
  4045. }
  4046. func (m *RequestListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4047. i := len(dAtA)
  4048. _ = i
  4049. var l int
  4050. _ = l
  4051. return len(dAtA) - i, nil
  4052. }
  4053. func (m *RequestOfferSnapshot) Marshal() (dAtA []byte, err error) {
  4054. size := m.Size()
  4055. dAtA = make([]byte, size)
  4056. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4057. if err != nil {
  4058. return nil, err
  4059. }
  4060. return dAtA[:n], nil
  4061. }
  4062. func (m *RequestOfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  4063. size := m.Size()
  4064. return m.MarshalToSizedBuffer(dAtA[:size])
  4065. }
  4066. func (m *RequestOfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4067. i := len(dAtA)
  4068. _ = i
  4069. var l int
  4070. _ = l
  4071. if len(m.AppHash) > 0 {
  4072. i -= len(m.AppHash)
  4073. copy(dAtA[i:], m.AppHash)
  4074. i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash)))
  4075. i--
  4076. dAtA[i] = 0x12
  4077. }
  4078. if m.Snapshot != nil {
  4079. {
  4080. size, err := m.Snapshot.MarshalToSizedBuffer(dAtA[:i])
  4081. if err != nil {
  4082. return 0, err
  4083. }
  4084. i -= size
  4085. i = encodeVarintTypes(dAtA, i, uint64(size))
  4086. }
  4087. i--
  4088. dAtA[i] = 0xa
  4089. }
  4090. return len(dAtA) - i, nil
  4091. }
  4092. func (m *RequestLoadSnapshotChunk) Marshal() (dAtA []byte, err error) {
  4093. size := m.Size()
  4094. dAtA = make([]byte, size)
  4095. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4096. if err != nil {
  4097. return nil, err
  4098. }
  4099. return dAtA[:n], nil
  4100. }
  4101. func (m *RequestLoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4102. size := m.Size()
  4103. return m.MarshalToSizedBuffer(dAtA[:size])
  4104. }
  4105. func (m *RequestLoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4106. i := len(dAtA)
  4107. _ = i
  4108. var l int
  4109. _ = l
  4110. if m.Chunk != 0 {
  4111. i = encodeVarintTypes(dAtA, i, uint64(m.Chunk))
  4112. i--
  4113. dAtA[i] = 0x18
  4114. }
  4115. if m.Format != 0 {
  4116. i = encodeVarintTypes(dAtA, i, uint64(m.Format))
  4117. i--
  4118. dAtA[i] = 0x10
  4119. }
  4120. if m.Height != 0 {
  4121. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  4122. i--
  4123. dAtA[i] = 0x8
  4124. }
  4125. return len(dAtA) - i, nil
  4126. }
  4127. func (m *RequestApplySnapshotChunk) Marshal() (dAtA []byte, err error) {
  4128. size := m.Size()
  4129. dAtA = make([]byte, size)
  4130. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4131. if err != nil {
  4132. return nil, err
  4133. }
  4134. return dAtA[:n], nil
  4135. }
  4136. func (m *RequestApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4137. size := m.Size()
  4138. return m.MarshalToSizedBuffer(dAtA[:size])
  4139. }
  4140. func (m *RequestApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4141. i := len(dAtA)
  4142. _ = i
  4143. var l int
  4144. _ = l
  4145. if len(m.Sender) > 0 {
  4146. i -= len(m.Sender)
  4147. copy(dAtA[i:], m.Sender)
  4148. i = encodeVarintTypes(dAtA, i, uint64(len(m.Sender)))
  4149. i--
  4150. dAtA[i] = 0x1a
  4151. }
  4152. if len(m.Chunk) > 0 {
  4153. i -= len(m.Chunk)
  4154. copy(dAtA[i:], m.Chunk)
  4155. i = encodeVarintTypes(dAtA, i, uint64(len(m.Chunk)))
  4156. i--
  4157. dAtA[i] = 0x12
  4158. }
  4159. if m.Index != 0 {
  4160. i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  4161. i--
  4162. dAtA[i] = 0x8
  4163. }
  4164. return len(dAtA) - i, nil
  4165. }
  4166. func (m *Response) Marshal() (dAtA []byte, err error) {
  4167. size := m.Size()
  4168. dAtA = make([]byte, size)
  4169. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4170. if err != nil {
  4171. return nil, err
  4172. }
  4173. return dAtA[:n], nil
  4174. }
  4175. func (m *Response) MarshalTo(dAtA []byte) (int, error) {
  4176. size := m.Size()
  4177. return m.MarshalToSizedBuffer(dAtA[:size])
  4178. }
  4179. func (m *Response) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4180. i := len(dAtA)
  4181. _ = i
  4182. var l int
  4183. _ = l
  4184. if m.Value != nil {
  4185. {
  4186. size := m.Value.Size()
  4187. i -= size
  4188. if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil {
  4189. return 0, err
  4190. }
  4191. }
  4192. }
  4193. return len(dAtA) - i, nil
  4194. }
  4195. func (m *Response_Exception) MarshalTo(dAtA []byte) (int, error) {
  4196. size := m.Size()
  4197. return m.MarshalToSizedBuffer(dAtA[:size])
  4198. }
  4199. func (m *Response_Exception) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4200. i := len(dAtA)
  4201. if m.Exception != nil {
  4202. {
  4203. size, err := m.Exception.MarshalToSizedBuffer(dAtA[:i])
  4204. if err != nil {
  4205. return 0, err
  4206. }
  4207. i -= size
  4208. i = encodeVarintTypes(dAtA, i, uint64(size))
  4209. }
  4210. i--
  4211. dAtA[i] = 0xa
  4212. }
  4213. return len(dAtA) - i, nil
  4214. }
  4215. func (m *Response_Echo) MarshalTo(dAtA []byte) (int, error) {
  4216. size := m.Size()
  4217. return m.MarshalToSizedBuffer(dAtA[:size])
  4218. }
  4219. func (m *Response_Echo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4220. i := len(dAtA)
  4221. if m.Echo != nil {
  4222. {
  4223. size, err := m.Echo.MarshalToSizedBuffer(dAtA[:i])
  4224. if err != nil {
  4225. return 0, err
  4226. }
  4227. i -= size
  4228. i = encodeVarintTypes(dAtA, i, uint64(size))
  4229. }
  4230. i--
  4231. dAtA[i] = 0x12
  4232. }
  4233. return len(dAtA) - i, nil
  4234. }
  4235. func (m *Response_Flush) MarshalTo(dAtA []byte) (int, error) {
  4236. size := m.Size()
  4237. return m.MarshalToSizedBuffer(dAtA[:size])
  4238. }
  4239. func (m *Response_Flush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4240. i := len(dAtA)
  4241. if m.Flush != nil {
  4242. {
  4243. size, err := m.Flush.MarshalToSizedBuffer(dAtA[:i])
  4244. if err != nil {
  4245. return 0, err
  4246. }
  4247. i -= size
  4248. i = encodeVarintTypes(dAtA, i, uint64(size))
  4249. }
  4250. i--
  4251. dAtA[i] = 0x1a
  4252. }
  4253. return len(dAtA) - i, nil
  4254. }
  4255. func (m *Response_Info) MarshalTo(dAtA []byte) (int, error) {
  4256. size := m.Size()
  4257. return m.MarshalToSizedBuffer(dAtA[:size])
  4258. }
  4259. func (m *Response_Info) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4260. i := len(dAtA)
  4261. if m.Info != nil {
  4262. {
  4263. size, err := m.Info.MarshalToSizedBuffer(dAtA[:i])
  4264. if err != nil {
  4265. return 0, err
  4266. }
  4267. i -= size
  4268. i = encodeVarintTypes(dAtA, i, uint64(size))
  4269. }
  4270. i--
  4271. dAtA[i] = 0x22
  4272. }
  4273. return len(dAtA) - i, nil
  4274. }
  4275. func (m *Response_InitChain) MarshalTo(dAtA []byte) (int, error) {
  4276. size := m.Size()
  4277. return m.MarshalToSizedBuffer(dAtA[:size])
  4278. }
  4279. func (m *Response_InitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4280. i := len(dAtA)
  4281. if m.InitChain != nil {
  4282. {
  4283. size, err := m.InitChain.MarshalToSizedBuffer(dAtA[:i])
  4284. if err != nil {
  4285. return 0, err
  4286. }
  4287. i -= size
  4288. i = encodeVarintTypes(dAtA, i, uint64(size))
  4289. }
  4290. i--
  4291. dAtA[i] = 0x2a
  4292. }
  4293. return len(dAtA) - i, nil
  4294. }
  4295. func (m *Response_Query) MarshalTo(dAtA []byte) (int, error) {
  4296. size := m.Size()
  4297. return m.MarshalToSizedBuffer(dAtA[:size])
  4298. }
  4299. func (m *Response_Query) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4300. i := len(dAtA)
  4301. if m.Query != nil {
  4302. {
  4303. size, err := m.Query.MarshalToSizedBuffer(dAtA[:i])
  4304. if err != nil {
  4305. return 0, err
  4306. }
  4307. i -= size
  4308. i = encodeVarintTypes(dAtA, i, uint64(size))
  4309. }
  4310. i--
  4311. dAtA[i] = 0x32
  4312. }
  4313. return len(dAtA) - i, nil
  4314. }
  4315. func (m *Response_BeginBlock) MarshalTo(dAtA []byte) (int, error) {
  4316. size := m.Size()
  4317. return m.MarshalToSizedBuffer(dAtA[:size])
  4318. }
  4319. func (m *Response_BeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4320. i := len(dAtA)
  4321. if m.BeginBlock != nil {
  4322. {
  4323. size, err := m.BeginBlock.MarshalToSizedBuffer(dAtA[:i])
  4324. if err != nil {
  4325. return 0, err
  4326. }
  4327. i -= size
  4328. i = encodeVarintTypes(dAtA, i, uint64(size))
  4329. }
  4330. i--
  4331. dAtA[i] = 0x3a
  4332. }
  4333. return len(dAtA) - i, nil
  4334. }
  4335. func (m *Response_CheckTx) MarshalTo(dAtA []byte) (int, error) {
  4336. size := m.Size()
  4337. return m.MarshalToSizedBuffer(dAtA[:size])
  4338. }
  4339. func (m *Response_CheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4340. i := len(dAtA)
  4341. if m.CheckTx != nil {
  4342. {
  4343. size, err := m.CheckTx.MarshalToSizedBuffer(dAtA[:i])
  4344. if err != nil {
  4345. return 0, err
  4346. }
  4347. i -= size
  4348. i = encodeVarintTypes(dAtA, i, uint64(size))
  4349. }
  4350. i--
  4351. dAtA[i] = 0x42
  4352. }
  4353. return len(dAtA) - i, nil
  4354. }
  4355. func (m *Response_DeliverTx) MarshalTo(dAtA []byte) (int, error) {
  4356. size := m.Size()
  4357. return m.MarshalToSizedBuffer(dAtA[:size])
  4358. }
  4359. func (m *Response_DeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4360. i := len(dAtA)
  4361. if m.DeliverTx != nil {
  4362. {
  4363. size, err := m.DeliverTx.MarshalToSizedBuffer(dAtA[:i])
  4364. if err != nil {
  4365. return 0, err
  4366. }
  4367. i -= size
  4368. i = encodeVarintTypes(dAtA, i, uint64(size))
  4369. }
  4370. i--
  4371. dAtA[i] = 0x4a
  4372. }
  4373. return len(dAtA) - i, nil
  4374. }
  4375. func (m *Response_EndBlock) MarshalTo(dAtA []byte) (int, error) {
  4376. size := m.Size()
  4377. return m.MarshalToSizedBuffer(dAtA[:size])
  4378. }
  4379. func (m *Response_EndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4380. i := len(dAtA)
  4381. if m.EndBlock != nil {
  4382. {
  4383. size, err := m.EndBlock.MarshalToSizedBuffer(dAtA[:i])
  4384. if err != nil {
  4385. return 0, err
  4386. }
  4387. i -= size
  4388. i = encodeVarintTypes(dAtA, i, uint64(size))
  4389. }
  4390. i--
  4391. dAtA[i] = 0x52
  4392. }
  4393. return len(dAtA) - i, nil
  4394. }
  4395. func (m *Response_Commit) MarshalTo(dAtA []byte) (int, error) {
  4396. size := m.Size()
  4397. return m.MarshalToSizedBuffer(dAtA[:size])
  4398. }
  4399. func (m *Response_Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4400. i := len(dAtA)
  4401. if m.Commit != nil {
  4402. {
  4403. size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i])
  4404. if err != nil {
  4405. return 0, err
  4406. }
  4407. i -= size
  4408. i = encodeVarintTypes(dAtA, i, uint64(size))
  4409. }
  4410. i--
  4411. dAtA[i] = 0x5a
  4412. }
  4413. return len(dAtA) - i, nil
  4414. }
  4415. func (m *Response_ListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  4416. size := m.Size()
  4417. return m.MarshalToSizedBuffer(dAtA[:size])
  4418. }
  4419. func (m *Response_ListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4420. i := len(dAtA)
  4421. if m.ListSnapshots != nil {
  4422. {
  4423. size, err := m.ListSnapshots.MarshalToSizedBuffer(dAtA[:i])
  4424. if err != nil {
  4425. return 0, err
  4426. }
  4427. i -= size
  4428. i = encodeVarintTypes(dAtA, i, uint64(size))
  4429. }
  4430. i--
  4431. dAtA[i] = 0x62
  4432. }
  4433. return len(dAtA) - i, nil
  4434. }
  4435. func (m *Response_OfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  4436. size := m.Size()
  4437. return m.MarshalToSizedBuffer(dAtA[:size])
  4438. }
  4439. func (m *Response_OfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4440. i := len(dAtA)
  4441. if m.OfferSnapshot != nil {
  4442. {
  4443. size, err := m.OfferSnapshot.MarshalToSizedBuffer(dAtA[:i])
  4444. if err != nil {
  4445. return 0, err
  4446. }
  4447. i -= size
  4448. i = encodeVarintTypes(dAtA, i, uint64(size))
  4449. }
  4450. i--
  4451. dAtA[i] = 0x6a
  4452. }
  4453. return len(dAtA) - i, nil
  4454. }
  4455. func (m *Response_LoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4456. size := m.Size()
  4457. return m.MarshalToSizedBuffer(dAtA[:size])
  4458. }
  4459. func (m *Response_LoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4460. i := len(dAtA)
  4461. if m.LoadSnapshotChunk != nil {
  4462. {
  4463. size, err := m.LoadSnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  4464. if err != nil {
  4465. return 0, err
  4466. }
  4467. i -= size
  4468. i = encodeVarintTypes(dAtA, i, uint64(size))
  4469. }
  4470. i--
  4471. dAtA[i] = 0x72
  4472. }
  4473. return len(dAtA) - i, nil
  4474. }
  4475. func (m *Response_ApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4476. size := m.Size()
  4477. return m.MarshalToSizedBuffer(dAtA[:size])
  4478. }
  4479. func (m *Response_ApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4480. i := len(dAtA)
  4481. if m.ApplySnapshotChunk != nil {
  4482. {
  4483. size, err := m.ApplySnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  4484. if err != nil {
  4485. return 0, err
  4486. }
  4487. i -= size
  4488. i = encodeVarintTypes(dAtA, i, uint64(size))
  4489. }
  4490. i--
  4491. dAtA[i] = 0x7a
  4492. }
  4493. return len(dAtA) - i, nil
  4494. }
  4495. func (m *ResponseException) Marshal() (dAtA []byte, err error) {
  4496. size := m.Size()
  4497. dAtA = make([]byte, size)
  4498. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4499. if err != nil {
  4500. return nil, err
  4501. }
  4502. return dAtA[:n], nil
  4503. }
  4504. func (m *ResponseException) MarshalTo(dAtA []byte) (int, error) {
  4505. size := m.Size()
  4506. return m.MarshalToSizedBuffer(dAtA[:size])
  4507. }
  4508. func (m *ResponseException) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4509. i := len(dAtA)
  4510. _ = i
  4511. var l int
  4512. _ = l
  4513. if len(m.Error) > 0 {
  4514. i -= len(m.Error)
  4515. copy(dAtA[i:], m.Error)
  4516. i = encodeVarintTypes(dAtA, i, uint64(len(m.Error)))
  4517. i--
  4518. dAtA[i] = 0xa
  4519. }
  4520. return len(dAtA) - i, nil
  4521. }
  4522. func (m *ResponseEcho) Marshal() (dAtA []byte, err error) {
  4523. size := m.Size()
  4524. dAtA = make([]byte, size)
  4525. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4526. if err != nil {
  4527. return nil, err
  4528. }
  4529. return dAtA[:n], nil
  4530. }
  4531. func (m *ResponseEcho) MarshalTo(dAtA []byte) (int, error) {
  4532. size := m.Size()
  4533. return m.MarshalToSizedBuffer(dAtA[:size])
  4534. }
  4535. func (m *ResponseEcho) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4536. i := len(dAtA)
  4537. _ = i
  4538. var l int
  4539. _ = l
  4540. if len(m.Message) > 0 {
  4541. i -= len(m.Message)
  4542. copy(dAtA[i:], m.Message)
  4543. i = encodeVarintTypes(dAtA, i, uint64(len(m.Message)))
  4544. i--
  4545. dAtA[i] = 0xa
  4546. }
  4547. return len(dAtA) - i, nil
  4548. }
  4549. func (m *ResponseFlush) Marshal() (dAtA []byte, err error) {
  4550. size := m.Size()
  4551. dAtA = make([]byte, size)
  4552. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4553. if err != nil {
  4554. return nil, err
  4555. }
  4556. return dAtA[:n], nil
  4557. }
  4558. func (m *ResponseFlush) MarshalTo(dAtA []byte) (int, error) {
  4559. size := m.Size()
  4560. return m.MarshalToSizedBuffer(dAtA[:size])
  4561. }
  4562. func (m *ResponseFlush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4563. i := len(dAtA)
  4564. _ = i
  4565. var l int
  4566. _ = l
  4567. return len(dAtA) - i, nil
  4568. }
  4569. func (m *ResponseInfo) Marshal() (dAtA []byte, err error) {
  4570. size := m.Size()
  4571. dAtA = make([]byte, size)
  4572. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4573. if err != nil {
  4574. return nil, err
  4575. }
  4576. return dAtA[:n], nil
  4577. }
  4578. func (m *ResponseInfo) MarshalTo(dAtA []byte) (int, error) {
  4579. size := m.Size()
  4580. return m.MarshalToSizedBuffer(dAtA[:size])
  4581. }
  4582. func (m *ResponseInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4583. i := len(dAtA)
  4584. _ = i
  4585. var l int
  4586. _ = l
  4587. if len(m.LastBlockAppHash) > 0 {
  4588. i -= len(m.LastBlockAppHash)
  4589. copy(dAtA[i:], m.LastBlockAppHash)
  4590. i = encodeVarintTypes(dAtA, i, uint64(len(m.LastBlockAppHash)))
  4591. i--
  4592. dAtA[i] = 0x2a
  4593. }
  4594. if m.LastBlockHeight != 0 {
  4595. i = encodeVarintTypes(dAtA, i, uint64(m.LastBlockHeight))
  4596. i--
  4597. dAtA[i] = 0x20
  4598. }
  4599. if m.AppVersion != 0 {
  4600. i = encodeVarintTypes(dAtA, i, uint64(m.AppVersion))
  4601. i--
  4602. dAtA[i] = 0x18
  4603. }
  4604. if len(m.Version) > 0 {
  4605. i -= len(m.Version)
  4606. copy(dAtA[i:], m.Version)
  4607. i = encodeVarintTypes(dAtA, i, uint64(len(m.Version)))
  4608. i--
  4609. dAtA[i] = 0x12
  4610. }
  4611. if len(m.Data) > 0 {
  4612. i -= len(m.Data)
  4613. copy(dAtA[i:], m.Data)
  4614. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  4615. i--
  4616. dAtA[i] = 0xa
  4617. }
  4618. return len(dAtA) - i, nil
  4619. }
  4620. func (m *ResponseInitChain) Marshal() (dAtA []byte, err error) {
  4621. size := m.Size()
  4622. dAtA = make([]byte, size)
  4623. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4624. if err != nil {
  4625. return nil, err
  4626. }
  4627. return dAtA[:n], nil
  4628. }
  4629. func (m *ResponseInitChain) MarshalTo(dAtA []byte) (int, error) {
  4630. size := m.Size()
  4631. return m.MarshalToSizedBuffer(dAtA[:size])
  4632. }
  4633. func (m *ResponseInitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4634. i := len(dAtA)
  4635. _ = i
  4636. var l int
  4637. _ = l
  4638. if len(m.AppHash) > 0 {
  4639. i -= len(m.AppHash)
  4640. copy(dAtA[i:], m.AppHash)
  4641. i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash)))
  4642. i--
  4643. dAtA[i] = 0x1a
  4644. }
  4645. if len(m.Validators) > 0 {
  4646. for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- {
  4647. {
  4648. size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4649. if err != nil {
  4650. return 0, err
  4651. }
  4652. i -= size
  4653. i = encodeVarintTypes(dAtA, i, uint64(size))
  4654. }
  4655. i--
  4656. dAtA[i] = 0x12
  4657. }
  4658. }
  4659. if m.ConsensusParams != nil {
  4660. {
  4661. size, err := m.ConsensusParams.MarshalToSizedBuffer(dAtA[:i])
  4662. if err != nil {
  4663. return 0, err
  4664. }
  4665. i -= size
  4666. i = encodeVarintTypes(dAtA, i, uint64(size))
  4667. }
  4668. i--
  4669. dAtA[i] = 0xa
  4670. }
  4671. return len(dAtA) - i, nil
  4672. }
  4673. func (m *ResponseQuery) Marshal() (dAtA []byte, err error) {
  4674. size := m.Size()
  4675. dAtA = make([]byte, size)
  4676. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4677. if err != nil {
  4678. return nil, err
  4679. }
  4680. return dAtA[:n], nil
  4681. }
  4682. func (m *ResponseQuery) MarshalTo(dAtA []byte) (int, error) {
  4683. size := m.Size()
  4684. return m.MarshalToSizedBuffer(dAtA[:size])
  4685. }
  4686. func (m *ResponseQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4687. i := len(dAtA)
  4688. _ = i
  4689. var l int
  4690. _ = l
  4691. if len(m.Codespace) > 0 {
  4692. i -= len(m.Codespace)
  4693. copy(dAtA[i:], m.Codespace)
  4694. i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace)))
  4695. i--
  4696. dAtA[i] = 0x52
  4697. }
  4698. if m.Height != 0 {
  4699. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  4700. i--
  4701. dAtA[i] = 0x48
  4702. }
  4703. if m.ProofOps != nil {
  4704. {
  4705. size, err := m.ProofOps.MarshalToSizedBuffer(dAtA[:i])
  4706. if err != nil {
  4707. return 0, err
  4708. }
  4709. i -= size
  4710. i = encodeVarintTypes(dAtA, i, uint64(size))
  4711. }
  4712. i--
  4713. dAtA[i] = 0x42
  4714. }
  4715. if len(m.Value) > 0 {
  4716. i -= len(m.Value)
  4717. copy(dAtA[i:], m.Value)
  4718. i = encodeVarintTypes(dAtA, i, uint64(len(m.Value)))
  4719. i--
  4720. dAtA[i] = 0x3a
  4721. }
  4722. if len(m.Key) > 0 {
  4723. i -= len(m.Key)
  4724. copy(dAtA[i:], m.Key)
  4725. i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
  4726. i--
  4727. dAtA[i] = 0x32
  4728. }
  4729. if m.Index != 0 {
  4730. i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  4731. i--
  4732. dAtA[i] = 0x28
  4733. }
  4734. if len(m.Info) > 0 {
  4735. i -= len(m.Info)
  4736. copy(dAtA[i:], m.Info)
  4737. i = encodeVarintTypes(dAtA, i, uint64(len(m.Info)))
  4738. i--
  4739. dAtA[i] = 0x22
  4740. }
  4741. if len(m.Log) > 0 {
  4742. i -= len(m.Log)
  4743. copy(dAtA[i:], m.Log)
  4744. i = encodeVarintTypes(dAtA, i, uint64(len(m.Log)))
  4745. i--
  4746. dAtA[i] = 0x1a
  4747. }
  4748. if m.Code != 0 {
  4749. i = encodeVarintTypes(dAtA, i, uint64(m.Code))
  4750. i--
  4751. dAtA[i] = 0x8
  4752. }
  4753. return len(dAtA) - i, nil
  4754. }
  4755. func (m *ResponseBeginBlock) Marshal() (dAtA []byte, err error) {
  4756. size := m.Size()
  4757. dAtA = make([]byte, size)
  4758. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4759. if err != nil {
  4760. return nil, err
  4761. }
  4762. return dAtA[:n], nil
  4763. }
  4764. func (m *ResponseBeginBlock) MarshalTo(dAtA []byte) (int, error) {
  4765. size := m.Size()
  4766. return m.MarshalToSizedBuffer(dAtA[:size])
  4767. }
  4768. func (m *ResponseBeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4769. i := len(dAtA)
  4770. _ = i
  4771. var l int
  4772. _ = l
  4773. if len(m.Events) > 0 {
  4774. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  4775. {
  4776. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4777. if err != nil {
  4778. return 0, err
  4779. }
  4780. i -= size
  4781. i = encodeVarintTypes(dAtA, i, uint64(size))
  4782. }
  4783. i--
  4784. dAtA[i] = 0xa
  4785. }
  4786. }
  4787. return len(dAtA) - i, nil
  4788. }
  4789. func (m *ResponseCheckTx) Marshal() (dAtA []byte, err error) {
  4790. size := m.Size()
  4791. dAtA = make([]byte, size)
  4792. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4793. if err != nil {
  4794. return nil, err
  4795. }
  4796. return dAtA[:n], nil
  4797. }
  4798. func (m *ResponseCheckTx) MarshalTo(dAtA []byte) (int, error) {
  4799. size := m.Size()
  4800. return m.MarshalToSizedBuffer(dAtA[:size])
  4801. }
  4802. func (m *ResponseCheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4803. i := len(dAtA)
  4804. _ = i
  4805. var l int
  4806. _ = l
  4807. if len(m.MempoolError) > 0 {
  4808. i -= len(m.MempoolError)
  4809. copy(dAtA[i:], m.MempoolError)
  4810. i = encodeVarintTypes(dAtA, i, uint64(len(m.MempoolError)))
  4811. i--
  4812. dAtA[i] = 0x5a
  4813. }
  4814. if m.Priority != 0 {
  4815. i = encodeVarintTypes(dAtA, i, uint64(m.Priority))
  4816. i--
  4817. dAtA[i] = 0x50
  4818. }
  4819. if len(m.Sender) > 0 {
  4820. i -= len(m.Sender)
  4821. copy(dAtA[i:], m.Sender)
  4822. i = encodeVarintTypes(dAtA, i, uint64(len(m.Sender)))
  4823. i--
  4824. dAtA[i] = 0x4a
  4825. }
  4826. if len(m.Codespace) > 0 {
  4827. i -= len(m.Codespace)
  4828. copy(dAtA[i:], m.Codespace)
  4829. i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace)))
  4830. i--
  4831. dAtA[i] = 0x42
  4832. }
  4833. if len(m.Events) > 0 {
  4834. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  4835. {
  4836. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4837. if err != nil {
  4838. return 0, err
  4839. }
  4840. i -= size
  4841. i = encodeVarintTypes(dAtA, i, uint64(size))
  4842. }
  4843. i--
  4844. dAtA[i] = 0x3a
  4845. }
  4846. }
  4847. if m.GasUsed != 0 {
  4848. i = encodeVarintTypes(dAtA, i, uint64(m.GasUsed))
  4849. i--
  4850. dAtA[i] = 0x30
  4851. }
  4852. if m.GasWanted != 0 {
  4853. i = encodeVarintTypes(dAtA, i, uint64(m.GasWanted))
  4854. i--
  4855. dAtA[i] = 0x28
  4856. }
  4857. if len(m.Info) > 0 {
  4858. i -= len(m.Info)
  4859. copy(dAtA[i:], m.Info)
  4860. i = encodeVarintTypes(dAtA, i, uint64(len(m.Info)))
  4861. i--
  4862. dAtA[i] = 0x22
  4863. }
  4864. if len(m.Log) > 0 {
  4865. i -= len(m.Log)
  4866. copy(dAtA[i:], m.Log)
  4867. i = encodeVarintTypes(dAtA, i, uint64(len(m.Log)))
  4868. i--
  4869. dAtA[i] = 0x1a
  4870. }
  4871. if len(m.Data) > 0 {
  4872. i -= len(m.Data)
  4873. copy(dAtA[i:], m.Data)
  4874. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  4875. i--
  4876. dAtA[i] = 0x12
  4877. }
  4878. if m.Code != 0 {
  4879. i = encodeVarintTypes(dAtA, i, uint64(m.Code))
  4880. i--
  4881. dAtA[i] = 0x8
  4882. }
  4883. return len(dAtA) - i, nil
  4884. }
  4885. func (m *ResponseDeliverTx) Marshal() (dAtA []byte, err error) {
  4886. size := m.Size()
  4887. dAtA = make([]byte, size)
  4888. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4889. if err != nil {
  4890. return nil, err
  4891. }
  4892. return dAtA[:n], nil
  4893. }
  4894. func (m *ResponseDeliverTx) MarshalTo(dAtA []byte) (int, error) {
  4895. size := m.Size()
  4896. return m.MarshalToSizedBuffer(dAtA[:size])
  4897. }
  4898. func (m *ResponseDeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4899. i := len(dAtA)
  4900. _ = i
  4901. var l int
  4902. _ = l
  4903. if len(m.Codespace) > 0 {
  4904. i -= len(m.Codespace)
  4905. copy(dAtA[i:], m.Codespace)
  4906. i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace)))
  4907. i--
  4908. dAtA[i] = 0x42
  4909. }
  4910. if len(m.Events) > 0 {
  4911. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  4912. {
  4913. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4914. if err != nil {
  4915. return 0, err
  4916. }
  4917. i -= size
  4918. i = encodeVarintTypes(dAtA, i, uint64(size))
  4919. }
  4920. i--
  4921. dAtA[i] = 0x3a
  4922. }
  4923. }
  4924. if m.GasUsed != 0 {
  4925. i = encodeVarintTypes(dAtA, i, uint64(m.GasUsed))
  4926. i--
  4927. dAtA[i] = 0x30
  4928. }
  4929. if m.GasWanted != 0 {
  4930. i = encodeVarintTypes(dAtA, i, uint64(m.GasWanted))
  4931. i--
  4932. dAtA[i] = 0x28
  4933. }
  4934. if len(m.Info) > 0 {
  4935. i -= len(m.Info)
  4936. copy(dAtA[i:], m.Info)
  4937. i = encodeVarintTypes(dAtA, i, uint64(len(m.Info)))
  4938. i--
  4939. dAtA[i] = 0x22
  4940. }
  4941. if len(m.Log) > 0 {
  4942. i -= len(m.Log)
  4943. copy(dAtA[i:], m.Log)
  4944. i = encodeVarintTypes(dAtA, i, uint64(len(m.Log)))
  4945. i--
  4946. dAtA[i] = 0x1a
  4947. }
  4948. if len(m.Data) > 0 {
  4949. i -= len(m.Data)
  4950. copy(dAtA[i:], m.Data)
  4951. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  4952. i--
  4953. dAtA[i] = 0x12
  4954. }
  4955. if m.Code != 0 {
  4956. i = encodeVarintTypes(dAtA, i, uint64(m.Code))
  4957. i--
  4958. dAtA[i] = 0x8
  4959. }
  4960. return len(dAtA) - i, nil
  4961. }
  4962. func (m *ResponseEndBlock) Marshal() (dAtA []byte, err error) {
  4963. size := m.Size()
  4964. dAtA = make([]byte, size)
  4965. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4966. if err != nil {
  4967. return nil, err
  4968. }
  4969. return dAtA[:n], nil
  4970. }
  4971. func (m *ResponseEndBlock) MarshalTo(dAtA []byte) (int, error) {
  4972. size := m.Size()
  4973. return m.MarshalToSizedBuffer(dAtA[:size])
  4974. }
  4975. func (m *ResponseEndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4976. i := len(dAtA)
  4977. _ = i
  4978. var l int
  4979. _ = l
  4980. if len(m.Events) > 0 {
  4981. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  4982. {
  4983. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4984. if err != nil {
  4985. return 0, err
  4986. }
  4987. i -= size
  4988. i = encodeVarintTypes(dAtA, i, uint64(size))
  4989. }
  4990. i--
  4991. dAtA[i] = 0x1a
  4992. }
  4993. }
  4994. if m.ConsensusParamUpdates != nil {
  4995. {
  4996. size, err := m.ConsensusParamUpdates.MarshalToSizedBuffer(dAtA[:i])
  4997. if err != nil {
  4998. return 0, err
  4999. }
  5000. i -= size
  5001. i = encodeVarintTypes(dAtA, i, uint64(size))
  5002. }
  5003. i--
  5004. dAtA[i] = 0x12
  5005. }
  5006. if len(m.ValidatorUpdates) > 0 {
  5007. for iNdEx := len(m.ValidatorUpdates) - 1; iNdEx >= 0; iNdEx-- {
  5008. {
  5009. size, err := m.ValidatorUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5010. if err != nil {
  5011. return 0, err
  5012. }
  5013. i -= size
  5014. i = encodeVarintTypes(dAtA, i, uint64(size))
  5015. }
  5016. i--
  5017. dAtA[i] = 0xa
  5018. }
  5019. }
  5020. return len(dAtA) - i, nil
  5021. }
  5022. func (m *ResponseCommit) Marshal() (dAtA []byte, err error) {
  5023. size := m.Size()
  5024. dAtA = make([]byte, size)
  5025. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5026. if err != nil {
  5027. return nil, err
  5028. }
  5029. return dAtA[:n], nil
  5030. }
  5031. func (m *ResponseCommit) MarshalTo(dAtA []byte) (int, error) {
  5032. size := m.Size()
  5033. return m.MarshalToSizedBuffer(dAtA[:size])
  5034. }
  5035. func (m *ResponseCommit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5036. i := len(dAtA)
  5037. _ = i
  5038. var l int
  5039. _ = l
  5040. if m.RetainHeight != 0 {
  5041. i = encodeVarintTypes(dAtA, i, uint64(m.RetainHeight))
  5042. i--
  5043. dAtA[i] = 0x18
  5044. }
  5045. if len(m.Data) > 0 {
  5046. i -= len(m.Data)
  5047. copy(dAtA[i:], m.Data)
  5048. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  5049. i--
  5050. dAtA[i] = 0x12
  5051. }
  5052. return len(dAtA) - i, nil
  5053. }
  5054. func (m *ResponseListSnapshots) Marshal() (dAtA []byte, err error) {
  5055. size := m.Size()
  5056. dAtA = make([]byte, size)
  5057. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5058. if err != nil {
  5059. return nil, err
  5060. }
  5061. return dAtA[:n], nil
  5062. }
  5063. func (m *ResponseListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  5064. size := m.Size()
  5065. return m.MarshalToSizedBuffer(dAtA[:size])
  5066. }
  5067. func (m *ResponseListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5068. i := len(dAtA)
  5069. _ = i
  5070. var l int
  5071. _ = l
  5072. if len(m.Snapshots) > 0 {
  5073. for iNdEx := len(m.Snapshots) - 1; iNdEx >= 0; iNdEx-- {
  5074. {
  5075. size, err := m.Snapshots[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5076. if err != nil {
  5077. return 0, err
  5078. }
  5079. i -= size
  5080. i = encodeVarintTypes(dAtA, i, uint64(size))
  5081. }
  5082. i--
  5083. dAtA[i] = 0xa
  5084. }
  5085. }
  5086. return len(dAtA) - i, nil
  5087. }
  5088. func (m *ResponseOfferSnapshot) Marshal() (dAtA []byte, err error) {
  5089. size := m.Size()
  5090. dAtA = make([]byte, size)
  5091. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5092. if err != nil {
  5093. return nil, err
  5094. }
  5095. return dAtA[:n], nil
  5096. }
  5097. func (m *ResponseOfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  5098. size := m.Size()
  5099. return m.MarshalToSizedBuffer(dAtA[:size])
  5100. }
  5101. func (m *ResponseOfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5102. i := len(dAtA)
  5103. _ = i
  5104. var l int
  5105. _ = l
  5106. if m.Result != 0 {
  5107. i = encodeVarintTypes(dAtA, i, uint64(m.Result))
  5108. i--
  5109. dAtA[i] = 0x8
  5110. }
  5111. return len(dAtA) - i, nil
  5112. }
  5113. func (m *ResponseLoadSnapshotChunk) Marshal() (dAtA []byte, err error) {
  5114. size := m.Size()
  5115. dAtA = make([]byte, size)
  5116. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5117. if err != nil {
  5118. return nil, err
  5119. }
  5120. return dAtA[:n], nil
  5121. }
  5122. func (m *ResponseLoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  5123. size := m.Size()
  5124. return m.MarshalToSizedBuffer(dAtA[:size])
  5125. }
  5126. func (m *ResponseLoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5127. i := len(dAtA)
  5128. _ = i
  5129. var l int
  5130. _ = l
  5131. if len(m.Chunk) > 0 {
  5132. i -= len(m.Chunk)
  5133. copy(dAtA[i:], m.Chunk)
  5134. i = encodeVarintTypes(dAtA, i, uint64(len(m.Chunk)))
  5135. i--
  5136. dAtA[i] = 0xa
  5137. }
  5138. return len(dAtA) - i, nil
  5139. }
  5140. func (m *ResponseApplySnapshotChunk) Marshal() (dAtA []byte, err error) {
  5141. size := m.Size()
  5142. dAtA = make([]byte, size)
  5143. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5144. if err != nil {
  5145. return nil, err
  5146. }
  5147. return dAtA[:n], nil
  5148. }
  5149. func (m *ResponseApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  5150. size := m.Size()
  5151. return m.MarshalToSizedBuffer(dAtA[:size])
  5152. }
  5153. func (m *ResponseApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5154. i := len(dAtA)
  5155. _ = i
  5156. var l int
  5157. _ = l
  5158. if len(m.RejectSenders) > 0 {
  5159. for iNdEx := len(m.RejectSenders) - 1; iNdEx >= 0; iNdEx-- {
  5160. i -= len(m.RejectSenders[iNdEx])
  5161. copy(dAtA[i:], m.RejectSenders[iNdEx])
  5162. i = encodeVarintTypes(dAtA, i, uint64(len(m.RejectSenders[iNdEx])))
  5163. i--
  5164. dAtA[i] = 0x1a
  5165. }
  5166. }
  5167. if len(m.RefetchChunks) > 0 {
  5168. dAtA39 := make([]byte, len(m.RefetchChunks)*10)
  5169. var j38 int
  5170. for _, num := range m.RefetchChunks {
  5171. for num >= 1<<7 {
  5172. dAtA39[j38] = uint8(uint64(num)&0x7f | 0x80)
  5173. num >>= 7
  5174. j38++
  5175. }
  5176. dAtA39[j38] = uint8(num)
  5177. j38++
  5178. }
  5179. i -= j38
  5180. copy(dAtA[i:], dAtA39[:j38])
  5181. i = encodeVarintTypes(dAtA, i, uint64(j38))
  5182. i--
  5183. dAtA[i] = 0x12
  5184. }
  5185. if m.Result != 0 {
  5186. i = encodeVarintTypes(dAtA, i, uint64(m.Result))
  5187. i--
  5188. dAtA[i] = 0x8
  5189. }
  5190. return len(dAtA) - i, nil
  5191. }
  5192. func (m *LastCommitInfo) Marshal() (dAtA []byte, err error) {
  5193. size := m.Size()
  5194. dAtA = make([]byte, size)
  5195. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5196. if err != nil {
  5197. return nil, err
  5198. }
  5199. return dAtA[:n], nil
  5200. }
  5201. func (m *LastCommitInfo) MarshalTo(dAtA []byte) (int, error) {
  5202. size := m.Size()
  5203. return m.MarshalToSizedBuffer(dAtA[:size])
  5204. }
  5205. func (m *LastCommitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5206. i := len(dAtA)
  5207. _ = i
  5208. var l int
  5209. _ = l
  5210. if len(m.Votes) > 0 {
  5211. for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- {
  5212. {
  5213. size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5214. if err != nil {
  5215. return 0, err
  5216. }
  5217. i -= size
  5218. i = encodeVarintTypes(dAtA, i, uint64(size))
  5219. }
  5220. i--
  5221. dAtA[i] = 0x12
  5222. }
  5223. }
  5224. if m.Round != 0 {
  5225. i = encodeVarintTypes(dAtA, i, uint64(m.Round))
  5226. i--
  5227. dAtA[i] = 0x8
  5228. }
  5229. return len(dAtA) - i, nil
  5230. }
  5231. func (m *Event) Marshal() (dAtA []byte, err error) {
  5232. size := m.Size()
  5233. dAtA = make([]byte, size)
  5234. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5235. if err != nil {
  5236. return nil, err
  5237. }
  5238. return dAtA[:n], nil
  5239. }
  5240. func (m *Event) MarshalTo(dAtA []byte) (int, error) {
  5241. size := m.Size()
  5242. return m.MarshalToSizedBuffer(dAtA[:size])
  5243. }
  5244. func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5245. i := len(dAtA)
  5246. _ = i
  5247. var l int
  5248. _ = l
  5249. if len(m.Attributes) > 0 {
  5250. for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- {
  5251. {
  5252. size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5253. if err != nil {
  5254. return 0, err
  5255. }
  5256. i -= size
  5257. i = encodeVarintTypes(dAtA, i, uint64(size))
  5258. }
  5259. i--
  5260. dAtA[i] = 0x12
  5261. }
  5262. }
  5263. if len(m.Type) > 0 {
  5264. i -= len(m.Type)
  5265. copy(dAtA[i:], m.Type)
  5266. i = encodeVarintTypes(dAtA, i, uint64(len(m.Type)))
  5267. i--
  5268. dAtA[i] = 0xa
  5269. }
  5270. return len(dAtA) - i, nil
  5271. }
  5272. func (m *EventAttribute) Marshal() (dAtA []byte, err error) {
  5273. size := m.Size()
  5274. dAtA = make([]byte, size)
  5275. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5276. if err != nil {
  5277. return nil, err
  5278. }
  5279. return dAtA[:n], nil
  5280. }
  5281. func (m *EventAttribute) MarshalTo(dAtA []byte) (int, error) {
  5282. size := m.Size()
  5283. return m.MarshalToSizedBuffer(dAtA[:size])
  5284. }
  5285. func (m *EventAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5286. i := len(dAtA)
  5287. _ = i
  5288. var l int
  5289. _ = l
  5290. if m.Index {
  5291. i--
  5292. if m.Index {
  5293. dAtA[i] = 1
  5294. } else {
  5295. dAtA[i] = 0
  5296. }
  5297. i--
  5298. dAtA[i] = 0x18
  5299. }
  5300. if len(m.Value) > 0 {
  5301. i -= len(m.Value)
  5302. copy(dAtA[i:], m.Value)
  5303. i = encodeVarintTypes(dAtA, i, uint64(len(m.Value)))
  5304. i--
  5305. dAtA[i] = 0x12
  5306. }
  5307. if len(m.Key) > 0 {
  5308. i -= len(m.Key)
  5309. copy(dAtA[i:], m.Key)
  5310. i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
  5311. i--
  5312. dAtA[i] = 0xa
  5313. }
  5314. return len(dAtA) - i, nil
  5315. }
  5316. func (m *TxResult) Marshal() (dAtA []byte, err error) {
  5317. size := m.Size()
  5318. dAtA = make([]byte, size)
  5319. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5320. if err != nil {
  5321. return nil, err
  5322. }
  5323. return dAtA[:n], nil
  5324. }
  5325. func (m *TxResult) MarshalTo(dAtA []byte) (int, error) {
  5326. size := m.Size()
  5327. return m.MarshalToSizedBuffer(dAtA[:size])
  5328. }
  5329. func (m *TxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5330. i := len(dAtA)
  5331. _ = i
  5332. var l int
  5333. _ = l
  5334. {
  5335. size, err := m.Result.MarshalToSizedBuffer(dAtA[:i])
  5336. if err != nil {
  5337. return 0, err
  5338. }
  5339. i -= size
  5340. i = encodeVarintTypes(dAtA, i, uint64(size))
  5341. }
  5342. i--
  5343. dAtA[i] = 0x22
  5344. if len(m.Tx) > 0 {
  5345. i -= len(m.Tx)
  5346. copy(dAtA[i:], m.Tx)
  5347. i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx)))
  5348. i--
  5349. dAtA[i] = 0x1a
  5350. }
  5351. if m.Index != 0 {
  5352. i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  5353. i--
  5354. dAtA[i] = 0x10
  5355. }
  5356. if m.Height != 0 {
  5357. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  5358. i--
  5359. dAtA[i] = 0x8
  5360. }
  5361. return len(dAtA) - i, nil
  5362. }
  5363. func (m *Validator) Marshal() (dAtA []byte, err error) {
  5364. size := m.Size()
  5365. dAtA = make([]byte, size)
  5366. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5367. if err != nil {
  5368. return nil, err
  5369. }
  5370. return dAtA[:n], nil
  5371. }
  5372. func (m *Validator) MarshalTo(dAtA []byte) (int, error) {
  5373. size := m.Size()
  5374. return m.MarshalToSizedBuffer(dAtA[:size])
  5375. }
  5376. func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5377. i := len(dAtA)
  5378. _ = i
  5379. var l int
  5380. _ = l
  5381. if m.Power != 0 {
  5382. i = encodeVarintTypes(dAtA, i, uint64(m.Power))
  5383. i--
  5384. dAtA[i] = 0x18
  5385. }
  5386. if len(m.Address) > 0 {
  5387. i -= len(m.Address)
  5388. copy(dAtA[i:], m.Address)
  5389. i = encodeVarintTypes(dAtA, i, uint64(len(m.Address)))
  5390. i--
  5391. dAtA[i] = 0xa
  5392. }
  5393. return len(dAtA) - i, nil
  5394. }
  5395. func (m *ValidatorUpdate) Marshal() (dAtA []byte, err error) {
  5396. size := m.Size()
  5397. dAtA = make([]byte, size)
  5398. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5399. if err != nil {
  5400. return nil, err
  5401. }
  5402. return dAtA[:n], nil
  5403. }
  5404. func (m *ValidatorUpdate) MarshalTo(dAtA []byte) (int, error) {
  5405. size := m.Size()
  5406. return m.MarshalToSizedBuffer(dAtA[:size])
  5407. }
  5408. func (m *ValidatorUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5409. i := len(dAtA)
  5410. _ = i
  5411. var l int
  5412. _ = l
  5413. if m.Power != 0 {
  5414. i = encodeVarintTypes(dAtA, i, uint64(m.Power))
  5415. i--
  5416. dAtA[i] = 0x10
  5417. }
  5418. {
  5419. size, err := m.PubKey.MarshalToSizedBuffer(dAtA[:i])
  5420. if err != nil {
  5421. return 0, err
  5422. }
  5423. i -= size
  5424. i = encodeVarintTypes(dAtA, i, uint64(size))
  5425. }
  5426. i--
  5427. dAtA[i] = 0xa
  5428. return len(dAtA) - i, nil
  5429. }
  5430. func (m *VoteInfo) Marshal() (dAtA []byte, err error) {
  5431. size := m.Size()
  5432. dAtA = make([]byte, size)
  5433. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5434. if err != nil {
  5435. return nil, err
  5436. }
  5437. return dAtA[:n], nil
  5438. }
  5439. func (m *VoteInfo) MarshalTo(dAtA []byte) (int, error) {
  5440. size := m.Size()
  5441. return m.MarshalToSizedBuffer(dAtA[:size])
  5442. }
  5443. func (m *VoteInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5444. i := len(dAtA)
  5445. _ = i
  5446. var l int
  5447. _ = l
  5448. if m.SignedLastBlock {
  5449. i--
  5450. if m.SignedLastBlock {
  5451. dAtA[i] = 1
  5452. } else {
  5453. dAtA[i] = 0
  5454. }
  5455. i--
  5456. dAtA[i] = 0x10
  5457. }
  5458. {
  5459. size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i])
  5460. if err != nil {
  5461. return 0, err
  5462. }
  5463. i -= size
  5464. i = encodeVarintTypes(dAtA, i, uint64(size))
  5465. }
  5466. i--
  5467. dAtA[i] = 0xa
  5468. return len(dAtA) - i, nil
  5469. }
  5470. func (m *Evidence) Marshal() (dAtA []byte, err error) {
  5471. size := m.Size()
  5472. dAtA = make([]byte, size)
  5473. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5474. if err != nil {
  5475. return nil, err
  5476. }
  5477. return dAtA[:n], nil
  5478. }
  5479. func (m *Evidence) MarshalTo(dAtA []byte) (int, error) {
  5480. size := m.Size()
  5481. return m.MarshalToSizedBuffer(dAtA[:size])
  5482. }
  5483. func (m *Evidence) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5484. i := len(dAtA)
  5485. _ = i
  5486. var l int
  5487. _ = l
  5488. if m.TotalVotingPower != 0 {
  5489. i = encodeVarintTypes(dAtA, i, uint64(m.TotalVotingPower))
  5490. i--
  5491. dAtA[i] = 0x28
  5492. }
  5493. n43, err43 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):])
  5494. if err43 != nil {
  5495. return 0, err43
  5496. }
  5497. i -= n43
  5498. i = encodeVarintTypes(dAtA, i, uint64(n43))
  5499. i--
  5500. dAtA[i] = 0x22
  5501. if m.Height != 0 {
  5502. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  5503. i--
  5504. dAtA[i] = 0x18
  5505. }
  5506. {
  5507. size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i])
  5508. if err != nil {
  5509. return 0, err
  5510. }
  5511. i -= size
  5512. i = encodeVarintTypes(dAtA, i, uint64(size))
  5513. }
  5514. i--
  5515. dAtA[i] = 0x12
  5516. if m.Type != 0 {
  5517. i = encodeVarintTypes(dAtA, i, uint64(m.Type))
  5518. i--
  5519. dAtA[i] = 0x8
  5520. }
  5521. return len(dAtA) - i, nil
  5522. }
  5523. func (m *Snapshot) Marshal() (dAtA []byte, err error) {
  5524. size := m.Size()
  5525. dAtA = make([]byte, size)
  5526. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5527. if err != nil {
  5528. return nil, err
  5529. }
  5530. return dAtA[:n], nil
  5531. }
  5532. func (m *Snapshot) MarshalTo(dAtA []byte) (int, error) {
  5533. size := m.Size()
  5534. return m.MarshalToSizedBuffer(dAtA[:size])
  5535. }
  5536. func (m *Snapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5537. i := len(dAtA)
  5538. _ = i
  5539. var l int
  5540. _ = l
  5541. if len(m.Metadata) > 0 {
  5542. i -= len(m.Metadata)
  5543. copy(dAtA[i:], m.Metadata)
  5544. i = encodeVarintTypes(dAtA, i, uint64(len(m.Metadata)))
  5545. i--
  5546. dAtA[i] = 0x2a
  5547. }
  5548. if len(m.Hash) > 0 {
  5549. i -= len(m.Hash)
  5550. copy(dAtA[i:], m.Hash)
  5551. i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash)))
  5552. i--
  5553. dAtA[i] = 0x22
  5554. }
  5555. if m.Chunks != 0 {
  5556. i = encodeVarintTypes(dAtA, i, uint64(m.Chunks))
  5557. i--
  5558. dAtA[i] = 0x18
  5559. }
  5560. if m.Format != 0 {
  5561. i = encodeVarintTypes(dAtA, i, uint64(m.Format))
  5562. i--
  5563. dAtA[i] = 0x10
  5564. }
  5565. if m.Height != 0 {
  5566. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  5567. i--
  5568. dAtA[i] = 0x8
  5569. }
  5570. return len(dAtA) - i, nil
  5571. }
  5572. func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
  5573. offset -= sovTypes(v)
  5574. base := offset
  5575. for v >= 1<<7 {
  5576. dAtA[offset] = uint8(v&0x7f | 0x80)
  5577. v >>= 7
  5578. offset++
  5579. }
  5580. dAtA[offset] = uint8(v)
  5581. return base
  5582. }
  5583. func (m *Request) Size() (n int) {
  5584. if m == nil {
  5585. return 0
  5586. }
  5587. var l int
  5588. _ = l
  5589. if m.Value != nil {
  5590. n += m.Value.Size()
  5591. }
  5592. return n
  5593. }
  5594. func (m *Request_Echo) Size() (n int) {
  5595. if m == nil {
  5596. return 0
  5597. }
  5598. var l int
  5599. _ = l
  5600. if m.Echo != nil {
  5601. l = m.Echo.Size()
  5602. n += 1 + l + sovTypes(uint64(l))
  5603. }
  5604. return n
  5605. }
  5606. func (m *Request_Flush) Size() (n int) {
  5607. if m == nil {
  5608. return 0
  5609. }
  5610. var l int
  5611. _ = l
  5612. if m.Flush != nil {
  5613. l = m.Flush.Size()
  5614. n += 1 + l + sovTypes(uint64(l))
  5615. }
  5616. return n
  5617. }
  5618. func (m *Request_Info) Size() (n int) {
  5619. if m == nil {
  5620. return 0
  5621. }
  5622. var l int
  5623. _ = l
  5624. if m.Info != nil {
  5625. l = m.Info.Size()
  5626. n += 1 + l + sovTypes(uint64(l))
  5627. }
  5628. return n
  5629. }
  5630. func (m *Request_InitChain) Size() (n int) {
  5631. if m == nil {
  5632. return 0
  5633. }
  5634. var l int
  5635. _ = l
  5636. if m.InitChain != nil {
  5637. l = m.InitChain.Size()
  5638. n += 1 + l + sovTypes(uint64(l))
  5639. }
  5640. return n
  5641. }
  5642. func (m *Request_Query) Size() (n int) {
  5643. if m == nil {
  5644. return 0
  5645. }
  5646. var l int
  5647. _ = l
  5648. if m.Query != nil {
  5649. l = m.Query.Size()
  5650. n += 1 + l + sovTypes(uint64(l))
  5651. }
  5652. return n
  5653. }
  5654. func (m *Request_BeginBlock) Size() (n int) {
  5655. if m == nil {
  5656. return 0
  5657. }
  5658. var l int
  5659. _ = l
  5660. if m.BeginBlock != nil {
  5661. l = m.BeginBlock.Size()
  5662. n += 1 + l + sovTypes(uint64(l))
  5663. }
  5664. return n
  5665. }
  5666. func (m *Request_CheckTx) Size() (n int) {
  5667. if m == nil {
  5668. return 0
  5669. }
  5670. var l int
  5671. _ = l
  5672. if m.CheckTx != nil {
  5673. l = m.CheckTx.Size()
  5674. n += 1 + l + sovTypes(uint64(l))
  5675. }
  5676. return n
  5677. }
  5678. func (m *Request_DeliverTx) Size() (n int) {
  5679. if m == nil {
  5680. return 0
  5681. }
  5682. var l int
  5683. _ = l
  5684. if m.DeliverTx != nil {
  5685. l = m.DeliverTx.Size()
  5686. n += 1 + l + sovTypes(uint64(l))
  5687. }
  5688. return n
  5689. }
  5690. func (m *Request_EndBlock) Size() (n int) {
  5691. if m == nil {
  5692. return 0
  5693. }
  5694. var l int
  5695. _ = l
  5696. if m.EndBlock != nil {
  5697. l = m.EndBlock.Size()
  5698. n += 1 + l + sovTypes(uint64(l))
  5699. }
  5700. return n
  5701. }
  5702. func (m *Request_Commit) Size() (n int) {
  5703. if m == nil {
  5704. return 0
  5705. }
  5706. var l int
  5707. _ = l
  5708. if m.Commit != nil {
  5709. l = m.Commit.Size()
  5710. n += 1 + l + sovTypes(uint64(l))
  5711. }
  5712. return n
  5713. }
  5714. func (m *Request_ListSnapshots) Size() (n int) {
  5715. if m == nil {
  5716. return 0
  5717. }
  5718. var l int
  5719. _ = l
  5720. if m.ListSnapshots != nil {
  5721. l = m.ListSnapshots.Size()
  5722. n += 1 + l + sovTypes(uint64(l))
  5723. }
  5724. return n
  5725. }
  5726. func (m *Request_OfferSnapshot) Size() (n int) {
  5727. if m == nil {
  5728. return 0
  5729. }
  5730. var l int
  5731. _ = l
  5732. if m.OfferSnapshot != nil {
  5733. l = m.OfferSnapshot.Size()
  5734. n += 1 + l + sovTypes(uint64(l))
  5735. }
  5736. return n
  5737. }
  5738. func (m *Request_LoadSnapshotChunk) Size() (n int) {
  5739. if m == nil {
  5740. return 0
  5741. }
  5742. var l int
  5743. _ = l
  5744. if m.LoadSnapshotChunk != nil {
  5745. l = m.LoadSnapshotChunk.Size()
  5746. n += 1 + l + sovTypes(uint64(l))
  5747. }
  5748. return n
  5749. }
  5750. func (m *Request_ApplySnapshotChunk) Size() (n int) {
  5751. if m == nil {
  5752. return 0
  5753. }
  5754. var l int
  5755. _ = l
  5756. if m.ApplySnapshotChunk != nil {
  5757. l = m.ApplySnapshotChunk.Size()
  5758. n += 1 + l + sovTypes(uint64(l))
  5759. }
  5760. return n
  5761. }
  5762. func (m *RequestEcho) Size() (n int) {
  5763. if m == nil {
  5764. return 0
  5765. }
  5766. var l int
  5767. _ = l
  5768. l = len(m.Message)
  5769. if l > 0 {
  5770. n += 1 + l + sovTypes(uint64(l))
  5771. }
  5772. return n
  5773. }
  5774. func (m *RequestFlush) Size() (n int) {
  5775. if m == nil {
  5776. return 0
  5777. }
  5778. var l int
  5779. _ = l
  5780. return n
  5781. }
  5782. func (m *RequestInfo) Size() (n int) {
  5783. if m == nil {
  5784. return 0
  5785. }
  5786. var l int
  5787. _ = l
  5788. l = len(m.Version)
  5789. if l > 0 {
  5790. n += 1 + l + sovTypes(uint64(l))
  5791. }
  5792. if m.BlockVersion != 0 {
  5793. n += 1 + sovTypes(uint64(m.BlockVersion))
  5794. }
  5795. if m.P2PVersion != 0 {
  5796. n += 1 + sovTypes(uint64(m.P2PVersion))
  5797. }
  5798. l = len(m.AbciVersion)
  5799. if l > 0 {
  5800. n += 1 + l + sovTypes(uint64(l))
  5801. }
  5802. return n
  5803. }
  5804. func (m *RequestInitChain) Size() (n int) {
  5805. if m == nil {
  5806. return 0
  5807. }
  5808. var l int
  5809. _ = l
  5810. l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time)
  5811. n += 1 + l + sovTypes(uint64(l))
  5812. l = len(m.ChainId)
  5813. if l > 0 {
  5814. n += 1 + l + sovTypes(uint64(l))
  5815. }
  5816. if m.ConsensusParams != nil {
  5817. l = m.ConsensusParams.Size()
  5818. n += 1 + l + sovTypes(uint64(l))
  5819. }
  5820. if len(m.Validators) > 0 {
  5821. for _, e := range m.Validators {
  5822. l = e.Size()
  5823. n += 1 + l + sovTypes(uint64(l))
  5824. }
  5825. }
  5826. l = len(m.AppStateBytes)
  5827. if l > 0 {
  5828. n += 1 + l + sovTypes(uint64(l))
  5829. }
  5830. if m.InitialHeight != 0 {
  5831. n += 1 + sovTypes(uint64(m.InitialHeight))
  5832. }
  5833. return n
  5834. }
  5835. func (m *RequestQuery) Size() (n int) {
  5836. if m == nil {
  5837. return 0
  5838. }
  5839. var l int
  5840. _ = l
  5841. l = len(m.Data)
  5842. if l > 0 {
  5843. n += 1 + l + sovTypes(uint64(l))
  5844. }
  5845. l = len(m.Path)
  5846. if l > 0 {
  5847. n += 1 + l + sovTypes(uint64(l))
  5848. }
  5849. if m.Height != 0 {
  5850. n += 1 + sovTypes(uint64(m.Height))
  5851. }
  5852. if m.Prove {
  5853. n += 2
  5854. }
  5855. return n
  5856. }
  5857. func (m *RequestBeginBlock) Size() (n int) {
  5858. if m == nil {
  5859. return 0
  5860. }
  5861. var l int
  5862. _ = l
  5863. l = len(m.Hash)
  5864. if l > 0 {
  5865. n += 1 + l + sovTypes(uint64(l))
  5866. }
  5867. l = m.Header.Size()
  5868. n += 1 + l + sovTypes(uint64(l))
  5869. l = m.LastCommitInfo.Size()
  5870. n += 1 + l + sovTypes(uint64(l))
  5871. if len(m.ByzantineValidators) > 0 {
  5872. for _, e := range m.ByzantineValidators {
  5873. l = e.Size()
  5874. n += 1 + l + sovTypes(uint64(l))
  5875. }
  5876. }
  5877. return n
  5878. }
  5879. func (m *RequestCheckTx) Size() (n int) {
  5880. if m == nil {
  5881. return 0
  5882. }
  5883. var l int
  5884. _ = l
  5885. l = len(m.Tx)
  5886. if l > 0 {
  5887. n += 1 + l + sovTypes(uint64(l))
  5888. }
  5889. if m.Type != 0 {
  5890. n += 1 + sovTypes(uint64(m.Type))
  5891. }
  5892. return n
  5893. }
  5894. func (m *RequestDeliverTx) Size() (n int) {
  5895. if m == nil {
  5896. return 0
  5897. }
  5898. var l int
  5899. _ = l
  5900. l = len(m.Tx)
  5901. if l > 0 {
  5902. n += 1 + l + sovTypes(uint64(l))
  5903. }
  5904. return n
  5905. }
  5906. func (m *RequestEndBlock) Size() (n int) {
  5907. if m == nil {
  5908. return 0
  5909. }
  5910. var l int
  5911. _ = l
  5912. if m.Height != 0 {
  5913. n += 1 + sovTypes(uint64(m.Height))
  5914. }
  5915. return n
  5916. }
  5917. func (m *RequestCommit) Size() (n int) {
  5918. if m == nil {
  5919. return 0
  5920. }
  5921. var l int
  5922. _ = l
  5923. return n
  5924. }
  5925. func (m *RequestListSnapshots) Size() (n int) {
  5926. if m == nil {
  5927. return 0
  5928. }
  5929. var l int
  5930. _ = l
  5931. return n
  5932. }
  5933. func (m *RequestOfferSnapshot) Size() (n int) {
  5934. if m == nil {
  5935. return 0
  5936. }
  5937. var l int
  5938. _ = l
  5939. if m.Snapshot != nil {
  5940. l = m.Snapshot.Size()
  5941. n += 1 + l + sovTypes(uint64(l))
  5942. }
  5943. l = len(m.AppHash)
  5944. if l > 0 {
  5945. n += 1 + l + sovTypes(uint64(l))
  5946. }
  5947. return n
  5948. }
  5949. func (m *RequestLoadSnapshotChunk) Size() (n int) {
  5950. if m == nil {
  5951. return 0
  5952. }
  5953. var l int
  5954. _ = l
  5955. if m.Height != 0 {
  5956. n += 1 + sovTypes(uint64(m.Height))
  5957. }
  5958. if m.Format != 0 {
  5959. n += 1 + sovTypes(uint64(m.Format))
  5960. }
  5961. if m.Chunk != 0 {
  5962. n += 1 + sovTypes(uint64(m.Chunk))
  5963. }
  5964. return n
  5965. }
  5966. func (m *RequestApplySnapshotChunk) Size() (n int) {
  5967. if m == nil {
  5968. return 0
  5969. }
  5970. var l int
  5971. _ = l
  5972. if m.Index != 0 {
  5973. n += 1 + sovTypes(uint64(m.Index))
  5974. }
  5975. l = len(m.Chunk)
  5976. if l > 0 {
  5977. n += 1 + l + sovTypes(uint64(l))
  5978. }
  5979. l = len(m.Sender)
  5980. if l > 0 {
  5981. n += 1 + l + sovTypes(uint64(l))
  5982. }
  5983. return n
  5984. }
  5985. func (m *Response) Size() (n int) {
  5986. if m == nil {
  5987. return 0
  5988. }
  5989. var l int
  5990. _ = l
  5991. if m.Value != nil {
  5992. n += m.Value.Size()
  5993. }
  5994. return n
  5995. }
  5996. func (m *Response_Exception) Size() (n int) {
  5997. if m == nil {
  5998. return 0
  5999. }
  6000. var l int
  6001. _ = l
  6002. if m.Exception != nil {
  6003. l = m.Exception.Size()
  6004. n += 1 + l + sovTypes(uint64(l))
  6005. }
  6006. return n
  6007. }
  6008. func (m *Response_Echo) Size() (n int) {
  6009. if m == nil {
  6010. return 0
  6011. }
  6012. var l int
  6013. _ = l
  6014. if m.Echo != nil {
  6015. l = m.Echo.Size()
  6016. n += 1 + l + sovTypes(uint64(l))
  6017. }
  6018. return n
  6019. }
  6020. func (m *Response_Flush) Size() (n int) {
  6021. if m == nil {
  6022. return 0
  6023. }
  6024. var l int
  6025. _ = l
  6026. if m.Flush != nil {
  6027. l = m.Flush.Size()
  6028. n += 1 + l + sovTypes(uint64(l))
  6029. }
  6030. return n
  6031. }
  6032. func (m *Response_Info) Size() (n int) {
  6033. if m == nil {
  6034. return 0
  6035. }
  6036. var l int
  6037. _ = l
  6038. if m.Info != nil {
  6039. l = m.Info.Size()
  6040. n += 1 + l + sovTypes(uint64(l))
  6041. }
  6042. return n
  6043. }
  6044. func (m *Response_InitChain) Size() (n int) {
  6045. if m == nil {
  6046. return 0
  6047. }
  6048. var l int
  6049. _ = l
  6050. if m.InitChain != nil {
  6051. l = m.InitChain.Size()
  6052. n += 1 + l + sovTypes(uint64(l))
  6053. }
  6054. return n
  6055. }
  6056. func (m *Response_Query) Size() (n int) {
  6057. if m == nil {
  6058. return 0
  6059. }
  6060. var l int
  6061. _ = l
  6062. if m.Query != nil {
  6063. l = m.Query.Size()
  6064. n += 1 + l + sovTypes(uint64(l))
  6065. }
  6066. return n
  6067. }
  6068. func (m *Response_BeginBlock) Size() (n int) {
  6069. if m == nil {
  6070. return 0
  6071. }
  6072. var l int
  6073. _ = l
  6074. if m.BeginBlock != nil {
  6075. l = m.BeginBlock.Size()
  6076. n += 1 + l + sovTypes(uint64(l))
  6077. }
  6078. return n
  6079. }
  6080. func (m *Response_CheckTx) Size() (n int) {
  6081. if m == nil {
  6082. return 0
  6083. }
  6084. var l int
  6085. _ = l
  6086. if m.CheckTx != nil {
  6087. l = m.CheckTx.Size()
  6088. n += 1 + l + sovTypes(uint64(l))
  6089. }
  6090. return n
  6091. }
  6092. func (m *Response_DeliverTx) Size() (n int) {
  6093. if m == nil {
  6094. return 0
  6095. }
  6096. var l int
  6097. _ = l
  6098. if m.DeliverTx != nil {
  6099. l = m.DeliverTx.Size()
  6100. n += 1 + l + sovTypes(uint64(l))
  6101. }
  6102. return n
  6103. }
  6104. func (m *Response_EndBlock) Size() (n int) {
  6105. if m == nil {
  6106. return 0
  6107. }
  6108. var l int
  6109. _ = l
  6110. if m.EndBlock != nil {
  6111. l = m.EndBlock.Size()
  6112. n += 1 + l + sovTypes(uint64(l))
  6113. }
  6114. return n
  6115. }
  6116. func (m *Response_Commit) Size() (n int) {
  6117. if m == nil {
  6118. return 0
  6119. }
  6120. var l int
  6121. _ = l
  6122. if m.Commit != nil {
  6123. l = m.Commit.Size()
  6124. n += 1 + l + sovTypes(uint64(l))
  6125. }
  6126. return n
  6127. }
  6128. func (m *Response_ListSnapshots) Size() (n int) {
  6129. if m == nil {
  6130. return 0
  6131. }
  6132. var l int
  6133. _ = l
  6134. if m.ListSnapshots != nil {
  6135. l = m.ListSnapshots.Size()
  6136. n += 1 + l + sovTypes(uint64(l))
  6137. }
  6138. return n
  6139. }
  6140. func (m *Response_OfferSnapshot) Size() (n int) {
  6141. if m == nil {
  6142. return 0
  6143. }
  6144. var l int
  6145. _ = l
  6146. if m.OfferSnapshot != nil {
  6147. l = m.OfferSnapshot.Size()
  6148. n += 1 + l + sovTypes(uint64(l))
  6149. }
  6150. return n
  6151. }
  6152. func (m *Response_LoadSnapshotChunk) Size() (n int) {
  6153. if m == nil {
  6154. return 0
  6155. }
  6156. var l int
  6157. _ = l
  6158. if m.LoadSnapshotChunk != nil {
  6159. l = m.LoadSnapshotChunk.Size()
  6160. n += 1 + l + sovTypes(uint64(l))
  6161. }
  6162. return n
  6163. }
  6164. func (m *Response_ApplySnapshotChunk) Size() (n int) {
  6165. if m == nil {
  6166. return 0
  6167. }
  6168. var l int
  6169. _ = l
  6170. if m.ApplySnapshotChunk != nil {
  6171. l = m.ApplySnapshotChunk.Size()
  6172. n += 1 + l + sovTypes(uint64(l))
  6173. }
  6174. return n
  6175. }
  6176. func (m *ResponseException) Size() (n int) {
  6177. if m == nil {
  6178. return 0
  6179. }
  6180. var l int
  6181. _ = l
  6182. l = len(m.Error)
  6183. if l > 0 {
  6184. n += 1 + l + sovTypes(uint64(l))
  6185. }
  6186. return n
  6187. }
  6188. func (m *ResponseEcho) Size() (n int) {
  6189. if m == nil {
  6190. return 0
  6191. }
  6192. var l int
  6193. _ = l
  6194. l = len(m.Message)
  6195. if l > 0 {
  6196. n += 1 + l + sovTypes(uint64(l))
  6197. }
  6198. return n
  6199. }
  6200. func (m *ResponseFlush) Size() (n int) {
  6201. if m == nil {
  6202. return 0
  6203. }
  6204. var l int
  6205. _ = l
  6206. return n
  6207. }
  6208. func (m *ResponseInfo) Size() (n int) {
  6209. if m == nil {
  6210. return 0
  6211. }
  6212. var l int
  6213. _ = l
  6214. l = len(m.Data)
  6215. if l > 0 {
  6216. n += 1 + l + sovTypes(uint64(l))
  6217. }
  6218. l = len(m.Version)
  6219. if l > 0 {
  6220. n += 1 + l + sovTypes(uint64(l))
  6221. }
  6222. if m.AppVersion != 0 {
  6223. n += 1 + sovTypes(uint64(m.AppVersion))
  6224. }
  6225. if m.LastBlockHeight != 0 {
  6226. n += 1 + sovTypes(uint64(m.LastBlockHeight))
  6227. }
  6228. l = len(m.LastBlockAppHash)
  6229. if l > 0 {
  6230. n += 1 + l + sovTypes(uint64(l))
  6231. }
  6232. return n
  6233. }
  6234. func (m *ResponseInitChain) Size() (n int) {
  6235. if m == nil {
  6236. return 0
  6237. }
  6238. var l int
  6239. _ = l
  6240. if m.ConsensusParams != nil {
  6241. l = m.ConsensusParams.Size()
  6242. n += 1 + l + sovTypes(uint64(l))
  6243. }
  6244. if len(m.Validators) > 0 {
  6245. for _, e := range m.Validators {
  6246. l = e.Size()
  6247. n += 1 + l + sovTypes(uint64(l))
  6248. }
  6249. }
  6250. l = len(m.AppHash)
  6251. if l > 0 {
  6252. n += 1 + l + sovTypes(uint64(l))
  6253. }
  6254. return n
  6255. }
  6256. func (m *ResponseQuery) Size() (n int) {
  6257. if m == nil {
  6258. return 0
  6259. }
  6260. var l int
  6261. _ = l
  6262. if m.Code != 0 {
  6263. n += 1 + sovTypes(uint64(m.Code))
  6264. }
  6265. l = len(m.Log)
  6266. if l > 0 {
  6267. n += 1 + l + sovTypes(uint64(l))
  6268. }
  6269. l = len(m.Info)
  6270. if l > 0 {
  6271. n += 1 + l + sovTypes(uint64(l))
  6272. }
  6273. if m.Index != 0 {
  6274. n += 1 + sovTypes(uint64(m.Index))
  6275. }
  6276. l = len(m.Key)
  6277. if l > 0 {
  6278. n += 1 + l + sovTypes(uint64(l))
  6279. }
  6280. l = len(m.Value)
  6281. if l > 0 {
  6282. n += 1 + l + sovTypes(uint64(l))
  6283. }
  6284. if m.ProofOps != nil {
  6285. l = m.ProofOps.Size()
  6286. n += 1 + l + sovTypes(uint64(l))
  6287. }
  6288. if m.Height != 0 {
  6289. n += 1 + sovTypes(uint64(m.Height))
  6290. }
  6291. l = len(m.Codespace)
  6292. if l > 0 {
  6293. n += 1 + l + sovTypes(uint64(l))
  6294. }
  6295. return n
  6296. }
  6297. func (m *ResponseBeginBlock) Size() (n int) {
  6298. if m == nil {
  6299. return 0
  6300. }
  6301. var l int
  6302. _ = l
  6303. if len(m.Events) > 0 {
  6304. for _, e := range m.Events {
  6305. l = e.Size()
  6306. n += 1 + l + sovTypes(uint64(l))
  6307. }
  6308. }
  6309. return n
  6310. }
  6311. func (m *ResponseCheckTx) Size() (n int) {
  6312. if m == nil {
  6313. return 0
  6314. }
  6315. var l int
  6316. _ = l
  6317. if m.Code != 0 {
  6318. n += 1 + sovTypes(uint64(m.Code))
  6319. }
  6320. l = len(m.Data)
  6321. if l > 0 {
  6322. n += 1 + l + sovTypes(uint64(l))
  6323. }
  6324. l = len(m.Log)
  6325. if l > 0 {
  6326. n += 1 + l + sovTypes(uint64(l))
  6327. }
  6328. l = len(m.Info)
  6329. if l > 0 {
  6330. n += 1 + l + sovTypes(uint64(l))
  6331. }
  6332. if m.GasWanted != 0 {
  6333. n += 1 + sovTypes(uint64(m.GasWanted))
  6334. }
  6335. if m.GasUsed != 0 {
  6336. n += 1 + sovTypes(uint64(m.GasUsed))
  6337. }
  6338. if len(m.Events) > 0 {
  6339. for _, e := range m.Events {
  6340. l = e.Size()
  6341. n += 1 + l + sovTypes(uint64(l))
  6342. }
  6343. }
  6344. l = len(m.Codespace)
  6345. if l > 0 {
  6346. n += 1 + l + sovTypes(uint64(l))
  6347. }
  6348. l = len(m.Sender)
  6349. if l > 0 {
  6350. n += 1 + l + sovTypes(uint64(l))
  6351. }
  6352. if m.Priority != 0 {
  6353. n += 1 + sovTypes(uint64(m.Priority))
  6354. }
  6355. l = len(m.MempoolError)
  6356. if l > 0 {
  6357. n += 1 + l + sovTypes(uint64(l))
  6358. }
  6359. return n
  6360. }
  6361. func (m *ResponseDeliverTx) Size() (n int) {
  6362. if m == nil {
  6363. return 0
  6364. }
  6365. var l int
  6366. _ = l
  6367. if m.Code != 0 {
  6368. n += 1 + sovTypes(uint64(m.Code))
  6369. }
  6370. l = len(m.Data)
  6371. if l > 0 {
  6372. n += 1 + l + sovTypes(uint64(l))
  6373. }
  6374. l = len(m.Log)
  6375. if l > 0 {
  6376. n += 1 + l + sovTypes(uint64(l))
  6377. }
  6378. l = len(m.Info)
  6379. if l > 0 {
  6380. n += 1 + l + sovTypes(uint64(l))
  6381. }
  6382. if m.GasWanted != 0 {
  6383. n += 1 + sovTypes(uint64(m.GasWanted))
  6384. }
  6385. if m.GasUsed != 0 {
  6386. n += 1 + sovTypes(uint64(m.GasUsed))
  6387. }
  6388. if len(m.Events) > 0 {
  6389. for _, e := range m.Events {
  6390. l = e.Size()
  6391. n += 1 + l + sovTypes(uint64(l))
  6392. }
  6393. }
  6394. l = len(m.Codespace)
  6395. if l > 0 {
  6396. n += 1 + l + sovTypes(uint64(l))
  6397. }
  6398. return n
  6399. }
  6400. func (m *ResponseEndBlock) Size() (n int) {
  6401. if m == nil {
  6402. return 0
  6403. }
  6404. var l int
  6405. _ = l
  6406. if len(m.ValidatorUpdates) > 0 {
  6407. for _, e := range m.ValidatorUpdates {
  6408. l = e.Size()
  6409. n += 1 + l + sovTypes(uint64(l))
  6410. }
  6411. }
  6412. if m.ConsensusParamUpdates != nil {
  6413. l = m.ConsensusParamUpdates.Size()
  6414. n += 1 + l + sovTypes(uint64(l))
  6415. }
  6416. if len(m.Events) > 0 {
  6417. for _, e := range m.Events {
  6418. l = e.Size()
  6419. n += 1 + l + sovTypes(uint64(l))
  6420. }
  6421. }
  6422. return n
  6423. }
  6424. func (m *ResponseCommit) Size() (n int) {
  6425. if m == nil {
  6426. return 0
  6427. }
  6428. var l int
  6429. _ = l
  6430. l = len(m.Data)
  6431. if l > 0 {
  6432. n += 1 + l + sovTypes(uint64(l))
  6433. }
  6434. if m.RetainHeight != 0 {
  6435. n += 1 + sovTypes(uint64(m.RetainHeight))
  6436. }
  6437. return n
  6438. }
  6439. func (m *ResponseListSnapshots) Size() (n int) {
  6440. if m == nil {
  6441. return 0
  6442. }
  6443. var l int
  6444. _ = l
  6445. if len(m.Snapshots) > 0 {
  6446. for _, e := range m.Snapshots {
  6447. l = e.Size()
  6448. n += 1 + l + sovTypes(uint64(l))
  6449. }
  6450. }
  6451. return n
  6452. }
  6453. func (m *ResponseOfferSnapshot) Size() (n int) {
  6454. if m == nil {
  6455. return 0
  6456. }
  6457. var l int
  6458. _ = l
  6459. if m.Result != 0 {
  6460. n += 1 + sovTypes(uint64(m.Result))
  6461. }
  6462. return n
  6463. }
  6464. func (m *ResponseLoadSnapshotChunk) Size() (n int) {
  6465. if m == nil {
  6466. return 0
  6467. }
  6468. var l int
  6469. _ = l
  6470. l = len(m.Chunk)
  6471. if l > 0 {
  6472. n += 1 + l + sovTypes(uint64(l))
  6473. }
  6474. return n
  6475. }
  6476. func (m *ResponseApplySnapshotChunk) Size() (n int) {
  6477. if m == nil {
  6478. return 0
  6479. }
  6480. var l int
  6481. _ = l
  6482. if m.Result != 0 {
  6483. n += 1 + sovTypes(uint64(m.Result))
  6484. }
  6485. if len(m.RefetchChunks) > 0 {
  6486. l = 0
  6487. for _, e := range m.RefetchChunks {
  6488. l += sovTypes(uint64(e))
  6489. }
  6490. n += 1 + sovTypes(uint64(l)) + l
  6491. }
  6492. if len(m.RejectSenders) > 0 {
  6493. for _, s := range m.RejectSenders {
  6494. l = len(s)
  6495. n += 1 + l + sovTypes(uint64(l))
  6496. }
  6497. }
  6498. return n
  6499. }
  6500. func (m *LastCommitInfo) Size() (n int) {
  6501. if m == nil {
  6502. return 0
  6503. }
  6504. var l int
  6505. _ = l
  6506. if m.Round != 0 {
  6507. n += 1 + sovTypes(uint64(m.Round))
  6508. }
  6509. if len(m.Votes) > 0 {
  6510. for _, e := range m.Votes {
  6511. l = e.Size()
  6512. n += 1 + l + sovTypes(uint64(l))
  6513. }
  6514. }
  6515. return n
  6516. }
  6517. func (m *Event) Size() (n int) {
  6518. if m == nil {
  6519. return 0
  6520. }
  6521. var l int
  6522. _ = l
  6523. l = len(m.Type)
  6524. if l > 0 {
  6525. n += 1 + l + sovTypes(uint64(l))
  6526. }
  6527. if len(m.Attributes) > 0 {
  6528. for _, e := range m.Attributes {
  6529. l = e.Size()
  6530. n += 1 + l + sovTypes(uint64(l))
  6531. }
  6532. }
  6533. return n
  6534. }
  6535. func (m *EventAttribute) Size() (n int) {
  6536. if m == nil {
  6537. return 0
  6538. }
  6539. var l int
  6540. _ = l
  6541. l = len(m.Key)
  6542. if l > 0 {
  6543. n += 1 + l + sovTypes(uint64(l))
  6544. }
  6545. l = len(m.Value)
  6546. if l > 0 {
  6547. n += 1 + l + sovTypes(uint64(l))
  6548. }
  6549. if m.Index {
  6550. n += 2
  6551. }
  6552. return n
  6553. }
  6554. func (m *TxResult) Size() (n int) {
  6555. if m == nil {
  6556. return 0
  6557. }
  6558. var l int
  6559. _ = l
  6560. if m.Height != 0 {
  6561. n += 1 + sovTypes(uint64(m.Height))
  6562. }
  6563. if m.Index != 0 {
  6564. n += 1 + sovTypes(uint64(m.Index))
  6565. }
  6566. l = len(m.Tx)
  6567. if l > 0 {
  6568. n += 1 + l + sovTypes(uint64(l))
  6569. }
  6570. l = m.Result.Size()
  6571. n += 1 + l + sovTypes(uint64(l))
  6572. return n
  6573. }
  6574. func (m *Validator) Size() (n int) {
  6575. if m == nil {
  6576. return 0
  6577. }
  6578. var l int
  6579. _ = l
  6580. l = len(m.Address)
  6581. if l > 0 {
  6582. n += 1 + l + sovTypes(uint64(l))
  6583. }
  6584. if m.Power != 0 {
  6585. n += 1 + sovTypes(uint64(m.Power))
  6586. }
  6587. return n
  6588. }
  6589. func (m *ValidatorUpdate) Size() (n int) {
  6590. if m == nil {
  6591. return 0
  6592. }
  6593. var l int
  6594. _ = l
  6595. l = m.PubKey.Size()
  6596. n += 1 + l + sovTypes(uint64(l))
  6597. if m.Power != 0 {
  6598. n += 1 + sovTypes(uint64(m.Power))
  6599. }
  6600. return n
  6601. }
  6602. func (m *VoteInfo) Size() (n int) {
  6603. if m == nil {
  6604. return 0
  6605. }
  6606. var l int
  6607. _ = l
  6608. l = m.Validator.Size()
  6609. n += 1 + l + sovTypes(uint64(l))
  6610. if m.SignedLastBlock {
  6611. n += 2
  6612. }
  6613. return n
  6614. }
  6615. func (m *Evidence) Size() (n int) {
  6616. if m == nil {
  6617. return 0
  6618. }
  6619. var l int
  6620. _ = l
  6621. if m.Type != 0 {
  6622. n += 1 + sovTypes(uint64(m.Type))
  6623. }
  6624. l = m.Validator.Size()
  6625. n += 1 + l + sovTypes(uint64(l))
  6626. if m.Height != 0 {
  6627. n += 1 + sovTypes(uint64(m.Height))
  6628. }
  6629. l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time)
  6630. n += 1 + l + sovTypes(uint64(l))
  6631. if m.TotalVotingPower != 0 {
  6632. n += 1 + sovTypes(uint64(m.TotalVotingPower))
  6633. }
  6634. return n
  6635. }
  6636. func (m *Snapshot) Size() (n int) {
  6637. if m == nil {
  6638. return 0
  6639. }
  6640. var l int
  6641. _ = l
  6642. if m.Height != 0 {
  6643. n += 1 + sovTypes(uint64(m.Height))
  6644. }
  6645. if m.Format != 0 {
  6646. n += 1 + sovTypes(uint64(m.Format))
  6647. }
  6648. if m.Chunks != 0 {
  6649. n += 1 + sovTypes(uint64(m.Chunks))
  6650. }
  6651. l = len(m.Hash)
  6652. if l > 0 {
  6653. n += 1 + l + sovTypes(uint64(l))
  6654. }
  6655. l = len(m.Metadata)
  6656. if l > 0 {
  6657. n += 1 + l + sovTypes(uint64(l))
  6658. }
  6659. return n
  6660. }
  6661. func sovTypes(x uint64) (n int) {
  6662. return (math_bits.Len64(x|1) + 6) / 7
  6663. }
  6664. func sozTypes(x uint64) (n int) {
  6665. return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  6666. }
  6667. func (m *Request) Unmarshal(dAtA []byte) error {
  6668. l := len(dAtA)
  6669. iNdEx := 0
  6670. for iNdEx < l {
  6671. preIndex := iNdEx
  6672. var wire uint64
  6673. for shift := uint(0); ; shift += 7 {
  6674. if shift >= 64 {
  6675. return ErrIntOverflowTypes
  6676. }
  6677. if iNdEx >= l {
  6678. return io.ErrUnexpectedEOF
  6679. }
  6680. b := dAtA[iNdEx]
  6681. iNdEx++
  6682. wire |= uint64(b&0x7F) << shift
  6683. if b < 0x80 {
  6684. break
  6685. }
  6686. }
  6687. fieldNum := int32(wire >> 3)
  6688. wireType := int(wire & 0x7)
  6689. if wireType == 4 {
  6690. return fmt.Errorf("proto: Request: wiretype end group for non-group")
  6691. }
  6692. if fieldNum <= 0 {
  6693. return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire)
  6694. }
  6695. switch fieldNum {
  6696. case 1:
  6697. if wireType != 2 {
  6698. return fmt.Errorf("proto: wrong wireType = %d for field Echo", wireType)
  6699. }
  6700. var msglen int
  6701. for shift := uint(0); ; shift += 7 {
  6702. if shift >= 64 {
  6703. return ErrIntOverflowTypes
  6704. }
  6705. if iNdEx >= l {
  6706. return io.ErrUnexpectedEOF
  6707. }
  6708. b := dAtA[iNdEx]
  6709. iNdEx++
  6710. msglen |= int(b&0x7F) << shift
  6711. if b < 0x80 {
  6712. break
  6713. }
  6714. }
  6715. if msglen < 0 {
  6716. return ErrInvalidLengthTypes
  6717. }
  6718. postIndex := iNdEx + msglen
  6719. if postIndex < 0 {
  6720. return ErrInvalidLengthTypes
  6721. }
  6722. if postIndex > l {
  6723. return io.ErrUnexpectedEOF
  6724. }
  6725. v := &RequestEcho{}
  6726. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6727. return err
  6728. }
  6729. m.Value = &Request_Echo{v}
  6730. iNdEx = postIndex
  6731. case 2:
  6732. if wireType != 2 {
  6733. return fmt.Errorf("proto: wrong wireType = %d for field Flush", wireType)
  6734. }
  6735. var msglen int
  6736. for shift := uint(0); ; shift += 7 {
  6737. if shift >= 64 {
  6738. return ErrIntOverflowTypes
  6739. }
  6740. if iNdEx >= l {
  6741. return io.ErrUnexpectedEOF
  6742. }
  6743. b := dAtA[iNdEx]
  6744. iNdEx++
  6745. msglen |= int(b&0x7F) << shift
  6746. if b < 0x80 {
  6747. break
  6748. }
  6749. }
  6750. if msglen < 0 {
  6751. return ErrInvalidLengthTypes
  6752. }
  6753. postIndex := iNdEx + msglen
  6754. if postIndex < 0 {
  6755. return ErrInvalidLengthTypes
  6756. }
  6757. if postIndex > l {
  6758. return io.ErrUnexpectedEOF
  6759. }
  6760. v := &RequestFlush{}
  6761. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6762. return err
  6763. }
  6764. m.Value = &Request_Flush{v}
  6765. iNdEx = postIndex
  6766. case 3:
  6767. if wireType != 2 {
  6768. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  6769. }
  6770. var msglen int
  6771. for shift := uint(0); ; shift += 7 {
  6772. if shift >= 64 {
  6773. return ErrIntOverflowTypes
  6774. }
  6775. if iNdEx >= l {
  6776. return io.ErrUnexpectedEOF
  6777. }
  6778. b := dAtA[iNdEx]
  6779. iNdEx++
  6780. msglen |= int(b&0x7F) << shift
  6781. if b < 0x80 {
  6782. break
  6783. }
  6784. }
  6785. if msglen < 0 {
  6786. return ErrInvalidLengthTypes
  6787. }
  6788. postIndex := iNdEx + msglen
  6789. if postIndex < 0 {
  6790. return ErrInvalidLengthTypes
  6791. }
  6792. if postIndex > l {
  6793. return io.ErrUnexpectedEOF
  6794. }
  6795. v := &RequestInfo{}
  6796. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6797. return err
  6798. }
  6799. m.Value = &Request_Info{v}
  6800. iNdEx = postIndex
  6801. case 4:
  6802. if wireType != 2 {
  6803. return fmt.Errorf("proto: wrong wireType = %d for field InitChain", wireType)
  6804. }
  6805. var msglen int
  6806. for shift := uint(0); ; shift += 7 {
  6807. if shift >= 64 {
  6808. return ErrIntOverflowTypes
  6809. }
  6810. if iNdEx >= l {
  6811. return io.ErrUnexpectedEOF
  6812. }
  6813. b := dAtA[iNdEx]
  6814. iNdEx++
  6815. msglen |= int(b&0x7F) << shift
  6816. if b < 0x80 {
  6817. break
  6818. }
  6819. }
  6820. if msglen < 0 {
  6821. return ErrInvalidLengthTypes
  6822. }
  6823. postIndex := iNdEx + msglen
  6824. if postIndex < 0 {
  6825. return ErrInvalidLengthTypes
  6826. }
  6827. if postIndex > l {
  6828. return io.ErrUnexpectedEOF
  6829. }
  6830. v := &RequestInitChain{}
  6831. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6832. return err
  6833. }
  6834. m.Value = &Request_InitChain{v}
  6835. iNdEx = postIndex
  6836. case 5:
  6837. if wireType != 2 {
  6838. return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType)
  6839. }
  6840. var msglen int
  6841. for shift := uint(0); ; shift += 7 {
  6842. if shift >= 64 {
  6843. return ErrIntOverflowTypes
  6844. }
  6845. if iNdEx >= l {
  6846. return io.ErrUnexpectedEOF
  6847. }
  6848. b := dAtA[iNdEx]
  6849. iNdEx++
  6850. msglen |= int(b&0x7F) << shift
  6851. if b < 0x80 {
  6852. break
  6853. }
  6854. }
  6855. if msglen < 0 {
  6856. return ErrInvalidLengthTypes
  6857. }
  6858. postIndex := iNdEx + msglen
  6859. if postIndex < 0 {
  6860. return ErrInvalidLengthTypes
  6861. }
  6862. if postIndex > l {
  6863. return io.ErrUnexpectedEOF
  6864. }
  6865. v := &RequestQuery{}
  6866. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6867. return err
  6868. }
  6869. m.Value = &Request_Query{v}
  6870. iNdEx = postIndex
  6871. case 6:
  6872. if wireType != 2 {
  6873. return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", wireType)
  6874. }
  6875. var msglen int
  6876. for shift := uint(0); ; shift += 7 {
  6877. if shift >= 64 {
  6878. return ErrIntOverflowTypes
  6879. }
  6880. if iNdEx >= l {
  6881. return io.ErrUnexpectedEOF
  6882. }
  6883. b := dAtA[iNdEx]
  6884. iNdEx++
  6885. msglen |= int(b&0x7F) << shift
  6886. if b < 0x80 {
  6887. break
  6888. }
  6889. }
  6890. if msglen < 0 {
  6891. return ErrInvalidLengthTypes
  6892. }
  6893. postIndex := iNdEx + msglen
  6894. if postIndex < 0 {
  6895. return ErrInvalidLengthTypes
  6896. }
  6897. if postIndex > l {
  6898. return io.ErrUnexpectedEOF
  6899. }
  6900. v := &RequestBeginBlock{}
  6901. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6902. return err
  6903. }
  6904. m.Value = &Request_BeginBlock{v}
  6905. iNdEx = postIndex
  6906. case 7:
  6907. if wireType != 2 {
  6908. return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType)
  6909. }
  6910. var msglen int
  6911. for shift := uint(0); ; shift += 7 {
  6912. if shift >= 64 {
  6913. return ErrIntOverflowTypes
  6914. }
  6915. if iNdEx >= l {
  6916. return io.ErrUnexpectedEOF
  6917. }
  6918. b := dAtA[iNdEx]
  6919. iNdEx++
  6920. msglen |= int(b&0x7F) << shift
  6921. if b < 0x80 {
  6922. break
  6923. }
  6924. }
  6925. if msglen < 0 {
  6926. return ErrInvalidLengthTypes
  6927. }
  6928. postIndex := iNdEx + msglen
  6929. if postIndex < 0 {
  6930. return ErrInvalidLengthTypes
  6931. }
  6932. if postIndex > l {
  6933. return io.ErrUnexpectedEOF
  6934. }
  6935. v := &RequestCheckTx{}
  6936. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6937. return err
  6938. }
  6939. m.Value = &Request_CheckTx{v}
  6940. iNdEx = postIndex
  6941. case 8:
  6942. if wireType != 2 {
  6943. return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", wireType)
  6944. }
  6945. var msglen int
  6946. for shift := uint(0); ; shift += 7 {
  6947. if shift >= 64 {
  6948. return ErrIntOverflowTypes
  6949. }
  6950. if iNdEx >= l {
  6951. return io.ErrUnexpectedEOF
  6952. }
  6953. b := dAtA[iNdEx]
  6954. iNdEx++
  6955. msglen |= int(b&0x7F) << shift
  6956. if b < 0x80 {
  6957. break
  6958. }
  6959. }
  6960. if msglen < 0 {
  6961. return ErrInvalidLengthTypes
  6962. }
  6963. postIndex := iNdEx + msglen
  6964. if postIndex < 0 {
  6965. return ErrInvalidLengthTypes
  6966. }
  6967. if postIndex > l {
  6968. return io.ErrUnexpectedEOF
  6969. }
  6970. v := &RequestDeliverTx{}
  6971. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6972. return err
  6973. }
  6974. m.Value = &Request_DeliverTx{v}
  6975. iNdEx = postIndex
  6976. case 9:
  6977. if wireType != 2 {
  6978. return fmt.Errorf("proto: wrong wireType = %d for field EndBlock", wireType)
  6979. }
  6980. var msglen int
  6981. for shift := uint(0); ; shift += 7 {
  6982. if shift >= 64 {
  6983. return ErrIntOverflowTypes
  6984. }
  6985. if iNdEx >= l {
  6986. return io.ErrUnexpectedEOF
  6987. }
  6988. b := dAtA[iNdEx]
  6989. iNdEx++
  6990. msglen |= int(b&0x7F) << shift
  6991. if b < 0x80 {
  6992. break
  6993. }
  6994. }
  6995. if msglen < 0 {
  6996. return ErrInvalidLengthTypes
  6997. }
  6998. postIndex := iNdEx + msglen
  6999. if postIndex < 0 {
  7000. return ErrInvalidLengthTypes
  7001. }
  7002. if postIndex > l {
  7003. return io.ErrUnexpectedEOF
  7004. }
  7005. v := &RequestEndBlock{}
  7006. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7007. return err
  7008. }
  7009. m.Value = &Request_EndBlock{v}
  7010. iNdEx = postIndex
  7011. case 10:
  7012. if wireType != 2 {
  7013. return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType)
  7014. }
  7015. var msglen int
  7016. for shift := uint(0); ; shift += 7 {
  7017. if shift >= 64 {
  7018. return ErrIntOverflowTypes
  7019. }
  7020. if iNdEx >= l {
  7021. return io.ErrUnexpectedEOF
  7022. }
  7023. b := dAtA[iNdEx]
  7024. iNdEx++
  7025. msglen |= int(b&0x7F) << shift
  7026. if b < 0x80 {
  7027. break
  7028. }
  7029. }
  7030. if msglen < 0 {
  7031. return ErrInvalidLengthTypes
  7032. }
  7033. postIndex := iNdEx + msglen
  7034. if postIndex < 0 {
  7035. return ErrInvalidLengthTypes
  7036. }
  7037. if postIndex > l {
  7038. return io.ErrUnexpectedEOF
  7039. }
  7040. v := &RequestCommit{}
  7041. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7042. return err
  7043. }
  7044. m.Value = &Request_Commit{v}
  7045. iNdEx = postIndex
  7046. case 11:
  7047. if wireType != 2 {
  7048. return fmt.Errorf("proto: wrong wireType = %d for field ListSnapshots", wireType)
  7049. }
  7050. var msglen int
  7051. for shift := uint(0); ; shift += 7 {
  7052. if shift >= 64 {
  7053. return ErrIntOverflowTypes
  7054. }
  7055. if iNdEx >= l {
  7056. return io.ErrUnexpectedEOF
  7057. }
  7058. b := dAtA[iNdEx]
  7059. iNdEx++
  7060. msglen |= int(b&0x7F) << shift
  7061. if b < 0x80 {
  7062. break
  7063. }
  7064. }
  7065. if msglen < 0 {
  7066. return ErrInvalidLengthTypes
  7067. }
  7068. postIndex := iNdEx + msglen
  7069. if postIndex < 0 {
  7070. return ErrInvalidLengthTypes
  7071. }
  7072. if postIndex > l {
  7073. return io.ErrUnexpectedEOF
  7074. }
  7075. v := &RequestListSnapshots{}
  7076. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7077. return err
  7078. }
  7079. m.Value = &Request_ListSnapshots{v}
  7080. iNdEx = postIndex
  7081. case 12:
  7082. if wireType != 2 {
  7083. return fmt.Errorf("proto: wrong wireType = %d for field OfferSnapshot", wireType)
  7084. }
  7085. var msglen int
  7086. for shift := uint(0); ; shift += 7 {
  7087. if shift >= 64 {
  7088. return ErrIntOverflowTypes
  7089. }
  7090. if iNdEx >= l {
  7091. return io.ErrUnexpectedEOF
  7092. }
  7093. b := dAtA[iNdEx]
  7094. iNdEx++
  7095. msglen |= int(b&0x7F) << shift
  7096. if b < 0x80 {
  7097. break
  7098. }
  7099. }
  7100. if msglen < 0 {
  7101. return ErrInvalidLengthTypes
  7102. }
  7103. postIndex := iNdEx + msglen
  7104. if postIndex < 0 {
  7105. return ErrInvalidLengthTypes
  7106. }
  7107. if postIndex > l {
  7108. return io.ErrUnexpectedEOF
  7109. }
  7110. v := &RequestOfferSnapshot{}
  7111. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7112. return err
  7113. }
  7114. m.Value = &Request_OfferSnapshot{v}
  7115. iNdEx = postIndex
  7116. case 13:
  7117. if wireType != 2 {
  7118. return fmt.Errorf("proto: wrong wireType = %d for field LoadSnapshotChunk", wireType)
  7119. }
  7120. var msglen int
  7121. for shift := uint(0); ; shift += 7 {
  7122. if shift >= 64 {
  7123. return ErrIntOverflowTypes
  7124. }
  7125. if iNdEx >= l {
  7126. return io.ErrUnexpectedEOF
  7127. }
  7128. b := dAtA[iNdEx]
  7129. iNdEx++
  7130. msglen |= int(b&0x7F) << shift
  7131. if b < 0x80 {
  7132. break
  7133. }
  7134. }
  7135. if msglen < 0 {
  7136. return ErrInvalidLengthTypes
  7137. }
  7138. postIndex := iNdEx + msglen
  7139. if postIndex < 0 {
  7140. return ErrInvalidLengthTypes
  7141. }
  7142. if postIndex > l {
  7143. return io.ErrUnexpectedEOF
  7144. }
  7145. v := &RequestLoadSnapshotChunk{}
  7146. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7147. return err
  7148. }
  7149. m.Value = &Request_LoadSnapshotChunk{v}
  7150. iNdEx = postIndex
  7151. case 14:
  7152. if wireType != 2 {
  7153. return fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", wireType)
  7154. }
  7155. var msglen int
  7156. for shift := uint(0); ; shift += 7 {
  7157. if shift >= 64 {
  7158. return ErrIntOverflowTypes
  7159. }
  7160. if iNdEx >= l {
  7161. return io.ErrUnexpectedEOF
  7162. }
  7163. b := dAtA[iNdEx]
  7164. iNdEx++
  7165. msglen |= int(b&0x7F) << shift
  7166. if b < 0x80 {
  7167. break
  7168. }
  7169. }
  7170. if msglen < 0 {
  7171. return ErrInvalidLengthTypes
  7172. }
  7173. postIndex := iNdEx + msglen
  7174. if postIndex < 0 {
  7175. return ErrInvalidLengthTypes
  7176. }
  7177. if postIndex > l {
  7178. return io.ErrUnexpectedEOF
  7179. }
  7180. v := &RequestApplySnapshotChunk{}
  7181. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7182. return err
  7183. }
  7184. m.Value = &Request_ApplySnapshotChunk{v}
  7185. iNdEx = postIndex
  7186. default:
  7187. iNdEx = preIndex
  7188. skippy, err := skipTypes(dAtA[iNdEx:])
  7189. if err != nil {
  7190. return err
  7191. }
  7192. if (skippy < 0) || (iNdEx+skippy) < 0 {
  7193. return ErrInvalidLengthTypes
  7194. }
  7195. if (iNdEx + skippy) > l {
  7196. return io.ErrUnexpectedEOF
  7197. }
  7198. iNdEx += skippy
  7199. }
  7200. }
  7201. if iNdEx > l {
  7202. return io.ErrUnexpectedEOF
  7203. }
  7204. return nil
  7205. }
  7206. func (m *RequestEcho) Unmarshal(dAtA []byte) error {
  7207. l := len(dAtA)
  7208. iNdEx := 0
  7209. for iNdEx < l {
  7210. preIndex := iNdEx
  7211. var wire uint64
  7212. for shift := uint(0); ; shift += 7 {
  7213. if shift >= 64 {
  7214. return ErrIntOverflowTypes
  7215. }
  7216. if iNdEx >= l {
  7217. return io.ErrUnexpectedEOF
  7218. }
  7219. b := dAtA[iNdEx]
  7220. iNdEx++
  7221. wire |= uint64(b&0x7F) << shift
  7222. if b < 0x80 {
  7223. break
  7224. }
  7225. }
  7226. fieldNum := int32(wire >> 3)
  7227. wireType := int(wire & 0x7)
  7228. if wireType == 4 {
  7229. return fmt.Errorf("proto: RequestEcho: wiretype end group for non-group")
  7230. }
  7231. if fieldNum <= 0 {
  7232. return fmt.Errorf("proto: RequestEcho: illegal tag %d (wire type %d)", fieldNum, wire)
  7233. }
  7234. switch fieldNum {
  7235. case 1:
  7236. if wireType != 2 {
  7237. return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
  7238. }
  7239. var stringLen uint64
  7240. for shift := uint(0); ; shift += 7 {
  7241. if shift >= 64 {
  7242. return ErrIntOverflowTypes
  7243. }
  7244. if iNdEx >= l {
  7245. return io.ErrUnexpectedEOF
  7246. }
  7247. b := dAtA[iNdEx]
  7248. iNdEx++
  7249. stringLen |= uint64(b&0x7F) << shift
  7250. if b < 0x80 {
  7251. break
  7252. }
  7253. }
  7254. intStringLen := int(stringLen)
  7255. if intStringLen < 0 {
  7256. return ErrInvalidLengthTypes
  7257. }
  7258. postIndex := iNdEx + intStringLen
  7259. if postIndex < 0 {
  7260. return ErrInvalidLengthTypes
  7261. }
  7262. if postIndex > l {
  7263. return io.ErrUnexpectedEOF
  7264. }
  7265. m.Message = string(dAtA[iNdEx:postIndex])
  7266. iNdEx = postIndex
  7267. default:
  7268. iNdEx = preIndex
  7269. skippy, err := skipTypes(dAtA[iNdEx:])
  7270. if err != nil {
  7271. return err
  7272. }
  7273. if (skippy < 0) || (iNdEx+skippy) < 0 {
  7274. return ErrInvalidLengthTypes
  7275. }
  7276. if (iNdEx + skippy) > l {
  7277. return io.ErrUnexpectedEOF
  7278. }
  7279. iNdEx += skippy
  7280. }
  7281. }
  7282. if iNdEx > l {
  7283. return io.ErrUnexpectedEOF
  7284. }
  7285. return nil
  7286. }
  7287. func (m *RequestFlush) Unmarshal(dAtA []byte) error {
  7288. l := len(dAtA)
  7289. iNdEx := 0
  7290. for iNdEx < l {
  7291. preIndex := iNdEx
  7292. var wire uint64
  7293. for shift := uint(0); ; shift += 7 {
  7294. if shift >= 64 {
  7295. return ErrIntOverflowTypes
  7296. }
  7297. if iNdEx >= l {
  7298. return io.ErrUnexpectedEOF
  7299. }
  7300. b := dAtA[iNdEx]
  7301. iNdEx++
  7302. wire |= uint64(b&0x7F) << shift
  7303. if b < 0x80 {
  7304. break
  7305. }
  7306. }
  7307. fieldNum := int32(wire >> 3)
  7308. wireType := int(wire & 0x7)
  7309. if wireType == 4 {
  7310. return fmt.Errorf("proto: RequestFlush: wiretype end group for non-group")
  7311. }
  7312. if fieldNum <= 0 {
  7313. return fmt.Errorf("proto: RequestFlush: illegal tag %d (wire type %d)", fieldNum, wire)
  7314. }
  7315. switch fieldNum {
  7316. default:
  7317. iNdEx = preIndex
  7318. skippy, err := skipTypes(dAtA[iNdEx:])
  7319. if err != nil {
  7320. return err
  7321. }
  7322. if (skippy < 0) || (iNdEx+skippy) < 0 {
  7323. return ErrInvalidLengthTypes
  7324. }
  7325. if (iNdEx + skippy) > l {
  7326. return io.ErrUnexpectedEOF
  7327. }
  7328. iNdEx += skippy
  7329. }
  7330. }
  7331. if iNdEx > l {
  7332. return io.ErrUnexpectedEOF
  7333. }
  7334. return nil
  7335. }
  7336. func (m *RequestInfo) Unmarshal(dAtA []byte) error {
  7337. l := len(dAtA)
  7338. iNdEx := 0
  7339. for iNdEx < l {
  7340. preIndex := iNdEx
  7341. var wire uint64
  7342. for shift := uint(0); ; shift += 7 {
  7343. if shift >= 64 {
  7344. return ErrIntOverflowTypes
  7345. }
  7346. if iNdEx >= l {
  7347. return io.ErrUnexpectedEOF
  7348. }
  7349. b := dAtA[iNdEx]
  7350. iNdEx++
  7351. wire |= uint64(b&0x7F) << shift
  7352. if b < 0x80 {
  7353. break
  7354. }
  7355. }
  7356. fieldNum := int32(wire >> 3)
  7357. wireType := int(wire & 0x7)
  7358. if wireType == 4 {
  7359. return fmt.Errorf("proto: RequestInfo: wiretype end group for non-group")
  7360. }
  7361. if fieldNum <= 0 {
  7362. return fmt.Errorf("proto: RequestInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  7363. }
  7364. switch fieldNum {
  7365. case 1:
  7366. if wireType != 2 {
  7367. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  7368. }
  7369. var stringLen uint64
  7370. for shift := uint(0); ; shift += 7 {
  7371. if shift >= 64 {
  7372. return ErrIntOverflowTypes
  7373. }
  7374. if iNdEx >= l {
  7375. return io.ErrUnexpectedEOF
  7376. }
  7377. b := dAtA[iNdEx]
  7378. iNdEx++
  7379. stringLen |= uint64(b&0x7F) << shift
  7380. if b < 0x80 {
  7381. break
  7382. }
  7383. }
  7384. intStringLen := int(stringLen)
  7385. if intStringLen < 0 {
  7386. return ErrInvalidLengthTypes
  7387. }
  7388. postIndex := iNdEx + intStringLen
  7389. if postIndex < 0 {
  7390. return ErrInvalidLengthTypes
  7391. }
  7392. if postIndex > l {
  7393. return io.ErrUnexpectedEOF
  7394. }
  7395. m.Version = string(dAtA[iNdEx:postIndex])
  7396. iNdEx = postIndex
  7397. case 2:
  7398. if wireType != 0 {
  7399. return fmt.Errorf("proto: wrong wireType = %d for field BlockVersion", wireType)
  7400. }
  7401. m.BlockVersion = 0
  7402. for shift := uint(0); ; shift += 7 {
  7403. if shift >= 64 {
  7404. return ErrIntOverflowTypes
  7405. }
  7406. if iNdEx >= l {
  7407. return io.ErrUnexpectedEOF
  7408. }
  7409. b := dAtA[iNdEx]
  7410. iNdEx++
  7411. m.BlockVersion |= uint64(b&0x7F) << shift
  7412. if b < 0x80 {
  7413. break
  7414. }
  7415. }
  7416. case 3:
  7417. if wireType != 0 {
  7418. return fmt.Errorf("proto: wrong wireType = %d for field P2PVersion", wireType)
  7419. }
  7420. m.P2PVersion = 0
  7421. for shift := uint(0); ; shift += 7 {
  7422. if shift >= 64 {
  7423. return ErrIntOverflowTypes
  7424. }
  7425. if iNdEx >= l {
  7426. return io.ErrUnexpectedEOF
  7427. }
  7428. b := dAtA[iNdEx]
  7429. iNdEx++
  7430. m.P2PVersion |= uint64(b&0x7F) << shift
  7431. if b < 0x80 {
  7432. break
  7433. }
  7434. }
  7435. case 4:
  7436. if wireType != 2 {
  7437. return fmt.Errorf("proto: wrong wireType = %d for field AbciVersion", wireType)
  7438. }
  7439. var stringLen uint64
  7440. for shift := uint(0); ; shift += 7 {
  7441. if shift >= 64 {
  7442. return ErrIntOverflowTypes
  7443. }
  7444. if iNdEx >= l {
  7445. return io.ErrUnexpectedEOF
  7446. }
  7447. b := dAtA[iNdEx]
  7448. iNdEx++
  7449. stringLen |= uint64(b&0x7F) << shift
  7450. if b < 0x80 {
  7451. break
  7452. }
  7453. }
  7454. intStringLen := int(stringLen)
  7455. if intStringLen < 0 {
  7456. return ErrInvalidLengthTypes
  7457. }
  7458. postIndex := iNdEx + intStringLen
  7459. if postIndex < 0 {
  7460. return ErrInvalidLengthTypes
  7461. }
  7462. if postIndex > l {
  7463. return io.ErrUnexpectedEOF
  7464. }
  7465. m.AbciVersion = string(dAtA[iNdEx:postIndex])
  7466. iNdEx = postIndex
  7467. default:
  7468. iNdEx = preIndex
  7469. skippy, err := skipTypes(dAtA[iNdEx:])
  7470. if err != nil {
  7471. return err
  7472. }
  7473. if (skippy < 0) || (iNdEx+skippy) < 0 {
  7474. return ErrInvalidLengthTypes
  7475. }
  7476. if (iNdEx + skippy) > l {
  7477. return io.ErrUnexpectedEOF
  7478. }
  7479. iNdEx += skippy
  7480. }
  7481. }
  7482. if iNdEx > l {
  7483. return io.ErrUnexpectedEOF
  7484. }
  7485. return nil
  7486. }
  7487. func (m *RequestInitChain) Unmarshal(dAtA []byte) error {
  7488. l := len(dAtA)
  7489. iNdEx := 0
  7490. for iNdEx < l {
  7491. preIndex := iNdEx
  7492. var wire uint64
  7493. for shift := uint(0); ; shift += 7 {
  7494. if shift >= 64 {
  7495. return ErrIntOverflowTypes
  7496. }
  7497. if iNdEx >= l {
  7498. return io.ErrUnexpectedEOF
  7499. }
  7500. b := dAtA[iNdEx]
  7501. iNdEx++
  7502. wire |= uint64(b&0x7F) << shift
  7503. if b < 0x80 {
  7504. break
  7505. }
  7506. }
  7507. fieldNum := int32(wire >> 3)
  7508. wireType := int(wire & 0x7)
  7509. if wireType == 4 {
  7510. return fmt.Errorf("proto: RequestInitChain: wiretype end group for non-group")
  7511. }
  7512. if fieldNum <= 0 {
  7513. return fmt.Errorf("proto: RequestInitChain: illegal tag %d (wire type %d)", fieldNum, wire)
  7514. }
  7515. switch fieldNum {
  7516. case 1:
  7517. if wireType != 2 {
  7518. return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
  7519. }
  7520. var msglen int
  7521. for shift := uint(0); ; shift += 7 {
  7522. if shift >= 64 {
  7523. return ErrIntOverflowTypes
  7524. }
  7525. if iNdEx >= l {
  7526. return io.ErrUnexpectedEOF
  7527. }
  7528. b := dAtA[iNdEx]
  7529. iNdEx++
  7530. msglen |= int(b&0x7F) << shift
  7531. if b < 0x80 {
  7532. break
  7533. }
  7534. }
  7535. if msglen < 0 {
  7536. return ErrInvalidLengthTypes
  7537. }
  7538. postIndex := iNdEx + msglen
  7539. if postIndex < 0 {
  7540. return ErrInvalidLengthTypes
  7541. }
  7542. if postIndex > l {
  7543. return io.ErrUnexpectedEOF
  7544. }
  7545. if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil {
  7546. return err
  7547. }
  7548. iNdEx = postIndex
  7549. case 2:
  7550. if wireType != 2 {
  7551. return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType)
  7552. }
  7553. var stringLen uint64
  7554. for shift := uint(0); ; shift += 7 {
  7555. if shift >= 64 {
  7556. return ErrIntOverflowTypes
  7557. }
  7558. if iNdEx >= l {
  7559. return io.ErrUnexpectedEOF
  7560. }
  7561. b := dAtA[iNdEx]
  7562. iNdEx++
  7563. stringLen |= uint64(b&0x7F) << shift
  7564. if b < 0x80 {
  7565. break
  7566. }
  7567. }
  7568. intStringLen := int(stringLen)
  7569. if intStringLen < 0 {
  7570. return ErrInvalidLengthTypes
  7571. }
  7572. postIndex := iNdEx + intStringLen
  7573. if postIndex < 0 {
  7574. return ErrInvalidLengthTypes
  7575. }
  7576. if postIndex > l {
  7577. return io.ErrUnexpectedEOF
  7578. }
  7579. m.ChainId = string(dAtA[iNdEx:postIndex])
  7580. iNdEx = postIndex
  7581. case 3:
  7582. if wireType != 2 {
  7583. return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", wireType)
  7584. }
  7585. var msglen int
  7586. for shift := uint(0); ; shift += 7 {
  7587. if shift >= 64 {
  7588. return ErrIntOverflowTypes
  7589. }
  7590. if iNdEx >= l {
  7591. return io.ErrUnexpectedEOF
  7592. }
  7593. b := dAtA[iNdEx]
  7594. iNdEx++
  7595. msglen |= int(b&0x7F) << shift
  7596. if b < 0x80 {
  7597. break
  7598. }
  7599. }
  7600. if msglen < 0 {
  7601. return ErrInvalidLengthTypes
  7602. }
  7603. postIndex := iNdEx + msglen
  7604. if postIndex < 0 {
  7605. return ErrInvalidLengthTypes
  7606. }
  7607. if postIndex > l {
  7608. return io.ErrUnexpectedEOF
  7609. }
  7610. if m.ConsensusParams == nil {
  7611. m.ConsensusParams = &types1.ConsensusParams{}
  7612. }
  7613. if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7614. return err
  7615. }
  7616. iNdEx = postIndex
  7617. case 4:
  7618. if wireType != 2 {
  7619. return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType)
  7620. }
  7621. var msglen int
  7622. for shift := uint(0); ; shift += 7 {
  7623. if shift >= 64 {
  7624. return ErrIntOverflowTypes
  7625. }
  7626. if iNdEx >= l {
  7627. return io.ErrUnexpectedEOF
  7628. }
  7629. b := dAtA[iNdEx]
  7630. iNdEx++
  7631. msglen |= int(b&0x7F) << shift
  7632. if b < 0x80 {
  7633. break
  7634. }
  7635. }
  7636. if msglen < 0 {
  7637. return ErrInvalidLengthTypes
  7638. }
  7639. postIndex := iNdEx + msglen
  7640. if postIndex < 0 {
  7641. return ErrInvalidLengthTypes
  7642. }
  7643. if postIndex > l {
  7644. return io.ErrUnexpectedEOF
  7645. }
  7646. m.Validators = append(m.Validators, ValidatorUpdate{})
  7647. if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7648. return err
  7649. }
  7650. iNdEx = postIndex
  7651. case 5:
  7652. if wireType != 2 {
  7653. return fmt.Errorf("proto: wrong wireType = %d for field AppStateBytes", wireType)
  7654. }
  7655. var byteLen int
  7656. for shift := uint(0); ; shift += 7 {
  7657. if shift >= 64 {
  7658. return ErrIntOverflowTypes
  7659. }
  7660. if iNdEx >= l {
  7661. return io.ErrUnexpectedEOF
  7662. }
  7663. b := dAtA[iNdEx]
  7664. iNdEx++
  7665. byteLen |= int(b&0x7F) << shift
  7666. if b < 0x80 {
  7667. break
  7668. }
  7669. }
  7670. if byteLen < 0 {
  7671. return ErrInvalidLengthTypes
  7672. }
  7673. postIndex := iNdEx + byteLen
  7674. if postIndex < 0 {
  7675. return ErrInvalidLengthTypes
  7676. }
  7677. if postIndex > l {
  7678. return io.ErrUnexpectedEOF
  7679. }
  7680. m.AppStateBytes = append(m.AppStateBytes[:0], dAtA[iNdEx:postIndex]...)
  7681. if m.AppStateBytes == nil {
  7682. m.AppStateBytes = []byte{}
  7683. }
  7684. iNdEx = postIndex
  7685. case 6:
  7686. if wireType != 0 {
  7687. return fmt.Errorf("proto: wrong wireType = %d for field InitialHeight", wireType)
  7688. }
  7689. m.InitialHeight = 0
  7690. for shift := uint(0); ; shift += 7 {
  7691. if shift >= 64 {
  7692. return ErrIntOverflowTypes
  7693. }
  7694. if iNdEx >= l {
  7695. return io.ErrUnexpectedEOF
  7696. }
  7697. b := dAtA[iNdEx]
  7698. iNdEx++
  7699. m.InitialHeight |= int64(b&0x7F) << shift
  7700. if b < 0x80 {
  7701. break
  7702. }
  7703. }
  7704. default:
  7705. iNdEx = preIndex
  7706. skippy, err := skipTypes(dAtA[iNdEx:])
  7707. if err != nil {
  7708. return err
  7709. }
  7710. if (skippy < 0) || (iNdEx+skippy) < 0 {
  7711. return ErrInvalidLengthTypes
  7712. }
  7713. if (iNdEx + skippy) > l {
  7714. return io.ErrUnexpectedEOF
  7715. }
  7716. iNdEx += skippy
  7717. }
  7718. }
  7719. if iNdEx > l {
  7720. return io.ErrUnexpectedEOF
  7721. }
  7722. return nil
  7723. }
  7724. func (m *RequestQuery) Unmarshal(dAtA []byte) error {
  7725. l := len(dAtA)
  7726. iNdEx := 0
  7727. for iNdEx < l {
  7728. preIndex := iNdEx
  7729. var wire uint64
  7730. for shift := uint(0); ; shift += 7 {
  7731. if shift >= 64 {
  7732. return ErrIntOverflowTypes
  7733. }
  7734. if iNdEx >= l {
  7735. return io.ErrUnexpectedEOF
  7736. }
  7737. b := dAtA[iNdEx]
  7738. iNdEx++
  7739. wire |= uint64(b&0x7F) << shift
  7740. if b < 0x80 {
  7741. break
  7742. }
  7743. }
  7744. fieldNum := int32(wire >> 3)
  7745. wireType := int(wire & 0x7)
  7746. if wireType == 4 {
  7747. return fmt.Errorf("proto: RequestQuery: wiretype end group for non-group")
  7748. }
  7749. if fieldNum <= 0 {
  7750. return fmt.Errorf("proto: RequestQuery: illegal tag %d (wire type %d)", fieldNum, wire)
  7751. }
  7752. switch fieldNum {
  7753. case 1:
  7754. if wireType != 2 {
  7755. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  7756. }
  7757. var byteLen int
  7758. for shift := uint(0); ; shift += 7 {
  7759. if shift >= 64 {
  7760. return ErrIntOverflowTypes
  7761. }
  7762. if iNdEx >= l {
  7763. return io.ErrUnexpectedEOF
  7764. }
  7765. b := dAtA[iNdEx]
  7766. iNdEx++
  7767. byteLen |= int(b&0x7F) << shift
  7768. if b < 0x80 {
  7769. break
  7770. }
  7771. }
  7772. if byteLen < 0 {
  7773. return ErrInvalidLengthTypes
  7774. }
  7775. postIndex := iNdEx + byteLen
  7776. if postIndex < 0 {
  7777. return ErrInvalidLengthTypes
  7778. }
  7779. if postIndex > l {
  7780. return io.ErrUnexpectedEOF
  7781. }
  7782. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  7783. if m.Data == nil {
  7784. m.Data = []byte{}
  7785. }
  7786. iNdEx = postIndex
  7787. case 2:
  7788. if wireType != 2 {
  7789. return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
  7790. }
  7791. var stringLen uint64
  7792. for shift := uint(0); ; shift += 7 {
  7793. if shift >= 64 {
  7794. return ErrIntOverflowTypes
  7795. }
  7796. if iNdEx >= l {
  7797. return io.ErrUnexpectedEOF
  7798. }
  7799. b := dAtA[iNdEx]
  7800. iNdEx++
  7801. stringLen |= uint64(b&0x7F) << shift
  7802. if b < 0x80 {
  7803. break
  7804. }
  7805. }
  7806. intStringLen := int(stringLen)
  7807. if intStringLen < 0 {
  7808. return ErrInvalidLengthTypes
  7809. }
  7810. postIndex := iNdEx + intStringLen
  7811. if postIndex < 0 {
  7812. return ErrInvalidLengthTypes
  7813. }
  7814. if postIndex > l {
  7815. return io.ErrUnexpectedEOF
  7816. }
  7817. m.Path = string(dAtA[iNdEx:postIndex])
  7818. iNdEx = postIndex
  7819. case 3:
  7820. if wireType != 0 {
  7821. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  7822. }
  7823. m.Height = 0
  7824. for shift := uint(0); ; shift += 7 {
  7825. if shift >= 64 {
  7826. return ErrIntOverflowTypes
  7827. }
  7828. if iNdEx >= l {
  7829. return io.ErrUnexpectedEOF
  7830. }
  7831. b := dAtA[iNdEx]
  7832. iNdEx++
  7833. m.Height |= int64(b&0x7F) << shift
  7834. if b < 0x80 {
  7835. break
  7836. }
  7837. }
  7838. case 4:
  7839. if wireType != 0 {
  7840. return fmt.Errorf("proto: wrong wireType = %d for field Prove", wireType)
  7841. }
  7842. var v int
  7843. for shift := uint(0); ; shift += 7 {
  7844. if shift >= 64 {
  7845. return ErrIntOverflowTypes
  7846. }
  7847. if iNdEx >= l {
  7848. return io.ErrUnexpectedEOF
  7849. }
  7850. b := dAtA[iNdEx]
  7851. iNdEx++
  7852. v |= int(b&0x7F) << shift
  7853. if b < 0x80 {
  7854. break
  7855. }
  7856. }
  7857. m.Prove = bool(v != 0)
  7858. default:
  7859. iNdEx = preIndex
  7860. skippy, err := skipTypes(dAtA[iNdEx:])
  7861. if err != nil {
  7862. return err
  7863. }
  7864. if (skippy < 0) || (iNdEx+skippy) < 0 {
  7865. return ErrInvalidLengthTypes
  7866. }
  7867. if (iNdEx + skippy) > l {
  7868. return io.ErrUnexpectedEOF
  7869. }
  7870. iNdEx += skippy
  7871. }
  7872. }
  7873. if iNdEx > l {
  7874. return io.ErrUnexpectedEOF
  7875. }
  7876. return nil
  7877. }
  7878. func (m *RequestBeginBlock) Unmarshal(dAtA []byte) error {
  7879. l := len(dAtA)
  7880. iNdEx := 0
  7881. for iNdEx < l {
  7882. preIndex := iNdEx
  7883. var wire uint64
  7884. for shift := uint(0); ; shift += 7 {
  7885. if shift >= 64 {
  7886. return ErrIntOverflowTypes
  7887. }
  7888. if iNdEx >= l {
  7889. return io.ErrUnexpectedEOF
  7890. }
  7891. b := dAtA[iNdEx]
  7892. iNdEx++
  7893. wire |= uint64(b&0x7F) << shift
  7894. if b < 0x80 {
  7895. break
  7896. }
  7897. }
  7898. fieldNum := int32(wire >> 3)
  7899. wireType := int(wire & 0x7)
  7900. if wireType == 4 {
  7901. return fmt.Errorf("proto: RequestBeginBlock: wiretype end group for non-group")
  7902. }
  7903. if fieldNum <= 0 {
  7904. return fmt.Errorf("proto: RequestBeginBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  7905. }
  7906. switch fieldNum {
  7907. case 1:
  7908. if wireType != 2 {
  7909. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  7910. }
  7911. var byteLen int
  7912. for shift := uint(0); ; shift += 7 {
  7913. if shift >= 64 {
  7914. return ErrIntOverflowTypes
  7915. }
  7916. if iNdEx >= l {
  7917. return io.ErrUnexpectedEOF
  7918. }
  7919. b := dAtA[iNdEx]
  7920. iNdEx++
  7921. byteLen |= int(b&0x7F) << shift
  7922. if b < 0x80 {
  7923. break
  7924. }
  7925. }
  7926. if byteLen < 0 {
  7927. return ErrInvalidLengthTypes
  7928. }
  7929. postIndex := iNdEx + byteLen
  7930. if postIndex < 0 {
  7931. return ErrInvalidLengthTypes
  7932. }
  7933. if postIndex > l {
  7934. return io.ErrUnexpectedEOF
  7935. }
  7936. m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  7937. if m.Hash == nil {
  7938. m.Hash = []byte{}
  7939. }
  7940. iNdEx = postIndex
  7941. case 2:
  7942. if wireType != 2 {
  7943. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  7944. }
  7945. var msglen int
  7946. for shift := uint(0); ; shift += 7 {
  7947. if shift >= 64 {
  7948. return ErrIntOverflowTypes
  7949. }
  7950. if iNdEx >= l {
  7951. return io.ErrUnexpectedEOF
  7952. }
  7953. b := dAtA[iNdEx]
  7954. iNdEx++
  7955. msglen |= int(b&0x7F) << shift
  7956. if b < 0x80 {
  7957. break
  7958. }
  7959. }
  7960. if msglen < 0 {
  7961. return ErrInvalidLengthTypes
  7962. }
  7963. postIndex := iNdEx + msglen
  7964. if postIndex < 0 {
  7965. return ErrInvalidLengthTypes
  7966. }
  7967. if postIndex > l {
  7968. return io.ErrUnexpectedEOF
  7969. }
  7970. if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7971. return err
  7972. }
  7973. iNdEx = postIndex
  7974. case 3:
  7975. if wireType != 2 {
  7976. return fmt.Errorf("proto: wrong wireType = %d for field LastCommitInfo", wireType)
  7977. }
  7978. var msglen int
  7979. for shift := uint(0); ; shift += 7 {
  7980. if shift >= 64 {
  7981. return ErrIntOverflowTypes
  7982. }
  7983. if iNdEx >= l {
  7984. return io.ErrUnexpectedEOF
  7985. }
  7986. b := dAtA[iNdEx]
  7987. iNdEx++
  7988. msglen |= int(b&0x7F) << shift
  7989. if b < 0x80 {
  7990. break
  7991. }
  7992. }
  7993. if msglen < 0 {
  7994. return ErrInvalidLengthTypes
  7995. }
  7996. postIndex := iNdEx + msglen
  7997. if postIndex < 0 {
  7998. return ErrInvalidLengthTypes
  7999. }
  8000. if postIndex > l {
  8001. return io.ErrUnexpectedEOF
  8002. }
  8003. if err := m.LastCommitInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8004. return err
  8005. }
  8006. iNdEx = postIndex
  8007. case 4:
  8008. if wireType != 2 {
  8009. return fmt.Errorf("proto: wrong wireType = %d for field ByzantineValidators", wireType)
  8010. }
  8011. var msglen int
  8012. for shift := uint(0); ; shift += 7 {
  8013. if shift >= 64 {
  8014. return ErrIntOverflowTypes
  8015. }
  8016. if iNdEx >= l {
  8017. return io.ErrUnexpectedEOF
  8018. }
  8019. b := dAtA[iNdEx]
  8020. iNdEx++
  8021. msglen |= int(b&0x7F) << shift
  8022. if b < 0x80 {
  8023. break
  8024. }
  8025. }
  8026. if msglen < 0 {
  8027. return ErrInvalidLengthTypes
  8028. }
  8029. postIndex := iNdEx + msglen
  8030. if postIndex < 0 {
  8031. return ErrInvalidLengthTypes
  8032. }
  8033. if postIndex > l {
  8034. return io.ErrUnexpectedEOF
  8035. }
  8036. m.ByzantineValidators = append(m.ByzantineValidators, Evidence{})
  8037. if err := m.ByzantineValidators[len(m.ByzantineValidators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8038. return err
  8039. }
  8040. iNdEx = postIndex
  8041. default:
  8042. iNdEx = preIndex
  8043. skippy, err := skipTypes(dAtA[iNdEx:])
  8044. if err != nil {
  8045. return err
  8046. }
  8047. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8048. return ErrInvalidLengthTypes
  8049. }
  8050. if (iNdEx + skippy) > l {
  8051. return io.ErrUnexpectedEOF
  8052. }
  8053. iNdEx += skippy
  8054. }
  8055. }
  8056. if iNdEx > l {
  8057. return io.ErrUnexpectedEOF
  8058. }
  8059. return nil
  8060. }
  8061. func (m *RequestCheckTx) Unmarshal(dAtA []byte) error {
  8062. l := len(dAtA)
  8063. iNdEx := 0
  8064. for iNdEx < l {
  8065. preIndex := iNdEx
  8066. var wire uint64
  8067. for shift := uint(0); ; shift += 7 {
  8068. if shift >= 64 {
  8069. return ErrIntOverflowTypes
  8070. }
  8071. if iNdEx >= l {
  8072. return io.ErrUnexpectedEOF
  8073. }
  8074. b := dAtA[iNdEx]
  8075. iNdEx++
  8076. wire |= uint64(b&0x7F) << shift
  8077. if b < 0x80 {
  8078. break
  8079. }
  8080. }
  8081. fieldNum := int32(wire >> 3)
  8082. wireType := int(wire & 0x7)
  8083. if wireType == 4 {
  8084. return fmt.Errorf("proto: RequestCheckTx: wiretype end group for non-group")
  8085. }
  8086. if fieldNum <= 0 {
  8087. return fmt.Errorf("proto: RequestCheckTx: illegal tag %d (wire type %d)", fieldNum, wire)
  8088. }
  8089. switch fieldNum {
  8090. case 1:
  8091. if wireType != 2 {
  8092. return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
  8093. }
  8094. var byteLen int
  8095. for shift := uint(0); ; shift += 7 {
  8096. if shift >= 64 {
  8097. return ErrIntOverflowTypes
  8098. }
  8099. if iNdEx >= l {
  8100. return io.ErrUnexpectedEOF
  8101. }
  8102. b := dAtA[iNdEx]
  8103. iNdEx++
  8104. byteLen |= int(b&0x7F) << shift
  8105. if b < 0x80 {
  8106. break
  8107. }
  8108. }
  8109. if byteLen < 0 {
  8110. return ErrInvalidLengthTypes
  8111. }
  8112. postIndex := iNdEx + byteLen
  8113. if postIndex < 0 {
  8114. return ErrInvalidLengthTypes
  8115. }
  8116. if postIndex > l {
  8117. return io.ErrUnexpectedEOF
  8118. }
  8119. m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...)
  8120. if m.Tx == nil {
  8121. m.Tx = []byte{}
  8122. }
  8123. iNdEx = postIndex
  8124. case 2:
  8125. if wireType != 0 {
  8126. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  8127. }
  8128. m.Type = 0
  8129. for shift := uint(0); ; shift += 7 {
  8130. if shift >= 64 {
  8131. return ErrIntOverflowTypes
  8132. }
  8133. if iNdEx >= l {
  8134. return io.ErrUnexpectedEOF
  8135. }
  8136. b := dAtA[iNdEx]
  8137. iNdEx++
  8138. m.Type |= CheckTxType(b&0x7F) << shift
  8139. if b < 0x80 {
  8140. break
  8141. }
  8142. }
  8143. default:
  8144. iNdEx = preIndex
  8145. skippy, err := skipTypes(dAtA[iNdEx:])
  8146. if err != nil {
  8147. return err
  8148. }
  8149. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8150. return ErrInvalidLengthTypes
  8151. }
  8152. if (iNdEx + skippy) > l {
  8153. return io.ErrUnexpectedEOF
  8154. }
  8155. iNdEx += skippy
  8156. }
  8157. }
  8158. if iNdEx > l {
  8159. return io.ErrUnexpectedEOF
  8160. }
  8161. return nil
  8162. }
  8163. func (m *RequestDeliverTx) Unmarshal(dAtA []byte) error {
  8164. l := len(dAtA)
  8165. iNdEx := 0
  8166. for iNdEx < l {
  8167. preIndex := iNdEx
  8168. var wire uint64
  8169. for shift := uint(0); ; shift += 7 {
  8170. if shift >= 64 {
  8171. return ErrIntOverflowTypes
  8172. }
  8173. if iNdEx >= l {
  8174. return io.ErrUnexpectedEOF
  8175. }
  8176. b := dAtA[iNdEx]
  8177. iNdEx++
  8178. wire |= uint64(b&0x7F) << shift
  8179. if b < 0x80 {
  8180. break
  8181. }
  8182. }
  8183. fieldNum := int32(wire >> 3)
  8184. wireType := int(wire & 0x7)
  8185. if wireType == 4 {
  8186. return fmt.Errorf("proto: RequestDeliverTx: wiretype end group for non-group")
  8187. }
  8188. if fieldNum <= 0 {
  8189. return fmt.Errorf("proto: RequestDeliverTx: illegal tag %d (wire type %d)", fieldNum, wire)
  8190. }
  8191. switch fieldNum {
  8192. case 1:
  8193. if wireType != 2 {
  8194. return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
  8195. }
  8196. var byteLen int
  8197. for shift := uint(0); ; shift += 7 {
  8198. if shift >= 64 {
  8199. return ErrIntOverflowTypes
  8200. }
  8201. if iNdEx >= l {
  8202. return io.ErrUnexpectedEOF
  8203. }
  8204. b := dAtA[iNdEx]
  8205. iNdEx++
  8206. byteLen |= int(b&0x7F) << shift
  8207. if b < 0x80 {
  8208. break
  8209. }
  8210. }
  8211. if byteLen < 0 {
  8212. return ErrInvalidLengthTypes
  8213. }
  8214. postIndex := iNdEx + byteLen
  8215. if postIndex < 0 {
  8216. return ErrInvalidLengthTypes
  8217. }
  8218. if postIndex > l {
  8219. return io.ErrUnexpectedEOF
  8220. }
  8221. m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...)
  8222. if m.Tx == nil {
  8223. m.Tx = []byte{}
  8224. }
  8225. iNdEx = postIndex
  8226. default:
  8227. iNdEx = preIndex
  8228. skippy, err := skipTypes(dAtA[iNdEx:])
  8229. if err != nil {
  8230. return err
  8231. }
  8232. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8233. return ErrInvalidLengthTypes
  8234. }
  8235. if (iNdEx + skippy) > l {
  8236. return io.ErrUnexpectedEOF
  8237. }
  8238. iNdEx += skippy
  8239. }
  8240. }
  8241. if iNdEx > l {
  8242. return io.ErrUnexpectedEOF
  8243. }
  8244. return nil
  8245. }
  8246. func (m *RequestEndBlock) Unmarshal(dAtA []byte) error {
  8247. l := len(dAtA)
  8248. iNdEx := 0
  8249. for iNdEx < l {
  8250. preIndex := iNdEx
  8251. var wire uint64
  8252. for shift := uint(0); ; shift += 7 {
  8253. if shift >= 64 {
  8254. return ErrIntOverflowTypes
  8255. }
  8256. if iNdEx >= l {
  8257. return io.ErrUnexpectedEOF
  8258. }
  8259. b := dAtA[iNdEx]
  8260. iNdEx++
  8261. wire |= uint64(b&0x7F) << shift
  8262. if b < 0x80 {
  8263. break
  8264. }
  8265. }
  8266. fieldNum := int32(wire >> 3)
  8267. wireType := int(wire & 0x7)
  8268. if wireType == 4 {
  8269. return fmt.Errorf("proto: RequestEndBlock: wiretype end group for non-group")
  8270. }
  8271. if fieldNum <= 0 {
  8272. return fmt.Errorf("proto: RequestEndBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  8273. }
  8274. switch fieldNum {
  8275. case 1:
  8276. if wireType != 0 {
  8277. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  8278. }
  8279. m.Height = 0
  8280. for shift := uint(0); ; shift += 7 {
  8281. if shift >= 64 {
  8282. return ErrIntOverflowTypes
  8283. }
  8284. if iNdEx >= l {
  8285. return io.ErrUnexpectedEOF
  8286. }
  8287. b := dAtA[iNdEx]
  8288. iNdEx++
  8289. m.Height |= int64(b&0x7F) << shift
  8290. if b < 0x80 {
  8291. break
  8292. }
  8293. }
  8294. default:
  8295. iNdEx = preIndex
  8296. skippy, err := skipTypes(dAtA[iNdEx:])
  8297. if err != nil {
  8298. return err
  8299. }
  8300. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8301. return ErrInvalidLengthTypes
  8302. }
  8303. if (iNdEx + skippy) > l {
  8304. return io.ErrUnexpectedEOF
  8305. }
  8306. iNdEx += skippy
  8307. }
  8308. }
  8309. if iNdEx > l {
  8310. return io.ErrUnexpectedEOF
  8311. }
  8312. return nil
  8313. }
  8314. func (m *RequestCommit) Unmarshal(dAtA []byte) error {
  8315. l := len(dAtA)
  8316. iNdEx := 0
  8317. for iNdEx < l {
  8318. preIndex := iNdEx
  8319. var wire uint64
  8320. for shift := uint(0); ; shift += 7 {
  8321. if shift >= 64 {
  8322. return ErrIntOverflowTypes
  8323. }
  8324. if iNdEx >= l {
  8325. return io.ErrUnexpectedEOF
  8326. }
  8327. b := dAtA[iNdEx]
  8328. iNdEx++
  8329. wire |= uint64(b&0x7F) << shift
  8330. if b < 0x80 {
  8331. break
  8332. }
  8333. }
  8334. fieldNum := int32(wire >> 3)
  8335. wireType := int(wire & 0x7)
  8336. if wireType == 4 {
  8337. return fmt.Errorf("proto: RequestCommit: wiretype end group for non-group")
  8338. }
  8339. if fieldNum <= 0 {
  8340. return fmt.Errorf("proto: RequestCommit: illegal tag %d (wire type %d)", fieldNum, wire)
  8341. }
  8342. switch fieldNum {
  8343. default:
  8344. iNdEx = preIndex
  8345. skippy, err := skipTypes(dAtA[iNdEx:])
  8346. if err != nil {
  8347. return err
  8348. }
  8349. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8350. return ErrInvalidLengthTypes
  8351. }
  8352. if (iNdEx + skippy) > l {
  8353. return io.ErrUnexpectedEOF
  8354. }
  8355. iNdEx += skippy
  8356. }
  8357. }
  8358. if iNdEx > l {
  8359. return io.ErrUnexpectedEOF
  8360. }
  8361. return nil
  8362. }
  8363. func (m *RequestListSnapshots) Unmarshal(dAtA []byte) error {
  8364. l := len(dAtA)
  8365. iNdEx := 0
  8366. for iNdEx < l {
  8367. preIndex := iNdEx
  8368. var wire uint64
  8369. for shift := uint(0); ; shift += 7 {
  8370. if shift >= 64 {
  8371. return ErrIntOverflowTypes
  8372. }
  8373. if iNdEx >= l {
  8374. return io.ErrUnexpectedEOF
  8375. }
  8376. b := dAtA[iNdEx]
  8377. iNdEx++
  8378. wire |= uint64(b&0x7F) << shift
  8379. if b < 0x80 {
  8380. break
  8381. }
  8382. }
  8383. fieldNum := int32(wire >> 3)
  8384. wireType := int(wire & 0x7)
  8385. if wireType == 4 {
  8386. return fmt.Errorf("proto: RequestListSnapshots: wiretype end group for non-group")
  8387. }
  8388. if fieldNum <= 0 {
  8389. return fmt.Errorf("proto: RequestListSnapshots: illegal tag %d (wire type %d)", fieldNum, wire)
  8390. }
  8391. switch fieldNum {
  8392. default:
  8393. iNdEx = preIndex
  8394. skippy, err := skipTypes(dAtA[iNdEx:])
  8395. if err != nil {
  8396. return err
  8397. }
  8398. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8399. return ErrInvalidLengthTypes
  8400. }
  8401. if (iNdEx + skippy) > l {
  8402. return io.ErrUnexpectedEOF
  8403. }
  8404. iNdEx += skippy
  8405. }
  8406. }
  8407. if iNdEx > l {
  8408. return io.ErrUnexpectedEOF
  8409. }
  8410. return nil
  8411. }
  8412. func (m *RequestOfferSnapshot) Unmarshal(dAtA []byte) error {
  8413. l := len(dAtA)
  8414. iNdEx := 0
  8415. for iNdEx < l {
  8416. preIndex := iNdEx
  8417. var wire uint64
  8418. for shift := uint(0); ; shift += 7 {
  8419. if shift >= 64 {
  8420. return ErrIntOverflowTypes
  8421. }
  8422. if iNdEx >= l {
  8423. return io.ErrUnexpectedEOF
  8424. }
  8425. b := dAtA[iNdEx]
  8426. iNdEx++
  8427. wire |= uint64(b&0x7F) << shift
  8428. if b < 0x80 {
  8429. break
  8430. }
  8431. }
  8432. fieldNum := int32(wire >> 3)
  8433. wireType := int(wire & 0x7)
  8434. if wireType == 4 {
  8435. return fmt.Errorf("proto: RequestOfferSnapshot: wiretype end group for non-group")
  8436. }
  8437. if fieldNum <= 0 {
  8438. return fmt.Errorf("proto: RequestOfferSnapshot: illegal tag %d (wire type %d)", fieldNum, wire)
  8439. }
  8440. switch fieldNum {
  8441. case 1:
  8442. if wireType != 2 {
  8443. return fmt.Errorf("proto: wrong wireType = %d for field Snapshot", wireType)
  8444. }
  8445. var msglen int
  8446. for shift := uint(0); ; shift += 7 {
  8447. if shift >= 64 {
  8448. return ErrIntOverflowTypes
  8449. }
  8450. if iNdEx >= l {
  8451. return io.ErrUnexpectedEOF
  8452. }
  8453. b := dAtA[iNdEx]
  8454. iNdEx++
  8455. msglen |= int(b&0x7F) << shift
  8456. if b < 0x80 {
  8457. break
  8458. }
  8459. }
  8460. if msglen < 0 {
  8461. return ErrInvalidLengthTypes
  8462. }
  8463. postIndex := iNdEx + msglen
  8464. if postIndex < 0 {
  8465. return ErrInvalidLengthTypes
  8466. }
  8467. if postIndex > l {
  8468. return io.ErrUnexpectedEOF
  8469. }
  8470. if m.Snapshot == nil {
  8471. m.Snapshot = &Snapshot{}
  8472. }
  8473. if err := m.Snapshot.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8474. return err
  8475. }
  8476. iNdEx = postIndex
  8477. case 2:
  8478. if wireType != 2 {
  8479. return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType)
  8480. }
  8481. var byteLen int
  8482. for shift := uint(0); ; shift += 7 {
  8483. if shift >= 64 {
  8484. return ErrIntOverflowTypes
  8485. }
  8486. if iNdEx >= l {
  8487. return io.ErrUnexpectedEOF
  8488. }
  8489. b := dAtA[iNdEx]
  8490. iNdEx++
  8491. byteLen |= int(b&0x7F) << shift
  8492. if b < 0x80 {
  8493. break
  8494. }
  8495. }
  8496. if byteLen < 0 {
  8497. return ErrInvalidLengthTypes
  8498. }
  8499. postIndex := iNdEx + byteLen
  8500. if postIndex < 0 {
  8501. return ErrInvalidLengthTypes
  8502. }
  8503. if postIndex > l {
  8504. return io.ErrUnexpectedEOF
  8505. }
  8506. m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...)
  8507. if m.AppHash == nil {
  8508. m.AppHash = []byte{}
  8509. }
  8510. iNdEx = postIndex
  8511. default:
  8512. iNdEx = preIndex
  8513. skippy, err := skipTypes(dAtA[iNdEx:])
  8514. if err != nil {
  8515. return err
  8516. }
  8517. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8518. return ErrInvalidLengthTypes
  8519. }
  8520. if (iNdEx + skippy) > l {
  8521. return io.ErrUnexpectedEOF
  8522. }
  8523. iNdEx += skippy
  8524. }
  8525. }
  8526. if iNdEx > l {
  8527. return io.ErrUnexpectedEOF
  8528. }
  8529. return nil
  8530. }
  8531. func (m *RequestLoadSnapshotChunk) Unmarshal(dAtA []byte) error {
  8532. l := len(dAtA)
  8533. iNdEx := 0
  8534. for iNdEx < l {
  8535. preIndex := iNdEx
  8536. var wire uint64
  8537. for shift := uint(0); ; shift += 7 {
  8538. if shift >= 64 {
  8539. return ErrIntOverflowTypes
  8540. }
  8541. if iNdEx >= l {
  8542. return io.ErrUnexpectedEOF
  8543. }
  8544. b := dAtA[iNdEx]
  8545. iNdEx++
  8546. wire |= uint64(b&0x7F) << shift
  8547. if b < 0x80 {
  8548. break
  8549. }
  8550. }
  8551. fieldNum := int32(wire >> 3)
  8552. wireType := int(wire & 0x7)
  8553. if wireType == 4 {
  8554. return fmt.Errorf("proto: RequestLoadSnapshotChunk: wiretype end group for non-group")
  8555. }
  8556. if fieldNum <= 0 {
  8557. return fmt.Errorf("proto: RequestLoadSnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  8558. }
  8559. switch fieldNum {
  8560. case 1:
  8561. if wireType != 0 {
  8562. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  8563. }
  8564. m.Height = 0
  8565. for shift := uint(0); ; shift += 7 {
  8566. if shift >= 64 {
  8567. return ErrIntOverflowTypes
  8568. }
  8569. if iNdEx >= l {
  8570. return io.ErrUnexpectedEOF
  8571. }
  8572. b := dAtA[iNdEx]
  8573. iNdEx++
  8574. m.Height |= uint64(b&0x7F) << shift
  8575. if b < 0x80 {
  8576. break
  8577. }
  8578. }
  8579. case 2:
  8580. if wireType != 0 {
  8581. return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType)
  8582. }
  8583. m.Format = 0
  8584. for shift := uint(0); ; shift += 7 {
  8585. if shift >= 64 {
  8586. return ErrIntOverflowTypes
  8587. }
  8588. if iNdEx >= l {
  8589. return io.ErrUnexpectedEOF
  8590. }
  8591. b := dAtA[iNdEx]
  8592. iNdEx++
  8593. m.Format |= uint32(b&0x7F) << shift
  8594. if b < 0x80 {
  8595. break
  8596. }
  8597. }
  8598. case 3:
  8599. if wireType != 0 {
  8600. return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType)
  8601. }
  8602. m.Chunk = 0
  8603. for shift := uint(0); ; shift += 7 {
  8604. if shift >= 64 {
  8605. return ErrIntOverflowTypes
  8606. }
  8607. if iNdEx >= l {
  8608. return io.ErrUnexpectedEOF
  8609. }
  8610. b := dAtA[iNdEx]
  8611. iNdEx++
  8612. m.Chunk |= uint32(b&0x7F) << shift
  8613. if b < 0x80 {
  8614. break
  8615. }
  8616. }
  8617. default:
  8618. iNdEx = preIndex
  8619. skippy, err := skipTypes(dAtA[iNdEx:])
  8620. if err != nil {
  8621. return err
  8622. }
  8623. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8624. return ErrInvalidLengthTypes
  8625. }
  8626. if (iNdEx + skippy) > l {
  8627. return io.ErrUnexpectedEOF
  8628. }
  8629. iNdEx += skippy
  8630. }
  8631. }
  8632. if iNdEx > l {
  8633. return io.ErrUnexpectedEOF
  8634. }
  8635. return nil
  8636. }
  8637. func (m *RequestApplySnapshotChunk) Unmarshal(dAtA []byte) error {
  8638. l := len(dAtA)
  8639. iNdEx := 0
  8640. for iNdEx < l {
  8641. preIndex := iNdEx
  8642. var wire uint64
  8643. for shift := uint(0); ; shift += 7 {
  8644. if shift >= 64 {
  8645. return ErrIntOverflowTypes
  8646. }
  8647. if iNdEx >= l {
  8648. return io.ErrUnexpectedEOF
  8649. }
  8650. b := dAtA[iNdEx]
  8651. iNdEx++
  8652. wire |= uint64(b&0x7F) << shift
  8653. if b < 0x80 {
  8654. break
  8655. }
  8656. }
  8657. fieldNum := int32(wire >> 3)
  8658. wireType := int(wire & 0x7)
  8659. if wireType == 4 {
  8660. return fmt.Errorf("proto: RequestApplySnapshotChunk: wiretype end group for non-group")
  8661. }
  8662. if fieldNum <= 0 {
  8663. return fmt.Errorf("proto: RequestApplySnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  8664. }
  8665. switch fieldNum {
  8666. case 1:
  8667. if wireType != 0 {
  8668. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  8669. }
  8670. m.Index = 0
  8671. for shift := uint(0); ; shift += 7 {
  8672. if shift >= 64 {
  8673. return ErrIntOverflowTypes
  8674. }
  8675. if iNdEx >= l {
  8676. return io.ErrUnexpectedEOF
  8677. }
  8678. b := dAtA[iNdEx]
  8679. iNdEx++
  8680. m.Index |= uint32(b&0x7F) << shift
  8681. if b < 0x80 {
  8682. break
  8683. }
  8684. }
  8685. case 2:
  8686. if wireType != 2 {
  8687. return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType)
  8688. }
  8689. var byteLen int
  8690. for shift := uint(0); ; shift += 7 {
  8691. if shift >= 64 {
  8692. return ErrIntOverflowTypes
  8693. }
  8694. if iNdEx >= l {
  8695. return io.ErrUnexpectedEOF
  8696. }
  8697. b := dAtA[iNdEx]
  8698. iNdEx++
  8699. byteLen |= int(b&0x7F) << shift
  8700. if b < 0x80 {
  8701. break
  8702. }
  8703. }
  8704. if byteLen < 0 {
  8705. return ErrInvalidLengthTypes
  8706. }
  8707. postIndex := iNdEx + byteLen
  8708. if postIndex < 0 {
  8709. return ErrInvalidLengthTypes
  8710. }
  8711. if postIndex > l {
  8712. return io.ErrUnexpectedEOF
  8713. }
  8714. m.Chunk = append(m.Chunk[:0], dAtA[iNdEx:postIndex]...)
  8715. if m.Chunk == nil {
  8716. m.Chunk = []byte{}
  8717. }
  8718. iNdEx = postIndex
  8719. case 3:
  8720. if wireType != 2 {
  8721. return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType)
  8722. }
  8723. var stringLen uint64
  8724. for shift := uint(0); ; shift += 7 {
  8725. if shift >= 64 {
  8726. return ErrIntOverflowTypes
  8727. }
  8728. if iNdEx >= l {
  8729. return io.ErrUnexpectedEOF
  8730. }
  8731. b := dAtA[iNdEx]
  8732. iNdEx++
  8733. stringLen |= uint64(b&0x7F) << shift
  8734. if b < 0x80 {
  8735. break
  8736. }
  8737. }
  8738. intStringLen := int(stringLen)
  8739. if intStringLen < 0 {
  8740. return ErrInvalidLengthTypes
  8741. }
  8742. postIndex := iNdEx + intStringLen
  8743. if postIndex < 0 {
  8744. return ErrInvalidLengthTypes
  8745. }
  8746. if postIndex > l {
  8747. return io.ErrUnexpectedEOF
  8748. }
  8749. m.Sender = string(dAtA[iNdEx:postIndex])
  8750. iNdEx = postIndex
  8751. default:
  8752. iNdEx = preIndex
  8753. skippy, err := skipTypes(dAtA[iNdEx:])
  8754. if err != nil {
  8755. return err
  8756. }
  8757. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8758. return ErrInvalidLengthTypes
  8759. }
  8760. if (iNdEx + skippy) > l {
  8761. return io.ErrUnexpectedEOF
  8762. }
  8763. iNdEx += skippy
  8764. }
  8765. }
  8766. if iNdEx > l {
  8767. return io.ErrUnexpectedEOF
  8768. }
  8769. return nil
  8770. }
  8771. func (m *Response) Unmarshal(dAtA []byte) error {
  8772. l := len(dAtA)
  8773. iNdEx := 0
  8774. for iNdEx < l {
  8775. preIndex := iNdEx
  8776. var wire uint64
  8777. for shift := uint(0); ; shift += 7 {
  8778. if shift >= 64 {
  8779. return ErrIntOverflowTypes
  8780. }
  8781. if iNdEx >= l {
  8782. return io.ErrUnexpectedEOF
  8783. }
  8784. b := dAtA[iNdEx]
  8785. iNdEx++
  8786. wire |= uint64(b&0x7F) << shift
  8787. if b < 0x80 {
  8788. break
  8789. }
  8790. }
  8791. fieldNum := int32(wire >> 3)
  8792. wireType := int(wire & 0x7)
  8793. if wireType == 4 {
  8794. return fmt.Errorf("proto: Response: wiretype end group for non-group")
  8795. }
  8796. if fieldNum <= 0 {
  8797. return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire)
  8798. }
  8799. switch fieldNum {
  8800. case 1:
  8801. if wireType != 2 {
  8802. return fmt.Errorf("proto: wrong wireType = %d for field Exception", wireType)
  8803. }
  8804. var msglen int
  8805. for shift := uint(0); ; shift += 7 {
  8806. if shift >= 64 {
  8807. return ErrIntOverflowTypes
  8808. }
  8809. if iNdEx >= l {
  8810. return io.ErrUnexpectedEOF
  8811. }
  8812. b := dAtA[iNdEx]
  8813. iNdEx++
  8814. msglen |= int(b&0x7F) << shift
  8815. if b < 0x80 {
  8816. break
  8817. }
  8818. }
  8819. if msglen < 0 {
  8820. return ErrInvalidLengthTypes
  8821. }
  8822. postIndex := iNdEx + msglen
  8823. if postIndex < 0 {
  8824. return ErrInvalidLengthTypes
  8825. }
  8826. if postIndex > l {
  8827. return io.ErrUnexpectedEOF
  8828. }
  8829. v := &ResponseException{}
  8830. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8831. return err
  8832. }
  8833. m.Value = &Response_Exception{v}
  8834. iNdEx = postIndex
  8835. case 2:
  8836. if wireType != 2 {
  8837. return fmt.Errorf("proto: wrong wireType = %d for field Echo", wireType)
  8838. }
  8839. var msglen int
  8840. for shift := uint(0); ; shift += 7 {
  8841. if shift >= 64 {
  8842. return ErrIntOverflowTypes
  8843. }
  8844. if iNdEx >= l {
  8845. return io.ErrUnexpectedEOF
  8846. }
  8847. b := dAtA[iNdEx]
  8848. iNdEx++
  8849. msglen |= int(b&0x7F) << shift
  8850. if b < 0x80 {
  8851. break
  8852. }
  8853. }
  8854. if msglen < 0 {
  8855. return ErrInvalidLengthTypes
  8856. }
  8857. postIndex := iNdEx + msglen
  8858. if postIndex < 0 {
  8859. return ErrInvalidLengthTypes
  8860. }
  8861. if postIndex > l {
  8862. return io.ErrUnexpectedEOF
  8863. }
  8864. v := &ResponseEcho{}
  8865. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8866. return err
  8867. }
  8868. m.Value = &Response_Echo{v}
  8869. iNdEx = postIndex
  8870. case 3:
  8871. if wireType != 2 {
  8872. return fmt.Errorf("proto: wrong wireType = %d for field Flush", wireType)
  8873. }
  8874. var msglen int
  8875. for shift := uint(0); ; shift += 7 {
  8876. if shift >= 64 {
  8877. return ErrIntOverflowTypes
  8878. }
  8879. if iNdEx >= l {
  8880. return io.ErrUnexpectedEOF
  8881. }
  8882. b := dAtA[iNdEx]
  8883. iNdEx++
  8884. msglen |= int(b&0x7F) << shift
  8885. if b < 0x80 {
  8886. break
  8887. }
  8888. }
  8889. if msglen < 0 {
  8890. return ErrInvalidLengthTypes
  8891. }
  8892. postIndex := iNdEx + msglen
  8893. if postIndex < 0 {
  8894. return ErrInvalidLengthTypes
  8895. }
  8896. if postIndex > l {
  8897. return io.ErrUnexpectedEOF
  8898. }
  8899. v := &ResponseFlush{}
  8900. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8901. return err
  8902. }
  8903. m.Value = &Response_Flush{v}
  8904. iNdEx = postIndex
  8905. case 4:
  8906. if wireType != 2 {
  8907. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  8908. }
  8909. var msglen int
  8910. for shift := uint(0); ; shift += 7 {
  8911. if shift >= 64 {
  8912. return ErrIntOverflowTypes
  8913. }
  8914. if iNdEx >= l {
  8915. return io.ErrUnexpectedEOF
  8916. }
  8917. b := dAtA[iNdEx]
  8918. iNdEx++
  8919. msglen |= int(b&0x7F) << shift
  8920. if b < 0x80 {
  8921. break
  8922. }
  8923. }
  8924. if msglen < 0 {
  8925. return ErrInvalidLengthTypes
  8926. }
  8927. postIndex := iNdEx + msglen
  8928. if postIndex < 0 {
  8929. return ErrInvalidLengthTypes
  8930. }
  8931. if postIndex > l {
  8932. return io.ErrUnexpectedEOF
  8933. }
  8934. v := &ResponseInfo{}
  8935. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8936. return err
  8937. }
  8938. m.Value = &Response_Info{v}
  8939. iNdEx = postIndex
  8940. case 5:
  8941. if wireType != 2 {
  8942. return fmt.Errorf("proto: wrong wireType = %d for field InitChain", wireType)
  8943. }
  8944. var msglen int
  8945. for shift := uint(0); ; shift += 7 {
  8946. if shift >= 64 {
  8947. return ErrIntOverflowTypes
  8948. }
  8949. if iNdEx >= l {
  8950. return io.ErrUnexpectedEOF
  8951. }
  8952. b := dAtA[iNdEx]
  8953. iNdEx++
  8954. msglen |= int(b&0x7F) << shift
  8955. if b < 0x80 {
  8956. break
  8957. }
  8958. }
  8959. if msglen < 0 {
  8960. return ErrInvalidLengthTypes
  8961. }
  8962. postIndex := iNdEx + msglen
  8963. if postIndex < 0 {
  8964. return ErrInvalidLengthTypes
  8965. }
  8966. if postIndex > l {
  8967. return io.ErrUnexpectedEOF
  8968. }
  8969. v := &ResponseInitChain{}
  8970. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8971. return err
  8972. }
  8973. m.Value = &Response_InitChain{v}
  8974. iNdEx = postIndex
  8975. case 6:
  8976. if wireType != 2 {
  8977. return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType)
  8978. }
  8979. var msglen int
  8980. for shift := uint(0); ; shift += 7 {
  8981. if shift >= 64 {
  8982. return ErrIntOverflowTypes
  8983. }
  8984. if iNdEx >= l {
  8985. return io.ErrUnexpectedEOF
  8986. }
  8987. b := dAtA[iNdEx]
  8988. iNdEx++
  8989. msglen |= int(b&0x7F) << shift
  8990. if b < 0x80 {
  8991. break
  8992. }
  8993. }
  8994. if msglen < 0 {
  8995. return ErrInvalidLengthTypes
  8996. }
  8997. postIndex := iNdEx + msglen
  8998. if postIndex < 0 {
  8999. return ErrInvalidLengthTypes
  9000. }
  9001. if postIndex > l {
  9002. return io.ErrUnexpectedEOF
  9003. }
  9004. v := &ResponseQuery{}
  9005. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9006. return err
  9007. }
  9008. m.Value = &Response_Query{v}
  9009. iNdEx = postIndex
  9010. case 7:
  9011. if wireType != 2 {
  9012. return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", wireType)
  9013. }
  9014. var msglen int
  9015. for shift := uint(0); ; shift += 7 {
  9016. if shift >= 64 {
  9017. return ErrIntOverflowTypes
  9018. }
  9019. if iNdEx >= l {
  9020. return io.ErrUnexpectedEOF
  9021. }
  9022. b := dAtA[iNdEx]
  9023. iNdEx++
  9024. msglen |= int(b&0x7F) << shift
  9025. if b < 0x80 {
  9026. break
  9027. }
  9028. }
  9029. if msglen < 0 {
  9030. return ErrInvalidLengthTypes
  9031. }
  9032. postIndex := iNdEx + msglen
  9033. if postIndex < 0 {
  9034. return ErrInvalidLengthTypes
  9035. }
  9036. if postIndex > l {
  9037. return io.ErrUnexpectedEOF
  9038. }
  9039. v := &ResponseBeginBlock{}
  9040. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9041. return err
  9042. }
  9043. m.Value = &Response_BeginBlock{v}
  9044. iNdEx = postIndex
  9045. case 8:
  9046. if wireType != 2 {
  9047. return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType)
  9048. }
  9049. var msglen int
  9050. for shift := uint(0); ; shift += 7 {
  9051. if shift >= 64 {
  9052. return ErrIntOverflowTypes
  9053. }
  9054. if iNdEx >= l {
  9055. return io.ErrUnexpectedEOF
  9056. }
  9057. b := dAtA[iNdEx]
  9058. iNdEx++
  9059. msglen |= int(b&0x7F) << shift
  9060. if b < 0x80 {
  9061. break
  9062. }
  9063. }
  9064. if msglen < 0 {
  9065. return ErrInvalidLengthTypes
  9066. }
  9067. postIndex := iNdEx + msglen
  9068. if postIndex < 0 {
  9069. return ErrInvalidLengthTypes
  9070. }
  9071. if postIndex > l {
  9072. return io.ErrUnexpectedEOF
  9073. }
  9074. v := &ResponseCheckTx{}
  9075. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9076. return err
  9077. }
  9078. m.Value = &Response_CheckTx{v}
  9079. iNdEx = postIndex
  9080. case 9:
  9081. if wireType != 2 {
  9082. return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", wireType)
  9083. }
  9084. var msglen int
  9085. for shift := uint(0); ; shift += 7 {
  9086. if shift >= 64 {
  9087. return ErrIntOverflowTypes
  9088. }
  9089. if iNdEx >= l {
  9090. return io.ErrUnexpectedEOF
  9091. }
  9092. b := dAtA[iNdEx]
  9093. iNdEx++
  9094. msglen |= int(b&0x7F) << shift
  9095. if b < 0x80 {
  9096. break
  9097. }
  9098. }
  9099. if msglen < 0 {
  9100. return ErrInvalidLengthTypes
  9101. }
  9102. postIndex := iNdEx + msglen
  9103. if postIndex < 0 {
  9104. return ErrInvalidLengthTypes
  9105. }
  9106. if postIndex > l {
  9107. return io.ErrUnexpectedEOF
  9108. }
  9109. v := &ResponseDeliverTx{}
  9110. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9111. return err
  9112. }
  9113. m.Value = &Response_DeliverTx{v}
  9114. iNdEx = postIndex
  9115. case 10:
  9116. if wireType != 2 {
  9117. return fmt.Errorf("proto: wrong wireType = %d for field EndBlock", wireType)
  9118. }
  9119. var msglen int
  9120. for shift := uint(0); ; shift += 7 {
  9121. if shift >= 64 {
  9122. return ErrIntOverflowTypes
  9123. }
  9124. if iNdEx >= l {
  9125. return io.ErrUnexpectedEOF
  9126. }
  9127. b := dAtA[iNdEx]
  9128. iNdEx++
  9129. msglen |= int(b&0x7F) << shift
  9130. if b < 0x80 {
  9131. break
  9132. }
  9133. }
  9134. if msglen < 0 {
  9135. return ErrInvalidLengthTypes
  9136. }
  9137. postIndex := iNdEx + msglen
  9138. if postIndex < 0 {
  9139. return ErrInvalidLengthTypes
  9140. }
  9141. if postIndex > l {
  9142. return io.ErrUnexpectedEOF
  9143. }
  9144. v := &ResponseEndBlock{}
  9145. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9146. return err
  9147. }
  9148. m.Value = &Response_EndBlock{v}
  9149. iNdEx = postIndex
  9150. case 11:
  9151. if wireType != 2 {
  9152. return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType)
  9153. }
  9154. var msglen int
  9155. for shift := uint(0); ; shift += 7 {
  9156. if shift >= 64 {
  9157. return ErrIntOverflowTypes
  9158. }
  9159. if iNdEx >= l {
  9160. return io.ErrUnexpectedEOF
  9161. }
  9162. b := dAtA[iNdEx]
  9163. iNdEx++
  9164. msglen |= int(b&0x7F) << shift
  9165. if b < 0x80 {
  9166. break
  9167. }
  9168. }
  9169. if msglen < 0 {
  9170. return ErrInvalidLengthTypes
  9171. }
  9172. postIndex := iNdEx + msglen
  9173. if postIndex < 0 {
  9174. return ErrInvalidLengthTypes
  9175. }
  9176. if postIndex > l {
  9177. return io.ErrUnexpectedEOF
  9178. }
  9179. v := &ResponseCommit{}
  9180. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9181. return err
  9182. }
  9183. m.Value = &Response_Commit{v}
  9184. iNdEx = postIndex
  9185. case 12:
  9186. if wireType != 2 {
  9187. return fmt.Errorf("proto: wrong wireType = %d for field ListSnapshots", wireType)
  9188. }
  9189. var msglen int
  9190. for shift := uint(0); ; shift += 7 {
  9191. if shift >= 64 {
  9192. return ErrIntOverflowTypes
  9193. }
  9194. if iNdEx >= l {
  9195. return io.ErrUnexpectedEOF
  9196. }
  9197. b := dAtA[iNdEx]
  9198. iNdEx++
  9199. msglen |= int(b&0x7F) << shift
  9200. if b < 0x80 {
  9201. break
  9202. }
  9203. }
  9204. if msglen < 0 {
  9205. return ErrInvalidLengthTypes
  9206. }
  9207. postIndex := iNdEx + msglen
  9208. if postIndex < 0 {
  9209. return ErrInvalidLengthTypes
  9210. }
  9211. if postIndex > l {
  9212. return io.ErrUnexpectedEOF
  9213. }
  9214. v := &ResponseListSnapshots{}
  9215. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9216. return err
  9217. }
  9218. m.Value = &Response_ListSnapshots{v}
  9219. iNdEx = postIndex
  9220. case 13:
  9221. if wireType != 2 {
  9222. return fmt.Errorf("proto: wrong wireType = %d for field OfferSnapshot", wireType)
  9223. }
  9224. var msglen int
  9225. for shift := uint(0); ; shift += 7 {
  9226. if shift >= 64 {
  9227. return ErrIntOverflowTypes
  9228. }
  9229. if iNdEx >= l {
  9230. return io.ErrUnexpectedEOF
  9231. }
  9232. b := dAtA[iNdEx]
  9233. iNdEx++
  9234. msglen |= int(b&0x7F) << shift
  9235. if b < 0x80 {
  9236. break
  9237. }
  9238. }
  9239. if msglen < 0 {
  9240. return ErrInvalidLengthTypes
  9241. }
  9242. postIndex := iNdEx + msglen
  9243. if postIndex < 0 {
  9244. return ErrInvalidLengthTypes
  9245. }
  9246. if postIndex > l {
  9247. return io.ErrUnexpectedEOF
  9248. }
  9249. v := &ResponseOfferSnapshot{}
  9250. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9251. return err
  9252. }
  9253. m.Value = &Response_OfferSnapshot{v}
  9254. iNdEx = postIndex
  9255. case 14:
  9256. if wireType != 2 {
  9257. return fmt.Errorf("proto: wrong wireType = %d for field LoadSnapshotChunk", wireType)
  9258. }
  9259. var msglen int
  9260. for shift := uint(0); ; shift += 7 {
  9261. if shift >= 64 {
  9262. return ErrIntOverflowTypes
  9263. }
  9264. if iNdEx >= l {
  9265. return io.ErrUnexpectedEOF
  9266. }
  9267. b := dAtA[iNdEx]
  9268. iNdEx++
  9269. msglen |= int(b&0x7F) << shift
  9270. if b < 0x80 {
  9271. break
  9272. }
  9273. }
  9274. if msglen < 0 {
  9275. return ErrInvalidLengthTypes
  9276. }
  9277. postIndex := iNdEx + msglen
  9278. if postIndex < 0 {
  9279. return ErrInvalidLengthTypes
  9280. }
  9281. if postIndex > l {
  9282. return io.ErrUnexpectedEOF
  9283. }
  9284. v := &ResponseLoadSnapshotChunk{}
  9285. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9286. return err
  9287. }
  9288. m.Value = &Response_LoadSnapshotChunk{v}
  9289. iNdEx = postIndex
  9290. case 15:
  9291. if wireType != 2 {
  9292. return fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", wireType)
  9293. }
  9294. var msglen int
  9295. for shift := uint(0); ; shift += 7 {
  9296. if shift >= 64 {
  9297. return ErrIntOverflowTypes
  9298. }
  9299. if iNdEx >= l {
  9300. return io.ErrUnexpectedEOF
  9301. }
  9302. b := dAtA[iNdEx]
  9303. iNdEx++
  9304. msglen |= int(b&0x7F) << shift
  9305. if b < 0x80 {
  9306. break
  9307. }
  9308. }
  9309. if msglen < 0 {
  9310. return ErrInvalidLengthTypes
  9311. }
  9312. postIndex := iNdEx + msglen
  9313. if postIndex < 0 {
  9314. return ErrInvalidLengthTypes
  9315. }
  9316. if postIndex > l {
  9317. return io.ErrUnexpectedEOF
  9318. }
  9319. v := &ResponseApplySnapshotChunk{}
  9320. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9321. return err
  9322. }
  9323. m.Value = &Response_ApplySnapshotChunk{v}
  9324. iNdEx = postIndex
  9325. default:
  9326. iNdEx = preIndex
  9327. skippy, err := skipTypes(dAtA[iNdEx:])
  9328. if err != nil {
  9329. return err
  9330. }
  9331. if (skippy < 0) || (iNdEx+skippy) < 0 {
  9332. return ErrInvalidLengthTypes
  9333. }
  9334. if (iNdEx + skippy) > l {
  9335. return io.ErrUnexpectedEOF
  9336. }
  9337. iNdEx += skippy
  9338. }
  9339. }
  9340. if iNdEx > l {
  9341. return io.ErrUnexpectedEOF
  9342. }
  9343. return nil
  9344. }
  9345. func (m *ResponseException) Unmarshal(dAtA []byte) error {
  9346. l := len(dAtA)
  9347. iNdEx := 0
  9348. for iNdEx < l {
  9349. preIndex := iNdEx
  9350. var wire uint64
  9351. for shift := uint(0); ; shift += 7 {
  9352. if shift >= 64 {
  9353. return ErrIntOverflowTypes
  9354. }
  9355. if iNdEx >= l {
  9356. return io.ErrUnexpectedEOF
  9357. }
  9358. b := dAtA[iNdEx]
  9359. iNdEx++
  9360. wire |= uint64(b&0x7F) << shift
  9361. if b < 0x80 {
  9362. break
  9363. }
  9364. }
  9365. fieldNum := int32(wire >> 3)
  9366. wireType := int(wire & 0x7)
  9367. if wireType == 4 {
  9368. return fmt.Errorf("proto: ResponseException: wiretype end group for non-group")
  9369. }
  9370. if fieldNum <= 0 {
  9371. return fmt.Errorf("proto: ResponseException: illegal tag %d (wire type %d)", fieldNum, wire)
  9372. }
  9373. switch fieldNum {
  9374. case 1:
  9375. if wireType != 2 {
  9376. return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
  9377. }
  9378. var stringLen uint64
  9379. for shift := uint(0); ; shift += 7 {
  9380. if shift >= 64 {
  9381. return ErrIntOverflowTypes
  9382. }
  9383. if iNdEx >= l {
  9384. return io.ErrUnexpectedEOF
  9385. }
  9386. b := dAtA[iNdEx]
  9387. iNdEx++
  9388. stringLen |= uint64(b&0x7F) << shift
  9389. if b < 0x80 {
  9390. break
  9391. }
  9392. }
  9393. intStringLen := int(stringLen)
  9394. if intStringLen < 0 {
  9395. return ErrInvalidLengthTypes
  9396. }
  9397. postIndex := iNdEx + intStringLen
  9398. if postIndex < 0 {
  9399. return ErrInvalidLengthTypes
  9400. }
  9401. if postIndex > l {
  9402. return io.ErrUnexpectedEOF
  9403. }
  9404. m.Error = string(dAtA[iNdEx:postIndex])
  9405. iNdEx = postIndex
  9406. default:
  9407. iNdEx = preIndex
  9408. skippy, err := skipTypes(dAtA[iNdEx:])
  9409. if err != nil {
  9410. return err
  9411. }
  9412. if (skippy < 0) || (iNdEx+skippy) < 0 {
  9413. return ErrInvalidLengthTypes
  9414. }
  9415. if (iNdEx + skippy) > l {
  9416. return io.ErrUnexpectedEOF
  9417. }
  9418. iNdEx += skippy
  9419. }
  9420. }
  9421. if iNdEx > l {
  9422. return io.ErrUnexpectedEOF
  9423. }
  9424. return nil
  9425. }
  9426. func (m *ResponseEcho) Unmarshal(dAtA []byte) error {
  9427. l := len(dAtA)
  9428. iNdEx := 0
  9429. for iNdEx < l {
  9430. preIndex := iNdEx
  9431. var wire uint64
  9432. for shift := uint(0); ; shift += 7 {
  9433. if shift >= 64 {
  9434. return ErrIntOverflowTypes
  9435. }
  9436. if iNdEx >= l {
  9437. return io.ErrUnexpectedEOF
  9438. }
  9439. b := dAtA[iNdEx]
  9440. iNdEx++
  9441. wire |= uint64(b&0x7F) << shift
  9442. if b < 0x80 {
  9443. break
  9444. }
  9445. }
  9446. fieldNum := int32(wire >> 3)
  9447. wireType := int(wire & 0x7)
  9448. if wireType == 4 {
  9449. return fmt.Errorf("proto: ResponseEcho: wiretype end group for non-group")
  9450. }
  9451. if fieldNum <= 0 {
  9452. return fmt.Errorf("proto: ResponseEcho: illegal tag %d (wire type %d)", fieldNum, wire)
  9453. }
  9454. switch fieldNum {
  9455. case 1:
  9456. if wireType != 2 {
  9457. return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
  9458. }
  9459. var stringLen uint64
  9460. for shift := uint(0); ; shift += 7 {
  9461. if shift >= 64 {
  9462. return ErrIntOverflowTypes
  9463. }
  9464. if iNdEx >= l {
  9465. return io.ErrUnexpectedEOF
  9466. }
  9467. b := dAtA[iNdEx]
  9468. iNdEx++
  9469. stringLen |= uint64(b&0x7F) << shift
  9470. if b < 0x80 {
  9471. break
  9472. }
  9473. }
  9474. intStringLen := int(stringLen)
  9475. if intStringLen < 0 {
  9476. return ErrInvalidLengthTypes
  9477. }
  9478. postIndex := iNdEx + intStringLen
  9479. if postIndex < 0 {
  9480. return ErrInvalidLengthTypes
  9481. }
  9482. if postIndex > l {
  9483. return io.ErrUnexpectedEOF
  9484. }
  9485. m.Message = string(dAtA[iNdEx:postIndex])
  9486. iNdEx = postIndex
  9487. default:
  9488. iNdEx = preIndex
  9489. skippy, err := skipTypes(dAtA[iNdEx:])
  9490. if err != nil {
  9491. return err
  9492. }
  9493. if (skippy < 0) || (iNdEx+skippy) < 0 {
  9494. return ErrInvalidLengthTypes
  9495. }
  9496. if (iNdEx + skippy) > l {
  9497. return io.ErrUnexpectedEOF
  9498. }
  9499. iNdEx += skippy
  9500. }
  9501. }
  9502. if iNdEx > l {
  9503. return io.ErrUnexpectedEOF
  9504. }
  9505. return nil
  9506. }
  9507. func (m *ResponseFlush) Unmarshal(dAtA []byte) error {
  9508. l := len(dAtA)
  9509. iNdEx := 0
  9510. for iNdEx < l {
  9511. preIndex := iNdEx
  9512. var wire uint64
  9513. for shift := uint(0); ; shift += 7 {
  9514. if shift >= 64 {
  9515. return ErrIntOverflowTypes
  9516. }
  9517. if iNdEx >= l {
  9518. return io.ErrUnexpectedEOF
  9519. }
  9520. b := dAtA[iNdEx]
  9521. iNdEx++
  9522. wire |= uint64(b&0x7F) << shift
  9523. if b < 0x80 {
  9524. break
  9525. }
  9526. }
  9527. fieldNum := int32(wire >> 3)
  9528. wireType := int(wire & 0x7)
  9529. if wireType == 4 {
  9530. return fmt.Errorf("proto: ResponseFlush: wiretype end group for non-group")
  9531. }
  9532. if fieldNum <= 0 {
  9533. return fmt.Errorf("proto: ResponseFlush: illegal tag %d (wire type %d)", fieldNum, wire)
  9534. }
  9535. switch fieldNum {
  9536. default:
  9537. iNdEx = preIndex
  9538. skippy, err := skipTypes(dAtA[iNdEx:])
  9539. if err != nil {
  9540. return err
  9541. }
  9542. if (skippy < 0) || (iNdEx+skippy) < 0 {
  9543. return ErrInvalidLengthTypes
  9544. }
  9545. if (iNdEx + skippy) > l {
  9546. return io.ErrUnexpectedEOF
  9547. }
  9548. iNdEx += skippy
  9549. }
  9550. }
  9551. if iNdEx > l {
  9552. return io.ErrUnexpectedEOF
  9553. }
  9554. return nil
  9555. }
  9556. func (m *ResponseInfo) Unmarshal(dAtA []byte) error {
  9557. l := len(dAtA)
  9558. iNdEx := 0
  9559. for iNdEx < l {
  9560. preIndex := iNdEx
  9561. var wire uint64
  9562. for shift := uint(0); ; shift += 7 {
  9563. if shift >= 64 {
  9564. return ErrIntOverflowTypes
  9565. }
  9566. if iNdEx >= l {
  9567. return io.ErrUnexpectedEOF
  9568. }
  9569. b := dAtA[iNdEx]
  9570. iNdEx++
  9571. wire |= uint64(b&0x7F) << shift
  9572. if b < 0x80 {
  9573. break
  9574. }
  9575. }
  9576. fieldNum := int32(wire >> 3)
  9577. wireType := int(wire & 0x7)
  9578. if wireType == 4 {
  9579. return fmt.Errorf("proto: ResponseInfo: wiretype end group for non-group")
  9580. }
  9581. if fieldNum <= 0 {
  9582. return fmt.Errorf("proto: ResponseInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  9583. }
  9584. switch fieldNum {
  9585. case 1:
  9586. if wireType != 2 {
  9587. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  9588. }
  9589. var stringLen uint64
  9590. for shift := uint(0); ; shift += 7 {
  9591. if shift >= 64 {
  9592. return ErrIntOverflowTypes
  9593. }
  9594. if iNdEx >= l {
  9595. return io.ErrUnexpectedEOF
  9596. }
  9597. b := dAtA[iNdEx]
  9598. iNdEx++
  9599. stringLen |= uint64(b&0x7F) << shift
  9600. if b < 0x80 {
  9601. break
  9602. }
  9603. }
  9604. intStringLen := int(stringLen)
  9605. if intStringLen < 0 {
  9606. return ErrInvalidLengthTypes
  9607. }
  9608. postIndex := iNdEx + intStringLen
  9609. if postIndex < 0 {
  9610. return ErrInvalidLengthTypes
  9611. }
  9612. if postIndex > l {
  9613. return io.ErrUnexpectedEOF
  9614. }
  9615. m.Data = string(dAtA[iNdEx:postIndex])
  9616. iNdEx = postIndex
  9617. case 2:
  9618. if wireType != 2 {
  9619. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  9620. }
  9621. var stringLen uint64
  9622. for shift := uint(0); ; shift += 7 {
  9623. if shift >= 64 {
  9624. return ErrIntOverflowTypes
  9625. }
  9626. if iNdEx >= l {
  9627. return io.ErrUnexpectedEOF
  9628. }
  9629. b := dAtA[iNdEx]
  9630. iNdEx++
  9631. stringLen |= uint64(b&0x7F) << shift
  9632. if b < 0x80 {
  9633. break
  9634. }
  9635. }
  9636. intStringLen := int(stringLen)
  9637. if intStringLen < 0 {
  9638. return ErrInvalidLengthTypes
  9639. }
  9640. postIndex := iNdEx + intStringLen
  9641. if postIndex < 0 {
  9642. return ErrInvalidLengthTypes
  9643. }
  9644. if postIndex > l {
  9645. return io.ErrUnexpectedEOF
  9646. }
  9647. m.Version = string(dAtA[iNdEx:postIndex])
  9648. iNdEx = postIndex
  9649. case 3:
  9650. if wireType != 0 {
  9651. return fmt.Errorf("proto: wrong wireType = %d for field AppVersion", wireType)
  9652. }
  9653. m.AppVersion = 0
  9654. for shift := uint(0); ; shift += 7 {
  9655. if shift >= 64 {
  9656. return ErrIntOverflowTypes
  9657. }
  9658. if iNdEx >= l {
  9659. return io.ErrUnexpectedEOF
  9660. }
  9661. b := dAtA[iNdEx]
  9662. iNdEx++
  9663. m.AppVersion |= uint64(b&0x7F) << shift
  9664. if b < 0x80 {
  9665. break
  9666. }
  9667. }
  9668. case 4:
  9669. if wireType != 0 {
  9670. return fmt.Errorf("proto: wrong wireType = %d for field LastBlockHeight", wireType)
  9671. }
  9672. m.LastBlockHeight = 0
  9673. for shift := uint(0); ; shift += 7 {
  9674. if shift >= 64 {
  9675. return ErrIntOverflowTypes
  9676. }
  9677. if iNdEx >= l {
  9678. return io.ErrUnexpectedEOF
  9679. }
  9680. b := dAtA[iNdEx]
  9681. iNdEx++
  9682. m.LastBlockHeight |= int64(b&0x7F) << shift
  9683. if b < 0x80 {
  9684. break
  9685. }
  9686. }
  9687. case 5:
  9688. if wireType != 2 {
  9689. return fmt.Errorf("proto: wrong wireType = %d for field LastBlockAppHash", wireType)
  9690. }
  9691. var byteLen int
  9692. for shift := uint(0); ; shift += 7 {
  9693. if shift >= 64 {
  9694. return ErrIntOverflowTypes
  9695. }
  9696. if iNdEx >= l {
  9697. return io.ErrUnexpectedEOF
  9698. }
  9699. b := dAtA[iNdEx]
  9700. iNdEx++
  9701. byteLen |= int(b&0x7F) << shift
  9702. if b < 0x80 {
  9703. break
  9704. }
  9705. }
  9706. if byteLen < 0 {
  9707. return ErrInvalidLengthTypes
  9708. }
  9709. postIndex := iNdEx + byteLen
  9710. if postIndex < 0 {
  9711. return ErrInvalidLengthTypes
  9712. }
  9713. if postIndex > l {
  9714. return io.ErrUnexpectedEOF
  9715. }
  9716. m.LastBlockAppHash = append(m.LastBlockAppHash[:0], dAtA[iNdEx:postIndex]...)
  9717. if m.LastBlockAppHash == nil {
  9718. m.LastBlockAppHash = []byte{}
  9719. }
  9720. iNdEx = postIndex
  9721. default:
  9722. iNdEx = preIndex
  9723. skippy, err := skipTypes(dAtA[iNdEx:])
  9724. if err != nil {
  9725. return err
  9726. }
  9727. if (skippy < 0) || (iNdEx+skippy) < 0 {
  9728. return ErrInvalidLengthTypes
  9729. }
  9730. if (iNdEx + skippy) > l {
  9731. return io.ErrUnexpectedEOF
  9732. }
  9733. iNdEx += skippy
  9734. }
  9735. }
  9736. if iNdEx > l {
  9737. return io.ErrUnexpectedEOF
  9738. }
  9739. return nil
  9740. }
  9741. func (m *ResponseInitChain) Unmarshal(dAtA []byte) error {
  9742. l := len(dAtA)
  9743. iNdEx := 0
  9744. for iNdEx < l {
  9745. preIndex := iNdEx
  9746. var wire uint64
  9747. for shift := uint(0); ; shift += 7 {
  9748. if shift >= 64 {
  9749. return ErrIntOverflowTypes
  9750. }
  9751. if iNdEx >= l {
  9752. return io.ErrUnexpectedEOF
  9753. }
  9754. b := dAtA[iNdEx]
  9755. iNdEx++
  9756. wire |= uint64(b&0x7F) << shift
  9757. if b < 0x80 {
  9758. break
  9759. }
  9760. }
  9761. fieldNum := int32(wire >> 3)
  9762. wireType := int(wire & 0x7)
  9763. if wireType == 4 {
  9764. return fmt.Errorf("proto: ResponseInitChain: wiretype end group for non-group")
  9765. }
  9766. if fieldNum <= 0 {
  9767. return fmt.Errorf("proto: ResponseInitChain: illegal tag %d (wire type %d)", fieldNum, wire)
  9768. }
  9769. switch fieldNum {
  9770. case 1:
  9771. if wireType != 2 {
  9772. return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", wireType)
  9773. }
  9774. var msglen int
  9775. for shift := uint(0); ; shift += 7 {
  9776. if shift >= 64 {
  9777. return ErrIntOverflowTypes
  9778. }
  9779. if iNdEx >= l {
  9780. return io.ErrUnexpectedEOF
  9781. }
  9782. b := dAtA[iNdEx]
  9783. iNdEx++
  9784. msglen |= int(b&0x7F) << shift
  9785. if b < 0x80 {
  9786. break
  9787. }
  9788. }
  9789. if msglen < 0 {
  9790. return ErrInvalidLengthTypes
  9791. }
  9792. postIndex := iNdEx + msglen
  9793. if postIndex < 0 {
  9794. return ErrInvalidLengthTypes
  9795. }
  9796. if postIndex > l {
  9797. return io.ErrUnexpectedEOF
  9798. }
  9799. if m.ConsensusParams == nil {
  9800. m.ConsensusParams = &types1.ConsensusParams{}
  9801. }
  9802. if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9803. return err
  9804. }
  9805. iNdEx = postIndex
  9806. case 2:
  9807. if wireType != 2 {
  9808. return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType)
  9809. }
  9810. var msglen int
  9811. for shift := uint(0); ; shift += 7 {
  9812. if shift >= 64 {
  9813. return ErrIntOverflowTypes
  9814. }
  9815. if iNdEx >= l {
  9816. return io.ErrUnexpectedEOF
  9817. }
  9818. b := dAtA[iNdEx]
  9819. iNdEx++
  9820. msglen |= int(b&0x7F) << shift
  9821. if b < 0x80 {
  9822. break
  9823. }
  9824. }
  9825. if msglen < 0 {
  9826. return ErrInvalidLengthTypes
  9827. }
  9828. postIndex := iNdEx + msglen
  9829. if postIndex < 0 {
  9830. return ErrInvalidLengthTypes
  9831. }
  9832. if postIndex > l {
  9833. return io.ErrUnexpectedEOF
  9834. }
  9835. m.Validators = append(m.Validators, ValidatorUpdate{})
  9836. if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9837. return err
  9838. }
  9839. iNdEx = postIndex
  9840. case 3:
  9841. if wireType != 2 {
  9842. return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType)
  9843. }
  9844. var byteLen int
  9845. for shift := uint(0); ; shift += 7 {
  9846. if shift >= 64 {
  9847. return ErrIntOverflowTypes
  9848. }
  9849. if iNdEx >= l {
  9850. return io.ErrUnexpectedEOF
  9851. }
  9852. b := dAtA[iNdEx]
  9853. iNdEx++
  9854. byteLen |= int(b&0x7F) << shift
  9855. if b < 0x80 {
  9856. break
  9857. }
  9858. }
  9859. if byteLen < 0 {
  9860. return ErrInvalidLengthTypes
  9861. }
  9862. postIndex := iNdEx + byteLen
  9863. if postIndex < 0 {
  9864. return ErrInvalidLengthTypes
  9865. }
  9866. if postIndex > l {
  9867. return io.ErrUnexpectedEOF
  9868. }
  9869. m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...)
  9870. if m.AppHash == nil {
  9871. m.AppHash = []byte{}
  9872. }
  9873. iNdEx = postIndex
  9874. default:
  9875. iNdEx = preIndex
  9876. skippy, err := skipTypes(dAtA[iNdEx:])
  9877. if err != nil {
  9878. return err
  9879. }
  9880. if (skippy < 0) || (iNdEx+skippy) < 0 {
  9881. return ErrInvalidLengthTypes
  9882. }
  9883. if (iNdEx + skippy) > l {
  9884. return io.ErrUnexpectedEOF
  9885. }
  9886. iNdEx += skippy
  9887. }
  9888. }
  9889. if iNdEx > l {
  9890. return io.ErrUnexpectedEOF
  9891. }
  9892. return nil
  9893. }
  9894. func (m *ResponseQuery) Unmarshal(dAtA []byte) error {
  9895. l := len(dAtA)
  9896. iNdEx := 0
  9897. for iNdEx < l {
  9898. preIndex := iNdEx
  9899. var wire uint64
  9900. for shift := uint(0); ; shift += 7 {
  9901. if shift >= 64 {
  9902. return ErrIntOverflowTypes
  9903. }
  9904. if iNdEx >= l {
  9905. return io.ErrUnexpectedEOF
  9906. }
  9907. b := dAtA[iNdEx]
  9908. iNdEx++
  9909. wire |= uint64(b&0x7F) << shift
  9910. if b < 0x80 {
  9911. break
  9912. }
  9913. }
  9914. fieldNum := int32(wire >> 3)
  9915. wireType := int(wire & 0x7)
  9916. if wireType == 4 {
  9917. return fmt.Errorf("proto: ResponseQuery: wiretype end group for non-group")
  9918. }
  9919. if fieldNum <= 0 {
  9920. return fmt.Errorf("proto: ResponseQuery: illegal tag %d (wire type %d)", fieldNum, wire)
  9921. }
  9922. switch fieldNum {
  9923. case 1:
  9924. if wireType != 0 {
  9925. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  9926. }
  9927. m.Code = 0
  9928. for shift := uint(0); ; shift += 7 {
  9929. if shift >= 64 {
  9930. return ErrIntOverflowTypes
  9931. }
  9932. if iNdEx >= l {
  9933. return io.ErrUnexpectedEOF
  9934. }
  9935. b := dAtA[iNdEx]
  9936. iNdEx++
  9937. m.Code |= uint32(b&0x7F) << shift
  9938. if b < 0x80 {
  9939. break
  9940. }
  9941. }
  9942. case 3:
  9943. if wireType != 2 {
  9944. return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType)
  9945. }
  9946. var stringLen uint64
  9947. for shift := uint(0); ; shift += 7 {
  9948. if shift >= 64 {
  9949. return ErrIntOverflowTypes
  9950. }
  9951. if iNdEx >= l {
  9952. return io.ErrUnexpectedEOF
  9953. }
  9954. b := dAtA[iNdEx]
  9955. iNdEx++
  9956. stringLen |= uint64(b&0x7F) << shift
  9957. if b < 0x80 {
  9958. break
  9959. }
  9960. }
  9961. intStringLen := int(stringLen)
  9962. if intStringLen < 0 {
  9963. return ErrInvalidLengthTypes
  9964. }
  9965. postIndex := iNdEx + intStringLen
  9966. if postIndex < 0 {
  9967. return ErrInvalidLengthTypes
  9968. }
  9969. if postIndex > l {
  9970. return io.ErrUnexpectedEOF
  9971. }
  9972. m.Log = string(dAtA[iNdEx:postIndex])
  9973. iNdEx = postIndex
  9974. case 4:
  9975. if wireType != 2 {
  9976. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  9977. }
  9978. var stringLen uint64
  9979. for shift := uint(0); ; shift += 7 {
  9980. if shift >= 64 {
  9981. return ErrIntOverflowTypes
  9982. }
  9983. if iNdEx >= l {
  9984. return io.ErrUnexpectedEOF
  9985. }
  9986. b := dAtA[iNdEx]
  9987. iNdEx++
  9988. stringLen |= uint64(b&0x7F) << shift
  9989. if b < 0x80 {
  9990. break
  9991. }
  9992. }
  9993. intStringLen := int(stringLen)
  9994. if intStringLen < 0 {
  9995. return ErrInvalidLengthTypes
  9996. }
  9997. postIndex := iNdEx + intStringLen
  9998. if postIndex < 0 {
  9999. return ErrInvalidLengthTypes
  10000. }
  10001. if postIndex > l {
  10002. return io.ErrUnexpectedEOF
  10003. }
  10004. m.Info = string(dAtA[iNdEx:postIndex])
  10005. iNdEx = postIndex
  10006. case 5:
  10007. if wireType != 0 {
  10008. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  10009. }
  10010. m.Index = 0
  10011. for shift := uint(0); ; shift += 7 {
  10012. if shift >= 64 {
  10013. return ErrIntOverflowTypes
  10014. }
  10015. if iNdEx >= l {
  10016. return io.ErrUnexpectedEOF
  10017. }
  10018. b := dAtA[iNdEx]
  10019. iNdEx++
  10020. m.Index |= int64(b&0x7F) << shift
  10021. if b < 0x80 {
  10022. break
  10023. }
  10024. }
  10025. case 6:
  10026. if wireType != 2 {
  10027. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  10028. }
  10029. var byteLen int
  10030. for shift := uint(0); ; shift += 7 {
  10031. if shift >= 64 {
  10032. return ErrIntOverflowTypes
  10033. }
  10034. if iNdEx >= l {
  10035. return io.ErrUnexpectedEOF
  10036. }
  10037. b := dAtA[iNdEx]
  10038. iNdEx++
  10039. byteLen |= int(b&0x7F) << shift
  10040. if b < 0x80 {
  10041. break
  10042. }
  10043. }
  10044. if byteLen < 0 {
  10045. return ErrInvalidLengthTypes
  10046. }
  10047. postIndex := iNdEx + byteLen
  10048. if postIndex < 0 {
  10049. return ErrInvalidLengthTypes
  10050. }
  10051. if postIndex > l {
  10052. return io.ErrUnexpectedEOF
  10053. }
  10054. m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
  10055. if m.Key == nil {
  10056. m.Key = []byte{}
  10057. }
  10058. iNdEx = postIndex
  10059. case 7:
  10060. if wireType != 2 {
  10061. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  10062. }
  10063. var byteLen int
  10064. for shift := uint(0); ; shift += 7 {
  10065. if shift >= 64 {
  10066. return ErrIntOverflowTypes
  10067. }
  10068. if iNdEx >= l {
  10069. return io.ErrUnexpectedEOF
  10070. }
  10071. b := dAtA[iNdEx]
  10072. iNdEx++
  10073. byteLen |= int(b&0x7F) << shift
  10074. if b < 0x80 {
  10075. break
  10076. }
  10077. }
  10078. if byteLen < 0 {
  10079. return ErrInvalidLengthTypes
  10080. }
  10081. postIndex := iNdEx + byteLen
  10082. if postIndex < 0 {
  10083. return ErrInvalidLengthTypes
  10084. }
  10085. if postIndex > l {
  10086. return io.ErrUnexpectedEOF
  10087. }
  10088. m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...)
  10089. if m.Value == nil {
  10090. m.Value = []byte{}
  10091. }
  10092. iNdEx = postIndex
  10093. case 8:
  10094. if wireType != 2 {
  10095. return fmt.Errorf("proto: wrong wireType = %d for field ProofOps", wireType)
  10096. }
  10097. var msglen int
  10098. for shift := uint(0); ; shift += 7 {
  10099. if shift >= 64 {
  10100. return ErrIntOverflowTypes
  10101. }
  10102. if iNdEx >= l {
  10103. return io.ErrUnexpectedEOF
  10104. }
  10105. b := dAtA[iNdEx]
  10106. iNdEx++
  10107. msglen |= int(b&0x7F) << shift
  10108. if b < 0x80 {
  10109. break
  10110. }
  10111. }
  10112. if msglen < 0 {
  10113. return ErrInvalidLengthTypes
  10114. }
  10115. postIndex := iNdEx + msglen
  10116. if postIndex < 0 {
  10117. return ErrInvalidLengthTypes
  10118. }
  10119. if postIndex > l {
  10120. return io.ErrUnexpectedEOF
  10121. }
  10122. if m.ProofOps == nil {
  10123. m.ProofOps = &crypto.ProofOps{}
  10124. }
  10125. if err := m.ProofOps.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10126. return err
  10127. }
  10128. iNdEx = postIndex
  10129. case 9:
  10130. if wireType != 0 {
  10131. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  10132. }
  10133. m.Height = 0
  10134. for shift := uint(0); ; shift += 7 {
  10135. if shift >= 64 {
  10136. return ErrIntOverflowTypes
  10137. }
  10138. if iNdEx >= l {
  10139. return io.ErrUnexpectedEOF
  10140. }
  10141. b := dAtA[iNdEx]
  10142. iNdEx++
  10143. m.Height |= int64(b&0x7F) << shift
  10144. if b < 0x80 {
  10145. break
  10146. }
  10147. }
  10148. case 10:
  10149. if wireType != 2 {
  10150. return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType)
  10151. }
  10152. var stringLen uint64
  10153. for shift := uint(0); ; shift += 7 {
  10154. if shift >= 64 {
  10155. return ErrIntOverflowTypes
  10156. }
  10157. if iNdEx >= l {
  10158. return io.ErrUnexpectedEOF
  10159. }
  10160. b := dAtA[iNdEx]
  10161. iNdEx++
  10162. stringLen |= uint64(b&0x7F) << shift
  10163. if b < 0x80 {
  10164. break
  10165. }
  10166. }
  10167. intStringLen := int(stringLen)
  10168. if intStringLen < 0 {
  10169. return ErrInvalidLengthTypes
  10170. }
  10171. postIndex := iNdEx + intStringLen
  10172. if postIndex < 0 {
  10173. return ErrInvalidLengthTypes
  10174. }
  10175. if postIndex > l {
  10176. return io.ErrUnexpectedEOF
  10177. }
  10178. m.Codespace = string(dAtA[iNdEx:postIndex])
  10179. iNdEx = postIndex
  10180. default:
  10181. iNdEx = preIndex
  10182. skippy, err := skipTypes(dAtA[iNdEx:])
  10183. if err != nil {
  10184. return err
  10185. }
  10186. if (skippy < 0) || (iNdEx+skippy) < 0 {
  10187. return ErrInvalidLengthTypes
  10188. }
  10189. if (iNdEx + skippy) > l {
  10190. return io.ErrUnexpectedEOF
  10191. }
  10192. iNdEx += skippy
  10193. }
  10194. }
  10195. if iNdEx > l {
  10196. return io.ErrUnexpectedEOF
  10197. }
  10198. return nil
  10199. }
  10200. func (m *ResponseBeginBlock) Unmarshal(dAtA []byte) error {
  10201. l := len(dAtA)
  10202. iNdEx := 0
  10203. for iNdEx < l {
  10204. preIndex := iNdEx
  10205. var wire uint64
  10206. for shift := uint(0); ; shift += 7 {
  10207. if shift >= 64 {
  10208. return ErrIntOverflowTypes
  10209. }
  10210. if iNdEx >= l {
  10211. return io.ErrUnexpectedEOF
  10212. }
  10213. b := dAtA[iNdEx]
  10214. iNdEx++
  10215. wire |= uint64(b&0x7F) << shift
  10216. if b < 0x80 {
  10217. break
  10218. }
  10219. }
  10220. fieldNum := int32(wire >> 3)
  10221. wireType := int(wire & 0x7)
  10222. if wireType == 4 {
  10223. return fmt.Errorf("proto: ResponseBeginBlock: wiretype end group for non-group")
  10224. }
  10225. if fieldNum <= 0 {
  10226. return fmt.Errorf("proto: ResponseBeginBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  10227. }
  10228. switch fieldNum {
  10229. case 1:
  10230. if wireType != 2 {
  10231. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  10232. }
  10233. var msglen int
  10234. for shift := uint(0); ; shift += 7 {
  10235. if shift >= 64 {
  10236. return ErrIntOverflowTypes
  10237. }
  10238. if iNdEx >= l {
  10239. return io.ErrUnexpectedEOF
  10240. }
  10241. b := dAtA[iNdEx]
  10242. iNdEx++
  10243. msglen |= int(b&0x7F) << shift
  10244. if b < 0x80 {
  10245. break
  10246. }
  10247. }
  10248. if msglen < 0 {
  10249. return ErrInvalidLengthTypes
  10250. }
  10251. postIndex := iNdEx + msglen
  10252. if postIndex < 0 {
  10253. return ErrInvalidLengthTypes
  10254. }
  10255. if postIndex > l {
  10256. return io.ErrUnexpectedEOF
  10257. }
  10258. m.Events = append(m.Events, Event{})
  10259. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10260. return err
  10261. }
  10262. iNdEx = postIndex
  10263. default:
  10264. iNdEx = preIndex
  10265. skippy, err := skipTypes(dAtA[iNdEx:])
  10266. if err != nil {
  10267. return err
  10268. }
  10269. if (skippy < 0) || (iNdEx+skippy) < 0 {
  10270. return ErrInvalidLengthTypes
  10271. }
  10272. if (iNdEx + skippy) > l {
  10273. return io.ErrUnexpectedEOF
  10274. }
  10275. iNdEx += skippy
  10276. }
  10277. }
  10278. if iNdEx > l {
  10279. return io.ErrUnexpectedEOF
  10280. }
  10281. return nil
  10282. }
  10283. func (m *ResponseCheckTx) Unmarshal(dAtA []byte) error {
  10284. l := len(dAtA)
  10285. iNdEx := 0
  10286. for iNdEx < l {
  10287. preIndex := iNdEx
  10288. var wire uint64
  10289. for shift := uint(0); ; shift += 7 {
  10290. if shift >= 64 {
  10291. return ErrIntOverflowTypes
  10292. }
  10293. if iNdEx >= l {
  10294. return io.ErrUnexpectedEOF
  10295. }
  10296. b := dAtA[iNdEx]
  10297. iNdEx++
  10298. wire |= uint64(b&0x7F) << shift
  10299. if b < 0x80 {
  10300. break
  10301. }
  10302. }
  10303. fieldNum := int32(wire >> 3)
  10304. wireType := int(wire & 0x7)
  10305. if wireType == 4 {
  10306. return fmt.Errorf("proto: ResponseCheckTx: wiretype end group for non-group")
  10307. }
  10308. if fieldNum <= 0 {
  10309. return fmt.Errorf("proto: ResponseCheckTx: illegal tag %d (wire type %d)", fieldNum, wire)
  10310. }
  10311. switch fieldNum {
  10312. case 1:
  10313. if wireType != 0 {
  10314. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  10315. }
  10316. m.Code = 0
  10317. for shift := uint(0); ; shift += 7 {
  10318. if shift >= 64 {
  10319. return ErrIntOverflowTypes
  10320. }
  10321. if iNdEx >= l {
  10322. return io.ErrUnexpectedEOF
  10323. }
  10324. b := dAtA[iNdEx]
  10325. iNdEx++
  10326. m.Code |= uint32(b&0x7F) << shift
  10327. if b < 0x80 {
  10328. break
  10329. }
  10330. }
  10331. case 2:
  10332. if wireType != 2 {
  10333. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  10334. }
  10335. var byteLen int
  10336. for shift := uint(0); ; shift += 7 {
  10337. if shift >= 64 {
  10338. return ErrIntOverflowTypes
  10339. }
  10340. if iNdEx >= l {
  10341. return io.ErrUnexpectedEOF
  10342. }
  10343. b := dAtA[iNdEx]
  10344. iNdEx++
  10345. byteLen |= int(b&0x7F) << shift
  10346. if b < 0x80 {
  10347. break
  10348. }
  10349. }
  10350. if byteLen < 0 {
  10351. return ErrInvalidLengthTypes
  10352. }
  10353. postIndex := iNdEx + byteLen
  10354. if postIndex < 0 {
  10355. return ErrInvalidLengthTypes
  10356. }
  10357. if postIndex > l {
  10358. return io.ErrUnexpectedEOF
  10359. }
  10360. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  10361. if m.Data == nil {
  10362. m.Data = []byte{}
  10363. }
  10364. iNdEx = postIndex
  10365. case 3:
  10366. if wireType != 2 {
  10367. return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType)
  10368. }
  10369. var stringLen uint64
  10370. for shift := uint(0); ; shift += 7 {
  10371. if shift >= 64 {
  10372. return ErrIntOverflowTypes
  10373. }
  10374. if iNdEx >= l {
  10375. return io.ErrUnexpectedEOF
  10376. }
  10377. b := dAtA[iNdEx]
  10378. iNdEx++
  10379. stringLen |= uint64(b&0x7F) << shift
  10380. if b < 0x80 {
  10381. break
  10382. }
  10383. }
  10384. intStringLen := int(stringLen)
  10385. if intStringLen < 0 {
  10386. return ErrInvalidLengthTypes
  10387. }
  10388. postIndex := iNdEx + intStringLen
  10389. if postIndex < 0 {
  10390. return ErrInvalidLengthTypes
  10391. }
  10392. if postIndex > l {
  10393. return io.ErrUnexpectedEOF
  10394. }
  10395. m.Log = string(dAtA[iNdEx:postIndex])
  10396. iNdEx = postIndex
  10397. case 4:
  10398. if wireType != 2 {
  10399. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  10400. }
  10401. var stringLen uint64
  10402. for shift := uint(0); ; shift += 7 {
  10403. if shift >= 64 {
  10404. return ErrIntOverflowTypes
  10405. }
  10406. if iNdEx >= l {
  10407. return io.ErrUnexpectedEOF
  10408. }
  10409. b := dAtA[iNdEx]
  10410. iNdEx++
  10411. stringLen |= uint64(b&0x7F) << shift
  10412. if b < 0x80 {
  10413. break
  10414. }
  10415. }
  10416. intStringLen := int(stringLen)
  10417. if intStringLen < 0 {
  10418. return ErrInvalidLengthTypes
  10419. }
  10420. postIndex := iNdEx + intStringLen
  10421. if postIndex < 0 {
  10422. return ErrInvalidLengthTypes
  10423. }
  10424. if postIndex > l {
  10425. return io.ErrUnexpectedEOF
  10426. }
  10427. m.Info = string(dAtA[iNdEx:postIndex])
  10428. iNdEx = postIndex
  10429. case 5:
  10430. if wireType != 0 {
  10431. return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType)
  10432. }
  10433. m.GasWanted = 0
  10434. for shift := uint(0); ; shift += 7 {
  10435. if shift >= 64 {
  10436. return ErrIntOverflowTypes
  10437. }
  10438. if iNdEx >= l {
  10439. return io.ErrUnexpectedEOF
  10440. }
  10441. b := dAtA[iNdEx]
  10442. iNdEx++
  10443. m.GasWanted |= int64(b&0x7F) << shift
  10444. if b < 0x80 {
  10445. break
  10446. }
  10447. }
  10448. case 6:
  10449. if wireType != 0 {
  10450. return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType)
  10451. }
  10452. m.GasUsed = 0
  10453. for shift := uint(0); ; shift += 7 {
  10454. if shift >= 64 {
  10455. return ErrIntOverflowTypes
  10456. }
  10457. if iNdEx >= l {
  10458. return io.ErrUnexpectedEOF
  10459. }
  10460. b := dAtA[iNdEx]
  10461. iNdEx++
  10462. m.GasUsed |= int64(b&0x7F) << shift
  10463. if b < 0x80 {
  10464. break
  10465. }
  10466. }
  10467. case 7:
  10468. if wireType != 2 {
  10469. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  10470. }
  10471. var msglen int
  10472. for shift := uint(0); ; shift += 7 {
  10473. if shift >= 64 {
  10474. return ErrIntOverflowTypes
  10475. }
  10476. if iNdEx >= l {
  10477. return io.ErrUnexpectedEOF
  10478. }
  10479. b := dAtA[iNdEx]
  10480. iNdEx++
  10481. msglen |= int(b&0x7F) << shift
  10482. if b < 0x80 {
  10483. break
  10484. }
  10485. }
  10486. if msglen < 0 {
  10487. return ErrInvalidLengthTypes
  10488. }
  10489. postIndex := iNdEx + msglen
  10490. if postIndex < 0 {
  10491. return ErrInvalidLengthTypes
  10492. }
  10493. if postIndex > l {
  10494. return io.ErrUnexpectedEOF
  10495. }
  10496. m.Events = append(m.Events, Event{})
  10497. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10498. return err
  10499. }
  10500. iNdEx = postIndex
  10501. case 8:
  10502. if wireType != 2 {
  10503. return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType)
  10504. }
  10505. var stringLen uint64
  10506. for shift := uint(0); ; shift += 7 {
  10507. if shift >= 64 {
  10508. return ErrIntOverflowTypes
  10509. }
  10510. if iNdEx >= l {
  10511. return io.ErrUnexpectedEOF
  10512. }
  10513. b := dAtA[iNdEx]
  10514. iNdEx++
  10515. stringLen |= uint64(b&0x7F) << shift
  10516. if b < 0x80 {
  10517. break
  10518. }
  10519. }
  10520. intStringLen := int(stringLen)
  10521. if intStringLen < 0 {
  10522. return ErrInvalidLengthTypes
  10523. }
  10524. postIndex := iNdEx + intStringLen
  10525. if postIndex < 0 {
  10526. return ErrInvalidLengthTypes
  10527. }
  10528. if postIndex > l {
  10529. return io.ErrUnexpectedEOF
  10530. }
  10531. m.Codespace = string(dAtA[iNdEx:postIndex])
  10532. iNdEx = postIndex
  10533. case 9:
  10534. if wireType != 2 {
  10535. return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType)
  10536. }
  10537. var stringLen uint64
  10538. for shift := uint(0); ; shift += 7 {
  10539. if shift >= 64 {
  10540. return ErrIntOverflowTypes
  10541. }
  10542. if iNdEx >= l {
  10543. return io.ErrUnexpectedEOF
  10544. }
  10545. b := dAtA[iNdEx]
  10546. iNdEx++
  10547. stringLen |= uint64(b&0x7F) << shift
  10548. if b < 0x80 {
  10549. break
  10550. }
  10551. }
  10552. intStringLen := int(stringLen)
  10553. if intStringLen < 0 {
  10554. return ErrInvalidLengthTypes
  10555. }
  10556. postIndex := iNdEx + intStringLen
  10557. if postIndex < 0 {
  10558. return ErrInvalidLengthTypes
  10559. }
  10560. if postIndex > l {
  10561. return io.ErrUnexpectedEOF
  10562. }
  10563. m.Sender = string(dAtA[iNdEx:postIndex])
  10564. iNdEx = postIndex
  10565. case 10:
  10566. if wireType != 0 {
  10567. return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType)
  10568. }
  10569. m.Priority = 0
  10570. for shift := uint(0); ; shift += 7 {
  10571. if shift >= 64 {
  10572. return ErrIntOverflowTypes
  10573. }
  10574. if iNdEx >= l {
  10575. return io.ErrUnexpectedEOF
  10576. }
  10577. b := dAtA[iNdEx]
  10578. iNdEx++
  10579. m.Priority |= int64(b&0x7F) << shift
  10580. if b < 0x80 {
  10581. break
  10582. }
  10583. }
  10584. case 11:
  10585. if wireType != 2 {
  10586. return fmt.Errorf("proto: wrong wireType = %d for field MempoolError", wireType)
  10587. }
  10588. var stringLen uint64
  10589. for shift := uint(0); ; shift += 7 {
  10590. if shift >= 64 {
  10591. return ErrIntOverflowTypes
  10592. }
  10593. if iNdEx >= l {
  10594. return io.ErrUnexpectedEOF
  10595. }
  10596. b := dAtA[iNdEx]
  10597. iNdEx++
  10598. stringLen |= uint64(b&0x7F) << shift
  10599. if b < 0x80 {
  10600. break
  10601. }
  10602. }
  10603. intStringLen := int(stringLen)
  10604. if intStringLen < 0 {
  10605. return ErrInvalidLengthTypes
  10606. }
  10607. postIndex := iNdEx + intStringLen
  10608. if postIndex < 0 {
  10609. return ErrInvalidLengthTypes
  10610. }
  10611. if postIndex > l {
  10612. return io.ErrUnexpectedEOF
  10613. }
  10614. m.MempoolError = string(dAtA[iNdEx:postIndex])
  10615. iNdEx = postIndex
  10616. default:
  10617. iNdEx = preIndex
  10618. skippy, err := skipTypes(dAtA[iNdEx:])
  10619. if err != nil {
  10620. return err
  10621. }
  10622. if (skippy < 0) || (iNdEx+skippy) < 0 {
  10623. return ErrInvalidLengthTypes
  10624. }
  10625. if (iNdEx + skippy) > l {
  10626. return io.ErrUnexpectedEOF
  10627. }
  10628. iNdEx += skippy
  10629. }
  10630. }
  10631. if iNdEx > l {
  10632. return io.ErrUnexpectedEOF
  10633. }
  10634. return nil
  10635. }
  10636. func (m *ResponseDeliverTx) Unmarshal(dAtA []byte) error {
  10637. l := len(dAtA)
  10638. iNdEx := 0
  10639. for iNdEx < l {
  10640. preIndex := iNdEx
  10641. var wire uint64
  10642. for shift := uint(0); ; shift += 7 {
  10643. if shift >= 64 {
  10644. return ErrIntOverflowTypes
  10645. }
  10646. if iNdEx >= l {
  10647. return io.ErrUnexpectedEOF
  10648. }
  10649. b := dAtA[iNdEx]
  10650. iNdEx++
  10651. wire |= uint64(b&0x7F) << shift
  10652. if b < 0x80 {
  10653. break
  10654. }
  10655. }
  10656. fieldNum := int32(wire >> 3)
  10657. wireType := int(wire & 0x7)
  10658. if wireType == 4 {
  10659. return fmt.Errorf("proto: ResponseDeliverTx: wiretype end group for non-group")
  10660. }
  10661. if fieldNum <= 0 {
  10662. return fmt.Errorf("proto: ResponseDeliverTx: illegal tag %d (wire type %d)", fieldNum, wire)
  10663. }
  10664. switch fieldNum {
  10665. case 1:
  10666. if wireType != 0 {
  10667. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  10668. }
  10669. m.Code = 0
  10670. for shift := uint(0); ; shift += 7 {
  10671. if shift >= 64 {
  10672. return ErrIntOverflowTypes
  10673. }
  10674. if iNdEx >= l {
  10675. return io.ErrUnexpectedEOF
  10676. }
  10677. b := dAtA[iNdEx]
  10678. iNdEx++
  10679. m.Code |= uint32(b&0x7F) << shift
  10680. if b < 0x80 {
  10681. break
  10682. }
  10683. }
  10684. case 2:
  10685. if wireType != 2 {
  10686. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  10687. }
  10688. var byteLen int
  10689. for shift := uint(0); ; shift += 7 {
  10690. if shift >= 64 {
  10691. return ErrIntOverflowTypes
  10692. }
  10693. if iNdEx >= l {
  10694. return io.ErrUnexpectedEOF
  10695. }
  10696. b := dAtA[iNdEx]
  10697. iNdEx++
  10698. byteLen |= int(b&0x7F) << shift
  10699. if b < 0x80 {
  10700. break
  10701. }
  10702. }
  10703. if byteLen < 0 {
  10704. return ErrInvalidLengthTypes
  10705. }
  10706. postIndex := iNdEx + byteLen
  10707. if postIndex < 0 {
  10708. return ErrInvalidLengthTypes
  10709. }
  10710. if postIndex > l {
  10711. return io.ErrUnexpectedEOF
  10712. }
  10713. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  10714. if m.Data == nil {
  10715. m.Data = []byte{}
  10716. }
  10717. iNdEx = postIndex
  10718. case 3:
  10719. if wireType != 2 {
  10720. return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType)
  10721. }
  10722. var stringLen uint64
  10723. for shift := uint(0); ; shift += 7 {
  10724. if shift >= 64 {
  10725. return ErrIntOverflowTypes
  10726. }
  10727. if iNdEx >= l {
  10728. return io.ErrUnexpectedEOF
  10729. }
  10730. b := dAtA[iNdEx]
  10731. iNdEx++
  10732. stringLen |= uint64(b&0x7F) << shift
  10733. if b < 0x80 {
  10734. break
  10735. }
  10736. }
  10737. intStringLen := int(stringLen)
  10738. if intStringLen < 0 {
  10739. return ErrInvalidLengthTypes
  10740. }
  10741. postIndex := iNdEx + intStringLen
  10742. if postIndex < 0 {
  10743. return ErrInvalidLengthTypes
  10744. }
  10745. if postIndex > l {
  10746. return io.ErrUnexpectedEOF
  10747. }
  10748. m.Log = string(dAtA[iNdEx:postIndex])
  10749. iNdEx = postIndex
  10750. case 4:
  10751. if wireType != 2 {
  10752. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  10753. }
  10754. var stringLen uint64
  10755. for shift := uint(0); ; shift += 7 {
  10756. if shift >= 64 {
  10757. return ErrIntOverflowTypes
  10758. }
  10759. if iNdEx >= l {
  10760. return io.ErrUnexpectedEOF
  10761. }
  10762. b := dAtA[iNdEx]
  10763. iNdEx++
  10764. stringLen |= uint64(b&0x7F) << shift
  10765. if b < 0x80 {
  10766. break
  10767. }
  10768. }
  10769. intStringLen := int(stringLen)
  10770. if intStringLen < 0 {
  10771. return ErrInvalidLengthTypes
  10772. }
  10773. postIndex := iNdEx + intStringLen
  10774. if postIndex < 0 {
  10775. return ErrInvalidLengthTypes
  10776. }
  10777. if postIndex > l {
  10778. return io.ErrUnexpectedEOF
  10779. }
  10780. m.Info = string(dAtA[iNdEx:postIndex])
  10781. iNdEx = postIndex
  10782. case 5:
  10783. if wireType != 0 {
  10784. return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType)
  10785. }
  10786. m.GasWanted = 0
  10787. for shift := uint(0); ; shift += 7 {
  10788. if shift >= 64 {
  10789. return ErrIntOverflowTypes
  10790. }
  10791. if iNdEx >= l {
  10792. return io.ErrUnexpectedEOF
  10793. }
  10794. b := dAtA[iNdEx]
  10795. iNdEx++
  10796. m.GasWanted |= int64(b&0x7F) << shift
  10797. if b < 0x80 {
  10798. break
  10799. }
  10800. }
  10801. case 6:
  10802. if wireType != 0 {
  10803. return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType)
  10804. }
  10805. m.GasUsed = 0
  10806. for shift := uint(0); ; shift += 7 {
  10807. if shift >= 64 {
  10808. return ErrIntOverflowTypes
  10809. }
  10810. if iNdEx >= l {
  10811. return io.ErrUnexpectedEOF
  10812. }
  10813. b := dAtA[iNdEx]
  10814. iNdEx++
  10815. m.GasUsed |= int64(b&0x7F) << shift
  10816. if b < 0x80 {
  10817. break
  10818. }
  10819. }
  10820. case 7:
  10821. if wireType != 2 {
  10822. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  10823. }
  10824. var msglen int
  10825. for shift := uint(0); ; shift += 7 {
  10826. if shift >= 64 {
  10827. return ErrIntOverflowTypes
  10828. }
  10829. if iNdEx >= l {
  10830. return io.ErrUnexpectedEOF
  10831. }
  10832. b := dAtA[iNdEx]
  10833. iNdEx++
  10834. msglen |= int(b&0x7F) << shift
  10835. if b < 0x80 {
  10836. break
  10837. }
  10838. }
  10839. if msglen < 0 {
  10840. return ErrInvalidLengthTypes
  10841. }
  10842. postIndex := iNdEx + msglen
  10843. if postIndex < 0 {
  10844. return ErrInvalidLengthTypes
  10845. }
  10846. if postIndex > l {
  10847. return io.ErrUnexpectedEOF
  10848. }
  10849. m.Events = append(m.Events, Event{})
  10850. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10851. return err
  10852. }
  10853. iNdEx = postIndex
  10854. case 8:
  10855. if wireType != 2 {
  10856. return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType)
  10857. }
  10858. var stringLen uint64
  10859. for shift := uint(0); ; shift += 7 {
  10860. if shift >= 64 {
  10861. return ErrIntOverflowTypes
  10862. }
  10863. if iNdEx >= l {
  10864. return io.ErrUnexpectedEOF
  10865. }
  10866. b := dAtA[iNdEx]
  10867. iNdEx++
  10868. stringLen |= uint64(b&0x7F) << shift
  10869. if b < 0x80 {
  10870. break
  10871. }
  10872. }
  10873. intStringLen := int(stringLen)
  10874. if intStringLen < 0 {
  10875. return ErrInvalidLengthTypes
  10876. }
  10877. postIndex := iNdEx + intStringLen
  10878. if postIndex < 0 {
  10879. return ErrInvalidLengthTypes
  10880. }
  10881. if postIndex > l {
  10882. return io.ErrUnexpectedEOF
  10883. }
  10884. m.Codespace = string(dAtA[iNdEx:postIndex])
  10885. iNdEx = postIndex
  10886. default:
  10887. iNdEx = preIndex
  10888. skippy, err := skipTypes(dAtA[iNdEx:])
  10889. if err != nil {
  10890. return err
  10891. }
  10892. if (skippy < 0) || (iNdEx+skippy) < 0 {
  10893. return ErrInvalidLengthTypes
  10894. }
  10895. if (iNdEx + skippy) > l {
  10896. return io.ErrUnexpectedEOF
  10897. }
  10898. iNdEx += skippy
  10899. }
  10900. }
  10901. if iNdEx > l {
  10902. return io.ErrUnexpectedEOF
  10903. }
  10904. return nil
  10905. }
  10906. func (m *ResponseEndBlock) Unmarshal(dAtA []byte) error {
  10907. l := len(dAtA)
  10908. iNdEx := 0
  10909. for iNdEx < l {
  10910. preIndex := iNdEx
  10911. var wire uint64
  10912. for shift := uint(0); ; shift += 7 {
  10913. if shift >= 64 {
  10914. return ErrIntOverflowTypes
  10915. }
  10916. if iNdEx >= l {
  10917. return io.ErrUnexpectedEOF
  10918. }
  10919. b := dAtA[iNdEx]
  10920. iNdEx++
  10921. wire |= uint64(b&0x7F) << shift
  10922. if b < 0x80 {
  10923. break
  10924. }
  10925. }
  10926. fieldNum := int32(wire >> 3)
  10927. wireType := int(wire & 0x7)
  10928. if wireType == 4 {
  10929. return fmt.Errorf("proto: ResponseEndBlock: wiretype end group for non-group")
  10930. }
  10931. if fieldNum <= 0 {
  10932. return fmt.Errorf("proto: ResponseEndBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  10933. }
  10934. switch fieldNum {
  10935. case 1:
  10936. if wireType != 2 {
  10937. return fmt.Errorf("proto: wrong wireType = %d for field ValidatorUpdates", wireType)
  10938. }
  10939. var msglen int
  10940. for shift := uint(0); ; shift += 7 {
  10941. if shift >= 64 {
  10942. return ErrIntOverflowTypes
  10943. }
  10944. if iNdEx >= l {
  10945. return io.ErrUnexpectedEOF
  10946. }
  10947. b := dAtA[iNdEx]
  10948. iNdEx++
  10949. msglen |= int(b&0x7F) << shift
  10950. if b < 0x80 {
  10951. break
  10952. }
  10953. }
  10954. if msglen < 0 {
  10955. return ErrInvalidLengthTypes
  10956. }
  10957. postIndex := iNdEx + msglen
  10958. if postIndex < 0 {
  10959. return ErrInvalidLengthTypes
  10960. }
  10961. if postIndex > l {
  10962. return io.ErrUnexpectedEOF
  10963. }
  10964. m.ValidatorUpdates = append(m.ValidatorUpdates, ValidatorUpdate{})
  10965. if err := m.ValidatorUpdates[len(m.ValidatorUpdates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10966. return err
  10967. }
  10968. iNdEx = postIndex
  10969. case 2:
  10970. if wireType != 2 {
  10971. return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParamUpdates", wireType)
  10972. }
  10973. var msglen int
  10974. for shift := uint(0); ; shift += 7 {
  10975. if shift >= 64 {
  10976. return ErrIntOverflowTypes
  10977. }
  10978. if iNdEx >= l {
  10979. return io.ErrUnexpectedEOF
  10980. }
  10981. b := dAtA[iNdEx]
  10982. iNdEx++
  10983. msglen |= int(b&0x7F) << shift
  10984. if b < 0x80 {
  10985. break
  10986. }
  10987. }
  10988. if msglen < 0 {
  10989. return ErrInvalidLengthTypes
  10990. }
  10991. postIndex := iNdEx + msglen
  10992. if postIndex < 0 {
  10993. return ErrInvalidLengthTypes
  10994. }
  10995. if postIndex > l {
  10996. return io.ErrUnexpectedEOF
  10997. }
  10998. if m.ConsensusParamUpdates == nil {
  10999. m.ConsensusParamUpdates = &types1.ConsensusParams{}
  11000. }
  11001. if err := m.ConsensusParamUpdates.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11002. return err
  11003. }
  11004. iNdEx = postIndex
  11005. case 3:
  11006. if wireType != 2 {
  11007. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  11008. }
  11009. var msglen int
  11010. for shift := uint(0); ; shift += 7 {
  11011. if shift >= 64 {
  11012. return ErrIntOverflowTypes
  11013. }
  11014. if iNdEx >= l {
  11015. return io.ErrUnexpectedEOF
  11016. }
  11017. b := dAtA[iNdEx]
  11018. iNdEx++
  11019. msglen |= int(b&0x7F) << shift
  11020. if b < 0x80 {
  11021. break
  11022. }
  11023. }
  11024. if msglen < 0 {
  11025. return ErrInvalidLengthTypes
  11026. }
  11027. postIndex := iNdEx + msglen
  11028. if postIndex < 0 {
  11029. return ErrInvalidLengthTypes
  11030. }
  11031. if postIndex > l {
  11032. return io.ErrUnexpectedEOF
  11033. }
  11034. m.Events = append(m.Events, Event{})
  11035. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11036. return err
  11037. }
  11038. iNdEx = postIndex
  11039. default:
  11040. iNdEx = preIndex
  11041. skippy, err := skipTypes(dAtA[iNdEx:])
  11042. if err != nil {
  11043. return err
  11044. }
  11045. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11046. return ErrInvalidLengthTypes
  11047. }
  11048. if (iNdEx + skippy) > l {
  11049. return io.ErrUnexpectedEOF
  11050. }
  11051. iNdEx += skippy
  11052. }
  11053. }
  11054. if iNdEx > l {
  11055. return io.ErrUnexpectedEOF
  11056. }
  11057. return nil
  11058. }
  11059. func (m *ResponseCommit) Unmarshal(dAtA []byte) error {
  11060. l := len(dAtA)
  11061. iNdEx := 0
  11062. for iNdEx < l {
  11063. preIndex := iNdEx
  11064. var wire uint64
  11065. for shift := uint(0); ; shift += 7 {
  11066. if shift >= 64 {
  11067. return ErrIntOverflowTypes
  11068. }
  11069. if iNdEx >= l {
  11070. return io.ErrUnexpectedEOF
  11071. }
  11072. b := dAtA[iNdEx]
  11073. iNdEx++
  11074. wire |= uint64(b&0x7F) << shift
  11075. if b < 0x80 {
  11076. break
  11077. }
  11078. }
  11079. fieldNum := int32(wire >> 3)
  11080. wireType := int(wire & 0x7)
  11081. if wireType == 4 {
  11082. return fmt.Errorf("proto: ResponseCommit: wiretype end group for non-group")
  11083. }
  11084. if fieldNum <= 0 {
  11085. return fmt.Errorf("proto: ResponseCommit: illegal tag %d (wire type %d)", fieldNum, wire)
  11086. }
  11087. switch fieldNum {
  11088. case 2:
  11089. if wireType != 2 {
  11090. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  11091. }
  11092. var byteLen int
  11093. for shift := uint(0); ; shift += 7 {
  11094. if shift >= 64 {
  11095. return ErrIntOverflowTypes
  11096. }
  11097. if iNdEx >= l {
  11098. return io.ErrUnexpectedEOF
  11099. }
  11100. b := dAtA[iNdEx]
  11101. iNdEx++
  11102. byteLen |= int(b&0x7F) << shift
  11103. if b < 0x80 {
  11104. break
  11105. }
  11106. }
  11107. if byteLen < 0 {
  11108. return ErrInvalidLengthTypes
  11109. }
  11110. postIndex := iNdEx + byteLen
  11111. if postIndex < 0 {
  11112. return ErrInvalidLengthTypes
  11113. }
  11114. if postIndex > l {
  11115. return io.ErrUnexpectedEOF
  11116. }
  11117. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  11118. if m.Data == nil {
  11119. m.Data = []byte{}
  11120. }
  11121. iNdEx = postIndex
  11122. case 3:
  11123. if wireType != 0 {
  11124. return fmt.Errorf("proto: wrong wireType = %d for field RetainHeight", wireType)
  11125. }
  11126. m.RetainHeight = 0
  11127. for shift := uint(0); ; shift += 7 {
  11128. if shift >= 64 {
  11129. return ErrIntOverflowTypes
  11130. }
  11131. if iNdEx >= l {
  11132. return io.ErrUnexpectedEOF
  11133. }
  11134. b := dAtA[iNdEx]
  11135. iNdEx++
  11136. m.RetainHeight |= int64(b&0x7F) << shift
  11137. if b < 0x80 {
  11138. break
  11139. }
  11140. }
  11141. default:
  11142. iNdEx = preIndex
  11143. skippy, err := skipTypes(dAtA[iNdEx:])
  11144. if err != nil {
  11145. return err
  11146. }
  11147. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11148. return ErrInvalidLengthTypes
  11149. }
  11150. if (iNdEx + skippy) > l {
  11151. return io.ErrUnexpectedEOF
  11152. }
  11153. iNdEx += skippy
  11154. }
  11155. }
  11156. if iNdEx > l {
  11157. return io.ErrUnexpectedEOF
  11158. }
  11159. return nil
  11160. }
  11161. func (m *ResponseListSnapshots) Unmarshal(dAtA []byte) error {
  11162. l := len(dAtA)
  11163. iNdEx := 0
  11164. for iNdEx < l {
  11165. preIndex := iNdEx
  11166. var wire uint64
  11167. for shift := uint(0); ; shift += 7 {
  11168. if shift >= 64 {
  11169. return ErrIntOverflowTypes
  11170. }
  11171. if iNdEx >= l {
  11172. return io.ErrUnexpectedEOF
  11173. }
  11174. b := dAtA[iNdEx]
  11175. iNdEx++
  11176. wire |= uint64(b&0x7F) << shift
  11177. if b < 0x80 {
  11178. break
  11179. }
  11180. }
  11181. fieldNum := int32(wire >> 3)
  11182. wireType := int(wire & 0x7)
  11183. if wireType == 4 {
  11184. return fmt.Errorf("proto: ResponseListSnapshots: wiretype end group for non-group")
  11185. }
  11186. if fieldNum <= 0 {
  11187. return fmt.Errorf("proto: ResponseListSnapshots: illegal tag %d (wire type %d)", fieldNum, wire)
  11188. }
  11189. switch fieldNum {
  11190. case 1:
  11191. if wireType != 2 {
  11192. return fmt.Errorf("proto: wrong wireType = %d for field Snapshots", wireType)
  11193. }
  11194. var msglen int
  11195. for shift := uint(0); ; shift += 7 {
  11196. if shift >= 64 {
  11197. return ErrIntOverflowTypes
  11198. }
  11199. if iNdEx >= l {
  11200. return io.ErrUnexpectedEOF
  11201. }
  11202. b := dAtA[iNdEx]
  11203. iNdEx++
  11204. msglen |= int(b&0x7F) << shift
  11205. if b < 0x80 {
  11206. break
  11207. }
  11208. }
  11209. if msglen < 0 {
  11210. return ErrInvalidLengthTypes
  11211. }
  11212. postIndex := iNdEx + msglen
  11213. if postIndex < 0 {
  11214. return ErrInvalidLengthTypes
  11215. }
  11216. if postIndex > l {
  11217. return io.ErrUnexpectedEOF
  11218. }
  11219. m.Snapshots = append(m.Snapshots, &Snapshot{})
  11220. if err := m.Snapshots[len(m.Snapshots)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11221. return err
  11222. }
  11223. iNdEx = postIndex
  11224. default:
  11225. iNdEx = preIndex
  11226. skippy, err := skipTypes(dAtA[iNdEx:])
  11227. if err != nil {
  11228. return err
  11229. }
  11230. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11231. return ErrInvalidLengthTypes
  11232. }
  11233. if (iNdEx + skippy) > l {
  11234. return io.ErrUnexpectedEOF
  11235. }
  11236. iNdEx += skippy
  11237. }
  11238. }
  11239. if iNdEx > l {
  11240. return io.ErrUnexpectedEOF
  11241. }
  11242. return nil
  11243. }
  11244. func (m *ResponseOfferSnapshot) Unmarshal(dAtA []byte) error {
  11245. l := len(dAtA)
  11246. iNdEx := 0
  11247. for iNdEx < l {
  11248. preIndex := iNdEx
  11249. var wire uint64
  11250. for shift := uint(0); ; shift += 7 {
  11251. if shift >= 64 {
  11252. return ErrIntOverflowTypes
  11253. }
  11254. if iNdEx >= l {
  11255. return io.ErrUnexpectedEOF
  11256. }
  11257. b := dAtA[iNdEx]
  11258. iNdEx++
  11259. wire |= uint64(b&0x7F) << shift
  11260. if b < 0x80 {
  11261. break
  11262. }
  11263. }
  11264. fieldNum := int32(wire >> 3)
  11265. wireType := int(wire & 0x7)
  11266. if wireType == 4 {
  11267. return fmt.Errorf("proto: ResponseOfferSnapshot: wiretype end group for non-group")
  11268. }
  11269. if fieldNum <= 0 {
  11270. return fmt.Errorf("proto: ResponseOfferSnapshot: illegal tag %d (wire type %d)", fieldNum, wire)
  11271. }
  11272. switch fieldNum {
  11273. case 1:
  11274. if wireType != 0 {
  11275. return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
  11276. }
  11277. m.Result = 0
  11278. for shift := uint(0); ; shift += 7 {
  11279. if shift >= 64 {
  11280. return ErrIntOverflowTypes
  11281. }
  11282. if iNdEx >= l {
  11283. return io.ErrUnexpectedEOF
  11284. }
  11285. b := dAtA[iNdEx]
  11286. iNdEx++
  11287. m.Result |= ResponseOfferSnapshot_Result(b&0x7F) << shift
  11288. if b < 0x80 {
  11289. break
  11290. }
  11291. }
  11292. default:
  11293. iNdEx = preIndex
  11294. skippy, err := skipTypes(dAtA[iNdEx:])
  11295. if err != nil {
  11296. return err
  11297. }
  11298. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11299. return ErrInvalidLengthTypes
  11300. }
  11301. if (iNdEx + skippy) > l {
  11302. return io.ErrUnexpectedEOF
  11303. }
  11304. iNdEx += skippy
  11305. }
  11306. }
  11307. if iNdEx > l {
  11308. return io.ErrUnexpectedEOF
  11309. }
  11310. return nil
  11311. }
  11312. func (m *ResponseLoadSnapshotChunk) Unmarshal(dAtA []byte) error {
  11313. l := len(dAtA)
  11314. iNdEx := 0
  11315. for iNdEx < l {
  11316. preIndex := iNdEx
  11317. var wire uint64
  11318. for shift := uint(0); ; shift += 7 {
  11319. if shift >= 64 {
  11320. return ErrIntOverflowTypes
  11321. }
  11322. if iNdEx >= l {
  11323. return io.ErrUnexpectedEOF
  11324. }
  11325. b := dAtA[iNdEx]
  11326. iNdEx++
  11327. wire |= uint64(b&0x7F) << shift
  11328. if b < 0x80 {
  11329. break
  11330. }
  11331. }
  11332. fieldNum := int32(wire >> 3)
  11333. wireType := int(wire & 0x7)
  11334. if wireType == 4 {
  11335. return fmt.Errorf("proto: ResponseLoadSnapshotChunk: wiretype end group for non-group")
  11336. }
  11337. if fieldNum <= 0 {
  11338. return fmt.Errorf("proto: ResponseLoadSnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  11339. }
  11340. switch fieldNum {
  11341. case 1:
  11342. if wireType != 2 {
  11343. return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType)
  11344. }
  11345. var byteLen int
  11346. for shift := uint(0); ; shift += 7 {
  11347. if shift >= 64 {
  11348. return ErrIntOverflowTypes
  11349. }
  11350. if iNdEx >= l {
  11351. return io.ErrUnexpectedEOF
  11352. }
  11353. b := dAtA[iNdEx]
  11354. iNdEx++
  11355. byteLen |= int(b&0x7F) << shift
  11356. if b < 0x80 {
  11357. break
  11358. }
  11359. }
  11360. if byteLen < 0 {
  11361. return ErrInvalidLengthTypes
  11362. }
  11363. postIndex := iNdEx + byteLen
  11364. if postIndex < 0 {
  11365. return ErrInvalidLengthTypes
  11366. }
  11367. if postIndex > l {
  11368. return io.ErrUnexpectedEOF
  11369. }
  11370. m.Chunk = append(m.Chunk[:0], dAtA[iNdEx:postIndex]...)
  11371. if m.Chunk == nil {
  11372. m.Chunk = []byte{}
  11373. }
  11374. iNdEx = postIndex
  11375. default:
  11376. iNdEx = preIndex
  11377. skippy, err := skipTypes(dAtA[iNdEx:])
  11378. if err != nil {
  11379. return err
  11380. }
  11381. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11382. return ErrInvalidLengthTypes
  11383. }
  11384. if (iNdEx + skippy) > l {
  11385. return io.ErrUnexpectedEOF
  11386. }
  11387. iNdEx += skippy
  11388. }
  11389. }
  11390. if iNdEx > l {
  11391. return io.ErrUnexpectedEOF
  11392. }
  11393. return nil
  11394. }
  11395. func (m *ResponseApplySnapshotChunk) Unmarshal(dAtA []byte) error {
  11396. l := len(dAtA)
  11397. iNdEx := 0
  11398. for iNdEx < l {
  11399. preIndex := iNdEx
  11400. var wire uint64
  11401. for shift := uint(0); ; shift += 7 {
  11402. if shift >= 64 {
  11403. return ErrIntOverflowTypes
  11404. }
  11405. if iNdEx >= l {
  11406. return io.ErrUnexpectedEOF
  11407. }
  11408. b := dAtA[iNdEx]
  11409. iNdEx++
  11410. wire |= uint64(b&0x7F) << shift
  11411. if b < 0x80 {
  11412. break
  11413. }
  11414. }
  11415. fieldNum := int32(wire >> 3)
  11416. wireType := int(wire & 0x7)
  11417. if wireType == 4 {
  11418. return fmt.Errorf("proto: ResponseApplySnapshotChunk: wiretype end group for non-group")
  11419. }
  11420. if fieldNum <= 0 {
  11421. return fmt.Errorf("proto: ResponseApplySnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  11422. }
  11423. switch fieldNum {
  11424. case 1:
  11425. if wireType != 0 {
  11426. return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
  11427. }
  11428. m.Result = 0
  11429. for shift := uint(0); ; shift += 7 {
  11430. if shift >= 64 {
  11431. return ErrIntOverflowTypes
  11432. }
  11433. if iNdEx >= l {
  11434. return io.ErrUnexpectedEOF
  11435. }
  11436. b := dAtA[iNdEx]
  11437. iNdEx++
  11438. m.Result |= ResponseApplySnapshotChunk_Result(b&0x7F) << shift
  11439. if b < 0x80 {
  11440. break
  11441. }
  11442. }
  11443. case 2:
  11444. if wireType == 0 {
  11445. var v uint32
  11446. for shift := uint(0); ; shift += 7 {
  11447. if shift >= 64 {
  11448. return ErrIntOverflowTypes
  11449. }
  11450. if iNdEx >= l {
  11451. return io.ErrUnexpectedEOF
  11452. }
  11453. b := dAtA[iNdEx]
  11454. iNdEx++
  11455. v |= uint32(b&0x7F) << shift
  11456. if b < 0x80 {
  11457. break
  11458. }
  11459. }
  11460. m.RefetchChunks = append(m.RefetchChunks, v)
  11461. } else if wireType == 2 {
  11462. var packedLen int
  11463. for shift := uint(0); ; shift += 7 {
  11464. if shift >= 64 {
  11465. return ErrIntOverflowTypes
  11466. }
  11467. if iNdEx >= l {
  11468. return io.ErrUnexpectedEOF
  11469. }
  11470. b := dAtA[iNdEx]
  11471. iNdEx++
  11472. packedLen |= int(b&0x7F) << shift
  11473. if b < 0x80 {
  11474. break
  11475. }
  11476. }
  11477. if packedLen < 0 {
  11478. return ErrInvalidLengthTypes
  11479. }
  11480. postIndex := iNdEx + packedLen
  11481. if postIndex < 0 {
  11482. return ErrInvalidLengthTypes
  11483. }
  11484. if postIndex > l {
  11485. return io.ErrUnexpectedEOF
  11486. }
  11487. var elementCount int
  11488. var count int
  11489. for _, integer := range dAtA[iNdEx:postIndex] {
  11490. if integer < 128 {
  11491. count++
  11492. }
  11493. }
  11494. elementCount = count
  11495. if elementCount != 0 && len(m.RefetchChunks) == 0 {
  11496. m.RefetchChunks = make([]uint32, 0, elementCount)
  11497. }
  11498. for iNdEx < postIndex {
  11499. var v uint32
  11500. for shift := uint(0); ; shift += 7 {
  11501. if shift >= 64 {
  11502. return ErrIntOverflowTypes
  11503. }
  11504. if iNdEx >= l {
  11505. return io.ErrUnexpectedEOF
  11506. }
  11507. b := dAtA[iNdEx]
  11508. iNdEx++
  11509. v |= uint32(b&0x7F) << shift
  11510. if b < 0x80 {
  11511. break
  11512. }
  11513. }
  11514. m.RefetchChunks = append(m.RefetchChunks, v)
  11515. }
  11516. } else {
  11517. return fmt.Errorf("proto: wrong wireType = %d for field RefetchChunks", wireType)
  11518. }
  11519. case 3:
  11520. if wireType != 2 {
  11521. return fmt.Errorf("proto: wrong wireType = %d for field RejectSenders", wireType)
  11522. }
  11523. var stringLen uint64
  11524. for shift := uint(0); ; shift += 7 {
  11525. if shift >= 64 {
  11526. return ErrIntOverflowTypes
  11527. }
  11528. if iNdEx >= l {
  11529. return io.ErrUnexpectedEOF
  11530. }
  11531. b := dAtA[iNdEx]
  11532. iNdEx++
  11533. stringLen |= uint64(b&0x7F) << shift
  11534. if b < 0x80 {
  11535. break
  11536. }
  11537. }
  11538. intStringLen := int(stringLen)
  11539. if intStringLen < 0 {
  11540. return ErrInvalidLengthTypes
  11541. }
  11542. postIndex := iNdEx + intStringLen
  11543. if postIndex < 0 {
  11544. return ErrInvalidLengthTypes
  11545. }
  11546. if postIndex > l {
  11547. return io.ErrUnexpectedEOF
  11548. }
  11549. m.RejectSenders = append(m.RejectSenders, string(dAtA[iNdEx:postIndex]))
  11550. iNdEx = postIndex
  11551. default:
  11552. iNdEx = preIndex
  11553. skippy, err := skipTypes(dAtA[iNdEx:])
  11554. if err != nil {
  11555. return err
  11556. }
  11557. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11558. return ErrInvalidLengthTypes
  11559. }
  11560. if (iNdEx + skippy) > l {
  11561. return io.ErrUnexpectedEOF
  11562. }
  11563. iNdEx += skippy
  11564. }
  11565. }
  11566. if iNdEx > l {
  11567. return io.ErrUnexpectedEOF
  11568. }
  11569. return nil
  11570. }
  11571. func (m *LastCommitInfo) Unmarshal(dAtA []byte) error {
  11572. l := len(dAtA)
  11573. iNdEx := 0
  11574. for iNdEx < l {
  11575. preIndex := iNdEx
  11576. var wire uint64
  11577. for shift := uint(0); ; shift += 7 {
  11578. if shift >= 64 {
  11579. return ErrIntOverflowTypes
  11580. }
  11581. if iNdEx >= l {
  11582. return io.ErrUnexpectedEOF
  11583. }
  11584. b := dAtA[iNdEx]
  11585. iNdEx++
  11586. wire |= uint64(b&0x7F) << shift
  11587. if b < 0x80 {
  11588. break
  11589. }
  11590. }
  11591. fieldNum := int32(wire >> 3)
  11592. wireType := int(wire & 0x7)
  11593. if wireType == 4 {
  11594. return fmt.Errorf("proto: LastCommitInfo: wiretype end group for non-group")
  11595. }
  11596. if fieldNum <= 0 {
  11597. return fmt.Errorf("proto: LastCommitInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  11598. }
  11599. switch fieldNum {
  11600. case 1:
  11601. if wireType != 0 {
  11602. return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType)
  11603. }
  11604. m.Round = 0
  11605. for shift := uint(0); ; shift += 7 {
  11606. if shift >= 64 {
  11607. return ErrIntOverflowTypes
  11608. }
  11609. if iNdEx >= l {
  11610. return io.ErrUnexpectedEOF
  11611. }
  11612. b := dAtA[iNdEx]
  11613. iNdEx++
  11614. m.Round |= int32(b&0x7F) << shift
  11615. if b < 0x80 {
  11616. break
  11617. }
  11618. }
  11619. case 2:
  11620. if wireType != 2 {
  11621. return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType)
  11622. }
  11623. var msglen int
  11624. for shift := uint(0); ; shift += 7 {
  11625. if shift >= 64 {
  11626. return ErrIntOverflowTypes
  11627. }
  11628. if iNdEx >= l {
  11629. return io.ErrUnexpectedEOF
  11630. }
  11631. b := dAtA[iNdEx]
  11632. iNdEx++
  11633. msglen |= int(b&0x7F) << shift
  11634. if b < 0x80 {
  11635. break
  11636. }
  11637. }
  11638. if msglen < 0 {
  11639. return ErrInvalidLengthTypes
  11640. }
  11641. postIndex := iNdEx + msglen
  11642. if postIndex < 0 {
  11643. return ErrInvalidLengthTypes
  11644. }
  11645. if postIndex > l {
  11646. return io.ErrUnexpectedEOF
  11647. }
  11648. m.Votes = append(m.Votes, VoteInfo{})
  11649. if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11650. return err
  11651. }
  11652. iNdEx = postIndex
  11653. default:
  11654. iNdEx = preIndex
  11655. skippy, err := skipTypes(dAtA[iNdEx:])
  11656. if err != nil {
  11657. return err
  11658. }
  11659. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11660. return ErrInvalidLengthTypes
  11661. }
  11662. if (iNdEx + skippy) > l {
  11663. return io.ErrUnexpectedEOF
  11664. }
  11665. iNdEx += skippy
  11666. }
  11667. }
  11668. if iNdEx > l {
  11669. return io.ErrUnexpectedEOF
  11670. }
  11671. return nil
  11672. }
  11673. func (m *Event) Unmarshal(dAtA []byte) error {
  11674. l := len(dAtA)
  11675. iNdEx := 0
  11676. for iNdEx < l {
  11677. preIndex := iNdEx
  11678. var wire uint64
  11679. for shift := uint(0); ; shift += 7 {
  11680. if shift >= 64 {
  11681. return ErrIntOverflowTypes
  11682. }
  11683. if iNdEx >= l {
  11684. return io.ErrUnexpectedEOF
  11685. }
  11686. b := dAtA[iNdEx]
  11687. iNdEx++
  11688. wire |= uint64(b&0x7F) << shift
  11689. if b < 0x80 {
  11690. break
  11691. }
  11692. }
  11693. fieldNum := int32(wire >> 3)
  11694. wireType := int(wire & 0x7)
  11695. if wireType == 4 {
  11696. return fmt.Errorf("proto: Event: wiretype end group for non-group")
  11697. }
  11698. if fieldNum <= 0 {
  11699. return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire)
  11700. }
  11701. switch fieldNum {
  11702. case 1:
  11703. if wireType != 2 {
  11704. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  11705. }
  11706. var stringLen uint64
  11707. for shift := uint(0); ; shift += 7 {
  11708. if shift >= 64 {
  11709. return ErrIntOverflowTypes
  11710. }
  11711. if iNdEx >= l {
  11712. return io.ErrUnexpectedEOF
  11713. }
  11714. b := dAtA[iNdEx]
  11715. iNdEx++
  11716. stringLen |= uint64(b&0x7F) << shift
  11717. if b < 0x80 {
  11718. break
  11719. }
  11720. }
  11721. intStringLen := int(stringLen)
  11722. if intStringLen < 0 {
  11723. return ErrInvalidLengthTypes
  11724. }
  11725. postIndex := iNdEx + intStringLen
  11726. if postIndex < 0 {
  11727. return ErrInvalidLengthTypes
  11728. }
  11729. if postIndex > l {
  11730. return io.ErrUnexpectedEOF
  11731. }
  11732. m.Type = string(dAtA[iNdEx:postIndex])
  11733. iNdEx = postIndex
  11734. case 2:
  11735. if wireType != 2 {
  11736. return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType)
  11737. }
  11738. var msglen int
  11739. for shift := uint(0); ; shift += 7 {
  11740. if shift >= 64 {
  11741. return ErrIntOverflowTypes
  11742. }
  11743. if iNdEx >= l {
  11744. return io.ErrUnexpectedEOF
  11745. }
  11746. b := dAtA[iNdEx]
  11747. iNdEx++
  11748. msglen |= int(b&0x7F) << shift
  11749. if b < 0x80 {
  11750. break
  11751. }
  11752. }
  11753. if msglen < 0 {
  11754. return ErrInvalidLengthTypes
  11755. }
  11756. postIndex := iNdEx + msglen
  11757. if postIndex < 0 {
  11758. return ErrInvalidLengthTypes
  11759. }
  11760. if postIndex > l {
  11761. return io.ErrUnexpectedEOF
  11762. }
  11763. m.Attributes = append(m.Attributes, EventAttribute{})
  11764. if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11765. return err
  11766. }
  11767. iNdEx = postIndex
  11768. default:
  11769. iNdEx = preIndex
  11770. skippy, err := skipTypes(dAtA[iNdEx:])
  11771. if err != nil {
  11772. return err
  11773. }
  11774. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11775. return ErrInvalidLengthTypes
  11776. }
  11777. if (iNdEx + skippy) > l {
  11778. return io.ErrUnexpectedEOF
  11779. }
  11780. iNdEx += skippy
  11781. }
  11782. }
  11783. if iNdEx > l {
  11784. return io.ErrUnexpectedEOF
  11785. }
  11786. return nil
  11787. }
  11788. func (m *EventAttribute) Unmarshal(dAtA []byte) error {
  11789. l := len(dAtA)
  11790. iNdEx := 0
  11791. for iNdEx < l {
  11792. preIndex := iNdEx
  11793. var wire uint64
  11794. for shift := uint(0); ; shift += 7 {
  11795. if shift >= 64 {
  11796. return ErrIntOverflowTypes
  11797. }
  11798. if iNdEx >= l {
  11799. return io.ErrUnexpectedEOF
  11800. }
  11801. b := dAtA[iNdEx]
  11802. iNdEx++
  11803. wire |= uint64(b&0x7F) << shift
  11804. if b < 0x80 {
  11805. break
  11806. }
  11807. }
  11808. fieldNum := int32(wire >> 3)
  11809. wireType := int(wire & 0x7)
  11810. if wireType == 4 {
  11811. return fmt.Errorf("proto: EventAttribute: wiretype end group for non-group")
  11812. }
  11813. if fieldNum <= 0 {
  11814. return fmt.Errorf("proto: EventAttribute: illegal tag %d (wire type %d)", fieldNum, wire)
  11815. }
  11816. switch fieldNum {
  11817. case 1:
  11818. if wireType != 2 {
  11819. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  11820. }
  11821. var stringLen uint64
  11822. for shift := uint(0); ; shift += 7 {
  11823. if shift >= 64 {
  11824. return ErrIntOverflowTypes
  11825. }
  11826. if iNdEx >= l {
  11827. return io.ErrUnexpectedEOF
  11828. }
  11829. b := dAtA[iNdEx]
  11830. iNdEx++
  11831. stringLen |= uint64(b&0x7F) << shift
  11832. if b < 0x80 {
  11833. break
  11834. }
  11835. }
  11836. intStringLen := int(stringLen)
  11837. if intStringLen < 0 {
  11838. return ErrInvalidLengthTypes
  11839. }
  11840. postIndex := iNdEx + intStringLen
  11841. if postIndex < 0 {
  11842. return ErrInvalidLengthTypes
  11843. }
  11844. if postIndex > l {
  11845. return io.ErrUnexpectedEOF
  11846. }
  11847. m.Key = string(dAtA[iNdEx:postIndex])
  11848. iNdEx = postIndex
  11849. case 2:
  11850. if wireType != 2 {
  11851. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  11852. }
  11853. var stringLen uint64
  11854. for shift := uint(0); ; shift += 7 {
  11855. if shift >= 64 {
  11856. return ErrIntOverflowTypes
  11857. }
  11858. if iNdEx >= l {
  11859. return io.ErrUnexpectedEOF
  11860. }
  11861. b := dAtA[iNdEx]
  11862. iNdEx++
  11863. stringLen |= uint64(b&0x7F) << shift
  11864. if b < 0x80 {
  11865. break
  11866. }
  11867. }
  11868. intStringLen := int(stringLen)
  11869. if intStringLen < 0 {
  11870. return ErrInvalidLengthTypes
  11871. }
  11872. postIndex := iNdEx + intStringLen
  11873. if postIndex < 0 {
  11874. return ErrInvalidLengthTypes
  11875. }
  11876. if postIndex > l {
  11877. return io.ErrUnexpectedEOF
  11878. }
  11879. m.Value = string(dAtA[iNdEx:postIndex])
  11880. iNdEx = postIndex
  11881. case 3:
  11882. if wireType != 0 {
  11883. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  11884. }
  11885. var v int
  11886. for shift := uint(0); ; shift += 7 {
  11887. if shift >= 64 {
  11888. return ErrIntOverflowTypes
  11889. }
  11890. if iNdEx >= l {
  11891. return io.ErrUnexpectedEOF
  11892. }
  11893. b := dAtA[iNdEx]
  11894. iNdEx++
  11895. v |= int(b&0x7F) << shift
  11896. if b < 0x80 {
  11897. break
  11898. }
  11899. }
  11900. m.Index = bool(v != 0)
  11901. default:
  11902. iNdEx = preIndex
  11903. skippy, err := skipTypes(dAtA[iNdEx:])
  11904. if err != nil {
  11905. return err
  11906. }
  11907. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11908. return ErrInvalidLengthTypes
  11909. }
  11910. if (iNdEx + skippy) > l {
  11911. return io.ErrUnexpectedEOF
  11912. }
  11913. iNdEx += skippy
  11914. }
  11915. }
  11916. if iNdEx > l {
  11917. return io.ErrUnexpectedEOF
  11918. }
  11919. return nil
  11920. }
  11921. func (m *TxResult) Unmarshal(dAtA []byte) error {
  11922. l := len(dAtA)
  11923. iNdEx := 0
  11924. for iNdEx < l {
  11925. preIndex := iNdEx
  11926. var wire uint64
  11927. for shift := uint(0); ; shift += 7 {
  11928. if shift >= 64 {
  11929. return ErrIntOverflowTypes
  11930. }
  11931. if iNdEx >= l {
  11932. return io.ErrUnexpectedEOF
  11933. }
  11934. b := dAtA[iNdEx]
  11935. iNdEx++
  11936. wire |= uint64(b&0x7F) << shift
  11937. if b < 0x80 {
  11938. break
  11939. }
  11940. }
  11941. fieldNum := int32(wire >> 3)
  11942. wireType := int(wire & 0x7)
  11943. if wireType == 4 {
  11944. return fmt.Errorf("proto: TxResult: wiretype end group for non-group")
  11945. }
  11946. if fieldNum <= 0 {
  11947. return fmt.Errorf("proto: TxResult: illegal tag %d (wire type %d)", fieldNum, wire)
  11948. }
  11949. switch fieldNum {
  11950. case 1:
  11951. if wireType != 0 {
  11952. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  11953. }
  11954. m.Height = 0
  11955. for shift := uint(0); ; shift += 7 {
  11956. if shift >= 64 {
  11957. return ErrIntOverflowTypes
  11958. }
  11959. if iNdEx >= l {
  11960. return io.ErrUnexpectedEOF
  11961. }
  11962. b := dAtA[iNdEx]
  11963. iNdEx++
  11964. m.Height |= int64(b&0x7F) << shift
  11965. if b < 0x80 {
  11966. break
  11967. }
  11968. }
  11969. case 2:
  11970. if wireType != 0 {
  11971. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  11972. }
  11973. m.Index = 0
  11974. for shift := uint(0); ; shift += 7 {
  11975. if shift >= 64 {
  11976. return ErrIntOverflowTypes
  11977. }
  11978. if iNdEx >= l {
  11979. return io.ErrUnexpectedEOF
  11980. }
  11981. b := dAtA[iNdEx]
  11982. iNdEx++
  11983. m.Index |= uint32(b&0x7F) << shift
  11984. if b < 0x80 {
  11985. break
  11986. }
  11987. }
  11988. case 3:
  11989. if wireType != 2 {
  11990. return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
  11991. }
  11992. var byteLen int
  11993. for shift := uint(0); ; shift += 7 {
  11994. if shift >= 64 {
  11995. return ErrIntOverflowTypes
  11996. }
  11997. if iNdEx >= l {
  11998. return io.ErrUnexpectedEOF
  11999. }
  12000. b := dAtA[iNdEx]
  12001. iNdEx++
  12002. byteLen |= int(b&0x7F) << shift
  12003. if b < 0x80 {
  12004. break
  12005. }
  12006. }
  12007. if byteLen < 0 {
  12008. return ErrInvalidLengthTypes
  12009. }
  12010. postIndex := iNdEx + byteLen
  12011. if postIndex < 0 {
  12012. return ErrInvalidLengthTypes
  12013. }
  12014. if postIndex > l {
  12015. return io.ErrUnexpectedEOF
  12016. }
  12017. m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...)
  12018. if m.Tx == nil {
  12019. m.Tx = []byte{}
  12020. }
  12021. iNdEx = postIndex
  12022. case 4:
  12023. if wireType != 2 {
  12024. return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
  12025. }
  12026. var msglen int
  12027. for shift := uint(0); ; shift += 7 {
  12028. if shift >= 64 {
  12029. return ErrIntOverflowTypes
  12030. }
  12031. if iNdEx >= l {
  12032. return io.ErrUnexpectedEOF
  12033. }
  12034. b := dAtA[iNdEx]
  12035. iNdEx++
  12036. msglen |= int(b&0x7F) << shift
  12037. if b < 0x80 {
  12038. break
  12039. }
  12040. }
  12041. if msglen < 0 {
  12042. return ErrInvalidLengthTypes
  12043. }
  12044. postIndex := iNdEx + msglen
  12045. if postIndex < 0 {
  12046. return ErrInvalidLengthTypes
  12047. }
  12048. if postIndex > l {
  12049. return io.ErrUnexpectedEOF
  12050. }
  12051. if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12052. return err
  12053. }
  12054. iNdEx = postIndex
  12055. default:
  12056. iNdEx = preIndex
  12057. skippy, err := skipTypes(dAtA[iNdEx:])
  12058. if err != nil {
  12059. return err
  12060. }
  12061. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12062. return ErrInvalidLengthTypes
  12063. }
  12064. if (iNdEx + skippy) > l {
  12065. return io.ErrUnexpectedEOF
  12066. }
  12067. iNdEx += skippy
  12068. }
  12069. }
  12070. if iNdEx > l {
  12071. return io.ErrUnexpectedEOF
  12072. }
  12073. return nil
  12074. }
  12075. func (m *Validator) Unmarshal(dAtA []byte) error {
  12076. l := len(dAtA)
  12077. iNdEx := 0
  12078. for iNdEx < l {
  12079. preIndex := iNdEx
  12080. var wire uint64
  12081. for shift := uint(0); ; shift += 7 {
  12082. if shift >= 64 {
  12083. return ErrIntOverflowTypes
  12084. }
  12085. if iNdEx >= l {
  12086. return io.ErrUnexpectedEOF
  12087. }
  12088. b := dAtA[iNdEx]
  12089. iNdEx++
  12090. wire |= uint64(b&0x7F) << shift
  12091. if b < 0x80 {
  12092. break
  12093. }
  12094. }
  12095. fieldNum := int32(wire >> 3)
  12096. wireType := int(wire & 0x7)
  12097. if wireType == 4 {
  12098. return fmt.Errorf("proto: Validator: wiretype end group for non-group")
  12099. }
  12100. if fieldNum <= 0 {
  12101. return fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire)
  12102. }
  12103. switch fieldNum {
  12104. case 1:
  12105. if wireType != 2 {
  12106. return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
  12107. }
  12108. var byteLen int
  12109. for shift := uint(0); ; shift += 7 {
  12110. if shift >= 64 {
  12111. return ErrIntOverflowTypes
  12112. }
  12113. if iNdEx >= l {
  12114. return io.ErrUnexpectedEOF
  12115. }
  12116. b := dAtA[iNdEx]
  12117. iNdEx++
  12118. byteLen |= int(b&0x7F) << shift
  12119. if b < 0x80 {
  12120. break
  12121. }
  12122. }
  12123. if byteLen < 0 {
  12124. return ErrInvalidLengthTypes
  12125. }
  12126. postIndex := iNdEx + byteLen
  12127. if postIndex < 0 {
  12128. return ErrInvalidLengthTypes
  12129. }
  12130. if postIndex > l {
  12131. return io.ErrUnexpectedEOF
  12132. }
  12133. m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...)
  12134. if m.Address == nil {
  12135. m.Address = []byte{}
  12136. }
  12137. iNdEx = postIndex
  12138. case 3:
  12139. if wireType != 0 {
  12140. return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType)
  12141. }
  12142. m.Power = 0
  12143. for shift := uint(0); ; shift += 7 {
  12144. if shift >= 64 {
  12145. return ErrIntOverflowTypes
  12146. }
  12147. if iNdEx >= l {
  12148. return io.ErrUnexpectedEOF
  12149. }
  12150. b := dAtA[iNdEx]
  12151. iNdEx++
  12152. m.Power |= int64(b&0x7F) << shift
  12153. if b < 0x80 {
  12154. break
  12155. }
  12156. }
  12157. default:
  12158. iNdEx = preIndex
  12159. skippy, err := skipTypes(dAtA[iNdEx:])
  12160. if err != nil {
  12161. return err
  12162. }
  12163. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12164. return ErrInvalidLengthTypes
  12165. }
  12166. if (iNdEx + skippy) > l {
  12167. return io.ErrUnexpectedEOF
  12168. }
  12169. iNdEx += skippy
  12170. }
  12171. }
  12172. if iNdEx > l {
  12173. return io.ErrUnexpectedEOF
  12174. }
  12175. return nil
  12176. }
  12177. func (m *ValidatorUpdate) Unmarshal(dAtA []byte) error {
  12178. l := len(dAtA)
  12179. iNdEx := 0
  12180. for iNdEx < l {
  12181. preIndex := iNdEx
  12182. var wire uint64
  12183. for shift := uint(0); ; shift += 7 {
  12184. if shift >= 64 {
  12185. return ErrIntOverflowTypes
  12186. }
  12187. if iNdEx >= l {
  12188. return io.ErrUnexpectedEOF
  12189. }
  12190. b := dAtA[iNdEx]
  12191. iNdEx++
  12192. wire |= uint64(b&0x7F) << shift
  12193. if b < 0x80 {
  12194. break
  12195. }
  12196. }
  12197. fieldNum := int32(wire >> 3)
  12198. wireType := int(wire & 0x7)
  12199. if wireType == 4 {
  12200. return fmt.Errorf("proto: ValidatorUpdate: wiretype end group for non-group")
  12201. }
  12202. if fieldNum <= 0 {
  12203. return fmt.Errorf("proto: ValidatorUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
  12204. }
  12205. switch fieldNum {
  12206. case 1:
  12207. if wireType != 2 {
  12208. return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType)
  12209. }
  12210. var msglen int
  12211. for shift := uint(0); ; shift += 7 {
  12212. if shift >= 64 {
  12213. return ErrIntOverflowTypes
  12214. }
  12215. if iNdEx >= l {
  12216. return io.ErrUnexpectedEOF
  12217. }
  12218. b := dAtA[iNdEx]
  12219. iNdEx++
  12220. msglen |= int(b&0x7F) << shift
  12221. if b < 0x80 {
  12222. break
  12223. }
  12224. }
  12225. if msglen < 0 {
  12226. return ErrInvalidLengthTypes
  12227. }
  12228. postIndex := iNdEx + msglen
  12229. if postIndex < 0 {
  12230. return ErrInvalidLengthTypes
  12231. }
  12232. if postIndex > l {
  12233. return io.ErrUnexpectedEOF
  12234. }
  12235. if err := m.PubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12236. return err
  12237. }
  12238. iNdEx = postIndex
  12239. case 2:
  12240. if wireType != 0 {
  12241. return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType)
  12242. }
  12243. m.Power = 0
  12244. for shift := uint(0); ; shift += 7 {
  12245. if shift >= 64 {
  12246. return ErrIntOverflowTypes
  12247. }
  12248. if iNdEx >= l {
  12249. return io.ErrUnexpectedEOF
  12250. }
  12251. b := dAtA[iNdEx]
  12252. iNdEx++
  12253. m.Power |= int64(b&0x7F) << shift
  12254. if b < 0x80 {
  12255. break
  12256. }
  12257. }
  12258. default:
  12259. iNdEx = preIndex
  12260. skippy, err := skipTypes(dAtA[iNdEx:])
  12261. if err != nil {
  12262. return err
  12263. }
  12264. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12265. return ErrInvalidLengthTypes
  12266. }
  12267. if (iNdEx + skippy) > l {
  12268. return io.ErrUnexpectedEOF
  12269. }
  12270. iNdEx += skippy
  12271. }
  12272. }
  12273. if iNdEx > l {
  12274. return io.ErrUnexpectedEOF
  12275. }
  12276. return nil
  12277. }
  12278. func (m *VoteInfo) Unmarshal(dAtA []byte) error {
  12279. l := len(dAtA)
  12280. iNdEx := 0
  12281. for iNdEx < l {
  12282. preIndex := iNdEx
  12283. var wire uint64
  12284. for shift := uint(0); ; shift += 7 {
  12285. if shift >= 64 {
  12286. return ErrIntOverflowTypes
  12287. }
  12288. if iNdEx >= l {
  12289. return io.ErrUnexpectedEOF
  12290. }
  12291. b := dAtA[iNdEx]
  12292. iNdEx++
  12293. wire |= uint64(b&0x7F) << shift
  12294. if b < 0x80 {
  12295. break
  12296. }
  12297. }
  12298. fieldNum := int32(wire >> 3)
  12299. wireType := int(wire & 0x7)
  12300. if wireType == 4 {
  12301. return fmt.Errorf("proto: VoteInfo: wiretype end group for non-group")
  12302. }
  12303. if fieldNum <= 0 {
  12304. return fmt.Errorf("proto: VoteInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  12305. }
  12306. switch fieldNum {
  12307. case 1:
  12308. if wireType != 2 {
  12309. return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType)
  12310. }
  12311. var msglen int
  12312. for shift := uint(0); ; shift += 7 {
  12313. if shift >= 64 {
  12314. return ErrIntOverflowTypes
  12315. }
  12316. if iNdEx >= l {
  12317. return io.ErrUnexpectedEOF
  12318. }
  12319. b := dAtA[iNdEx]
  12320. iNdEx++
  12321. msglen |= int(b&0x7F) << shift
  12322. if b < 0x80 {
  12323. break
  12324. }
  12325. }
  12326. if msglen < 0 {
  12327. return ErrInvalidLengthTypes
  12328. }
  12329. postIndex := iNdEx + msglen
  12330. if postIndex < 0 {
  12331. return ErrInvalidLengthTypes
  12332. }
  12333. if postIndex > l {
  12334. return io.ErrUnexpectedEOF
  12335. }
  12336. if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12337. return err
  12338. }
  12339. iNdEx = postIndex
  12340. case 2:
  12341. if wireType != 0 {
  12342. return fmt.Errorf("proto: wrong wireType = %d for field SignedLastBlock", wireType)
  12343. }
  12344. var v int
  12345. for shift := uint(0); ; shift += 7 {
  12346. if shift >= 64 {
  12347. return ErrIntOverflowTypes
  12348. }
  12349. if iNdEx >= l {
  12350. return io.ErrUnexpectedEOF
  12351. }
  12352. b := dAtA[iNdEx]
  12353. iNdEx++
  12354. v |= int(b&0x7F) << shift
  12355. if b < 0x80 {
  12356. break
  12357. }
  12358. }
  12359. m.SignedLastBlock = bool(v != 0)
  12360. default:
  12361. iNdEx = preIndex
  12362. skippy, err := skipTypes(dAtA[iNdEx:])
  12363. if err != nil {
  12364. return err
  12365. }
  12366. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12367. return ErrInvalidLengthTypes
  12368. }
  12369. if (iNdEx + skippy) > l {
  12370. return io.ErrUnexpectedEOF
  12371. }
  12372. iNdEx += skippy
  12373. }
  12374. }
  12375. if iNdEx > l {
  12376. return io.ErrUnexpectedEOF
  12377. }
  12378. return nil
  12379. }
  12380. func (m *Evidence) Unmarshal(dAtA []byte) error {
  12381. l := len(dAtA)
  12382. iNdEx := 0
  12383. for iNdEx < l {
  12384. preIndex := iNdEx
  12385. var wire uint64
  12386. for shift := uint(0); ; shift += 7 {
  12387. if shift >= 64 {
  12388. return ErrIntOverflowTypes
  12389. }
  12390. if iNdEx >= l {
  12391. return io.ErrUnexpectedEOF
  12392. }
  12393. b := dAtA[iNdEx]
  12394. iNdEx++
  12395. wire |= uint64(b&0x7F) << shift
  12396. if b < 0x80 {
  12397. break
  12398. }
  12399. }
  12400. fieldNum := int32(wire >> 3)
  12401. wireType := int(wire & 0x7)
  12402. if wireType == 4 {
  12403. return fmt.Errorf("proto: Evidence: wiretype end group for non-group")
  12404. }
  12405. if fieldNum <= 0 {
  12406. return fmt.Errorf("proto: Evidence: illegal tag %d (wire type %d)", fieldNum, wire)
  12407. }
  12408. switch fieldNum {
  12409. case 1:
  12410. if wireType != 0 {
  12411. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  12412. }
  12413. m.Type = 0
  12414. for shift := uint(0); ; shift += 7 {
  12415. if shift >= 64 {
  12416. return ErrIntOverflowTypes
  12417. }
  12418. if iNdEx >= l {
  12419. return io.ErrUnexpectedEOF
  12420. }
  12421. b := dAtA[iNdEx]
  12422. iNdEx++
  12423. m.Type |= EvidenceType(b&0x7F) << shift
  12424. if b < 0x80 {
  12425. break
  12426. }
  12427. }
  12428. case 2:
  12429. if wireType != 2 {
  12430. return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType)
  12431. }
  12432. var msglen int
  12433. for shift := uint(0); ; shift += 7 {
  12434. if shift >= 64 {
  12435. return ErrIntOverflowTypes
  12436. }
  12437. if iNdEx >= l {
  12438. return io.ErrUnexpectedEOF
  12439. }
  12440. b := dAtA[iNdEx]
  12441. iNdEx++
  12442. msglen |= int(b&0x7F) << shift
  12443. if b < 0x80 {
  12444. break
  12445. }
  12446. }
  12447. if msglen < 0 {
  12448. return ErrInvalidLengthTypes
  12449. }
  12450. postIndex := iNdEx + msglen
  12451. if postIndex < 0 {
  12452. return ErrInvalidLengthTypes
  12453. }
  12454. if postIndex > l {
  12455. return io.ErrUnexpectedEOF
  12456. }
  12457. if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12458. return err
  12459. }
  12460. iNdEx = postIndex
  12461. case 3:
  12462. if wireType != 0 {
  12463. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  12464. }
  12465. m.Height = 0
  12466. for shift := uint(0); ; shift += 7 {
  12467. if shift >= 64 {
  12468. return ErrIntOverflowTypes
  12469. }
  12470. if iNdEx >= l {
  12471. return io.ErrUnexpectedEOF
  12472. }
  12473. b := dAtA[iNdEx]
  12474. iNdEx++
  12475. m.Height |= int64(b&0x7F) << shift
  12476. if b < 0x80 {
  12477. break
  12478. }
  12479. }
  12480. case 4:
  12481. if wireType != 2 {
  12482. return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
  12483. }
  12484. var msglen int
  12485. for shift := uint(0); ; shift += 7 {
  12486. if shift >= 64 {
  12487. return ErrIntOverflowTypes
  12488. }
  12489. if iNdEx >= l {
  12490. return io.ErrUnexpectedEOF
  12491. }
  12492. b := dAtA[iNdEx]
  12493. iNdEx++
  12494. msglen |= int(b&0x7F) << shift
  12495. if b < 0x80 {
  12496. break
  12497. }
  12498. }
  12499. if msglen < 0 {
  12500. return ErrInvalidLengthTypes
  12501. }
  12502. postIndex := iNdEx + msglen
  12503. if postIndex < 0 {
  12504. return ErrInvalidLengthTypes
  12505. }
  12506. if postIndex > l {
  12507. return io.ErrUnexpectedEOF
  12508. }
  12509. if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil {
  12510. return err
  12511. }
  12512. iNdEx = postIndex
  12513. case 5:
  12514. if wireType != 0 {
  12515. return fmt.Errorf("proto: wrong wireType = %d for field TotalVotingPower", wireType)
  12516. }
  12517. m.TotalVotingPower = 0
  12518. for shift := uint(0); ; shift += 7 {
  12519. if shift >= 64 {
  12520. return ErrIntOverflowTypes
  12521. }
  12522. if iNdEx >= l {
  12523. return io.ErrUnexpectedEOF
  12524. }
  12525. b := dAtA[iNdEx]
  12526. iNdEx++
  12527. m.TotalVotingPower |= int64(b&0x7F) << shift
  12528. if b < 0x80 {
  12529. break
  12530. }
  12531. }
  12532. default:
  12533. iNdEx = preIndex
  12534. skippy, err := skipTypes(dAtA[iNdEx:])
  12535. if err != nil {
  12536. return err
  12537. }
  12538. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12539. return ErrInvalidLengthTypes
  12540. }
  12541. if (iNdEx + skippy) > l {
  12542. return io.ErrUnexpectedEOF
  12543. }
  12544. iNdEx += skippy
  12545. }
  12546. }
  12547. if iNdEx > l {
  12548. return io.ErrUnexpectedEOF
  12549. }
  12550. return nil
  12551. }
  12552. func (m *Snapshot) Unmarshal(dAtA []byte) error {
  12553. l := len(dAtA)
  12554. iNdEx := 0
  12555. for iNdEx < l {
  12556. preIndex := iNdEx
  12557. var wire uint64
  12558. for shift := uint(0); ; shift += 7 {
  12559. if shift >= 64 {
  12560. return ErrIntOverflowTypes
  12561. }
  12562. if iNdEx >= l {
  12563. return io.ErrUnexpectedEOF
  12564. }
  12565. b := dAtA[iNdEx]
  12566. iNdEx++
  12567. wire |= uint64(b&0x7F) << shift
  12568. if b < 0x80 {
  12569. break
  12570. }
  12571. }
  12572. fieldNum := int32(wire >> 3)
  12573. wireType := int(wire & 0x7)
  12574. if wireType == 4 {
  12575. return fmt.Errorf("proto: Snapshot: wiretype end group for non-group")
  12576. }
  12577. if fieldNum <= 0 {
  12578. return fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire)
  12579. }
  12580. switch fieldNum {
  12581. case 1:
  12582. if wireType != 0 {
  12583. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  12584. }
  12585. m.Height = 0
  12586. for shift := uint(0); ; shift += 7 {
  12587. if shift >= 64 {
  12588. return ErrIntOverflowTypes
  12589. }
  12590. if iNdEx >= l {
  12591. return io.ErrUnexpectedEOF
  12592. }
  12593. b := dAtA[iNdEx]
  12594. iNdEx++
  12595. m.Height |= uint64(b&0x7F) << shift
  12596. if b < 0x80 {
  12597. break
  12598. }
  12599. }
  12600. case 2:
  12601. if wireType != 0 {
  12602. return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType)
  12603. }
  12604. m.Format = 0
  12605. for shift := uint(0); ; shift += 7 {
  12606. if shift >= 64 {
  12607. return ErrIntOverflowTypes
  12608. }
  12609. if iNdEx >= l {
  12610. return io.ErrUnexpectedEOF
  12611. }
  12612. b := dAtA[iNdEx]
  12613. iNdEx++
  12614. m.Format |= uint32(b&0x7F) << shift
  12615. if b < 0x80 {
  12616. break
  12617. }
  12618. }
  12619. case 3:
  12620. if wireType != 0 {
  12621. return fmt.Errorf("proto: wrong wireType = %d for field Chunks", wireType)
  12622. }
  12623. m.Chunks = 0
  12624. for shift := uint(0); ; shift += 7 {
  12625. if shift >= 64 {
  12626. return ErrIntOverflowTypes
  12627. }
  12628. if iNdEx >= l {
  12629. return io.ErrUnexpectedEOF
  12630. }
  12631. b := dAtA[iNdEx]
  12632. iNdEx++
  12633. m.Chunks |= uint32(b&0x7F) << shift
  12634. if b < 0x80 {
  12635. break
  12636. }
  12637. }
  12638. case 4:
  12639. if wireType != 2 {
  12640. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  12641. }
  12642. var byteLen int
  12643. for shift := uint(0); ; shift += 7 {
  12644. if shift >= 64 {
  12645. return ErrIntOverflowTypes
  12646. }
  12647. if iNdEx >= l {
  12648. return io.ErrUnexpectedEOF
  12649. }
  12650. b := dAtA[iNdEx]
  12651. iNdEx++
  12652. byteLen |= int(b&0x7F) << shift
  12653. if b < 0x80 {
  12654. break
  12655. }
  12656. }
  12657. if byteLen < 0 {
  12658. return ErrInvalidLengthTypes
  12659. }
  12660. postIndex := iNdEx + byteLen
  12661. if postIndex < 0 {
  12662. return ErrInvalidLengthTypes
  12663. }
  12664. if postIndex > l {
  12665. return io.ErrUnexpectedEOF
  12666. }
  12667. m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  12668. if m.Hash == nil {
  12669. m.Hash = []byte{}
  12670. }
  12671. iNdEx = postIndex
  12672. case 5:
  12673. if wireType != 2 {
  12674. return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
  12675. }
  12676. var byteLen int
  12677. for shift := uint(0); ; shift += 7 {
  12678. if shift >= 64 {
  12679. return ErrIntOverflowTypes
  12680. }
  12681. if iNdEx >= l {
  12682. return io.ErrUnexpectedEOF
  12683. }
  12684. b := dAtA[iNdEx]
  12685. iNdEx++
  12686. byteLen |= int(b&0x7F) << shift
  12687. if b < 0x80 {
  12688. break
  12689. }
  12690. }
  12691. if byteLen < 0 {
  12692. return ErrInvalidLengthTypes
  12693. }
  12694. postIndex := iNdEx + byteLen
  12695. if postIndex < 0 {
  12696. return ErrInvalidLengthTypes
  12697. }
  12698. if postIndex > l {
  12699. return io.ErrUnexpectedEOF
  12700. }
  12701. m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...)
  12702. if m.Metadata == nil {
  12703. m.Metadata = []byte{}
  12704. }
  12705. iNdEx = postIndex
  12706. default:
  12707. iNdEx = preIndex
  12708. skippy, err := skipTypes(dAtA[iNdEx:])
  12709. if err != nil {
  12710. return err
  12711. }
  12712. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12713. return ErrInvalidLengthTypes
  12714. }
  12715. if (iNdEx + skippy) > l {
  12716. return io.ErrUnexpectedEOF
  12717. }
  12718. iNdEx += skippy
  12719. }
  12720. }
  12721. if iNdEx > l {
  12722. return io.ErrUnexpectedEOF
  12723. }
  12724. return nil
  12725. }
  12726. func skipTypes(dAtA []byte) (n int, err error) {
  12727. l := len(dAtA)
  12728. iNdEx := 0
  12729. depth := 0
  12730. for iNdEx < l {
  12731. var wire uint64
  12732. for shift := uint(0); ; shift += 7 {
  12733. if shift >= 64 {
  12734. return 0, ErrIntOverflowTypes
  12735. }
  12736. if iNdEx >= l {
  12737. return 0, io.ErrUnexpectedEOF
  12738. }
  12739. b := dAtA[iNdEx]
  12740. iNdEx++
  12741. wire |= (uint64(b) & 0x7F) << shift
  12742. if b < 0x80 {
  12743. break
  12744. }
  12745. }
  12746. wireType := int(wire & 0x7)
  12747. switch wireType {
  12748. case 0:
  12749. for shift := uint(0); ; shift += 7 {
  12750. if shift >= 64 {
  12751. return 0, ErrIntOverflowTypes
  12752. }
  12753. if iNdEx >= l {
  12754. return 0, io.ErrUnexpectedEOF
  12755. }
  12756. iNdEx++
  12757. if dAtA[iNdEx-1] < 0x80 {
  12758. break
  12759. }
  12760. }
  12761. case 1:
  12762. iNdEx += 8
  12763. case 2:
  12764. var length int
  12765. for shift := uint(0); ; shift += 7 {
  12766. if shift >= 64 {
  12767. return 0, ErrIntOverflowTypes
  12768. }
  12769. if iNdEx >= l {
  12770. return 0, io.ErrUnexpectedEOF
  12771. }
  12772. b := dAtA[iNdEx]
  12773. iNdEx++
  12774. length |= (int(b) & 0x7F) << shift
  12775. if b < 0x80 {
  12776. break
  12777. }
  12778. }
  12779. if length < 0 {
  12780. return 0, ErrInvalidLengthTypes
  12781. }
  12782. iNdEx += length
  12783. case 3:
  12784. depth++
  12785. case 4:
  12786. if depth == 0 {
  12787. return 0, ErrUnexpectedEndOfGroupTypes
  12788. }
  12789. depth--
  12790. case 5:
  12791. iNdEx += 4
  12792. default:
  12793. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  12794. }
  12795. if iNdEx < 0 {
  12796. return 0, ErrInvalidLengthTypes
  12797. }
  12798. if depth == 0 {
  12799. return iNdEx, nil
  12800. }
  12801. }
  12802. return 0, io.ErrUnexpectedEOF
  12803. }
  12804. var (
  12805. ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
  12806. ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
  12807. ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
  12808. )