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.

13237 lines
317 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
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. }
  1651. func (m *ResponseCheckTx) Reset() { *m = ResponseCheckTx{} }
  1652. func (m *ResponseCheckTx) String() string { return proto.CompactTextString(m) }
  1653. func (*ResponseCheckTx) ProtoMessage() {}
  1654. func (*ResponseCheckTx) Descriptor() ([]byte, []int) {
  1655. return fileDescriptor_252557cfdd89a31a, []int{23}
  1656. }
  1657. func (m *ResponseCheckTx) XXX_Unmarshal(b []byte) error {
  1658. return m.Unmarshal(b)
  1659. }
  1660. func (m *ResponseCheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1661. if deterministic {
  1662. return xxx_messageInfo_ResponseCheckTx.Marshal(b, m, deterministic)
  1663. } else {
  1664. b = b[:cap(b)]
  1665. n, err := m.MarshalToSizedBuffer(b)
  1666. if err != nil {
  1667. return nil, err
  1668. }
  1669. return b[:n], nil
  1670. }
  1671. }
  1672. func (m *ResponseCheckTx) XXX_Merge(src proto.Message) {
  1673. xxx_messageInfo_ResponseCheckTx.Merge(m, src)
  1674. }
  1675. func (m *ResponseCheckTx) XXX_Size() int {
  1676. return m.Size()
  1677. }
  1678. func (m *ResponseCheckTx) XXX_DiscardUnknown() {
  1679. xxx_messageInfo_ResponseCheckTx.DiscardUnknown(m)
  1680. }
  1681. var xxx_messageInfo_ResponseCheckTx proto.InternalMessageInfo
  1682. func (m *ResponseCheckTx) GetCode() uint32 {
  1683. if m != nil {
  1684. return m.Code
  1685. }
  1686. return 0
  1687. }
  1688. func (m *ResponseCheckTx) GetData() []byte {
  1689. if m != nil {
  1690. return m.Data
  1691. }
  1692. return nil
  1693. }
  1694. func (m *ResponseCheckTx) GetLog() string {
  1695. if m != nil {
  1696. return m.Log
  1697. }
  1698. return ""
  1699. }
  1700. func (m *ResponseCheckTx) GetInfo() string {
  1701. if m != nil {
  1702. return m.Info
  1703. }
  1704. return ""
  1705. }
  1706. func (m *ResponseCheckTx) GetGasWanted() int64 {
  1707. if m != nil {
  1708. return m.GasWanted
  1709. }
  1710. return 0
  1711. }
  1712. func (m *ResponseCheckTx) GetGasUsed() int64 {
  1713. if m != nil {
  1714. return m.GasUsed
  1715. }
  1716. return 0
  1717. }
  1718. func (m *ResponseCheckTx) GetEvents() []Event {
  1719. if m != nil {
  1720. return m.Events
  1721. }
  1722. return nil
  1723. }
  1724. func (m *ResponseCheckTx) GetCodespace() string {
  1725. if m != nil {
  1726. return m.Codespace
  1727. }
  1728. return ""
  1729. }
  1730. type ResponseDeliverTx struct {
  1731. Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
  1732. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  1733. Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
  1734. Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
  1735. GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,proto3" json:"gas_wanted,omitempty"`
  1736. GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,proto3" json:"gas_used,omitempty"`
  1737. Events []Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"`
  1738. Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"`
  1739. }
  1740. func (m *ResponseDeliverTx) Reset() { *m = ResponseDeliverTx{} }
  1741. func (m *ResponseDeliverTx) String() string { return proto.CompactTextString(m) }
  1742. func (*ResponseDeliverTx) ProtoMessage() {}
  1743. func (*ResponseDeliverTx) Descriptor() ([]byte, []int) {
  1744. return fileDescriptor_252557cfdd89a31a, []int{24}
  1745. }
  1746. func (m *ResponseDeliverTx) XXX_Unmarshal(b []byte) error {
  1747. return m.Unmarshal(b)
  1748. }
  1749. func (m *ResponseDeliverTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1750. if deterministic {
  1751. return xxx_messageInfo_ResponseDeliverTx.Marshal(b, m, deterministic)
  1752. } else {
  1753. b = b[:cap(b)]
  1754. n, err := m.MarshalToSizedBuffer(b)
  1755. if err != nil {
  1756. return nil, err
  1757. }
  1758. return b[:n], nil
  1759. }
  1760. }
  1761. func (m *ResponseDeliverTx) XXX_Merge(src proto.Message) {
  1762. xxx_messageInfo_ResponseDeliverTx.Merge(m, src)
  1763. }
  1764. func (m *ResponseDeliverTx) XXX_Size() int {
  1765. return m.Size()
  1766. }
  1767. func (m *ResponseDeliverTx) XXX_DiscardUnknown() {
  1768. xxx_messageInfo_ResponseDeliverTx.DiscardUnknown(m)
  1769. }
  1770. var xxx_messageInfo_ResponseDeliverTx proto.InternalMessageInfo
  1771. func (m *ResponseDeliverTx) GetCode() uint32 {
  1772. if m != nil {
  1773. return m.Code
  1774. }
  1775. return 0
  1776. }
  1777. func (m *ResponseDeliverTx) GetData() []byte {
  1778. if m != nil {
  1779. return m.Data
  1780. }
  1781. return nil
  1782. }
  1783. func (m *ResponseDeliverTx) GetLog() string {
  1784. if m != nil {
  1785. return m.Log
  1786. }
  1787. return ""
  1788. }
  1789. func (m *ResponseDeliverTx) GetInfo() string {
  1790. if m != nil {
  1791. return m.Info
  1792. }
  1793. return ""
  1794. }
  1795. func (m *ResponseDeliverTx) GetGasWanted() int64 {
  1796. if m != nil {
  1797. return m.GasWanted
  1798. }
  1799. return 0
  1800. }
  1801. func (m *ResponseDeliverTx) GetGasUsed() int64 {
  1802. if m != nil {
  1803. return m.GasUsed
  1804. }
  1805. return 0
  1806. }
  1807. func (m *ResponseDeliverTx) GetEvents() []Event {
  1808. if m != nil {
  1809. return m.Events
  1810. }
  1811. return nil
  1812. }
  1813. func (m *ResponseDeliverTx) GetCodespace() string {
  1814. if m != nil {
  1815. return m.Codespace
  1816. }
  1817. return ""
  1818. }
  1819. type ResponseEndBlock struct {
  1820. ValidatorUpdates []ValidatorUpdate `protobuf:"bytes,1,rep,name=validator_updates,json=validatorUpdates,proto3" json:"validator_updates"`
  1821. ConsensusParamUpdates *types1.ConsensusParams `protobuf:"bytes,2,opt,name=consensus_param_updates,json=consensusParamUpdates,proto3" json:"consensus_param_updates,omitempty"`
  1822. Events []Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"`
  1823. }
  1824. func (m *ResponseEndBlock) Reset() { *m = ResponseEndBlock{} }
  1825. func (m *ResponseEndBlock) String() string { return proto.CompactTextString(m) }
  1826. func (*ResponseEndBlock) ProtoMessage() {}
  1827. func (*ResponseEndBlock) Descriptor() ([]byte, []int) {
  1828. return fileDescriptor_252557cfdd89a31a, []int{25}
  1829. }
  1830. func (m *ResponseEndBlock) XXX_Unmarshal(b []byte) error {
  1831. return m.Unmarshal(b)
  1832. }
  1833. func (m *ResponseEndBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1834. if deterministic {
  1835. return xxx_messageInfo_ResponseEndBlock.Marshal(b, m, deterministic)
  1836. } else {
  1837. b = b[:cap(b)]
  1838. n, err := m.MarshalToSizedBuffer(b)
  1839. if err != nil {
  1840. return nil, err
  1841. }
  1842. return b[:n], nil
  1843. }
  1844. }
  1845. func (m *ResponseEndBlock) XXX_Merge(src proto.Message) {
  1846. xxx_messageInfo_ResponseEndBlock.Merge(m, src)
  1847. }
  1848. func (m *ResponseEndBlock) XXX_Size() int {
  1849. return m.Size()
  1850. }
  1851. func (m *ResponseEndBlock) XXX_DiscardUnknown() {
  1852. xxx_messageInfo_ResponseEndBlock.DiscardUnknown(m)
  1853. }
  1854. var xxx_messageInfo_ResponseEndBlock proto.InternalMessageInfo
  1855. func (m *ResponseEndBlock) GetValidatorUpdates() []ValidatorUpdate {
  1856. if m != nil {
  1857. return m.ValidatorUpdates
  1858. }
  1859. return nil
  1860. }
  1861. func (m *ResponseEndBlock) GetConsensusParamUpdates() *types1.ConsensusParams {
  1862. if m != nil {
  1863. return m.ConsensusParamUpdates
  1864. }
  1865. return nil
  1866. }
  1867. func (m *ResponseEndBlock) GetEvents() []Event {
  1868. if m != nil {
  1869. return m.Events
  1870. }
  1871. return nil
  1872. }
  1873. type ResponseCommit struct {
  1874. // reserve 1
  1875. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  1876. RetainHeight int64 `protobuf:"varint,3,opt,name=retain_height,json=retainHeight,proto3" json:"retain_height,omitempty"`
  1877. }
  1878. func (m *ResponseCommit) Reset() { *m = ResponseCommit{} }
  1879. func (m *ResponseCommit) String() string { return proto.CompactTextString(m) }
  1880. func (*ResponseCommit) ProtoMessage() {}
  1881. func (*ResponseCommit) Descriptor() ([]byte, []int) {
  1882. return fileDescriptor_252557cfdd89a31a, []int{26}
  1883. }
  1884. func (m *ResponseCommit) XXX_Unmarshal(b []byte) error {
  1885. return m.Unmarshal(b)
  1886. }
  1887. func (m *ResponseCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1888. if deterministic {
  1889. return xxx_messageInfo_ResponseCommit.Marshal(b, m, deterministic)
  1890. } else {
  1891. b = b[:cap(b)]
  1892. n, err := m.MarshalToSizedBuffer(b)
  1893. if err != nil {
  1894. return nil, err
  1895. }
  1896. return b[:n], nil
  1897. }
  1898. }
  1899. func (m *ResponseCommit) XXX_Merge(src proto.Message) {
  1900. xxx_messageInfo_ResponseCommit.Merge(m, src)
  1901. }
  1902. func (m *ResponseCommit) XXX_Size() int {
  1903. return m.Size()
  1904. }
  1905. func (m *ResponseCommit) XXX_DiscardUnknown() {
  1906. xxx_messageInfo_ResponseCommit.DiscardUnknown(m)
  1907. }
  1908. var xxx_messageInfo_ResponseCommit proto.InternalMessageInfo
  1909. func (m *ResponseCommit) GetData() []byte {
  1910. if m != nil {
  1911. return m.Data
  1912. }
  1913. return nil
  1914. }
  1915. func (m *ResponseCommit) GetRetainHeight() int64 {
  1916. if m != nil {
  1917. return m.RetainHeight
  1918. }
  1919. return 0
  1920. }
  1921. type ResponseListSnapshots struct {
  1922. Snapshots []*Snapshot `protobuf:"bytes,1,rep,name=snapshots,proto3" json:"snapshots,omitempty"`
  1923. }
  1924. func (m *ResponseListSnapshots) Reset() { *m = ResponseListSnapshots{} }
  1925. func (m *ResponseListSnapshots) String() string { return proto.CompactTextString(m) }
  1926. func (*ResponseListSnapshots) ProtoMessage() {}
  1927. func (*ResponseListSnapshots) Descriptor() ([]byte, []int) {
  1928. return fileDescriptor_252557cfdd89a31a, []int{27}
  1929. }
  1930. func (m *ResponseListSnapshots) XXX_Unmarshal(b []byte) error {
  1931. return m.Unmarshal(b)
  1932. }
  1933. func (m *ResponseListSnapshots) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1934. if deterministic {
  1935. return xxx_messageInfo_ResponseListSnapshots.Marshal(b, m, deterministic)
  1936. } else {
  1937. b = b[:cap(b)]
  1938. n, err := m.MarshalToSizedBuffer(b)
  1939. if err != nil {
  1940. return nil, err
  1941. }
  1942. return b[:n], nil
  1943. }
  1944. }
  1945. func (m *ResponseListSnapshots) XXX_Merge(src proto.Message) {
  1946. xxx_messageInfo_ResponseListSnapshots.Merge(m, src)
  1947. }
  1948. func (m *ResponseListSnapshots) XXX_Size() int {
  1949. return m.Size()
  1950. }
  1951. func (m *ResponseListSnapshots) XXX_DiscardUnknown() {
  1952. xxx_messageInfo_ResponseListSnapshots.DiscardUnknown(m)
  1953. }
  1954. var xxx_messageInfo_ResponseListSnapshots proto.InternalMessageInfo
  1955. func (m *ResponseListSnapshots) GetSnapshots() []*Snapshot {
  1956. if m != nil {
  1957. return m.Snapshots
  1958. }
  1959. return nil
  1960. }
  1961. type ResponseOfferSnapshot struct {
  1962. Result ResponseOfferSnapshot_Result `protobuf:"varint,1,opt,name=result,proto3,enum=tendermint.abci.ResponseOfferSnapshot_Result" json:"result,omitempty"`
  1963. }
  1964. func (m *ResponseOfferSnapshot) Reset() { *m = ResponseOfferSnapshot{} }
  1965. func (m *ResponseOfferSnapshot) String() string { return proto.CompactTextString(m) }
  1966. func (*ResponseOfferSnapshot) ProtoMessage() {}
  1967. func (*ResponseOfferSnapshot) Descriptor() ([]byte, []int) {
  1968. return fileDescriptor_252557cfdd89a31a, []int{28}
  1969. }
  1970. func (m *ResponseOfferSnapshot) XXX_Unmarshal(b []byte) error {
  1971. return m.Unmarshal(b)
  1972. }
  1973. func (m *ResponseOfferSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1974. if deterministic {
  1975. return xxx_messageInfo_ResponseOfferSnapshot.Marshal(b, m, deterministic)
  1976. } else {
  1977. b = b[:cap(b)]
  1978. n, err := m.MarshalToSizedBuffer(b)
  1979. if err != nil {
  1980. return nil, err
  1981. }
  1982. return b[:n], nil
  1983. }
  1984. }
  1985. func (m *ResponseOfferSnapshot) XXX_Merge(src proto.Message) {
  1986. xxx_messageInfo_ResponseOfferSnapshot.Merge(m, src)
  1987. }
  1988. func (m *ResponseOfferSnapshot) XXX_Size() int {
  1989. return m.Size()
  1990. }
  1991. func (m *ResponseOfferSnapshot) XXX_DiscardUnknown() {
  1992. xxx_messageInfo_ResponseOfferSnapshot.DiscardUnknown(m)
  1993. }
  1994. var xxx_messageInfo_ResponseOfferSnapshot proto.InternalMessageInfo
  1995. func (m *ResponseOfferSnapshot) GetResult() ResponseOfferSnapshot_Result {
  1996. if m != nil {
  1997. return m.Result
  1998. }
  1999. return ResponseOfferSnapshot_UNKNOWN
  2000. }
  2001. type ResponseLoadSnapshotChunk struct {
  2002. Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"`
  2003. }
  2004. func (m *ResponseLoadSnapshotChunk) Reset() { *m = ResponseLoadSnapshotChunk{} }
  2005. func (m *ResponseLoadSnapshotChunk) String() string { return proto.CompactTextString(m) }
  2006. func (*ResponseLoadSnapshotChunk) ProtoMessage() {}
  2007. func (*ResponseLoadSnapshotChunk) Descriptor() ([]byte, []int) {
  2008. return fileDescriptor_252557cfdd89a31a, []int{29}
  2009. }
  2010. func (m *ResponseLoadSnapshotChunk) XXX_Unmarshal(b []byte) error {
  2011. return m.Unmarshal(b)
  2012. }
  2013. func (m *ResponseLoadSnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2014. if deterministic {
  2015. return xxx_messageInfo_ResponseLoadSnapshotChunk.Marshal(b, m, deterministic)
  2016. } else {
  2017. b = b[:cap(b)]
  2018. n, err := m.MarshalToSizedBuffer(b)
  2019. if err != nil {
  2020. return nil, err
  2021. }
  2022. return b[:n], nil
  2023. }
  2024. }
  2025. func (m *ResponseLoadSnapshotChunk) XXX_Merge(src proto.Message) {
  2026. xxx_messageInfo_ResponseLoadSnapshotChunk.Merge(m, src)
  2027. }
  2028. func (m *ResponseLoadSnapshotChunk) XXX_Size() int {
  2029. return m.Size()
  2030. }
  2031. func (m *ResponseLoadSnapshotChunk) XXX_DiscardUnknown() {
  2032. xxx_messageInfo_ResponseLoadSnapshotChunk.DiscardUnknown(m)
  2033. }
  2034. var xxx_messageInfo_ResponseLoadSnapshotChunk proto.InternalMessageInfo
  2035. func (m *ResponseLoadSnapshotChunk) GetChunk() []byte {
  2036. if m != nil {
  2037. return m.Chunk
  2038. }
  2039. return nil
  2040. }
  2041. type ResponseApplySnapshotChunk struct {
  2042. Result ResponseApplySnapshotChunk_Result `protobuf:"varint,1,opt,name=result,proto3,enum=tendermint.abci.ResponseApplySnapshotChunk_Result" json:"result,omitempty"`
  2043. RefetchChunks []uint32 `protobuf:"varint,2,rep,packed,name=refetch_chunks,json=refetchChunks,proto3" json:"refetch_chunks,omitempty"`
  2044. RejectSenders []string `protobuf:"bytes,3,rep,name=reject_senders,json=rejectSenders,proto3" json:"reject_senders,omitempty"`
  2045. }
  2046. func (m *ResponseApplySnapshotChunk) Reset() { *m = ResponseApplySnapshotChunk{} }
  2047. func (m *ResponseApplySnapshotChunk) String() string { return proto.CompactTextString(m) }
  2048. func (*ResponseApplySnapshotChunk) ProtoMessage() {}
  2049. func (*ResponseApplySnapshotChunk) Descriptor() ([]byte, []int) {
  2050. return fileDescriptor_252557cfdd89a31a, []int{30}
  2051. }
  2052. func (m *ResponseApplySnapshotChunk) XXX_Unmarshal(b []byte) error {
  2053. return m.Unmarshal(b)
  2054. }
  2055. func (m *ResponseApplySnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2056. if deterministic {
  2057. return xxx_messageInfo_ResponseApplySnapshotChunk.Marshal(b, m, deterministic)
  2058. } else {
  2059. b = b[:cap(b)]
  2060. n, err := m.MarshalToSizedBuffer(b)
  2061. if err != nil {
  2062. return nil, err
  2063. }
  2064. return b[:n], nil
  2065. }
  2066. }
  2067. func (m *ResponseApplySnapshotChunk) XXX_Merge(src proto.Message) {
  2068. xxx_messageInfo_ResponseApplySnapshotChunk.Merge(m, src)
  2069. }
  2070. func (m *ResponseApplySnapshotChunk) XXX_Size() int {
  2071. return m.Size()
  2072. }
  2073. func (m *ResponseApplySnapshotChunk) XXX_DiscardUnknown() {
  2074. xxx_messageInfo_ResponseApplySnapshotChunk.DiscardUnknown(m)
  2075. }
  2076. var xxx_messageInfo_ResponseApplySnapshotChunk proto.InternalMessageInfo
  2077. func (m *ResponseApplySnapshotChunk) GetResult() ResponseApplySnapshotChunk_Result {
  2078. if m != nil {
  2079. return m.Result
  2080. }
  2081. return ResponseApplySnapshotChunk_UNKNOWN
  2082. }
  2083. func (m *ResponseApplySnapshotChunk) GetRefetchChunks() []uint32 {
  2084. if m != nil {
  2085. return m.RefetchChunks
  2086. }
  2087. return nil
  2088. }
  2089. func (m *ResponseApplySnapshotChunk) GetRejectSenders() []string {
  2090. if m != nil {
  2091. return m.RejectSenders
  2092. }
  2093. return nil
  2094. }
  2095. type LastCommitInfo struct {
  2096. Round int32 `protobuf:"varint,1,opt,name=round,proto3" json:"round,omitempty"`
  2097. Votes []VoteInfo `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes"`
  2098. }
  2099. func (m *LastCommitInfo) Reset() { *m = LastCommitInfo{} }
  2100. func (m *LastCommitInfo) String() string { return proto.CompactTextString(m) }
  2101. func (*LastCommitInfo) ProtoMessage() {}
  2102. func (*LastCommitInfo) Descriptor() ([]byte, []int) {
  2103. return fileDescriptor_252557cfdd89a31a, []int{31}
  2104. }
  2105. func (m *LastCommitInfo) XXX_Unmarshal(b []byte) error {
  2106. return m.Unmarshal(b)
  2107. }
  2108. func (m *LastCommitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2109. if deterministic {
  2110. return xxx_messageInfo_LastCommitInfo.Marshal(b, m, deterministic)
  2111. } else {
  2112. b = b[:cap(b)]
  2113. n, err := m.MarshalToSizedBuffer(b)
  2114. if err != nil {
  2115. return nil, err
  2116. }
  2117. return b[:n], nil
  2118. }
  2119. }
  2120. func (m *LastCommitInfo) XXX_Merge(src proto.Message) {
  2121. xxx_messageInfo_LastCommitInfo.Merge(m, src)
  2122. }
  2123. func (m *LastCommitInfo) XXX_Size() int {
  2124. return m.Size()
  2125. }
  2126. func (m *LastCommitInfo) XXX_DiscardUnknown() {
  2127. xxx_messageInfo_LastCommitInfo.DiscardUnknown(m)
  2128. }
  2129. var xxx_messageInfo_LastCommitInfo proto.InternalMessageInfo
  2130. func (m *LastCommitInfo) GetRound() int32 {
  2131. if m != nil {
  2132. return m.Round
  2133. }
  2134. return 0
  2135. }
  2136. func (m *LastCommitInfo) GetVotes() []VoteInfo {
  2137. if m != nil {
  2138. return m.Votes
  2139. }
  2140. return nil
  2141. }
  2142. // Event allows application developers to attach additional information to
  2143. // ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx.
  2144. // Later, transactions may be queried using these events.
  2145. type Event struct {
  2146. Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
  2147. Attributes []EventAttribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"`
  2148. }
  2149. func (m *Event) Reset() { *m = Event{} }
  2150. func (m *Event) String() string { return proto.CompactTextString(m) }
  2151. func (*Event) ProtoMessage() {}
  2152. func (*Event) Descriptor() ([]byte, []int) {
  2153. return fileDescriptor_252557cfdd89a31a, []int{32}
  2154. }
  2155. func (m *Event) XXX_Unmarshal(b []byte) error {
  2156. return m.Unmarshal(b)
  2157. }
  2158. func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2159. if deterministic {
  2160. return xxx_messageInfo_Event.Marshal(b, m, deterministic)
  2161. } else {
  2162. b = b[:cap(b)]
  2163. n, err := m.MarshalToSizedBuffer(b)
  2164. if err != nil {
  2165. return nil, err
  2166. }
  2167. return b[:n], nil
  2168. }
  2169. }
  2170. func (m *Event) XXX_Merge(src proto.Message) {
  2171. xxx_messageInfo_Event.Merge(m, src)
  2172. }
  2173. func (m *Event) XXX_Size() int {
  2174. return m.Size()
  2175. }
  2176. func (m *Event) XXX_DiscardUnknown() {
  2177. xxx_messageInfo_Event.DiscardUnknown(m)
  2178. }
  2179. var xxx_messageInfo_Event proto.InternalMessageInfo
  2180. func (m *Event) GetType() string {
  2181. if m != nil {
  2182. return m.Type
  2183. }
  2184. return ""
  2185. }
  2186. func (m *Event) GetAttributes() []EventAttribute {
  2187. if m != nil {
  2188. return m.Attributes
  2189. }
  2190. return nil
  2191. }
  2192. // EventAttribute is a single key-value pair, associated with an event.
  2193. type EventAttribute struct {
  2194. Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  2195. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
  2196. Index bool `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
  2197. }
  2198. func (m *EventAttribute) Reset() { *m = EventAttribute{} }
  2199. func (m *EventAttribute) String() string { return proto.CompactTextString(m) }
  2200. func (*EventAttribute) ProtoMessage() {}
  2201. func (*EventAttribute) Descriptor() ([]byte, []int) {
  2202. return fileDescriptor_252557cfdd89a31a, []int{33}
  2203. }
  2204. func (m *EventAttribute) XXX_Unmarshal(b []byte) error {
  2205. return m.Unmarshal(b)
  2206. }
  2207. func (m *EventAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2208. if deterministic {
  2209. return xxx_messageInfo_EventAttribute.Marshal(b, m, deterministic)
  2210. } else {
  2211. b = b[:cap(b)]
  2212. n, err := m.MarshalToSizedBuffer(b)
  2213. if err != nil {
  2214. return nil, err
  2215. }
  2216. return b[:n], nil
  2217. }
  2218. }
  2219. func (m *EventAttribute) XXX_Merge(src proto.Message) {
  2220. xxx_messageInfo_EventAttribute.Merge(m, src)
  2221. }
  2222. func (m *EventAttribute) XXX_Size() int {
  2223. return m.Size()
  2224. }
  2225. func (m *EventAttribute) XXX_DiscardUnknown() {
  2226. xxx_messageInfo_EventAttribute.DiscardUnknown(m)
  2227. }
  2228. var xxx_messageInfo_EventAttribute proto.InternalMessageInfo
  2229. func (m *EventAttribute) GetKey() []byte {
  2230. if m != nil {
  2231. return m.Key
  2232. }
  2233. return nil
  2234. }
  2235. func (m *EventAttribute) GetValue() []byte {
  2236. if m != nil {
  2237. return m.Value
  2238. }
  2239. return nil
  2240. }
  2241. func (m *EventAttribute) GetIndex() bool {
  2242. if m != nil {
  2243. return m.Index
  2244. }
  2245. return false
  2246. }
  2247. // TxResult contains results of executing the transaction.
  2248. //
  2249. // One usage is indexing transaction results.
  2250. type TxResult struct {
  2251. Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  2252. Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
  2253. Tx []byte `protobuf:"bytes,3,opt,name=tx,proto3" json:"tx,omitempty"`
  2254. Result ResponseDeliverTx `protobuf:"bytes,4,opt,name=result,proto3" json:"result"`
  2255. }
  2256. func (m *TxResult) Reset() { *m = TxResult{} }
  2257. func (m *TxResult) String() string { return proto.CompactTextString(m) }
  2258. func (*TxResult) ProtoMessage() {}
  2259. func (*TxResult) Descriptor() ([]byte, []int) {
  2260. return fileDescriptor_252557cfdd89a31a, []int{34}
  2261. }
  2262. func (m *TxResult) XXX_Unmarshal(b []byte) error {
  2263. return m.Unmarshal(b)
  2264. }
  2265. func (m *TxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2266. if deterministic {
  2267. return xxx_messageInfo_TxResult.Marshal(b, m, deterministic)
  2268. } else {
  2269. b = b[:cap(b)]
  2270. n, err := m.MarshalToSizedBuffer(b)
  2271. if err != nil {
  2272. return nil, err
  2273. }
  2274. return b[:n], nil
  2275. }
  2276. }
  2277. func (m *TxResult) XXX_Merge(src proto.Message) {
  2278. xxx_messageInfo_TxResult.Merge(m, src)
  2279. }
  2280. func (m *TxResult) XXX_Size() int {
  2281. return m.Size()
  2282. }
  2283. func (m *TxResult) XXX_DiscardUnknown() {
  2284. xxx_messageInfo_TxResult.DiscardUnknown(m)
  2285. }
  2286. var xxx_messageInfo_TxResult proto.InternalMessageInfo
  2287. func (m *TxResult) GetHeight() int64 {
  2288. if m != nil {
  2289. return m.Height
  2290. }
  2291. return 0
  2292. }
  2293. func (m *TxResult) GetIndex() uint32 {
  2294. if m != nil {
  2295. return m.Index
  2296. }
  2297. return 0
  2298. }
  2299. func (m *TxResult) GetTx() []byte {
  2300. if m != nil {
  2301. return m.Tx
  2302. }
  2303. return nil
  2304. }
  2305. func (m *TxResult) GetResult() ResponseDeliverTx {
  2306. if m != nil {
  2307. return m.Result
  2308. }
  2309. return ResponseDeliverTx{}
  2310. }
  2311. // Validator
  2312. type Validator struct {
  2313. Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
  2314. // PubKey pub_key = 2 [(gogoproto.nullable)=false];
  2315. Power int64 `protobuf:"varint,3,opt,name=power,proto3" json:"power,omitempty"`
  2316. }
  2317. func (m *Validator) Reset() { *m = Validator{} }
  2318. func (m *Validator) String() string { return proto.CompactTextString(m) }
  2319. func (*Validator) ProtoMessage() {}
  2320. func (*Validator) Descriptor() ([]byte, []int) {
  2321. return fileDescriptor_252557cfdd89a31a, []int{35}
  2322. }
  2323. func (m *Validator) XXX_Unmarshal(b []byte) error {
  2324. return m.Unmarshal(b)
  2325. }
  2326. func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2327. if deterministic {
  2328. return xxx_messageInfo_Validator.Marshal(b, m, deterministic)
  2329. } else {
  2330. b = b[:cap(b)]
  2331. n, err := m.MarshalToSizedBuffer(b)
  2332. if err != nil {
  2333. return nil, err
  2334. }
  2335. return b[:n], nil
  2336. }
  2337. }
  2338. func (m *Validator) XXX_Merge(src proto.Message) {
  2339. xxx_messageInfo_Validator.Merge(m, src)
  2340. }
  2341. func (m *Validator) XXX_Size() int {
  2342. return m.Size()
  2343. }
  2344. func (m *Validator) XXX_DiscardUnknown() {
  2345. xxx_messageInfo_Validator.DiscardUnknown(m)
  2346. }
  2347. var xxx_messageInfo_Validator proto.InternalMessageInfo
  2348. func (m *Validator) GetAddress() []byte {
  2349. if m != nil {
  2350. return m.Address
  2351. }
  2352. return nil
  2353. }
  2354. func (m *Validator) GetPower() int64 {
  2355. if m != nil {
  2356. return m.Power
  2357. }
  2358. return 0
  2359. }
  2360. // ValidatorUpdate
  2361. type ValidatorUpdate struct {
  2362. PubKey crypto.PublicKey `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key"`
  2363. Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"`
  2364. }
  2365. func (m *ValidatorUpdate) Reset() { *m = ValidatorUpdate{} }
  2366. func (m *ValidatorUpdate) String() string { return proto.CompactTextString(m) }
  2367. func (*ValidatorUpdate) ProtoMessage() {}
  2368. func (*ValidatorUpdate) Descriptor() ([]byte, []int) {
  2369. return fileDescriptor_252557cfdd89a31a, []int{36}
  2370. }
  2371. func (m *ValidatorUpdate) XXX_Unmarshal(b []byte) error {
  2372. return m.Unmarshal(b)
  2373. }
  2374. func (m *ValidatorUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2375. if deterministic {
  2376. return xxx_messageInfo_ValidatorUpdate.Marshal(b, m, deterministic)
  2377. } else {
  2378. b = b[:cap(b)]
  2379. n, err := m.MarshalToSizedBuffer(b)
  2380. if err != nil {
  2381. return nil, err
  2382. }
  2383. return b[:n], nil
  2384. }
  2385. }
  2386. func (m *ValidatorUpdate) XXX_Merge(src proto.Message) {
  2387. xxx_messageInfo_ValidatorUpdate.Merge(m, src)
  2388. }
  2389. func (m *ValidatorUpdate) XXX_Size() int {
  2390. return m.Size()
  2391. }
  2392. func (m *ValidatorUpdate) XXX_DiscardUnknown() {
  2393. xxx_messageInfo_ValidatorUpdate.DiscardUnknown(m)
  2394. }
  2395. var xxx_messageInfo_ValidatorUpdate proto.InternalMessageInfo
  2396. func (m *ValidatorUpdate) GetPubKey() crypto.PublicKey {
  2397. if m != nil {
  2398. return m.PubKey
  2399. }
  2400. return crypto.PublicKey{}
  2401. }
  2402. func (m *ValidatorUpdate) GetPower() int64 {
  2403. if m != nil {
  2404. return m.Power
  2405. }
  2406. return 0
  2407. }
  2408. // VoteInfo
  2409. type VoteInfo struct {
  2410. Validator Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"`
  2411. SignedLastBlock bool `protobuf:"varint,2,opt,name=signed_last_block,json=signedLastBlock,proto3" json:"signed_last_block,omitempty"`
  2412. }
  2413. func (m *VoteInfo) Reset() { *m = VoteInfo{} }
  2414. func (m *VoteInfo) String() string { return proto.CompactTextString(m) }
  2415. func (*VoteInfo) ProtoMessage() {}
  2416. func (*VoteInfo) Descriptor() ([]byte, []int) {
  2417. return fileDescriptor_252557cfdd89a31a, []int{37}
  2418. }
  2419. func (m *VoteInfo) XXX_Unmarshal(b []byte) error {
  2420. return m.Unmarshal(b)
  2421. }
  2422. func (m *VoteInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2423. if deterministic {
  2424. return xxx_messageInfo_VoteInfo.Marshal(b, m, deterministic)
  2425. } else {
  2426. b = b[:cap(b)]
  2427. n, err := m.MarshalToSizedBuffer(b)
  2428. if err != nil {
  2429. return nil, err
  2430. }
  2431. return b[:n], nil
  2432. }
  2433. }
  2434. func (m *VoteInfo) XXX_Merge(src proto.Message) {
  2435. xxx_messageInfo_VoteInfo.Merge(m, src)
  2436. }
  2437. func (m *VoteInfo) XXX_Size() int {
  2438. return m.Size()
  2439. }
  2440. func (m *VoteInfo) XXX_DiscardUnknown() {
  2441. xxx_messageInfo_VoteInfo.DiscardUnknown(m)
  2442. }
  2443. var xxx_messageInfo_VoteInfo proto.InternalMessageInfo
  2444. func (m *VoteInfo) GetValidator() Validator {
  2445. if m != nil {
  2446. return m.Validator
  2447. }
  2448. return Validator{}
  2449. }
  2450. func (m *VoteInfo) GetSignedLastBlock() bool {
  2451. if m != nil {
  2452. return m.SignedLastBlock
  2453. }
  2454. return false
  2455. }
  2456. type Evidence struct {
  2457. Type EvidenceType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.abci.EvidenceType" json:"type,omitempty"`
  2458. // The offending validator
  2459. Validator Validator `protobuf:"bytes,2,opt,name=validator,proto3" json:"validator"`
  2460. // The height when the offense occurred
  2461. Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
  2462. // The corresponding time where the offense occurred
  2463. Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"`
  2464. // Total voting power of the validator set in case the ABCI application does
  2465. // not store historical validators.
  2466. // https://github.com/tendermint/tendermint/issues/4581
  2467. TotalVotingPower int64 `protobuf:"varint,5,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"`
  2468. }
  2469. func (m *Evidence) Reset() { *m = Evidence{} }
  2470. func (m *Evidence) String() string { return proto.CompactTextString(m) }
  2471. func (*Evidence) ProtoMessage() {}
  2472. func (*Evidence) Descriptor() ([]byte, []int) {
  2473. return fileDescriptor_252557cfdd89a31a, []int{38}
  2474. }
  2475. func (m *Evidence) XXX_Unmarshal(b []byte) error {
  2476. return m.Unmarshal(b)
  2477. }
  2478. func (m *Evidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2479. if deterministic {
  2480. return xxx_messageInfo_Evidence.Marshal(b, m, deterministic)
  2481. } else {
  2482. b = b[:cap(b)]
  2483. n, err := m.MarshalToSizedBuffer(b)
  2484. if err != nil {
  2485. return nil, err
  2486. }
  2487. return b[:n], nil
  2488. }
  2489. }
  2490. func (m *Evidence) XXX_Merge(src proto.Message) {
  2491. xxx_messageInfo_Evidence.Merge(m, src)
  2492. }
  2493. func (m *Evidence) XXX_Size() int {
  2494. return m.Size()
  2495. }
  2496. func (m *Evidence) XXX_DiscardUnknown() {
  2497. xxx_messageInfo_Evidence.DiscardUnknown(m)
  2498. }
  2499. var xxx_messageInfo_Evidence proto.InternalMessageInfo
  2500. func (m *Evidence) GetType() EvidenceType {
  2501. if m != nil {
  2502. return m.Type
  2503. }
  2504. return EvidenceType_UNKNOWN
  2505. }
  2506. func (m *Evidence) GetValidator() Validator {
  2507. if m != nil {
  2508. return m.Validator
  2509. }
  2510. return Validator{}
  2511. }
  2512. func (m *Evidence) GetHeight() int64 {
  2513. if m != nil {
  2514. return m.Height
  2515. }
  2516. return 0
  2517. }
  2518. func (m *Evidence) GetTime() time.Time {
  2519. if m != nil {
  2520. return m.Time
  2521. }
  2522. return time.Time{}
  2523. }
  2524. func (m *Evidence) GetTotalVotingPower() int64 {
  2525. if m != nil {
  2526. return m.TotalVotingPower
  2527. }
  2528. return 0
  2529. }
  2530. type Snapshot struct {
  2531. Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  2532. Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"`
  2533. Chunks uint32 `protobuf:"varint,3,opt,name=chunks,proto3" json:"chunks,omitempty"`
  2534. Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"`
  2535. Metadata []byte `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
  2536. }
  2537. func (m *Snapshot) Reset() { *m = Snapshot{} }
  2538. func (m *Snapshot) String() string { return proto.CompactTextString(m) }
  2539. func (*Snapshot) ProtoMessage() {}
  2540. func (*Snapshot) Descriptor() ([]byte, []int) {
  2541. return fileDescriptor_252557cfdd89a31a, []int{39}
  2542. }
  2543. func (m *Snapshot) XXX_Unmarshal(b []byte) error {
  2544. return m.Unmarshal(b)
  2545. }
  2546. func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2547. if deterministic {
  2548. return xxx_messageInfo_Snapshot.Marshal(b, m, deterministic)
  2549. } else {
  2550. b = b[:cap(b)]
  2551. n, err := m.MarshalToSizedBuffer(b)
  2552. if err != nil {
  2553. return nil, err
  2554. }
  2555. return b[:n], nil
  2556. }
  2557. }
  2558. func (m *Snapshot) XXX_Merge(src proto.Message) {
  2559. xxx_messageInfo_Snapshot.Merge(m, src)
  2560. }
  2561. func (m *Snapshot) XXX_Size() int {
  2562. return m.Size()
  2563. }
  2564. func (m *Snapshot) XXX_DiscardUnknown() {
  2565. xxx_messageInfo_Snapshot.DiscardUnknown(m)
  2566. }
  2567. var xxx_messageInfo_Snapshot proto.InternalMessageInfo
  2568. func (m *Snapshot) GetHeight() uint64 {
  2569. if m != nil {
  2570. return m.Height
  2571. }
  2572. return 0
  2573. }
  2574. func (m *Snapshot) GetFormat() uint32 {
  2575. if m != nil {
  2576. return m.Format
  2577. }
  2578. return 0
  2579. }
  2580. func (m *Snapshot) GetChunks() uint32 {
  2581. if m != nil {
  2582. return m.Chunks
  2583. }
  2584. return 0
  2585. }
  2586. func (m *Snapshot) GetHash() []byte {
  2587. if m != nil {
  2588. return m.Hash
  2589. }
  2590. return nil
  2591. }
  2592. func (m *Snapshot) GetMetadata() []byte {
  2593. if m != nil {
  2594. return m.Metadata
  2595. }
  2596. return nil
  2597. }
  2598. func init() {
  2599. proto.RegisterEnum("tendermint.abci.CheckTxType", CheckTxType_name, CheckTxType_value)
  2600. proto.RegisterEnum("tendermint.abci.EvidenceType", EvidenceType_name, EvidenceType_value)
  2601. proto.RegisterEnum("tendermint.abci.ResponseOfferSnapshot_Result", ResponseOfferSnapshot_Result_name, ResponseOfferSnapshot_Result_value)
  2602. proto.RegisterEnum("tendermint.abci.ResponseApplySnapshotChunk_Result", ResponseApplySnapshotChunk_Result_name, ResponseApplySnapshotChunk_Result_value)
  2603. proto.RegisterType((*Request)(nil), "tendermint.abci.Request")
  2604. proto.RegisterType((*RequestEcho)(nil), "tendermint.abci.RequestEcho")
  2605. proto.RegisterType((*RequestFlush)(nil), "tendermint.abci.RequestFlush")
  2606. proto.RegisterType((*RequestInfo)(nil), "tendermint.abci.RequestInfo")
  2607. proto.RegisterType((*RequestInitChain)(nil), "tendermint.abci.RequestInitChain")
  2608. proto.RegisterType((*RequestQuery)(nil), "tendermint.abci.RequestQuery")
  2609. proto.RegisterType((*RequestBeginBlock)(nil), "tendermint.abci.RequestBeginBlock")
  2610. proto.RegisterType((*RequestCheckTx)(nil), "tendermint.abci.RequestCheckTx")
  2611. proto.RegisterType((*RequestDeliverTx)(nil), "tendermint.abci.RequestDeliverTx")
  2612. proto.RegisterType((*RequestEndBlock)(nil), "tendermint.abci.RequestEndBlock")
  2613. proto.RegisterType((*RequestCommit)(nil), "tendermint.abci.RequestCommit")
  2614. proto.RegisterType((*RequestListSnapshots)(nil), "tendermint.abci.RequestListSnapshots")
  2615. proto.RegisterType((*RequestOfferSnapshot)(nil), "tendermint.abci.RequestOfferSnapshot")
  2616. proto.RegisterType((*RequestLoadSnapshotChunk)(nil), "tendermint.abci.RequestLoadSnapshotChunk")
  2617. proto.RegisterType((*RequestApplySnapshotChunk)(nil), "tendermint.abci.RequestApplySnapshotChunk")
  2618. proto.RegisterType((*Response)(nil), "tendermint.abci.Response")
  2619. proto.RegisterType((*ResponseException)(nil), "tendermint.abci.ResponseException")
  2620. proto.RegisterType((*ResponseEcho)(nil), "tendermint.abci.ResponseEcho")
  2621. proto.RegisterType((*ResponseFlush)(nil), "tendermint.abci.ResponseFlush")
  2622. proto.RegisterType((*ResponseInfo)(nil), "tendermint.abci.ResponseInfo")
  2623. proto.RegisterType((*ResponseInitChain)(nil), "tendermint.abci.ResponseInitChain")
  2624. proto.RegisterType((*ResponseQuery)(nil), "tendermint.abci.ResponseQuery")
  2625. proto.RegisterType((*ResponseBeginBlock)(nil), "tendermint.abci.ResponseBeginBlock")
  2626. proto.RegisterType((*ResponseCheckTx)(nil), "tendermint.abci.ResponseCheckTx")
  2627. proto.RegisterType((*ResponseDeliverTx)(nil), "tendermint.abci.ResponseDeliverTx")
  2628. proto.RegisterType((*ResponseEndBlock)(nil), "tendermint.abci.ResponseEndBlock")
  2629. proto.RegisterType((*ResponseCommit)(nil), "tendermint.abci.ResponseCommit")
  2630. proto.RegisterType((*ResponseListSnapshots)(nil), "tendermint.abci.ResponseListSnapshots")
  2631. proto.RegisterType((*ResponseOfferSnapshot)(nil), "tendermint.abci.ResponseOfferSnapshot")
  2632. proto.RegisterType((*ResponseLoadSnapshotChunk)(nil), "tendermint.abci.ResponseLoadSnapshotChunk")
  2633. proto.RegisterType((*ResponseApplySnapshotChunk)(nil), "tendermint.abci.ResponseApplySnapshotChunk")
  2634. proto.RegisterType((*LastCommitInfo)(nil), "tendermint.abci.LastCommitInfo")
  2635. proto.RegisterType((*Event)(nil), "tendermint.abci.Event")
  2636. proto.RegisterType((*EventAttribute)(nil), "tendermint.abci.EventAttribute")
  2637. proto.RegisterType((*TxResult)(nil), "tendermint.abci.TxResult")
  2638. proto.RegisterType((*Validator)(nil), "tendermint.abci.Validator")
  2639. proto.RegisterType((*ValidatorUpdate)(nil), "tendermint.abci.ValidatorUpdate")
  2640. proto.RegisterType((*VoteInfo)(nil), "tendermint.abci.VoteInfo")
  2641. proto.RegisterType((*Evidence)(nil), "tendermint.abci.Evidence")
  2642. proto.RegisterType((*Snapshot)(nil), "tendermint.abci.Snapshot")
  2643. }
  2644. func init() { proto.RegisterFile("tendermint/abci/types.proto", fileDescriptor_252557cfdd89a31a) }
  2645. var fileDescriptor_252557cfdd89a31a = []byte{
  2646. // 2583 bytes of a gzipped FileDescriptorProto
  2647. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5a, 0x4b, 0x73, 0x1b, 0xc7,
  2648. 0x11, 0xc6, 0x1b, 0xd8, 0x26, 0x01, 0x82, 0x23, 0x5a, 0x86, 0x60, 0x89, 0x94, 0x57, 0x25, 0xc7,
  2649. 0x92, 0x6d, 0x32, 0xa6, 0x4a, 0x8a, 0x5c, 0xce, 0xc3, 0x04, 0x04, 0x05, 0xb4, 0x18, 0x92, 0x19,
  2650. 0x42, 0x72, 0x39, 0x89, 0xb5, 0x5e, 0x60, 0x87, 0xc0, 0x5a, 0xc0, 0xee, 0x1a, 0x3b, 0xa0, 0x48,
  2651. 0x1f, 0xf3, 0xb8, 0xa8, 0x72, 0xd0, 0x31, 0x17, 0x57, 0xe5, 0x1f, 0xe4, 0x9a, 0x53, 0x4e, 0x39,
  2652. 0xf8, 0x90, 0x54, 0xf9, 0x98, 0x93, 0x93, 0x92, 0x6e, 0xf9, 0x03, 0x39, 0xa5, 0x2a, 0x35, 0x8f,
  2653. 0x7d, 0x01, 0x58, 0x00, 0x8c, 0x73, 0xcb, 0x6d, 0xa6, 0xb7, 0xbb, 0x31, 0xd3, 0x33, 0xdd, 0xfd,
  2654. 0x75, 0x0f, 0xe0, 0x35, 0x4a, 0x2c, 0x83, 0x0c, 0x07, 0xa6, 0x45, 0xb7, 0xf4, 0x76, 0xc7, 0xdc,
  2655. 0xa2, 0x67, 0x0e, 0x71, 0x37, 0x9d, 0xa1, 0x4d, 0x6d, 0xb4, 0x12, 0x7c, 0xdc, 0x64, 0x1f, 0xab,
  2656. 0x57, 0x42, 0xdc, 0x9d, 0xe1, 0x99, 0x43, 0xed, 0x2d, 0x67, 0x68, 0xdb, 0xc7, 0x82, 0xbf, 0x7a,
  2657. 0x39, 0xf4, 0x99, 0xeb, 0x09, 0x6b, 0x8b, 0x7c, 0x95, 0xc2, 0x4f, 0xc8, 0x99, 0xf7, 0xf5, 0xca,
  2658. 0x84, 0xac, 0xa3, 0x0f, 0xf5, 0x81, 0xf7, 0x79, 0xa3, 0x6b, 0xdb, 0xdd, 0x3e, 0xd9, 0xe2, 0xb3,
  2659. 0xf6, 0xe8, 0x78, 0x8b, 0x9a, 0x03, 0xe2, 0x52, 0x7d, 0xe0, 0x48, 0x86, 0xb5, 0xae, 0xdd, 0xb5,
  2660. 0xf9, 0x70, 0x8b, 0x8d, 0x04, 0x55, 0xfd, 0x6b, 0x1e, 0xf2, 0x98, 0x7c, 0x3e, 0x22, 0x2e, 0x45,
  2661. 0xdb, 0x90, 0x21, 0x9d, 0x9e, 0x5d, 0x49, 0x5e, 0x4d, 0xbe, 0xb9, 0xb4, 0x7d, 0x79, 0x73, 0x6c,
  2662. 0x73, 0x9b, 0x92, 0xaf, 0xd1, 0xe9, 0xd9, 0xcd, 0x04, 0xe6, 0xbc, 0xe8, 0x36, 0x64, 0x8f, 0xfb,
  2663. 0x23, 0xb7, 0x57, 0x49, 0x71, 0xa1, 0x2b, 0x71, 0x42, 0xf7, 0x19, 0x53, 0x33, 0x81, 0x05, 0x37,
  2664. 0xfb, 0x29, 0xd3, 0x3a, 0xb6, 0x2b, 0xe9, 0xd9, 0x3f, 0xb5, 0x6b, 0x1d, 0xf3, 0x9f, 0x62, 0xbc,
  2665. 0xa8, 0x06, 0x60, 0x5a, 0x26, 0xd5, 0x3a, 0x3d, 0xdd, 0xb4, 0x2a, 0x19, 0x2e, 0xf9, 0x7a, 0xbc,
  2666. 0xa4, 0x49, 0xeb, 0x8c, 0xb1, 0x99, 0xc0, 0x8a, 0xe9, 0x4d, 0xd8, 0x72, 0x3f, 0x1f, 0x91, 0xe1,
  2667. 0x59, 0x25, 0x3b, 0x7b, 0xb9, 0x3f, 0x65, 0x4c, 0x6c, 0xb9, 0x9c, 0x1b, 0x35, 0x60, 0xa9, 0x4d,
  2668. 0xba, 0xa6, 0xa5, 0xb5, 0xfb, 0x76, 0xe7, 0x49, 0x25, 0xc7, 0x85, 0xd5, 0x38, 0xe1, 0x1a, 0x63,
  2669. 0xad, 0x31, 0xce, 0x66, 0x02, 0x43, 0xdb, 0x9f, 0xa1, 0xef, 0x43, 0xa1, 0xd3, 0x23, 0x9d, 0x27,
  2670. 0x1a, 0x3d, 0xad, 0xe4, 0xb9, 0x8e, 0x8d, 0x38, 0x1d, 0x75, 0xc6, 0xd7, 0x3a, 0x6d, 0x26, 0x70,
  2671. 0xbe, 0x23, 0x86, 0x6c, 0xff, 0x06, 0xe9, 0x9b, 0x27, 0x64, 0xc8, 0xe4, 0x0b, 0xb3, 0xf7, 0x7f,
  2672. 0x4f, 0x70, 0x72, 0x0d, 0x8a, 0xe1, 0x4d, 0xd0, 0x8f, 0x40, 0x21, 0x96, 0x21, 0xb7, 0xa1, 0x70,
  2673. 0x15, 0x57, 0x63, 0xcf, 0xd9, 0x32, 0xbc, 0x4d, 0x14, 0x88, 0x1c, 0xa3, 0xbb, 0x90, 0xeb, 0xd8,
  2674. 0x83, 0x81, 0x49, 0x2b, 0xc0, 0xa5, 0xd7, 0x63, 0x37, 0xc0, 0xb9, 0x9a, 0x09, 0x2c, 0xf9, 0xd1,
  2675. 0x3e, 0x94, 0xfa, 0xa6, 0x4b, 0x35, 0xd7, 0xd2, 0x1d, 0xb7, 0x67, 0x53, 0xb7, 0xb2, 0xc4, 0x35,
  2676. 0x5c, 0x8f, 0xd3, 0xb0, 0x67, 0xba, 0xf4, 0xc8, 0x63, 0x6e, 0x26, 0x70, 0xb1, 0x1f, 0x26, 0x30,
  2677. 0x7d, 0xf6, 0xf1, 0x31, 0x19, 0xfa, 0x0a, 0x2b, 0xcb, 0xb3, 0xf5, 0x1d, 0x30, 0x6e, 0x4f, 0x9e,
  2678. 0xe9, 0xb3, 0xc3, 0x04, 0xf4, 0x73, 0xb8, 0xd0, 0xb7, 0x75, 0xc3, 0x57, 0xa7, 0x75, 0x7a, 0x23,
  2679. 0xeb, 0x49, 0xa5, 0xc8, 0x95, 0xde, 0x88, 0x5d, 0xa4, 0xad, 0x1b, 0x9e, 0x8a, 0x3a, 0x13, 0x68,
  2680. 0x26, 0xf0, 0x6a, 0x7f, 0x9c, 0x88, 0x1e, 0xc3, 0x9a, 0xee, 0x38, 0xfd, 0xb3, 0x71, 0xed, 0x25,
  2681. 0xae, 0xfd, 0x66, 0x9c, 0xf6, 0x1d, 0x26, 0x33, 0xae, 0x1e, 0xe9, 0x13, 0xd4, 0x5a, 0x1e, 0xb2,
  2682. 0x27, 0x7a, 0x7f, 0x44, 0xd4, 0xef, 0xc0, 0x52, 0xc8, 0x4d, 0x51, 0x05, 0xf2, 0x03, 0xe2, 0xba,
  2683. 0x7a, 0x97, 0x70, 0xaf, 0x56, 0xb0, 0x37, 0x55, 0x4b, 0xb0, 0x1c, 0x76, 0x4d, 0xf5, 0x79, 0xd2,
  2684. 0x97, 0x64, 0x5e, 0xc7, 0x24, 0x4f, 0xc8, 0xd0, 0x35, 0x6d, 0xcb, 0x93, 0x94, 0x53, 0x74, 0x0d,
  2685. 0x8a, 0xfc, 0xfe, 0x68, 0xde, 0x77, 0xe6, 0xfa, 0x19, 0xbc, 0xcc, 0x89, 0x8f, 0x24, 0xd3, 0x06,
  2686. 0x2c, 0x39, 0xdb, 0x8e, 0xcf, 0x92, 0xe6, 0x2c, 0xe0, 0x6c, 0x3b, 0x1e, 0xc3, 0xeb, 0xb0, 0xcc,
  2687. 0x76, 0xea, 0x73, 0x64, 0xf8, 0x8f, 0x2c, 0x31, 0x9a, 0x64, 0x51, 0xff, 0x92, 0x82, 0xf2, 0xb8,
  2688. 0x3b, 0xa3, 0xbb, 0x90, 0x61, 0x91, 0x4d, 0x06, 0xa9, 0xea, 0xa6, 0x08, 0x7b, 0x9b, 0x5e, 0xd8,
  2689. 0xdb, 0x6c, 0x79, 0x61, 0xaf, 0x56, 0xf8, 0xea, 0x9b, 0x8d, 0xc4, 0xf3, 0xbf, 0x6f, 0x24, 0x31,
  2690. 0x97, 0x40, 0x97, 0x98, 0xf7, 0xe9, 0xa6, 0xa5, 0x99, 0x06, 0x5f, 0xb2, 0xc2, 0x5c, 0x4b, 0x37,
  2691. 0xad, 0x5d, 0x03, 0xed, 0x41, 0xb9, 0x63, 0x5b, 0x2e, 0xb1, 0xdc, 0x91, 0xab, 0x89, 0xb0, 0x2a,
  2692. 0x43, 0x53, 0xc4, 0xc1, 0x44, 0xb0, 0xae, 0x7b, 0x9c, 0x87, 0x9c, 0x11, 0xaf, 0x74, 0xa2, 0x04,
  2693. 0x74, 0x1f, 0xe0, 0x44, 0xef, 0x9b, 0x86, 0x4e, 0xed, 0xa1, 0x5b, 0xc9, 0x5c, 0x4d, 0x4f, 0xf5,
  2694. 0xb2, 0x47, 0x1e, 0xcb, 0x43, 0xc7, 0xd0, 0x29, 0xa9, 0x65, 0xd8, 0x72, 0x71, 0x48, 0x12, 0xbd,
  2695. 0x01, 0x2b, 0xba, 0xe3, 0x68, 0x2e, 0xd5, 0x29, 0xd1, 0xda, 0x67, 0x94, 0xb8, 0x3c, 0x6c, 0x2d,
  2696. 0xe3, 0xa2, 0xee, 0x38, 0x47, 0x8c, 0x5a, 0x63, 0x44, 0x74, 0x1d, 0x4a, 0x2c, 0xc2, 0x99, 0x7a,
  2697. 0x5f, 0xeb, 0x11, 0xb3, 0xdb, 0xa3, 0x3c, 0x40, 0xa5, 0x71, 0x51, 0x52, 0x9b, 0x9c, 0xa8, 0x1a,
  2698. 0xfe, 0x89, 0xf3, 0xe8, 0x86, 0x10, 0x64, 0x0c, 0x9d, 0xea, 0xdc, 0x92, 0xcb, 0x98, 0x8f, 0x19,
  2699. 0xcd, 0xd1, 0x69, 0x4f, 0xda, 0x87, 0x8f, 0xd1, 0x45, 0xc8, 0x49, 0xb5, 0x69, 0xae, 0x56, 0xce,
  2700. 0xd0, 0x1a, 0x64, 0x9d, 0xa1, 0x7d, 0x42, 0xf8, 0xd1, 0x15, 0xb0, 0x98, 0xa8, 0xbf, 0x4e, 0xc1,
  2701. 0xea, 0x44, 0x1c, 0x64, 0x7a, 0x7b, 0xba, 0xdb, 0xf3, 0x7e, 0x8b, 0x8d, 0xd1, 0x1d, 0xa6, 0x57,
  2702. 0x37, 0xc8, 0x50, 0xe6, 0x8e, 0xca, 0xa4, 0xa9, 0x9b, 0xfc, 0xbb, 0x34, 0x8d, 0xe4, 0x46, 0x07,
  2703. 0x50, 0xee, 0xeb, 0x2e, 0xd5, 0x44, 0x5c, 0xd1, 0x42, 0x79, 0x64, 0x32, 0x9a, 0xee, 0xe9, 0x5e,
  2704. 0x24, 0x62, 0x97, 0x5a, 0x2a, 0x2a, 0xf5, 0x23, 0x54, 0x84, 0x61, 0xad, 0x7d, 0xf6, 0x85, 0x6e,
  2705. 0x51, 0xd3, 0x22, 0xda, 0xc4, 0xc9, 0x5d, 0x9a, 0x50, 0xda, 0x38, 0x31, 0x0d, 0x62, 0x75, 0xbc,
  2706. 0x23, 0xbb, 0xe0, 0x0b, 0xfb, 0x47, 0xea, 0xaa, 0x18, 0x4a, 0xd1, 0x48, 0x8e, 0x4a, 0x90, 0xa2,
  2707. 0xa7, 0xd2, 0x00, 0x29, 0x7a, 0x8a, 0xbe, 0x0b, 0x19, 0xb6, 0x49, 0xbe, 0xf9, 0xd2, 0x94, 0x14,
  2708. 0x28, 0xe5, 0x5a, 0x67, 0x0e, 0xc1, 0x9c, 0x53, 0x55, 0x7d, 0x77, 0xf0, 0xa3, 0xfb, 0xb8, 0x56,
  2709. 0xf5, 0x06, 0xac, 0x8c, 0x85, 0xef, 0xd0, 0xf9, 0x25, 0xc3, 0xe7, 0xa7, 0xae, 0x40, 0x31, 0x12,
  2710. 0xab, 0xd5, 0x8b, 0xb0, 0x36, 0x2d, 0xf4, 0xaa, 0x3d, 0x9f, 0x1e, 0x09, 0xa1, 0xe8, 0x36, 0x14,
  2711. 0xfc, 0xd8, 0x2b, 0xdc, 0x71, 0xd2, 0x56, 0x1e, 0x33, 0xf6, 0x59, 0x99, 0x1f, 0xb2, 0x6b, 0xcd,
  2712. 0xef, 0x43, 0x8a, 0x2f, 0x3c, 0xaf, 0x3b, 0x4e, 0x53, 0x77, 0x7b, 0xea, 0xa7, 0x50, 0x89, 0x8b,
  2713. 0xab, 0x63, 0xdb, 0xc8, 0xf8, 0xd7, 0xf0, 0x22, 0xe4, 0x8e, 0xed, 0xe1, 0x40, 0xa7, 0x5c, 0x59,
  2714. 0x11, 0xcb, 0x19, 0xbb, 0x9e, 0x22, 0xc6, 0xa6, 0x39, 0x59, 0x4c, 0x54, 0x0d, 0x2e, 0xc5, 0xc6,
  2715. 0x56, 0x26, 0x62, 0x5a, 0x06, 0x11, 0xf6, 0x2c, 0x62, 0x31, 0x09, 0x14, 0x89, 0xc5, 0x8a, 0x09,
  2716. 0xfb, 0x59, 0x97, 0xef, 0x95, 0xeb, 0x57, 0xb0, 0x9c, 0xa9, 0xbf, 0x2f, 0x40, 0x01, 0x13, 0xd7,
  2717. 0x61, 0x31, 0x01, 0xd5, 0x40, 0x21, 0xa7, 0x1d, 0xe2, 0x50, 0x2f, 0x8c, 0x4e, 0x47, 0x0d, 0x82,
  2718. 0xbb, 0xe1, 0x71, 0xb2, 0x94, 0xed, 0x8b, 0xa1, 0x5b, 0x12, 0x95, 0xc5, 0x03, 0x2c, 0x29, 0x1e,
  2719. 0x86, 0x65, 0x77, 0x3c, 0x58, 0x96, 0x8e, 0xcd, 0xd2, 0x42, 0x6a, 0x0c, 0x97, 0xdd, 0x92, 0xb8,
  2720. 0x2c, 0x33, 0xe7, 0xc7, 0x22, 0xc0, 0xac, 0x1e, 0x01, 0x66, 0xd9, 0x39, 0xdb, 0x8c, 0x41, 0x66,
  2721. 0x77, 0x3c, 0x64, 0x96, 0x9b, 0xb3, 0xe2, 0x31, 0x68, 0x76, 0x3f, 0x0a, 0xcd, 0x04, 0xac, 0xba,
  2722. 0x16, 0x2b, 0x1d, 0x8b, 0xcd, 0x7e, 0x10, 0xc2, 0x66, 0x85, 0x58, 0x60, 0x24, 0x94, 0x4c, 0x01,
  2723. 0x67, 0xf5, 0x08, 0x38, 0x53, 0xe6, 0xd8, 0x20, 0x06, 0x9d, 0x7d, 0x10, 0x46, 0x67, 0x10, 0x0b,
  2724. 0xf0, 0xe4, 0x79, 0x4f, 0x83, 0x67, 0xef, 0xf9, 0xf0, 0x6c, 0x29, 0x16, 0x5f, 0xca, 0x3d, 0x8c,
  2725. 0xe3, 0xb3, 0x83, 0x09, 0x7c, 0x26, 0xf0, 0xd4, 0x1b, 0xb1, 0x2a, 0xe6, 0x00, 0xb4, 0x83, 0x09,
  2726. 0x80, 0x56, 0x9c, 0xa3, 0x70, 0x0e, 0x42, 0xfb, 0xc5, 0x74, 0x84, 0x16, 0x8f, 0xa1, 0xe4, 0x32,
  2727. 0x17, 0x83, 0x68, 0x5a, 0x0c, 0x44, 0x5b, 0xe1, 0xea, 0xdf, 0x8a, 0x55, 0x7f, 0x7e, 0x8c, 0x76,
  2728. 0x83, 0x65, 0xc8, 0x31, 0x9f, 0x67, 0x51, 0x86, 0x0c, 0x87, 0xf6, 0x50, 0xa2, 0x2d, 0x31, 0x51,
  2729. 0xdf, 0x64, 0x39, 0x3b, 0xf0, 0xef, 0x19, 0x78, 0x8e, 0x47, 0xf3, 0x90, 0x4f, 0xab, 0x7f, 0x4c,
  2730. 0x06, 0xb2, 0x3c, 0xcd, 0x85, 0xf3, 0xbd, 0x22, 0xf3, 0x7d, 0x08, 0xe5, 0xa5, 0xa2, 0x28, 0x6f,
  2731. 0x03, 0x96, 0x58, 0x94, 0x1e, 0x03, 0x70, 0xba, 0xe3, 0x03, 0xb8, 0x9b, 0xb0, 0xca, 0xd3, 0xb0,
  2732. 0xc0, 0x82, 0x32, 0x34, 0x67, 0x78, 0x86, 0x59, 0x61, 0x1f, 0xc4, 0xe5, 0x14, 0x31, 0xfa, 0x1d,
  2733. 0xb8, 0x10, 0xe2, 0xf5, 0xa3, 0xbf, 0x40, 0x33, 0x65, 0x9f, 0x7b, 0x47, 0xa6, 0x81, 0x3f, 0x27,
  2734. 0x03, 0x0b, 0x05, 0xc8, 0x6f, 0x1a, 0x48, 0x4b, 0xfe, 0x8f, 0x40, 0x5a, 0xea, 0xbf, 0x06, 0x69,
  2735. 0xe1, 0x6c, 0x96, 0x8e, 0x66, 0xb3, 0x7f, 0x25, 0x83, 0x33, 0xf1, 0x21, 0x57, 0xc7, 0x36, 0x88,
  2736. 0xcc, 0x2f, 0x7c, 0x8c, 0xca, 0x90, 0xee, 0xdb, 0x5d, 0x99, 0x45, 0xd8, 0x90, 0x71, 0xf9, 0x41,
  2737. 0x58, 0x91, 0x31, 0xd6, 0x4f, 0x4d, 0x59, 0x6e, 0x61, 0x99, 0x9a, 0xca, 0x90, 0x7e, 0x42, 0x44,
  2738. 0xc8, 0x5c, 0xc6, 0x6c, 0xc8, 0xf8, 0xf8, 0x25, 0xe3, 0x81, 0x70, 0x19, 0x8b, 0x09, 0xba, 0x0b,
  2739. 0x0a, 0x6f, 0x43, 0x68, 0xb6, 0xe3, 0xca, 0xe8, 0xf6, 0x5a, 0x78, 0xaf, 0xa2, 0xdb, 0xb0, 0x79,
  2740. 0xc8, 0x78, 0x0e, 0x1c, 0x17, 0x17, 0x1c, 0x39, 0x0a, 0x65, 0x5d, 0x25, 0x02, 0xfe, 0x2e, 0x83,
  2741. 0xc2, 0x56, 0xef, 0x3a, 0x7a, 0x87, 0xf0, 0x50, 0xa5, 0xe0, 0x80, 0xa0, 0x3e, 0x06, 0x34, 0x19,
  2742. 0x70, 0x51, 0x13, 0x72, 0xe4, 0x84, 0x58, 0x94, 0x1d, 0x1b, 0x33, 0xf7, 0xc5, 0x29, 0xc8, 0x8a,
  2743. 0x58, 0xb4, 0x56, 0x61, 0x46, 0xfe, 0xe7, 0x37, 0x1b, 0x65, 0xc1, 0xfd, 0xb6, 0x3d, 0x30, 0x29,
  2744. 0x19, 0x38, 0xf4, 0x0c, 0x4b, 0x79, 0xf5, 0x57, 0x29, 0x06, 0x73, 0x22, 0xc1, 0x78, 0xaa, 0x6d,
  2745. 0xbd, 0x2b, 0x9f, 0x0a, 0x41, 0xdc, 0xc5, 0xec, 0xbd, 0x0e, 0xd0, 0xd5, 0x5d, 0xed, 0xa9, 0x6e,
  2746. 0x51, 0x62, 0x48, 0xa3, 0x87, 0x28, 0xa8, 0x0a, 0x05, 0x36, 0x1b, 0xb9, 0xc4, 0x90, 0x68, 0xdb,
  2747. 0x9f, 0x87, 0xf6, 0x99, 0xff, 0x76, 0xfb, 0x8c, 0x5a, 0xb9, 0x30, 0x6e, 0xe5, 0xdf, 0xa4, 0x02,
  2748. 0x37, 0x09, 0x10, 0xe1, 0xff, 0x9f, 0x1d, 0x7e, 0xcb, 0xeb, 0xc4, 0x68, 0x56, 0x44, 0x47, 0xb0,
  2749. 0xea, 0x7b, 0xa9, 0x36, 0xe2, 0xde, 0xeb, 0xdd, 0xbb, 0x45, 0xdd, 0xbc, 0x7c, 0x12, 0x25, 0xbb,
  2750. 0xe8, 0x63, 0x78, 0x75, 0x2c, 0x04, 0xf9, 0xaa, 0x53, 0x8b, 0x46, 0xa2, 0x57, 0xa2, 0x91, 0xc8,
  2751. 0x53, 0x1d, 0x18, 0x2b, 0xfd, 0x2d, 0x9d, 0x63, 0x97, 0x95, 0x1e, 0xe1, 0x24, 0x3f, 0xf5, 0xf8,
  2752. 0xaf, 0x41, 0x71, 0x48, 0x28, 0x2b, 0x87, 0x23, 0xc5, 0xdd, 0xb2, 0x20, 0xca, 0x92, 0xf1, 0x10,
  2753. 0x5e, 0x99, 0x9a, 0xec, 0xd1, 0xf7, 0x40, 0x09, 0x70, 0x42, 0x32, 0xa6, 0x4e, 0xf2, 0xb1, 0x7f,
  2754. 0xc0, 0xab, 0xfe, 0x29, 0x19, 0xa8, 0x8c, 0x56, 0x13, 0x0d, 0xc8, 0x0d, 0x89, 0x3b, 0xea, 0x0b,
  2755. 0x7c, 0x5f, 0xda, 0x7e, 0x67, 0x31, 0x98, 0xc0, 0xa8, 0xa3, 0x3e, 0xc5, 0x52, 0x58, 0x7d, 0x0c,
  2756. 0x39, 0x41, 0x41, 0x4b, 0x90, 0x7f, 0xb8, 0xff, 0x60, 0xff, 0xe0, 0xa3, 0xfd, 0x72, 0x02, 0x01,
  2757. 0xe4, 0x76, 0xea, 0xf5, 0xc6, 0x61, 0xab, 0x9c, 0x44, 0x0a, 0x64, 0x77, 0x6a, 0x07, 0xb8, 0x55,
  2758. 0x4e, 0x31, 0x32, 0x6e, 0x7c, 0xd8, 0xa8, 0xb7, 0xca, 0x69, 0xb4, 0x0a, 0x45, 0x31, 0xd6, 0xee,
  2759. 0x1f, 0xe0, 0x9f, 0xec, 0xb4, 0xca, 0x99, 0x10, 0xe9, 0xa8, 0xb1, 0x7f, 0xaf, 0x81, 0xcb, 0x59,
  2760. 0xf5, 0x5d, 0x56, 0x40, 0xc4, 0x00, 0x8b, 0xa0, 0x54, 0x48, 0x86, 0x4a, 0x05, 0xf5, 0x77, 0x29,
  2761. 0xa8, 0xc6, 0xa3, 0x05, 0xf4, 0xe1, 0xd8, 0xc6, 0xb7, 0xcf, 0x01, 0x35, 0xc6, 0x76, 0x8f, 0xae,
  2762. 0x43, 0x69, 0x48, 0x8e, 0x09, 0xed, 0xf4, 0x04, 0x7a, 0x11, 0x99, 0xad, 0x88, 0x8b, 0x92, 0xca,
  2763. 0x85, 0x5c, 0xc1, 0xf6, 0x19, 0xe9, 0x50, 0x4d, 0x54, 0x2d, 0xe2, 0xd2, 0x29, 0x8c, 0x8d, 0x51,
  2764. 0x8f, 0x04, 0x51, 0xfd, 0xf4, 0x5c, 0xb6, 0x54, 0x20, 0x8b, 0x1b, 0x2d, 0xfc, 0x71, 0x39, 0x8d,
  2765. 0x10, 0x94, 0xf8, 0x50, 0x3b, 0xda, 0xdf, 0x39, 0x3c, 0x6a, 0x1e, 0x30, 0x5b, 0x5e, 0x80, 0x15,
  2766. 0xcf, 0x96, 0x1e, 0x31, 0xab, 0x7e, 0x02, 0xa5, 0x68, 0x89, 0xce, 0x4c, 0x38, 0xb4, 0x47, 0x96,
  2767. 0xc1, 0x8d, 0x91, 0xc5, 0x62, 0x82, 0x6e, 0x43, 0xf6, 0xc4, 0x16, 0x6e, 0x36, 0xfd, 0xae, 0x3d,
  2768. 0xb2, 0x29, 0x09, 0x95, 0xf8, 0x82, 0x5b, 0xfd, 0x02, 0xb2, 0xdc, 0x6b, 0x98, 0x07, 0xf0, 0x62,
  2769. 0x5b, 0x62, 0x1f, 0x36, 0x46, 0x9f, 0x00, 0xe8, 0x94, 0x0e, 0xcd, 0xf6, 0x28, 0x50, 0xbc, 0x31,
  2770. 0xdd, 0xeb, 0x76, 0x3c, 0xbe, 0xda, 0x65, 0xe9, 0x7e, 0x6b, 0x81, 0x68, 0xc8, 0x05, 0x43, 0x0a,
  2771. 0xd5, 0x7d, 0x28, 0x45, 0x65, 0xbd, 0x6c, 0x9d, 0x9c, 0x92, 0xad, 0x53, 0xe1, 0x6c, 0xed, 0xe7,
  2772. 0xfa, 0xb4, 0x68, 0xac, 0xf0, 0x89, 0xfa, 0x2c, 0x09, 0x85, 0xd6, 0xa9, 0x3c, 0x8f, 0x98, 0x9a,
  2773. 0x3e, 0x10, 0x4d, 0x85, 0x2b, 0x58, 0xd1, 0x24, 0x48, 0xfb, 0xad, 0x87, 0x0f, 0xfc, 0x1b, 0x97,
  2774. 0x59, 0xb4, 0x50, 0xf1, 0x7a, 0x30, 0xd2, 0xcb, 0xde, 0x07, 0xc5, 0x8f, 0x99, 0x0c, 0x44, 0xea,
  2775. 0x86, 0x31, 0x24, 0xae, 0x2b, 0xf7, 0xe6, 0x4d, 0x79, 0x8b, 0xc8, 0x7e, 0x2a, 0x6b, 0xe4, 0x34,
  2776. 0x16, 0x13, 0xd5, 0x80, 0x95, 0xb1, 0x80, 0x8b, 0xde, 0x87, 0xbc, 0x33, 0x6a, 0x6b, 0x9e, 0x79,
  2777. 0xc6, 0x9e, 0x04, 0x3c, 0x78, 0x32, 0x6a, 0xf7, 0xcd, 0xce, 0x03, 0x72, 0xe6, 0x2d, 0xc6, 0x19,
  2778. 0xb5, 0x1f, 0x08, 0x2b, 0x8a, 0x5f, 0x49, 0x85, 0x7f, 0xe5, 0x04, 0x0a, 0xde, 0xa5, 0x40, 0x3f,
  2779. 0x04, 0xc5, 0x8f, 0xe5, 0x7e, 0xe7, 0x30, 0x36, 0x09, 0x48, 0xf5, 0x81, 0x08, 0xc3, 0xba, 0xae,
  2780. 0xd9, 0xb5, 0x88, 0xa1, 0x05, 0x30, 0x96, 0xff, 0x5a, 0x01, 0xaf, 0x88, 0x0f, 0x7b, 0x1e, 0x86,
  2781. 0x55, 0xff, 0x9d, 0x84, 0x82, 0xd7, 0x21, 0x42, 0xef, 0x86, 0xee, 0x5d, 0x69, 0x4a, 0x3d, 0xed,
  2782. 0x31, 0x06, 0x5d, 0x9e, 0xe8, 0x5a, 0x53, 0xe7, 0x5f, 0x6b, 0x5c, 0xbb, 0xce, 0x6b, 0x9c, 0x66,
  2783. 0xce, 0xdd, 0x38, 0x7d, 0x1b, 0x10, 0xb5, 0xa9, 0xde, 0xd7, 0x4e, 0x6c, 0x6a, 0x5a, 0x5d, 0x4d,
  2784. 0x18, 0x5b, 0x60, 0x81, 0x32, 0xff, 0xf2, 0x88, 0x7f, 0x38, 0xe4, 0x76, 0xff, 0x65, 0x12, 0x0a,
  2785. 0x7e, 0x50, 0x3f, 0x6f, 0xd3, 0xe6, 0x22, 0xe4, 0x64, 0xdc, 0x12, 0x5d, 0x1b, 0x39, 0xf3, 0xfb,
  2786. 0x87, 0x99, 0x50, 0xff, 0xb0, 0x0a, 0x85, 0x01, 0xa1, 0x3a, 0xcf, 0x6c, 0xa2, 0x92, 0xf0, 0xe7,
  2787. 0x37, 0xdf, 0x83, 0xa5, 0x50, 0xff, 0x8c, 0x79, 0xde, 0x7e, 0xe3, 0xa3, 0x72, 0xa2, 0x9a, 0x7f,
  2788. 0xf6, 0xe5, 0xd5, 0xf4, 0x3e, 0x79, 0xca, 0xee, 0x2c, 0x6e, 0xd4, 0x9b, 0x8d, 0xfa, 0x83, 0x72,
  2789. 0xb2, 0xba, 0xf4, 0xec, 0xcb, 0xab, 0x79, 0x4c, 0x78, 0x2d, 0x7f, 0xb3, 0x09, 0xcb, 0xe1, 0x53,
  2790. 0x89, 0x86, 0x3e, 0x04, 0xa5, 0x7b, 0x0f, 0x0f, 0xf7, 0x76, 0xeb, 0x3b, 0xad, 0x86, 0xf6, 0xe8,
  2791. 0xa0, 0xd5, 0x28, 0x27, 0xd1, 0xab, 0x70, 0x61, 0x6f, 0xf7, 0xc7, 0xcd, 0x96, 0x56, 0xdf, 0xdb,
  2792. 0x6d, 0xec, 0xb7, 0xb4, 0x9d, 0x56, 0x6b, 0xa7, 0xfe, 0xa0, 0x9c, 0xda, 0xfe, 0x83, 0x02, 0x2b,
  2793. 0x3b, 0xb5, 0xfa, 0x2e, 0x0b, 0xdb, 0x66, 0x47, 0xe7, 0x65, 0x5e, 0x1d, 0x32, 0xbc, 0x90, 0x9b,
  2794. 0xf9, 0xba, 0x56, 0x9d, 0xdd, 0xe5, 0x41, 0xf7, 0x21, 0xcb, 0x6b, 0x3c, 0x34, 0xfb, 0xb9, 0xad,
  2795. 0x3a, 0xa7, 0xed, 0xc3, 0x16, 0xc3, 0xdd, 0x63, 0xe6, 0xfb, 0x5b, 0x75, 0x76, 0x17, 0x08, 0x61,
  2796. 0x50, 0x02, 0xf0, 0x39, 0xff, 0x3d, 0xaa, 0xba, 0x40, 0xb0, 0x41, 0x7b, 0x90, 0xf7, 0x60, 0xfd,
  2797. 0xbc, 0x17, 0xb2, 0xea, 0xdc, 0x36, 0x0d, 0x33, 0x97, 0x28, 0xbf, 0x66, 0x3f, 0xf7, 0x55, 0xe7,
  2798. 0xf4, 0x9c, 0xd0, 0x2e, 0xe4, 0x24, 0xa0, 0x9a, 0xf3, 0xea, 0x55, 0x9d, 0xd7, 0x76, 0x61, 0x46,
  2799. 0x0b, 0x0a, 0xdb, 0xf9, 0x8f, 0x98, 0xd5, 0x05, 0xda, 0x69, 0xe8, 0x21, 0x40, 0xa8, 0xd8, 0x5a,
  2800. 0xe0, 0x75, 0xb2, 0xba, 0x48, 0x9b, 0x0c, 0x1d, 0x40, 0xc1, 0x07, 0xd5, 0x73, 0xdf, 0x0a, 0xab,
  2801. 0xf3, 0xfb, 0x55, 0xe8, 0x31, 0x14, 0xa3, 0x60, 0x72, 0xb1, 0x17, 0xc0, 0xea, 0x82, 0x8d, 0x28,
  2802. 0xa6, 0x3f, 0x8a, 0x2c, 0x17, 0x7b, 0x11, 0xac, 0x2e, 0xd8, 0x97, 0x42, 0x9f, 0xc1, 0xea, 0x24,
  2803. 0xf2, 0x5b, 0xfc, 0x81, 0xb0, 0x7a, 0x8e, 0x4e, 0x15, 0x1a, 0x00, 0x9a, 0x82, 0x18, 0xcf, 0xf1,
  2804. 0x5e, 0x58, 0x3d, 0x4f, 0xe3, 0xaa, 0xd6, 0xf8, 0xea, 0xc5, 0x7a, 0xf2, 0xeb, 0x17, 0xeb, 0xc9,
  2805. 0x7f, 0xbc, 0x58, 0x4f, 0x3e, 0x7f, 0xb9, 0x9e, 0xf8, 0xfa, 0xe5, 0x7a, 0xe2, 0x6f, 0x2f, 0xd7,
  2806. 0x13, 0x3f, 0x7b, 0xab, 0x6b, 0xd2, 0xde, 0xa8, 0xbd, 0xd9, 0xb1, 0x07, 0x5b, 0xe1, 0x3f, 0x22,
  2807. 0x4c, 0xfb, 0x73, 0x44, 0x3b, 0xc7, 0x93, 0xca, 0xad, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x63,
  2808. 0x45, 0xfb, 0xc8, 0x3c, 0x21, 0x00, 0x00,
  2809. }
  2810. // Reference imports to suppress errors if they are not otherwise used.
  2811. var _ context.Context
  2812. var _ grpc.ClientConn
  2813. // This is a compile-time assertion to ensure that this generated file
  2814. // is compatible with the grpc package it is being compiled against.
  2815. const _ = grpc.SupportPackageIsVersion4
  2816. // ABCIApplicationClient is the client API for ABCIApplication service.
  2817. //
  2818. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  2819. type ABCIApplicationClient interface {
  2820. Echo(ctx context.Context, in *RequestEcho, opts ...grpc.CallOption) (*ResponseEcho, error)
  2821. Flush(ctx context.Context, in *RequestFlush, opts ...grpc.CallOption) (*ResponseFlush, error)
  2822. Info(ctx context.Context, in *RequestInfo, opts ...grpc.CallOption) (*ResponseInfo, error)
  2823. DeliverTx(ctx context.Context, in *RequestDeliverTx, opts ...grpc.CallOption) (*ResponseDeliverTx, error)
  2824. CheckTx(ctx context.Context, in *RequestCheckTx, opts ...grpc.CallOption) (*ResponseCheckTx, error)
  2825. Query(ctx context.Context, in *RequestQuery, opts ...grpc.CallOption) (*ResponseQuery, error)
  2826. Commit(ctx context.Context, in *RequestCommit, opts ...grpc.CallOption) (*ResponseCommit, error)
  2827. InitChain(ctx context.Context, in *RequestInitChain, opts ...grpc.CallOption) (*ResponseInitChain, error)
  2828. BeginBlock(ctx context.Context, in *RequestBeginBlock, opts ...grpc.CallOption) (*ResponseBeginBlock, error)
  2829. EndBlock(ctx context.Context, in *RequestEndBlock, opts ...grpc.CallOption) (*ResponseEndBlock, error)
  2830. ListSnapshots(ctx context.Context, in *RequestListSnapshots, opts ...grpc.CallOption) (*ResponseListSnapshots, error)
  2831. OfferSnapshot(ctx context.Context, in *RequestOfferSnapshot, opts ...grpc.CallOption) (*ResponseOfferSnapshot, error)
  2832. LoadSnapshotChunk(ctx context.Context, in *RequestLoadSnapshotChunk, opts ...grpc.CallOption) (*ResponseLoadSnapshotChunk, error)
  2833. ApplySnapshotChunk(ctx context.Context, in *RequestApplySnapshotChunk, opts ...grpc.CallOption) (*ResponseApplySnapshotChunk, error)
  2834. }
  2835. type aBCIApplicationClient struct {
  2836. cc *grpc.ClientConn
  2837. }
  2838. func NewABCIApplicationClient(cc *grpc.ClientConn) ABCIApplicationClient {
  2839. return &aBCIApplicationClient{cc}
  2840. }
  2841. func (c *aBCIApplicationClient) Echo(ctx context.Context, in *RequestEcho, opts ...grpc.CallOption) (*ResponseEcho, error) {
  2842. out := new(ResponseEcho)
  2843. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Echo", in, out, opts...)
  2844. if err != nil {
  2845. return nil, err
  2846. }
  2847. return out, nil
  2848. }
  2849. func (c *aBCIApplicationClient) Flush(ctx context.Context, in *RequestFlush, opts ...grpc.CallOption) (*ResponseFlush, error) {
  2850. out := new(ResponseFlush)
  2851. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Flush", in, out, opts...)
  2852. if err != nil {
  2853. return nil, err
  2854. }
  2855. return out, nil
  2856. }
  2857. func (c *aBCIApplicationClient) Info(ctx context.Context, in *RequestInfo, opts ...grpc.CallOption) (*ResponseInfo, error) {
  2858. out := new(ResponseInfo)
  2859. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Info", in, out, opts...)
  2860. if err != nil {
  2861. return nil, err
  2862. }
  2863. return out, nil
  2864. }
  2865. func (c *aBCIApplicationClient) DeliverTx(ctx context.Context, in *RequestDeliverTx, opts ...grpc.CallOption) (*ResponseDeliverTx, error) {
  2866. out := new(ResponseDeliverTx)
  2867. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/DeliverTx", in, out, opts...)
  2868. if err != nil {
  2869. return nil, err
  2870. }
  2871. return out, nil
  2872. }
  2873. func (c *aBCIApplicationClient) CheckTx(ctx context.Context, in *RequestCheckTx, opts ...grpc.CallOption) (*ResponseCheckTx, error) {
  2874. out := new(ResponseCheckTx)
  2875. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/CheckTx", in, out, opts...)
  2876. if err != nil {
  2877. return nil, err
  2878. }
  2879. return out, nil
  2880. }
  2881. func (c *aBCIApplicationClient) Query(ctx context.Context, in *RequestQuery, opts ...grpc.CallOption) (*ResponseQuery, error) {
  2882. out := new(ResponseQuery)
  2883. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Query", in, out, opts...)
  2884. if err != nil {
  2885. return nil, err
  2886. }
  2887. return out, nil
  2888. }
  2889. func (c *aBCIApplicationClient) Commit(ctx context.Context, in *RequestCommit, opts ...grpc.CallOption) (*ResponseCommit, error) {
  2890. out := new(ResponseCommit)
  2891. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Commit", in, out, opts...)
  2892. if err != nil {
  2893. return nil, err
  2894. }
  2895. return out, nil
  2896. }
  2897. func (c *aBCIApplicationClient) InitChain(ctx context.Context, in *RequestInitChain, opts ...grpc.CallOption) (*ResponseInitChain, error) {
  2898. out := new(ResponseInitChain)
  2899. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/InitChain", in, out, opts...)
  2900. if err != nil {
  2901. return nil, err
  2902. }
  2903. return out, nil
  2904. }
  2905. func (c *aBCIApplicationClient) BeginBlock(ctx context.Context, in *RequestBeginBlock, opts ...grpc.CallOption) (*ResponseBeginBlock, error) {
  2906. out := new(ResponseBeginBlock)
  2907. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/BeginBlock", in, out, opts...)
  2908. if err != nil {
  2909. return nil, err
  2910. }
  2911. return out, nil
  2912. }
  2913. func (c *aBCIApplicationClient) EndBlock(ctx context.Context, in *RequestEndBlock, opts ...grpc.CallOption) (*ResponseEndBlock, error) {
  2914. out := new(ResponseEndBlock)
  2915. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/EndBlock", in, out, opts...)
  2916. if err != nil {
  2917. return nil, err
  2918. }
  2919. return out, nil
  2920. }
  2921. func (c *aBCIApplicationClient) ListSnapshots(ctx context.Context, in *RequestListSnapshots, opts ...grpc.CallOption) (*ResponseListSnapshots, error) {
  2922. out := new(ResponseListSnapshots)
  2923. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/ListSnapshots", in, out, opts...)
  2924. if err != nil {
  2925. return nil, err
  2926. }
  2927. return out, nil
  2928. }
  2929. func (c *aBCIApplicationClient) OfferSnapshot(ctx context.Context, in *RequestOfferSnapshot, opts ...grpc.CallOption) (*ResponseOfferSnapshot, error) {
  2930. out := new(ResponseOfferSnapshot)
  2931. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/OfferSnapshot", in, out, opts...)
  2932. if err != nil {
  2933. return nil, err
  2934. }
  2935. return out, nil
  2936. }
  2937. func (c *aBCIApplicationClient) LoadSnapshotChunk(ctx context.Context, in *RequestLoadSnapshotChunk, opts ...grpc.CallOption) (*ResponseLoadSnapshotChunk, error) {
  2938. out := new(ResponseLoadSnapshotChunk)
  2939. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/LoadSnapshotChunk", in, out, opts...)
  2940. if err != nil {
  2941. return nil, err
  2942. }
  2943. return out, nil
  2944. }
  2945. func (c *aBCIApplicationClient) ApplySnapshotChunk(ctx context.Context, in *RequestApplySnapshotChunk, opts ...grpc.CallOption) (*ResponseApplySnapshotChunk, error) {
  2946. out := new(ResponseApplySnapshotChunk)
  2947. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/ApplySnapshotChunk", in, out, opts...)
  2948. if err != nil {
  2949. return nil, err
  2950. }
  2951. return out, nil
  2952. }
  2953. // ABCIApplicationServer is the server API for ABCIApplication service.
  2954. type ABCIApplicationServer interface {
  2955. Echo(context.Context, *RequestEcho) (*ResponseEcho, error)
  2956. Flush(context.Context, *RequestFlush) (*ResponseFlush, error)
  2957. Info(context.Context, *RequestInfo) (*ResponseInfo, error)
  2958. DeliverTx(context.Context, *RequestDeliverTx) (*ResponseDeliverTx, error)
  2959. CheckTx(context.Context, *RequestCheckTx) (*ResponseCheckTx, error)
  2960. Query(context.Context, *RequestQuery) (*ResponseQuery, error)
  2961. Commit(context.Context, *RequestCommit) (*ResponseCommit, error)
  2962. InitChain(context.Context, *RequestInitChain) (*ResponseInitChain, error)
  2963. BeginBlock(context.Context, *RequestBeginBlock) (*ResponseBeginBlock, error)
  2964. EndBlock(context.Context, *RequestEndBlock) (*ResponseEndBlock, error)
  2965. ListSnapshots(context.Context, *RequestListSnapshots) (*ResponseListSnapshots, error)
  2966. OfferSnapshot(context.Context, *RequestOfferSnapshot) (*ResponseOfferSnapshot, error)
  2967. LoadSnapshotChunk(context.Context, *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error)
  2968. ApplySnapshotChunk(context.Context, *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error)
  2969. }
  2970. // UnimplementedABCIApplicationServer can be embedded to have forward compatible implementations.
  2971. type UnimplementedABCIApplicationServer struct {
  2972. }
  2973. func (*UnimplementedABCIApplicationServer) Echo(ctx context.Context, req *RequestEcho) (*ResponseEcho, error) {
  2974. return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented")
  2975. }
  2976. func (*UnimplementedABCIApplicationServer) Flush(ctx context.Context, req *RequestFlush) (*ResponseFlush, error) {
  2977. return nil, status.Errorf(codes.Unimplemented, "method Flush not implemented")
  2978. }
  2979. func (*UnimplementedABCIApplicationServer) Info(ctx context.Context, req *RequestInfo) (*ResponseInfo, error) {
  2980. return nil, status.Errorf(codes.Unimplemented, "method Info not implemented")
  2981. }
  2982. func (*UnimplementedABCIApplicationServer) DeliverTx(ctx context.Context, req *RequestDeliverTx) (*ResponseDeliverTx, error) {
  2983. return nil, status.Errorf(codes.Unimplemented, "method DeliverTx not implemented")
  2984. }
  2985. func (*UnimplementedABCIApplicationServer) CheckTx(ctx context.Context, req *RequestCheckTx) (*ResponseCheckTx, error) {
  2986. return nil, status.Errorf(codes.Unimplemented, "method CheckTx not implemented")
  2987. }
  2988. func (*UnimplementedABCIApplicationServer) Query(ctx context.Context, req *RequestQuery) (*ResponseQuery, error) {
  2989. return nil, status.Errorf(codes.Unimplemented, "method Query not implemented")
  2990. }
  2991. func (*UnimplementedABCIApplicationServer) Commit(ctx context.Context, req *RequestCommit) (*ResponseCommit, error) {
  2992. return nil, status.Errorf(codes.Unimplemented, "method Commit not implemented")
  2993. }
  2994. func (*UnimplementedABCIApplicationServer) InitChain(ctx context.Context, req *RequestInitChain) (*ResponseInitChain, error) {
  2995. return nil, status.Errorf(codes.Unimplemented, "method InitChain not implemented")
  2996. }
  2997. func (*UnimplementedABCIApplicationServer) BeginBlock(ctx context.Context, req *RequestBeginBlock) (*ResponseBeginBlock, error) {
  2998. return nil, status.Errorf(codes.Unimplemented, "method BeginBlock not implemented")
  2999. }
  3000. func (*UnimplementedABCIApplicationServer) EndBlock(ctx context.Context, req *RequestEndBlock) (*ResponseEndBlock, error) {
  3001. return nil, status.Errorf(codes.Unimplemented, "method EndBlock not implemented")
  3002. }
  3003. func (*UnimplementedABCIApplicationServer) ListSnapshots(ctx context.Context, req *RequestListSnapshots) (*ResponseListSnapshots, error) {
  3004. return nil, status.Errorf(codes.Unimplemented, "method ListSnapshots not implemented")
  3005. }
  3006. func (*UnimplementedABCIApplicationServer) OfferSnapshot(ctx context.Context, req *RequestOfferSnapshot) (*ResponseOfferSnapshot, error) {
  3007. return nil, status.Errorf(codes.Unimplemented, "method OfferSnapshot not implemented")
  3008. }
  3009. func (*UnimplementedABCIApplicationServer) LoadSnapshotChunk(ctx context.Context, req *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error) {
  3010. return nil, status.Errorf(codes.Unimplemented, "method LoadSnapshotChunk not implemented")
  3011. }
  3012. func (*UnimplementedABCIApplicationServer) ApplySnapshotChunk(ctx context.Context, req *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error) {
  3013. return nil, status.Errorf(codes.Unimplemented, "method ApplySnapshotChunk not implemented")
  3014. }
  3015. func RegisterABCIApplicationServer(s *grpc.Server, srv ABCIApplicationServer) {
  3016. s.RegisterService(&_ABCIApplication_serviceDesc, srv)
  3017. }
  3018. func _ABCIApplication_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3019. in := new(RequestEcho)
  3020. if err := dec(in); err != nil {
  3021. return nil, err
  3022. }
  3023. if interceptor == nil {
  3024. return srv.(ABCIApplicationServer).Echo(ctx, in)
  3025. }
  3026. info := &grpc.UnaryServerInfo{
  3027. Server: srv,
  3028. FullMethod: "/tendermint.abci.ABCIApplication/Echo",
  3029. }
  3030. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3031. return srv.(ABCIApplicationServer).Echo(ctx, req.(*RequestEcho))
  3032. }
  3033. return interceptor(ctx, in, info, handler)
  3034. }
  3035. func _ABCIApplication_Flush_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3036. in := new(RequestFlush)
  3037. if err := dec(in); err != nil {
  3038. return nil, err
  3039. }
  3040. if interceptor == nil {
  3041. return srv.(ABCIApplicationServer).Flush(ctx, in)
  3042. }
  3043. info := &grpc.UnaryServerInfo{
  3044. Server: srv,
  3045. FullMethod: "/tendermint.abci.ABCIApplication/Flush",
  3046. }
  3047. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3048. return srv.(ABCIApplicationServer).Flush(ctx, req.(*RequestFlush))
  3049. }
  3050. return interceptor(ctx, in, info, handler)
  3051. }
  3052. func _ABCIApplication_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3053. in := new(RequestInfo)
  3054. if err := dec(in); err != nil {
  3055. return nil, err
  3056. }
  3057. if interceptor == nil {
  3058. return srv.(ABCIApplicationServer).Info(ctx, in)
  3059. }
  3060. info := &grpc.UnaryServerInfo{
  3061. Server: srv,
  3062. FullMethod: "/tendermint.abci.ABCIApplication/Info",
  3063. }
  3064. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3065. return srv.(ABCIApplicationServer).Info(ctx, req.(*RequestInfo))
  3066. }
  3067. return interceptor(ctx, in, info, handler)
  3068. }
  3069. func _ABCIApplication_DeliverTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3070. in := new(RequestDeliverTx)
  3071. if err := dec(in); err != nil {
  3072. return nil, err
  3073. }
  3074. if interceptor == nil {
  3075. return srv.(ABCIApplicationServer).DeliverTx(ctx, in)
  3076. }
  3077. info := &grpc.UnaryServerInfo{
  3078. Server: srv,
  3079. FullMethod: "/tendermint.abci.ABCIApplication/DeliverTx",
  3080. }
  3081. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3082. return srv.(ABCIApplicationServer).DeliverTx(ctx, req.(*RequestDeliverTx))
  3083. }
  3084. return interceptor(ctx, in, info, handler)
  3085. }
  3086. func _ABCIApplication_CheckTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3087. in := new(RequestCheckTx)
  3088. if err := dec(in); err != nil {
  3089. return nil, err
  3090. }
  3091. if interceptor == nil {
  3092. return srv.(ABCIApplicationServer).CheckTx(ctx, in)
  3093. }
  3094. info := &grpc.UnaryServerInfo{
  3095. Server: srv,
  3096. FullMethod: "/tendermint.abci.ABCIApplication/CheckTx",
  3097. }
  3098. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3099. return srv.(ABCIApplicationServer).CheckTx(ctx, req.(*RequestCheckTx))
  3100. }
  3101. return interceptor(ctx, in, info, handler)
  3102. }
  3103. func _ABCIApplication_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3104. in := new(RequestQuery)
  3105. if err := dec(in); err != nil {
  3106. return nil, err
  3107. }
  3108. if interceptor == nil {
  3109. return srv.(ABCIApplicationServer).Query(ctx, in)
  3110. }
  3111. info := &grpc.UnaryServerInfo{
  3112. Server: srv,
  3113. FullMethod: "/tendermint.abci.ABCIApplication/Query",
  3114. }
  3115. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3116. return srv.(ABCIApplicationServer).Query(ctx, req.(*RequestQuery))
  3117. }
  3118. return interceptor(ctx, in, info, handler)
  3119. }
  3120. func _ABCIApplication_Commit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3121. in := new(RequestCommit)
  3122. if err := dec(in); err != nil {
  3123. return nil, err
  3124. }
  3125. if interceptor == nil {
  3126. return srv.(ABCIApplicationServer).Commit(ctx, in)
  3127. }
  3128. info := &grpc.UnaryServerInfo{
  3129. Server: srv,
  3130. FullMethod: "/tendermint.abci.ABCIApplication/Commit",
  3131. }
  3132. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3133. return srv.(ABCIApplicationServer).Commit(ctx, req.(*RequestCommit))
  3134. }
  3135. return interceptor(ctx, in, info, handler)
  3136. }
  3137. func _ABCIApplication_InitChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3138. in := new(RequestInitChain)
  3139. if err := dec(in); err != nil {
  3140. return nil, err
  3141. }
  3142. if interceptor == nil {
  3143. return srv.(ABCIApplicationServer).InitChain(ctx, in)
  3144. }
  3145. info := &grpc.UnaryServerInfo{
  3146. Server: srv,
  3147. FullMethod: "/tendermint.abci.ABCIApplication/InitChain",
  3148. }
  3149. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3150. return srv.(ABCIApplicationServer).InitChain(ctx, req.(*RequestInitChain))
  3151. }
  3152. return interceptor(ctx, in, info, handler)
  3153. }
  3154. func _ABCIApplication_BeginBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3155. in := new(RequestBeginBlock)
  3156. if err := dec(in); err != nil {
  3157. return nil, err
  3158. }
  3159. if interceptor == nil {
  3160. return srv.(ABCIApplicationServer).BeginBlock(ctx, in)
  3161. }
  3162. info := &grpc.UnaryServerInfo{
  3163. Server: srv,
  3164. FullMethod: "/tendermint.abci.ABCIApplication/BeginBlock",
  3165. }
  3166. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3167. return srv.(ABCIApplicationServer).BeginBlock(ctx, req.(*RequestBeginBlock))
  3168. }
  3169. return interceptor(ctx, in, info, handler)
  3170. }
  3171. func _ABCIApplication_EndBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3172. in := new(RequestEndBlock)
  3173. if err := dec(in); err != nil {
  3174. return nil, err
  3175. }
  3176. if interceptor == nil {
  3177. return srv.(ABCIApplicationServer).EndBlock(ctx, in)
  3178. }
  3179. info := &grpc.UnaryServerInfo{
  3180. Server: srv,
  3181. FullMethod: "/tendermint.abci.ABCIApplication/EndBlock",
  3182. }
  3183. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3184. return srv.(ABCIApplicationServer).EndBlock(ctx, req.(*RequestEndBlock))
  3185. }
  3186. return interceptor(ctx, in, info, handler)
  3187. }
  3188. func _ABCIApplication_ListSnapshots_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3189. in := new(RequestListSnapshots)
  3190. if err := dec(in); err != nil {
  3191. return nil, err
  3192. }
  3193. if interceptor == nil {
  3194. return srv.(ABCIApplicationServer).ListSnapshots(ctx, in)
  3195. }
  3196. info := &grpc.UnaryServerInfo{
  3197. Server: srv,
  3198. FullMethod: "/tendermint.abci.ABCIApplication/ListSnapshots",
  3199. }
  3200. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3201. return srv.(ABCIApplicationServer).ListSnapshots(ctx, req.(*RequestListSnapshots))
  3202. }
  3203. return interceptor(ctx, in, info, handler)
  3204. }
  3205. func _ABCIApplication_OfferSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3206. in := new(RequestOfferSnapshot)
  3207. if err := dec(in); err != nil {
  3208. return nil, err
  3209. }
  3210. if interceptor == nil {
  3211. return srv.(ABCIApplicationServer).OfferSnapshot(ctx, in)
  3212. }
  3213. info := &grpc.UnaryServerInfo{
  3214. Server: srv,
  3215. FullMethod: "/tendermint.abci.ABCIApplication/OfferSnapshot",
  3216. }
  3217. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3218. return srv.(ABCIApplicationServer).OfferSnapshot(ctx, req.(*RequestOfferSnapshot))
  3219. }
  3220. return interceptor(ctx, in, info, handler)
  3221. }
  3222. func _ABCIApplication_LoadSnapshotChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3223. in := new(RequestLoadSnapshotChunk)
  3224. if err := dec(in); err != nil {
  3225. return nil, err
  3226. }
  3227. if interceptor == nil {
  3228. return srv.(ABCIApplicationServer).LoadSnapshotChunk(ctx, in)
  3229. }
  3230. info := &grpc.UnaryServerInfo{
  3231. Server: srv,
  3232. FullMethod: "/tendermint.abci.ABCIApplication/LoadSnapshotChunk",
  3233. }
  3234. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3235. return srv.(ABCIApplicationServer).LoadSnapshotChunk(ctx, req.(*RequestLoadSnapshotChunk))
  3236. }
  3237. return interceptor(ctx, in, info, handler)
  3238. }
  3239. func _ABCIApplication_ApplySnapshotChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3240. in := new(RequestApplySnapshotChunk)
  3241. if err := dec(in); err != nil {
  3242. return nil, err
  3243. }
  3244. if interceptor == nil {
  3245. return srv.(ABCIApplicationServer).ApplySnapshotChunk(ctx, in)
  3246. }
  3247. info := &grpc.UnaryServerInfo{
  3248. Server: srv,
  3249. FullMethod: "/tendermint.abci.ABCIApplication/ApplySnapshotChunk",
  3250. }
  3251. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3252. return srv.(ABCIApplicationServer).ApplySnapshotChunk(ctx, req.(*RequestApplySnapshotChunk))
  3253. }
  3254. return interceptor(ctx, in, info, handler)
  3255. }
  3256. var _ABCIApplication_serviceDesc = grpc.ServiceDesc{
  3257. ServiceName: "tendermint.abci.ABCIApplication",
  3258. HandlerType: (*ABCIApplicationServer)(nil),
  3259. Methods: []grpc.MethodDesc{
  3260. {
  3261. MethodName: "Echo",
  3262. Handler: _ABCIApplication_Echo_Handler,
  3263. },
  3264. {
  3265. MethodName: "Flush",
  3266. Handler: _ABCIApplication_Flush_Handler,
  3267. },
  3268. {
  3269. MethodName: "Info",
  3270. Handler: _ABCIApplication_Info_Handler,
  3271. },
  3272. {
  3273. MethodName: "DeliverTx",
  3274. Handler: _ABCIApplication_DeliverTx_Handler,
  3275. },
  3276. {
  3277. MethodName: "CheckTx",
  3278. Handler: _ABCIApplication_CheckTx_Handler,
  3279. },
  3280. {
  3281. MethodName: "Query",
  3282. Handler: _ABCIApplication_Query_Handler,
  3283. },
  3284. {
  3285. MethodName: "Commit",
  3286. Handler: _ABCIApplication_Commit_Handler,
  3287. },
  3288. {
  3289. MethodName: "InitChain",
  3290. Handler: _ABCIApplication_InitChain_Handler,
  3291. },
  3292. {
  3293. MethodName: "BeginBlock",
  3294. Handler: _ABCIApplication_BeginBlock_Handler,
  3295. },
  3296. {
  3297. MethodName: "EndBlock",
  3298. Handler: _ABCIApplication_EndBlock_Handler,
  3299. },
  3300. {
  3301. MethodName: "ListSnapshots",
  3302. Handler: _ABCIApplication_ListSnapshots_Handler,
  3303. },
  3304. {
  3305. MethodName: "OfferSnapshot",
  3306. Handler: _ABCIApplication_OfferSnapshot_Handler,
  3307. },
  3308. {
  3309. MethodName: "LoadSnapshotChunk",
  3310. Handler: _ABCIApplication_LoadSnapshotChunk_Handler,
  3311. },
  3312. {
  3313. MethodName: "ApplySnapshotChunk",
  3314. Handler: _ABCIApplication_ApplySnapshotChunk_Handler,
  3315. },
  3316. },
  3317. Streams: []grpc.StreamDesc{},
  3318. Metadata: "tendermint/abci/types.proto",
  3319. }
  3320. func (m *Request) Marshal() (dAtA []byte, err error) {
  3321. size := m.Size()
  3322. dAtA = make([]byte, size)
  3323. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3324. if err != nil {
  3325. return nil, err
  3326. }
  3327. return dAtA[:n], nil
  3328. }
  3329. func (m *Request) MarshalTo(dAtA []byte) (int, error) {
  3330. size := m.Size()
  3331. return m.MarshalToSizedBuffer(dAtA[:size])
  3332. }
  3333. func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3334. i := len(dAtA)
  3335. _ = i
  3336. var l int
  3337. _ = l
  3338. if m.Value != nil {
  3339. {
  3340. size := m.Value.Size()
  3341. i -= size
  3342. if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil {
  3343. return 0, err
  3344. }
  3345. }
  3346. }
  3347. return len(dAtA) - i, nil
  3348. }
  3349. func (m *Request_Echo) MarshalTo(dAtA []byte) (int, error) {
  3350. size := m.Size()
  3351. return m.MarshalToSizedBuffer(dAtA[:size])
  3352. }
  3353. func (m *Request_Echo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3354. i := len(dAtA)
  3355. if m.Echo != nil {
  3356. {
  3357. size, err := m.Echo.MarshalToSizedBuffer(dAtA[:i])
  3358. if err != nil {
  3359. return 0, err
  3360. }
  3361. i -= size
  3362. i = encodeVarintTypes(dAtA, i, uint64(size))
  3363. }
  3364. i--
  3365. dAtA[i] = 0xa
  3366. }
  3367. return len(dAtA) - i, nil
  3368. }
  3369. func (m *Request_Flush) MarshalTo(dAtA []byte) (int, error) {
  3370. size := m.Size()
  3371. return m.MarshalToSizedBuffer(dAtA[:size])
  3372. }
  3373. func (m *Request_Flush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3374. i := len(dAtA)
  3375. if m.Flush != nil {
  3376. {
  3377. size, err := m.Flush.MarshalToSizedBuffer(dAtA[:i])
  3378. if err != nil {
  3379. return 0, err
  3380. }
  3381. i -= size
  3382. i = encodeVarintTypes(dAtA, i, uint64(size))
  3383. }
  3384. i--
  3385. dAtA[i] = 0x12
  3386. }
  3387. return len(dAtA) - i, nil
  3388. }
  3389. func (m *Request_Info) MarshalTo(dAtA []byte) (int, error) {
  3390. size := m.Size()
  3391. return m.MarshalToSizedBuffer(dAtA[:size])
  3392. }
  3393. func (m *Request_Info) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3394. i := len(dAtA)
  3395. if m.Info != nil {
  3396. {
  3397. size, err := m.Info.MarshalToSizedBuffer(dAtA[:i])
  3398. if err != nil {
  3399. return 0, err
  3400. }
  3401. i -= size
  3402. i = encodeVarintTypes(dAtA, i, uint64(size))
  3403. }
  3404. i--
  3405. dAtA[i] = 0x1a
  3406. }
  3407. return len(dAtA) - i, nil
  3408. }
  3409. func (m *Request_InitChain) MarshalTo(dAtA []byte) (int, error) {
  3410. size := m.Size()
  3411. return m.MarshalToSizedBuffer(dAtA[:size])
  3412. }
  3413. func (m *Request_InitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3414. i := len(dAtA)
  3415. if m.InitChain != nil {
  3416. {
  3417. size, err := m.InitChain.MarshalToSizedBuffer(dAtA[:i])
  3418. if err != nil {
  3419. return 0, err
  3420. }
  3421. i -= size
  3422. i = encodeVarintTypes(dAtA, i, uint64(size))
  3423. }
  3424. i--
  3425. dAtA[i] = 0x22
  3426. }
  3427. return len(dAtA) - i, nil
  3428. }
  3429. func (m *Request_Query) MarshalTo(dAtA []byte) (int, error) {
  3430. size := m.Size()
  3431. return m.MarshalToSizedBuffer(dAtA[:size])
  3432. }
  3433. func (m *Request_Query) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3434. i := len(dAtA)
  3435. if m.Query != nil {
  3436. {
  3437. size, err := m.Query.MarshalToSizedBuffer(dAtA[:i])
  3438. if err != nil {
  3439. return 0, err
  3440. }
  3441. i -= size
  3442. i = encodeVarintTypes(dAtA, i, uint64(size))
  3443. }
  3444. i--
  3445. dAtA[i] = 0x2a
  3446. }
  3447. return len(dAtA) - i, nil
  3448. }
  3449. func (m *Request_BeginBlock) MarshalTo(dAtA []byte) (int, error) {
  3450. size := m.Size()
  3451. return m.MarshalToSizedBuffer(dAtA[:size])
  3452. }
  3453. func (m *Request_BeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3454. i := len(dAtA)
  3455. if m.BeginBlock != nil {
  3456. {
  3457. size, err := m.BeginBlock.MarshalToSizedBuffer(dAtA[:i])
  3458. if err != nil {
  3459. return 0, err
  3460. }
  3461. i -= size
  3462. i = encodeVarintTypes(dAtA, i, uint64(size))
  3463. }
  3464. i--
  3465. dAtA[i] = 0x32
  3466. }
  3467. return len(dAtA) - i, nil
  3468. }
  3469. func (m *Request_CheckTx) MarshalTo(dAtA []byte) (int, error) {
  3470. size := m.Size()
  3471. return m.MarshalToSizedBuffer(dAtA[:size])
  3472. }
  3473. func (m *Request_CheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3474. i := len(dAtA)
  3475. if m.CheckTx != nil {
  3476. {
  3477. size, err := m.CheckTx.MarshalToSizedBuffer(dAtA[:i])
  3478. if err != nil {
  3479. return 0, err
  3480. }
  3481. i -= size
  3482. i = encodeVarintTypes(dAtA, i, uint64(size))
  3483. }
  3484. i--
  3485. dAtA[i] = 0x3a
  3486. }
  3487. return len(dAtA) - i, nil
  3488. }
  3489. func (m *Request_DeliverTx) MarshalTo(dAtA []byte) (int, error) {
  3490. size := m.Size()
  3491. return m.MarshalToSizedBuffer(dAtA[:size])
  3492. }
  3493. func (m *Request_DeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3494. i := len(dAtA)
  3495. if m.DeliverTx != nil {
  3496. {
  3497. size, err := m.DeliverTx.MarshalToSizedBuffer(dAtA[:i])
  3498. if err != nil {
  3499. return 0, err
  3500. }
  3501. i -= size
  3502. i = encodeVarintTypes(dAtA, i, uint64(size))
  3503. }
  3504. i--
  3505. dAtA[i] = 0x42
  3506. }
  3507. return len(dAtA) - i, nil
  3508. }
  3509. func (m *Request_EndBlock) MarshalTo(dAtA []byte) (int, error) {
  3510. size := m.Size()
  3511. return m.MarshalToSizedBuffer(dAtA[:size])
  3512. }
  3513. func (m *Request_EndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3514. i := len(dAtA)
  3515. if m.EndBlock != nil {
  3516. {
  3517. size, err := m.EndBlock.MarshalToSizedBuffer(dAtA[:i])
  3518. if err != nil {
  3519. return 0, err
  3520. }
  3521. i -= size
  3522. i = encodeVarintTypes(dAtA, i, uint64(size))
  3523. }
  3524. i--
  3525. dAtA[i] = 0x4a
  3526. }
  3527. return len(dAtA) - i, nil
  3528. }
  3529. func (m *Request_Commit) MarshalTo(dAtA []byte) (int, error) {
  3530. size := m.Size()
  3531. return m.MarshalToSizedBuffer(dAtA[:size])
  3532. }
  3533. func (m *Request_Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3534. i := len(dAtA)
  3535. if m.Commit != nil {
  3536. {
  3537. size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i])
  3538. if err != nil {
  3539. return 0, err
  3540. }
  3541. i -= size
  3542. i = encodeVarintTypes(dAtA, i, uint64(size))
  3543. }
  3544. i--
  3545. dAtA[i] = 0x52
  3546. }
  3547. return len(dAtA) - i, nil
  3548. }
  3549. func (m *Request_ListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  3550. size := m.Size()
  3551. return m.MarshalToSizedBuffer(dAtA[:size])
  3552. }
  3553. func (m *Request_ListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3554. i := len(dAtA)
  3555. if m.ListSnapshots != nil {
  3556. {
  3557. size, err := m.ListSnapshots.MarshalToSizedBuffer(dAtA[:i])
  3558. if err != nil {
  3559. return 0, err
  3560. }
  3561. i -= size
  3562. i = encodeVarintTypes(dAtA, i, uint64(size))
  3563. }
  3564. i--
  3565. dAtA[i] = 0x5a
  3566. }
  3567. return len(dAtA) - i, nil
  3568. }
  3569. func (m *Request_OfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  3570. size := m.Size()
  3571. return m.MarshalToSizedBuffer(dAtA[:size])
  3572. }
  3573. func (m *Request_OfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3574. i := len(dAtA)
  3575. if m.OfferSnapshot != nil {
  3576. {
  3577. size, err := m.OfferSnapshot.MarshalToSizedBuffer(dAtA[:i])
  3578. if err != nil {
  3579. return 0, err
  3580. }
  3581. i -= size
  3582. i = encodeVarintTypes(dAtA, i, uint64(size))
  3583. }
  3584. i--
  3585. dAtA[i] = 0x62
  3586. }
  3587. return len(dAtA) - i, nil
  3588. }
  3589. func (m *Request_LoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  3590. size := m.Size()
  3591. return m.MarshalToSizedBuffer(dAtA[:size])
  3592. }
  3593. func (m *Request_LoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3594. i := len(dAtA)
  3595. if m.LoadSnapshotChunk != nil {
  3596. {
  3597. size, err := m.LoadSnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  3598. if err != nil {
  3599. return 0, err
  3600. }
  3601. i -= size
  3602. i = encodeVarintTypes(dAtA, i, uint64(size))
  3603. }
  3604. i--
  3605. dAtA[i] = 0x6a
  3606. }
  3607. return len(dAtA) - i, nil
  3608. }
  3609. func (m *Request_ApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  3610. size := m.Size()
  3611. return m.MarshalToSizedBuffer(dAtA[:size])
  3612. }
  3613. func (m *Request_ApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3614. i := len(dAtA)
  3615. if m.ApplySnapshotChunk != nil {
  3616. {
  3617. size, err := m.ApplySnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  3618. if err != nil {
  3619. return 0, err
  3620. }
  3621. i -= size
  3622. i = encodeVarintTypes(dAtA, i, uint64(size))
  3623. }
  3624. i--
  3625. dAtA[i] = 0x72
  3626. }
  3627. return len(dAtA) - i, nil
  3628. }
  3629. func (m *RequestEcho) Marshal() (dAtA []byte, err error) {
  3630. size := m.Size()
  3631. dAtA = make([]byte, size)
  3632. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3633. if err != nil {
  3634. return nil, err
  3635. }
  3636. return dAtA[:n], nil
  3637. }
  3638. func (m *RequestEcho) MarshalTo(dAtA []byte) (int, error) {
  3639. size := m.Size()
  3640. return m.MarshalToSizedBuffer(dAtA[:size])
  3641. }
  3642. func (m *RequestEcho) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3643. i := len(dAtA)
  3644. _ = i
  3645. var l int
  3646. _ = l
  3647. if len(m.Message) > 0 {
  3648. i -= len(m.Message)
  3649. copy(dAtA[i:], m.Message)
  3650. i = encodeVarintTypes(dAtA, i, uint64(len(m.Message)))
  3651. i--
  3652. dAtA[i] = 0xa
  3653. }
  3654. return len(dAtA) - i, nil
  3655. }
  3656. func (m *RequestFlush) Marshal() (dAtA []byte, err error) {
  3657. size := m.Size()
  3658. dAtA = make([]byte, size)
  3659. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3660. if err != nil {
  3661. return nil, err
  3662. }
  3663. return dAtA[:n], nil
  3664. }
  3665. func (m *RequestFlush) MarshalTo(dAtA []byte) (int, error) {
  3666. size := m.Size()
  3667. return m.MarshalToSizedBuffer(dAtA[:size])
  3668. }
  3669. func (m *RequestFlush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3670. i := len(dAtA)
  3671. _ = i
  3672. var l int
  3673. _ = l
  3674. return len(dAtA) - i, nil
  3675. }
  3676. func (m *RequestInfo) Marshal() (dAtA []byte, err error) {
  3677. size := m.Size()
  3678. dAtA = make([]byte, size)
  3679. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3680. if err != nil {
  3681. return nil, err
  3682. }
  3683. return dAtA[:n], nil
  3684. }
  3685. func (m *RequestInfo) MarshalTo(dAtA []byte) (int, error) {
  3686. size := m.Size()
  3687. return m.MarshalToSizedBuffer(dAtA[:size])
  3688. }
  3689. func (m *RequestInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3690. i := len(dAtA)
  3691. _ = i
  3692. var l int
  3693. _ = l
  3694. if len(m.AbciVersion) > 0 {
  3695. i -= len(m.AbciVersion)
  3696. copy(dAtA[i:], m.AbciVersion)
  3697. i = encodeVarintTypes(dAtA, i, uint64(len(m.AbciVersion)))
  3698. i--
  3699. dAtA[i] = 0x22
  3700. }
  3701. if m.P2PVersion != 0 {
  3702. i = encodeVarintTypes(dAtA, i, uint64(m.P2PVersion))
  3703. i--
  3704. dAtA[i] = 0x18
  3705. }
  3706. if m.BlockVersion != 0 {
  3707. i = encodeVarintTypes(dAtA, i, uint64(m.BlockVersion))
  3708. i--
  3709. dAtA[i] = 0x10
  3710. }
  3711. if len(m.Version) > 0 {
  3712. i -= len(m.Version)
  3713. copy(dAtA[i:], m.Version)
  3714. i = encodeVarintTypes(dAtA, i, uint64(len(m.Version)))
  3715. i--
  3716. dAtA[i] = 0xa
  3717. }
  3718. return len(dAtA) - i, nil
  3719. }
  3720. func (m *RequestInitChain) Marshal() (dAtA []byte, err error) {
  3721. size := m.Size()
  3722. dAtA = make([]byte, size)
  3723. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3724. if err != nil {
  3725. return nil, err
  3726. }
  3727. return dAtA[:n], nil
  3728. }
  3729. func (m *RequestInitChain) MarshalTo(dAtA []byte) (int, error) {
  3730. size := m.Size()
  3731. return m.MarshalToSizedBuffer(dAtA[:size])
  3732. }
  3733. func (m *RequestInitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3734. i := len(dAtA)
  3735. _ = i
  3736. var l int
  3737. _ = l
  3738. if m.InitialHeight != 0 {
  3739. i = encodeVarintTypes(dAtA, i, uint64(m.InitialHeight))
  3740. i--
  3741. dAtA[i] = 0x30
  3742. }
  3743. if len(m.AppStateBytes) > 0 {
  3744. i -= len(m.AppStateBytes)
  3745. copy(dAtA[i:], m.AppStateBytes)
  3746. i = encodeVarintTypes(dAtA, i, uint64(len(m.AppStateBytes)))
  3747. i--
  3748. dAtA[i] = 0x2a
  3749. }
  3750. if len(m.Validators) > 0 {
  3751. for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- {
  3752. {
  3753. size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  3754. if err != nil {
  3755. return 0, err
  3756. }
  3757. i -= size
  3758. i = encodeVarintTypes(dAtA, i, uint64(size))
  3759. }
  3760. i--
  3761. dAtA[i] = 0x22
  3762. }
  3763. }
  3764. if m.ConsensusParams != nil {
  3765. {
  3766. size, err := m.ConsensusParams.MarshalToSizedBuffer(dAtA[:i])
  3767. if err != nil {
  3768. return 0, err
  3769. }
  3770. i -= size
  3771. i = encodeVarintTypes(dAtA, i, uint64(size))
  3772. }
  3773. i--
  3774. dAtA[i] = 0x1a
  3775. }
  3776. if len(m.ChainId) > 0 {
  3777. i -= len(m.ChainId)
  3778. copy(dAtA[i:], m.ChainId)
  3779. i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId)))
  3780. i--
  3781. dAtA[i] = 0x12
  3782. }
  3783. n16, err16 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):])
  3784. if err16 != nil {
  3785. return 0, err16
  3786. }
  3787. i -= n16
  3788. i = encodeVarintTypes(dAtA, i, uint64(n16))
  3789. i--
  3790. dAtA[i] = 0xa
  3791. return len(dAtA) - i, nil
  3792. }
  3793. func (m *RequestQuery) Marshal() (dAtA []byte, err error) {
  3794. size := m.Size()
  3795. dAtA = make([]byte, size)
  3796. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3797. if err != nil {
  3798. return nil, err
  3799. }
  3800. return dAtA[:n], nil
  3801. }
  3802. func (m *RequestQuery) MarshalTo(dAtA []byte) (int, error) {
  3803. size := m.Size()
  3804. return m.MarshalToSizedBuffer(dAtA[:size])
  3805. }
  3806. func (m *RequestQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3807. i := len(dAtA)
  3808. _ = i
  3809. var l int
  3810. _ = l
  3811. if m.Prove {
  3812. i--
  3813. if m.Prove {
  3814. dAtA[i] = 1
  3815. } else {
  3816. dAtA[i] = 0
  3817. }
  3818. i--
  3819. dAtA[i] = 0x20
  3820. }
  3821. if m.Height != 0 {
  3822. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  3823. i--
  3824. dAtA[i] = 0x18
  3825. }
  3826. if len(m.Path) > 0 {
  3827. i -= len(m.Path)
  3828. copy(dAtA[i:], m.Path)
  3829. i = encodeVarintTypes(dAtA, i, uint64(len(m.Path)))
  3830. i--
  3831. dAtA[i] = 0x12
  3832. }
  3833. if len(m.Data) > 0 {
  3834. i -= len(m.Data)
  3835. copy(dAtA[i:], m.Data)
  3836. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  3837. i--
  3838. dAtA[i] = 0xa
  3839. }
  3840. return len(dAtA) - i, nil
  3841. }
  3842. func (m *RequestBeginBlock) Marshal() (dAtA []byte, err error) {
  3843. size := m.Size()
  3844. dAtA = make([]byte, size)
  3845. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3846. if err != nil {
  3847. return nil, err
  3848. }
  3849. return dAtA[:n], nil
  3850. }
  3851. func (m *RequestBeginBlock) MarshalTo(dAtA []byte) (int, error) {
  3852. size := m.Size()
  3853. return m.MarshalToSizedBuffer(dAtA[:size])
  3854. }
  3855. func (m *RequestBeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3856. i := len(dAtA)
  3857. _ = i
  3858. var l int
  3859. _ = l
  3860. if len(m.ByzantineValidators) > 0 {
  3861. for iNdEx := len(m.ByzantineValidators) - 1; iNdEx >= 0; iNdEx-- {
  3862. {
  3863. size, err := m.ByzantineValidators[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  3864. if err != nil {
  3865. return 0, err
  3866. }
  3867. i -= size
  3868. i = encodeVarintTypes(dAtA, i, uint64(size))
  3869. }
  3870. i--
  3871. dAtA[i] = 0x22
  3872. }
  3873. }
  3874. {
  3875. size, err := m.LastCommitInfo.MarshalToSizedBuffer(dAtA[:i])
  3876. if err != nil {
  3877. return 0, err
  3878. }
  3879. i -= size
  3880. i = encodeVarintTypes(dAtA, i, uint64(size))
  3881. }
  3882. i--
  3883. dAtA[i] = 0x1a
  3884. {
  3885. size, err := m.Header.MarshalToSizedBuffer(dAtA[:i])
  3886. if err != nil {
  3887. return 0, err
  3888. }
  3889. i -= size
  3890. i = encodeVarintTypes(dAtA, i, uint64(size))
  3891. }
  3892. i--
  3893. dAtA[i] = 0x12
  3894. if len(m.Hash) > 0 {
  3895. i -= len(m.Hash)
  3896. copy(dAtA[i:], m.Hash)
  3897. i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash)))
  3898. i--
  3899. dAtA[i] = 0xa
  3900. }
  3901. return len(dAtA) - i, nil
  3902. }
  3903. func (m *RequestCheckTx) Marshal() (dAtA []byte, err error) {
  3904. size := m.Size()
  3905. dAtA = make([]byte, size)
  3906. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3907. if err != nil {
  3908. return nil, err
  3909. }
  3910. return dAtA[:n], nil
  3911. }
  3912. func (m *RequestCheckTx) MarshalTo(dAtA []byte) (int, error) {
  3913. size := m.Size()
  3914. return m.MarshalToSizedBuffer(dAtA[:size])
  3915. }
  3916. func (m *RequestCheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3917. i := len(dAtA)
  3918. _ = i
  3919. var l int
  3920. _ = l
  3921. if m.Type != 0 {
  3922. i = encodeVarintTypes(dAtA, i, uint64(m.Type))
  3923. i--
  3924. dAtA[i] = 0x10
  3925. }
  3926. if len(m.Tx) > 0 {
  3927. i -= len(m.Tx)
  3928. copy(dAtA[i:], m.Tx)
  3929. i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx)))
  3930. i--
  3931. dAtA[i] = 0xa
  3932. }
  3933. return len(dAtA) - i, nil
  3934. }
  3935. func (m *RequestDeliverTx) Marshal() (dAtA []byte, err error) {
  3936. size := m.Size()
  3937. dAtA = make([]byte, size)
  3938. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3939. if err != nil {
  3940. return nil, err
  3941. }
  3942. return dAtA[:n], nil
  3943. }
  3944. func (m *RequestDeliverTx) MarshalTo(dAtA []byte) (int, error) {
  3945. size := m.Size()
  3946. return m.MarshalToSizedBuffer(dAtA[:size])
  3947. }
  3948. func (m *RequestDeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3949. i := len(dAtA)
  3950. _ = i
  3951. var l int
  3952. _ = l
  3953. if len(m.Tx) > 0 {
  3954. i -= len(m.Tx)
  3955. copy(dAtA[i:], m.Tx)
  3956. i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx)))
  3957. i--
  3958. dAtA[i] = 0xa
  3959. }
  3960. return len(dAtA) - i, nil
  3961. }
  3962. func (m *RequestEndBlock) Marshal() (dAtA []byte, err error) {
  3963. size := m.Size()
  3964. dAtA = make([]byte, size)
  3965. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3966. if err != nil {
  3967. return nil, err
  3968. }
  3969. return dAtA[:n], nil
  3970. }
  3971. func (m *RequestEndBlock) MarshalTo(dAtA []byte) (int, error) {
  3972. size := m.Size()
  3973. return m.MarshalToSizedBuffer(dAtA[:size])
  3974. }
  3975. func (m *RequestEndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3976. i := len(dAtA)
  3977. _ = i
  3978. var l int
  3979. _ = l
  3980. if m.Height != 0 {
  3981. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  3982. i--
  3983. dAtA[i] = 0x8
  3984. }
  3985. return len(dAtA) - i, nil
  3986. }
  3987. func (m *RequestCommit) Marshal() (dAtA []byte, err error) {
  3988. size := m.Size()
  3989. dAtA = make([]byte, size)
  3990. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3991. if err != nil {
  3992. return nil, err
  3993. }
  3994. return dAtA[:n], nil
  3995. }
  3996. func (m *RequestCommit) MarshalTo(dAtA []byte) (int, error) {
  3997. size := m.Size()
  3998. return m.MarshalToSizedBuffer(dAtA[:size])
  3999. }
  4000. func (m *RequestCommit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4001. i := len(dAtA)
  4002. _ = i
  4003. var l int
  4004. _ = l
  4005. return len(dAtA) - i, nil
  4006. }
  4007. func (m *RequestListSnapshots) Marshal() (dAtA []byte, err error) {
  4008. size := m.Size()
  4009. dAtA = make([]byte, size)
  4010. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4011. if err != nil {
  4012. return nil, err
  4013. }
  4014. return dAtA[:n], nil
  4015. }
  4016. func (m *RequestListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  4017. size := m.Size()
  4018. return m.MarshalToSizedBuffer(dAtA[:size])
  4019. }
  4020. func (m *RequestListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4021. i := len(dAtA)
  4022. _ = i
  4023. var l int
  4024. _ = l
  4025. return len(dAtA) - i, nil
  4026. }
  4027. func (m *RequestOfferSnapshot) Marshal() (dAtA []byte, err error) {
  4028. size := m.Size()
  4029. dAtA = make([]byte, size)
  4030. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4031. if err != nil {
  4032. return nil, err
  4033. }
  4034. return dAtA[:n], nil
  4035. }
  4036. func (m *RequestOfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  4037. size := m.Size()
  4038. return m.MarshalToSizedBuffer(dAtA[:size])
  4039. }
  4040. func (m *RequestOfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4041. i := len(dAtA)
  4042. _ = i
  4043. var l int
  4044. _ = l
  4045. if len(m.AppHash) > 0 {
  4046. i -= len(m.AppHash)
  4047. copy(dAtA[i:], m.AppHash)
  4048. i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash)))
  4049. i--
  4050. dAtA[i] = 0x12
  4051. }
  4052. if m.Snapshot != nil {
  4053. {
  4054. size, err := m.Snapshot.MarshalToSizedBuffer(dAtA[:i])
  4055. if err != nil {
  4056. return 0, err
  4057. }
  4058. i -= size
  4059. i = encodeVarintTypes(dAtA, i, uint64(size))
  4060. }
  4061. i--
  4062. dAtA[i] = 0xa
  4063. }
  4064. return len(dAtA) - i, nil
  4065. }
  4066. func (m *RequestLoadSnapshotChunk) Marshal() (dAtA []byte, err error) {
  4067. size := m.Size()
  4068. dAtA = make([]byte, size)
  4069. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4070. if err != nil {
  4071. return nil, err
  4072. }
  4073. return dAtA[:n], nil
  4074. }
  4075. func (m *RequestLoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4076. size := m.Size()
  4077. return m.MarshalToSizedBuffer(dAtA[:size])
  4078. }
  4079. func (m *RequestLoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4080. i := len(dAtA)
  4081. _ = i
  4082. var l int
  4083. _ = l
  4084. if m.Chunk != 0 {
  4085. i = encodeVarintTypes(dAtA, i, uint64(m.Chunk))
  4086. i--
  4087. dAtA[i] = 0x18
  4088. }
  4089. if m.Format != 0 {
  4090. i = encodeVarintTypes(dAtA, i, uint64(m.Format))
  4091. i--
  4092. dAtA[i] = 0x10
  4093. }
  4094. if m.Height != 0 {
  4095. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  4096. i--
  4097. dAtA[i] = 0x8
  4098. }
  4099. return len(dAtA) - i, nil
  4100. }
  4101. func (m *RequestApplySnapshotChunk) Marshal() (dAtA []byte, err error) {
  4102. size := m.Size()
  4103. dAtA = make([]byte, size)
  4104. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4105. if err != nil {
  4106. return nil, err
  4107. }
  4108. return dAtA[:n], nil
  4109. }
  4110. func (m *RequestApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4111. size := m.Size()
  4112. return m.MarshalToSizedBuffer(dAtA[:size])
  4113. }
  4114. func (m *RequestApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4115. i := len(dAtA)
  4116. _ = i
  4117. var l int
  4118. _ = l
  4119. if len(m.Sender) > 0 {
  4120. i -= len(m.Sender)
  4121. copy(dAtA[i:], m.Sender)
  4122. i = encodeVarintTypes(dAtA, i, uint64(len(m.Sender)))
  4123. i--
  4124. dAtA[i] = 0x1a
  4125. }
  4126. if len(m.Chunk) > 0 {
  4127. i -= len(m.Chunk)
  4128. copy(dAtA[i:], m.Chunk)
  4129. i = encodeVarintTypes(dAtA, i, uint64(len(m.Chunk)))
  4130. i--
  4131. dAtA[i] = 0x12
  4132. }
  4133. if m.Index != 0 {
  4134. i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  4135. i--
  4136. dAtA[i] = 0x8
  4137. }
  4138. return len(dAtA) - i, nil
  4139. }
  4140. func (m *Response) Marshal() (dAtA []byte, err error) {
  4141. size := m.Size()
  4142. dAtA = make([]byte, size)
  4143. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4144. if err != nil {
  4145. return nil, err
  4146. }
  4147. return dAtA[:n], nil
  4148. }
  4149. func (m *Response) MarshalTo(dAtA []byte) (int, error) {
  4150. size := m.Size()
  4151. return m.MarshalToSizedBuffer(dAtA[:size])
  4152. }
  4153. func (m *Response) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4154. i := len(dAtA)
  4155. _ = i
  4156. var l int
  4157. _ = l
  4158. if m.Value != nil {
  4159. {
  4160. size := m.Value.Size()
  4161. i -= size
  4162. if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil {
  4163. return 0, err
  4164. }
  4165. }
  4166. }
  4167. return len(dAtA) - i, nil
  4168. }
  4169. func (m *Response_Exception) MarshalTo(dAtA []byte) (int, error) {
  4170. size := m.Size()
  4171. return m.MarshalToSizedBuffer(dAtA[:size])
  4172. }
  4173. func (m *Response_Exception) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4174. i := len(dAtA)
  4175. if m.Exception != nil {
  4176. {
  4177. size, err := m.Exception.MarshalToSizedBuffer(dAtA[:i])
  4178. if err != nil {
  4179. return 0, err
  4180. }
  4181. i -= size
  4182. i = encodeVarintTypes(dAtA, i, uint64(size))
  4183. }
  4184. i--
  4185. dAtA[i] = 0xa
  4186. }
  4187. return len(dAtA) - i, nil
  4188. }
  4189. func (m *Response_Echo) MarshalTo(dAtA []byte) (int, error) {
  4190. size := m.Size()
  4191. return m.MarshalToSizedBuffer(dAtA[:size])
  4192. }
  4193. func (m *Response_Echo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4194. i := len(dAtA)
  4195. if m.Echo != nil {
  4196. {
  4197. size, err := m.Echo.MarshalToSizedBuffer(dAtA[:i])
  4198. if err != nil {
  4199. return 0, err
  4200. }
  4201. i -= size
  4202. i = encodeVarintTypes(dAtA, i, uint64(size))
  4203. }
  4204. i--
  4205. dAtA[i] = 0x12
  4206. }
  4207. return len(dAtA) - i, nil
  4208. }
  4209. func (m *Response_Flush) MarshalTo(dAtA []byte) (int, error) {
  4210. size := m.Size()
  4211. return m.MarshalToSizedBuffer(dAtA[:size])
  4212. }
  4213. func (m *Response_Flush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4214. i := len(dAtA)
  4215. if m.Flush != nil {
  4216. {
  4217. size, err := m.Flush.MarshalToSizedBuffer(dAtA[:i])
  4218. if err != nil {
  4219. return 0, err
  4220. }
  4221. i -= size
  4222. i = encodeVarintTypes(dAtA, i, uint64(size))
  4223. }
  4224. i--
  4225. dAtA[i] = 0x1a
  4226. }
  4227. return len(dAtA) - i, nil
  4228. }
  4229. func (m *Response_Info) MarshalTo(dAtA []byte) (int, error) {
  4230. size := m.Size()
  4231. return m.MarshalToSizedBuffer(dAtA[:size])
  4232. }
  4233. func (m *Response_Info) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4234. i := len(dAtA)
  4235. if m.Info != nil {
  4236. {
  4237. size, err := m.Info.MarshalToSizedBuffer(dAtA[:i])
  4238. if err != nil {
  4239. return 0, err
  4240. }
  4241. i -= size
  4242. i = encodeVarintTypes(dAtA, i, uint64(size))
  4243. }
  4244. i--
  4245. dAtA[i] = 0x22
  4246. }
  4247. return len(dAtA) - i, nil
  4248. }
  4249. func (m *Response_InitChain) MarshalTo(dAtA []byte) (int, error) {
  4250. size := m.Size()
  4251. return m.MarshalToSizedBuffer(dAtA[:size])
  4252. }
  4253. func (m *Response_InitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4254. i := len(dAtA)
  4255. if m.InitChain != nil {
  4256. {
  4257. size, err := m.InitChain.MarshalToSizedBuffer(dAtA[:i])
  4258. if err != nil {
  4259. return 0, err
  4260. }
  4261. i -= size
  4262. i = encodeVarintTypes(dAtA, i, uint64(size))
  4263. }
  4264. i--
  4265. dAtA[i] = 0x2a
  4266. }
  4267. return len(dAtA) - i, nil
  4268. }
  4269. func (m *Response_Query) MarshalTo(dAtA []byte) (int, error) {
  4270. size := m.Size()
  4271. return m.MarshalToSizedBuffer(dAtA[:size])
  4272. }
  4273. func (m *Response_Query) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4274. i := len(dAtA)
  4275. if m.Query != nil {
  4276. {
  4277. size, err := m.Query.MarshalToSizedBuffer(dAtA[:i])
  4278. if err != nil {
  4279. return 0, err
  4280. }
  4281. i -= size
  4282. i = encodeVarintTypes(dAtA, i, uint64(size))
  4283. }
  4284. i--
  4285. dAtA[i] = 0x32
  4286. }
  4287. return len(dAtA) - i, nil
  4288. }
  4289. func (m *Response_BeginBlock) MarshalTo(dAtA []byte) (int, error) {
  4290. size := m.Size()
  4291. return m.MarshalToSizedBuffer(dAtA[:size])
  4292. }
  4293. func (m *Response_BeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4294. i := len(dAtA)
  4295. if m.BeginBlock != nil {
  4296. {
  4297. size, err := m.BeginBlock.MarshalToSizedBuffer(dAtA[:i])
  4298. if err != nil {
  4299. return 0, err
  4300. }
  4301. i -= size
  4302. i = encodeVarintTypes(dAtA, i, uint64(size))
  4303. }
  4304. i--
  4305. dAtA[i] = 0x3a
  4306. }
  4307. return len(dAtA) - i, nil
  4308. }
  4309. func (m *Response_CheckTx) MarshalTo(dAtA []byte) (int, error) {
  4310. size := m.Size()
  4311. return m.MarshalToSizedBuffer(dAtA[:size])
  4312. }
  4313. func (m *Response_CheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4314. i := len(dAtA)
  4315. if m.CheckTx != nil {
  4316. {
  4317. size, err := m.CheckTx.MarshalToSizedBuffer(dAtA[:i])
  4318. if err != nil {
  4319. return 0, err
  4320. }
  4321. i -= size
  4322. i = encodeVarintTypes(dAtA, i, uint64(size))
  4323. }
  4324. i--
  4325. dAtA[i] = 0x42
  4326. }
  4327. return len(dAtA) - i, nil
  4328. }
  4329. func (m *Response_DeliverTx) MarshalTo(dAtA []byte) (int, error) {
  4330. size := m.Size()
  4331. return m.MarshalToSizedBuffer(dAtA[:size])
  4332. }
  4333. func (m *Response_DeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4334. i := len(dAtA)
  4335. if m.DeliverTx != nil {
  4336. {
  4337. size, err := m.DeliverTx.MarshalToSizedBuffer(dAtA[:i])
  4338. if err != nil {
  4339. return 0, err
  4340. }
  4341. i -= size
  4342. i = encodeVarintTypes(dAtA, i, uint64(size))
  4343. }
  4344. i--
  4345. dAtA[i] = 0x4a
  4346. }
  4347. return len(dAtA) - i, nil
  4348. }
  4349. func (m *Response_EndBlock) MarshalTo(dAtA []byte) (int, error) {
  4350. size := m.Size()
  4351. return m.MarshalToSizedBuffer(dAtA[:size])
  4352. }
  4353. func (m *Response_EndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4354. i := len(dAtA)
  4355. if m.EndBlock != nil {
  4356. {
  4357. size, err := m.EndBlock.MarshalToSizedBuffer(dAtA[:i])
  4358. if err != nil {
  4359. return 0, err
  4360. }
  4361. i -= size
  4362. i = encodeVarintTypes(dAtA, i, uint64(size))
  4363. }
  4364. i--
  4365. dAtA[i] = 0x52
  4366. }
  4367. return len(dAtA) - i, nil
  4368. }
  4369. func (m *Response_Commit) MarshalTo(dAtA []byte) (int, error) {
  4370. size := m.Size()
  4371. return m.MarshalToSizedBuffer(dAtA[:size])
  4372. }
  4373. func (m *Response_Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4374. i := len(dAtA)
  4375. if m.Commit != nil {
  4376. {
  4377. size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i])
  4378. if err != nil {
  4379. return 0, err
  4380. }
  4381. i -= size
  4382. i = encodeVarintTypes(dAtA, i, uint64(size))
  4383. }
  4384. i--
  4385. dAtA[i] = 0x5a
  4386. }
  4387. return len(dAtA) - i, nil
  4388. }
  4389. func (m *Response_ListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  4390. size := m.Size()
  4391. return m.MarshalToSizedBuffer(dAtA[:size])
  4392. }
  4393. func (m *Response_ListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4394. i := len(dAtA)
  4395. if m.ListSnapshots != nil {
  4396. {
  4397. size, err := m.ListSnapshots.MarshalToSizedBuffer(dAtA[:i])
  4398. if err != nil {
  4399. return 0, err
  4400. }
  4401. i -= size
  4402. i = encodeVarintTypes(dAtA, i, uint64(size))
  4403. }
  4404. i--
  4405. dAtA[i] = 0x62
  4406. }
  4407. return len(dAtA) - i, nil
  4408. }
  4409. func (m *Response_OfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  4410. size := m.Size()
  4411. return m.MarshalToSizedBuffer(dAtA[:size])
  4412. }
  4413. func (m *Response_OfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4414. i := len(dAtA)
  4415. if m.OfferSnapshot != nil {
  4416. {
  4417. size, err := m.OfferSnapshot.MarshalToSizedBuffer(dAtA[:i])
  4418. if err != nil {
  4419. return 0, err
  4420. }
  4421. i -= size
  4422. i = encodeVarintTypes(dAtA, i, uint64(size))
  4423. }
  4424. i--
  4425. dAtA[i] = 0x6a
  4426. }
  4427. return len(dAtA) - i, nil
  4428. }
  4429. func (m *Response_LoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4430. size := m.Size()
  4431. return m.MarshalToSizedBuffer(dAtA[:size])
  4432. }
  4433. func (m *Response_LoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4434. i := len(dAtA)
  4435. if m.LoadSnapshotChunk != nil {
  4436. {
  4437. size, err := m.LoadSnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  4438. if err != nil {
  4439. return 0, err
  4440. }
  4441. i -= size
  4442. i = encodeVarintTypes(dAtA, i, uint64(size))
  4443. }
  4444. i--
  4445. dAtA[i] = 0x72
  4446. }
  4447. return len(dAtA) - i, nil
  4448. }
  4449. func (m *Response_ApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4450. size := m.Size()
  4451. return m.MarshalToSizedBuffer(dAtA[:size])
  4452. }
  4453. func (m *Response_ApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4454. i := len(dAtA)
  4455. if m.ApplySnapshotChunk != nil {
  4456. {
  4457. size, err := m.ApplySnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  4458. if err != nil {
  4459. return 0, err
  4460. }
  4461. i -= size
  4462. i = encodeVarintTypes(dAtA, i, uint64(size))
  4463. }
  4464. i--
  4465. dAtA[i] = 0x7a
  4466. }
  4467. return len(dAtA) - i, nil
  4468. }
  4469. func (m *ResponseException) Marshal() (dAtA []byte, err error) {
  4470. size := m.Size()
  4471. dAtA = make([]byte, size)
  4472. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4473. if err != nil {
  4474. return nil, err
  4475. }
  4476. return dAtA[:n], nil
  4477. }
  4478. func (m *ResponseException) MarshalTo(dAtA []byte) (int, error) {
  4479. size := m.Size()
  4480. return m.MarshalToSizedBuffer(dAtA[:size])
  4481. }
  4482. func (m *ResponseException) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4483. i := len(dAtA)
  4484. _ = i
  4485. var l int
  4486. _ = l
  4487. if len(m.Error) > 0 {
  4488. i -= len(m.Error)
  4489. copy(dAtA[i:], m.Error)
  4490. i = encodeVarintTypes(dAtA, i, uint64(len(m.Error)))
  4491. i--
  4492. dAtA[i] = 0xa
  4493. }
  4494. return len(dAtA) - i, nil
  4495. }
  4496. func (m *ResponseEcho) Marshal() (dAtA []byte, err error) {
  4497. size := m.Size()
  4498. dAtA = make([]byte, size)
  4499. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4500. if err != nil {
  4501. return nil, err
  4502. }
  4503. return dAtA[:n], nil
  4504. }
  4505. func (m *ResponseEcho) MarshalTo(dAtA []byte) (int, error) {
  4506. size := m.Size()
  4507. return m.MarshalToSizedBuffer(dAtA[:size])
  4508. }
  4509. func (m *ResponseEcho) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4510. i := len(dAtA)
  4511. _ = i
  4512. var l int
  4513. _ = l
  4514. if len(m.Message) > 0 {
  4515. i -= len(m.Message)
  4516. copy(dAtA[i:], m.Message)
  4517. i = encodeVarintTypes(dAtA, i, uint64(len(m.Message)))
  4518. i--
  4519. dAtA[i] = 0xa
  4520. }
  4521. return len(dAtA) - i, nil
  4522. }
  4523. func (m *ResponseFlush) Marshal() (dAtA []byte, err error) {
  4524. size := m.Size()
  4525. dAtA = make([]byte, size)
  4526. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4527. if err != nil {
  4528. return nil, err
  4529. }
  4530. return dAtA[:n], nil
  4531. }
  4532. func (m *ResponseFlush) MarshalTo(dAtA []byte) (int, error) {
  4533. size := m.Size()
  4534. return m.MarshalToSizedBuffer(dAtA[:size])
  4535. }
  4536. func (m *ResponseFlush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4537. i := len(dAtA)
  4538. _ = i
  4539. var l int
  4540. _ = l
  4541. return len(dAtA) - i, nil
  4542. }
  4543. func (m *ResponseInfo) Marshal() (dAtA []byte, err error) {
  4544. size := m.Size()
  4545. dAtA = make([]byte, size)
  4546. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4547. if err != nil {
  4548. return nil, err
  4549. }
  4550. return dAtA[:n], nil
  4551. }
  4552. func (m *ResponseInfo) MarshalTo(dAtA []byte) (int, error) {
  4553. size := m.Size()
  4554. return m.MarshalToSizedBuffer(dAtA[:size])
  4555. }
  4556. func (m *ResponseInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4557. i := len(dAtA)
  4558. _ = i
  4559. var l int
  4560. _ = l
  4561. if len(m.LastBlockAppHash) > 0 {
  4562. i -= len(m.LastBlockAppHash)
  4563. copy(dAtA[i:], m.LastBlockAppHash)
  4564. i = encodeVarintTypes(dAtA, i, uint64(len(m.LastBlockAppHash)))
  4565. i--
  4566. dAtA[i] = 0x2a
  4567. }
  4568. if m.LastBlockHeight != 0 {
  4569. i = encodeVarintTypes(dAtA, i, uint64(m.LastBlockHeight))
  4570. i--
  4571. dAtA[i] = 0x20
  4572. }
  4573. if m.AppVersion != 0 {
  4574. i = encodeVarintTypes(dAtA, i, uint64(m.AppVersion))
  4575. i--
  4576. dAtA[i] = 0x18
  4577. }
  4578. if len(m.Version) > 0 {
  4579. i -= len(m.Version)
  4580. copy(dAtA[i:], m.Version)
  4581. i = encodeVarintTypes(dAtA, i, uint64(len(m.Version)))
  4582. i--
  4583. dAtA[i] = 0x12
  4584. }
  4585. if len(m.Data) > 0 {
  4586. i -= len(m.Data)
  4587. copy(dAtA[i:], m.Data)
  4588. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  4589. i--
  4590. dAtA[i] = 0xa
  4591. }
  4592. return len(dAtA) - i, nil
  4593. }
  4594. func (m *ResponseInitChain) Marshal() (dAtA []byte, err error) {
  4595. size := m.Size()
  4596. dAtA = make([]byte, size)
  4597. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4598. if err != nil {
  4599. return nil, err
  4600. }
  4601. return dAtA[:n], nil
  4602. }
  4603. func (m *ResponseInitChain) MarshalTo(dAtA []byte) (int, error) {
  4604. size := m.Size()
  4605. return m.MarshalToSizedBuffer(dAtA[:size])
  4606. }
  4607. func (m *ResponseInitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4608. i := len(dAtA)
  4609. _ = i
  4610. var l int
  4611. _ = l
  4612. if len(m.AppHash) > 0 {
  4613. i -= len(m.AppHash)
  4614. copy(dAtA[i:], m.AppHash)
  4615. i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash)))
  4616. i--
  4617. dAtA[i] = 0x1a
  4618. }
  4619. if len(m.Validators) > 0 {
  4620. for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- {
  4621. {
  4622. size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4623. if err != nil {
  4624. return 0, err
  4625. }
  4626. i -= size
  4627. i = encodeVarintTypes(dAtA, i, uint64(size))
  4628. }
  4629. i--
  4630. dAtA[i] = 0x12
  4631. }
  4632. }
  4633. if m.ConsensusParams != nil {
  4634. {
  4635. size, err := m.ConsensusParams.MarshalToSizedBuffer(dAtA[:i])
  4636. if err != nil {
  4637. return 0, err
  4638. }
  4639. i -= size
  4640. i = encodeVarintTypes(dAtA, i, uint64(size))
  4641. }
  4642. i--
  4643. dAtA[i] = 0xa
  4644. }
  4645. return len(dAtA) - i, nil
  4646. }
  4647. func (m *ResponseQuery) Marshal() (dAtA []byte, err error) {
  4648. size := m.Size()
  4649. dAtA = make([]byte, size)
  4650. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4651. if err != nil {
  4652. return nil, err
  4653. }
  4654. return dAtA[:n], nil
  4655. }
  4656. func (m *ResponseQuery) MarshalTo(dAtA []byte) (int, error) {
  4657. size := m.Size()
  4658. return m.MarshalToSizedBuffer(dAtA[:size])
  4659. }
  4660. func (m *ResponseQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4661. i := len(dAtA)
  4662. _ = i
  4663. var l int
  4664. _ = l
  4665. if len(m.Codespace) > 0 {
  4666. i -= len(m.Codespace)
  4667. copy(dAtA[i:], m.Codespace)
  4668. i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace)))
  4669. i--
  4670. dAtA[i] = 0x52
  4671. }
  4672. if m.Height != 0 {
  4673. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  4674. i--
  4675. dAtA[i] = 0x48
  4676. }
  4677. if m.ProofOps != nil {
  4678. {
  4679. size, err := m.ProofOps.MarshalToSizedBuffer(dAtA[:i])
  4680. if err != nil {
  4681. return 0, err
  4682. }
  4683. i -= size
  4684. i = encodeVarintTypes(dAtA, i, uint64(size))
  4685. }
  4686. i--
  4687. dAtA[i] = 0x42
  4688. }
  4689. if len(m.Value) > 0 {
  4690. i -= len(m.Value)
  4691. copy(dAtA[i:], m.Value)
  4692. i = encodeVarintTypes(dAtA, i, uint64(len(m.Value)))
  4693. i--
  4694. dAtA[i] = 0x3a
  4695. }
  4696. if len(m.Key) > 0 {
  4697. i -= len(m.Key)
  4698. copy(dAtA[i:], m.Key)
  4699. i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
  4700. i--
  4701. dAtA[i] = 0x32
  4702. }
  4703. if m.Index != 0 {
  4704. i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  4705. i--
  4706. dAtA[i] = 0x28
  4707. }
  4708. if len(m.Info) > 0 {
  4709. i -= len(m.Info)
  4710. copy(dAtA[i:], m.Info)
  4711. i = encodeVarintTypes(dAtA, i, uint64(len(m.Info)))
  4712. i--
  4713. dAtA[i] = 0x22
  4714. }
  4715. if len(m.Log) > 0 {
  4716. i -= len(m.Log)
  4717. copy(dAtA[i:], m.Log)
  4718. i = encodeVarintTypes(dAtA, i, uint64(len(m.Log)))
  4719. i--
  4720. dAtA[i] = 0x1a
  4721. }
  4722. if m.Code != 0 {
  4723. i = encodeVarintTypes(dAtA, i, uint64(m.Code))
  4724. i--
  4725. dAtA[i] = 0x8
  4726. }
  4727. return len(dAtA) - i, nil
  4728. }
  4729. func (m *ResponseBeginBlock) Marshal() (dAtA []byte, err error) {
  4730. size := m.Size()
  4731. dAtA = make([]byte, size)
  4732. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4733. if err != nil {
  4734. return nil, err
  4735. }
  4736. return dAtA[:n], nil
  4737. }
  4738. func (m *ResponseBeginBlock) MarshalTo(dAtA []byte) (int, error) {
  4739. size := m.Size()
  4740. return m.MarshalToSizedBuffer(dAtA[:size])
  4741. }
  4742. func (m *ResponseBeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4743. i := len(dAtA)
  4744. _ = i
  4745. var l int
  4746. _ = l
  4747. if len(m.Events) > 0 {
  4748. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  4749. {
  4750. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4751. if err != nil {
  4752. return 0, err
  4753. }
  4754. i -= size
  4755. i = encodeVarintTypes(dAtA, i, uint64(size))
  4756. }
  4757. i--
  4758. dAtA[i] = 0xa
  4759. }
  4760. }
  4761. return len(dAtA) - i, nil
  4762. }
  4763. func (m *ResponseCheckTx) Marshal() (dAtA []byte, err error) {
  4764. size := m.Size()
  4765. dAtA = make([]byte, size)
  4766. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4767. if err != nil {
  4768. return nil, err
  4769. }
  4770. return dAtA[:n], nil
  4771. }
  4772. func (m *ResponseCheckTx) MarshalTo(dAtA []byte) (int, error) {
  4773. size := m.Size()
  4774. return m.MarshalToSizedBuffer(dAtA[:size])
  4775. }
  4776. func (m *ResponseCheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4777. i := len(dAtA)
  4778. _ = i
  4779. var l int
  4780. _ = l
  4781. if len(m.Codespace) > 0 {
  4782. i -= len(m.Codespace)
  4783. copy(dAtA[i:], m.Codespace)
  4784. i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace)))
  4785. i--
  4786. dAtA[i] = 0x42
  4787. }
  4788. if len(m.Events) > 0 {
  4789. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  4790. {
  4791. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4792. if err != nil {
  4793. return 0, err
  4794. }
  4795. i -= size
  4796. i = encodeVarintTypes(dAtA, i, uint64(size))
  4797. }
  4798. i--
  4799. dAtA[i] = 0x3a
  4800. }
  4801. }
  4802. if m.GasUsed != 0 {
  4803. i = encodeVarintTypes(dAtA, i, uint64(m.GasUsed))
  4804. i--
  4805. dAtA[i] = 0x30
  4806. }
  4807. if m.GasWanted != 0 {
  4808. i = encodeVarintTypes(dAtA, i, uint64(m.GasWanted))
  4809. i--
  4810. dAtA[i] = 0x28
  4811. }
  4812. if len(m.Info) > 0 {
  4813. i -= len(m.Info)
  4814. copy(dAtA[i:], m.Info)
  4815. i = encodeVarintTypes(dAtA, i, uint64(len(m.Info)))
  4816. i--
  4817. dAtA[i] = 0x22
  4818. }
  4819. if len(m.Log) > 0 {
  4820. i -= len(m.Log)
  4821. copy(dAtA[i:], m.Log)
  4822. i = encodeVarintTypes(dAtA, i, uint64(len(m.Log)))
  4823. i--
  4824. dAtA[i] = 0x1a
  4825. }
  4826. if len(m.Data) > 0 {
  4827. i -= len(m.Data)
  4828. copy(dAtA[i:], m.Data)
  4829. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  4830. i--
  4831. dAtA[i] = 0x12
  4832. }
  4833. if m.Code != 0 {
  4834. i = encodeVarintTypes(dAtA, i, uint64(m.Code))
  4835. i--
  4836. dAtA[i] = 0x8
  4837. }
  4838. return len(dAtA) - i, nil
  4839. }
  4840. func (m *ResponseDeliverTx) Marshal() (dAtA []byte, err error) {
  4841. size := m.Size()
  4842. dAtA = make([]byte, size)
  4843. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4844. if err != nil {
  4845. return nil, err
  4846. }
  4847. return dAtA[:n], nil
  4848. }
  4849. func (m *ResponseDeliverTx) MarshalTo(dAtA []byte) (int, error) {
  4850. size := m.Size()
  4851. return m.MarshalToSizedBuffer(dAtA[:size])
  4852. }
  4853. func (m *ResponseDeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4854. i := len(dAtA)
  4855. _ = i
  4856. var l int
  4857. _ = l
  4858. if len(m.Codespace) > 0 {
  4859. i -= len(m.Codespace)
  4860. copy(dAtA[i:], m.Codespace)
  4861. i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace)))
  4862. i--
  4863. dAtA[i] = 0x42
  4864. }
  4865. if len(m.Events) > 0 {
  4866. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  4867. {
  4868. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4869. if err != nil {
  4870. return 0, err
  4871. }
  4872. i -= size
  4873. i = encodeVarintTypes(dAtA, i, uint64(size))
  4874. }
  4875. i--
  4876. dAtA[i] = 0x3a
  4877. }
  4878. }
  4879. if m.GasUsed != 0 {
  4880. i = encodeVarintTypes(dAtA, i, uint64(m.GasUsed))
  4881. i--
  4882. dAtA[i] = 0x30
  4883. }
  4884. if m.GasWanted != 0 {
  4885. i = encodeVarintTypes(dAtA, i, uint64(m.GasWanted))
  4886. i--
  4887. dAtA[i] = 0x28
  4888. }
  4889. if len(m.Info) > 0 {
  4890. i -= len(m.Info)
  4891. copy(dAtA[i:], m.Info)
  4892. i = encodeVarintTypes(dAtA, i, uint64(len(m.Info)))
  4893. i--
  4894. dAtA[i] = 0x22
  4895. }
  4896. if len(m.Log) > 0 {
  4897. i -= len(m.Log)
  4898. copy(dAtA[i:], m.Log)
  4899. i = encodeVarintTypes(dAtA, i, uint64(len(m.Log)))
  4900. i--
  4901. dAtA[i] = 0x1a
  4902. }
  4903. if len(m.Data) > 0 {
  4904. i -= len(m.Data)
  4905. copy(dAtA[i:], m.Data)
  4906. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  4907. i--
  4908. dAtA[i] = 0x12
  4909. }
  4910. if m.Code != 0 {
  4911. i = encodeVarintTypes(dAtA, i, uint64(m.Code))
  4912. i--
  4913. dAtA[i] = 0x8
  4914. }
  4915. return len(dAtA) - i, nil
  4916. }
  4917. func (m *ResponseEndBlock) Marshal() (dAtA []byte, err error) {
  4918. size := m.Size()
  4919. dAtA = make([]byte, size)
  4920. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4921. if err != nil {
  4922. return nil, err
  4923. }
  4924. return dAtA[:n], nil
  4925. }
  4926. func (m *ResponseEndBlock) MarshalTo(dAtA []byte) (int, error) {
  4927. size := m.Size()
  4928. return m.MarshalToSizedBuffer(dAtA[:size])
  4929. }
  4930. func (m *ResponseEndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4931. i := len(dAtA)
  4932. _ = i
  4933. var l int
  4934. _ = l
  4935. if len(m.Events) > 0 {
  4936. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  4937. {
  4938. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4939. if err != nil {
  4940. return 0, err
  4941. }
  4942. i -= size
  4943. i = encodeVarintTypes(dAtA, i, uint64(size))
  4944. }
  4945. i--
  4946. dAtA[i] = 0x1a
  4947. }
  4948. }
  4949. if m.ConsensusParamUpdates != nil {
  4950. {
  4951. size, err := m.ConsensusParamUpdates.MarshalToSizedBuffer(dAtA[:i])
  4952. if err != nil {
  4953. return 0, err
  4954. }
  4955. i -= size
  4956. i = encodeVarintTypes(dAtA, i, uint64(size))
  4957. }
  4958. i--
  4959. dAtA[i] = 0x12
  4960. }
  4961. if len(m.ValidatorUpdates) > 0 {
  4962. for iNdEx := len(m.ValidatorUpdates) - 1; iNdEx >= 0; iNdEx-- {
  4963. {
  4964. size, err := m.ValidatorUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4965. if err != nil {
  4966. return 0, err
  4967. }
  4968. i -= size
  4969. i = encodeVarintTypes(dAtA, i, uint64(size))
  4970. }
  4971. i--
  4972. dAtA[i] = 0xa
  4973. }
  4974. }
  4975. return len(dAtA) - i, nil
  4976. }
  4977. func (m *ResponseCommit) Marshal() (dAtA []byte, err error) {
  4978. size := m.Size()
  4979. dAtA = make([]byte, size)
  4980. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4981. if err != nil {
  4982. return nil, err
  4983. }
  4984. return dAtA[:n], nil
  4985. }
  4986. func (m *ResponseCommit) MarshalTo(dAtA []byte) (int, error) {
  4987. size := m.Size()
  4988. return m.MarshalToSizedBuffer(dAtA[:size])
  4989. }
  4990. func (m *ResponseCommit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4991. i := len(dAtA)
  4992. _ = i
  4993. var l int
  4994. _ = l
  4995. if m.RetainHeight != 0 {
  4996. i = encodeVarintTypes(dAtA, i, uint64(m.RetainHeight))
  4997. i--
  4998. dAtA[i] = 0x18
  4999. }
  5000. if len(m.Data) > 0 {
  5001. i -= len(m.Data)
  5002. copy(dAtA[i:], m.Data)
  5003. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  5004. i--
  5005. dAtA[i] = 0x12
  5006. }
  5007. return len(dAtA) - i, nil
  5008. }
  5009. func (m *ResponseListSnapshots) Marshal() (dAtA []byte, err error) {
  5010. size := m.Size()
  5011. dAtA = make([]byte, size)
  5012. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5013. if err != nil {
  5014. return nil, err
  5015. }
  5016. return dAtA[:n], nil
  5017. }
  5018. func (m *ResponseListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  5019. size := m.Size()
  5020. return m.MarshalToSizedBuffer(dAtA[:size])
  5021. }
  5022. func (m *ResponseListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5023. i := len(dAtA)
  5024. _ = i
  5025. var l int
  5026. _ = l
  5027. if len(m.Snapshots) > 0 {
  5028. for iNdEx := len(m.Snapshots) - 1; iNdEx >= 0; iNdEx-- {
  5029. {
  5030. size, err := m.Snapshots[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5031. if err != nil {
  5032. return 0, err
  5033. }
  5034. i -= size
  5035. i = encodeVarintTypes(dAtA, i, uint64(size))
  5036. }
  5037. i--
  5038. dAtA[i] = 0xa
  5039. }
  5040. }
  5041. return len(dAtA) - i, nil
  5042. }
  5043. func (m *ResponseOfferSnapshot) Marshal() (dAtA []byte, err error) {
  5044. size := m.Size()
  5045. dAtA = make([]byte, size)
  5046. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5047. if err != nil {
  5048. return nil, err
  5049. }
  5050. return dAtA[:n], nil
  5051. }
  5052. func (m *ResponseOfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  5053. size := m.Size()
  5054. return m.MarshalToSizedBuffer(dAtA[:size])
  5055. }
  5056. func (m *ResponseOfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5057. i := len(dAtA)
  5058. _ = i
  5059. var l int
  5060. _ = l
  5061. if m.Result != 0 {
  5062. i = encodeVarintTypes(dAtA, i, uint64(m.Result))
  5063. i--
  5064. dAtA[i] = 0x8
  5065. }
  5066. return len(dAtA) - i, nil
  5067. }
  5068. func (m *ResponseLoadSnapshotChunk) Marshal() (dAtA []byte, err error) {
  5069. size := m.Size()
  5070. dAtA = make([]byte, size)
  5071. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5072. if err != nil {
  5073. return nil, err
  5074. }
  5075. return dAtA[:n], nil
  5076. }
  5077. func (m *ResponseLoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  5078. size := m.Size()
  5079. return m.MarshalToSizedBuffer(dAtA[:size])
  5080. }
  5081. func (m *ResponseLoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5082. i := len(dAtA)
  5083. _ = i
  5084. var l int
  5085. _ = l
  5086. if len(m.Chunk) > 0 {
  5087. i -= len(m.Chunk)
  5088. copy(dAtA[i:], m.Chunk)
  5089. i = encodeVarintTypes(dAtA, i, uint64(len(m.Chunk)))
  5090. i--
  5091. dAtA[i] = 0xa
  5092. }
  5093. return len(dAtA) - i, nil
  5094. }
  5095. func (m *ResponseApplySnapshotChunk) Marshal() (dAtA []byte, err error) {
  5096. size := m.Size()
  5097. dAtA = make([]byte, size)
  5098. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5099. if err != nil {
  5100. return nil, err
  5101. }
  5102. return dAtA[:n], nil
  5103. }
  5104. func (m *ResponseApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  5105. size := m.Size()
  5106. return m.MarshalToSizedBuffer(dAtA[:size])
  5107. }
  5108. func (m *ResponseApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5109. i := len(dAtA)
  5110. _ = i
  5111. var l int
  5112. _ = l
  5113. if len(m.RejectSenders) > 0 {
  5114. for iNdEx := len(m.RejectSenders) - 1; iNdEx >= 0; iNdEx-- {
  5115. i -= len(m.RejectSenders[iNdEx])
  5116. copy(dAtA[i:], m.RejectSenders[iNdEx])
  5117. i = encodeVarintTypes(dAtA, i, uint64(len(m.RejectSenders[iNdEx])))
  5118. i--
  5119. dAtA[i] = 0x1a
  5120. }
  5121. }
  5122. if len(m.RefetchChunks) > 0 {
  5123. dAtA39 := make([]byte, len(m.RefetchChunks)*10)
  5124. var j38 int
  5125. for _, num := range m.RefetchChunks {
  5126. for num >= 1<<7 {
  5127. dAtA39[j38] = uint8(uint64(num)&0x7f | 0x80)
  5128. num >>= 7
  5129. j38++
  5130. }
  5131. dAtA39[j38] = uint8(num)
  5132. j38++
  5133. }
  5134. i -= j38
  5135. copy(dAtA[i:], dAtA39[:j38])
  5136. i = encodeVarintTypes(dAtA, i, uint64(j38))
  5137. i--
  5138. dAtA[i] = 0x12
  5139. }
  5140. if m.Result != 0 {
  5141. i = encodeVarintTypes(dAtA, i, uint64(m.Result))
  5142. i--
  5143. dAtA[i] = 0x8
  5144. }
  5145. return len(dAtA) - i, nil
  5146. }
  5147. func (m *LastCommitInfo) Marshal() (dAtA []byte, err error) {
  5148. size := m.Size()
  5149. dAtA = make([]byte, size)
  5150. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5151. if err != nil {
  5152. return nil, err
  5153. }
  5154. return dAtA[:n], nil
  5155. }
  5156. func (m *LastCommitInfo) MarshalTo(dAtA []byte) (int, error) {
  5157. size := m.Size()
  5158. return m.MarshalToSizedBuffer(dAtA[:size])
  5159. }
  5160. func (m *LastCommitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5161. i := len(dAtA)
  5162. _ = i
  5163. var l int
  5164. _ = l
  5165. if len(m.Votes) > 0 {
  5166. for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- {
  5167. {
  5168. size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5169. if err != nil {
  5170. return 0, err
  5171. }
  5172. i -= size
  5173. i = encodeVarintTypes(dAtA, i, uint64(size))
  5174. }
  5175. i--
  5176. dAtA[i] = 0x12
  5177. }
  5178. }
  5179. if m.Round != 0 {
  5180. i = encodeVarintTypes(dAtA, i, uint64(m.Round))
  5181. i--
  5182. dAtA[i] = 0x8
  5183. }
  5184. return len(dAtA) - i, nil
  5185. }
  5186. func (m *Event) Marshal() (dAtA []byte, err error) {
  5187. size := m.Size()
  5188. dAtA = make([]byte, size)
  5189. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5190. if err != nil {
  5191. return nil, err
  5192. }
  5193. return dAtA[:n], nil
  5194. }
  5195. func (m *Event) MarshalTo(dAtA []byte) (int, error) {
  5196. size := m.Size()
  5197. return m.MarshalToSizedBuffer(dAtA[:size])
  5198. }
  5199. func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5200. i := len(dAtA)
  5201. _ = i
  5202. var l int
  5203. _ = l
  5204. if len(m.Attributes) > 0 {
  5205. for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- {
  5206. {
  5207. size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5208. if err != nil {
  5209. return 0, err
  5210. }
  5211. i -= size
  5212. i = encodeVarintTypes(dAtA, i, uint64(size))
  5213. }
  5214. i--
  5215. dAtA[i] = 0x12
  5216. }
  5217. }
  5218. if len(m.Type) > 0 {
  5219. i -= len(m.Type)
  5220. copy(dAtA[i:], m.Type)
  5221. i = encodeVarintTypes(dAtA, i, uint64(len(m.Type)))
  5222. i--
  5223. dAtA[i] = 0xa
  5224. }
  5225. return len(dAtA) - i, nil
  5226. }
  5227. func (m *EventAttribute) Marshal() (dAtA []byte, err error) {
  5228. size := m.Size()
  5229. dAtA = make([]byte, size)
  5230. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5231. if err != nil {
  5232. return nil, err
  5233. }
  5234. return dAtA[:n], nil
  5235. }
  5236. func (m *EventAttribute) MarshalTo(dAtA []byte) (int, error) {
  5237. size := m.Size()
  5238. return m.MarshalToSizedBuffer(dAtA[:size])
  5239. }
  5240. func (m *EventAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5241. i := len(dAtA)
  5242. _ = i
  5243. var l int
  5244. _ = l
  5245. if m.Index {
  5246. i--
  5247. if m.Index {
  5248. dAtA[i] = 1
  5249. } else {
  5250. dAtA[i] = 0
  5251. }
  5252. i--
  5253. dAtA[i] = 0x18
  5254. }
  5255. if len(m.Value) > 0 {
  5256. i -= len(m.Value)
  5257. copy(dAtA[i:], m.Value)
  5258. i = encodeVarintTypes(dAtA, i, uint64(len(m.Value)))
  5259. i--
  5260. dAtA[i] = 0x12
  5261. }
  5262. if len(m.Key) > 0 {
  5263. i -= len(m.Key)
  5264. copy(dAtA[i:], m.Key)
  5265. i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
  5266. i--
  5267. dAtA[i] = 0xa
  5268. }
  5269. return len(dAtA) - i, nil
  5270. }
  5271. func (m *TxResult) Marshal() (dAtA []byte, err error) {
  5272. size := m.Size()
  5273. dAtA = make([]byte, size)
  5274. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5275. if err != nil {
  5276. return nil, err
  5277. }
  5278. return dAtA[:n], nil
  5279. }
  5280. func (m *TxResult) MarshalTo(dAtA []byte) (int, error) {
  5281. size := m.Size()
  5282. return m.MarshalToSizedBuffer(dAtA[:size])
  5283. }
  5284. func (m *TxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5285. i := len(dAtA)
  5286. _ = i
  5287. var l int
  5288. _ = l
  5289. {
  5290. size, err := m.Result.MarshalToSizedBuffer(dAtA[:i])
  5291. if err != nil {
  5292. return 0, err
  5293. }
  5294. i -= size
  5295. i = encodeVarintTypes(dAtA, i, uint64(size))
  5296. }
  5297. i--
  5298. dAtA[i] = 0x22
  5299. if len(m.Tx) > 0 {
  5300. i -= len(m.Tx)
  5301. copy(dAtA[i:], m.Tx)
  5302. i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx)))
  5303. i--
  5304. dAtA[i] = 0x1a
  5305. }
  5306. if m.Index != 0 {
  5307. i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  5308. i--
  5309. dAtA[i] = 0x10
  5310. }
  5311. if m.Height != 0 {
  5312. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  5313. i--
  5314. dAtA[i] = 0x8
  5315. }
  5316. return len(dAtA) - i, nil
  5317. }
  5318. func (m *Validator) Marshal() (dAtA []byte, err error) {
  5319. size := m.Size()
  5320. dAtA = make([]byte, size)
  5321. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5322. if err != nil {
  5323. return nil, err
  5324. }
  5325. return dAtA[:n], nil
  5326. }
  5327. func (m *Validator) MarshalTo(dAtA []byte) (int, error) {
  5328. size := m.Size()
  5329. return m.MarshalToSizedBuffer(dAtA[:size])
  5330. }
  5331. func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5332. i := len(dAtA)
  5333. _ = i
  5334. var l int
  5335. _ = l
  5336. if m.Power != 0 {
  5337. i = encodeVarintTypes(dAtA, i, uint64(m.Power))
  5338. i--
  5339. dAtA[i] = 0x18
  5340. }
  5341. if len(m.Address) > 0 {
  5342. i -= len(m.Address)
  5343. copy(dAtA[i:], m.Address)
  5344. i = encodeVarintTypes(dAtA, i, uint64(len(m.Address)))
  5345. i--
  5346. dAtA[i] = 0xa
  5347. }
  5348. return len(dAtA) - i, nil
  5349. }
  5350. func (m *ValidatorUpdate) Marshal() (dAtA []byte, err error) {
  5351. size := m.Size()
  5352. dAtA = make([]byte, size)
  5353. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5354. if err != nil {
  5355. return nil, err
  5356. }
  5357. return dAtA[:n], nil
  5358. }
  5359. func (m *ValidatorUpdate) MarshalTo(dAtA []byte) (int, error) {
  5360. size := m.Size()
  5361. return m.MarshalToSizedBuffer(dAtA[:size])
  5362. }
  5363. func (m *ValidatorUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5364. i := len(dAtA)
  5365. _ = i
  5366. var l int
  5367. _ = l
  5368. if m.Power != 0 {
  5369. i = encodeVarintTypes(dAtA, i, uint64(m.Power))
  5370. i--
  5371. dAtA[i] = 0x10
  5372. }
  5373. {
  5374. size, err := m.PubKey.MarshalToSizedBuffer(dAtA[:i])
  5375. if err != nil {
  5376. return 0, err
  5377. }
  5378. i -= size
  5379. i = encodeVarintTypes(dAtA, i, uint64(size))
  5380. }
  5381. i--
  5382. dAtA[i] = 0xa
  5383. return len(dAtA) - i, nil
  5384. }
  5385. func (m *VoteInfo) Marshal() (dAtA []byte, err error) {
  5386. size := m.Size()
  5387. dAtA = make([]byte, size)
  5388. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5389. if err != nil {
  5390. return nil, err
  5391. }
  5392. return dAtA[:n], nil
  5393. }
  5394. func (m *VoteInfo) MarshalTo(dAtA []byte) (int, error) {
  5395. size := m.Size()
  5396. return m.MarshalToSizedBuffer(dAtA[:size])
  5397. }
  5398. func (m *VoteInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5399. i := len(dAtA)
  5400. _ = i
  5401. var l int
  5402. _ = l
  5403. if m.SignedLastBlock {
  5404. i--
  5405. if m.SignedLastBlock {
  5406. dAtA[i] = 1
  5407. } else {
  5408. dAtA[i] = 0
  5409. }
  5410. i--
  5411. dAtA[i] = 0x10
  5412. }
  5413. {
  5414. size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i])
  5415. if err != nil {
  5416. return 0, err
  5417. }
  5418. i -= size
  5419. i = encodeVarintTypes(dAtA, i, uint64(size))
  5420. }
  5421. i--
  5422. dAtA[i] = 0xa
  5423. return len(dAtA) - i, nil
  5424. }
  5425. func (m *Evidence) Marshal() (dAtA []byte, err error) {
  5426. size := m.Size()
  5427. dAtA = make([]byte, size)
  5428. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5429. if err != nil {
  5430. return nil, err
  5431. }
  5432. return dAtA[:n], nil
  5433. }
  5434. func (m *Evidence) MarshalTo(dAtA []byte) (int, error) {
  5435. size := m.Size()
  5436. return m.MarshalToSizedBuffer(dAtA[:size])
  5437. }
  5438. func (m *Evidence) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5439. i := len(dAtA)
  5440. _ = i
  5441. var l int
  5442. _ = l
  5443. if m.TotalVotingPower != 0 {
  5444. i = encodeVarintTypes(dAtA, i, uint64(m.TotalVotingPower))
  5445. i--
  5446. dAtA[i] = 0x28
  5447. }
  5448. n43, err43 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):])
  5449. if err43 != nil {
  5450. return 0, err43
  5451. }
  5452. i -= n43
  5453. i = encodeVarintTypes(dAtA, i, uint64(n43))
  5454. i--
  5455. dAtA[i] = 0x22
  5456. if m.Height != 0 {
  5457. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  5458. i--
  5459. dAtA[i] = 0x18
  5460. }
  5461. {
  5462. size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i])
  5463. if err != nil {
  5464. return 0, err
  5465. }
  5466. i -= size
  5467. i = encodeVarintTypes(dAtA, i, uint64(size))
  5468. }
  5469. i--
  5470. dAtA[i] = 0x12
  5471. if m.Type != 0 {
  5472. i = encodeVarintTypes(dAtA, i, uint64(m.Type))
  5473. i--
  5474. dAtA[i] = 0x8
  5475. }
  5476. return len(dAtA) - i, nil
  5477. }
  5478. func (m *Snapshot) Marshal() (dAtA []byte, err error) {
  5479. size := m.Size()
  5480. dAtA = make([]byte, size)
  5481. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5482. if err != nil {
  5483. return nil, err
  5484. }
  5485. return dAtA[:n], nil
  5486. }
  5487. func (m *Snapshot) MarshalTo(dAtA []byte) (int, error) {
  5488. size := m.Size()
  5489. return m.MarshalToSizedBuffer(dAtA[:size])
  5490. }
  5491. func (m *Snapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5492. i := len(dAtA)
  5493. _ = i
  5494. var l int
  5495. _ = l
  5496. if len(m.Metadata) > 0 {
  5497. i -= len(m.Metadata)
  5498. copy(dAtA[i:], m.Metadata)
  5499. i = encodeVarintTypes(dAtA, i, uint64(len(m.Metadata)))
  5500. i--
  5501. dAtA[i] = 0x2a
  5502. }
  5503. if len(m.Hash) > 0 {
  5504. i -= len(m.Hash)
  5505. copy(dAtA[i:], m.Hash)
  5506. i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash)))
  5507. i--
  5508. dAtA[i] = 0x22
  5509. }
  5510. if m.Chunks != 0 {
  5511. i = encodeVarintTypes(dAtA, i, uint64(m.Chunks))
  5512. i--
  5513. dAtA[i] = 0x18
  5514. }
  5515. if m.Format != 0 {
  5516. i = encodeVarintTypes(dAtA, i, uint64(m.Format))
  5517. i--
  5518. dAtA[i] = 0x10
  5519. }
  5520. if m.Height != 0 {
  5521. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  5522. i--
  5523. dAtA[i] = 0x8
  5524. }
  5525. return len(dAtA) - i, nil
  5526. }
  5527. func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
  5528. offset -= sovTypes(v)
  5529. base := offset
  5530. for v >= 1<<7 {
  5531. dAtA[offset] = uint8(v&0x7f | 0x80)
  5532. v >>= 7
  5533. offset++
  5534. }
  5535. dAtA[offset] = uint8(v)
  5536. return base
  5537. }
  5538. func (m *Request) Size() (n int) {
  5539. if m == nil {
  5540. return 0
  5541. }
  5542. var l int
  5543. _ = l
  5544. if m.Value != nil {
  5545. n += m.Value.Size()
  5546. }
  5547. return n
  5548. }
  5549. func (m *Request_Echo) Size() (n int) {
  5550. if m == nil {
  5551. return 0
  5552. }
  5553. var l int
  5554. _ = l
  5555. if m.Echo != nil {
  5556. l = m.Echo.Size()
  5557. n += 1 + l + sovTypes(uint64(l))
  5558. }
  5559. return n
  5560. }
  5561. func (m *Request_Flush) Size() (n int) {
  5562. if m == nil {
  5563. return 0
  5564. }
  5565. var l int
  5566. _ = l
  5567. if m.Flush != nil {
  5568. l = m.Flush.Size()
  5569. n += 1 + l + sovTypes(uint64(l))
  5570. }
  5571. return n
  5572. }
  5573. func (m *Request_Info) Size() (n int) {
  5574. if m == nil {
  5575. return 0
  5576. }
  5577. var l int
  5578. _ = l
  5579. if m.Info != nil {
  5580. l = m.Info.Size()
  5581. n += 1 + l + sovTypes(uint64(l))
  5582. }
  5583. return n
  5584. }
  5585. func (m *Request_InitChain) Size() (n int) {
  5586. if m == nil {
  5587. return 0
  5588. }
  5589. var l int
  5590. _ = l
  5591. if m.InitChain != nil {
  5592. l = m.InitChain.Size()
  5593. n += 1 + l + sovTypes(uint64(l))
  5594. }
  5595. return n
  5596. }
  5597. func (m *Request_Query) Size() (n int) {
  5598. if m == nil {
  5599. return 0
  5600. }
  5601. var l int
  5602. _ = l
  5603. if m.Query != nil {
  5604. l = m.Query.Size()
  5605. n += 1 + l + sovTypes(uint64(l))
  5606. }
  5607. return n
  5608. }
  5609. func (m *Request_BeginBlock) Size() (n int) {
  5610. if m == nil {
  5611. return 0
  5612. }
  5613. var l int
  5614. _ = l
  5615. if m.BeginBlock != nil {
  5616. l = m.BeginBlock.Size()
  5617. n += 1 + l + sovTypes(uint64(l))
  5618. }
  5619. return n
  5620. }
  5621. func (m *Request_CheckTx) Size() (n int) {
  5622. if m == nil {
  5623. return 0
  5624. }
  5625. var l int
  5626. _ = l
  5627. if m.CheckTx != nil {
  5628. l = m.CheckTx.Size()
  5629. n += 1 + l + sovTypes(uint64(l))
  5630. }
  5631. return n
  5632. }
  5633. func (m *Request_DeliverTx) Size() (n int) {
  5634. if m == nil {
  5635. return 0
  5636. }
  5637. var l int
  5638. _ = l
  5639. if m.DeliverTx != nil {
  5640. l = m.DeliverTx.Size()
  5641. n += 1 + l + sovTypes(uint64(l))
  5642. }
  5643. return n
  5644. }
  5645. func (m *Request_EndBlock) Size() (n int) {
  5646. if m == nil {
  5647. return 0
  5648. }
  5649. var l int
  5650. _ = l
  5651. if m.EndBlock != nil {
  5652. l = m.EndBlock.Size()
  5653. n += 1 + l + sovTypes(uint64(l))
  5654. }
  5655. return n
  5656. }
  5657. func (m *Request_Commit) Size() (n int) {
  5658. if m == nil {
  5659. return 0
  5660. }
  5661. var l int
  5662. _ = l
  5663. if m.Commit != nil {
  5664. l = m.Commit.Size()
  5665. n += 1 + l + sovTypes(uint64(l))
  5666. }
  5667. return n
  5668. }
  5669. func (m *Request_ListSnapshots) Size() (n int) {
  5670. if m == nil {
  5671. return 0
  5672. }
  5673. var l int
  5674. _ = l
  5675. if m.ListSnapshots != nil {
  5676. l = m.ListSnapshots.Size()
  5677. n += 1 + l + sovTypes(uint64(l))
  5678. }
  5679. return n
  5680. }
  5681. func (m *Request_OfferSnapshot) Size() (n int) {
  5682. if m == nil {
  5683. return 0
  5684. }
  5685. var l int
  5686. _ = l
  5687. if m.OfferSnapshot != nil {
  5688. l = m.OfferSnapshot.Size()
  5689. n += 1 + l + sovTypes(uint64(l))
  5690. }
  5691. return n
  5692. }
  5693. func (m *Request_LoadSnapshotChunk) Size() (n int) {
  5694. if m == nil {
  5695. return 0
  5696. }
  5697. var l int
  5698. _ = l
  5699. if m.LoadSnapshotChunk != nil {
  5700. l = m.LoadSnapshotChunk.Size()
  5701. n += 1 + l + sovTypes(uint64(l))
  5702. }
  5703. return n
  5704. }
  5705. func (m *Request_ApplySnapshotChunk) Size() (n int) {
  5706. if m == nil {
  5707. return 0
  5708. }
  5709. var l int
  5710. _ = l
  5711. if m.ApplySnapshotChunk != nil {
  5712. l = m.ApplySnapshotChunk.Size()
  5713. n += 1 + l + sovTypes(uint64(l))
  5714. }
  5715. return n
  5716. }
  5717. func (m *RequestEcho) Size() (n int) {
  5718. if m == nil {
  5719. return 0
  5720. }
  5721. var l int
  5722. _ = l
  5723. l = len(m.Message)
  5724. if l > 0 {
  5725. n += 1 + l + sovTypes(uint64(l))
  5726. }
  5727. return n
  5728. }
  5729. func (m *RequestFlush) Size() (n int) {
  5730. if m == nil {
  5731. return 0
  5732. }
  5733. var l int
  5734. _ = l
  5735. return n
  5736. }
  5737. func (m *RequestInfo) Size() (n int) {
  5738. if m == nil {
  5739. return 0
  5740. }
  5741. var l int
  5742. _ = l
  5743. l = len(m.Version)
  5744. if l > 0 {
  5745. n += 1 + l + sovTypes(uint64(l))
  5746. }
  5747. if m.BlockVersion != 0 {
  5748. n += 1 + sovTypes(uint64(m.BlockVersion))
  5749. }
  5750. if m.P2PVersion != 0 {
  5751. n += 1 + sovTypes(uint64(m.P2PVersion))
  5752. }
  5753. l = len(m.AbciVersion)
  5754. if l > 0 {
  5755. n += 1 + l + sovTypes(uint64(l))
  5756. }
  5757. return n
  5758. }
  5759. func (m *RequestInitChain) Size() (n int) {
  5760. if m == nil {
  5761. return 0
  5762. }
  5763. var l int
  5764. _ = l
  5765. l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time)
  5766. n += 1 + l + sovTypes(uint64(l))
  5767. l = len(m.ChainId)
  5768. if l > 0 {
  5769. n += 1 + l + sovTypes(uint64(l))
  5770. }
  5771. if m.ConsensusParams != nil {
  5772. l = m.ConsensusParams.Size()
  5773. n += 1 + l + sovTypes(uint64(l))
  5774. }
  5775. if len(m.Validators) > 0 {
  5776. for _, e := range m.Validators {
  5777. l = e.Size()
  5778. n += 1 + l + sovTypes(uint64(l))
  5779. }
  5780. }
  5781. l = len(m.AppStateBytes)
  5782. if l > 0 {
  5783. n += 1 + l + sovTypes(uint64(l))
  5784. }
  5785. if m.InitialHeight != 0 {
  5786. n += 1 + sovTypes(uint64(m.InitialHeight))
  5787. }
  5788. return n
  5789. }
  5790. func (m *RequestQuery) Size() (n int) {
  5791. if m == nil {
  5792. return 0
  5793. }
  5794. var l int
  5795. _ = l
  5796. l = len(m.Data)
  5797. if l > 0 {
  5798. n += 1 + l + sovTypes(uint64(l))
  5799. }
  5800. l = len(m.Path)
  5801. if l > 0 {
  5802. n += 1 + l + sovTypes(uint64(l))
  5803. }
  5804. if m.Height != 0 {
  5805. n += 1 + sovTypes(uint64(m.Height))
  5806. }
  5807. if m.Prove {
  5808. n += 2
  5809. }
  5810. return n
  5811. }
  5812. func (m *RequestBeginBlock) Size() (n int) {
  5813. if m == nil {
  5814. return 0
  5815. }
  5816. var l int
  5817. _ = l
  5818. l = len(m.Hash)
  5819. if l > 0 {
  5820. n += 1 + l + sovTypes(uint64(l))
  5821. }
  5822. l = m.Header.Size()
  5823. n += 1 + l + sovTypes(uint64(l))
  5824. l = m.LastCommitInfo.Size()
  5825. n += 1 + l + sovTypes(uint64(l))
  5826. if len(m.ByzantineValidators) > 0 {
  5827. for _, e := range m.ByzantineValidators {
  5828. l = e.Size()
  5829. n += 1 + l + sovTypes(uint64(l))
  5830. }
  5831. }
  5832. return n
  5833. }
  5834. func (m *RequestCheckTx) Size() (n int) {
  5835. if m == nil {
  5836. return 0
  5837. }
  5838. var l int
  5839. _ = l
  5840. l = len(m.Tx)
  5841. if l > 0 {
  5842. n += 1 + l + sovTypes(uint64(l))
  5843. }
  5844. if m.Type != 0 {
  5845. n += 1 + sovTypes(uint64(m.Type))
  5846. }
  5847. return n
  5848. }
  5849. func (m *RequestDeliverTx) Size() (n int) {
  5850. if m == nil {
  5851. return 0
  5852. }
  5853. var l int
  5854. _ = l
  5855. l = len(m.Tx)
  5856. if l > 0 {
  5857. n += 1 + l + sovTypes(uint64(l))
  5858. }
  5859. return n
  5860. }
  5861. func (m *RequestEndBlock) Size() (n int) {
  5862. if m == nil {
  5863. return 0
  5864. }
  5865. var l int
  5866. _ = l
  5867. if m.Height != 0 {
  5868. n += 1 + sovTypes(uint64(m.Height))
  5869. }
  5870. return n
  5871. }
  5872. func (m *RequestCommit) Size() (n int) {
  5873. if m == nil {
  5874. return 0
  5875. }
  5876. var l int
  5877. _ = l
  5878. return n
  5879. }
  5880. func (m *RequestListSnapshots) Size() (n int) {
  5881. if m == nil {
  5882. return 0
  5883. }
  5884. var l int
  5885. _ = l
  5886. return n
  5887. }
  5888. func (m *RequestOfferSnapshot) Size() (n int) {
  5889. if m == nil {
  5890. return 0
  5891. }
  5892. var l int
  5893. _ = l
  5894. if m.Snapshot != nil {
  5895. l = m.Snapshot.Size()
  5896. n += 1 + l + sovTypes(uint64(l))
  5897. }
  5898. l = len(m.AppHash)
  5899. if l > 0 {
  5900. n += 1 + l + sovTypes(uint64(l))
  5901. }
  5902. return n
  5903. }
  5904. func (m *RequestLoadSnapshotChunk) Size() (n int) {
  5905. if m == nil {
  5906. return 0
  5907. }
  5908. var l int
  5909. _ = l
  5910. if m.Height != 0 {
  5911. n += 1 + sovTypes(uint64(m.Height))
  5912. }
  5913. if m.Format != 0 {
  5914. n += 1 + sovTypes(uint64(m.Format))
  5915. }
  5916. if m.Chunk != 0 {
  5917. n += 1 + sovTypes(uint64(m.Chunk))
  5918. }
  5919. return n
  5920. }
  5921. func (m *RequestApplySnapshotChunk) Size() (n int) {
  5922. if m == nil {
  5923. return 0
  5924. }
  5925. var l int
  5926. _ = l
  5927. if m.Index != 0 {
  5928. n += 1 + sovTypes(uint64(m.Index))
  5929. }
  5930. l = len(m.Chunk)
  5931. if l > 0 {
  5932. n += 1 + l + sovTypes(uint64(l))
  5933. }
  5934. l = len(m.Sender)
  5935. if l > 0 {
  5936. n += 1 + l + sovTypes(uint64(l))
  5937. }
  5938. return n
  5939. }
  5940. func (m *Response) Size() (n int) {
  5941. if m == nil {
  5942. return 0
  5943. }
  5944. var l int
  5945. _ = l
  5946. if m.Value != nil {
  5947. n += m.Value.Size()
  5948. }
  5949. return n
  5950. }
  5951. func (m *Response_Exception) Size() (n int) {
  5952. if m == nil {
  5953. return 0
  5954. }
  5955. var l int
  5956. _ = l
  5957. if m.Exception != nil {
  5958. l = m.Exception.Size()
  5959. n += 1 + l + sovTypes(uint64(l))
  5960. }
  5961. return n
  5962. }
  5963. func (m *Response_Echo) Size() (n int) {
  5964. if m == nil {
  5965. return 0
  5966. }
  5967. var l int
  5968. _ = l
  5969. if m.Echo != nil {
  5970. l = m.Echo.Size()
  5971. n += 1 + l + sovTypes(uint64(l))
  5972. }
  5973. return n
  5974. }
  5975. func (m *Response_Flush) Size() (n int) {
  5976. if m == nil {
  5977. return 0
  5978. }
  5979. var l int
  5980. _ = l
  5981. if m.Flush != nil {
  5982. l = m.Flush.Size()
  5983. n += 1 + l + sovTypes(uint64(l))
  5984. }
  5985. return n
  5986. }
  5987. func (m *Response_Info) Size() (n int) {
  5988. if m == nil {
  5989. return 0
  5990. }
  5991. var l int
  5992. _ = l
  5993. if m.Info != nil {
  5994. l = m.Info.Size()
  5995. n += 1 + l + sovTypes(uint64(l))
  5996. }
  5997. return n
  5998. }
  5999. func (m *Response_InitChain) Size() (n int) {
  6000. if m == nil {
  6001. return 0
  6002. }
  6003. var l int
  6004. _ = l
  6005. if m.InitChain != nil {
  6006. l = m.InitChain.Size()
  6007. n += 1 + l + sovTypes(uint64(l))
  6008. }
  6009. return n
  6010. }
  6011. func (m *Response_Query) Size() (n int) {
  6012. if m == nil {
  6013. return 0
  6014. }
  6015. var l int
  6016. _ = l
  6017. if m.Query != nil {
  6018. l = m.Query.Size()
  6019. n += 1 + l + sovTypes(uint64(l))
  6020. }
  6021. return n
  6022. }
  6023. func (m *Response_BeginBlock) Size() (n int) {
  6024. if m == nil {
  6025. return 0
  6026. }
  6027. var l int
  6028. _ = l
  6029. if m.BeginBlock != nil {
  6030. l = m.BeginBlock.Size()
  6031. n += 1 + l + sovTypes(uint64(l))
  6032. }
  6033. return n
  6034. }
  6035. func (m *Response_CheckTx) Size() (n int) {
  6036. if m == nil {
  6037. return 0
  6038. }
  6039. var l int
  6040. _ = l
  6041. if m.CheckTx != nil {
  6042. l = m.CheckTx.Size()
  6043. n += 1 + l + sovTypes(uint64(l))
  6044. }
  6045. return n
  6046. }
  6047. func (m *Response_DeliverTx) Size() (n int) {
  6048. if m == nil {
  6049. return 0
  6050. }
  6051. var l int
  6052. _ = l
  6053. if m.DeliverTx != nil {
  6054. l = m.DeliverTx.Size()
  6055. n += 1 + l + sovTypes(uint64(l))
  6056. }
  6057. return n
  6058. }
  6059. func (m *Response_EndBlock) Size() (n int) {
  6060. if m == nil {
  6061. return 0
  6062. }
  6063. var l int
  6064. _ = l
  6065. if m.EndBlock != nil {
  6066. l = m.EndBlock.Size()
  6067. n += 1 + l + sovTypes(uint64(l))
  6068. }
  6069. return n
  6070. }
  6071. func (m *Response_Commit) Size() (n int) {
  6072. if m == nil {
  6073. return 0
  6074. }
  6075. var l int
  6076. _ = l
  6077. if m.Commit != nil {
  6078. l = m.Commit.Size()
  6079. n += 1 + l + sovTypes(uint64(l))
  6080. }
  6081. return n
  6082. }
  6083. func (m *Response_ListSnapshots) Size() (n int) {
  6084. if m == nil {
  6085. return 0
  6086. }
  6087. var l int
  6088. _ = l
  6089. if m.ListSnapshots != nil {
  6090. l = m.ListSnapshots.Size()
  6091. n += 1 + l + sovTypes(uint64(l))
  6092. }
  6093. return n
  6094. }
  6095. func (m *Response_OfferSnapshot) Size() (n int) {
  6096. if m == nil {
  6097. return 0
  6098. }
  6099. var l int
  6100. _ = l
  6101. if m.OfferSnapshot != nil {
  6102. l = m.OfferSnapshot.Size()
  6103. n += 1 + l + sovTypes(uint64(l))
  6104. }
  6105. return n
  6106. }
  6107. func (m *Response_LoadSnapshotChunk) Size() (n int) {
  6108. if m == nil {
  6109. return 0
  6110. }
  6111. var l int
  6112. _ = l
  6113. if m.LoadSnapshotChunk != nil {
  6114. l = m.LoadSnapshotChunk.Size()
  6115. n += 1 + l + sovTypes(uint64(l))
  6116. }
  6117. return n
  6118. }
  6119. func (m *Response_ApplySnapshotChunk) Size() (n int) {
  6120. if m == nil {
  6121. return 0
  6122. }
  6123. var l int
  6124. _ = l
  6125. if m.ApplySnapshotChunk != nil {
  6126. l = m.ApplySnapshotChunk.Size()
  6127. n += 1 + l + sovTypes(uint64(l))
  6128. }
  6129. return n
  6130. }
  6131. func (m *ResponseException) Size() (n int) {
  6132. if m == nil {
  6133. return 0
  6134. }
  6135. var l int
  6136. _ = l
  6137. l = len(m.Error)
  6138. if l > 0 {
  6139. n += 1 + l + sovTypes(uint64(l))
  6140. }
  6141. return n
  6142. }
  6143. func (m *ResponseEcho) Size() (n int) {
  6144. if m == nil {
  6145. return 0
  6146. }
  6147. var l int
  6148. _ = l
  6149. l = len(m.Message)
  6150. if l > 0 {
  6151. n += 1 + l + sovTypes(uint64(l))
  6152. }
  6153. return n
  6154. }
  6155. func (m *ResponseFlush) Size() (n int) {
  6156. if m == nil {
  6157. return 0
  6158. }
  6159. var l int
  6160. _ = l
  6161. return n
  6162. }
  6163. func (m *ResponseInfo) Size() (n int) {
  6164. if m == nil {
  6165. return 0
  6166. }
  6167. var l int
  6168. _ = l
  6169. l = len(m.Data)
  6170. if l > 0 {
  6171. n += 1 + l + sovTypes(uint64(l))
  6172. }
  6173. l = len(m.Version)
  6174. if l > 0 {
  6175. n += 1 + l + sovTypes(uint64(l))
  6176. }
  6177. if m.AppVersion != 0 {
  6178. n += 1 + sovTypes(uint64(m.AppVersion))
  6179. }
  6180. if m.LastBlockHeight != 0 {
  6181. n += 1 + sovTypes(uint64(m.LastBlockHeight))
  6182. }
  6183. l = len(m.LastBlockAppHash)
  6184. if l > 0 {
  6185. n += 1 + l + sovTypes(uint64(l))
  6186. }
  6187. return n
  6188. }
  6189. func (m *ResponseInitChain) Size() (n int) {
  6190. if m == nil {
  6191. return 0
  6192. }
  6193. var l int
  6194. _ = l
  6195. if m.ConsensusParams != nil {
  6196. l = m.ConsensusParams.Size()
  6197. n += 1 + l + sovTypes(uint64(l))
  6198. }
  6199. if len(m.Validators) > 0 {
  6200. for _, e := range m.Validators {
  6201. l = e.Size()
  6202. n += 1 + l + sovTypes(uint64(l))
  6203. }
  6204. }
  6205. l = len(m.AppHash)
  6206. if l > 0 {
  6207. n += 1 + l + sovTypes(uint64(l))
  6208. }
  6209. return n
  6210. }
  6211. func (m *ResponseQuery) Size() (n int) {
  6212. if m == nil {
  6213. return 0
  6214. }
  6215. var l int
  6216. _ = l
  6217. if m.Code != 0 {
  6218. n += 1 + sovTypes(uint64(m.Code))
  6219. }
  6220. l = len(m.Log)
  6221. if l > 0 {
  6222. n += 1 + l + sovTypes(uint64(l))
  6223. }
  6224. l = len(m.Info)
  6225. if l > 0 {
  6226. n += 1 + l + sovTypes(uint64(l))
  6227. }
  6228. if m.Index != 0 {
  6229. n += 1 + sovTypes(uint64(m.Index))
  6230. }
  6231. l = len(m.Key)
  6232. if l > 0 {
  6233. n += 1 + l + sovTypes(uint64(l))
  6234. }
  6235. l = len(m.Value)
  6236. if l > 0 {
  6237. n += 1 + l + sovTypes(uint64(l))
  6238. }
  6239. if m.ProofOps != nil {
  6240. l = m.ProofOps.Size()
  6241. n += 1 + l + sovTypes(uint64(l))
  6242. }
  6243. if m.Height != 0 {
  6244. n += 1 + sovTypes(uint64(m.Height))
  6245. }
  6246. l = len(m.Codespace)
  6247. if l > 0 {
  6248. n += 1 + l + sovTypes(uint64(l))
  6249. }
  6250. return n
  6251. }
  6252. func (m *ResponseBeginBlock) Size() (n int) {
  6253. if m == nil {
  6254. return 0
  6255. }
  6256. var l int
  6257. _ = l
  6258. if len(m.Events) > 0 {
  6259. for _, e := range m.Events {
  6260. l = e.Size()
  6261. n += 1 + l + sovTypes(uint64(l))
  6262. }
  6263. }
  6264. return n
  6265. }
  6266. func (m *ResponseCheckTx) Size() (n int) {
  6267. if m == nil {
  6268. return 0
  6269. }
  6270. var l int
  6271. _ = l
  6272. if m.Code != 0 {
  6273. n += 1 + sovTypes(uint64(m.Code))
  6274. }
  6275. l = len(m.Data)
  6276. if l > 0 {
  6277. n += 1 + l + sovTypes(uint64(l))
  6278. }
  6279. l = len(m.Log)
  6280. if l > 0 {
  6281. n += 1 + l + sovTypes(uint64(l))
  6282. }
  6283. l = len(m.Info)
  6284. if l > 0 {
  6285. n += 1 + l + sovTypes(uint64(l))
  6286. }
  6287. if m.GasWanted != 0 {
  6288. n += 1 + sovTypes(uint64(m.GasWanted))
  6289. }
  6290. if m.GasUsed != 0 {
  6291. n += 1 + sovTypes(uint64(m.GasUsed))
  6292. }
  6293. if len(m.Events) > 0 {
  6294. for _, e := range m.Events {
  6295. l = e.Size()
  6296. n += 1 + l + sovTypes(uint64(l))
  6297. }
  6298. }
  6299. l = len(m.Codespace)
  6300. if l > 0 {
  6301. n += 1 + l + sovTypes(uint64(l))
  6302. }
  6303. return n
  6304. }
  6305. func (m *ResponseDeliverTx) Size() (n int) {
  6306. if m == nil {
  6307. return 0
  6308. }
  6309. var l int
  6310. _ = l
  6311. if m.Code != 0 {
  6312. n += 1 + sovTypes(uint64(m.Code))
  6313. }
  6314. l = len(m.Data)
  6315. if l > 0 {
  6316. n += 1 + l + sovTypes(uint64(l))
  6317. }
  6318. l = len(m.Log)
  6319. if l > 0 {
  6320. n += 1 + l + sovTypes(uint64(l))
  6321. }
  6322. l = len(m.Info)
  6323. if l > 0 {
  6324. n += 1 + l + sovTypes(uint64(l))
  6325. }
  6326. if m.GasWanted != 0 {
  6327. n += 1 + sovTypes(uint64(m.GasWanted))
  6328. }
  6329. if m.GasUsed != 0 {
  6330. n += 1 + sovTypes(uint64(m.GasUsed))
  6331. }
  6332. if len(m.Events) > 0 {
  6333. for _, e := range m.Events {
  6334. l = e.Size()
  6335. n += 1 + l + sovTypes(uint64(l))
  6336. }
  6337. }
  6338. l = len(m.Codespace)
  6339. if l > 0 {
  6340. n += 1 + l + sovTypes(uint64(l))
  6341. }
  6342. return n
  6343. }
  6344. func (m *ResponseEndBlock) Size() (n int) {
  6345. if m == nil {
  6346. return 0
  6347. }
  6348. var l int
  6349. _ = l
  6350. if len(m.ValidatorUpdates) > 0 {
  6351. for _, e := range m.ValidatorUpdates {
  6352. l = e.Size()
  6353. n += 1 + l + sovTypes(uint64(l))
  6354. }
  6355. }
  6356. if m.ConsensusParamUpdates != nil {
  6357. l = m.ConsensusParamUpdates.Size()
  6358. n += 1 + l + sovTypes(uint64(l))
  6359. }
  6360. if len(m.Events) > 0 {
  6361. for _, e := range m.Events {
  6362. l = e.Size()
  6363. n += 1 + l + sovTypes(uint64(l))
  6364. }
  6365. }
  6366. return n
  6367. }
  6368. func (m *ResponseCommit) Size() (n int) {
  6369. if m == nil {
  6370. return 0
  6371. }
  6372. var l int
  6373. _ = l
  6374. l = len(m.Data)
  6375. if l > 0 {
  6376. n += 1 + l + sovTypes(uint64(l))
  6377. }
  6378. if m.RetainHeight != 0 {
  6379. n += 1 + sovTypes(uint64(m.RetainHeight))
  6380. }
  6381. return n
  6382. }
  6383. func (m *ResponseListSnapshots) Size() (n int) {
  6384. if m == nil {
  6385. return 0
  6386. }
  6387. var l int
  6388. _ = l
  6389. if len(m.Snapshots) > 0 {
  6390. for _, e := range m.Snapshots {
  6391. l = e.Size()
  6392. n += 1 + l + sovTypes(uint64(l))
  6393. }
  6394. }
  6395. return n
  6396. }
  6397. func (m *ResponseOfferSnapshot) Size() (n int) {
  6398. if m == nil {
  6399. return 0
  6400. }
  6401. var l int
  6402. _ = l
  6403. if m.Result != 0 {
  6404. n += 1 + sovTypes(uint64(m.Result))
  6405. }
  6406. return n
  6407. }
  6408. func (m *ResponseLoadSnapshotChunk) Size() (n int) {
  6409. if m == nil {
  6410. return 0
  6411. }
  6412. var l int
  6413. _ = l
  6414. l = len(m.Chunk)
  6415. if l > 0 {
  6416. n += 1 + l + sovTypes(uint64(l))
  6417. }
  6418. return n
  6419. }
  6420. func (m *ResponseApplySnapshotChunk) Size() (n int) {
  6421. if m == nil {
  6422. return 0
  6423. }
  6424. var l int
  6425. _ = l
  6426. if m.Result != 0 {
  6427. n += 1 + sovTypes(uint64(m.Result))
  6428. }
  6429. if len(m.RefetchChunks) > 0 {
  6430. l = 0
  6431. for _, e := range m.RefetchChunks {
  6432. l += sovTypes(uint64(e))
  6433. }
  6434. n += 1 + sovTypes(uint64(l)) + l
  6435. }
  6436. if len(m.RejectSenders) > 0 {
  6437. for _, s := range m.RejectSenders {
  6438. l = len(s)
  6439. n += 1 + l + sovTypes(uint64(l))
  6440. }
  6441. }
  6442. return n
  6443. }
  6444. func (m *LastCommitInfo) Size() (n int) {
  6445. if m == nil {
  6446. return 0
  6447. }
  6448. var l int
  6449. _ = l
  6450. if m.Round != 0 {
  6451. n += 1 + sovTypes(uint64(m.Round))
  6452. }
  6453. if len(m.Votes) > 0 {
  6454. for _, e := range m.Votes {
  6455. l = e.Size()
  6456. n += 1 + l + sovTypes(uint64(l))
  6457. }
  6458. }
  6459. return n
  6460. }
  6461. func (m *Event) Size() (n int) {
  6462. if m == nil {
  6463. return 0
  6464. }
  6465. var l int
  6466. _ = l
  6467. l = len(m.Type)
  6468. if l > 0 {
  6469. n += 1 + l + sovTypes(uint64(l))
  6470. }
  6471. if len(m.Attributes) > 0 {
  6472. for _, e := range m.Attributes {
  6473. l = e.Size()
  6474. n += 1 + l + sovTypes(uint64(l))
  6475. }
  6476. }
  6477. return n
  6478. }
  6479. func (m *EventAttribute) Size() (n int) {
  6480. if m == nil {
  6481. return 0
  6482. }
  6483. var l int
  6484. _ = l
  6485. l = len(m.Key)
  6486. if l > 0 {
  6487. n += 1 + l + sovTypes(uint64(l))
  6488. }
  6489. l = len(m.Value)
  6490. if l > 0 {
  6491. n += 1 + l + sovTypes(uint64(l))
  6492. }
  6493. if m.Index {
  6494. n += 2
  6495. }
  6496. return n
  6497. }
  6498. func (m *TxResult) Size() (n int) {
  6499. if m == nil {
  6500. return 0
  6501. }
  6502. var l int
  6503. _ = l
  6504. if m.Height != 0 {
  6505. n += 1 + sovTypes(uint64(m.Height))
  6506. }
  6507. if m.Index != 0 {
  6508. n += 1 + sovTypes(uint64(m.Index))
  6509. }
  6510. l = len(m.Tx)
  6511. if l > 0 {
  6512. n += 1 + l + sovTypes(uint64(l))
  6513. }
  6514. l = m.Result.Size()
  6515. n += 1 + l + sovTypes(uint64(l))
  6516. return n
  6517. }
  6518. func (m *Validator) Size() (n int) {
  6519. if m == nil {
  6520. return 0
  6521. }
  6522. var l int
  6523. _ = l
  6524. l = len(m.Address)
  6525. if l > 0 {
  6526. n += 1 + l + sovTypes(uint64(l))
  6527. }
  6528. if m.Power != 0 {
  6529. n += 1 + sovTypes(uint64(m.Power))
  6530. }
  6531. return n
  6532. }
  6533. func (m *ValidatorUpdate) Size() (n int) {
  6534. if m == nil {
  6535. return 0
  6536. }
  6537. var l int
  6538. _ = l
  6539. l = m.PubKey.Size()
  6540. n += 1 + l + sovTypes(uint64(l))
  6541. if m.Power != 0 {
  6542. n += 1 + sovTypes(uint64(m.Power))
  6543. }
  6544. return n
  6545. }
  6546. func (m *VoteInfo) Size() (n int) {
  6547. if m == nil {
  6548. return 0
  6549. }
  6550. var l int
  6551. _ = l
  6552. l = m.Validator.Size()
  6553. n += 1 + l + sovTypes(uint64(l))
  6554. if m.SignedLastBlock {
  6555. n += 2
  6556. }
  6557. return n
  6558. }
  6559. func (m *Evidence) Size() (n int) {
  6560. if m == nil {
  6561. return 0
  6562. }
  6563. var l int
  6564. _ = l
  6565. if m.Type != 0 {
  6566. n += 1 + sovTypes(uint64(m.Type))
  6567. }
  6568. l = m.Validator.Size()
  6569. n += 1 + l + sovTypes(uint64(l))
  6570. if m.Height != 0 {
  6571. n += 1 + sovTypes(uint64(m.Height))
  6572. }
  6573. l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time)
  6574. n += 1 + l + sovTypes(uint64(l))
  6575. if m.TotalVotingPower != 0 {
  6576. n += 1 + sovTypes(uint64(m.TotalVotingPower))
  6577. }
  6578. return n
  6579. }
  6580. func (m *Snapshot) Size() (n int) {
  6581. if m == nil {
  6582. return 0
  6583. }
  6584. var l int
  6585. _ = l
  6586. if m.Height != 0 {
  6587. n += 1 + sovTypes(uint64(m.Height))
  6588. }
  6589. if m.Format != 0 {
  6590. n += 1 + sovTypes(uint64(m.Format))
  6591. }
  6592. if m.Chunks != 0 {
  6593. n += 1 + sovTypes(uint64(m.Chunks))
  6594. }
  6595. l = len(m.Hash)
  6596. if l > 0 {
  6597. n += 1 + l + sovTypes(uint64(l))
  6598. }
  6599. l = len(m.Metadata)
  6600. if l > 0 {
  6601. n += 1 + l + sovTypes(uint64(l))
  6602. }
  6603. return n
  6604. }
  6605. func sovTypes(x uint64) (n int) {
  6606. return (math_bits.Len64(x|1) + 6) / 7
  6607. }
  6608. func sozTypes(x uint64) (n int) {
  6609. return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  6610. }
  6611. func (m *Request) Unmarshal(dAtA []byte) error {
  6612. l := len(dAtA)
  6613. iNdEx := 0
  6614. for iNdEx < l {
  6615. preIndex := iNdEx
  6616. var wire uint64
  6617. for shift := uint(0); ; shift += 7 {
  6618. if shift >= 64 {
  6619. return ErrIntOverflowTypes
  6620. }
  6621. if iNdEx >= l {
  6622. return io.ErrUnexpectedEOF
  6623. }
  6624. b := dAtA[iNdEx]
  6625. iNdEx++
  6626. wire |= uint64(b&0x7F) << shift
  6627. if b < 0x80 {
  6628. break
  6629. }
  6630. }
  6631. fieldNum := int32(wire >> 3)
  6632. wireType := int(wire & 0x7)
  6633. if wireType == 4 {
  6634. return fmt.Errorf("proto: Request: wiretype end group for non-group")
  6635. }
  6636. if fieldNum <= 0 {
  6637. return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire)
  6638. }
  6639. switch fieldNum {
  6640. case 1:
  6641. if wireType != 2 {
  6642. return fmt.Errorf("proto: wrong wireType = %d for field Echo", wireType)
  6643. }
  6644. var msglen int
  6645. for shift := uint(0); ; shift += 7 {
  6646. if shift >= 64 {
  6647. return ErrIntOverflowTypes
  6648. }
  6649. if iNdEx >= l {
  6650. return io.ErrUnexpectedEOF
  6651. }
  6652. b := dAtA[iNdEx]
  6653. iNdEx++
  6654. msglen |= int(b&0x7F) << shift
  6655. if b < 0x80 {
  6656. break
  6657. }
  6658. }
  6659. if msglen < 0 {
  6660. return ErrInvalidLengthTypes
  6661. }
  6662. postIndex := iNdEx + msglen
  6663. if postIndex < 0 {
  6664. return ErrInvalidLengthTypes
  6665. }
  6666. if postIndex > l {
  6667. return io.ErrUnexpectedEOF
  6668. }
  6669. v := &RequestEcho{}
  6670. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6671. return err
  6672. }
  6673. m.Value = &Request_Echo{v}
  6674. iNdEx = postIndex
  6675. case 2:
  6676. if wireType != 2 {
  6677. return fmt.Errorf("proto: wrong wireType = %d for field Flush", wireType)
  6678. }
  6679. var msglen int
  6680. for shift := uint(0); ; shift += 7 {
  6681. if shift >= 64 {
  6682. return ErrIntOverflowTypes
  6683. }
  6684. if iNdEx >= l {
  6685. return io.ErrUnexpectedEOF
  6686. }
  6687. b := dAtA[iNdEx]
  6688. iNdEx++
  6689. msglen |= int(b&0x7F) << shift
  6690. if b < 0x80 {
  6691. break
  6692. }
  6693. }
  6694. if msglen < 0 {
  6695. return ErrInvalidLengthTypes
  6696. }
  6697. postIndex := iNdEx + msglen
  6698. if postIndex < 0 {
  6699. return ErrInvalidLengthTypes
  6700. }
  6701. if postIndex > l {
  6702. return io.ErrUnexpectedEOF
  6703. }
  6704. v := &RequestFlush{}
  6705. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6706. return err
  6707. }
  6708. m.Value = &Request_Flush{v}
  6709. iNdEx = postIndex
  6710. case 3:
  6711. if wireType != 2 {
  6712. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  6713. }
  6714. var msglen int
  6715. for shift := uint(0); ; shift += 7 {
  6716. if shift >= 64 {
  6717. return ErrIntOverflowTypes
  6718. }
  6719. if iNdEx >= l {
  6720. return io.ErrUnexpectedEOF
  6721. }
  6722. b := dAtA[iNdEx]
  6723. iNdEx++
  6724. msglen |= int(b&0x7F) << shift
  6725. if b < 0x80 {
  6726. break
  6727. }
  6728. }
  6729. if msglen < 0 {
  6730. return ErrInvalidLengthTypes
  6731. }
  6732. postIndex := iNdEx + msglen
  6733. if postIndex < 0 {
  6734. return ErrInvalidLengthTypes
  6735. }
  6736. if postIndex > l {
  6737. return io.ErrUnexpectedEOF
  6738. }
  6739. v := &RequestInfo{}
  6740. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6741. return err
  6742. }
  6743. m.Value = &Request_Info{v}
  6744. iNdEx = postIndex
  6745. case 4:
  6746. if wireType != 2 {
  6747. return fmt.Errorf("proto: wrong wireType = %d for field InitChain", wireType)
  6748. }
  6749. var msglen int
  6750. for shift := uint(0); ; shift += 7 {
  6751. if shift >= 64 {
  6752. return ErrIntOverflowTypes
  6753. }
  6754. if iNdEx >= l {
  6755. return io.ErrUnexpectedEOF
  6756. }
  6757. b := dAtA[iNdEx]
  6758. iNdEx++
  6759. msglen |= int(b&0x7F) << shift
  6760. if b < 0x80 {
  6761. break
  6762. }
  6763. }
  6764. if msglen < 0 {
  6765. return ErrInvalidLengthTypes
  6766. }
  6767. postIndex := iNdEx + msglen
  6768. if postIndex < 0 {
  6769. return ErrInvalidLengthTypes
  6770. }
  6771. if postIndex > l {
  6772. return io.ErrUnexpectedEOF
  6773. }
  6774. v := &RequestInitChain{}
  6775. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6776. return err
  6777. }
  6778. m.Value = &Request_InitChain{v}
  6779. iNdEx = postIndex
  6780. case 5:
  6781. if wireType != 2 {
  6782. return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType)
  6783. }
  6784. var msglen int
  6785. for shift := uint(0); ; shift += 7 {
  6786. if shift >= 64 {
  6787. return ErrIntOverflowTypes
  6788. }
  6789. if iNdEx >= l {
  6790. return io.ErrUnexpectedEOF
  6791. }
  6792. b := dAtA[iNdEx]
  6793. iNdEx++
  6794. msglen |= int(b&0x7F) << shift
  6795. if b < 0x80 {
  6796. break
  6797. }
  6798. }
  6799. if msglen < 0 {
  6800. return ErrInvalidLengthTypes
  6801. }
  6802. postIndex := iNdEx + msglen
  6803. if postIndex < 0 {
  6804. return ErrInvalidLengthTypes
  6805. }
  6806. if postIndex > l {
  6807. return io.ErrUnexpectedEOF
  6808. }
  6809. v := &RequestQuery{}
  6810. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6811. return err
  6812. }
  6813. m.Value = &Request_Query{v}
  6814. iNdEx = postIndex
  6815. case 6:
  6816. if wireType != 2 {
  6817. return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", wireType)
  6818. }
  6819. var msglen int
  6820. for shift := uint(0); ; shift += 7 {
  6821. if shift >= 64 {
  6822. return ErrIntOverflowTypes
  6823. }
  6824. if iNdEx >= l {
  6825. return io.ErrUnexpectedEOF
  6826. }
  6827. b := dAtA[iNdEx]
  6828. iNdEx++
  6829. msglen |= int(b&0x7F) << shift
  6830. if b < 0x80 {
  6831. break
  6832. }
  6833. }
  6834. if msglen < 0 {
  6835. return ErrInvalidLengthTypes
  6836. }
  6837. postIndex := iNdEx + msglen
  6838. if postIndex < 0 {
  6839. return ErrInvalidLengthTypes
  6840. }
  6841. if postIndex > l {
  6842. return io.ErrUnexpectedEOF
  6843. }
  6844. v := &RequestBeginBlock{}
  6845. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6846. return err
  6847. }
  6848. m.Value = &Request_BeginBlock{v}
  6849. iNdEx = postIndex
  6850. case 7:
  6851. if wireType != 2 {
  6852. return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType)
  6853. }
  6854. var msglen int
  6855. for shift := uint(0); ; shift += 7 {
  6856. if shift >= 64 {
  6857. return ErrIntOverflowTypes
  6858. }
  6859. if iNdEx >= l {
  6860. return io.ErrUnexpectedEOF
  6861. }
  6862. b := dAtA[iNdEx]
  6863. iNdEx++
  6864. msglen |= int(b&0x7F) << shift
  6865. if b < 0x80 {
  6866. break
  6867. }
  6868. }
  6869. if msglen < 0 {
  6870. return ErrInvalidLengthTypes
  6871. }
  6872. postIndex := iNdEx + msglen
  6873. if postIndex < 0 {
  6874. return ErrInvalidLengthTypes
  6875. }
  6876. if postIndex > l {
  6877. return io.ErrUnexpectedEOF
  6878. }
  6879. v := &RequestCheckTx{}
  6880. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6881. return err
  6882. }
  6883. m.Value = &Request_CheckTx{v}
  6884. iNdEx = postIndex
  6885. case 8:
  6886. if wireType != 2 {
  6887. return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", wireType)
  6888. }
  6889. var msglen int
  6890. for shift := uint(0); ; shift += 7 {
  6891. if shift >= 64 {
  6892. return ErrIntOverflowTypes
  6893. }
  6894. if iNdEx >= l {
  6895. return io.ErrUnexpectedEOF
  6896. }
  6897. b := dAtA[iNdEx]
  6898. iNdEx++
  6899. msglen |= int(b&0x7F) << shift
  6900. if b < 0x80 {
  6901. break
  6902. }
  6903. }
  6904. if msglen < 0 {
  6905. return ErrInvalidLengthTypes
  6906. }
  6907. postIndex := iNdEx + msglen
  6908. if postIndex < 0 {
  6909. return ErrInvalidLengthTypes
  6910. }
  6911. if postIndex > l {
  6912. return io.ErrUnexpectedEOF
  6913. }
  6914. v := &RequestDeliverTx{}
  6915. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6916. return err
  6917. }
  6918. m.Value = &Request_DeliverTx{v}
  6919. iNdEx = postIndex
  6920. case 9:
  6921. if wireType != 2 {
  6922. return fmt.Errorf("proto: wrong wireType = %d for field EndBlock", wireType)
  6923. }
  6924. var msglen int
  6925. for shift := uint(0); ; shift += 7 {
  6926. if shift >= 64 {
  6927. return ErrIntOverflowTypes
  6928. }
  6929. if iNdEx >= l {
  6930. return io.ErrUnexpectedEOF
  6931. }
  6932. b := dAtA[iNdEx]
  6933. iNdEx++
  6934. msglen |= int(b&0x7F) << shift
  6935. if b < 0x80 {
  6936. break
  6937. }
  6938. }
  6939. if msglen < 0 {
  6940. return ErrInvalidLengthTypes
  6941. }
  6942. postIndex := iNdEx + msglen
  6943. if postIndex < 0 {
  6944. return ErrInvalidLengthTypes
  6945. }
  6946. if postIndex > l {
  6947. return io.ErrUnexpectedEOF
  6948. }
  6949. v := &RequestEndBlock{}
  6950. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6951. return err
  6952. }
  6953. m.Value = &Request_EndBlock{v}
  6954. iNdEx = postIndex
  6955. case 10:
  6956. if wireType != 2 {
  6957. return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType)
  6958. }
  6959. var msglen int
  6960. for shift := uint(0); ; shift += 7 {
  6961. if shift >= 64 {
  6962. return ErrIntOverflowTypes
  6963. }
  6964. if iNdEx >= l {
  6965. return io.ErrUnexpectedEOF
  6966. }
  6967. b := dAtA[iNdEx]
  6968. iNdEx++
  6969. msglen |= int(b&0x7F) << shift
  6970. if b < 0x80 {
  6971. break
  6972. }
  6973. }
  6974. if msglen < 0 {
  6975. return ErrInvalidLengthTypes
  6976. }
  6977. postIndex := iNdEx + msglen
  6978. if postIndex < 0 {
  6979. return ErrInvalidLengthTypes
  6980. }
  6981. if postIndex > l {
  6982. return io.ErrUnexpectedEOF
  6983. }
  6984. v := &RequestCommit{}
  6985. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6986. return err
  6987. }
  6988. m.Value = &Request_Commit{v}
  6989. iNdEx = postIndex
  6990. case 11:
  6991. if wireType != 2 {
  6992. return fmt.Errorf("proto: wrong wireType = %d for field ListSnapshots", wireType)
  6993. }
  6994. var msglen int
  6995. for shift := uint(0); ; shift += 7 {
  6996. if shift >= 64 {
  6997. return ErrIntOverflowTypes
  6998. }
  6999. if iNdEx >= l {
  7000. return io.ErrUnexpectedEOF
  7001. }
  7002. b := dAtA[iNdEx]
  7003. iNdEx++
  7004. msglen |= int(b&0x7F) << shift
  7005. if b < 0x80 {
  7006. break
  7007. }
  7008. }
  7009. if msglen < 0 {
  7010. return ErrInvalidLengthTypes
  7011. }
  7012. postIndex := iNdEx + msglen
  7013. if postIndex < 0 {
  7014. return ErrInvalidLengthTypes
  7015. }
  7016. if postIndex > l {
  7017. return io.ErrUnexpectedEOF
  7018. }
  7019. v := &RequestListSnapshots{}
  7020. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7021. return err
  7022. }
  7023. m.Value = &Request_ListSnapshots{v}
  7024. iNdEx = postIndex
  7025. case 12:
  7026. if wireType != 2 {
  7027. return fmt.Errorf("proto: wrong wireType = %d for field OfferSnapshot", wireType)
  7028. }
  7029. var msglen int
  7030. for shift := uint(0); ; shift += 7 {
  7031. if shift >= 64 {
  7032. return ErrIntOverflowTypes
  7033. }
  7034. if iNdEx >= l {
  7035. return io.ErrUnexpectedEOF
  7036. }
  7037. b := dAtA[iNdEx]
  7038. iNdEx++
  7039. msglen |= int(b&0x7F) << shift
  7040. if b < 0x80 {
  7041. break
  7042. }
  7043. }
  7044. if msglen < 0 {
  7045. return ErrInvalidLengthTypes
  7046. }
  7047. postIndex := iNdEx + msglen
  7048. if postIndex < 0 {
  7049. return ErrInvalidLengthTypes
  7050. }
  7051. if postIndex > l {
  7052. return io.ErrUnexpectedEOF
  7053. }
  7054. v := &RequestOfferSnapshot{}
  7055. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7056. return err
  7057. }
  7058. m.Value = &Request_OfferSnapshot{v}
  7059. iNdEx = postIndex
  7060. case 13:
  7061. if wireType != 2 {
  7062. return fmt.Errorf("proto: wrong wireType = %d for field LoadSnapshotChunk", wireType)
  7063. }
  7064. var msglen int
  7065. for shift := uint(0); ; shift += 7 {
  7066. if shift >= 64 {
  7067. return ErrIntOverflowTypes
  7068. }
  7069. if iNdEx >= l {
  7070. return io.ErrUnexpectedEOF
  7071. }
  7072. b := dAtA[iNdEx]
  7073. iNdEx++
  7074. msglen |= int(b&0x7F) << shift
  7075. if b < 0x80 {
  7076. break
  7077. }
  7078. }
  7079. if msglen < 0 {
  7080. return ErrInvalidLengthTypes
  7081. }
  7082. postIndex := iNdEx + msglen
  7083. if postIndex < 0 {
  7084. return ErrInvalidLengthTypes
  7085. }
  7086. if postIndex > l {
  7087. return io.ErrUnexpectedEOF
  7088. }
  7089. v := &RequestLoadSnapshotChunk{}
  7090. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7091. return err
  7092. }
  7093. m.Value = &Request_LoadSnapshotChunk{v}
  7094. iNdEx = postIndex
  7095. case 14:
  7096. if wireType != 2 {
  7097. return fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", wireType)
  7098. }
  7099. var msglen int
  7100. for shift := uint(0); ; shift += 7 {
  7101. if shift >= 64 {
  7102. return ErrIntOverflowTypes
  7103. }
  7104. if iNdEx >= l {
  7105. return io.ErrUnexpectedEOF
  7106. }
  7107. b := dAtA[iNdEx]
  7108. iNdEx++
  7109. msglen |= int(b&0x7F) << shift
  7110. if b < 0x80 {
  7111. break
  7112. }
  7113. }
  7114. if msglen < 0 {
  7115. return ErrInvalidLengthTypes
  7116. }
  7117. postIndex := iNdEx + msglen
  7118. if postIndex < 0 {
  7119. return ErrInvalidLengthTypes
  7120. }
  7121. if postIndex > l {
  7122. return io.ErrUnexpectedEOF
  7123. }
  7124. v := &RequestApplySnapshotChunk{}
  7125. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7126. return err
  7127. }
  7128. m.Value = &Request_ApplySnapshotChunk{v}
  7129. iNdEx = postIndex
  7130. default:
  7131. iNdEx = preIndex
  7132. skippy, err := skipTypes(dAtA[iNdEx:])
  7133. if err != nil {
  7134. return err
  7135. }
  7136. if (skippy < 0) || (iNdEx+skippy) < 0 {
  7137. return ErrInvalidLengthTypes
  7138. }
  7139. if (iNdEx + skippy) > l {
  7140. return io.ErrUnexpectedEOF
  7141. }
  7142. iNdEx += skippy
  7143. }
  7144. }
  7145. if iNdEx > l {
  7146. return io.ErrUnexpectedEOF
  7147. }
  7148. return nil
  7149. }
  7150. func (m *RequestEcho) Unmarshal(dAtA []byte) error {
  7151. l := len(dAtA)
  7152. iNdEx := 0
  7153. for iNdEx < l {
  7154. preIndex := iNdEx
  7155. var wire uint64
  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. wire |= uint64(b&0x7F) << shift
  7166. if b < 0x80 {
  7167. break
  7168. }
  7169. }
  7170. fieldNum := int32(wire >> 3)
  7171. wireType := int(wire & 0x7)
  7172. if wireType == 4 {
  7173. return fmt.Errorf("proto: RequestEcho: wiretype end group for non-group")
  7174. }
  7175. if fieldNum <= 0 {
  7176. return fmt.Errorf("proto: RequestEcho: illegal tag %d (wire type %d)", fieldNum, wire)
  7177. }
  7178. switch fieldNum {
  7179. case 1:
  7180. if wireType != 2 {
  7181. return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
  7182. }
  7183. var stringLen uint64
  7184. for shift := uint(0); ; shift += 7 {
  7185. if shift >= 64 {
  7186. return ErrIntOverflowTypes
  7187. }
  7188. if iNdEx >= l {
  7189. return io.ErrUnexpectedEOF
  7190. }
  7191. b := dAtA[iNdEx]
  7192. iNdEx++
  7193. stringLen |= uint64(b&0x7F) << shift
  7194. if b < 0x80 {
  7195. break
  7196. }
  7197. }
  7198. intStringLen := int(stringLen)
  7199. if intStringLen < 0 {
  7200. return ErrInvalidLengthTypes
  7201. }
  7202. postIndex := iNdEx + intStringLen
  7203. if postIndex < 0 {
  7204. return ErrInvalidLengthTypes
  7205. }
  7206. if postIndex > l {
  7207. return io.ErrUnexpectedEOF
  7208. }
  7209. m.Message = string(dAtA[iNdEx:postIndex])
  7210. iNdEx = postIndex
  7211. default:
  7212. iNdEx = preIndex
  7213. skippy, err := skipTypes(dAtA[iNdEx:])
  7214. if err != nil {
  7215. return err
  7216. }
  7217. if (skippy < 0) || (iNdEx+skippy) < 0 {
  7218. return ErrInvalidLengthTypes
  7219. }
  7220. if (iNdEx + skippy) > l {
  7221. return io.ErrUnexpectedEOF
  7222. }
  7223. iNdEx += skippy
  7224. }
  7225. }
  7226. if iNdEx > l {
  7227. return io.ErrUnexpectedEOF
  7228. }
  7229. return nil
  7230. }
  7231. func (m *RequestFlush) Unmarshal(dAtA []byte) error {
  7232. l := len(dAtA)
  7233. iNdEx := 0
  7234. for iNdEx < l {
  7235. preIndex := iNdEx
  7236. var wire uint64
  7237. for shift := uint(0); ; shift += 7 {
  7238. if shift >= 64 {
  7239. return ErrIntOverflowTypes
  7240. }
  7241. if iNdEx >= l {
  7242. return io.ErrUnexpectedEOF
  7243. }
  7244. b := dAtA[iNdEx]
  7245. iNdEx++
  7246. wire |= uint64(b&0x7F) << shift
  7247. if b < 0x80 {
  7248. break
  7249. }
  7250. }
  7251. fieldNum := int32(wire >> 3)
  7252. wireType := int(wire & 0x7)
  7253. if wireType == 4 {
  7254. return fmt.Errorf("proto: RequestFlush: wiretype end group for non-group")
  7255. }
  7256. if fieldNum <= 0 {
  7257. return fmt.Errorf("proto: RequestFlush: illegal tag %d (wire type %d)", fieldNum, wire)
  7258. }
  7259. switch fieldNum {
  7260. default:
  7261. iNdEx = preIndex
  7262. skippy, err := skipTypes(dAtA[iNdEx:])
  7263. if err != nil {
  7264. return err
  7265. }
  7266. if (skippy < 0) || (iNdEx+skippy) < 0 {
  7267. return ErrInvalidLengthTypes
  7268. }
  7269. if (iNdEx + skippy) > l {
  7270. return io.ErrUnexpectedEOF
  7271. }
  7272. iNdEx += skippy
  7273. }
  7274. }
  7275. if iNdEx > l {
  7276. return io.ErrUnexpectedEOF
  7277. }
  7278. return nil
  7279. }
  7280. func (m *RequestInfo) Unmarshal(dAtA []byte) error {
  7281. l := len(dAtA)
  7282. iNdEx := 0
  7283. for iNdEx < l {
  7284. preIndex := iNdEx
  7285. var wire uint64
  7286. for shift := uint(0); ; shift += 7 {
  7287. if shift >= 64 {
  7288. return ErrIntOverflowTypes
  7289. }
  7290. if iNdEx >= l {
  7291. return io.ErrUnexpectedEOF
  7292. }
  7293. b := dAtA[iNdEx]
  7294. iNdEx++
  7295. wire |= uint64(b&0x7F) << shift
  7296. if b < 0x80 {
  7297. break
  7298. }
  7299. }
  7300. fieldNum := int32(wire >> 3)
  7301. wireType := int(wire & 0x7)
  7302. if wireType == 4 {
  7303. return fmt.Errorf("proto: RequestInfo: wiretype end group for non-group")
  7304. }
  7305. if fieldNum <= 0 {
  7306. return fmt.Errorf("proto: RequestInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  7307. }
  7308. switch fieldNum {
  7309. case 1:
  7310. if wireType != 2 {
  7311. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  7312. }
  7313. var stringLen uint64
  7314. for shift := uint(0); ; shift += 7 {
  7315. if shift >= 64 {
  7316. return ErrIntOverflowTypes
  7317. }
  7318. if iNdEx >= l {
  7319. return io.ErrUnexpectedEOF
  7320. }
  7321. b := dAtA[iNdEx]
  7322. iNdEx++
  7323. stringLen |= uint64(b&0x7F) << shift
  7324. if b < 0x80 {
  7325. break
  7326. }
  7327. }
  7328. intStringLen := int(stringLen)
  7329. if intStringLen < 0 {
  7330. return ErrInvalidLengthTypes
  7331. }
  7332. postIndex := iNdEx + intStringLen
  7333. if postIndex < 0 {
  7334. return ErrInvalidLengthTypes
  7335. }
  7336. if postIndex > l {
  7337. return io.ErrUnexpectedEOF
  7338. }
  7339. m.Version = string(dAtA[iNdEx:postIndex])
  7340. iNdEx = postIndex
  7341. case 2:
  7342. if wireType != 0 {
  7343. return fmt.Errorf("proto: wrong wireType = %d for field BlockVersion", wireType)
  7344. }
  7345. m.BlockVersion = 0
  7346. for shift := uint(0); ; shift += 7 {
  7347. if shift >= 64 {
  7348. return ErrIntOverflowTypes
  7349. }
  7350. if iNdEx >= l {
  7351. return io.ErrUnexpectedEOF
  7352. }
  7353. b := dAtA[iNdEx]
  7354. iNdEx++
  7355. m.BlockVersion |= uint64(b&0x7F) << shift
  7356. if b < 0x80 {
  7357. break
  7358. }
  7359. }
  7360. case 3:
  7361. if wireType != 0 {
  7362. return fmt.Errorf("proto: wrong wireType = %d for field P2PVersion", wireType)
  7363. }
  7364. m.P2PVersion = 0
  7365. for shift := uint(0); ; shift += 7 {
  7366. if shift >= 64 {
  7367. return ErrIntOverflowTypes
  7368. }
  7369. if iNdEx >= l {
  7370. return io.ErrUnexpectedEOF
  7371. }
  7372. b := dAtA[iNdEx]
  7373. iNdEx++
  7374. m.P2PVersion |= uint64(b&0x7F) << shift
  7375. if b < 0x80 {
  7376. break
  7377. }
  7378. }
  7379. case 4:
  7380. if wireType != 2 {
  7381. return fmt.Errorf("proto: wrong wireType = %d for field AbciVersion", wireType)
  7382. }
  7383. var stringLen uint64
  7384. for shift := uint(0); ; shift += 7 {
  7385. if shift >= 64 {
  7386. return ErrIntOverflowTypes
  7387. }
  7388. if iNdEx >= l {
  7389. return io.ErrUnexpectedEOF
  7390. }
  7391. b := dAtA[iNdEx]
  7392. iNdEx++
  7393. stringLen |= uint64(b&0x7F) << shift
  7394. if b < 0x80 {
  7395. break
  7396. }
  7397. }
  7398. intStringLen := int(stringLen)
  7399. if intStringLen < 0 {
  7400. return ErrInvalidLengthTypes
  7401. }
  7402. postIndex := iNdEx + intStringLen
  7403. if postIndex < 0 {
  7404. return ErrInvalidLengthTypes
  7405. }
  7406. if postIndex > l {
  7407. return io.ErrUnexpectedEOF
  7408. }
  7409. m.AbciVersion = string(dAtA[iNdEx:postIndex])
  7410. iNdEx = postIndex
  7411. default:
  7412. iNdEx = preIndex
  7413. skippy, err := skipTypes(dAtA[iNdEx:])
  7414. if err != nil {
  7415. return err
  7416. }
  7417. if (skippy < 0) || (iNdEx+skippy) < 0 {
  7418. return ErrInvalidLengthTypes
  7419. }
  7420. if (iNdEx + skippy) > l {
  7421. return io.ErrUnexpectedEOF
  7422. }
  7423. iNdEx += skippy
  7424. }
  7425. }
  7426. if iNdEx > l {
  7427. return io.ErrUnexpectedEOF
  7428. }
  7429. return nil
  7430. }
  7431. func (m *RequestInitChain) Unmarshal(dAtA []byte) error {
  7432. l := len(dAtA)
  7433. iNdEx := 0
  7434. for iNdEx < l {
  7435. preIndex := iNdEx
  7436. var wire uint64
  7437. for shift := uint(0); ; shift += 7 {
  7438. if shift >= 64 {
  7439. return ErrIntOverflowTypes
  7440. }
  7441. if iNdEx >= l {
  7442. return io.ErrUnexpectedEOF
  7443. }
  7444. b := dAtA[iNdEx]
  7445. iNdEx++
  7446. wire |= uint64(b&0x7F) << shift
  7447. if b < 0x80 {
  7448. break
  7449. }
  7450. }
  7451. fieldNum := int32(wire >> 3)
  7452. wireType := int(wire & 0x7)
  7453. if wireType == 4 {
  7454. return fmt.Errorf("proto: RequestInitChain: wiretype end group for non-group")
  7455. }
  7456. if fieldNum <= 0 {
  7457. return fmt.Errorf("proto: RequestInitChain: illegal tag %d (wire type %d)", fieldNum, wire)
  7458. }
  7459. switch fieldNum {
  7460. case 1:
  7461. if wireType != 2 {
  7462. return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
  7463. }
  7464. var msglen int
  7465. for shift := uint(0); ; shift += 7 {
  7466. if shift >= 64 {
  7467. return ErrIntOverflowTypes
  7468. }
  7469. if iNdEx >= l {
  7470. return io.ErrUnexpectedEOF
  7471. }
  7472. b := dAtA[iNdEx]
  7473. iNdEx++
  7474. msglen |= int(b&0x7F) << shift
  7475. if b < 0x80 {
  7476. break
  7477. }
  7478. }
  7479. if msglen < 0 {
  7480. return ErrInvalidLengthTypes
  7481. }
  7482. postIndex := iNdEx + msglen
  7483. if postIndex < 0 {
  7484. return ErrInvalidLengthTypes
  7485. }
  7486. if postIndex > l {
  7487. return io.ErrUnexpectedEOF
  7488. }
  7489. if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil {
  7490. return err
  7491. }
  7492. iNdEx = postIndex
  7493. case 2:
  7494. if wireType != 2 {
  7495. return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType)
  7496. }
  7497. var stringLen uint64
  7498. for shift := uint(0); ; shift += 7 {
  7499. if shift >= 64 {
  7500. return ErrIntOverflowTypes
  7501. }
  7502. if iNdEx >= l {
  7503. return io.ErrUnexpectedEOF
  7504. }
  7505. b := dAtA[iNdEx]
  7506. iNdEx++
  7507. stringLen |= uint64(b&0x7F) << shift
  7508. if b < 0x80 {
  7509. break
  7510. }
  7511. }
  7512. intStringLen := int(stringLen)
  7513. if intStringLen < 0 {
  7514. return ErrInvalidLengthTypes
  7515. }
  7516. postIndex := iNdEx + intStringLen
  7517. if postIndex < 0 {
  7518. return ErrInvalidLengthTypes
  7519. }
  7520. if postIndex > l {
  7521. return io.ErrUnexpectedEOF
  7522. }
  7523. m.ChainId = string(dAtA[iNdEx:postIndex])
  7524. iNdEx = postIndex
  7525. case 3:
  7526. if wireType != 2 {
  7527. return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", wireType)
  7528. }
  7529. var msglen int
  7530. for shift := uint(0); ; shift += 7 {
  7531. if shift >= 64 {
  7532. return ErrIntOverflowTypes
  7533. }
  7534. if iNdEx >= l {
  7535. return io.ErrUnexpectedEOF
  7536. }
  7537. b := dAtA[iNdEx]
  7538. iNdEx++
  7539. msglen |= int(b&0x7F) << shift
  7540. if b < 0x80 {
  7541. break
  7542. }
  7543. }
  7544. if msglen < 0 {
  7545. return ErrInvalidLengthTypes
  7546. }
  7547. postIndex := iNdEx + msglen
  7548. if postIndex < 0 {
  7549. return ErrInvalidLengthTypes
  7550. }
  7551. if postIndex > l {
  7552. return io.ErrUnexpectedEOF
  7553. }
  7554. if m.ConsensusParams == nil {
  7555. m.ConsensusParams = &types1.ConsensusParams{}
  7556. }
  7557. if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7558. return err
  7559. }
  7560. iNdEx = postIndex
  7561. case 4:
  7562. if wireType != 2 {
  7563. return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType)
  7564. }
  7565. var msglen int
  7566. for shift := uint(0); ; shift += 7 {
  7567. if shift >= 64 {
  7568. return ErrIntOverflowTypes
  7569. }
  7570. if iNdEx >= l {
  7571. return io.ErrUnexpectedEOF
  7572. }
  7573. b := dAtA[iNdEx]
  7574. iNdEx++
  7575. msglen |= int(b&0x7F) << shift
  7576. if b < 0x80 {
  7577. break
  7578. }
  7579. }
  7580. if msglen < 0 {
  7581. return ErrInvalidLengthTypes
  7582. }
  7583. postIndex := iNdEx + msglen
  7584. if postIndex < 0 {
  7585. return ErrInvalidLengthTypes
  7586. }
  7587. if postIndex > l {
  7588. return io.ErrUnexpectedEOF
  7589. }
  7590. m.Validators = append(m.Validators, ValidatorUpdate{})
  7591. if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7592. return err
  7593. }
  7594. iNdEx = postIndex
  7595. case 5:
  7596. if wireType != 2 {
  7597. return fmt.Errorf("proto: wrong wireType = %d for field AppStateBytes", wireType)
  7598. }
  7599. var byteLen int
  7600. for shift := uint(0); ; shift += 7 {
  7601. if shift >= 64 {
  7602. return ErrIntOverflowTypes
  7603. }
  7604. if iNdEx >= l {
  7605. return io.ErrUnexpectedEOF
  7606. }
  7607. b := dAtA[iNdEx]
  7608. iNdEx++
  7609. byteLen |= int(b&0x7F) << shift
  7610. if b < 0x80 {
  7611. break
  7612. }
  7613. }
  7614. if byteLen < 0 {
  7615. return ErrInvalidLengthTypes
  7616. }
  7617. postIndex := iNdEx + byteLen
  7618. if postIndex < 0 {
  7619. return ErrInvalidLengthTypes
  7620. }
  7621. if postIndex > l {
  7622. return io.ErrUnexpectedEOF
  7623. }
  7624. m.AppStateBytes = append(m.AppStateBytes[:0], dAtA[iNdEx:postIndex]...)
  7625. if m.AppStateBytes == nil {
  7626. m.AppStateBytes = []byte{}
  7627. }
  7628. iNdEx = postIndex
  7629. case 6:
  7630. if wireType != 0 {
  7631. return fmt.Errorf("proto: wrong wireType = %d for field InitialHeight", wireType)
  7632. }
  7633. m.InitialHeight = 0
  7634. for shift := uint(0); ; shift += 7 {
  7635. if shift >= 64 {
  7636. return ErrIntOverflowTypes
  7637. }
  7638. if iNdEx >= l {
  7639. return io.ErrUnexpectedEOF
  7640. }
  7641. b := dAtA[iNdEx]
  7642. iNdEx++
  7643. m.InitialHeight |= int64(b&0x7F) << shift
  7644. if b < 0x80 {
  7645. break
  7646. }
  7647. }
  7648. default:
  7649. iNdEx = preIndex
  7650. skippy, err := skipTypes(dAtA[iNdEx:])
  7651. if err != nil {
  7652. return err
  7653. }
  7654. if (skippy < 0) || (iNdEx+skippy) < 0 {
  7655. return ErrInvalidLengthTypes
  7656. }
  7657. if (iNdEx + skippy) > l {
  7658. return io.ErrUnexpectedEOF
  7659. }
  7660. iNdEx += skippy
  7661. }
  7662. }
  7663. if iNdEx > l {
  7664. return io.ErrUnexpectedEOF
  7665. }
  7666. return nil
  7667. }
  7668. func (m *RequestQuery) Unmarshal(dAtA []byte) error {
  7669. l := len(dAtA)
  7670. iNdEx := 0
  7671. for iNdEx < l {
  7672. preIndex := iNdEx
  7673. var wire uint64
  7674. for shift := uint(0); ; shift += 7 {
  7675. if shift >= 64 {
  7676. return ErrIntOverflowTypes
  7677. }
  7678. if iNdEx >= l {
  7679. return io.ErrUnexpectedEOF
  7680. }
  7681. b := dAtA[iNdEx]
  7682. iNdEx++
  7683. wire |= uint64(b&0x7F) << shift
  7684. if b < 0x80 {
  7685. break
  7686. }
  7687. }
  7688. fieldNum := int32(wire >> 3)
  7689. wireType := int(wire & 0x7)
  7690. if wireType == 4 {
  7691. return fmt.Errorf("proto: RequestQuery: wiretype end group for non-group")
  7692. }
  7693. if fieldNum <= 0 {
  7694. return fmt.Errorf("proto: RequestQuery: illegal tag %d (wire type %d)", fieldNum, wire)
  7695. }
  7696. switch fieldNum {
  7697. case 1:
  7698. if wireType != 2 {
  7699. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  7700. }
  7701. var byteLen int
  7702. for shift := uint(0); ; shift += 7 {
  7703. if shift >= 64 {
  7704. return ErrIntOverflowTypes
  7705. }
  7706. if iNdEx >= l {
  7707. return io.ErrUnexpectedEOF
  7708. }
  7709. b := dAtA[iNdEx]
  7710. iNdEx++
  7711. byteLen |= int(b&0x7F) << shift
  7712. if b < 0x80 {
  7713. break
  7714. }
  7715. }
  7716. if byteLen < 0 {
  7717. return ErrInvalidLengthTypes
  7718. }
  7719. postIndex := iNdEx + byteLen
  7720. if postIndex < 0 {
  7721. return ErrInvalidLengthTypes
  7722. }
  7723. if postIndex > l {
  7724. return io.ErrUnexpectedEOF
  7725. }
  7726. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  7727. if m.Data == nil {
  7728. m.Data = []byte{}
  7729. }
  7730. iNdEx = postIndex
  7731. case 2:
  7732. if wireType != 2 {
  7733. return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
  7734. }
  7735. var stringLen uint64
  7736. for shift := uint(0); ; shift += 7 {
  7737. if shift >= 64 {
  7738. return ErrIntOverflowTypes
  7739. }
  7740. if iNdEx >= l {
  7741. return io.ErrUnexpectedEOF
  7742. }
  7743. b := dAtA[iNdEx]
  7744. iNdEx++
  7745. stringLen |= uint64(b&0x7F) << shift
  7746. if b < 0x80 {
  7747. break
  7748. }
  7749. }
  7750. intStringLen := int(stringLen)
  7751. if intStringLen < 0 {
  7752. return ErrInvalidLengthTypes
  7753. }
  7754. postIndex := iNdEx + intStringLen
  7755. if postIndex < 0 {
  7756. return ErrInvalidLengthTypes
  7757. }
  7758. if postIndex > l {
  7759. return io.ErrUnexpectedEOF
  7760. }
  7761. m.Path = string(dAtA[iNdEx:postIndex])
  7762. iNdEx = postIndex
  7763. case 3:
  7764. if wireType != 0 {
  7765. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  7766. }
  7767. m.Height = 0
  7768. for shift := uint(0); ; shift += 7 {
  7769. if shift >= 64 {
  7770. return ErrIntOverflowTypes
  7771. }
  7772. if iNdEx >= l {
  7773. return io.ErrUnexpectedEOF
  7774. }
  7775. b := dAtA[iNdEx]
  7776. iNdEx++
  7777. m.Height |= int64(b&0x7F) << shift
  7778. if b < 0x80 {
  7779. break
  7780. }
  7781. }
  7782. case 4:
  7783. if wireType != 0 {
  7784. return fmt.Errorf("proto: wrong wireType = %d for field Prove", wireType)
  7785. }
  7786. var v int
  7787. for shift := uint(0); ; shift += 7 {
  7788. if shift >= 64 {
  7789. return ErrIntOverflowTypes
  7790. }
  7791. if iNdEx >= l {
  7792. return io.ErrUnexpectedEOF
  7793. }
  7794. b := dAtA[iNdEx]
  7795. iNdEx++
  7796. v |= int(b&0x7F) << shift
  7797. if b < 0x80 {
  7798. break
  7799. }
  7800. }
  7801. m.Prove = bool(v != 0)
  7802. default:
  7803. iNdEx = preIndex
  7804. skippy, err := skipTypes(dAtA[iNdEx:])
  7805. if err != nil {
  7806. return err
  7807. }
  7808. if (skippy < 0) || (iNdEx+skippy) < 0 {
  7809. return ErrInvalidLengthTypes
  7810. }
  7811. if (iNdEx + skippy) > l {
  7812. return io.ErrUnexpectedEOF
  7813. }
  7814. iNdEx += skippy
  7815. }
  7816. }
  7817. if iNdEx > l {
  7818. return io.ErrUnexpectedEOF
  7819. }
  7820. return nil
  7821. }
  7822. func (m *RequestBeginBlock) Unmarshal(dAtA []byte) error {
  7823. l := len(dAtA)
  7824. iNdEx := 0
  7825. for iNdEx < l {
  7826. preIndex := iNdEx
  7827. var wire uint64
  7828. for shift := uint(0); ; shift += 7 {
  7829. if shift >= 64 {
  7830. return ErrIntOverflowTypes
  7831. }
  7832. if iNdEx >= l {
  7833. return io.ErrUnexpectedEOF
  7834. }
  7835. b := dAtA[iNdEx]
  7836. iNdEx++
  7837. wire |= uint64(b&0x7F) << shift
  7838. if b < 0x80 {
  7839. break
  7840. }
  7841. }
  7842. fieldNum := int32(wire >> 3)
  7843. wireType := int(wire & 0x7)
  7844. if wireType == 4 {
  7845. return fmt.Errorf("proto: RequestBeginBlock: wiretype end group for non-group")
  7846. }
  7847. if fieldNum <= 0 {
  7848. return fmt.Errorf("proto: RequestBeginBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  7849. }
  7850. switch fieldNum {
  7851. case 1:
  7852. if wireType != 2 {
  7853. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  7854. }
  7855. var byteLen int
  7856. for shift := uint(0); ; shift += 7 {
  7857. if shift >= 64 {
  7858. return ErrIntOverflowTypes
  7859. }
  7860. if iNdEx >= l {
  7861. return io.ErrUnexpectedEOF
  7862. }
  7863. b := dAtA[iNdEx]
  7864. iNdEx++
  7865. byteLen |= int(b&0x7F) << shift
  7866. if b < 0x80 {
  7867. break
  7868. }
  7869. }
  7870. if byteLen < 0 {
  7871. return ErrInvalidLengthTypes
  7872. }
  7873. postIndex := iNdEx + byteLen
  7874. if postIndex < 0 {
  7875. return ErrInvalidLengthTypes
  7876. }
  7877. if postIndex > l {
  7878. return io.ErrUnexpectedEOF
  7879. }
  7880. m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  7881. if m.Hash == nil {
  7882. m.Hash = []byte{}
  7883. }
  7884. iNdEx = postIndex
  7885. case 2:
  7886. if wireType != 2 {
  7887. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  7888. }
  7889. var msglen int
  7890. for shift := uint(0); ; shift += 7 {
  7891. if shift >= 64 {
  7892. return ErrIntOverflowTypes
  7893. }
  7894. if iNdEx >= l {
  7895. return io.ErrUnexpectedEOF
  7896. }
  7897. b := dAtA[iNdEx]
  7898. iNdEx++
  7899. msglen |= int(b&0x7F) << shift
  7900. if b < 0x80 {
  7901. break
  7902. }
  7903. }
  7904. if msglen < 0 {
  7905. return ErrInvalidLengthTypes
  7906. }
  7907. postIndex := iNdEx + msglen
  7908. if postIndex < 0 {
  7909. return ErrInvalidLengthTypes
  7910. }
  7911. if postIndex > l {
  7912. return io.ErrUnexpectedEOF
  7913. }
  7914. if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7915. return err
  7916. }
  7917. iNdEx = postIndex
  7918. case 3:
  7919. if wireType != 2 {
  7920. return fmt.Errorf("proto: wrong wireType = %d for field LastCommitInfo", wireType)
  7921. }
  7922. var msglen int
  7923. for shift := uint(0); ; shift += 7 {
  7924. if shift >= 64 {
  7925. return ErrIntOverflowTypes
  7926. }
  7927. if iNdEx >= l {
  7928. return io.ErrUnexpectedEOF
  7929. }
  7930. b := dAtA[iNdEx]
  7931. iNdEx++
  7932. msglen |= int(b&0x7F) << shift
  7933. if b < 0x80 {
  7934. break
  7935. }
  7936. }
  7937. if msglen < 0 {
  7938. return ErrInvalidLengthTypes
  7939. }
  7940. postIndex := iNdEx + msglen
  7941. if postIndex < 0 {
  7942. return ErrInvalidLengthTypes
  7943. }
  7944. if postIndex > l {
  7945. return io.ErrUnexpectedEOF
  7946. }
  7947. if err := m.LastCommitInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7948. return err
  7949. }
  7950. iNdEx = postIndex
  7951. case 4:
  7952. if wireType != 2 {
  7953. return fmt.Errorf("proto: wrong wireType = %d for field ByzantineValidators", wireType)
  7954. }
  7955. var msglen int
  7956. for shift := uint(0); ; shift += 7 {
  7957. if shift >= 64 {
  7958. return ErrIntOverflowTypes
  7959. }
  7960. if iNdEx >= l {
  7961. return io.ErrUnexpectedEOF
  7962. }
  7963. b := dAtA[iNdEx]
  7964. iNdEx++
  7965. msglen |= int(b&0x7F) << shift
  7966. if b < 0x80 {
  7967. break
  7968. }
  7969. }
  7970. if msglen < 0 {
  7971. return ErrInvalidLengthTypes
  7972. }
  7973. postIndex := iNdEx + msglen
  7974. if postIndex < 0 {
  7975. return ErrInvalidLengthTypes
  7976. }
  7977. if postIndex > l {
  7978. return io.ErrUnexpectedEOF
  7979. }
  7980. m.ByzantineValidators = append(m.ByzantineValidators, Evidence{})
  7981. if err := m.ByzantineValidators[len(m.ByzantineValidators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7982. return err
  7983. }
  7984. iNdEx = postIndex
  7985. default:
  7986. iNdEx = preIndex
  7987. skippy, err := skipTypes(dAtA[iNdEx:])
  7988. if err != nil {
  7989. return err
  7990. }
  7991. if (skippy < 0) || (iNdEx+skippy) < 0 {
  7992. return ErrInvalidLengthTypes
  7993. }
  7994. if (iNdEx + skippy) > l {
  7995. return io.ErrUnexpectedEOF
  7996. }
  7997. iNdEx += skippy
  7998. }
  7999. }
  8000. if iNdEx > l {
  8001. return io.ErrUnexpectedEOF
  8002. }
  8003. return nil
  8004. }
  8005. func (m *RequestCheckTx) Unmarshal(dAtA []byte) error {
  8006. l := len(dAtA)
  8007. iNdEx := 0
  8008. for iNdEx < l {
  8009. preIndex := iNdEx
  8010. var wire uint64
  8011. for shift := uint(0); ; shift += 7 {
  8012. if shift >= 64 {
  8013. return ErrIntOverflowTypes
  8014. }
  8015. if iNdEx >= l {
  8016. return io.ErrUnexpectedEOF
  8017. }
  8018. b := dAtA[iNdEx]
  8019. iNdEx++
  8020. wire |= uint64(b&0x7F) << shift
  8021. if b < 0x80 {
  8022. break
  8023. }
  8024. }
  8025. fieldNum := int32(wire >> 3)
  8026. wireType := int(wire & 0x7)
  8027. if wireType == 4 {
  8028. return fmt.Errorf("proto: RequestCheckTx: wiretype end group for non-group")
  8029. }
  8030. if fieldNum <= 0 {
  8031. return fmt.Errorf("proto: RequestCheckTx: illegal tag %d (wire type %d)", fieldNum, wire)
  8032. }
  8033. switch fieldNum {
  8034. case 1:
  8035. if wireType != 2 {
  8036. return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
  8037. }
  8038. var byteLen int
  8039. for shift := uint(0); ; shift += 7 {
  8040. if shift >= 64 {
  8041. return ErrIntOverflowTypes
  8042. }
  8043. if iNdEx >= l {
  8044. return io.ErrUnexpectedEOF
  8045. }
  8046. b := dAtA[iNdEx]
  8047. iNdEx++
  8048. byteLen |= int(b&0x7F) << shift
  8049. if b < 0x80 {
  8050. break
  8051. }
  8052. }
  8053. if byteLen < 0 {
  8054. return ErrInvalidLengthTypes
  8055. }
  8056. postIndex := iNdEx + byteLen
  8057. if postIndex < 0 {
  8058. return ErrInvalidLengthTypes
  8059. }
  8060. if postIndex > l {
  8061. return io.ErrUnexpectedEOF
  8062. }
  8063. m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...)
  8064. if m.Tx == nil {
  8065. m.Tx = []byte{}
  8066. }
  8067. iNdEx = postIndex
  8068. case 2:
  8069. if wireType != 0 {
  8070. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  8071. }
  8072. m.Type = 0
  8073. for shift := uint(0); ; shift += 7 {
  8074. if shift >= 64 {
  8075. return ErrIntOverflowTypes
  8076. }
  8077. if iNdEx >= l {
  8078. return io.ErrUnexpectedEOF
  8079. }
  8080. b := dAtA[iNdEx]
  8081. iNdEx++
  8082. m.Type |= CheckTxType(b&0x7F) << shift
  8083. if b < 0x80 {
  8084. break
  8085. }
  8086. }
  8087. default:
  8088. iNdEx = preIndex
  8089. skippy, err := skipTypes(dAtA[iNdEx:])
  8090. if err != nil {
  8091. return err
  8092. }
  8093. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8094. return ErrInvalidLengthTypes
  8095. }
  8096. if (iNdEx + skippy) > l {
  8097. return io.ErrUnexpectedEOF
  8098. }
  8099. iNdEx += skippy
  8100. }
  8101. }
  8102. if iNdEx > l {
  8103. return io.ErrUnexpectedEOF
  8104. }
  8105. return nil
  8106. }
  8107. func (m *RequestDeliverTx) Unmarshal(dAtA []byte) error {
  8108. l := len(dAtA)
  8109. iNdEx := 0
  8110. for iNdEx < l {
  8111. preIndex := iNdEx
  8112. var wire uint64
  8113. for shift := uint(0); ; shift += 7 {
  8114. if shift >= 64 {
  8115. return ErrIntOverflowTypes
  8116. }
  8117. if iNdEx >= l {
  8118. return io.ErrUnexpectedEOF
  8119. }
  8120. b := dAtA[iNdEx]
  8121. iNdEx++
  8122. wire |= uint64(b&0x7F) << shift
  8123. if b < 0x80 {
  8124. break
  8125. }
  8126. }
  8127. fieldNum := int32(wire >> 3)
  8128. wireType := int(wire & 0x7)
  8129. if wireType == 4 {
  8130. return fmt.Errorf("proto: RequestDeliverTx: wiretype end group for non-group")
  8131. }
  8132. if fieldNum <= 0 {
  8133. return fmt.Errorf("proto: RequestDeliverTx: illegal tag %d (wire type %d)", fieldNum, wire)
  8134. }
  8135. switch fieldNum {
  8136. case 1:
  8137. if wireType != 2 {
  8138. return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
  8139. }
  8140. var byteLen int
  8141. for shift := uint(0); ; shift += 7 {
  8142. if shift >= 64 {
  8143. return ErrIntOverflowTypes
  8144. }
  8145. if iNdEx >= l {
  8146. return io.ErrUnexpectedEOF
  8147. }
  8148. b := dAtA[iNdEx]
  8149. iNdEx++
  8150. byteLen |= int(b&0x7F) << shift
  8151. if b < 0x80 {
  8152. break
  8153. }
  8154. }
  8155. if byteLen < 0 {
  8156. return ErrInvalidLengthTypes
  8157. }
  8158. postIndex := iNdEx + byteLen
  8159. if postIndex < 0 {
  8160. return ErrInvalidLengthTypes
  8161. }
  8162. if postIndex > l {
  8163. return io.ErrUnexpectedEOF
  8164. }
  8165. m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...)
  8166. if m.Tx == nil {
  8167. m.Tx = []byte{}
  8168. }
  8169. iNdEx = postIndex
  8170. default:
  8171. iNdEx = preIndex
  8172. skippy, err := skipTypes(dAtA[iNdEx:])
  8173. if err != nil {
  8174. return err
  8175. }
  8176. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8177. return ErrInvalidLengthTypes
  8178. }
  8179. if (iNdEx + skippy) > l {
  8180. return io.ErrUnexpectedEOF
  8181. }
  8182. iNdEx += skippy
  8183. }
  8184. }
  8185. if iNdEx > l {
  8186. return io.ErrUnexpectedEOF
  8187. }
  8188. return nil
  8189. }
  8190. func (m *RequestEndBlock) Unmarshal(dAtA []byte) error {
  8191. l := len(dAtA)
  8192. iNdEx := 0
  8193. for iNdEx < l {
  8194. preIndex := iNdEx
  8195. var wire uint64
  8196. for shift := uint(0); ; shift += 7 {
  8197. if shift >= 64 {
  8198. return ErrIntOverflowTypes
  8199. }
  8200. if iNdEx >= l {
  8201. return io.ErrUnexpectedEOF
  8202. }
  8203. b := dAtA[iNdEx]
  8204. iNdEx++
  8205. wire |= uint64(b&0x7F) << shift
  8206. if b < 0x80 {
  8207. break
  8208. }
  8209. }
  8210. fieldNum := int32(wire >> 3)
  8211. wireType := int(wire & 0x7)
  8212. if wireType == 4 {
  8213. return fmt.Errorf("proto: RequestEndBlock: wiretype end group for non-group")
  8214. }
  8215. if fieldNum <= 0 {
  8216. return fmt.Errorf("proto: RequestEndBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  8217. }
  8218. switch fieldNum {
  8219. case 1:
  8220. if wireType != 0 {
  8221. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  8222. }
  8223. m.Height = 0
  8224. for shift := uint(0); ; shift += 7 {
  8225. if shift >= 64 {
  8226. return ErrIntOverflowTypes
  8227. }
  8228. if iNdEx >= l {
  8229. return io.ErrUnexpectedEOF
  8230. }
  8231. b := dAtA[iNdEx]
  8232. iNdEx++
  8233. m.Height |= int64(b&0x7F) << shift
  8234. if b < 0x80 {
  8235. break
  8236. }
  8237. }
  8238. default:
  8239. iNdEx = preIndex
  8240. skippy, err := skipTypes(dAtA[iNdEx:])
  8241. if err != nil {
  8242. return err
  8243. }
  8244. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8245. return ErrInvalidLengthTypes
  8246. }
  8247. if (iNdEx + skippy) > l {
  8248. return io.ErrUnexpectedEOF
  8249. }
  8250. iNdEx += skippy
  8251. }
  8252. }
  8253. if iNdEx > l {
  8254. return io.ErrUnexpectedEOF
  8255. }
  8256. return nil
  8257. }
  8258. func (m *RequestCommit) Unmarshal(dAtA []byte) error {
  8259. l := len(dAtA)
  8260. iNdEx := 0
  8261. for iNdEx < l {
  8262. preIndex := iNdEx
  8263. var wire uint64
  8264. for shift := uint(0); ; shift += 7 {
  8265. if shift >= 64 {
  8266. return ErrIntOverflowTypes
  8267. }
  8268. if iNdEx >= l {
  8269. return io.ErrUnexpectedEOF
  8270. }
  8271. b := dAtA[iNdEx]
  8272. iNdEx++
  8273. wire |= uint64(b&0x7F) << shift
  8274. if b < 0x80 {
  8275. break
  8276. }
  8277. }
  8278. fieldNum := int32(wire >> 3)
  8279. wireType := int(wire & 0x7)
  8280. if wireType == 4 {
  8281. return fmt.Errorf("proto: RequestCommit: wiretype end group for non-group")
  8282. }
  8283. if fieldNum <= 0 {
  8284. return fmt.Errorf("proto: RequestCommit: illegal tag %d (wire type %d)", fieldNum, wire)
  8285. }
  8286. switch fieldNum {
  8287. default:
  8288. iNdEx = preIndex
  8289. skippy, err := skipTypes(dAtA[iNdEx:])
  8290. if err != nil {
  8291. return err
  8292. }
  8293. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8294. return ErrInvalidLengthTypes
  8295. }
  8296. if (iNdEx + skippy) > l {
  8297. return io.ErrUnexpectedEOF
  8298. }
  8299. iNdEx += skippy
  8300. }
  8301. }
  8302. if iNdEx > l {
  8303. return io.ErrUnexpectedEOF
  8304. }
  8305. return nil
  8306. }
  8307. func (m *RequestListSnapshots) Unmarshal(dAtA []byte) error {
  8308. l := len(dAtA)
  8309. iNdEx := 0
  8310. for iNdEx < l {
  8311. preIndex := iNdEx
  8312. var wire uint64
  8313. for shift := uint(0); ; shift += 7 {
  8314. if shift >= 64 {
  8315. return ErrIntOverflowTypes
  8316. }
  8317. if iNdEx >= l {
  8318. return io.ErrUnexpectedEOF
  8319. }
  8320. b := dAtA[iNdEx]
  8321. iNdEx++
  8322. wire |= uint64(b&0x7F) << shift
  8323. if b < 0x80 {
  8324. break
  8325. }
  8326. }
  8327. fieldNum := int32(wire >> 3)
  8328. wireType := int(wire & 0x7)
  8329. if wireType == 4 {
  8330. return fmt.Errorf("proto: RequestListSnapshots: wiretype end group for non-group")
  8331. }
  8332. if fieldNum <= 0 {
  8333. return fmt.Errorf("proto: RequestListSnapshots: illegal tag %d (wire type %d)", fieldNum, wire)
  8334. }
  8335. switch fieldNum {
  8336. default:
  8337. iNdEx = preIndex
  8338. skippy, err := skipTypes(dAtA[iNdEx:])
  8339. if err != nil {
  8340. return err
  8341. }
  8342. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8343. return ErrInvalidLengthTypes
  8344. }
  8345. if (iNdEx + skippy) > l {
  8346. return io.ErrUnexpectedEOF
  8347. }
  8348. iNdEx += skippy
  8349. }
  8350. }
  8351. if iNdEx > l {
  8352. return io.ErrUnexpectedEOF
  8353. }
  8354. return nil
  8355. }
  8356. func (m *RequestOfferSnapshot) Unmarshal(dAtA []byte) error {
  8357. l := len(dAtA)
  8358. iNdEx := 0
  8359. for iNdEx < l {
  8360. preIndex := iNdEx
  8361. var wire uint64
  8362. for shift := uint(0); ; shift += 7 {
  8363. if shift >= 64 {
  8364. return ErrIntOverflowTypes
  8365. }
  8366. if iNdEx >= l {
  8367. return io.ErrUnexpectedEOF
  8368. }
  8369. b := dAtA[iNdEx]
  8370. iNdEx++
  8371. wire |= uint64(b&0x7F) << shift
  8372. if b < 0x80 {
  8373. break
  8374. }
  8375. }
  8376. fieldNum := int32(wire >> 3)
  8377. wireType := int(wire & 0x7)
  8378. if wireType == 4 {
  8379. return fmt.Errorf("proto: RequestOfferSnapshot: wiretype end group for non-group")
  8380. }
  8381. if fieldNum <= 0 {
  8382. return fmt.Errorf("proto: RequestOfferSnapshot: illegal tag %d (wire type %d)", fieldNum, wire)
  8383. }
  8384. switch fieldNum {
  8385. case 1:
  8386. if wireType != 2 {
  8387. return fmt.Errorf("proto: wrong wireType = %d for field Snapshot", wireType)
  8388. }
  8389. var msglen int
  8390. for shift := uint(0); ; shift += 7 {
  8391. if shift >= 64 {
  8392. return ErrIntOverflowTypes
  8393. }
  8394. if iNdEx >= l {
  8395. return io.ErrUnexpectedEOF
  8396. }
  8397. b := dAtA[iNdEx]
  8398. iNdEx++
  8399. msglen |= int(b&0x7F) << shift
  8400. if b < 0x80 {
  8401. break
  8402. }
  8403. }
  8404. if msglen < 0 {
  8405. return ErrInvalidLengthTypes
  8406. }
  8407. postIndex := iNdEx + msglen
  8408. if postIndex < 0 {
  8409. return ErrInvalidLengthTypes
  8410. }
  8411. if postIndex > l {
  8412. return io.ErrUnexpectedEOF
  8413. }
  8414. if m.Snapshot == nil {
  8415. m.Snapshot = &Snapshot{}
  8416. }
  8417. if err := m.Snapshot.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8418. return err
  8419. }
  8420. iNdEx = postIndex
  8421. case 2:
  8422. if wireType != 2 {
  8423. return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType)
  8424. }
  8425. var byteLen int
  8426. for shift := uint(0); ; shift += 7 {
  8427. if shift >= 64 {
  8428. return ErrIntOverflowTypes
  8429. }
  8430. if iNdEx >= l {
  8431. return io.ErrUnexpectedEOF
  8432. }
  8433. b := dAtA[iNdEx]
  8434. iNdEx++
  8435. byteLen |= int(b&0x7F) << shift
  8436. if b < 0x80 {
  8437. break
  8438. }
  8439. }
  8440. if byteLen < 0 {
  8441. return ErrInvalidLengthTypes
  8442. }
  8443. postIndex := iNdEx + byteLen
  8444. if postIndex < 0 {
  8445. return ErrInvalidLengthTypes
  8446. }
  8447. if postIndex > l {
  8448. return io.ErrUnexpectedEOF
  8449. }
  8450. m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...)
  8451. if m.AppHash == nil {
  8452. m.AppHash = []byte{}
  8453. }
  8454. iNdEx = postIndex
  8455. default:
  8456. iNdEx = preIndex
  8457. skippy, err := skipTypes(dAtA[iNdEx:])
  8458. if err != nil {
  8459. return err
  8460. }
  8461. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8462. return ErrInvalidLengthTypes
  8463. }
  8464. if (iNdEx + skippy) > l {
  8465. return io.ErrUnexpectedEOF
  8466. }
  8467. iNdEx += skippy
  8468. }
  8469. }
  8470. if iNdEx > l {
  8471. return io.ErrUnexpectedEOF
  8472. }
  8473. return nil
  8474. }
  8475. func (m *RequestLoadSnapshotChunk) Unmarshal(dAtA []byte) error {
  8476. l := len(dAtA)
  8477. iNdEx := 0
  8478. for iNdEx < l {
  8479. preIndex := iNdEx
  8480. var wire uint64
  8481. for shift := uint(0); ; shift += 7 {
  8482. if shift >= 64 {
  8483. return ErrIntOverflowTypes
  8484. }
  8485. if iNdEx >= l {
  8486. return io.ErrUnexpectedEOF
  8487. }
  8488. b := dAtA[iNdEx]
  8489. iNdEx++
  8490. wire |= uint64(b&0x7F) << shift
  8491. if b < 0x80 {
  8492. break
  8493. }
  8494. }
  8495. fieldNum := int32(wire >> 3)
  8496. wireType := int(wire & 0x7)
  8497. if wireType == 4 {
  8498. return fmt.Errorf("proto: RequestLoadSnapshotChunk: wiretype end group for non-group")
  8499. }
  8500. if fieldNum <= 0 {
  8501. return fmt.Errorf("proto: RequestLoadSnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  8502. }
  8503. switch fieldNum {
  8504. case 1:
  8505. if wireType != 0 {
  8506. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  8507. }
  8508. m.Height = 0
  8509. for shift := uint(0); ; shift += 7 {
  8510. if shift >= 64 {
  8511. return ErrIntOverflowTypes
  8512. }
  8513. if iNdEx >= l {
  8514. return io.ErrUnexpectedEOF
  8515. }
  8516. b := dAtA[iNdEx]
  8517. iNdEx++
  8518. m.Height |= uint64(b&0x7F) << shift
  8519. if b < 0x80 {
  8520. break
  8521. }
  8522. }
  8523. case 2:
  8524. if wireType != 0 {
  8525. return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType)
  8526. }
  8527. m.Format = 0
  8528. for shift := uint(0); ; shift += 7 {
  8529. if shift >= 64 {
  8530. return ErrIntOverflowTypes
  8531. }
  8532. if iNdEx >= l {
  8533. return io.ErrUnexpectedEOF
  8534. }
  8535. b := dAtA[iNdEx]
  8536. iNdEx++
  8537. m.Format |= uint32(b&0x7F) << shift
  8538. if b < 0x80 {
  8539. break
  8540. }
  8541. }
  8542. case 3:
  8543. if wireType != 0 {
  8544. return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType)
  8545. }
  8546. m.Chunk = 0
  8547. for shift := uint(0); ; shift += 7 {
  8548. if shift >= 64 {
  8549. return ErrIntOverflowTypes
  8550. }
  8551. if iNdEx >= l {
  8552. return io.ErrUnexpectedEOF
  8553. }
  8554. b := dAtA[iNdEx]
  8555. iNdEx++
  8556. m.Chunk |= uint32(b&0x7F) << shift
  8557. if b < 0x80 {
  8558. break
  8559. }
  8560. }
  8561. default:
  8562. iNdEx = preIndex
  8563. skippy, err := skipTypes(dAtA[iNdEx:])
  8564. if err != nil {
  8565. return err
  8566. }
  8567. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8568. return ErrInvalidLengthTypes
  8569. }
  8570. if (iNdEx + skippy) > l {
  8571. return io.ErrUnexpectedEOF
  8572. }
  8573. iNdEx += skippy
  8574. }
  8575. }
  8576. if iNdEx > l {
  8577. return io.ErrUnexpectedEOF
  8578. }
  8579. return nil
  8580. }
  8581. func (m *RequestApplySnapshotChunk) Unmarshal(dAtA []byte) error {
  8582. l := len(dAtA)
  8583. iNdEx := 0
  8584. for iNdEx < l {
  8585. preIndex := iNdEx
  8586. var wire uint64
  8587. for shift := uint(0); ; shift += 7 {
  8588. if shift >= 64 {
  8589. return ErrIntOverflowTypes
  8590. }
  8591. if iNdEx >= l {
  8592. return io.ErrUnexpectedEOF
  8593. }
  8594. b := dAtA[iNdEx]
  8595. iNdEx++
  8596. wire |= uint64(b&0x7F) << shift
  8597. if b < 0x80 {
  8598. break
  8599. }
  8600. }
  8601. fieldNum := int32(wire >> 3)
  8602. wireType := int(wire & 0x7)
  8603. if wireType == 4 {
  8604. return fmt.Errorf("proto: RequestApplySnapshotChunk: wiretype end group for non-group")
  8605. }
  8606. if fieldNum <= 0 {
  8607. return fmt.Errorf("proto: RequestApplySnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  8608. }
  8609. switch fieldNum {
  8610. case 1:
  8611. if wireType != 0 {
  8612. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  8613. }
  8614. m.Index = 0
  8615. for shift := uint(0); ; shift += 7 {
  8616. if shift >= 64 {
  8617. return ErrIntOverflowTypes
  8618. }
  8619. if iNdEx >= l {
  8620. return io.ErrUnexpectedEOF
  8621. }
  8622. b := dAtA[iNdEx]
  8623. iNdEx++
  8624. m.Index |= uint32(b&0x7F) << shift
  8625. if b < 0x80 {
  8626. break
  8627. }
  8628. }
  8629. case 2:
  8630. if wireType != 2 {
  8631. return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType)
  8632. }
  8633. var byteLen int
  8634. for shift := uint(0); ; shift += 7 {
  8635. if shift >= 64 {
  8636. return ErrIntOverflowTypes
  8637. }
  8638. if iNdEx >= l {
  8639. return io.ErrUnexpectedEOF
  8640. }
  8641. b := dAtA[iNdEx]
  8642. iNdEx++
  8643. byteLen |= int(b&0x7F) << shift
  8644. if b < 0x80 {
  8645. break
  8646. }
  8647. }
  8648. if byteLen < 0 {
  8649. return ErrInvalidLengthTypes
  8650. }
  8651. postIndex := iNdEx + byteLen
  8652. if postIndex < 0 {
  8653. return ErrInvalidLengthTypes
  8654. }
  8655. if postIndex > l {
  8656. return io.ErrUnexpectedEOF
  8657. }
  8658. m.Chunk = append(m.Chunk[:0], dAtA[iNdEx:postIndex]...)
  8659. if m.Chunk == nil {
  8660. m.Chunk = []byte{}
  8661. }
  8662. iNdEx = postIndex
  8663. case 3:
  8664. if wireType != 2 {
  8665. return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType)
  8666. }
  8667. var stringLen uint64
  8668. for shift := uint(0); ; shift += 7 {
  8669. if shift >= 64 {
  8670. return ErrIntOverflowTypes
  8671. }
  8672. if iNdEx >= l {
  8673. return io.ErrUnexpectedEOF
  8674. }
  8675. b := dAtA[iNdEx]
  8676. iNdEx++
  8677. stringLen |= uint64(b&0x7F) << shift
  8678. if b < 0x80 {
  8679. break
  8680. }
  8681. }
  8682. intStringLen := int(stringLen)
  8683. if intStringLen < 0 {
  8684. return ErrInvalidLengthTypes
  8685. }
  8686. postIndex := iNdEx + intStringLen
  8687. if postIndex < 0 {
  8688. return ErrInvalidLengthTypes
  8689. }
  8690. if postIndex > l {
  8691. return io.ErrUnexpectedEOF
  8692. }
  8693. m.Sender = string(dAtA[iNdEx:postIndex])
  8694. iNdEx = postIndex
  8695. default:
  8696. iNdEx = preIndex
  8697. skippy, err := skipTypes(dAtA[iNdEx:])
  8698. if err != nil {
  8699. return err
  8700. }
  8701. if (skippy < 0) || (iNdEx+skippy) < 0 {
  8702. return ErrInvalidLengthTypes
  8703. }
  8704. if (iNdEx + skippy) > l {
  8705. return io.ErrUnexpectedEOF
  8706. }
  8707. iNdEx += skippy
  8708. }
  8709. }
  8710. if iNdEx > l {
  8711. return io.ErrUnexpectedEOF
  8712. }
  8713. return nil
  8714. }
  8715. func (m *Response) Unmarshal(dAtA []byte) error {
  8716. l := len(dAtA)
  8717. iNdEx := 0
  8718. for iNdEx < l {
  8719. preIndex := iNdEx
  8720. var wire uint64
  8721. for shift := uint(0); ; shift += 7 {
  8722. if shift >= 64 {
  8723. return ErrIntOverflowTypes
  8724. }
  8725. if iNdEx >= l {
  8726. return io.ErrUnexpectedEOF
  8727. }
  8728. b := dAtA[iNdEx]
  8729. iNdEx++
  8730. wire |= uint64(b&0x7F) << shift
  8731. if b < 0x80 {
  8732. break
  8733. }
  8734. }
  8735. fieldNum := int32(wire >> 3)
  8736. wireType := int(wire & 0x7)
  8737. if wireType == 4 {
  8738. return fmt.Errorf("proto: Response: wiretype end group for non-group")
  8739. }
  8740. if fieldNum <= 0 {
  8741. return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire)
  8742. }
  8743. switch fieldNum {
  8744. case 1:
  8745. if wireType != 2 {
  8746. return fmt.Errorf("proto: wrong wireType = %d for field Exception", wireType)
  8747. }
  8748. var msglen int
  8749. for shift := uint(0); ; shift += 7 {
  8750. if shift >= 64 {
  8751. return ErrIntOverflowTypes
  8752. }
  8753. if iNdEx >= l {
  8754. return io.ErrUnexpectedEOF
  8755. }
  8756. b := dAtA[iNdEx]
  8757. iNdEx++
  8758. msglen |= int(b&0x7F) << shift
  8759. if b < 0x80 {
  8760. break
  8761. }
  8762. }
  8763. if msglen < 0 {
  8764. return ErrInvalidLengthTypes
  8765. }
  8766. postIndex := iNdEx + msglen
  8767. if postIndex < 0 {
  8768. return ErrInvalidLengthTypes
  8769. }
  8770. if postIndex > l {
  8771. return io.ErrUnexpectedEOF
  8772. }
  8773. v := &ResponseException{}
  8774. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8775. return err
  8776. }
  8777. m.Value = &Response_Exception{v}
  8778. iNdEx = postIndex
  8779. case 2:
  8780. if wireType != 2 {
  8781. return fmt.Errorf("proto: wrong wireType = %d for field Echo", wireType)
  8782. }
  8783. var msglen int
  8784. for shift := uint(0); ; shift += 7 {
  8785. if shift >= 64 {
  8786. return ErrIntOverflowTypes
  8787. }
  8788. if iNdEx >= l {
  8789. return io.ErrUnexpectedEOF
  8790. }
  8791. b := dAtA[iNdEx]
  8792. iNdEx++
  8793. msglen |= int(b&0x7F) << shift
  8794. if b < 0x80 {
  8795. break
  8796. }
  8797. }
  8798. if msglen < 0 {
  8799. return ErrInvalidLengthTypes
  8800. }
  8801. postIndex := iNdEx + msglen
  8802. if postIndex < 0 {
  8803. return ErrInvalidLengthTypes
  8804. }
  8805. if postIndex > l {
  8806. return io.ErrUnexpectedEOF
  8807. }
  8808. v := &ResponseEcho{}
  8809. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8810. return err
  8811. }
  8812. m.Value = &Response_Echo{v}
  8813. iNdEx = postIndex
  8814. case 3:
  8815. if wireType != 2 {
  8816. return fmt.Errorf("proto: wrong wireType = %d for field Flush", wireType)
  8817. }
  8818. var msglen int
  8819. for shift := uint(0); ; shift += 7 {
  8820. if shift >= 64 {
  8821. return ErrIntOverflowTypes
  8822. }
  8823. if iNdEx >= l {
  8824. return io.ErrUnexpectedEOF
  8825. }
  8826. b := dAtA[iNdEx]
  8827. iNdEx++
  8828. msglen |= int(b&0x7F) << shift
  8829. if b < 0x80 {
  8830. break
  8831. }
  8832. }
  8833. if msglen < 0 {
  8834. return ErrInvalidLengthTypes
  8835. }
  8836. postIndex := iNdEx + msglen
  8837. if postIndex < 0 {
  8838. return ErrInvalidLengthTypes
  8839. }
  8840. if postIndex > l {
  8841. return io.ErrUnexpectedEOF
  8842. }
  8843. v := &ResponseFlush{}
  8844. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8845. return err
  8846. }
  8847. m.Value = &Response_Flush{v}
  8848. iNdEx = postIndex
  8849. case 4:
  8850. if wireType != 2 {
  8851. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  8852. }
  8853. var msglen int
  8854. for shift := uint(0); ; shift += 7 {
  8855. if shift >= 64 {
  8856. return ErrIntOverflowTypes
  8857. }
  8858. if iNdEx >= l {
  8859. return io.ErrUnexpectedEOF
  8860. }
  8861. b := dAtA[iNdEx]
  8862. iNdEx++
  8863. msglen |= int(b&0x7F) << shift
  8864. if b < 0x80 {
  8865. break
  8866. }
  8867. }
  8868. if msglen < 0 {
  8869. return ErrInvalidLengthTypes
  8870. }
  8871. postIndex := iNdEx + msglen
  8872. if postIndex < 0 {
  8873. return ErrInvalidLengthTypes
  8874. }
  8875. if postIndex > l {
  8876. return io.ErrUnexpectedEOF
  8877. }
  8878. v := &ResponseInfo{}
  8879. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8880. return err
  8881. }
  8882. m.Value = &Response_Info{v}
  8883. iNdEx = postIndex
  8884. case 5:
  8885. if wireType != 2 {
  8886. return fmt.Errorf("proto: wrong wireType = %d for field InitChain", wireType)
  8887. }
  8888. var msglen int
  8889. for shift := uint(0); ; shift += 7 {
  8890. if shift >= 64 {
  8891. return ErrIntOverflowTypes
  8892. }
  8893. if iNdEx >= l {
  8894. return io.ErrUnexpectedEOF
  8895. }
  8896. b := dAtA[iNdEx]
  8897. iNdEx++
  8898. msglen |= int(b&0x7F) << shift
  8899. if b < 0x80 {
  8900. break
  8901. }
  8902. }
  8903. if msglen < 0 {
  8904. return ErrInvalidLengthTypes
  8905. }
  8906. postIndex := iNdEx + msglen
  8907. if postIndex < 0 {
  8908. return ErrInvalidLengthTypes
  8909. }
  8910. if postIndex > l {
  8911. return io.ErrUnexpectedEOF
  8912. }
  8913. v := &ResponseInitChain{}
  8914. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8915. return err
  8916. }
  8917. m.Value = &Response_InitChain{v}
  8918. iNdEx = postIndex
  8919. case 6:
  8920. if wireType != 2 {
  8921. return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType)
  8922. }
  8923. var msglen int
  8924. for shift := uint(0); ; shift += 7 {
  8925. if shift >= 64 {
  8926. return ErrIntOverflowTypes
  8927. }
  8928. if iNdEx >= l {
  8929. return io.ErrUnexpectedEOF
  8930. }
  8931. b := dAtA[iNdEx]
  8932. iNdEx++
  8933. msglen |= int(b&0x7F) << shift
  8934. if b < 0x80 {
  8935. break
  8936. }
  8937. }
  8938. if msglen < 0 {
  8939. return ErrInvalidLengthTypes
  8940. }
  8941. postIndex := iNdEx + msglen
  8942. if postIndex < 0 {
  8943. return ErrInvalidLengthTypes
  8944. }
  8945. if postIndex > l {
  8946. return io.ErrUnexpectedEOF
  8947. }
  8948. v := &ResponseQuery{}
  8949. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8950. return err
  8951. }
  8952. m.Value = &Response_Query{v}
  8953. iNdEx = postIndex
  8954. case 7:
  8955. if wireType != 2 {
  8956. return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", wireType)
  8957. }
  8958. var msglen int
  8959. for shift := uint(0); ; shift += 7 {
  8960. if shift >= 64 {
  8961. return ErrIntOverflowTypes
  8962. }
  8963. if iNdEx >= l {
  8964. return io.ErrUnexpectedEOF
  8965. }
  8966. b := dAtA[iNdEx]
  8967. iNdEx++
  8968. msglen |= int(b&0x7F) << shift
  8969. if b < 0x80 {
  8970. break
  8971. }
  8972. }
  8973. if msglen < 0 {
  8974. return ErrInvalidLengthTypes
  8975. }
  8976. postIndex := iNdEx + msglen
  8977. if postIndex < 0 {
  8978. return ErrInvalidLengthTypes
  8979. }
  8980. if postIndex > l {
  8981. return io.ErrUnexpectedEOF
  8982. }
  8983. v := &ResponseBeginBlock{}
  8984. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8985. return err
  8986. }
  8987. m.Value = &Response_BeginBlock{v}
  8988. iNdEx = postIndex
  8989. case 8:
  8990. if wireType != 2 {
  8991. return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType)
  8992. }
  8993. var msglen int
  8994. for shift := uint(0); ; shift += 7 {
  8995. if shift >= 64 {
  8996. return ErrIntOverflowTypes
  8997. }
  8998. if iNdEx >= l {
  8999. return io.ErrUnexpectedEOF
  9000. }
  9001. b := dAtA[iNdEx]
  9002. iNdEx++
  9003. msglen |= int(b&0x7F) << shift
  9004. if b < 0x80 {
  9005. break
  9006. }
  9007. }
  9008. if msglen < 0 {
  9009. return ErrInvalidLengthTypes
  9010. }
  9011. postIndex := iNdEx + msglen
  9012. if postIndex < 0 {
  9013. return ErrInvalidLengthTypes
  9014. }
  9015. if postIndex > l {
  9016. return io.ErrUnexpectedEOF
  9017. }
  9018. v := &ResponseCheckTx{}
  9019. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9020. return err
  9021. }
  9022. m.Value = &Response_CheckTx{v}
  9023. iNdEx = postIndex
  9024. case 9:
  9025. if wireType != 2 {
  9026. return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", wireType)
  9027. }
  9028. var msglen int
  9029. for shift := uint(0); ; shift += 7 {
  9030. if shift >= 64 {
  9031. return ErrIntOverflowTypes
  9032. }
  9033. if iNdEx >= l {
  9034. return io.ErrUnexpectedEOF
  9035. }
  9036. b := dAtA[iNdEx]
  9037. iNdEx++
  9038. msglen |= int(b&0x7F) << shift
  9039. if b < 0x80 {
  9040. break
  9041. }
  9042. }
  9043. if msglen < 0 {
  9044. return ErrInvalidLengthTypes
  9045. }
  9046. postIndex := iNdEx + msglen
  9047. if postIndex < 0 {
  9048. return ErrInvalidLengthTypes
  9049. }
  9050. if postIndex > l {
  9051. return io.ErrUnexpectedEOF
  9052. }
  9053. v := &ResponseDeliverTx{}
  9054. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9055. return err
  9056. }
  9057. m.Value = &Response_DeliverTx{v}
  9058. iNdEx = postIndex
  9059. case 10:
  9060. if wireType != 2 {
  9061. return fmt.Errorf("proto: wrong wireType = %d for field EndBlock", wireType)
  9062. }
  9063. var msglen int
  9064. for shift := uint(0); ; shift += 7 {
  9065. if shift >= 64 {
  9066. return ErrIntOverflowTypes
  9067. }
  9068. if iNdEx >= l {
  9069. return io.ErrUnexpectedEOF
  9070. }
  9071. b := dAtA[iNdEx]
  9072. iNdEx++
  9073. msglen |= int(b&0x7F) << shift
  9074. if b < 0x80 {
  9075. break
  9076. }
  9077. }
  9078. if msglen < 0 {
  9079. return ErrInvalidLengthTypes
  9080. }
  9081. postIndex := iNdEx + msglen
  9082. if postIndex < 0 {
  9083. return ErrInvalidLengthTypes
  9084. }
  9085. if postIndex > l {
  9086. return io.ErrUnexpectedEOF
  9087. }
  9088. v := &ResponseEndBlock{}
  9089. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9090. return err
  9091. }
  9092. m.Value = &Response_EndBlock{v}
  9093. iNdEx = postIndex
  9094. case 11:
  9095. if wireType != 2 {
  9096. return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType)
  9097. }
  9098. var msglen int
  9099. for shift := uint(0); ; shift += 7 {
  9100. if shift >= 64 {
  9101. return ErrIntOverflowTypes
  9102. }
  9103. if iNdEx >= l {
  9104. return io.ErrUnexpectedEOF
  9105. }
  9106. b := dAtA[iNdEx]
  9107. iNdEx++
  9108. msglen |= int(b&0x7F) << shift
  9109. if b < 0x80 {
  9110. break
  9111. }
  9112. }
  9113. if msglen < 0 {
  9114. return ErrInvalidLengthTypes
  9115. }
  9116. postIndex := iNdEx + msglen
  9117. if postIndex < 0 {
  9118. return ErrInvalidLengthTypes
  9119. }
  9120. if postIndex > l {
  9121. return io.ErrUnexpectedEOF
  9122. }
  9123. v := &ResponseCommit{}
  9124. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9125. return err
  9126. }
  9127. m.Value = &Response_Commit{v}
  9128. iNdEx = postIndex
  9129. case 12:
  9130. if wireType != 2 {
  9131. return fmt.Errorf("proto: wrong wireType = %d for field ListSnapshots", wireType)
  9132. }
  9133. var msglen int
  9134. for shift := uint(0); ; shift += 7 {
  9135. if shift >= 64 {
  9136. return ErrIntOverflowTypes
  9137. }
  9138. if iNdEx >= l {
  9139. return io.ErrUnexpectedEOF
  9140. }
  9141. b := dAtA[iNdEx]
  9142. iNdEx++
  9143. msglen |= int(b&0x7F) << shift
  9144. if b < 0x80 {
  9145. break
  9146. }
  9147. }
  9148. if msglen < 0 {
  9149. return ErrInvalidLengthTypes
  9150. }
  9151. postIndex := iNdEx + msglen
  9152. if postIndex < 0 {
  9153. return ErrInvalidLengthTypes
  9154. }
  9155. if postIndex > l {
  9156. return io.ErrUnexpectedEOF
  9157. }
  9158. v := &ResponseListSnapshots{}
  9159. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9160. return err
  9161. }
  9162. m.Value = &Response_ListSnapshots{v}
  9163. iNdEx = postIndex
  9164. case 13:
  9165. if wireType != 2 {
  9166. return fmt.Errorf("proto: wrong wireType = %d for field OfferSnapshot", wireType)
  9167. }
  9168. var msglen int
  9169. for shift := uint(0); ; shift += 7 {
  9170. if shift >= 64 {
  9171. return ErrIntOverflowTypes
  9172. }
  9173. if iNdEx >= l {
  9174. return io.ErrUnexpectedEOF
  9175. }
  9176. b := dAtA[iNdEx]
  9177. iNdEx++
  9178. msglen |= int(b&0x7F) << shift
  9179. if b < 0x80 {
  9180. break
  9181. }
  9182. }
  9183. if msglen < 0 {
  9184. return ErrInvalidLengthTypes
  9185. }
  9186. postIndex := iNdEx + msglen
  9187. if postIndex < 0 {
  9188. return ErrInvalidLengthTypes
  9189. }
  9190. if postIndex > l {
  9191. return io.ErrUnexpectedEOF
  9192. }
  9193. v := &ResponseOfferSnapshot{}
  9194. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9195. return err
  9196. }
  9197. m.Value = &Response_OfferSnapshot{v}
  9198. iNdEx = postIndex
  9199. case 14:
  9200. if wireType != 2 {
  9201. return fmt.Errorf("proto: wrong wireType = %d for field LoadSnapshotChunk", wireType)
  9202. }
  9203. var msglen int
  9204. for shift := uint(0); ; shift += 7 {
  9205. if shift >= 64 {
  9206. return ErrIntOverflowTypes
  9207. }
  9208. if iNdEx >= l {
  9209. return io.ErrUnexpectedEOF
  9210. }
  9211. b := dAtA[iNdEx]
  9212. iNdEx++
  9213. msglen |= int(b&0x7F) << shift
  9214. if b < 0x80 {
  9215. break
  9216. }
  9217. }
  9218. if msglen < 0 {
  9219. return ErrInvalidLengthTypes
  9220. }
  9221. postIndex := iNdEx + msglen
  9222. if postIndex < 0 {
  9223. return ErrInvalidLengthTypes
  9224. }
  9225. if postIndex > l {
  9226. return io.ErrUnexpectedEOF
  9227. }
  9228. v := &ResponseLoadSnapshotChunk{}
  9229. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9230. return err
  9231. }
  9232. m.Value = &Response_LoadSnapshotChunk{v}
  9233. iNdEx = postIndex
  9234. case 15:
  9235. if wireType != 2 {
  9236. return fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", wireType)
  9237. }
  9238. var msglen int
  9239. for shift := uint(0); ; shift += 7 {
  9240. if shift >= 64 {
  9241. return ErrIntOverflowTypes
  9242. }
  9243. if iNdEx >= l {
  9244. return io.ErrUnexpectedEOF
  9245. }
  9246. b := dAtA[iNdEx]
  9247. iNdEx++
  9248. msglen |= int(b&0x7F) << shift
  9249. if b < 0x80 {
  9250. break
  9251. }
  9252. }
  9253. if msglen < 0 {
  9254. return ErrInvalidLengthTypes
  9255. }
  9256. postIndex := iNdEx + msglen
  9257. if postIndex < 0 {
  9258. return ErrInvalidLengthTypes
  9259. }
  9260. if postIndex > l {
  9261. return io.ErrUnexpectedEOF
  9262. }
  9263. v := &ResponseApplySnapshotChunk{}
  9264. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9265. return err
  9266. }
  9267. m.Value = &Response_ApplySnapshotChunk{v}
  9268. iNdEx = postIndex
  9269. default:
  9270. iNdEx = preIndex
  9271. skippy, err := skipTypes(dAtA[iNdEx:])
  9272. if err != nil {
  9273. return err
  9274. }
  9275. if (skippy < 0) || (iNdEx+skippy) < 0 {
  9276. return ErrInvalidLengthTypes
  9277. }
  9278. if (iNdEx + skippy) > l {
  9279. return io.ErrUnexpectedEOF
  9280. }
  9281. iNdEx += skippy
  9282. }
  9283. }
  9284. if iNdEx > l {
  9285. return io.ErrUnexpectedEOF
  9286. }
  9287. return nil
  9288. }
  9289. func (m *ResponseException) Unmarshal(dAtA []byte) error {
  9290. l := len(dAtA)
  9291. iNdEx := 0
  9292. for iNdEx < l {
  9293. preIndex := iNdEx
  9294. var wire uint64
  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. wire |= uint64(b&0x7F) << shift
  9305. if b < 0x80 {
  9306. break
  9307. }
  9308. }
  9309. fieldNum := int32(wire >> 3)
  9310. wireType := int(wire & 0x7)
  9311. if wireType == 4 {
  9312. return fmt.Errorf("proto: ResponseException: wiretype end group for non-group")
  9313. }
  9314. if fieldNum <= 0 {
  9315. return fmt.Errorf("proto: ResponseException: illegal tag %d (wire type %d)", fieldNum, wire)
  9316. }
  9317. switch fieldNum {
  9318. case 1:
  9319. if wireType != 2 {
  9320. return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
  9321. }
  9322. var stringLen uint64
  9323. for shift := uint(0); ; shift += 7 {
  9324. if shift >= 64 {
  9325. return ErrIntOverflowTypes
  9326. }
  9327. if iNdEx >= l {
  9328. return io.ErrUnexpectedEOF
  9329. }
  9330. b := dAtA[iNdEx]
  9331. iNdEx++
  9332. stringLen |= uint64(b&0x7F) << shift
  9333. if b < 0x80 {
  9334. break
  9335. }
  9336. }
  9337. intStringLen := int(stringLen)
  9338. if intStringLen < 0 {
  9339. return ErrInvalidLengthTypes
  9340. }
  9341. postIndex := iNdEx + intStringLen
  9342. if postIndex < 0 {
  9343. return ErrInvalidLengthTypes
  9344. }
  9345. if postIndex > l {
  9346. return io.ErrUnexpectedEOF
  9347. }
  9348. m.Error = string(dAtA[iNdEx:postIndex])
  9349. iNdEx = postIndex
  9350. default:
  9351. iNdEx = preIndex
  9352. skippy, err := skipTypes(dAtA[iNdEx:])
  9353. if err != nil {
  9354. return err
  9355. }
  9356. if (skippy < 0) || (iNdEx+skippy) < 0 {
  9357. return ErrInvalidLengthTypes
  9358. }
  9359. if (iNdEx + skippy) > l {
  9360. return io.ErrUnexpectedEOF
  9361. }
  9362. iNdEx += skippy
  9363. }
  9364. }
  9365. if iNdEx > l {
  9366. return io.ErrUnexpectedEOF
  9367. }
  9368. return nil
  9369. }
  9370. func (m *ResponseEcho) Unmarshal(dAtA []byte) error {
  9371. l := len(dAtA)
  9372. iNdEx := 0
  9373. for iNdEx < l {
  9374. preIndex := iNdEx
  9375. var wire uint64
  9376. for shift := uint(0); ; shift += 7 {
  9377. if shift >= 64 {
  9378. return ErrIntOverflowTypes
  9379. }
  9380. if iNdEx >= l {
  9381. return io.ErrUnexpectedEOF
  9382. }
  9383. b := dAtA[iNdEx]
  9384. iNdEx++
  9385. wire |= uint64(b&0x7F) << shift
  9386. if b < 0x80 {
  9387. break
  9388. }
  9389. }
  9390. fieldNum := int32(wire >> 3)
  9391. wireType := int(wire & 0x7)
  9392. if wireType == 4 {
  9393. return fmt.Errorf("proto: ResponseEcho: wiretype end group for non-group")
  9394. }
  9395. if fieldNum <= 0 {
  9396. return fmt.Errorf("proto: ResponseEcho: illegal tag %d (wire type %d)", fieldNum, wire)
  9397. }
  9398. switch fieldNum {
  9399. case 1:
  9400. if wireType != 2 {
  9401. return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
  9402. }
  9403. var stringLen uint64
  9404. for shift := uint(0); ; shift += 7 {
  9405. if shift >= 64 {
  9406. return ErrIntOverflowTypes
  9407. }
  9408. if iNdEx >= l {
  9409. return io.ErrUnexpectedEOF
  9410. }
  9411. b := dAtA[iNdEx]
  9412. iNdEx++
  9413. stringLen |= uint64(b&0x7F) << shift
  9414. if b < 0x80 {
  9415. break
  9416. }
  9417. }
  9418. intStringLen := int(stringLen)
  9419. if intStringLen < 0 {
  9420. return ErrInvalidLengthTypes
  9421. }
  9422. postIndex := iNdEx + intStringLen
  9423. if postIndex < 0 {
  9424. return ErrInvalidLengthTypes
  9425. }
  9426. if postIndex > l {
  9427. return io.ErrUnexpectedEOF
  9428. }
  9429. m.Message = string(dAtA[iNdEx:postIndex])
  9430. iNdEx = postIndex
  9431. default:
  9432. iNdEx = preIndex
  9433. skippy, err := skipTypes(dAtA[iNdEx:])
  9434. if err != nil {
  9435. return err
  9436. }
  9437. if (skippy < 0) || (iNdEx+skippy) < 0 {
  9438. return ErrInvalidLengthTypes
  9439. }
  9440. if (iNdEx + skippy) > l {
  9441. return io.ErrUnexpectedEOF
  9442. }
  9443. iNdEx += skippy
  9444. }
  9445. }
  9446. if iNdEx > l {
  9447. return io.ErrUnexpectedEOF
  9448. }
  9449. return nil
  9450. }
  9451. func (m *ResponseFlush) Unmarshal(dAtA []byte) error {
  9452. l := len(dAtA)
  9453. iNdEx := 0
  9454. for iNdEx < l {
  9455. preIndex := iNdEx
  9456. var wire uint64
  9457. for shift := uint(0); ; shift += 7 {
  9458. if shift >= 64 {
  9459. return ErrIntOverflowTypes
  9460. }
  9461. if iNdEx >= l {
  9462. return io.ErrUnexpectedEOF
  9463. }
  9464. b := dAtA[iNdEx]
  9465. iNdEx++
  9466. wire |= uint64(b&0x7F) << shift
  9467. if b < 0x80 {
  9468. break
  9469. }
  9470. }
  9471. fieldNum := int32(wire >> 3)
  9472. wireType := int(wire & 0x7)
  9473. if wireType == 4 {
  9474. return fmt.Errorf("proto: ResponseFlush: wiretype end group for non-group")
  9475. }
  9476. if fieldNum <= 0 {
  9477. return fmt.Errorf("proto: ResponseFlush: illegal tag %d (wire type %d)", fieldNum, wire)
  9478. }
  9479. switch fieldNum {
  9480. default:
  9481. iNdEx = preIndex
  9482. skippy, err := skipTypes(dAtA[iNdEx:])
  9483. if err != nil {
  9484. return err
  9485. }
  9486. if (skippy < 0) || (iNdEx+skippy) < 0 {
  9487. return ErrInvalidLengthTypes
  9488. }
  9489. if (iNdEx + skippy) > l {
  9490. return io.ErrUnexpectedEOF
  9491. }
  9492. iNdEx += skippy
  9493. }
  9494. }
  9495. if iNdEx > l {
  9496. return io.ErrUnexpectedEOF
  9497. }
  9498. return nil
  9499. }
  9500. func (m *ResponseInfo) Unmarshal(dAtA []byte) error {
  9501. l := len(dAtA)
  9502. iNdEx := 0
  9503. for iNdEx < l {
  9504. preIndex := iNdEx
  9505. var wire uint64
  9506. for shift := uint(0); ; shift += 7 {
  9507. if shift >= 64 {
  9508. return ErrIntOverflowTypes
  9509. }
  9510. if iNdEx >= l {
  9511. return io.ErrUnexpectedEOF
  9512. }
  9513. b := dAtA[iNdEx]
  9514. iNdEx++
  9515. wire |= uint64(b&0x7F) << shift
  9516. if b < 0x80 {
  9517. break
  9518. }
  9519. }
  9520. fieldNum := int32(wire >> 3)
  9521. wireType := int(wire & 0x7)
  9522. if wireType == 4 {
  9523. return fmt.Errorf("proto: ResponseInfo: wiretype end group for non-group")
  9524. }
  9525. if fieldNum <= 0 {
  9526. return fmt.Errorf("proto: ResponseInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  9527. }
  9528. switch fieldNum {
  9529. case 1:
  9530. if wireType != 2 {
  9531. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  9532. }
  9533. var stringLen uint64
  9534. for shift := uint(0); ; shift += 7 {
  9535. if shift >= 64 {
  9536. return ErrIntOverflowTypes
  9537. }
  9538. if iNdEx >= l {
  9539. return io.ErrUnexpectedEOF
  9540. }
  9541. b := dAtA[iNdEx]
  9542. iNdEx++
  9543. stringLen |= uint64(b&0x7F) << shift
  9544. if b < 0x80 {
  9545. break
  9546. }
  9547. }
  9548. intStringLen := int(stringLen)
  9549. if intStringLen < 0 {
  9550. return ErrInvalidLengthTypes
  9551. }
  9552. postIndex := iNdEx + intStringLen
  9553. if postIndex < 0 {
  9554. return ErrInvalidLengthTypes
  9555. }
  9556. if postIndex > l {
  9557. return io.ErrUnexpectedEOF
  9558. }
  9559. m.Data = string(dAtA[iNdEx:postIndex])
  9560. iNdEx = postIndex
  9561. case 2:
  9562. if wireType != 2 {
  9563. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  9564. }
  9565. var stringLen uint64
  9566. for shift := uint(0); ; shift += 7 {
  9567. if shift >= 64 {
  9568. return ErrIntOverflowTypes
  9569. }
  9570. if iNdEx >= l {
  9571. return io.ErrUnexpectedEOF
  9572. }
  9573. b := dAtA[iNdEx]
  9574. iNdEx++
  9575. stringLen |= uint64(b&0x7F) << shift
  9576. if b < 0x80 {
  9577. break
  9578. }
  9579. }
  9580. intStringLen := int(stringLen)
  9581. if intStringLen < 0 {
  9582. return ErrInvalidLengthTypes
  9583. }
  9584. postIndex := iNdEx + intStringLen
  9585. if postIndex < 0 {
  9586. return ErrInvalidLengthTypes
  9587. }
  9588. if postIndex > l {
  9589. return io.ErrUnexpectedEOF
  9590. }
  9591. m.Version = string(dAtA[iNdEx:postIndex])
  9592. iNdEx = postIndex
  9593. case 3:
  9594. if wireType != 0 {
  9595. return fmt.Errorf("proto: wrong wireType = %d for field AppVersion", wireType)
  9596. }
  9597. m.AppVersion = 0
  9598. for shift := uint(0); ; shift += 7 {
  9599. if shift >= 64 {
  9600. return ErrIntOverflowTypes
  9601. }
  9602. if iNdEx >= l {
  9603. return io.ErrUnexpectedEOF
  9604. }
  9605. b := dAtA[iNdEx]
  9606. iNdEx++
  9607. m.AppVersion |= uint64(b&0x7F) << shift
  9608. if b < 0x80 {
  9609. break
  9610. }
  9611. }
  9612. case 4:
  9613. if wireType != 0 {
  9614. return fmt.Errorf("proto: wrong wireType = %d for field LastBlockHeight", wireType)
  9615. }
  9616. m.LastBlockHeight = 0
  9617. for shift := uint(0); ; shift += 7 {
  9618. if shift >= 64 {
  9619. return ErrIntOverflowTypes
  9620. }
  9621. if iNdEx >= l {
  9622. return io.ErrUnexpectedEOF
  9623. }
  9624. b := dAtA[iNdEx]
  9625. iNdEx++
  9626. m.LastBlockHeight |= int64(b&0x7F) << shift
  9627. if b < 0x80 {
  9628. break
  9629. }
  9630. }
  9631. case 5:
  9632. if wireType != 2 {
  9633. return fmt.Errorf("proto: wrong wireType = %d for field LastBlockAppHash", wireType)
  9634. }
  9635. var byteLen int
  9636. for shift := uint(0); ; shift += 7 {
  9637. if shift >= 64 {
  9638. return ErrIntOverflowTypes
  9639. }
  9640. if iNdEx >= l {
  9641. return io.ErrUnexpectedEOF
  9642. }
  9643. b := dAtA[iNdEx]
  9644. iNdEx++
  9645. byteLen |= int(b&0x7F) << shift
  9646. if b < 0x80 {
  9647. break
  9648. }
  9649. }
  9650. if byteLen < 0 {
  9651. return ErrInvalidLengthTypes
  9652. }
  9653. postIndex := iNdEx + byteLen
  9654. if postIndex < 0 {
  9655. return ErrInvalidLengthTypes
  9656. }
  9657. if postIndex > l {
  9658. return io.ErrUnexpectedEOF
  9659. }
  9660. m.LastBlockAppHash = append(m.LastBlockAppHash[:0], dAtA[iNdEx:postIndex]...)
  9661. if m.LastBlockAppHash == nil {
  9662. m.LastBlockAppHash = []byte{}
  9663. }
  9664. iNdEx = postIndex
  9665. default:
  9666. iNdEx = preIndex
  9667. skippy, err := skipTypes(dAtA[iNdEx:])
  9668. if err != nil {
  9669. return err
  9670. }
  9671. if (skippy < 0) || (iNdEx+skippy) < 0 {
  9672. return ErrInvalidLengthTypes
  9673. }
  9674. if (iNdEx + skippy) > l {
  9675. return io.ErrUnexpectedEOF
  9676. }
  9677. iNdEx += skippy
  9678. }
  9679. }
  9680. if iNdEx > l {
  9681. return io.ErrUnexpectedEOF
  9682. }
  9683. return nil
  9684. }
  9685. func (m *ResponseInitChain) Unmarshal(dAtA []byte) error {
  9686. l := len(dAtA)
  9687. iNdEx := 0
  9688. for iNdEx < l {
  9689. preIndex := iNdEx
  9690. var wire uint64
  9691. for shift := uint(0); ; shift += 7 {
  9692. if shift >= 64 {
  9693. return ErrIntOverflowTypes
  9694. }
  9695. if iNdEx >= l {
  9696. return io.ErrUnexpectedEOF
  9697. }
  9698. b := dAtA[iNdEx]
  9699. iNdEx++
  9700. wire |= uint64(b&0x7F) << shift
  9701. if b < 0x80 {
  9702. break
  9703. }
  9704. }
  9705. fieldNum := int32(wire >> 3)
  9706. wireType := int(wire & 0x7)
  9707. if wireType == 4 {
  9708. return fmt.Errorf("proto: ResponseInitChain: wiretype end group for non-group")
  9709. }
  9710. if fieldNum <= 0 {
  9711. return fmt.Errorf("proto: ResponseInitChain: illegal tag %d (wire type %d)", fieldNum, wire)
  9712. }
  9713. switch fieldNum {
  9714. case 1:
  9715. if wireType != 2 {
  9716. return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", wireType)
  9717. }
  9718. var msglen int
  9719. for shift := uint(0); ; shift += 7 {
  9720. if shift >= 64 {
  9721. return ErrIntOverflowTypes
  9722. }
  9723. if iNdEx >= l {
  9724. return io.ErrUnexpectedEOF
  9725. }
  9726. b := dAtA[iNdEx]
  9727. iNdEx++
  9728. msglen |= int(b&0x7F) << shift
  9729. if b < 0x80 {
  9730. break
  9731. }
  9732. }
  9733. if msglen < 0 {
  9734. return ErrInvalidLengthTypes
  9735. }
  9736. postIndex := iNdEx + msglen
  9737. if postIndex < 0 {
  9738. return ErrInvalidLengthTypes
  9739. }
  9740. if postIndex > l {
  9741. return io.ErrUnexpectedEOF
  9742. }
  9743. if m.ConsensusParams == nil {
  9744. m.ConsensusParams = &types1.ConsensusParams{}
  9745. }
  9746. if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9747. return err
  9748. }
  9749. iNdEx = postIndex
  9750. case 2:
  9751. if wireType != 2 {
  9752. return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType)
  9753. }
  9754. var msglen int
  9755. for shift := uint(0); ; shift += 7 {
  9756. if shift >= 64 {
  9757. return ErrIntOverflowTypes
  9758. }
  9759. if iNdEx >= l {
  9760. return io.ErrUnexpectedEOF
  9761. }
  9762. b := dAtA[iNdEx]
  9763. iNdEx++
  9764. msglen |= int(b&0x7F) << shift
  9765. if b < 0x80 {
  9766. break
  9767. }
  9768. }
  9769. if msglen < 0 {
  9770. return ErrInvalidLengthTypes
  9771. }
  9772. postIndex := iNdEx + msglen
  9773. if postIndex < 0 {
  9774. return ErrInvalidLengthTypes
  9775. }
  9776. if postIndex > l {
  9777. return io.ErrUnexpectedEOF
  9778. }
  9779. m.Validators = append(m.Validators, ValidatorUpdate{})
  9780. if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9781. return err
  9782. }
  9783. iNdEx = postIndex
  9784. case 3:
  9785. if wireType != 2 {
  9786. return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType)
  9787. }
  9788. var byteLen int
  9789. for shift := uint(0); ; shift += 7 {
  9790. if shift >= 64 {
  9791. return ErrIntOverflowTypes
  9792. }
  9793. if iNdEx >= l {
  9794. return io.ErrUnexpectedEOF
  9795. }
  9796. b := dAtA[iNdEx]
  9797. iNdEx++
  9798. byteLen |= int(b&0x7F) << shift
  9799. if b < 0x80 {
  9800. break
  9801. }
  9802. }
  9803. if byteLen < 0 {
  9804. return ErrInvalidLengthTypes
  9805. }
  9806. postIndex := iNdEx + byteLen
  9807. if postIndex < 0 {
  9808. return ErrInvalidLengthTypes
  9809. }
  9810. if postIndex > l {
  9811. return io.ErrUnexpectedEOF
  9812. }
  9813. m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...)
  9814. if m.AppHash == nil {
  9815. m.AppHash = []byte{}
  9816. }
  9817. iNdEx = postIndex
  9818. default:
  9819. iNdEx = preIndex
  9820. skippy, err := skipTypes(dAtA[iNdEx:])
  9821. if err != nil {
  9822. return err
  9823. }
  9824. if (skippy < 0) || (iNdEx+skippy) < 0 {
  9825. return ErrInvalidLengthTypes
  9826. }
  9827. if (iNdEx + skippy) > l {
  9828. return io.ErrUnexpectedEOF
  9829. }
  9830. iNdEx += skippy
  9831. }
  9832. }
  9833. if iNdEx > l {
  9834. return io.ErrUnexpectedEOF
  9835. }
  9836. return nil
  9837. }
  9838. func (m *ResponseQuery) Unmarshal(dAtA []byte) error {
  9839. l := len(dAtA)
  9840. iNdEx := 0
  9841. for iNdEx < l {
  9842. preIndex := iNdEx
  9843. var wire uint64
  9844. for shift := uint(0); ; shift += 7 {
  9845. if shift >= 64 {
  9846. return ErrIntOverflowTypes
  9847. }
  9848. if iNdEx >= l {
  9849. return io.ErrUnexpectedEOF
  9850. }
  9851. b := dAtA[iNdEx]
  9852. iNdEx++
  9853. wire |= uint64(b&0x7F) << shift
  9854. if b < 0x80 {
  9855. break
  9856. }
  9857. }
  9858. fieldNum := int32(wire >> 3)
  9859. wireType := int(wire & 0x7)
  9860. if wireType == 4 {
  9861. return fmt.Errorf("proto: ResponseQuery: wiretype end group for non-group")
  9862. }
  9863. if fieldNum <= 0 {
  9864. return fmt.Errorf("proto: ResponseQuery: illegal tag %d (wire type %d)", fieldNum, wire)
  9865. }
  9866. switch fieldNum {
  9867. case 1:
  9868. if wireType != 0 {
  9869. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  9870. }
  9871. m.Code = 0
  9872. for shift := uint(0); ; shift += 7 {
  9873. if shift >= 64 {
  9874. return ErrIntOverflowTypes
  9875. }
  9876. if iNdEx >= l {
  9877. return io.ErrUnexpectedEOF
  9878. }
  9879. b := dAtA[iNdEx]
  9880. iNdEx++
  9881. m.Code |= uint32(b&0x7F) << shift
  9882. if b < 0x80 {
  9883. break
  9884. }
  9885. }
  9886. case 3:
  9887. if wireType != 2 {
  9888. return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType)
  9889. }
  9890. var stringLen uint64
  9891. for shift := uint(0); ; shift += 7 {
  9892. if shift >= 64 {
  9893. return ErrIntOverflowTypes
  9894. }
  9895. if iNdEx >= l {
  9896. return io.ErrUnexpectedEOF
  9897. }
  9898. b := dAtA[iNdEx]
  9899. iNdEx++
  9900. stringLen |= uint64(b&0x7F) << shift
  9901. if b < 0x80 {
  9902. break
  9903. }
  9904. }
  9905. intStringLen := int(stringLen)
  9906. if intStringLen < 0 {
  9907. return ErrInvalidLengthTypes
  9908. }
  9909. postIndex := iNdEx + intStringLen
  9910. if postIndex < 0 {
  9911. return ErrInvalidLengthTypes
  9912. }
  9913. if postIndex > l {
  9914. return io.ErrUnexpectedEOF
  9915. }
  9916. m.Log = string(dAtA[iNdEx:postIndex])
  9917. iNdEx = postIndex
  9918. case 4:
  9919. if wireType != 2 {
  9920. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  9921. }
  9922. var stringLen uint64
  9923. for shift := uint(0); ; shift += 7 {
  9924. if shift >= 64 {
  9925. return ErrIntOverflowTypes
  9926. }
  9927. if iNdEx >= l {
  9928. return io.ErrUnexpectedEOF
  9929. }
  9930. b := dAtA[iNdEx]
  9931. iNdEx++
  9932. stringLen |= uint64(b&0x7F) << shift
  9933. if b < 0x80 {
  9934. break
  9935. }
  9936. }
  9937. intStringLen := int(stringLen)
  9938. if intStringLen < 0 {
  9939. return ErrInvalidLengthTypes
  9940. }
  9941. postIndex := iNdEx + intStringLen
  9942. if postIndex < 0 {
  9943. return ErrInvalidLengthTypes
  9944. }
  9945. if postIndex > l {
  9946. return io.ErrUnexpectedEOF
  9947. }
  9948. m.Info = string(dAtA[iNdEx:postIndex])
  9949. iNdEx = postIndex
  9950. case 5:
  9951. if wireType != 0 {
  9952. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  9953. }
  9954. m.Index = 0
  9955. for shift := uint(0); ; shift += 7 {
  9956. if shift >= 64 {
  9957. return ErrIntOverflowTypes
  9958. }
  9959. if iNdEx >= l {
  9960. return io.ErrUnexpectedEOF
  9961. }
  9962. b := dAtA[iNdEx]
  9963. iNdEx++
  9964. m.Index |= int64(b&0x7F) << shift
  9965. if b < 0x80 {
  9966. break
  9967. }
  9968. }
  9969. case 6:
  9970. if wireType != 2 {
  9971. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  9972. }
  9973. var byteLen int
  9974. for shift := uint(0); ; shift += 7 {
  9975. if shift >= 64 {
  9976. return ErrIntOverflowTypes
  9977. }
  9978. if iNdEx >= l {
  9979. return io.ErrUnexpectedEOF
  9980. }
  9981. b := dAtA[iNdEx]
  9982. iNdEx++
  9983. byteLen |= int(b&0x7F) << shift
  9984. if b < 0x80 {
  9985. break
  9986. }
  9987. }
  9988. if byteLen < 0 {
  9989. return ErrInvalidLengthTypes
  9990. }
  9991. postIndex := iNdEx + byteLen
  9992. if postIndex < 0 {
  9993. return ErrInvalidLengthTypes
  9994. }
  9995. if postIndex > l {
  9996. return io.ErrUnexpectedEOF
  9997. }
  9998. m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
  9999. if m.Key == nil {
  10000. m.Key = []byte{}
  10001. }
  10002. iNdEx = postIndex
  10003. case 7:
  10004. if wireType != 2 {
  10005. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  10006. }
  10007. var byteLen int
  10008. for shift := uint(0); ; shift += 7 {
  10009. if shift >= 64 {
  10010. return ErrIntOverflowTypes
  10011. }
  10012. if iNdEx >= l {
  10013. return io.ErrUnexpectedEOF
  10014. }
  10015. b := dAtA[iNdEx]
  10016. iNdEx++
  10017. byteLen |= int(b&0x7F) << shift
  10018. if b < 0x80 {
  10019. break
  10020. }
  10021. }
  10022. if byteLen < 0 {
  10023. return ErrInvalidLengthTypes
  10024. }
  10025. postIndex := iNdEx + byteLen
  10026. if postIndex < 0 {
  10027. return ErrInvalidLengthTypes
  10028. }
  10029. if postIndex > l {
  10030. return io.ErrUnexpectedEOF
  10031. }
  10032. m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...)
  10033. if m.Value == nil {
  10034. m.Value = []byte{}
  10035. }
  10036. iNdEx = postIndex
  10037. case 8:
  10038. if wireType != 2 {
  10039. return fmt.Errorf("proto: wrong wireType = %d for field ProofOps", wireType)
  10040. }
  10041. var msglen int
  10042. for shift := uint(0); ; shift += 7 {
  10043. if shift >= 64 {
  10044. return ErrIntOverflowTypes
  10045. }
  10046. if iNdEx >= l {
  10047. return io.ErrUnexpectedEOF
  10048. }
  10049. b := dAtA[iNdEx]
  10050. iNdEx++
  10051. msglen |= int(b&0x7F) << shift
  10052. if b < 0x80 {
  10053. break
  10054. }
  10055. }
  10056. if msglen < 0 {
  10057. return ErrInvalidLengthTypes
  10058. }
  10059. postIndex := iNdEx + msglen
  10060. if postIndex < 0 {
  10061. return ErrInvalidLengthTypes
  10062. }
  10063. if postIndex > l {
  10064. return io.ErrUnexpectedEOF
  10065. }
  10066. if m.ProofOps == nil {
  10067. m.ProofOps = &crypto.ProofOps{}
  10068. }
  10069. if err := m.ProofOps.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10070. return err
  10071. }
  10072. iNdEx = postIndex
  10073. case 9:
  10074. if wireType != 0 {
  10075. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  10076. }
  10077. m.Height = 0
  10078. for shift := uint(0); ; shift += 7 {
  10079. if shift >= 64 {
  10080. return ErrIntOverflowTypes
  10081. }
  10082. if iNdEx >= l {
  10083. return io.ErrUnexpectedEOF
  10084. }
  10085. b := dAtA[iNdEx]
  10086. iNdEx++
  10087. m.Height |= int64(b&0x7F) << shift
  10088. if b < 0x80 {
  10089. break
  10090. }
  10091. }
  10092. case 10:
  10093. if wireType != 2 {
  10094. return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType)
  10095. }
  10096. var stringLen uint64
  10097. for shift := uint(0); ; shift += 7 {
  10098. if shift >= 64 {
  10099. return ErrIntOverflowTypes
  10100. }
  10101. if iNdEx >= l {
  10102. return io.ErrUnexpectedEOF
  10103. }
  10104. b := dAtA[iNdEx]
  10105. iNdEx++
  10106. stringLen |= uint64(b&0x7F) << shift
  10107. if b < 0x80 {
  10108. break
  10109. }
  10110. }
  10111. intStringLen := int(stringLen)
  10112. if intStringLen < 0 {
  10113. return ErrInvalidLengthTypes
  10114. }
  10115. postIndex := iNdEx + intStringLen
  10116. if postIndex < 0 {
  10117. return ErrInvalidLengthTypes
  10118. }
  10119. if postIndex > l {
  10120. return io.ErrUnexpectedEOF
  10121. }
  10122. m.Codespace = string(dAtA[iNdEx:postIndex])
  10123. iNdEx = postIndex
  10124. default:
  10125. iNdEx = preIndex
  10126. skippy, err := skipTypes(dAtA[iNdEx:])
  10127. if err != nil {
  10128. return err
  10129. }
  10130. if (skippy < 0) || (iNdEx+skippy) < 0 {
  10131. return ErrInvalidLengthTypes
  10132. }
  10133. if (iNdEx + skippy) > l {
  10134. return io.ErrUnexpectedEOF
  10135. }
  10136. iNdEx += skippy
  10137. }
  10138. }
  10139. if iNdEx > l {
  10140. return io.ErrUnexpectedEOF
  10141. }
  10142. return nil
  10143. }
  10144. func (m *ResponseBeginBlock) Unmarshal(dAtA []byte) error {
  10145. l := len(dAtA)
  10146. iNdEx := 0
  10147. for iNdEx < l {
  10148. preIndex := iNdEx
  10149. var wire uint64
  10150. for shift := uint(0); ; shift += 7 {
  10151. if shift >= 64 {
  10152. return ErrIntOverflowTypes
  10153. }
  10154. if iNdEx >= l {
  10155. return io.ErrUnexpectedEOF
  10156. }
  10157. b := dAtA[iNdEx]
  10158. iNdEx++
  10159. wire |= uint64(b&0x7F) << shift
  10160. if b < 0x80 {
  10161. break
  10162. }
  10163. }
  10164. fieldNum := int32(wire >> 3)
  10165. wireType := int(wire & 0x7)
  10166. if wireType == 4 {
  10167. return fmt.Errorf("proto: ResponseBeginBlock: wiretype end group for non-group")
  10168. }
  10169. if fieldNum <= 0 {
  10170. return fmt.Errorf("proto: ResponseBeginBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  10171. }
  10172. switch fieldNum {
  10173. case 1:
  10174. if wireType != 2 {
  10175. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  10176. }
  10177. var msglen int
  10178. for shift := uint(0); ; shift += 7 {
  10179. if shift >= 64 {
  10180. return ErrIntOverflowTypes
  10181. }
  10182. if iNdEx >= l {
  10183. return io.ErrUnexpectedEOF
  10184. }
  10185. b := dAtA[iNdEx]
  10186. iNdEx++
  10187. msglen |= int(b&0x7F) << shift
  10188. if b < 0x80 {
  10189. break
  10190. }
  10191. }
  10192. if msglen < 0 {
  10193. return ErrInvalidLengthTypes
  10194. }
  10195. postIndex := iNdEx + msglen
  10196. if postIndex < 0 {
  10197. return ErrInvalidLengthTypes
  10198. }
  10199. if postIndex > l {
  10200. return io.ErrUnexpectedEOF
  10201. }
  10202. m.Events = append(m.Events, Event{})
  10203. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10204. return err
  10205. }
  10206. iNdEx = postIndex
  10207. default:
  10208. iNdEx = preIndex
  10209. skippy, err := skipTypes(dAtA[iNdEx:])
  10210. if err != nil {
  10211. return err
  10212. }
  10213. if (skippy < 0) || (iNdEx+skippy) < 0 {
  10214. return ErrInvalidLengthTypes
  10215. }
  10216. if (iNdEx + skippy) > l {
  10217. return io.ErrUnexpectedEOF
  10218. }
  10219. iNdEx += skippy
  10220. }
  10221. }
  10222. if iNdEx > l {
  10223. return io.ErrUnexpectedEOF
  10224. }
  10225. return nil
  10226. }
  10227. func (m *ResponseCheckTx) Unmarshal(dAtA []byte) error {
  10228. l := len(dAtA)
  10229. iNdEx := 0
  10230. for iNdEx < l {
  10231. preIndex := iNdEx
  10232. var wire uint64
  10233. for shift := uint(0); ; shift += 7 {
  10234. if shift >= 64 {
  10235. return ErrIntOverflowTypes
  10236. }
  10237. if iNdEx >= l {
  10238. return io.ErrUnexpectedEOF
  10239. }
  10240. b := dAtA[iNdEx]
  10241. iNdEx++
  10242. wire |= uint64(b&0x7F) << shift
  10243. if b < 0x80 {
  10244. break
  10245. }
  10246. }
  10247. fieldNum := int32(wire >> 3)
  10248. wireType := int(wire & 0x7)
  10249. if wireType == 4 {
  10250. return fmt.Errorf("proto: ResponseCheckTx: wiretype end group for non-group")
  10251. }
  10252. if fieldNum <= 0 {
  10253. return fmt.Errorf("proto: ResponseCheckTx: illegal tag %d (wire type %d)", fieldNum, wire)
  10254. }
  10255. switch fieldNum {
  10256. case 1:
  10257. if wireType != 0 {
  10258. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  10259. }
  10260. m.Code = 0
  10261. for shift := uint(0); ; shift += 7 {
  10262. if shift >= 64 {
  10263. return ErrIntOverflowTypes
  10264. }
  10265. if iNdEx >= l {
  10266. return io.ErrUnexpectedEOF
  10267. }
  10268. b := dAtA[iNdEx]
  10269. iNdEx++
  10270. m.Code |= uint32(b&0x7F) << shift
  10271. if b < 0x80 {
  10272. break
  10273. }
  10274. }
  10275. case 2:
  10276. if wireType != 2 {
  10277. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  10278. }
  10279. var byteLen int
  10280. for shift := uint(0); ; shift += 7 {
  10281. if shift >= 64 {
  10282. return ErrIntOverflowTypes
  10283. }
  10284. if iNdEx >= l {
  10285. return io.ErrUnexpectedEOF
  10286. }
  10287. b := dAtA[iNdEx]
  10288. iNdEx++
  10289. byteLen |= int(b&0x7F) << shift
  10290. if b < 0x80 {
  10291. break
  10292. }
  10293. }
  10294. if byteLen < 0 {
  10295. return ErrInvalidLengthTypes
  10296. }
  10297. postIndex := iNdEx + byteLen
  10298. if postIndex < 0 {
  10299. return ErrInvalidLengthTypes
  10300. }
  10301. if postIndex > l {
  10302. return io.ErrUnexpectedEOF
  10303. }
  10304. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  10305. if m.Data == nil {
  10306. m.Data = []byte{}
  10307. }
  10308. iNdEx = postIndex
  10309. case 3:
  10310. if wireType != 2 {
  10311. return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType)
  10312. }
  10313. var stringLen uint64
  10314. for shift := uint(0); ; shift += 7 {
  10315. if shift >= 64 {
  10316. return ErrIntOverflowTypes
  10317. }
  10318. if iNdEx >= l {
  10319. return io.ErrUnexpectedEOF
  10320. }
  10321. b := dAtA[iNdEx]
  10322. iNdEx++
  10323. stringLen |= uint64(b&0x7F) << shift
  10324. if b < 0x80 {
  10325. break
  10326. }
  10327. }
  10328. intStringLen := int(stringLen)
  10329. if intStringLen < 0 {
  10330. return ErrInvalidLengthTypes
  10331. }
  10332. postIndex := iNdEx + intStringLen
  10333. if postIndex < 0 {
  10334. return ErrInvalidLengthTypes
  10335. }
  10336. if postIndex > l {
  10337. return io.ErrUnexpectedEOF
  10338. }
  10339. m.Log = string(dAtA[iNdEx:postIndex])
  10340. iNdEx = postIndex
  10341. case 4:
  10342. if wireType != 2 {
  10343. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  10344. }
  10345. var stringLen uint64
  10346. for shift := uint(0); ; shift += 7 {
  10347. if shift >= 64 {
  10348. return ErrIntOverflowTypes
  10349. }
  10350. if iNdEx >= l {
  10351. return io.ErrUnexpectedEOF
  10352. }
  10353. b := dAtA[iNdEx]
  10354. iNdEx++
  10355. stringLen |= uint64(b&0x7F) << shift
  10356. if b < 0x80 {
  10357. break
  10358. }
  10359. }
  10360. intStringLen := int(stringLen)
  10361. if intStringLen < 0 {
  10362. return ErrInvalidLengthTypes
  10363. }
  10364. postIndex := iNdEx + intStringLen
  10365. if postIndex < 0 {
  10366. return ErrInvalidLengthTypes
  10367. }
  10368. if postIndex > l {
  10369. return io.ErrUnexpectedEOF
  10370. }
  10371. m.Info = string(dAtA[iNdEx:postIndex])
  10372. iNdEx = postIndex
  10373. case 5:
  10374. if wireType != 0 {
  10375. return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType)
  10376. }
  10377. m.GasWanted = 0
  10378. for shift := uint(0); ; shift += 7 {
  10379. if shift >= 64 {
  10380. return ErrIntOverflowTypes
  10381. }
  10382. if iNdEx >= l {
  10383. return io.ErrUnexpectedEOF
  10384. }
  10385. b := dAtA[iNdEx]
  10386. iNdEx++
  10387. m.GasWanted |= int64(b&0x7F) << shift
  10388. if b < 0x80 {
  10389. break
  10390. }
  10391. }
  10392. case 6:
  10393. if wireType != 0 {
  10394. return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType)
  10395. }
  10396. m.GasUsed = 0
  10397. for shift := uint(0); ; shift += 7 {
  10398. if shift >= 64 {
  10399. return ErrIntOverflowTypes
  10400. }
  10401. if iNdEx >= l {
  10402. return io.ErrUnexpectedEOF
  10403. }
  10404. b := dAtA[iNdEx]
  10405. iNdEx++
  10406. m.GasUsed |= int64(b&0x7F) << shift
  10407. if b < 0x80 {
  10408. break
  10409. }
  10410. }
  10411. case 7:
  10412. if wireType != 2 {
  10413. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  10414. }
  10415. var msglen int
  10416. for shift := uint(0); ; shift += 7 {
  10417. if shift >= 64 {
  10418. return ErrIntOverflowTypes
  10419. }
  10420. if iNdEx >= l {
  10421. return io.ErrUnexpectedEOF
  10422. }
  10423. b := dAtA[iNdEx]
  10424. iNdEx++
  10425. msglen |= int(b&0x7F) << shift
  10426. if b < 0x80 {
  10427. break
  10428. }
  10429. }
  10430. if msglen < 0 {
  10431. return ErrInvalidLengthTypes
  10432. }
  10433. postIndex := iNdEx + msglen
  10434. if postIndex < 0 {
  10435. return ErrInvalidLengthTypes
  10436. }
  10437. if postIndex > l {
  10438. return io.ErrUnexpectedEOF
  10439. }
  10440. m.Events = append(m.Events, Event{})
  10441. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10442. return err
  10443. }
  10444. iNdEx = postIndex
  10445. case 8:
  10446. if wireType != 2 {
  10447. return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType)
  10448. }
  10449. var stringLen uint64
  10450. for shift := uint(0); ; shift += 7 {
  10451. if shift >= 64 {
  10452. return ErrIntOverflowTypes
  10453. }
  10454. if iNdEx >= l {
  10455. return io.ErrUnexpectedEOF
  10456. }
  10457. b := dAtA[iNdEx]
  10458. iNdEx++
  10459. stringLen |= uint64(b&0x7F) << shift
  10460. if b < 0x80 {
  10461. break
  10462. }
  10463. }
  10464. intStringLen := int(stringLen)
  10465. if intStringLen < 0 {
  10466. return ErrInvalidLengthTypes
  10467. }
  10468. postIndex := iNdEx + intStringLen
  10469. if postIndex < 0 {
  10470. return ErrInvalidLengthTypes
  10471. }
  10472. if postIndex > l {
  10473. return io.ErrUnexpectedEOF
  10474. }
  10475. m.Codespace = string(dAtA[iNdEx:postIndex])
  10476. iNdEx = postIndex
  10477. default:
  10478. iNdEx = preIndex
  10479. skippy, err := skipTypes(dAtA[iNdEx:])
  10480. if err != nil {
  10481. return err
  10482. }
  10483. if (skippy < 0) || (iNdEx+skippy) < 0 {
  10484. return ErrInvalidLengthTypes
  10485. }
  10486. if (iNdEx + skippy) > l {
  10487. return io.ErrUnexpectedEOF
  10488. }
  10489. iNdEx += skippy
  10490. }
  10491. }
  10492. if iNdEx > l {
  10493. return io.ErrUnexpectedEOF
  10494. }
  10495. return nil
  10496. }
  10497. func (m *ResponseDeliverTx) Unmarshal(dAtA []byte) error {
  10498. l := len(dAtA)
  10499. iNdEx := 0
  10500. for iNdEx < l {
  10501. preIndex := iNdEx
  10502. var wire uint64
  10503. for shift := uint(0); ; shift += 7 {
  10504. if shift >= 64 {
  10505. return ErrIntOverflowTypes
  10506. }
  10507. if iNdEx >= l {
  10508. return io.ErrUnexpectedEOF
  10509. }
  10510. b := dAtA[iNdEx]
  10511. iNdEx++
  10512. wire |= uint64(b&0x7F) << shift
  10513. if b < 0x80 {
  10514. break
  10515. }
  10516. }
  10517. fieldNum := int32(wire >> 3)
  10518. wireType := int(wire & 0x7)
  10519. if wireType == 4 {
  10520. return fmt.Errorf("proto: ResponseDeliverTx: wiretype end group for non-group")
  10521. }
  10522. if fieldNum <= 0 {
  10523. return fmt.Errorf("proto: ResponseDeliverTx: illegal tag %d (wire type %d)", fieldNum, wire)
  10524. }
  10525. switch fieldNum {
  10526. case 1:
  10527. if wireType != 0 {
  10528. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  10529. }
  10530. m.Code = 0
  10531. for shift := uint(0); ; shift += 7 {
  10532. if shift >= 64 {
  10533. return ErrIntOverflowTypes
  10534. }
  10535. if iNdEx >= l {
  10536. return io.ErrUnexpectedEOF
  10537. }
  10538. b := dAtA[iNdEx]
  10539. iNdEx++
  10540. m.Code |= uint32(b&0x7F) << shift
  10541. if b < 0x80 {
  10542. break
  10543. }
  10544. }
  10545. case 2:
  10546. if wireType != 2 {
  10547. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  10548. }
  10549. var byteLen int
  10550. for shift := uint(0); ; shift += 7 {
  10551. if shift >= 64 {
  10552. return ErrIntOverflowTypes
  10553. }
  10554. if iNdEx >= l {
  10555. return io.ErrUnexpectedEOF
  10556. }
  10557. b := dAtA[iNdEx]
  10558. iNdEx++
  10559. byteLen |= int(b&0x7F) << shift
  10560. if b < 0x80 {
  10561. break
  10562. }
  10563. }
  10564. if byteLen < 0 {
  10565. return ErrInvalidLengthTypes
  10566. }
  10567. postIndex := iNdEx + byteLen
  10568. if postIndex < 0 {
  10569. return ErrInvalidLengthTypes
  10570. }
  10571. if postIndex > l {
  10572. return io.ErrUnexpectedEOF
  10573. }
  10574. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  10575. if m.Data == nil {
  10576. m.Data = []byte{}
  10577. }
  10578. iNdEx = postIndex
  10579. case 3:
  10580. if wireType != 2 {
  10581. return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType)
  10582. }
  10583. var stringLen uint64
  10584. for shift := uint(0); ; shift += 7 {
  10585. if shift >= 64 {
  10586. return ErrIntOverflowTypes
  10587. }
  10588. if iNdEx >= l {
  10589. return io.ErrUnexpectedEOF
  10590. }
  10591. b := dAtA[iNdEx]
  10592. iNdEx++
  10593. stringLen |= uint64(b&0x7F) << shift
  10594. if b < 0x80 {
  10595. break
  10596. }
  10597. }
  10598. intStringLen := int(stringLen)
  10599. if intStringLen < 0 {
  10600. return ErrInvalidLengthTypes
  10601. }
  10602. postIndex := iNdEx + intStringLen
  10603. if postIndex < 0 {
  10604. return ErrInvalidLengthTypes
  10605. }
  10606. if postIndex > l {
  10607. return io.ErrUnexpectedEOF
  10608. }
  10609. m.Log = string(dAtA[iNdEx:postIndex])
  10610. iNdEx = postIndex
  10611. case 4:
  10612. if wireType != 2 {
  10613. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  10614. }
  10615. var stringLen uint64
  10616. for shift := uint(0); ; shift += 7 {
  10617. if shift >= 64 {
  10618. return ErrIntOverflowTypes
  10619. }
  10620. if iNdEx >= l {
  10621. return io.ErrUnexpectedEOF
  10622. }
  10623. b := dAtA[iNdEx]
  10624. iNdEx++
  10625. stringLen |= uint64(b&0x7F) << shift
  10626. if b < 0x80 {
  10627. break
  10628. }
  10629. }
  10630. intStringLen := int(stringLen)
  10631. if intStringLen < 0 {
  10632. return ErrInvalidLengthTypes
  10633. }
  10634. postIndex := iNdEx + intStringLen
  10635. if postIndex < 0 {
  10636. return ErrInvalidLengthTypes
  10637. }
  10638. if postIndex > l {
  10639. return io.ErrUnexpectedEOF
  10640. }
  10641. m.Info = string(dAtA[iNdEx:postIndex])
  10642. iNdEx = postIndex
  10643. case 5:
  10644. if wireType != 0 {
  10645. return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType)
  10646. }
  10647. m.GasWanted = 0
  10648. for shift := uint(0); ; shift += 7 {
  10649. if shift >= 64 {
  10650. return ErrIntOverflowTypes
  10651. }
  10652. if iNdEx >= l {
  10653. return io.ErrUnexpectedEOF
  10654. }
  10655. b := dAtA[iNdEx]
  10656. iNdEx++
  10657. m.GasWanted |= int64(b&0x7F) << shift
  10658. if b < 0x80 {
  10659. break
  10660. }
  10661. }
  10662. case 6:
  10663. if wireType != 0 {
  10664. return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType)
  10665. }
  10666. m.GasUsed = 0
  10667. for shift := uint(0); ; shift += 7 {
  10668. if shift >= 64 {
  10669. return ErrIntOverflowTypes
  10670. }
  10671. if iNdEx >= l {
  10672. return io.ErrUnexpectedEOF
  10673. }
  10674. b := dAtA[iNdEx]
  10675. iNdEx++
  10676. m.GasUsed |= int64(b&0x7F) << shift
  10677. if b < 0x80 {
  10678. break
  10679. }
  10680. }
  10681. case 7:
  10682. if wireType != 2 {
  10683. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  10684. }
  10685. var msglen int
  10686. for shift := uint(0); ; shift += 7 {
  10687. if shift >= 64 {
  10688. return ErrIntOverflowTypes
  10689. }
  10690. if iNdEx >= l {
  10691. return io.ErrUnexpectedEOF
  10692. }
  10693. b := dAtA[iNdEx]
  10694. iNdEx++
  10695. msglen |= int(b&0x7F) << shift
  10696. if b < 0x80 {
  10697. break
  10698. }
  10699. }
  10700. if msglen < 0 {
  10701. return ErrInvalidLengthTypes
  10702. }
  10703. postIndex := iNdEx + msglen
  10704. if postIndex < 0 {
  10705. return ErrInvalidLengthTypes
  10706. }
  10707. if postIndex > l {
  10708. return io.ErrUnexpectedEOF
  10709. }
  10710. m.Events = append(m.Events, Event{})
  10711. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10712. return err
  10713. }
  10714. iNdEx = postIndex
  10715. case 8:
  10716. if wireType != 2 {
  10717. return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType)
  10718. }
  10719. var stringLen uint64
  10720. for shift := uint(0); ; shift += 7 {
  10721. if shift >= 64 {
  10722. return ErrIntOverflowTypes
  10723. }
  10724. if iNdEx >= l {
  10725. return io.ErrUnexpectedEOF
  10726. }
  10727. b := dAtA[iNdEx]
  10728. iNdEx++
  10729. stringLen |= uint64(b&0x7F) << shift
  10730. if b < 0x80 {
  10731. break
  10732. }
  10733. }
  10734. intStringLen := int(stringLen)
  10735. if intStringLen < 0 {
  10736. return ErrInvalidLengthTypes
  10737. }
  10738. postIndex := iNdEx + intStringLen
  10739. if postIndex < 0 {
  10740. return ErrInvalidLengthTypes
  10741. }
  10742. if postIndex > l {
  10743. return io.ErrUnexpectedEOF
  10744. }
  10745. m.Codespace = string(dAtA[iNdEx:postIndex])
  10746. iNdEx = postIndex
  10747. default:
  10748. iNdEx = preIndex
  10749. skippy, err := skipTypes(dAtA[iNdEx:])
  10750. if err != nil {
  10751. return err
  10752. }
  10753. if (skippy < 0) || (iNdEx+skippy) < 0 {
  10754. return ErrInvalidLengthTypes
  10755. }
  10756. if (iNdEx + skippy) > l {
  10757. return io.ErrUnexpectedEOF
  10758. }
  10759. iNdEx += skippy
  10760. }
  10761. }
  10762. if iNdEx > l {
  10763. return io.ErrUnexpectedEOF
  10764. }
  10765. return nil
  10766. }
  10767. func (m *ResponseEndBlock) Unmarshal(dAtA []byte) error {
  10768. l := len(dAtA)
  10769. iNdEx := 0
  10770. for iNdEx < l {
  10771. preIndex := iNdEx
  10772. var wire uint64
  10773. for shift := uint(0); ; shift += 7 {
  10774. if shift >= 64 {
  10775. return ErrIntOverflowTypes
  10776. }
  10777. if iNdEx >= l {
  10778. return io.ErrUnexpectedEOF
  10779. }
  10780. b := dAtA[iNdEx]
  10781. iNdEx++
  10782. wire |= uint64(b&0x7F) << shift
  10783. if b < 0x80 {
  10784. break
  10785. }
  10786. }
  10787. fieldNum := int32(wire >> 3)
  10788. wireType := int(wire & 0x7)
  10789. if wireType == 4 {
  10790. return fmt.Errorf("proto: ResponseEndBlock: wiretype end group for non-group")
  10791. }
  10792. if fieldNum <= 0 {
  10793. return fmt.Errorf("proto: ResponseEndBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  10794. }
  10795. switch fieldNum {
  10796. case 1:
  10797. if wireType != 2 {
  10798. return fmt.Errorf("proto: wrong wireType = %d for field ValidatorUpdates", wireType)
  10799. }
  10800. var msglen int
  10801. for shift := uint(0); ; shift += 7 {
  10802. if shift >= 64 {
  10803. return ErrIntOverflowTypes
  10804. }
  10805. if iNdEx >= l {
  10806. return io.ErrUnexpectedEOF
  10807. }
  10808. b := dAtA[iNdEx]
  10809. iNdEx++
  10810. msglen |= int(b&0x7F) << shift
  10811. if b < 0x80 {
  10812. break
  10813. }
  10814. }
  10815. if msglen < 0 {
  10816. return ErrInvalidLengthTypes
  10817. }
  10818. postIndex := iNdEx + msglen
  10819. if postIndex < 0 {
  10820. return ErrInvalidLengthTypes
  10821. }
  10822. if postIndex > l {
  10823. return io.ErrUnexpectedEOF
  10824. }
  10825. m.ValidatorUpdates = append(m.ValidatorUpdates, ValidatorUpdate{})
  10826. if err := m.ValidatorUpdates[len(m.ValidatorUpdates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10827. return err
  10828. }
  10829. iNdEx = postIndex
  10830. case 2:
  10831. if wireType != 2 {
  10832. return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParamUpdates", wireType)
  10833. }
  10834. var msglen int
  10835. for shift := uint(0); ; shift += 7 {
  10836. if shift >= 64 {
  10837. return ErrIntOverflowTypes
  10838. }
  10839. if iNdEx >= l {
  10840. return io.ErrUnexpectedEOF
  10841. }
  10842. b := dAtA[iNdEx]
  10843. iNdEx++
  10844. msglen |= int(b&0x7F) << shift
  10845. if b < 0x80 {
  10846. break
  10847. }
  10848. }
  10849. if msglen < 0 {
  10850. return ErrInvalidLengthTypes
  10851. }
  10852. postIndex := iNdEx + msglen
  10853. if postIndex < 0 {
  10854. return ErrInvalidLengthTypes
  10855. }
  10856. if postIndex > l {
  10857. return io.ErrUnexpectedEOF
  10858. }
  10859. if m.ConsensusParamUpdates == nil {
  10860. m.ConsensusParamUpdates = &types1.ConsensusParams{}
  10861. }
  10862. if err := m.ConsensusParamUpdates.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10863. return err
  10864. }
  10865. iNdEx = postIndex
  10866. case 3:
  10867. if wireType != 2 {
  10868. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  10869. }
  10870. var msglen int
  10871. for shift := uint(0); ; shift += 7 {
  10872. if shift >= 64 {
  10873. return ErrIntOverflowTypes
  10874. }
  10875. if iNdEx >= l {
  10876. return io.ErrUnexpectedEOF
  10877. }
  10878. b := dAtA[iNdEx]
  10879. iNdEx++
  10880. msglen |= int(b&0x7F) << shift
  10881. if b < 0x80 {
  10882. break
  10883. }
  10884. }
  10885. if msglen < 0 {
  10886. return ErrInvalidLengthTypes
  10887. }
  10888. postIndex := iNdEx + msglen
  10889. if postIndex < 0 {
  10890. return ErrInvalidLengthTypes
  10891. }
  10892. if postIndex > l {
  10893. return io.ErrUnexpectedEOF
  10894. }
  10895. m.Events = append(m.Events, Event{})
  10896. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10897. return err
  10898. }
  10899. iNdEx = postIndex
  10900. default:
  10901. iNdEx = preIndex
  10902. skippy, err := skipTypes(dAtA[iNdEx:])
  10903. if err != nil {
  10904. return err
  10905. }
  10906. if (skippy < 0) || (iNdEx+skippy) < 0 {
  10907. return ErrInvalidLengthTypes
  10908. }
  10909. if (iNdEx + skippy) > l {
  10910. return io.ErrUnexpectedEOF
  10911. }
  10912. iNdEx += skippy
  10913. }
  10914. }
  10915. if iNdEx > l {
  10916. return io.ErrUnexpectedEOF
  10917. }
  10918. return nil
  10919. }
  10920. func (m *ResponseCommit) Unmarshal(dAtA []byte) error {
  10921. l := len(dAtA)
  10922. iNdEx := 0
  10923. for iNdEx < l {
  10924. preIndex := iNdEx
  10925. var wire uint64
  10926. for shift := uint(0); ; shift += 7 {
  10927. if shift >= 64 {
  10928. return ErrIntOverflowTypes
  10929. }
  10930. if iNdEx >= l {
  10931. return io.ErrUnexpectedEOF
  10932. }
  10933. b := dAtA[iNdEx]
  10934. iNdEx++
  10935. wire |= uint64(b&0x7F) << shift
  10936. if b < 0x80 {
  10937. break
  10938. }
  10939. }
  10940. fieldNum := int32(wire >> 3)
  10941. wireType := int(wire & 0x7)
  10942. if wireType == 4 {
  10943. return fmt.Errorf("proto: ResponseCommit: wiretype end group for non-group")
  10944. }
  10945. if fieldNum <= 0 {
  10946. return fmt.Errorf("proto: ResponseCommit: illegal tag %d (wire type %d)", fieldNum, wire)
  10947. }
  10948. switch fieldNum {
  10949. case 2:
  10950. if wireType != 2 {
  10951. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  10952. }
  10953. var byteLen int
  10954. for shift := uint(0); ; shift += 7 {
  10955. if shift >= 64 {
  10956. return ErrIntOverflowTypes
  10957. }
  10958. if iNdEx >= l {
  10959. return io.ErrUnexpectedEOF
  10960. }
  10961. b := dAtA[iNdEx]
  10962. iNdEx++
  10963. byteLen |= int(b&0x7F) << shift
  10964. if b < 0x80 {
  10965. break
  10966. }
  10967. }
  10968. if byteLen < 0 {
  10969. return ErrInvalidLengthTypes
  10970. }
  10971. postIndex := iNdEx + byteLen
  10972. if postIndex < 0 {
  10973. return ErrInvalidLengthTypes
  10974. }
  10975. if postIndex > l {
  10976. return io.ErrUnexpectedEOF
  10977. }
  10978. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  10979. if m.Data == nil {
  10980. m.Data = []byte{}
  10981. }
  10982. iNdEx = postIndex
  10983. case 3:
  10984. if wireType != 0 {
  10985. return fmt.Errorf("proto: wrong wireType = %d for field RetainHeight", wireType)
  10986. }
  10987. m.RetainHeight = 0
  10988. for shift := uint(0); ; shift += 7 {
  10989. if shift >= 64 {
  10990. return ErrIntOverflowTypes
  10991. }
  10992. if iNdEx >= l {
  10993. return io.ErrUnexpectedEOF
  10994. }
  10995. b := dAtA[iNdEx]
  10996. iNdEx++
  10997. m.RetainHeight |= int64(b&0x7F) << shift
  10998. if b < 0x80 {
  10999. break
  11000. }
  11001. }
  11002. default:
  11003. iNdEx = preIndex
  11004. skippy, err := skipTypes(dAtA[iNdEx:])
  11005. if err != nil {
  11006. return err
  11007. }
  11008. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11009. return ErrInvalidLengthTypes
  11010. }
  11011. if (iNdEx + skippy) > l {
  11012. return io.ErrUnexpectedEOF
  11013. }
  11014. iNdEx += skippy
  11015. }
  11016. }
  11017. if iNdEx > l {
  11018. return io.ErrUnexpectedEOF
  11019. }
  11020. return nil
  11021. }
  11022. func (m *ResponseListSnapshots) Unmarshal(dAtA []byte) error {
  11023. l := len(dAtA)
  11024. iNdEx := 0
  11025. for iNdEx < l {
  11026. preIndex := iNdEx
  11027. var wire uint64
  11028. for shift := uint(0); ; shift += 7 {
  11029. if shift >= 64 {
  11030. return ErrIntOverflowTypes
  11031. }
  11032. if iNdEx >= l {
  11033. return io.ErrUnexpectedEOF
  11034. }
  11035. b := dAtA[iNdEx]
  11036. iNdEx++
  11037. wire |= uint64(b&0x7F) << shift
  11038. if b < 0x80 {
  11039. break
  11040. }
  11041. }
  11042. fieldNum := int32(wire >> 3)
  11043. wireType := int(wire & 0x7)
  11044. if wireType == 4 {
  11045. return fmt.Errorf("proto: ResponseListSnapshots: wiretype end group for non-group")
  11046. }
  11047. if fieldNum <= 0 {
  11048. return fmt.Errorf("proto: ResponseListSnapshots: illegal tag %d (wire type %d)", fieldNum, wire)
  11049. }
  11050. switch fieldNum {
  11051. case 1:
  11052. if wireType != 2 {
  11053. return fmt.Errorf("proto: wrong wireType = %d for field Snapshots", wireType)
  11054. }
  11055. var msglen int
  11056. for shift := uint(0); ; shift += 7 {
  11057. if shift >= 64 {
  11058. return ErrIntOverflowTypes
  11059. }
  11060. if iNdEx >= l {
  11061. return io.ErrUnexpectedEOF
  11062. }
  11063. b := dAtA[iNdEx]
  11064. iNdEx++
  11065. msglen |= int(b&0x7F) << shift
  11066. if b < 0x80 {
  11067. break
  11068. }
  11069. }
  11070. if msglen < 0 {
  11071. return ErrInvalidLengthTypes
  11072. }
  11073. postIndex := iNdEx + msglen
  11074. if postIndex < 0 {
  11075. return ErrInvalidLengthTypes
  11076. }
  11077. if postIndex > l {
  11078. return io.ErrUnexpectedEOF
  11079. }
  11080. m.Snapshots = append(m.Snapshots, &Snapshot{})
  11081. if err := m.Snapshots[len(m.Snapshots)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11082. return err
  11083. }
  11084. iNdEx = postIndex
  11085. default:
  11086. iNdEx = preIndex
  11087. skippy, err := skipTypes(dAtA[iNdEx:])
  11088. if err != nil {
  11089. return err
  11090. }
  11091. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11092. return ErrInvalidLengthTypes
  11093. }
  11094. if (iNdEx + skippy) > l {
  11095. return io.ErrUnexpectedEOF
  11096. }
  11097. iNdEx += skippy
  11098. }
  11099. }
  11100. if iNdEx > l {
  11101. return io.ErrUnexpectedEOF
  11102. }
  11103. return nil
  11104. }
  11105. func (m *ResponseOfferSnapshot) Unmarshal(dAtA []byte) error {
  11106. l := len(dAtA)
  11107. iNdEx := 0
  11108. for iNdEx < l {
  11109. preIndex := iNdEx
  11110. var wire uint64
  11111. for shift := uint(0); ; shift += 7 {
  11112. if shift >= 64 {
  11113. return ErrIntOverflowTypes
  11114. }
  11115. if iNdEx >= l {
  11116. return io.ErrUnexpectedEOF
  11117. }
  11118. b := dAtA[iNdEx]
  11119. iNdEx++
  11120. wire |= uint64(b&0x7F) << shift
  11121. if b < 0x80 {
  11122. break
  11123. }
  11124. }
  11125. fieldNum := int32(wire >> 3)
  11126. wireType := int(wire & 0x7)
  11127. if wireType == 4 {
  11128. return fmt.Errorf("proto: ResponseOfferSnapshot: wiretype end group for non-group")
  11129. }
  11130. if fieldNum <= 0 {
  11131. return fmt.Errorf("proto: ResponseOfferSnapshot: illegal tag %d (wire type %d)", fieldNum, wire)
  11132. }
  11133. switch fieldNum {
  11134. case 1:
  11135. if wireType != 0 {
  11136. return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
  11137. }
  11138. m.Result = 0
  11139. for shift := uint(0); ; shift += 7 {
  11140. if shift >= 64 {
  11141. return ErrIntOverflowTypes
  11142. }
  11143. if iNdEx >= l {
  11144. return io.ErrUnexpectedEOF
  11145. }
  11146. b := dAtA[iNdEx]
  11147. iNdEx++
  11148. m.Result |= ResponseOfferSnapshot_Result(b&0x7F) << shift
  11149. if b < 0x80 {
  11150. break
  11151. }
  11152. }
  11153. default:
  11154. iNdEx = preIndex
  11155. skippy, err := skipTypes(dAtA[iNdEx:])
  11156. if err != nil {
  11157. return err
  11158. }
  11159. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11160. return ErrInvalidLengthTypes
  11161. }
  11162. if (iNdEx + skippy) > l {
  11163. return io.ErrUnexpectedEOF
  11164. }
  11165. iNdEx += skippy
  11166. }
  11167. }
  11168. if iNdEx > l {
  11169. return io.ErrUnexpectedEOF
  11170. }
  11171. return nil
  11172. }
  11173. func (m *ResponseLoadSnapshotChunk) Unmarshal(dAtA []byte) error {
  11174. l := len(dAtA)
  11175. iNdEx := 0
  11176. for iNdEx < l {
  11177. preIndex := iNdEx
  11178. var wire uint64
  11179. for shift := uint(0); ; shift += 7 {
  11180. if shift >= 64 {
  11181. return ErrIntOverflowTypes
  11182. }
  11183. if iNdEx >= l {
  11184. return io.ErrUnexpectedEOF
  11185. }
  11186. b := dAtA[iNdEx]
  11187. iNdEx++
  11188. wire |= uint64(b&0x7F) << shift
  11189. if b < 0x80 {
  11190. break
  11191. }
  11192. }
  11193. fieldNum := int32(wire >> 3)
  11194. wireType := int(wire & 0x7)
  11195. if wireType == 4 {
  11196. return fmt.Errorf("proto: ResponseLoadSnapshotChunk: wiretype end group for non-group")
  11197. }
  11198. if fieldNum <= 0 {
  11199. return fmt.Errorf("proto: ResponseLoadSnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  11200. }
  11201. switch fieldNum {
  11202. case 1:
  11203. if wireType != 2 {
  11204. return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType)
  11205. }
  11206. var byteLen int
  11207. for shift := uint(0); ; shift += 7 {
  11208. if shift >= 64 {
  11209. return ErrIntOverflowTypes
  11210. }
  11211. if iNdEx >= l {
  11212. return io.ErrUnexpectedEOF
  11213. }
  11214. b := dAtA[iNdEx]
  11215. iNdEx++
  11216. byteLen |= int(b&0x7F) << shift
  11217. if b < 0x80 {
  11218. break
  11219. }
  11220. }
  11221. if byteLen < 0 {
  11222. return ErrInvalidLengthTypes
  11223. }
  11224. postIndex := iNdEx + byteLen
  11225. if postIndex < 0 {
  11226. return ErrInvalidLengthTypes
  11227. }
  11228. if postIndex > l {
  11229. return io.ErrUnexpectedEOF
  11230. }
  11231. m.Chunk = append(m.Chunk[:0], dAtA[iNdEx:postIndex]...)
  11232. if m.Chunk == nil {
  11233. m.Chunk = []byte{}
  11234. }
  11235. iNdEx = postIndex
  11236. default:
  11237. iNdEx = preIndex
  11238. skippy, err := skipTypes(dAtA[iNdEx:])
  11239. if err != nil {
  11240. return err
  11241. }
  11242. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11243. return ErrInvalidLengthTypes
  11244. }
  11245. if (iNdEx + skippy) > l {
  11246. return io.ErrUnexpectedEOF
  11247. }
  11248. iNdEx += skippy
  11249. }
  11250. }
  11251. if iNdEx > l {
  11252. return io.ErrUnexpectedEOF
  11253. }
  11254. return nil
  11255. }
  11256. func (m *ResponseApplySnapshotChunk) Unmarshal(dAtA []byte) error {
  11257. l := len(dAtA)
  11258. iNdEx := 0
  11259. for iNdEx < l {
  11260. preIndex := iNdEx
  11261. var wire uint64
  11262. for shift := uint(0); ; shift += 7 {
  11263. if shift >= 64 {
  11264. return ErrIntOverflowTypes
  11265. }
  11266. if iNdEx >= l {
  11267. return io.ErrUnexpectedEOF
  11268. }
  11269. b := dAtA[iNdEx]
  11270. iNdEx++
  11271. wire |= uint64(b&0x7F) << shift
  11272. if b < 0x80 {
  11273. break
  11274. }
  11275. }
  11276. fieldNum := int32(wire >> 3)
  11277. wireType := int(wire & 0x7)
  11278. if wireType == 4 {
  11279. return fmt.Errorf("proto: ResponseApplySnapshotChunk: wiretype end group for non-group")
  11280. }
  11281. if fieldNum <= 0 {
  11282. return fmt.Errorf("proto: ResponseApplySnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  11283. }
  11284. switch fieldNum {
  11285. case 1:
  11286. if wireType != 0 {
  11287. return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
  11288. }
  11289. m.Result = 0
  11290. for shift := uint(0); ; shift += 7 {
  11291. if shift >= 64 {
  11292. return ErrIntOverflowTypes
  11293. }
  11294. if iNdEx >= l {
  11295. return io.ErrUnexpectedEOF
  11296. }
  11297. b := dAtA[iNdEx]
  11298. iNdEx++
  11299. m.Result |= ResponseApplySnapshotChunk_Result(b&0x7F) << shift
  11300. if b < 0x80 {
  11301. break
  11302. }
  11303. }
  11304. case 2:
  11305. if wireType == 0 {
  11306. var v uint32
  11307. for shift := uint(0); ; shift += 7 {
  11308. if shift >= 64 {
  11309. return ErrIntOverflowTypes
  11310. }
  11311. if iNdEx >= l {
  11312. return io.ErrUnexpectedEOF
  11313. }
  11314. b := dAtA[iNdEx]
  11315. iNdEx++
  11316. v |= uint32(b&0x7F) << shift
  11317. if b < 0x80 {
  11318. break
  11319. }
  11320. }
  11321. m.RefetchChunks = append(m.RefetchChunks, v)
  11322. } else if wireType == 2 {
  11323. var packedLen int
  11324. for shift := uint(0); ; shift += 7 {
  11325. if shift >= 64 {
  11326. return ErrIntOverflowTypes
  11327. }
  11328. if iNdEx >= l {
  11329. return io.ErrUnexpectedEOF
  11330. }
  11331. b := dAtA[iNdEx]
  11332. iNdEx++
  11333. packedLen |= int(b&0x7F) << shift
  11334. if b < 0x80 {
  11335. break
  11336. }
  11337. }
  11338. if packedLen < 0 {
  11339. return ErrInvalidLengthTypes
  11340. }
  11341. postIndex := iNdEx + packedLen
  11342. if postIndex < 0 {
  11343. return ErrInvalidLengthTypes
  11344. }
  11345. if postIndex > l {
  11346. return io.ErrUnexpectedEOF
  11347. }
  11348. var elementCount int
  11349. var count int
  11350. for _, integer := range dAtA[iNdEx:postIndex] {
  11351. if integer < 128 {
  11352. count++
  11353. }
  11354. }
  11355. elementCount = count
  11356. if elementCount != 0 && len(m.RefetchChunks) == 0 {
  11357. m.RefetchChunks = make([]uint32, 0, elementCount)
  11358. }
  11359. for iNdEx < postIndex {
  11360. var v uint32
  11361. for shift := uint(0); ; shift += 7 {
  11362. if shift >= 64 {
  11363. return ErrIntOverflowTypes
  11364. }
  11365. if iNdEx >= l {
  11366. return io.ErrUnexpectedEOF
  11367. }
  11368. b := dAtA[iNdEx]
  11369. iNdEx++
  11370. v |= uint32(b&0x7F) << shift
  11371. if b < 0x80 {
  11372. break
  11373. }
  11374. }
  11375. m.RefetchChunks = append(m.RefetchChunks, v)
  11376. }
  11377. } else {
  11378. return fmt.Errorf("proto: wrong wireType = %d for field RefetchChunks", wireType)
  11379. }
  11380. case 3:
  11381. if wireType != 2 {
  11382. return fmt.Errorf("proto: wrong wireType = %d for field RejectSenders", wireType)
  11383. }
  11384. var stringLen uint64
  11385. for shift := uint(0); ; shift += 7 {
  11386. if shift >= 64 {
  11387. return ErrIntOverflowTypes
  11388. }
  11389. if iNdEx >= l {
  11390. return io.ErrUnexpectedEOF
  11391. }
  11392. b := dAtA[iNdEx]
  11393. iNdEx++
  11394. stringLen |= uint64(b&0x7F) << shift
  11395. if b < 0x80 {
  11396. break
  11397. }
  11398. }
  11399. intStringLen := int(stringLen)
  11400. if intStringLen < 0 {
  11401. return ErrInvalidLengthTypes
  11402. }
  11403. postIndex := iNdEx + intStringLen
  11404. if postIndex < 0 {
  11405. return ErrInvalidLengthTypes
  11406. }
  11407. if postIndex > l {
  11408. return io.ErrUnexpectedEOF
  11409. }
  11410. m.RejectSenders = append(m.RejectSenders, string(dAtA[iNdEx:postIndex]))
  11411. iNdEx = postIndex
  11412. default:
  11413. iNdEx = preIndex
  11414. skippy, err := skipTypes(dAtA[iNdEx:])
  11415. if err != nil {
  11416. return err
  11417. }
  11418. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11419. return ErrInvalidLengthTypes
  11420. }
  11421. if (iNdEx + skippy) > l {
  11422. return io.ErrUnexpectedEOF
  11423. }
  11424. iNdEx += skippy
  11425. }
  11426. }
  11427. if iNdEx > l {
  11428. return io.ErrUnexpectedEOF
  11429. }
  11430. return nil
  11431. }
  11432. func (m *LastCommitInfo) Unmarshal(dAtA []byte) error {
  11433. l := len(dAtA)
  11434. iNdEx := 0
  11435. for iNdEx < l {
  11436. preIndex := iNdEx
  11437. var wire uint64
  11438. for shift := uint(0); ; shift += 7 {
  11439. if shift >= 64 {
  11440. return ErrIntOverflowTypes
  11441. }
  11442. if iNdEx >= l {
  11443. return io.ErrUnexpectedEOF
  11444. }
  11445. b := dAtA[iNdEx]
  11446. iNdEx++
  11447. wire |= uint64(b&0x7F) << shift
  11448. if b < 0x80 {
  11449. break
  11450. }
  11451. }
  11452. fieldNum := int32(wire >> 3)
  11453. wireType := int(wire & 0x7)
  11454. if wireType == 4 {
  11455. return fmt.Errorf("proto: LastCommitInfo: wiretype end group for non-group")
  11456. }
  11457. if fieldNum <= 0 {
  11458. return fmt.Errorf("proto: LastCommitInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  11459. }
  11460. switch fieldNum {
  11461. case 1:
  11462. if wireType != 0 {
  11463. return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType)
  11464. }
  11465. m.Round = 0
  11466. for shift := uint(0); ; shift += 7 {
  11467. if shift >= 64 {
  11468. return ErrIntOverflowTypes
  11469. }
  11470. if iNdEx >= l {
  11471. return io.ErrUnexpectedEOF
  11472. }
  11473. b := dAtA[iNdEx]
  11474. iNdEx++
  11475. m.Round |= int32(b&0x7F) << shift
  11476. if b < 0x80 {
  11477. break
  11478. }
  11479. }
  11480. case 2:
  11481. if wireType != 2 {
  11482. return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType)
  11483. }
  11484. var msglen int
  11485. for shift := uint(0); ; shift += 7 {
  11486. if shift >= 64 {
  11487. return ErrIntOverflowTypes
  11488. }
  11489. if iNdEx >= l {
  11490. return io.ErrUnexpectedEOF
  11491. }
  11492. b := dAtA[iNdEx]
  11493. iNdEx++
  11494. msglen |= int(b&0x7F) << shift
  11495. if b < 0x80 {
  11496. break
  11497. }
  11498. }
  11499. if msglen < 0 {
  11500. return ErrInvalidLengthTypes
  11501. }
  11502. postIndex := iNdEx + msglen
  11503. if postIndex < 0 {
  11504. return ErrInvalidLengthTypes
  11505. }
  11506. if postIndex > l {
  11507. return io.ErrUnexpectedEOF
  11508. }
  11509. m.Votes = append(m.Votes, VoteInfo{})
  11510. if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11511. return err
  11512. }
  11513. iNdEx = postIndex
  11514. default:
  11515. iNdEx = preIndex
  11516. skippy, err := skipTypes(dAtA[iNdEx:])
  11517. if err != nil {
  11518. return err
  11519. }
  11520. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11521. return ErrInvalidLengthTypes
  11522. }
  11523. if (iNdEx + skippy) > l {
  11524. return io.ErrUnexpectedEOF
  11525. }
  11526. iNdEx += skippy
  11527. }
  11528. }
  11529. if iNdEx > l {
  11530. return io.ErrUnexpectedEOF
  11531. }
  11532. return nil
  11533. }
  11534. func (m *Event) Unmarshal(dAtA []byte) error {
  11535. l := len(dAtA)
  11536. iNdEx := 0
  11537. for iNdEx < l {
  11538. preIndex := iNdEx
  11539. var wire uint64
  11540. for shift := uint(0); ; shift += 7 {
  11541. if shift >= 64 {
  11542. return ErrIntOverflowTypes
  11543. }
  11544. if iNdEx >= l {
  11545. return io.ErrUnexpectedEOF
  11546. }
  11547. b := dAtA[iNdEx]
  11548. iNdEx++
  11549. wire |= uint64(b&0x7F) << shift
  11550. if b < 0x80 {
  11551. break
  11552. }
  11553. }
  11554. fieldNum := int32(wire >> 3)
  11555. wireType := int(wire & 0x7)
  11556. if wireType == 4 {
  11557. return fmt.Errorf("proto: Event: wiretype end group for non-group")
  11558. }
  11559. if fieldNum <= 0 {
  11560. return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire)
  11561. }
  11562. switch fieldNum {
  11563. case 1:
  11564. if wireType != 2 {
  11565. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  11566. }
  11567. var stringLen uint64
  11568. for shift := uint(0); ; shift += 7 {
  11569. if shift >= 64 {
  11570. return ErrIntOverflowTypes
  11571. }
  11572. if iNdEx >= l {
  11573. return io.ErrUnexpectedEOF
  11574. }
  11575. b := dAtA[iNdEx]
  11576. iNdEx++
  11577. stringLen |= uint64(b&0x7F) << shift
  11578. if b < 0x80 {
  11579. break
  11580. }
  11581. }
  11582. intStringLen := int(stringLen)
  11583. if intStringLen < 0 {
  11584. return ErrInvalidLengthTypes
  11585. }
  11586. postIndex := iNdEx + intStringLen
  11587. if postIndex < 0 {
  11588. return ErrInvalidLengthTypes
  11589. }
  11590. if postIndex > l {
  11591. return io.ErrUnexpectedEOF
  11592. }
  11593. m.Type = string(dAtA[iNdEx:postIndex])
  11594. iNdEx = postIndex
  11595. case 2:
  11596. if wireType != 2 {
  11597. return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType)
  11598. }
  11599. var msglen int
  11600. for shift := uint(0); ; shift += 7 {
  11601. if shift >= 64 {
  11602. return ErrIntOverflowTypes
  11603. }
  11604. if iNdEx >= l {
  11605. return io.ErrUnexpectedEOF
  11606. }
  11607. b := dAtA[iNdEx]
  11608. iNdEx++
  11609. msglen |= int(b&0x7F) << shift
  11610. if b < 0x80 {
  11611. break
  11612. }
  11613. }
  11614. if msglen < 0 {
  11615. return ErrInvalidLengthTypes
  11616. }
  11617. postIndex := iNdEx + msglen
  11618. if postIndex < 0 {
  11619. return ErrInvalidLengthTypes
  11620. }
  11621. if postIndex > l {
  11622. return io.ErrUnexpectedEOF
  11623. }
  11624. m.Attributes = append(m.Attributes, EventAttribute{})
  11625. if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11626. return err
  11627. }
  11628. iNdEx = postIndex
  11629. default:
  11630. iNdEx = preIndex
  11631. skippy, err := skipTypes(dAtA[iNdEx:])
  11632. if err != nil {
  11633. return err
  11634. }
  11635. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11636. return ErrInvalidLengthTypes
  11637. }
  11638. if (iNdEx + skippy) > l {
  11639. return io.ErrUnexpectedEOF
  11640. }
  11641. iNdEx += skippy
  11642. }
  11643. }
  11644. if iNdEx > l {
  11645. return io.ErrUnexpectedEOF
  11646. }
  11647. return nil
  11648. }
  11649. func (m *EventAttribute) Unmarshal(dAtA []byte) error {
  11650. l := len(dAtA)
  11651. iNdEx := 0
  11652. for iNdEx < l {
  11653. preIndex := iNdEx
  11654. var wire uint64
  11655. for shift := uint(0); ; shift += 7 {
  11656. if shift >= 64 {
  11657. return ErrIntOverflowTypes
  11658. }
  11659. if iNdEx >= l {
  11660. return io.ErrUnexpectedEOF
  11661. }
  11662. b := dAtA[iNdEx]
  11663. iNdEx++
  11664. wire |= uint64(b&0x7F) << shift
  11665. if b < 0x80 {
  11666. break
  11667. }
  11668. }
  11669. fieldNum := int32(wire >> 3)
  11670. wireType := int(wire & 0x7)
  11671. if wireType == 4 {
  11672. return fmt.Errorf("proto: EventAttribute: wiretype end group for non-group")
  11673. }
  11674. if fieldNum <= 0 {
  11675. return fmt.Errorf("proto: EventAttribute: illegal tag %d (wire type %d)", fieldNum, wire)
  11676. }
  11677. switch fieldNum {
  11678. case 1:
  11679. if wireType != 2 {
  11680. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  11681. }
  11682. var byteLen int
  11683. for shift := uint(0); ; shift += 7 {
  11684. if shift >= 64 {
  11685. return ErrIntOverflowTypes
  11686. }
  11687. if iNdEx >= l {
  11688. return io.ErrUnexpectedEOF
  11689. }
  11690. b := dAtA[iNdEx]
  11691. iNdEx++
  11692. byteLen |= int(b&0x7F) << shift
  11693. if b < 0x80 {
  11694. break
  11695. }
  11696. }
  11697. if byteLen < 0 {
  11698. return ErrInvalidLengthTypes
  11699. }
  11700. postIndex := iNdEx + byteLen
  11701. if postIndex < 0 {
  11702. return ErrInvalidLengthTypes
  11703. }
  11704. if postIndex > l {
  11705. return io.ErrUnexpectedEOF
  11706. }
  11707. m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
  11708. if m.Key == nil {
  11709. m.Key = []byte{}
  11710. }
  11711. iNdEx = postIndex
  11712. case 2:
  11713. if wireType != 2 {
  11714. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  11715. }
  11716. var byteLen int
  11717. for shift := uint(0); ; shift += 7 {
  11718. if shift >= 64 {
  11719. return ErrIntOverflowTypes
  11720. }
  11721. if iNdEx >= l {
  11722. return io.ErrUnexpectedEOF
  11723. }
  11724. b := dAtA[iNdEx]
  11725. iNdEx++
  11726. byteLen |= int(b&0x7F) << shift
  11727. if b < 0x80 {
  11728. break
  11729. }
  11730. }
  11731. if byteLen < 0 {
  11732. return ErrInvalidLengthTypes
  11733. }
  11734. postIndex := iNdEx + byteLen
  11735. if postIndex < 0 {
  11736. return ErrInvalidLengthTypes
  11737. }
  11738. if postIndex > l {
  11739. return io.ErrUnexpectedEOF
  11740. }
  11741. m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...)
  11742. if m.Value == nil {
  11743. m.Value = []byte{}
  11744. }
  11745. iNdEx = postIndex
  11746. case 3:
  11747. if wireType != 0 {
  11748. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  11749. }
  11750. var v int
  11751. for shift := uint(0); ; shift += 7 {
  11752. if shift >= 64 {
  11753. return ErrIntOverflowTypes
  11754. }
  11755. if iNdEx >= l {
  11756. return io.ErrUnexpectedEOF
  11757. }
  11758. b := dAtA[iNdEx]
  11759. iNdEx++
  11760. v |= int(b&0x7F) << shift
  11761. if b < 0x80 {
  11762. break
  11763. }
  11764. }
  11765. m.Index = bool(v != 0)
  11766. default:
  11767. iNdEx = preIndex
  11768. skippy, err := skipTypes(dAtA[iNdEx:])
  11769. if err != nil {
  11770. return err
  11771. }
  11772. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11773. return ErrInvalidLengthTypes
  11774. }
  11775. if (iNdEx + skippy) > l {
  11776. return io.ErrUnexpectedEOF
  11777. }
  11778. iNdEx += skippy
  11779. }
  11780. }
  11781. if iNdEx > l {
  11782. return io.ErrUnexpectedEOF
  11783. }
  11784. return nil
  11785. }
  11786. func (m *TxResult) Unmarshal(dAtA []byte) error {
  11787. l := len(dAtA)
  11788. iNdEx := 0
  11789. for iNdEx < l {
  11790. preIndex := iNdEx
  11791. var wire uint64
  11792. for shift := uint(0); ; shift += 7 {
  11793. if shift >= 64 {
  11794. return ErrIntOverflowTypes
  11795. }
  11796. if iNdEx >= l {
  11797. return io.ErrUnexpectedEOF
  11798. }
  11799. b := dAtA[iNdEx]
  11800. iNdEx++
  11801. wire |= uint64(b&0x7F) << shift
  11802. if b < 0x80 {
  11803. break
  11804. }
  11805. }
  11806. fieldNum := int32(wire >> 3)
  11807. wireType := int(wire & 0x7)
  11808. if wireType == 4 {
  11809. return fmt.Errorf("proto: TxResult: wiretype end group for non-group")
  11810. }
  11811. if fieldNum <= 0 {
  11812. return fmt.Errorf("proto: TxResult: illegal tag %d (wire type %d)", fieldNum, wire)
  11813. }
  11814. switch fieldNum {
  11815. case 1:
  11816. if wireType != 0 {
  11817. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  11818. }
  11819. m.Height = 0
  11820. for shift := uint(0); ; shift += 7 {
  11821. if shift >= 64 {
  11822. return ErrIntOverflowTypes
  11823. }
  11824. if iNdEx >= l {
  11825. return io.ErrUnexpectedEOF
  11826. }
  11827. b := dAtA[iNdEx]
  11828. iNdEx++
  11829. m.Height |= int64(b&0x7F) << shift
  11830. if b < 0x80 {
  11831. break
  11832. }
  11833. }
  11834. case 2:
  11835. if wireType != 0 {
  11836. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  11837. }
  11838. m.Index = 0
  11839. for shift := uint(0); ; shift += 7 {
  11840. if shift >= 64 {
  11841. return ErrIntOverflowTypes
  11842. }
  11843. if iNdEx >= l {
  11844. return io.ErrUnexpectedEOF
  11845. }
  11846. b := dAtA[iNdEx]
  11847. iNdEx++
  11848. m.Index |= uint32(b&0x7F) << shift
  11849. if b < 0x80 {
  11850. break
  11851. }
  11852. }
  11853. case 3:
  11854. if wireType != 2 {
  11855. return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
  11856. }
  11857. var byteLen int
  11858. for shift := uint(0); ; shift += 7 {
  11859. if shift >= 64 {
  11860. return ErrIntOverflowTypes
  11861. }
  11862. if iNdEx >= l {
  11863. return io.ErrUnexpectedEOF
  11864. }
  11865. b := dAtA[iNdEx]
  11866. iNdEx++
  11867. byteLen |= int(b&0x7F) << shift
  11868. if b < 0x80 {
  11869. break
  11870. }
  11871. }
  11872. if byteLen < 0 {
  11873. return ErrInvalidLengthTypes
  11874. }
  11875. postIndex := iNdEx + byteLen
  11876. if postIndex < 0 {
  11877. return ErrInvalidLengthTypes
  11878. }
  11879. if postIndex > l {
  11880. return io.ErrUnexpectedEOF
  11881. }
  11882. m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...)
  11883. if m.Tx == nil {
  11884. m.Tx = []byte{}
  11885. }
  11886. iNdEx = postIndex
  11887. case 4:
  11888. if wireType != 2 {
  11889. return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
  11890. }
  11891. var msglen int
  11892. for shift := uint(0); ; shift += 7 {
  11893. if shift >= 64 {
  11894. return ErrIntOverflowTypes
  11895. }
  11896. if iNdEx >= l {
  11897. return io.ErrUnexpectedEOF
  11898. }
  11899. b := dAtA[iNdEx]
  11900. iNdEx++
  11901. msglen |= int(b&0x7F) << shift
  11902. if b < 0x80 {
  11903. break
  11904. }
  11905. }
  11906. if msglen < 0 {
  11907. return ErrInvalidLengthTypes
  11908. }
  11909. postIndex := iNdEx + msglen
  11910. if postIndex < 0 {
  11911. return ErrInvalidLengthTypes
  11912. }
  11913. if postIndex > l {
  11914. return io.ErrUnexpectedEOF
  11915. }
  11916. if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11917. return err
  11918. }
  11919. iNdEx = postIndex
  11920. default:
  11921. iNdEx = preIndex
  11922. skippy, err := skipTypes(dAtA[iNdEx:])
  11923. if err != nil {
  11924. return err
  11925. }
  11926. if (skippy < 0) || (iNdEx+skippy) < 0 {
  11927. return ErrInvalidLengthTypes
  11928. }
  11929. if (iNdEx + skippy) > l {
  11930. return io.ErrUnexpectedEOF
  11931. }
  11932. iNdEx += skippy
  11933. }
  11934. }
  11935. if iNdEx > l {
  11936. return io.ErrUnexpectedEOF
  11937. }
  11938. return nil
  11939. }
  11940. func (m *Validator) Unmarshal(dAtA []byte) error {
  11941. l := len(dAtA)
  11942. iNdEx := 0
  11943. for iNdEx < l {
  11944. preIndex := iNdEx
  11945. var wire uint64
  11946. for shift := uint(0); ; shift += 7 {
  11947. if shift >= 64 {
  11948. return ErrIntOverflowTypes
  11949. }
  11950. if iNdEx >= l {
  11951. return io.ErrUnexpectedEOF
  11952. }
  11953. b := dAtA[iNdEx]
  11954. iNdEx++
  11955. wire |= uint64(b&0x7F) << shift
  11956. if b < 0x80 {
  11957. break
  11958. }
  11959. }
  11960. fieldNum := int32(wire >> 3)
  11961. wireType := int(wire & 0x7)
  11962. if wireType == 4 {
  11963. return fmt.Errorf("proto: Validator: wiretype end group for non-group")
  11964. }
  11965. if fieldNum <= 0 {
  11966. return fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire)
  11967. }
  11968. switch fieldNum {
  11969. case 1:
  11970. if wireType != 2 {
  11971. return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
  11972. }
  11973. var byteLen int
  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. byteLen |= int(b&0x7F) << shift
  11984. if b < 0x80 {
  11985. break
  11986. }
  11987. }
  11988. if byteLen < 0 {
  11989. return ErrInvalidLengthTypes
  11990. }
  11991. postIndex := iNdEx + byteLen
  11992. if postIndex < 0 {
  11993. return ErrInvalidLengthTypes
  11994. }
  11995. if postIndex > l {
  11996. return io.ErrUnexpectedEOF
  11997. }
  11998. m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...)
  11999. if m.Address == nil {
  12000. m.Address = []byte{}
  12001. }
  12002. iNdEx = postIndex
  12003. case 3:
  12004. if wireType != 0 {
  12005. return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType)
  12006. }
  12007. m.Power = 0
  12008. for shift := uint(0); ; shift += 7 {
  12009. if shift >= 64 {
  12010. return ErrIntOverflowTypes
  12011. }
  12012. if iNdEx >= l {
  12013. return io.ErrUnexpectedEOF
  12014. }
  12015. b := dAtA[iNdEx]
  12016. iNdEx++
  12017. m.Power |= int64(b&0x7F) << shift
  12018. if b < 0x80 {
  12019. break
  12020. }
  12021. }
  12022. default:
  12023. iNdEx = preIndex
  12024. skippy, err := skipTypes(dAtA[iNdEx:])
  12025. if err != nil {
  12026. return err
  12027. }
  12028. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12029. return ErrInvalidLengthTypes
  12030. }
  12031. if (iNdEx + skippy) > l {
  12032. return io.ErrUnexpectedEOF
  12033. }
  12034. iNdEx += skippy
  12035. }
  12036. }
  12037. if iNdEx > l {
  12038. return io.ErrUnexpectedEOF
  12039. }
  12040. return nil
  12041. }
  12042. func (m *ValidatorUpdate) Unmarshal(dAtA []byte) error {
  12043. l := len(dAtA)
  12044. iNdEx := 0
  12045. for iNdEx < l {
  12046. preIndex := iNdEx
  12047. var wire uint64
  12048. for shift := uint(0); ; shift += 7 {
  12049. if shift >= 64 {
  12050. return ErrIntOverflowTypes
  12051. }
  12052. if iNdEx >= l {
  12053. return io.ErrUnexpectedEOF
  12054. }
  12055. b := dAtA[iNdEx]
  12056. iNdEx++
  12057. wire |= uint64(b&0x7F) << shift
  12058. if b < 0x80 {
  12059. break
  12060. }
  12061. }
  12062. fieldNum := int32(wire >> 3)
  12063. wireType := int(wire & 0x7)
  12064. if wireType == 4 {
  12065. return fmt.Errorf("proto: ValidatorUpdate: wiretype end group for non-group")
  12066. }
  12067. if fieldNum <= 0 {
  12068. return fmt.Errorf("proto: ValidatorUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
  12069. }
  12070. switch fieldNum {
  12071. case 1:
  12072. if wireType != 2 {
  12073. return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType)
  12074. }
  12075. var msglen int
  12076. for shift := uint(0); ; shift += 7 {
  12077. if shift >= 64 {
  12078. return ErrIntOverflowTypes
  12079. }
  12080. if iNdEx >= l {
  12081. return io.ErrUnexpectedEOF
  12082. }
  12083. b := dAtA[iNdEx]
  12084. iNdEx++
  12085. msglen |= int(b&0x7F) << shift
  12086. if b < 0x80 {
  12087. break
  12088. }
  12089. }
  12090. if msglen < 0 {
  12091. return ErrInvalidLengthTypes
  12092. }
  12093. postIndex := iNdEx + msglen
  12094. if postIndex < 0 {
  12095. return ErrInvalidLengthTypes
  12096. }
  12097. if postIndex > l {
  12098. return io.ErrUnexpectedEOF
  12099. }
  12100. if err := m.PubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12101. return err
  12102. }
  12103. iNdEx = postIndex
  12104. case 2:
  12105. if wireType != 0 {
  12106. return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType)
  12107. }
  12108. m.Power = 0
  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. m.Power |= int64(b&0x7F) << shift
  12119. if b < 0x80 {
  12120. break
  12121. }
  12122. }
  12123. default:
  12124. iNdEx = preIndex
  12125. skippy, err := skipTypes(dAtA[iNdEx:])
  12126. if err != nil {
  12127. return err
  12128. }
  12129. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12130. return ErrInvalidLengthTypes
  12131. }
  12132. if (iNdEx + skippy) > l {
  12133. return io.ErrUnexpectedEOF
  12134. }
  12135. iNdEx += skippy
  12136. }
  12137. }
  12138. if iNdEx > l {
  12139. return io.ErrUnexpectedEOF
  12140. }
  12141. return nil
  12142. }
  12143. func (m *VoteInfo) Unmarshal(dAtA []byte) error {
  12144. l := len(dAtA)
  12145. iNdEx := 0
  12146. for iNdEx < l {
  12147. preIndex := iNdEx
  12148. var wire uint64
  12149. for shift := uint(0); ; shift += 7 {
  12150. if shift >= 64 {
  12151. return ErrIntOverflowTypes
  12152. }
  12153. if iNdEx >= l {
  12154. return io.ErrUnexpectedEOF
  12155. }
  12156. b := dAtA[iNdEx]
  12157. iNdEx++
  12158. wire |= uint64(b&0x7F) << shift
  12159. if b < 0x80 {
  12160. break
  12161. }
  12162. }
  12163. fieldNum := int32(wire >> 3)
  12164. wireType := int(wire & 0x7)
  12165. if wireType == 4 {
  12166. return fmt.Errorf("proto: VoteInfo: wiretype end group for non-group")
  12167. }
  12168. if fieldNum <= 0 {
  12169. return fmt.Errorf("proto: VoteInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  12170. }
  12171. switch fieldNum {
  12172. case 1:
  12173. if wireType != 2 {
  12174. return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType)
  12175. }
  12176. var msglen int
  12177. for shift := uint(0); ; shift += 7 {
  12178. if shift >= 64 {
  12179. return ErrIntOverflowTypes
  12180. }
  12181. if iNdEx >= l {
  12182. return io.ErrUnexpectedEOF
  12183. }
  12184. b := dAtA[iNdEx]
  12185. iNdEx++
  12186. msglen |= int(b&0x7F) << shift
  12187. if b < 0x80 {
  12188. break
  12189. }
  12190. }
  12191. if msglen < 0 {
  12192. return ErrInvalidLengthTypes
  12193. }
  12194. postIndex := iNdEx + msglen
  12195. if postIndex < 0 {
  12196. return ErrInvalidLengthTypes
  12197. }
  12198. if postIndex > l {
  12199. return io.ErrUnexpectedEOF
  12200. }
  12201. if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12202. return err
  12203. }
  12204. iNdEx = postIndex
  12205. case 2:
  12206. if wireType != 0 {
  12207. return fmt.Errorf("proto: wrong wireType = %d for field SignedLastBlock", wireType)
  12208. }
  12209. var v int
  12210. for shift := uint(0); ; shift += 7 {
  12211. if shift >= 64 {
  12212. return ErrIntOverflowTypes
  12213. }
  12214. if iNdEx >= l {
  12215. return io.ErrUnexpectedEOF
  12216. }
  12217. b := dAtA[iNdEx]
  12218. iNdEx++
  12219. v |= int(b&0x7F) << shift
  12220. if b < 0x80 {
  12221. break
  12222. }
  12223. }
  12224. m.SignedLastBlock = bool(v != 0)
  12225. default:
  12226. iNdEx = preIndex
  12227. skippy, err := skipTypes(dAtA[iNdEx:])
  12228. if err != nil {
  12229. return err
  12230. }
  12231. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12232. return ErrInvalidLengthTypes
  12233. }
  12234. if (iNdEx + skippy) > l {
  12235. return io.ErrUnexpectedEOF
  12236. }
  12237. iNdEx += skippy
  12238. }
  12239. }
  12240. if iNdEx > l {
  12241. return io.ErrUnexpectedEOF
  12242. }
  12243. return nil
  12244. }
  12245. func (m *Evidence) Unmarshal(dAtA []byte) error {
  12246. l := len(dAtA)
  12247. iNdEx := 0
  12248. for iNdEx < l {
  12249. preIndex := iNdEx
  12250. var wire uint64
  12251. for shift := uint(0); ; shift += 7 {
  12252. if shift >= 64 {
  12253. return ErrIntOverflowTypes
  12254. }
  12255. if iNdEx >= l {
  12256. return io.ErrUnexpectedEOF
  12257. }
  12258. b := dAtA[iNdEx]
  12259. iNdEx++
  12260. wire |= uint64(b&0x7F) << shift
  12261. if b < 0x80 {
  12262. break
  12263. }
  12264. }
  12265. fieldNum := int32(wire >> 3)
  12266. wireType := int(wire & 0x7)
  12267. if wireType == 4 {
  12268. return fmt.Errorf("proto: Evidence: wiretype end group for non-group")
  12269. }
  12270. if fieldNum <= 0 {
  12271. return fmt.Errorf("proto: Evidence: illegal tag %d (wire type %d)", fieldNum, wire)
  12272. }
  12273. switch fieldNum {
  12274. case 1:
  12275. if wireType != 0 {
  12276. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  12277. }
  12278. m.Type = 0
  12279. for shift := uint(0); ; shift += 7 {
  12280. if shift >= 64 {
  12281. return ErrIntOverflowTypes
  12282. }
  12283. if iNdEx >= l {
  12284. return io.ErrUnexpectedEOF
  12285. }
  12286. b := dAtA[iNdEx]
  12287. iNdEx++
  12288. m.Type |= EvidenceType(b&0x7F) << shift
  12289. if b < 0x80 {
  12290. break
  12291. }
  12292. }
  12293. case 2:
  12294. if wireType != 2 {
  12295. return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType)
  12296. }
  12297. var msglen int
  12298. for shift := uint(0); ; shift += 7 {
  12299. if shift >= 64 {
  12300. return ErrIntOverflowTypes
  12301. }
  12302. if iNdEx >= l {
  12303. return io.ErrUnexpectedEOF
  12304. }
  12305. b := dAtA[iNdEx]
  12306. iNdEx++
  12307. msglen |= int(b&0x7F) << shift
  12308. if b < 0x80 {
  12309. break
  12310. }
  12311. }
  12312. if msglen < 0 {
  12313. return ErrInvalidLengthTypes
  12314. }
  12315. postIndex := iNdEx + msglen
  12316. if postIndex < 0 {
  12317. return ErrInvalidLengthTypes
  12318. }
  12319. if postIndex > l {
  12320. return io.ErrUnexpectedEOF
  12321. }
  12322. if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12323. return err
  12324. }
  12325. iNdEx = postIndex
  12326. case 3:
  12327. if wireType != 0 {
  12328. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  12329. }
  12330. m.Height = 0
  12331. for shift := uint(0); ; shift += 7 {
  12332. if shift >= 64 {
  12333. return ErrIntOverflowTypes
  12334. }
  12335. if iNdEx >= l {
  12336. return io.ErrUnexpectedEOF
  12337. }
  12338. b := dAtA[iNdEx]
  12339. iNdEx++
  12340. m.Height |= int64(b&0x7F) << shift
  12341. if b < 0x80 {
  12342. break
  12343. }
  12344. }
  12345. case 4:
  12346. if wireType != 2 {
  12347. return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
  12348. }
  12349. var msglen int
  12350. for shift := uint(0); ; shift += 7 {
  12351. if shift >= 64 {
  12352. return ErrIntOverflowTypes
  12353. }
  12354. if iNdEx >= l {
  12355. return io.ErrUnexpectedEOF
  12356. }
  12357. b := dAtA[iNdEx]
  12358. iNdEx++
  12359. msglen |= int(b&0x7F) << shift
  12360. if b < 0x80 {
  12361. break
  12362. }
  12363. }
  12364. if msglen < 0 {
  12365. return ErrInvalidLengthTypes
  12366. }
  12367. postIndex := iNdEx + msglen
  12368. if postIndex < 0 {
  12369. return ErrInvalidLengthTypes
  12370. }
  12371. if postIndex > l {
  12372. return io.ErrUnexpectedEOF
  12373. }
  12374. if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil {
  12375. return err
  12376. }
  12377. iNdEx = postIndex
  12378. case 5:
  12379. if wireType != 0 {
  12380. return fmt.Errorf("proto: wrong wireType = %d for field TotalVotingPower", wireType)
  12381. }
  12382. m.TotalVotingPower = 0
  12383. for shift := uint(0); ; shift += 7 {
  12384. if shift >= 64 {
  12385. return ErrIntOverflowTypes
  12386. }
  12387. if iNdEx >= l {
  12388. return io.ErrUnexpectedEOF
  12389. }
  12390. b := dAtA[iNdEx]
  12391. iNdEx++
  12392. m.TotalVotingPower |= int64(b&0x7F) << shift
  12393. if b < 0x80 {
  12394. break
  12395. }
  12396. }
  12397. default:
  12398. iNdEx = preIndex
  12399. skippy, err := skipTypes(dAtA[iNdEx:])
  12400. if err != nil {
  12401. return err
  12402. }
  12403. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12404. return ErrInvalidLengthTypes
  12405. }
  12406. if (iNdEx + skippy) > l {
  12407. return io.ErrUnexpectedEOF
  12408. }
  12409. iNdEx += skippy
  12410. }
  12411. }
  12412. if iNdEx > l {
  12413. return io.ErrUnexpectedEOF
  12414. }
  12415. return nil
  12416. }
  12417. func (m *Snapshot) Unmarshal(dAtA []byte) error {
  12418. l := len(dAtA)
  12419. iNdEx := 0
  12420. for iNdEx < l {
  12421. preIndex := iNdEx
  12422. var wire uint64
  12423. for shift := uint(0); ; shift += 7 {
  12424. if shift >= 64 {
  12425. return ErrIntOverflowTypes
  12426. }
  12427. if iNdEx >= l {
  12428. return io.ErrUnexpectedEOF
  12429. }
  12430. b := dAtA[iNdEx]
  12431. iNdEx++
  12432. wire |= uint64(b&0x7F) << shift
  12433. if b < 0x80 {
  12434. break
  12435. }
  12436. }
  12437. fieldNum := int32(wire >> 3)
  12438. wireType := int(wire & 0x7)
  12439. if wireType == 4 {
  12440. return fmt.Errorf("proto: Snapshot: wiretype end group for non-group")
  12441. }
  12442. if fieldNum <= 0 {
  12443. return fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire)
  12444. }
  12445. switch fieldNum {
  12446. case 1:
  12447. if wireType != 0 {
  12448. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  12449. }
  12450. m.Height = 0
  12451. for shift := uint(0); ; shift += 7 {
  12452. if shift >= 64 {
  12453. return ErrIntOverflowTypes
  12454. }
  12455. if iNdEx >= l {
  12456. return io.ErrUnexpectedEOF
  12457. }
  12458. b := dAtA[iNdEx]
  12459. iNdEx++
  12460. m.Height |= uint64(b&0x7F) << shift
  12461. if b < 0x80 {
  12462. break
  12463. }
  12464. }
  12465. case 2:
  12466. if wireType != 0 {
  12467. return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType)
  12468. }
  12469. m.Format = 0
  12470. for shift := uint(0); ; shift += 7 {
  12471. if shift >= 64 {
  12472. return ErrIntOverflowTypes
  12473. }
  12474. if iNdEx >= l {
  12475. return io.ErrUnexpectedEOF
  12476. }
  12477. b := dAtA[iNdEx]
  12478. iNdEx++
  12479. m.Format |= uint32(b&0x7F) << shift
  12480. if b < 0x80 {
  12481. break
  12482. }
  12483. }
  12484. case 3:
  12485. if wireType != 0 {
  12486. return fmt.Errorf("proto: wrong wireType = %d for field Chunks", wireType)
  12487. }
  12488. m.Chunks = 0
  12489. for shift := uint(0); ; shift += 7 {
  12490. if shift >= 64 {
  12491. return ErrIntOverflowTypes
  12492. }
  12493. if iNdEx >= l {
  12494. return io.ErrUnexpectedEOF
  12495. }
  12496. b := dAtA[iNdEx]
  12497. iNdEx++
  12498. m.Chunks |= uint32(b&0x7F) << shift
  12499. if b < 0x80 {
  12500. break
  12501. }
  12502. }
  12503. case 4:
  12504. if wireType != 2 {
  12505. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  12506. }
  12507. var byteLen int
  12508. for shift := uint(0); ; shift += 7 {
  12509. if shift >= 64 {
  12510. return ErrIntOverflowTypes
  12511. }
  12512. if iNdEx >= l {
  12513. return io.ErrUnexpectedEOF
  12514. }
  12515. b := dAtA[iNdEx]
  12516. iNdEx++
  12517. byteLen |= int(b&0x7F) << shift
  12518. if b < 0x80 {
  12519. break
  12520. }
  12521. }
  12522. if byteLen < 0 {
  12523. return ErrInvalidLengthTypes
  12524. }
  12525. postIndex := iNdEx + byteLen
  12526. if postIndex < 0 {
  12527. return ErrInvalidLengthTypes
  12528. }
  12529. if postIndex > l {
  12530. return io.ErrUnexpectedEOF
  12531. }
  12532. m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  12533. if m.Hash == nil {
  12534. m.Hash = []byte{}
  12535. }
  12536. iNdEx = postIndex
  12537. case 5:
  12538. if wireType != 2 {
  12539. return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
  12540. }
  12541. var byteLen int
  12542. for shift := uint(0); ; shift += 7 {
  12543. if shift >= 64 {
  12544. return ErrIntOverflowTypes
  12545. }
  12546. if iNdEx >= l {
  12547. return io.ErrUnexpectedEOF
  12548. }
  12549. b := dAtA[iNdEx]
  12550. iNdEx++
  12551. byteLen |= int(b&0x7F) << shift
  12552. if b < 0x80 {
  12553. break
  12554. }
  12555. }
  12556. if byteLen < 0 {
  12557. return ErrInvalidLengthTypes
  12558. }
  12559. postIndex := iNdEx + byteLen
  12560. if postIndex < 0 {
  12561. return ErrInvalidLengthTypes
  12562. }
  12563. if postIndex > l {
  12564. return io.ErrUnexpectedEOF
  12565. }
  12566. m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...)
  12567. if m.Metadata == nil {
  12568. m.Metadata = []byte{}
  12569. }
  12570. iNdEx = postIndex
  12571. default:
  12572. iNdEx = preIndex
  12573. skippy, err := skipTypes(dAtA[iNdEx:])
  12574. if err != nil {
  12575. return err
  12576. }
  12577. if (skippy < 0) || (iNdEx+skippy) < 0 {
  12578. return ErrInvalidLengthTypes
  12579. }
  12580. if (iNdEx + skippy) > l {
  12581. return io.ErrUnexpectedEOF
  12582. }
  12583. iNdEx += skippy
  12584. }
  12585. }
  12586. if iNdEx > l {
  12587. return io.ErrUnexpectedEOF
  12588. }
  12589. return nil
  12590. }
  12591. func skipTypes(dAtA []byte) (n int, err error) {
  12592. l := len(dAtA)
  12593. iNdEx := 0
  12594. depth := 0
  12595. for iNdEx < l {
  12596. var wire uint64
  12597. for shift := uint(0); ; shift += 7 {
  12598. if shift >= 64 {
  12599. return 0, ErrIntOverflowTypes
  12600. }
  12601. if iNdEx >= l {
  12602. return 0, io.ErrUnexpectedEOF
  12603. }
  12604. b := dAtA[iNdEx]
  12605. iNdEx++
  12606. wire |= (uint64(b) & 0x7F) << shift
  12607. if b < 0x80 {
  12608. break
  12609. }
  12610. }
  12611. wireType := int(wire & 0x7)
  12612. switch wireType {
  12613. case 0:
  12614. for shift := uint(0); ; shift += 7 {
  12615. if shift >= 64 {
  12616. return 0, ErrIntOverflowTypes
  12617. }
  12618. if iNdEx >= l {
  12619. return 0, io.ErrUnexpectedEOF
  12620. }
  12621. iNdEx++
  12622. if dAtA[iNdEx-1] < 0x80 {
  12623. break
  12624. }
  12625. }
  12626. case 1:
  12627. iNdEx += 8
  12628. case 2:
  12629. var length int
  12630. for shift := uint(0); ; shift += 7 {
  12631. if shift >= 64 {
  12632. return 0, ErrIntOverflowTypes
  12633. }
  12634. if iNdEx >= l {
  12635. return 0, io.ErrUnexpectedEOF
  12636. }
  12637. b := dAtA[iNdEx]
  12638. iNdEx++
  12639. length |= (int(b) & 0x7F) << shift
  12640. if b < 0x80 {
  12641. break
  12642. }
  12643. }
  12644. if length < 0 {
  12645. return 0, ErrInvalidLengthTypes
  12646. }
  12647. iNdEx += length
  12648. case 3:
  12649. depth++
  12650. case 4:
  12651. if depth == 0 {
  12652. return 0, ErrUnexpectedEndOfGroupTypes
  12653. }
  12654. depth--
  12655. case 5:
  12656. iNdEx += 4
  12657. default:
  12658. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  12659. }
  12660. if iNdEx < 0 {
  12661. return 0, ErrInvalidLengthTypes
  12662. }
  12663. if depth == 0 {
  12664. return iNdEx, nil
  12665. }
  12666. }
  12667. return 0, io.ErrUnexpectedEOF
  12668. }
  12669. var (
  12670. ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
  12671. ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
  12672. ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
  12673. )