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.

13495 lines
322 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
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
5 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
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
5 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
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
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
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
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>
4 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
5 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
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>
4 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>
4 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
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
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
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
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
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
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
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
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
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
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
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>
4 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>
4 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
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
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
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
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
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
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>
4 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>
4 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>
4 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>
4 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>
4 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
5 years ago
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: tendermint/abci/types.proto
  3. package types
  4. import (
  5. context "context"
  6. fmt "fmt"
  7. _ "github.com/gogo/protobuf/gogoproto"
  8. proto "github.com/gogo/protobuf/proto"
  9. _ "github.com/gogo/protobuf/types"
  10. github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
  11. crypto "github.com/tendermint/tendermint/proto/tendermint/crypto"
  12. types1 "github.com/tendermint/tendermint/proto/tendermint/types"
  13. grpc "google.golang.org/grpc"
  14. codes "google.golang.org/grpc/codes"
  15. status "google.golang.org/grpc/status"
  16. io "io"
  17. math "math"
  18. math_bits "math/bits"
  19. time "time"
  20. )
  21. // Reference imports to suppress errors if they are not otherwise used.
  22. var _ = proto.Marshal
  23. var _ = fmt.Errorf
  24. var _ = math.Inf
  25. var _ = time.Kitchen
  26. // This is a compile-time assertion to ensure that this generated file
  27. // is compatible with the proto package it is being compiled against.
  28. // A compilation error at this line likely means your copy of the
  29. // proto package needs to be updated.
  30. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  31. type CheckTxType int32
  32. const (
  33. CheckTxType_New CheckTxType = 0
  34. CheckTxType_Recheck CheckTxType = 1
  35. )
  36. var CheckTxType_name = map[int32]string{
  37. 0: "NEW",
  38. 1: "RECHECK",
  39. }
  40. var CheckTxType_value = map[string]int32{
  41. "NEW": 0,
  42. "RECHECK": 1,
  43. }
  44. func (x CheckTxType) String() string {
  45. return proto.EnumName(CheckTxType_name, int32(x))
  46. }
  47. func (CheckTxType) EnumDescriptor() ([]byte, []int) {
  48. return fileDescriptor_252557cfdd89a31a, []int{0}
  49. }
  50. type EvidenceType int32
  51. const (
  52. EvidenceType_UNKNOWN EvidenceType = 0
  53. EvidenceType_DUPLICATE_VOTE EvidenceType = 1
  54. EvidenceType_LIGHT_CLIENT_ATTACK EvidenceType = 2
  55. )
  56. var EvidenceType_name = map[int32]string{
  57. 0: "UNKNOWN",
  58. 1: "DUPLICATE_VOTE",
  59. 2: "LIGHT_CLIENT_ATTACK",
  60. }
  61. var EvidenceType_value = map[string]int32{
  62. "UNKNOWN": 0,
  63. "DUPLICATE_VOTE": 1,
  64. "LIGHT_CLIENT_ATTACK": 2,
  65. }
  66. func (x EvidenceType) String() string {
  67. return proto.EnumName(EvidenceType_name, int32(x))
  68. }
  69. func (EvidenceType) EnumDescriptor() ([]byte, []int) {
  70. return fileDescriptor_252557cfdd89a31a, []int{1}
  71. }
  72. type ResponseOfferSnapshot_Result int32
  73. const (
  74. ResponseOfferSnapshot_UNKNOWN ResponseOfferSnapshot_Result = 0
  75. ResponseOfferSnapshot_ACCEPT ResponseOfferSnapshot_Result = 1
  76. ResponseOfferSnapshot_ABORT ResponseOfferSnapshot_Result = 2
  77. ResponseOfferSnapshot_REJECT ResponseOfferSnapshot_Result = 3
  78. ResponseOfferSnapshot_REJECT_FORMAT ResponseOfferSnapshot_Result = 4
  79. ResponseOfferSnapshot_REJECT_SENDER ResponseOfferSnapshot_Result = 5
  80. )
  81. var ResponseOfferSnapshot_Result_name = map[int32]string{
  82. 0: "UNKNOWN",
  83. 1: "ACCEPT",
  84. 2: "ABORT",
  85. 3: "REJECT",
  86. 4: "REJECT_FORMAT",
  87. 5: "REJECT_SENDER",
  88. }
  89. var ResponseOfferSnapshot_Result_value = map[string]int32{
  90. "UNKNOWN": 0,
  91. "ACCEPT": 1,
  92. "ABORT": 2,
  93. "REJECT": 3,
  94. "REJECT_FORMAT": 4,
  95. "REJECT_SENDER": 5,
  96. }
  97. func (x ResponseOfferSnapshot_Result) String() string {
  98. return proto.EnumName(ResponseOfferSnapshot_Result_name, int32(x))
  99. }
  100. func (ResponseOfferSnapshot_Result) EnumDescriptor() ([]byte, []int) {
  101. return fileDescriptor_252557cfdd89a31a, []int{28, 0}
  102. }
  103. type ResponseApplySnapshotChunk_Result int32
  104. const (
  105. ResponseApplySnapshotChunk_UNKNOWN ResponseApplySnapshotChunk_Result = 0
  106. ResponseApplySnapshotChunk_ACCEPT ResponseApplySnapshotChunk_Result = 1
  107. ResponseApplySnapshotChunk_ABORT ResponseApplySnapshotChunk_Result = 2
  108. ResponseApplySnapshotChunk_RETRY ResponseApplySnapshotChunk_Result = 3
  109. ResponseApplySnapshotChunk_RETRY_SNAPSHOT ResponseApplySnapshotChunk_Result = 4
  110. ResponseApplySnapshotChunk_REJECT_SNAPSHOT ResponseApplySnapshotChunk_Result = 5
  111. )
  112. var ResponseApplySnapshotChunk_Result_name = map[int32]string{
  113. 0: "UNKNOWN",
  114. 1: "ACCEPT",
  115. 2: "ABORT",
  116. 3: "RETRY",
  117. 4: "RETRY_SNAPSHOT",
  118. 5: "REJECT_SNAPSHOT",
  119. }
  120. var ResponseApplySnapshotChunk_Result_value = map[string]int32{
  121. "UNKNOWN": 0,
  122. "ACCEPT": 1,
  123. "ABORT": 2,
  124. "RETRY": 3,
  125. "RETRY_SNAPSHOT": 4,
  126. "REJECT_SNAPSHOT": 5,
  127. }
  128. func (x ResponseApplySnapshotChunk_Result) String() string {
  129. return proto.EnumName(ResponseApplySnapshotChunk_Result_name, int32(x))
  130. }
  131. func (ResponseApplySnapshotChunk_Result) EnumDescriptor() ([]byte, []int) {
  132. return fileDescriptor_252557cfdd89a31a, []int{30, 0}
  133. }
  134. type Request struct {
  135. // Types that are valid to be assigned to Value:
  136. // *Request_Echo
  137. // *Request_Flush
  138. // *Request_Info
  139. // *Request_InitChain
  140. // *Request_Query
  141. // *Request_BeginBlock
  142. // *Request_CheckTx
  143. // *Request_DeliverTx
  144. // *Request_EndBlock
  145. // *Request_Commit
  146. // *Request_ListSnapshots
  147. // *Request_OfferSnapshot
  148. // *Request_LoadSnapshotChunk
  149. // *Request_ApplySnapshotChunk
  150. Value isRequest_Value `protobuf_oneof:"value"`
  151. }
  152. func (m *Request) Reset() { *m = Request{} }
  153. func (m *Request) String() string { return proto.CompactTextString(m) }
  154. func (*Request) ProtoMessage() {}
  155. func (*Request) Descriptor() ([]byte, []int) {
  156. return fileDescriptor_252557cfdd89a31a, []int{0}
  157. }
  158. func (m *Request) XXX_Unmarshal(b []byte) error {
  159. return m.Unmarshal(b)
  160. }
  161. func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  162. if deterministic {
  163. return xxx_messageInfo_Request.Marshal(b, m, deterministic)
  164. } else {
  165. b = b[:cap(b)]
  166. n, err := m.MarshalToSizedBuffer(b)
  167. if err != nil {
  168. return nil, err
  169. }
  170. return b[:n], nil
  171. }
  172. }
  173. func (m *Request) XXX_Merge(src proto.Message) {
  174. xxx_messageInfo_Request.Merge(m, src)
  175. }
  176. func (m *Request) XXX_Size() int {
  177. return m.Size()
  178. }
  179. func (m *Request) XXX_DiscardUnknown() {
  180. xxx_messageInfo_Request.DiscardUnknown(m)
  181. }
  182. var xxx_messageInfo_Request proto.InternalMessageInfo
  183. type isRequest_Value interface {
  184. isRequest_Value()
  185. MarshalTo([]byte) (int, error)
  186. Size() int
  187. }
  188. type Request_Echo struct {
  189. Echo *RequestEcho `protobuf:"bytes,1,opt,name=echo,proto3,oneof" json:"echo,omitempty"`
  190. }
  191. type Request_Flush struct {
  192. Flush *RequestFlush `protobuf:"bytes,2,opt,name=flush,proto3,oneof" json:"flush,omitempty"`
  193. }
  194. type Request_Info struct {
  195. Info *RequestInfo `protobuf:"bytes,3,opt,name=info,proto3,oneof" json:"info,omitempty"`
  196. }
  197. type Request_InitChain struct {
  198. InitChain *RequestInitChain `protobuf:"bytes,4,opt,name=init_chain,json=initChain,proto3,oneof" json:"init_chain,omitempty"`
  199. }
  200. type Request_Query struct {
  201. Query *RequestQuery `protobuf:"bytes,5,opt,name=query,proto3,oneof" json:"query,omitempty"`
  202. }
  203. type Request_BeginBlock struct {
  204. BeginBlock *RequestBeginBlock `protobuf:"bytes,6,opt,name=begin_block,json=beginBlock,proto3,oneof" json:"begin_block,omitempty"`
  205. }
  206. type Request_CheckTx struct {
  207. CheckTx *RequestCheckTx `protobuf:"bytes,7,opt,name=check_tx,json=checkTx,proto3,oneof" json:"check_tx,omitempty"`
  208. }
  209. type Request_DeliverTx struct {
  210. DeliverTx *RequestDeliverTx `protobuf:"bytes,8,opt,name=deliver_tx,json=deliverTx,proto3,oneof" json:"deliver_tx,omitempty"`
  211. }
  212. type Request_EndBlock struct {
  213. EndBlock *RequestEndBlock `protobuf:"bytes,9,opt,name=end_block,json=endBlock,proto3,oneof" json:"end_block,omitempty"`
  214. }
  215. type Request_Commit struct {
  216. Commit *RequestCommit `protobuf:"bytes,10,opt,name=commit,proto3,oneof" json:"commit,omitempty"`
  217. }
  218. type Request_ListSnapshots struct {
  219. ListSnapshots *RequestListSnapshots `protobuf:"bytes,11,opt,name=list_snapshots,json=listSnapshots,proto3,oneof" json:"list_snapshots,omitempty"`
  220. }
  221. type Request_OfferSnapshot struct {
  222. OfferSnapshot *RequestOfferSnapshot `protobuf:"bytes,12,opt,name=offer_snapshot,json=offerSnapshot,proto3,oneof" json:"offer_snapshot,omitempty"`
  223. }
  224. type Request_LoadSnapshotChunk struct {
  225. LoadSnapshotChunk *RequestLoadSnapshotChunk `protobuf:"bytes,13,opt,name=load_snapshot_chunk,json=loadSnapshotChunk,proto3,oneof" json:"load_snapshot_chunk,omitempty"`
  226. }
  227. type Request_ApplySnapshotChunk struct {
  228. ApplySnapshotChunk *RequestApplySnapshotChunk `protobuf:"bytes,14,opt,name=apply_snapshot_chunk,json=applySnapshotChunk,proto3,oneof" json:"apply_snapshot_chunk,omitempty"`
  229. }
  230. func (*Request_Echo) isRequest_Value() {}
  231. func (*Request_Flush) isRequest_Value() {}
  232. func (*Request_Info) isRequest_Value() {}
  233. func (*Request_InitChain) isRequest_Value() {}
  234. func (*Request_Query) isRequest_Value() {}
  235. func (*Request_BeginBlock) isRequest_Value() {}
  236. func (*Request_CheckTx) isRequest_Value() {}
  237. func (*Request_DeliverTx) isRequest_Value() {}
  238. func (*Request_EndBlock) isRequest_Value() {}
  239. func (*Request_Commit) isRequest_Value() {}
  240. func (*Request_ListSnapshots) isRequest_Value() {}
  241. func (*Request_OfferSnapshot) isRequest_Value() {}
  242. func (*Request_LoadSnapshotChunk) isRequest_Value() {}
  243. func (*Request_ApplySnapshotChunk) isRequest_Value() {}
  244. func (m *Request) GetValue() isRequest_Value {
  245. if m != nil {
  246. return m.Value
  247. }
  248. return nil
  249. }
  250. func (m *Request) GetEcho() *RequestEcho {
  251. if x, ok := m.GetValue().(*Request_Echo); ok {
  252. return x.Echo
  253. }
  254. return nil
  255. }
  256. func (m *Request) GetFlush() *RequestFlush {
  257. if x, ok := m.GetValue().(*Request_Flush); ok {
  258. return x.Flush
  259. }
  260. return nil
  261. }
  262. func (m *Request) GetInfo() *RequestInfo {
  263. if x, ok := m.GetValue().(*Request_Info); ok {
  264. return x.Info
  265. }
  266. return nil
  267. }
  268. func (m *Request) GetInitChain() *RequestInitChain {
  269. if x, ok := m.GetValue().(*Request_InitChain); ok {
  270. return x.InitChain
  271. }
  272. return nil
  273. }
  274. func (m *Request) GetQuery() *RequestQuery {
  275. if x, ok := m.GetValue().(*Request_Query); ok {
  276. return x.Query
  277. }
  278. return nil
  279. }
  280. func (m *Request) GetBeginBlock() *RequestBeginBlock {
  281. if x, ok := m.GetValue().(*Request_BeginBlock); ok {
  282. return x.BeginBlock
  283. }
  284. return nil
  285. }
  286. func (m *Request) GetCheckTx() *RequestCheckTx {
  287. if x, ok := m.GetValue().(*Request_CheckTx); ok {
  288. return x.CheckTx
  289. }
  290. return nil
  291. }
  292. func (m *Request) GetDeliverTx() *RequestDeliverTx {
  293. if x, ok := m.GetValue().(*Request_DeliverTx); ok {
  294. return x.DeliverTx
  295. }
  296. return nil
  297. }
  298. func (m *Request) GetEndBlock() *RequestEndBlock {
  299. if x, ok := m.GetValue().(*Request_EndBlock); ok {
  300. return x.EndBlock
  301. }
  302. return nil
  303. }
  304. func (m *Request) GetCommit() *RequestCommit {
  305. if x, ok := m.GetValue().(*Request_Commit); ok {
  306. return x.Commit
  307. }
  308. return nil
  309. }
  310. func (m *Request) GetListSnapshots() *RequestListSnapshots {
  311. if x, ok := m.GetValue().(*Request_ListSnapshots); ok {
  312. return x.ListSnapshots
  313. }
  314. return nil
  315. }
  316. func (m *Request) GetOfferSnapshot() *RequestOfferSnapshot {
  317. if x, ok := m.GetValue().(*Request_OfferSnapshot); ok {
  318. return x.OfferSnapshot
  319. }
  320. return nil
  321. }
  322. func (m *Request) GetLoadSnapshotChunk() *RequestLoadSnapshotChunk {
  323. if x, ok := m.GetValue().(*Request_LoadSnapshotChunk); ok {
  324. return x.LoadSnapshotChunk
  325. }
  326. return nil
  327. }
  328. func (m *Request) GetApplySnapshotChunk() *RequestApplySnapshotChunk {
  329. if x, ok := m.GetValue().(*Request_ApplySnapshotChunk); ok {
  330. return x.ApplySnapshotChunk
  331. }
  332. return nil
  333. }
  334. // XXX_OneofWrappers is for the internal use of the proto package.
  335. func (*Request) XXX_OneofWrappers() []interface{} {
  336. return []interface{}{
  337. (*Request_Echo)(nil),
  338. (*Request_Flush)(nil),
  339. (*Request_Info)(nil),
  340. (*Request_InitChain)(nil),
  341. (*Request_Query)(nil),
  342. (*Request_BeginBlock)(nil),
  343. (*Request_CheckTx)(nil),
  344. (*Request_DeliverTx)(nil),
  345. (*Request_EndBlock)(nil),
  346. (*Request_Commit)(nil),
  347. (*Request_ListSnapshots)(nil),
  348. (*Request_OfferSnapshot)(nil),
  349. (*Request_LoadSnapshotChunk)(nil),
  350. (*Request_ApplySnapshotChunk)(nil),
  351. }
  352. }
  353. type RequestEcho struct {
  354. Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
  355. }
  356. func (m *RequestEcho) Reset() { *m = RequestEcho{} }
  357. func (m *RequestEcho) String() string { return proto.CompactTextString(m) }
  358. func (*RequestEcho) ProtoMessage() {}
  359. func (*RequestEcho) Descriptor() ([]byte, []int) {
  360. return fileDescriptor_252557cfdd89a31a, []int{1}
  361. }
  362. func (m *RequestEcho) XXX_Unmarshal(b []byte) error {
  363. return m.Unmarshal(b)
  364. }
  365. func (m *RequestEcho) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  366. if deterministic {
  367. return xxx_messageInfo_RequestEcho.Marshal(b, m, deterministic)
  368. } else {
  369. b = b[:cap(b)]
  370. n, err := m.MarshalToSizedBuffer(b)
  371. if err != nil {
  372. return nil, err
  373. }
  374. return b[:n], nil
  375. }
  376. }
  377. func (m *RequestEcho) XXX_Merge(src proto.Message) {
  378. xxx_messageInfo_RequestEcho.Merge(m, src)
  379. }
  380. func (m *RequestEcho) XXX_Size() int {
  381. return m.Size()
  382. }
  383. func (m *RequestEcho) XXX_DiscardUnknown() {
  384. xxx_messageInfo_RequestEcho.DiscardUnknown(m)
  385. }
  386. var xxx_messageInfo_RequestEcho proto.InternalMessageInfo
  387. func (m *RequestEcho) GetMessage() string {
  388. if m != nil {
  389. return m.Message
  390. }
  391. return ""
  392. }
  393. type RequestFlush struct {
  394. }
  395. func (m *RequestFlush) Reset() { *m = RequestFlush{} }
  396. func (m *RequestFlush) String() string { return proto.CompactTextString(m) }
  397. func (*RequestFlush) ProtoMessage() {}
  398. func (*RequestFlush) Descriptor() ([]byte, []int) {
  399. return fileDescriptor_252557cfdd89a31a, []int{2}
  400. }
  401. func (m *RequestFlush) XXX_Unmarshal(b []byte) error {
  402. return m.Unmarshal(b)
  403. }
  404. func (m *RequestFlush) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  405. if deterministic {
  406. return xxx_messageInfo_RequestFlush.Marshal(b, m, deterministic)
  407. } else {
  408. b = b[:cap(b)]
  409. n, err := m.MarshalToSizedBuffer(b)
  410. if err != nil {
  411. return nil, err
  412. }
  413. return b[:n], nil
  414. }
  415. }
  416. func (m *RequestFlush) XXX_Merge(src proto.Message) {
  417. xxx_messageInfo_RequestFlush.Merge(m, src)
  418. }
  419. func (m *RequestFlush) XXX_Size() int {
  420. return m.Size()
  421. }
  422. func (m *RequestFlush) XXX_DiscardUnknown() {
  423. xxx_messageInfo_RequestFlush.DiscardUnknown(m)
  424. }
  425. var xxx_messageInfo_RequestFlush proto.InternalMessageInfo
  426. type RequestInfo struct {
  427. Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
  428. BlockVersion uint64 `protobuf:"varint,2,opt,name=block_version,json=blockVersion,proto3" json:"block_version,omitempty"`
  429. P2PVersion uint64 `protobuf:"varint,3,opt,name=p2p_version,json=p2pVersion,proto3" json:"p2p_version,omitempty"`
  430. AbciVersion string `protobuf:"bytes,4,opt,name=abci_version,json=abciVersion,proto3" json:"abci_version,omitempty"`
  431. }
  432. func (m *RequestInfo) Reset() { *m = RequestInfo{} }
  433. func (m *RequestInfo) String() string { return proto.CompactTextString(m) }
  434. func (*RequestInfo) ProtoMessage() {}
  435. func (*RequestInfo) Descriptor() ([]byte, []int) {
  436. return fileDescriptor_252557cfdd89a31a, []int{3}
  437. }
  438. func (m *RequestInfo) XXX_Unmarshal(b []byte) error {
  439. return m.Unmarshal(b)
  440. }
  441. func (m *RequestInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  442. if deterministic {
  443. return xxx_messageInfo_RequestInfo.Marshal(b, m, deterministic)
  444. } else {
  445. b = b[:cap(b)]
  446. n, err := m.MarshalToSizedBuffer(b)
  447. if err != nil {
  448. return nil, err
  449. }
  450. return b[:n], nil
  451. }
  452. }
  453. func (m *RequestInfo) XXX_Merge(src proto.Message) {
  454. xxx_messageInfo_RequestInfo.Merge(m, src)
  455. }
  456. func (m *RequestInfo) XXX_Size() int {
  457. return m.Size()
  458. }
  459. func (m *RequestInfo) XXX_DiscardUnknown() {
  460. xxx_messageInfo_RequestInfo.DiscardUnknown(m)
  461. }
  462. var xxx_messageInfo_RequestInfo proto.InternalMessageInfo
  463. func (m *RequestInfo) GetVersion() string {
  464. if m != nil {
  465. return m.Version
  466. }
  467. return ""
  468. }
  469. func (m *RequestInfo) GetBlockVersion() uint64 {
  470. if m != nil {
  471. return m.BlockVersion
  472. }
  473. return 0
  474. }
  475. func (m *RequestInfo) GetP2PVersion() uint64 {
  476. if m != nil {
  477. return m.P2PVersion
  478. }
  479. return 0
  480. }
  481. func (m *RequestInfo) GetAbciVersion() string {
  482. if m != nil {
  483. return m.AbciVersion
  484. }
  485. return ""
  486. }
  487. type RequestInitChain struct {
  488. Time time.Time `protobuf:"bytes,1,opt,name=time,proto3,stdtime" json:"time"`
  489. ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
  490. ConsensusParams *types1.ConsensusParams `protobuf:"bytes,3,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params,omitempty"`
  491. Validators []ValidatorUpdate `protobuf:"bytes,4,rep,name=validators,proto3" json:"validators"`
  492. AppStateBytes []byte `protobuf:"bytes,5,opt,name=app_state_bytes,json=appStateBytes,proto3" json:"app_state_bytes,omitempty"`
  493. InitialHeight int64 `protobuf:"varint,6,opt,name=initial_height,json=initialHeight,proto3" json:"initial_height,omitempty"`
  494. }
  495. func (m *RequestInitChain) Reset() { *m = RequestInitChain{} }
  496. func (m *RequestInitChain) String() string { return proto.CompactTextString(m) }
  497. func (*RequestInitChain) ProtoMessage() {}
  498. func (*RequestInitChain) Descriptor() ([]byte, []int) {
  499. return fileDescriptor_252557cfdd89a31a, []int{4}
  500. }
  501. func (m *RequestInitChain) XXX_Unmarshal(b []byte) error {
  502. return m.Unmarshal(b)
  503. }
  504. func (m *RequestInitChain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  505. if deterministic {
  506. return xxx_messageInfo_RequestInitChain.Marshal(b, m, deterministic)
  507. } else {
  508. b = b[:cap(b)]
  509. n, err := m.MarshalToSizedBuffer(b)
  510. if err != nil {
  511. return nil, err
  512. }
  513. return b[:n], nil
  514. }
  515. }
  516. func (m *RequestInitChain) XXX_Merge(src proto.Message) {
  517. xxx_messageInfo_RequestInitChain.Merge(m, src)
  518. }
  519. func (m *RequestInitChain) XXX_Size() int {
  520. return m.Size()
  521. }
  522. func (m *RequestInitChain) XXX_DiscardUnknown() {
  523. xxx_messageInfo_RequestInitChain.DiscardUnknown(m)
  524. }
  525. var xxx_messageInfo_RequestInitChain proto.InternalMessageInfo
  526. func (m *RequestInitChain) GetTime() time.Time {
  527. if m != nil {
  528. return m.Time
  529. }
  530. return time.Time{}
  531. }
  532. func (m *RequestInitChain) GetChainId() string {
  533. if m != nil {
  534. return m.ChainId
  535. }
  536. return ""
  537. }
  538. func (m *RequestInitChain) GetConsensusParams() *types1.ConsensusParams {
  539. if m != nil {
  540. return m.ConsensusParams
  541. }
  542. return nil
  543. }
  544. func (m *RequestInitChain) GetValidators() []ValidatorUpdate {
  545. if m != nil {
  546. return m.Validators
  547. }
  548. return nil
  549. }
  550. func (m *RequestInitChain) GetAppStateBytes() []byte {
  551. if m != nil {
  552. return m.AppStateBytes
  553. }
  554. return nil
  555. }
  556. func (m *RequestInitChain) GetInitialHeight() int64 {
  557. if m != nil {
  558. return m.InitialHeight
  559. }
  560. return 0
  561. }
  562. type RequestQuery struct {
  563. Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
  564. Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
  565. Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
  566. Prove bool `protobuf:"varint,4,opt,name=prove,proto3" json:"prove,omitempty"`
  567. }
  568. func (m *RequestQuery) Reset() { *m = RequestQuery{} }
  569. func (m *RequestQuery) String() string { return proto.CompactTextString(m) }
  570. func (*RequestQuery) ProtoMessage() {}
  571. func (*RequestQuery) Descriptor() ([]byte, []int) {
  572. return fileDescriptor_252557cfdd89a31a, []int{5}
  573. }
  574. func (m *RequestQuery) XXX_Unmarshal(b []byte) error {
  575. return m.Unmarshal(b)
  576. }
  577. func (m *RequestQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  578. if deterministic {
  579. return xxx_messageInfo_RequestQuery.Marshal(b, m, deterministic)
  580. } else {
  581. b = b[:cap(b)]
  582. n, err := m.MarshalToSizedBuffer(b)
  583. if err != nil {
  584. return nil, err
  585. }
  586. return b[:n], nil
  587. }
  588. }
  589. func (m *RequestQuery) XXX_Merge(src proto.Message) {
  590. xxx_messageInfo_RequestQuery.Merge(m, src)
  591. }
  592. func (m *RequestQuery) XXX_Size() int {
  593. return m.Size()
  594. }
  595. func (m *RequestQuery) XXX_DiscardUnknown() {
  596. xxx_messageInfo_RequestQuery.DiscardUnknown(m)
  597. }
  598. var xxx_messageInfo_RequestQuery proto.InternalMessageInfo
  599. func (m *RequestQuery) GetData() []byte {
  600. if m != nil {
  601. return m.Data
  602. }
  603. return nil
  604. }
  605. func (m *RequestQuery) GetPath() string {
  606. if m != nil {
  607. return m.Path
  608. }
  609. return ""
  610. }
  611. func (m *RequestQuery) GetHeight() int64 {
  612. if m != nil {
  613. return m.Height
  614. }
  615. return 0
  616. }
  617. func (m *RequestQuery) GetProve() bool {
  618. if m != nil {
  619. return m.Prove
  620. }
  621. return false
  622. }
  623. type RequestBeginBlock struct {
  624. Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
  625. Header types1.Header `protobuf:"bytes,2,opt,name=header,proto3" json:"header"`
  626. LastCommitInfo LastCommitInfo `protobuf:"bytes,3,opt,name=last_commit_info,json=lastCommitInfo,proto3" json:"last_commit_info"`
  627. ByzantineValidators []Evidence `protobuf:"bytes,4,rep,name=byzantine_validators,json=byzantineValidators,proto3" json:"byzantine_validators"`
  628. }
  629. func (m *RequestBeginBlock) Reset() { *m = RequestBeginBlock{} }
  630. func (m *RequestBeginBlock) String() string { return proto.CompactTextString(m) }
  631. func (*RequestBeginBlock) ProtoMessage() {}
  632. func (*RequestBeginBlock) Descriptor() ([]byte, []int) {
  633. return fileDescriptor_252557cfdd89a31a, []int{6}
  634. }
  635. func (m *RequestBeginBlock) XXX_Unmarshal(b []byte) error {
  636. return m.Unmarshal(b)
  637. }
  638. func (m *RequestBeginBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  639. if deterministic {
  640. return xxx_messageInfo_RequestBeginBlock.Marshal(b, m, deterministic)
  641. } else {
  642. b = b[:cap(b)]
  643. n, err := m.MarshalToSizedBuffer(b)
  644. if err != nil {
  645. return nil, err
  646. }
  647. return b[:n], nil
  648. }
  649. }
  650. func (m *RequestBeginBlock) XXX_Merge(src proto.Message) {
  651. xxx_messageInfo_RequestBeginBlock.Merge(m, src)
  652. }
  653. func (m *RequestBeginBlock) XXX_Size() int {
  654. return m.Size()
  655. }
  656. func (m *RequestBeginBlock) XXX_DiscardUnknown() {
  657. xxx_messageInfo_RequestBeginBlock.DiscardUnknown(m)
  658. }
  659. var xxx_messageInfo_RequestBeginBlock proto.InternalMessageInfo
  660. func (m *RequestBeginBlock) GetHash() []byte {
  661. if m != nil {
  662. return m.Hash
  663. }
  664. return nil
  665. }
  666. func (m *RequestBeginBlock) GetHeader() types1.Header {
  667. if m != nil {
  668. return m.Header
  669. }
  670. return types1.Header{}
  671. }
  672. func (m *RequestBeginBlock) GetLastCommitInfo() LastCommitInfo {
  673. if m != nil {
  674. return m.LastCommitInfo
  675. }
  676. return LastCommitInfo{}
  677. }
  678. func (m *RequestBeginBlock) GetByzantineValidators() []Evidence {
  679. if m != nil {
  680. return m.ByzantineValidators
  681. }
  682. return nil
  683. }
  684. type RequestCheckTx struct {
  685. Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
  686. Type CheckTxType `protobuf:"varint,2,opt,name=type,proto3,enum=tendermint.abci.CheckTxType" json:"type,omitempty"`
  687. }
  688. func (m *RequestCheckTx) Reset() { *m = RequestCheckTx{} }
  689. func (m *RequestCheckTx) String() string { return proto.CompactTextString(m) }
  690. func (*RequestCheckTx) ProtoMessage() {}
  691. func (*RequestCheckTx) Descriptor() ([]byte, []int) {
  692. return fileDescriptor_252557cfdd89a31a, []int{7}
  693. }
  694. func (m *RequestCheckTx) XXX_Unmarshal(b []byte) error {
  695. return m.Unmarshal(b)
  696. }
  697. func (m *RequestCheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  698. if deterministic {
  699. return xxx_messageInfo_RequestCheckTx.Marshal(b, m, deterministic)
  700. } else {
  701. b = b[:cap(b)]
  702. n, err := m.MarshalToSizedBuffer(b)
  703. if err != nil {
  704. return nil, err
  705. }
  706. return b[:n], nil
  707. }
  708. }
  709. func (m *RequestCheckTx) XXX_Merge(src proto.Message) {
  710. xxx_messageInfo_RequestCheckTx.Merge(m, src)
  711. }
  712. func (m *RequestCheckTx) XXX_Size() int {
  713. return m.Size()
  714. }
  715. func (m *RequestCheckTx) XXX_DiscardUnknown() {
  716. xxx_messageInfo_RequestCheckTx.DiscardUnknown(m)
  717. }
  718. var xxx_messageInfo_RequestCheckTx proto.InternalMessageInfo
  719. func (m *RequestCheckTx) GetTx() []byte {
  720. if m != nil {
  721. return m.Tx
  722. }
  723. return nil
  724. }
  725. func (m *RequestCheckTx) GetType() CheckTxType {
  726. if m != nil {
  727. return m.Type
  728. }
  729. return CheckTxType_New
  730. }
  731. type RequestDeliverTx struct {
  732. Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
  733. }
  734. func (m *RequestDeliverTx) Reset() { *m = RequestDeliverTx{} }
  735. func (m *RequestDeliverTx) String() string { return proto.CompactTextString(m) }
  736. func (*RequestDeliverTx) ProtoMessage() {}
  737. func (*RequestDeliverTx) Descriptor() ([]byte, []int) {
  738. return fileDescriptor_252557cfdd89a31a, []int{8}
  739. }
  740. func (m *RequestDeliverTx) XXX_Unmarshal(b []byte) error {
  741. return m.Unmarshal(b)
  742. }
  743. func (m *RequestDeliverTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  744. if deterministic {
  745. return xxx_messageInfo_RequestDeliverTx.Marshal(b, m, deterministic)
  746. } else {
  747. b = b[:cap(b)]
  748. n, err := m.MarshalToSizedBuffer(b)
  749. if err != nil {
  750. return nil, err
  751. }
  752. return b[:n], nil
  753. }
  754. }
  755. func (m *RequestDeliverTx) XXX_Merge(src proto.Message) {
  756. xxx_messageInfo_RequestDeliverTx.Merge(m, src)
  757. }
  758. func (m *RequestDeliverTx) XXX_Size() int {
  759. return m.Size()
  760. }
  761. func (m *RequestDeliverTx) XXX_DiscardUnknown() {
  762. xxx_messageInfo_RequestDeliverTx.DiscardUnknown(m)
  763. }
  764. var xxx_messageInfo_RequestDeliverTx proto.InternalMessageInfo
  765. func (m *RequestDeliverTx) GetTx() []byte {
  766. if m != nil {
  767. return m.Tx
  768. }
  769. return nil
  770. }
  771. type RequestEndBlock struct {
  772. Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  773. }
  774. func (m *RequestEndBlock) Reset() { *m = RequestEndBlock{} }
  775. func (m *RequestEndBlock) String() string { return proto.CompactTextString(m) }
  776. func (*RequestEndBlock) ProtoMessage() {}
  777. func (*RequestEndBlock) Descriptor() ([]byte, []int) {
  778. return fileDescriptor_252557cfdd89a31a, []int{9}
  779. }
  780. func (m *RequestEndBlock) XXX_Unmarshal(b []byte) error {
  781. return m.Unmarshal(b)
  782. }
  783. func (m *RequestEndBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  784. if deterministic {
  785. return xxx_messageInfo_RequestEndBlock.Marshal(b, m, deterministic)
  786. } else {
  787. b = b[:cap(b)]
  788. n, err := m.MarshalToSizedBuffer(b)
  789. if err != nil {
  790. return nil, err
  791. }
  792. return b[:n], nil
  793. }
  794. }
  795. func (m *RequestEndBlock) XXX_Merge(src proto.Message) {
  796. xxx_messageInfo_RequestEndBlock.Merge(m, src)
  797. }
  798. func (m *RequestEndBlock) XXX_Size() int {
  799. return m.Size()
  800. }
  801. func (m *RequestEndBlock) XXX_DiscardUnknown() {
  802. xxx_messageInfo_RequestEndBlock.DiscardUnknown(m)
  803. }
  804. var xxx_messageInfo_RequestEndBlock proto.InternalMessageInfo
  805. func (m *RequestEndBlock) GetHeight() int64 {
  806. if m != nil {
  807. return m.Height
  808. }
  809. return 0
  810. }
  811. type RequestCommit struct {
  812. }
  813. func (m *RequestCommit) Reset() { *m = RequestCommit{} }
  814. func (m *RequestCommit) String() string { return proto.CompactTextString(m) }
  815. func (*RequestCommit) ProtoMessage() {}
  816. func (*RequestCommit) Descriptor() ([]byte, []int) {
  817. return fileDescriptor_252557cfdd89a31a, []int{10}
  818. }
  819. func (m *RequestCommit) XXX_Unmarshal(b []byte) error {
  820. return m.Unmarshal(b)
  821. }
  822. func (m *RequestCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  823. if deterministic {
  824. return xxx_messageInfo_RequestCommit.Marshal(b, m, deterministic)
  825. } else {
  826. b = b[:cap(b)]
  827. n, err := m.MarshalToSizedBuffer(b)
  828. if err != nil {
  829. return nil, err
  830. }
  831. return b[:n], nil
  832. }
  833. }
  834. func (m *RequestCommit) XXX_Merge(src proto.Message) {
  835. xxx_messageInfo_RequestCommit.Merge(m, src)
  836. }
  837. func (m *RequestCommit) XXX_Size() int {
  838. return m.Size()
  839. }
  840. func (m *RequestCommit) XXX_DiscardUnknown() {
  841. xxx_messageInfo_RequestCommit.DiscardUnknown(m)
  842. }
  843. var xxx_messageInfo_RequestCommit proto.InternalMessageInfo
  844. // lists available snapshots
  845. type RequestListSnapshots struct {
  846. }
  847. func (m *RequestListSnapshots) Reset() { *m = RequestListSnapshots{} }
  848. func (m *RequestListSnapshots) String() string { return proto.CompactTextString(m) }
  849. func (*RequestListSnapshots) ProtoMessage() {}
  850. func (*RequestListSnapshots) Descriptor() ([]byte, []int) {
  851. return fileDescriptor_252557cfdd89a31a, []int{11}
  852. }
  853. func (m *RequestListSnapshots) XXX_Unmarshal(b []byte) error {
  854. return m.Unmarshal(b)
  855. }
  856. func (m *RequestListSnapshots) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  857. if deterministic {
  858. return xxx_messageInfo_RequestListSnapshots.Marshal(b, m, deterministic)
  859. } else {
  860. b = b[:cap(b)]
  861. n, err := m.MarshalToSizedBuffer(b)
  862. if err != nil {
  863. return nil, err
  864. }
  865. return b[:n], nil
  866. }
  867. }
  868. func (m *RequestListSnapshots) XXX_Merge(src proto.Message) {
  869. xxx_messageInfo_RequestListSnapshots.Merge(m, src)
  870. }
  871. func (m *RequestListSnapshots) XXX_Size() int {
  872. return m.Size()
  873. }
  874. func (m *RequestListSnapshots) XXX_DiscardUnknown() {
  875. xxx_messageInfo_RequestListSnapshots.DiscardUnknown(m)
  876. }
  877. var xxx_messageInfo_RequestListSnapshots proto.InternalMessageInfo
  878. // offers a snapshot to the application
  879. type RequestOfferSnapshot struct {
  880. Snapshot *Snapshot `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"`
  881. AppHash []byte `protobuf:"bytes,2,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
  882. }
  883. func (m *RequestOfferSnapshot) Reset() { *m = RequestOfferSnapshot{} }
  884. func (m *RequestOfferSnapshot) String() string { return proto.CompactTextString(m) }
  885. func (*RequestOfferSnapshot) ProtoMessage() {}
  886. func (*RequestOfferSnapshot) Descriptor() ([]byte, []int) {
  887. return fileDescriptor_252557cfdd89a31a, []int{12}
  888. }
  889. func (m *RequestOfferSnapshot) XXX_Unmarshal(b []byte) error {
  890. return m.Unmarshal(b)
  891. }
  892. func (m *RequestOfferSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  893. if deterministic {
  894. return xxx_messageInfo_RequestOfferSnapshot.Marshal(b, m, deterministic)
  895. } else {
  896. b = b[:cap(b)]
  897. n, err := m.MarshalToSizedBuffer(b)
  898. if err != nil {
  899. return nil, err
  900. }
  901. return b[:n], nil
  902. }
  903. }
  904. func (m *RequestOfferSnapshot) XXX_Merge(src proto.Message) {
  905. xxx_messageInfo_RequestOfferSnapshot.Merge(m, src)
  906. }
  907. func (m *RequestOfferSnapshot) XXX_Size() int {
  908. return m.Size()
  909. }
  910. func (m *RequestOfferSnapshot) XXX_DiscardUnknown() {
  911. xxx_messageInfo_RequestOfferSnapshot.DiscardUnknown(m)
  912. }
  913. var xxx_messageInfo_RequestOfferSnapshot proto.InternalMessageInfo
  914. func (m *RequestOfferSnapshot) GetSnapshot() *Snapshot {
  915. if m != nil {
  916. return m.Snapshot
  917. }
  918. return nil
  919. }
  920. func (m *RequestOfferSnapshot) GetAppHash() []byte {
  921. if m != nil {
  922. return m.AppHash
  923. }
  924. return nil
  925. }
  926. // loads a snapshot chunk
  927. type RequestLoadSnapshotChunk struct {
  928. Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  929. Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"`
  930. Chunk uint32 `protobuf:"varint,3,opt,name=chunk,proto3" json:"chunk,omitempty"`
  931. }
  932. func (m *RequestLoadSnapshotChunk) Reset() { *m = RequestLoadSnapshotChunk{} }
  933. func (m *RequestLoadSnapshotChunk) String() string { return proto.CompactTextString(m) }
  934. func (*RequestLoadSnapshotChunk) ProtoMessage() {}
  935. func (*RequestLoadSnapshotChunk) Descriptor() ([]byte, []int) {
  936. return fileDescriptor_252557cfdd89a31a, []int{13}
  937. }
  938. func (m *RequestLoadSnapshotChunk) XXX_Unmarshal(b []byte) error {
  939. return m.Unmarshal(b)
  940. }
  941. func (m *RequestLoadSnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  942. if deterministic {
  943. return xxx_messageInfo_RequestLoadSnapshotChunk.Marshal(b, m, deterministic)
  944. } else {
  945. b = b[:cap(b)]
  946. n, err := m.MarshalToSizedBuffer(b)
  947. if err != nil {
  948. return nil, err
  949. }
  950. return b[:n], nil
  951. }
  952. }
  953. func (m *RequestLoadSnapshotChunk) XXX_Merge(src proto.Message) {
  954. xxx_messageInfo_RequestLoadSnapshotChunk.Merge(m, src)
  955. }
  956. func (m *RequestLoadSnapshotChunk) XXX_Size() int {
  957. return m.Size()
  958. }
  959. func (m *RequestLoadSnapshotChunk) XXX_DiscardUnknown() {
  960. xxx_messageInfo_RequestLoadSnapshotChunk.DiscardUnknown(m)
  961. }
  962. var xxx_messageInfo_RequestLoadSnapshotChunk proto.InternalMessageInfo
  963. func (m *RequestLoadSnapshotChunk) GetHeight() uint64 {
  964. if m != nil {
  965. return m.Height
  966. }
  967. return 0
  968. }
  969. func (m *RequestLoadSnapshotChunk) GetFormat() uint32 {
  970. if m != nil {
  971. return m.Format
  972. }
  973. return 0
  974. }
  975. func (m *RequestLoadSnapshotChunk) GetChunk() uint32 {
  976. if m != nil {
  977. return m.Chunk
  978. }
  979. return 0
  980. }
  981. // Applies a snapshot chunk
  982. type RequestApplySnapshotChunk struct {
  983. Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
  984. Chunk []byte `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"`
  985. Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"`
  986. }
  987. func (m *RequestApplySnapshotChunk) Reset() { *m = RequestApplySnapshotChunk{} }
  988. func (m *RequestApplySnapshotChunk) String() string { return proto.CompactTextString(m) }
  989. func (*RequestApplySnapshotChunk) ProtoMessage() {}
  990. func (*RequestApplySnapshotChunk) Descriptor() ([]byte, []int) {
  991. return fileDescriptor_252557cfdd89a31a, []int{14}
  992. }
  993. func (m *RequestApplySnapshotChunk) XXX_Unmarshal(b []byte) error {
  994. return m.Unmarshal(b)
  995. }
  996. func (m *RequestApplySnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  997. if deterministic {
  998. return xxx_messageInfo_RequestApplySnapshotChunk.Marshal(b, m, deterministic)
  999. } else {
  1000. b = b[:cap(b)]
  1001. n, err := m.MarshalToSizedBuffer(b)
  1002. if err != nil {
  1003. return nil, err
  1004. }
  1005. return b[:n], nil
  1006. }
  1007. }
  1008. func (m *RequestApplySnapshotChunk) XXX_Merge(src proto.Message) {
  1009. xxx_messageInfo_RequestApplySnapshotChunk.Merge(m, src)
  1010. }
  1011. func (m *RequestApplySnapshotChunk) XXX_Size() int {
  1012. return m.Size()
  1013. }
  1014. func (m *RequestApplySnapshotChunk) XXX_DiscardUnknown() {
  1015. xxx_messageInfo_RequestApplySnapshotChunk.DiscardUnknown(m)
  1016. }
  1017. var xxx_messageInfo_RequestApplySnapshotChunk proto.InternalMessageInfo
  1018. func (m *RequestApplySnapshotChunk) GetIndex() uint32 {
  1019. if m != nil {
  1020. return m.Index
  1021. }
  1022. return 0
  1023. }
  1024. func (m *RequestApplySnapshotChunk) GetChunk() []byte {
  1025. if m != nil {
  1026. return m.Chunk
  1027. }
  1028. return nil
  1029. }
  1030. func (m *RequestApplySnapshotChunk) GetSender() string {
  1031. if m != nil {
  1032. return m.Sender
  1033. }
  1034. return ""
  1035. }
  1036. type Response struct {
  1037. // Types that are valid to be assigned to Value:
  1038. // *Response_Exception
  1039. // *Response_Echo
  1040. // *Response_Flush
  1041. // *Response_Info
  1042. // *Response_InitChain
  1043. // *Response_Query
  1044. // *Response_BeginBlock
  1045. // *Response_CheckTx
  1046. // *Response_DeliverTx
  1047. // *Response_EndBlock
  1048. // *Response_Commit
  1049. // *Response_ListSnapshots
  1050. // *Response_OfferSnapshot
  1051. // *Response_LoadSnapshotChunk
  1052. // *Response_ApplySnapshotChunk
  1053. Value isResponse_Value `protobuf_oneof:"value"`
  1054. }
  1055. func (m *Response) Reset() { *m = Response{} }
  1056. func (m *Response) String() string { return proto.CompactTextString(m) }
  1057. func (*Response) ProtoMessage() {}
  1058. func (*Response) Descriptor() ([]byte, []int) {
  1059. return fileDescriptor_252557cfdd89a31a, []int{15}
  1060. }
  1061. func (m *Response) XXX_Unmarshal(b []byte) error {
  1062. return m.Unmarshal(b)
  1063. }
  1064. func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1065. if deterministic {
  1066. return xxx_messageInfo_Response.Marshal(b, m, deterministic)
  1067. } else {
  1068. b = b[:cap(b)]
  1069. n, err := m.MarshalToSizedBuffer(b)
  1070. if err != nil {
  1071. return nil, err
  1072. }
  1073. return b[:n], nil
  1074. }
  1075. }
  1076. func (m *Response) XXX_Merge(src proto.Message) {
  1077. xxx_messageInfo_Response.Merge(m, src)
  1078. }
  1079. func (m *Response) XXX_Size() int {
  1080. return m.Size()
  1081. }
  1082. func (m *Response) XXX_DiscardUnknown() {
  1083. xxx_messageInfo_Response.DiscardUnknown(m)
  1084. }
  1085. var xxx_messageInfo_Response proto.InternalMessageInfo
  1086. type isResponse_Value interface {
  1087. isResponse_Value()
  1088. MarshalTo([]byte) (int, error)
  1089. Size() int
  1090. }
  1091. type Response_Exception struct {
  1092. Exception *ResponseException `protobuf:"bytes,1,opt,name=exception,proto3,oneof" json:"exception,omitempty"`
  1093. }
  1094. type Response_Echo struct {
  1095. Echo *ResponseEcho `protobuf:"bytes,2,opt,name=echo,proto3,oneof" json:"echo,omitempty"`
  1096. }
  1097. type Response_Flush struct {
  1098. Flush *ResponseFlush `protobuf:"bytes,3,opt,name=flush,proto3,oneof" json:"flush,omitempty"`
  1099. }
  1100. type Response_Info struct {
  1101. Info *ResponseInfo `protobuf:"bytes,4,opt,name=info,proto3,oneof" json:"info,omitempty"`
  1102. }
  1103. type Response_InitChain struct {
  1104. InitChain *ResponseInitChain `protobuf:"bytes,5,opt,name=init_chain,json=initChain,proto3,oneof" json:"init_chain,omitempty"`
  1105. }
  1106. type Response_Query struct {
  1107. Query *ResponseQuery `protobuf:"bytes,6,opt,name=query,proto3,oneof" json:"query,omitempty"`
  1108. }
  1109. type Response_BeginBlock struct {
  1110. BeginBlock *ResponseBeginBlock `protobuf:"bytes,7,opt,name=begin_block,json=beginBlock,proto3,oneof" json:"begin_block,omitempty"`
  1111. }
  1112. type Response_CheckTx struct {
  1113. CheckTx *ResponseCheckTx `protobuf:"bytes,8,opt,name=check_tx,json=checkTx,proto3,oneof" json:"check_tx,omitempty"`
  1114. }
  1115. type Response_DeliverTx struct {
  1116. DeliverTx *ResponseDeliverTx `protobuf:"bytes,9,opt,name=deliver_tx,json=deliverTx,proto3,oneof" json:"deliver_tx,omitempty"`
  1117. }
  1118. type Response_EndBlock struct {
  1119. EndBlock *ResponseEndBlock `protobuf:"bytes,10,opt,name=end_block,json=endBlock,proto3,oneof" json:"end_block,omitempty"`
  1120. }
  1121. type Response_Commit struct {
  1122. Commit *ResponseCommit `protobuf:"bytes,11,opt,name=commit,proto3,oneof" json:"commit,omitempty"`
  1123. }
  1124. type Response_ListSnapshots struct {
  1125. ListSnapshots *ResponseListSnapshots `protobuf:"bytes,12,opt,name=list_snapshots,json=listSnapshots,proto3,oneof" json:"list_snapshots,omitempty"`
  1126. }
  1127. type Response_OfferSnapshot struct {
  1128. OfferSnapshot *ResponseOfferSnapshot `protobuf:"bytes,13,opt,name=offer_snapshot,json=offerSnapshot,proto3,oneof" json:"offer_snapshot,omitempty"`
  1129. }
  1130. type Response_LoadSnapshotChunk struct {
  1131. LoadSnapshotChunk *ResponseLoadSnapshotChunk `protobuf:"bytes,14,opt,name=load_snapshot_chunk,json=loadSnapshotChunk,proto3,oneof" json:"load_snapshot_chunk,omitempty"`
  1132. }
  1133. type Response_ApplySnapshotChunk struct {
  1134. ApplySnapshotChunk *ResponseApplySnapshotChunk `protobuf:"bytes,15,opt,name=apply_snapshot_chunk,json=applySnapshotChunk,proto3,oneof" json:"apply_snapshot_chunk,omitempty"`
  1135. }
  1136. func (*Response_Exception) isResponse_Value() {}
  1137. func (*Response_Echo) isResponse_Value() {}
  1138. func (*Response_Flush) isResponse_Value() {}
  1139. func (*Response_Info) isResponse_Value() {}
  1140. func (*Response_InitChain) isResponse_Value() {}
  1141. func (*Response_Query) isResponse_Value() {}
  1142. func (*Response_BeginBlock) isResponse_Value() {}
  1143. func (*Response_CheckTx) isResponse_Value() {}
  1144. func (*Response_DeliverTx) isResponse_Value() {}
  1145. func (*Response_EndBlock) isResponse_Value() {}
  1146. func (*Response_Commit) isResponse_Value() {}
  1147. func (*Response_ListSnapshots) isResponse_Value() {}
  1148. func (*Response_OfferSnapshot) isResponse_Value() {}
  1149. func (*Response_LoadSnapshotChunk) isResponse_Value() {}
  1150. func (*Response_ApplySnapshotChunk) isResponse_Value() {}
  1151. func (m *Response) GetValue() isResponse_Value {
  1152. if m != nil {
  1153. return m.Value
  1154. }
  1155. return nil
  1156. }
  1157. func (m *Response) GetException() *ResponseException {
  1158. if x, ok := m.GetValue().(*Response_Exception); ok {
  1159. return x.Exception
  1160. }
  1161. return nil
  1162. }
  1163. func (m *Response) GetEcho() *ResponseEcho {
  1164. if x, ok := m.GetValue().(*Response_Echo); ok {
  1165. return x.Echo
  1166. }
  1167. return nil
  1168. }
  1169. func (m *Response) GetFlush() *ResponseFlush {
  1170. if x, ok := m.GetValue().(*Response_Flush); ok {
  1171. return x.Flush
  1172. }
  1173. return nil
  1174. }
  1175. func (m *Response) GetInfo() *ResponseInfo {
  1176. if x, ok := m.GetValue().(*Response_Info); ok {
  1177. return x.Info
  1178. }
  1179. return nil
  1180. }
  1181. func (m *Response) GetInitChain() *ResponseInitChain {
  1182. if x, ok := m.GetValue().(*Response_InitChain); ok {
  1183. return x.InitChain
  1184. }
  1185. return nil
  1186. }
  1187. func (m *Response) GetQuery() *ResponseQuery {
  1188. if x, ok := m.GetValue().(*Response_Query); ok {
  1189. return x.Query
  1190. }
  1191. return nil
  1192. }
  1193. func (m *Response) GetBeginBlock() *ResponseBeginBlock {
  1194. if x, ok := m.GetValue().(*Response_BeginBlock); ok {
  1195. return x.BeginBlock
  1196. }
  1197. return nil
  1198. }
  1199. func (m *Response) GetCheckTx() *ResponseCheckTx {
  1200. if x, ok := m.GetValue().(*Response_CheckTx); ok {
  1201. return x.CheckTx
  1202. }
  1203. return nil
  1204. }
  1205. func (m *Response) GetDeliverTx() *ResponseDeliverTx {
  1206. if x, ok := m.GetValue().(*Response_DeliverTx); ok {
  1207. return x.DeliverTx
  1208. }
  1209. return nil
  1210. }
  1211. func (m *Response) GetEndBlock() *ResponseEndBlock {
  1212. if x, ok := m.GetValue().(*Response_EndBlock); ok {
  1213. return x.EndBlock
  1214. }
  1215. return nil
  1216. }
  1217. func (m *Response) GetCommit() *ResponseCommit {
  1218. if x, ok := m.GetValue().(*Response_Commit); ok {
  1219. return x.Commit
  1220. }
  1221. return nil
  1222. }
  1223. func (m *Response) GetListSnapshots() *ResponseListSnapshots {
  1224. if x, ok := m.GetValue().(*Response_ListSnapshots); ok {
  1225. return x.ListSnapshots
  1226. }
  1227. return nil
  1228. }
  1229. func (m *Response) GetOfferSnapshot() *ResponseOfferSnapshot {
  1230. if x, ok := m.GetValue().(*Response_OfferSnapshot); ok {
  1231. return x.OfferSnapshot
  1232. }
  1233. return nil
  1234. }
  1235. func (m *Response) GetLoadSnapshotChunk() *ResponseLoadSnapshotChunk {
  1236. if x, ok := m.GetValue().(*Response_LoadSnapshotChunk); ok {
  1237. return x.LoadSnapshotChunk
  1238. }
  1239. return nil
  1240. }
  1241. func (m *Response) GetApplySnapshotChunk() *ResponseApplySnapshotChunk {
  1242. if x, ok := m.GetValue().(*Response_ApplySnapshotChunk); ok {
  1243. return x.ApplySnapshotChunk
  1244. }
  1245. return nil
  1246. }
  1247. // XXX_OneofWrappers is for the internal use of the proto package.
  1248. func (*Response) XXX_OneofWrappers() []interface{} {
  1249. return []interface{}{
  1250. (*Response_Exception)(nil),
  1251. (*Response_Echo)(nil),
  1252. (*Response_Flush)(nil),
  1253. (*Response_Info)(nil),
  1254. (*Response_InitChain)(nil),
  1255. (*Response_Query)(nil),
  1256. (*Response_BeginBlock)(nil),
  1257. (*Response_CheckTx)(nil),
  1258. (*Response_DeliverTx)(nil),
  1259. (*Response_EndBlock)(nil),
  1260. (*Response_Commit)(nil),
  1261. (*Response_ListSnapshots)(nil),
  1262. (*Response_OfferSnapshot)(nil),
  1263. (*Response_LoadSnapshotChunk)(nil),
  1264. (*Response_ApplySnapshotChunk)(nil),
  1265. }
  1266. }
  1267. // nondeterministic
  1268. type ResponseException struct {
  1269. Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
  1270. }
  1271. func (m *ResponseException) Reset() { *m = ResponseException{} }
  1272. func (m *ResponseException) String() string { return proto.CompactTextString(m) }
  1273. func (*ResponseException) ProtoMessage() {}
  1274. func (*ResponseException) Descriptor() ([]byte, []int) {
  1275. return fileDescriptor_252557cfdd89a31a, []int{16}
  1276. }
  1277. func (m *ResponseException) XXX_Unmarshal(b []byte) error {
  1278. return m.Unmarshal(b)
  1279. }
  1280. func (m *ResponseException) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1281. if deterministic {
  1282. return xxx_messageInfo_ResponseException.Marshal(b, m, deterministic)
  1283. } else {
  1284. b = b[:cap(b)]
  1285. n, err := m.MarshalToSizedBuffer(b)
  1286. if err != nil {
  1287. return nil, err
  1288. }
  1289. return b[:n], nil
  1290. }
  1291. }
  1292. func (m *ResponseException) XXX_Merge(src proto.Message) {
  1293. xxx_messageInfo_ResponseException.Merge(m, src)
  1294. }
  1295. func (m *ResponseException) XXX_Size() int {
  1296. return m.Size()
  1297. }
  1298. func (m *ResponseException) XXX_DiscardUnknown() {
  1299. xxx_messageInfo_ResponseException.DiscardUnknown(m)
  1300. }
  1301. var xxx_messageInfo_ResponseException proto.InternalMessageInfo
  1302. func (m *ResponseException) GetError() string {
  1303. if m != nil {
  1304. return m.Error
  1305. }
  1306. return ""
  1307. }
  1308. type ResponseEcho struct {
  1309. Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
  1310. }
  1311. func (m *ResponseEcho) Reset() { *m = ResponseEcho{} }
  1312. func (m *ResponseEcho) String() string { return proto.CompactTextString(m) }
  1313. func (*ResponseEcho) ProtoMessage() {}
  1314. func (*ResponseEcho) Descriptor() ([]byte, []int) {
  1315. return fileDescriptor_252557cfdd89a31a, []int{17}
  1316. }
  1317. func (m *ResponseEcho) XXX_Unmarshal(b []byte) error {
  1318. return m.Unmarshal(b)
  1319. }
  1320. func (m *ResponseEcho) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1321. if deterministic {
  1322. return xxx_messageInfo_ResponseEcho.Marshal(b, m, deterministic)
  1323. } else {
  1324. b = b[:cap(b)]
  1325. n, err := m.MarshalToSizedBuffer(b)
  1326. if err != nil {
  1327. return nil, err
  1328. }
  1329. return b[:n], nil
  1330. }
  1331. }
  1332. func (m *ResponseEcho) XXX_Merge(src proto.Message) {
  1333. xxx_messageInfo_ResponseEcho.Merge(m, src)
  1334. }
  1335. func (m *ResponseEcho) XXX_Size() int {
  1336. return m.Size()
  1337. }
  1338. func (m *ResponseEcho) XXX_DiscardUnknown() {
  1339. xxx_messageInfo_ResponseEcho.DiscardUnknown(m)
  1340. }
  1341. var xxx_messageInfo_ResponseEcho proto.InternalMessageInfo
  1342. func (m *ResponseEcho) GetMessage() string {
  1343. if m != nil {
  1344. return m.Message
  1345. }
  1346. return ""
  1347. }
  1348. type ResponseFlush struct {
  1349. }
  1350. func (m *ResponseFlush) Reset() { *m = ResponseFlush{} }
  1351. func (m *ResponseFlush) String() string { return proto.CompactTextString(m) }
  1352. func (*ResponseFlush) ProtoMessage() {}
  1353. func (*ResponseFlush) Descriptor() ([]byte, []int) {
  1354. return fileDescriptor_252557cfdd89a31a, []int{18}
  1355. }
  1356. func (m *ResponseFlush) XXX_Unmarshal(b []byte) error {
  1357. return m.Unmarshal(b)
  1358. }
  1359. func (m *ResponseFlush) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1360. if deterministic {
  1361. return xxx_messageInfo_ResponseFlush.Marshal(b, m, deterministic)
  1362. } else {
  1363. b = b[:cap(b)]
  1364. n, err := m.MarshalToSizedBuffer(b)
  1365. if err != nil {
  1366. return nil, err
  1367. }
  1368. return b[:n], nil
  1369. }
  1370. }
  1371. func (m *ResponseFlush) XXX_Merge(src proto.Message) {
  1372. xxx_messageInfo_ResponseFlush.Merge(m, src)
  1373. }
  1374. func (m *ResponseFlush) XXX_Size() int {
  1375. return m.Size()
  1376. }
  1377. func (m *ResponseFlush) XXX_DiscardUnknown() {
  1378. xxx_messageInfo_ResponseFlush.DiscardUnknown(m)
  1379. }
  1380. var xxx_messageInfo_ResponseFlush proto.InternalMessageInfo
  1381. type ResponseInfo struct {
  1382. Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
  1383. // this is the software version of the application. TODO: remove?
  1384. Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
  1385. AppVersion uint64 `protobuf:"varint,3,opt,name=app_version,json=appVersion,proto3" json:"app_version,omitempty"`
  1386. LastBlockHeight int64 `protobuf:"varint,4,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"`
  1387. LastBlockAppHash []byte `protobuf:"bytes,5,opt,name=last_block_app_hash,json=lastBlockAppHash,proto3" json:"last_block_app_hash,omitempty"`
  1388. }
  1389. func (m *ResponseInfo) Reset() { *m = ResponseInfo{} }
  1390. func (m *ResponseInfo) String() string { return proto.CompactTextString(m) }
  1391. func (*ResponseInfo) ProtoMessage() {}
  1392. func (*ResponseInfo) Descriptor() ([]byte, []int) {
  1393. return fileDescriptor_252557cfdd89a31a, []int{19}
  1394. }
  1395. func (m *ResponseInfo) XXX_Unmarshal(b []byte) error {
  1396. return m.Unmarshal(b)
  1397. }
  1398. func (m *ResponseInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1399. if deterministic {
  1400. return xxx_messageInfo_ResponseInfo.Marshal(b, m, deterministic)
  1401. } else {
  1402. b = b[:cap(b)]
  1403. n, err := m.MarshalToSizedBuffer(b)
  1404. if err != nil {
  1405. return nil, err
  1406. }
  1407. return b[:n], nil
  1408. }
  1409. }
  1410. func (m *ResponseInfo) XXX_Merge(src proto.Message) {
  1411. xxx_messageInfo_ResponseInfo.Merge(m, src)
  1412. }
  1413. func (m *ResponseInfo) XXX_Size() int {
  1414. return m.Size()
  1415. }
  1416. func (m *ResponseInfo) XXX_DiscardUnknown() {
  1417. xxx_messageInfo_ResponseInfo.DiscardUnknown(m)
  1418. }
  1419. var xxx_messageInfo_ResponseInfo proto.InternalMessageInfo
  1420. func (m *ResponseInfo) GetData() string {
  1421. if m != nil {
  1422. return m.Data
  1423. }
  1424. return ""
  1425. }
  1426. func (m *ResponseInfo) GetVersion() string {
  1427. if m != nil {
  1428. return m.Version
  1429. }
  1430. return ""
  1431. }
  1432. func (m *ResponseInfo) GetAppVersion() uint64 {
  1433. if m != nil {
  1434. return m.AppVersion
  1435. }
  1436. return 0
  1437. }
  1438. func (m *ResponseInfo) GetLastBlockHeight() int64 {
  1439. if m != nil {
  1440. return m.LastBlockHeight
  1441. }
  1442. return 0
  1443. }
  1444. func (m *ResponseInfo) GetLastBlockAppHash() []byte {
  1445. if m != nil {
  1446. return m.LastBlockAppHash
  1447. }
  1448. return nil
  1449. }
  1450. type ResponseInitChain struct {
  1451. ConsensusParams *types1.ConsensusParams `protobuf:"bytes,1,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params,omitempty"`
  1452. Validators []ValidatorUpdate `protobuf:"bytes,2,rep,name=validators,proto3" json:"validators"`
  1453. AppHash []byte `protobuf:"bytes,3,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
  1454. }
  1455. func (m *ResponseInitChain) Reset() { *m = ResponseInitChain{} }
  1456. func (m *ResponseInitChain) String() string { return proto.CompactTextString(m) }
  1457. func (*ResponseInitChain) ProtoMessage() {}
  1458. func (*ResponseInitChain) Descriptor() ([]byte, []int) {
  1459. return fileDescriptor_252557cfdd89a31a, []int{20}
  1460. }
  1461. func (m *ResponseInitChain) XXX_Unmarshal(b []byte) error {
  1462. return m.Unmarshal(b)
  1463. }
  1464. func (m *ResponseInitChain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1465. if deterministic {
  1466. return xxx_messageInfo_ResponseInitChain.Marshal(b, m, deterministic)
  1467. } else {
  1468. b = b[:cap(b)]
  1469. n, err := m.MarshalToSizedBuffer(b)
  1470. if err != nil {
  1471. return nil, err
  1472. }
  1473. return b[:n], nil
  1474. }
  1475. }
  1476. func (m *ResponseInitChain) XXX_Merge(src proto.Message) {
  1477. xxx_messageInfo_ResponseInitChain.Merge(m, src)
  1478. }
  1479. func (m *ResponseInitChain) XXX_Size() int {
  1480. return m.Size()
  1481. }
  1482. func (m *ResponseInitChain) XXX_DiscardUnknown() {
  1483. xxx_messageInfo_ResponseInitChain.DiscardUnknown(m)
  1484. }
  1485. var xxx_messageInfo_ResponseInitChain proto.InternalMessageInfo
  1486. func (m *ResponseInitChain) GetConsensusParams() *types1.ConsensusParams {
  1487. if m != nil {
  1488. return m.ConsensusParams
  1489. }
  1490. return nil
  1491. }
  1492. func (m *ResponseInitChain) GetValidators() []ValidatorUpdate {
  1493. if m != nil {
  1494. return m.Validators
  1495. }
  1496. return nil
  1497. }
  1498. func (m *ResponseInitChain) GetAppHash() []byte {
  1499. if m != nil {
  1500. return m.AppHash
  1501. }
  1502. return nil
  1503. }
  1504. type ResponseQuery struct {
  1505. Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
  1506. // bytes data = 2; // use "value" instead.
  1507. Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
  1508. Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
  1509. Index int64 `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"`
  1510. Key []byte `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"`
  1511. Value []byte `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"`
  1512. ProofOps *crypto.ProofOps `protobuf:"bytes,8,opt,name=proof_ops,json=proofOps,proto3" json:"proof_ops,omitempty"`
  1513. Height int64 `protobuf:"varint,9,opt,name=height,proto3" json:"height,omitempty"`
  1514. Codespace string `protobuf:"bytes,10,opt,name=codespace,proto3" json:"codespace,omitempty"`
  1515. }
  1516. func (m *ResponseQuery) Reset() { *m = ResponseQuery{} }
  1517. func (m *ResponseQuery) String() string { return proto.CompactTextString(m) }
  1518. func (*ResponseQuery) ProtoMessage() {}
  1519. func (*ResponseQuery) Descriptor() ([]byte, []int) {
  1520. return fileDescriptor_252557cfdd89a31a, []int{21}
  1521. }
  1522. func (m *ResponseQuery) XXX_Unmarshal(b []byte) error {
  1523. return m.Unmarshal(b)
  1524. }
  1525. func (m *ResponseQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1526. if deterministic {
  1527. return xxx_messageInfo_ResponseQuery.Marshal(b, m, deterministic)
  1528. } else {
  1529. b = b[:cap(b)]
  1530. n, err := m.MarshalToSizedBuffer(b)
  1531. if err != nil {
  1532. return nil, err
  1533. }
  1534. return b[:n], nil
  1535. }
  1536. }
  1537. func (m *ResponseQuery) XXX_Merge(src proto.Message) {
  1538. xxx_messageInfo_ResponseQuery.Merge(m, src)
  1539. }
  1540. func (m *ResponseQuery) XXX_Size() int {
  1541. return m.Size()
  1542. }
  1543. func (m *ResponseQuery) XXX_DiscardUnknown() {
  1544. xxx_messageInfo_ResponseQuery.DiscardUnknown(m)
  1545. }
  1546. var xxx_messageInfo_ResponseQuery proto.InternalMessageInfo
  1547. func (m *ResponseQuery) GetCode() uint32 {
  1548. if m != nil {
  1549. return m.Code
  1550. }
  1551. return 0
  1552. }
  1553. func (m *ResponseQuery) GetLog() string {
  1554. if m != nil {
  1555. return m.Log
  1556. }
  1557. return ""
  1558. }
  1559. func (m *ResponseQuery) GetInfo() string {
  1560. if m != nil {
  1561. return m.Info
  1562. }
  1563. return ""
  1564. }
  1565. func (m *ResponseQuery) GetIndex() int64 {
  1566. if m != nil {
  1567. return m.Index
  1568. }
  1569. return 0
  1570. }
  1571. func (m *ResponseQuery) GetKey() []byte {
  1572. if m != nil {
  1573. return m.Key
  1574. }
  1575. return nil
  1576. }
  1577. func (m *ResponseQuery) GetValue() []byte {
  1578. if m != nil {
  1579. return m.Value
  1580. }
  1581. return nil
  1582. }
  1583. func (m *ResponseQuery) GetProofOps() *crypto.ProofOps {
  1584. if m != nil {
  1585. return m.ProofOps
  1586. }
  1587. return nil
  1588. }
  1589. func (m *ResponseQuery) GetHeight() int64 {
  1590. if m != nil {
  1591. return m.Height
  1592. }
  1593. return 0
  1594. }
  1595. func (m *ResponseQuery) GetCodespace() string {
  1596. if m != nil {
  1597. return m.Codespace
  1598. }
  1599. return ""
  1600. }
  1601. type ResponseBeginBlock struct {
  1602. Events []Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
  1603. }
  1604. func (m *ResponseBeginBlock) Reset() { *m = ResponseBeginBlock{} }
  1605. func (m *ResponseBeginBlock) String() string { return proto.CompactTextString(m) }
  1606. func (*ResponseBeginBlock) ProtoMessage() {}
  1607. func (*ResponseBeginBlock) Descriptor() ([]byte, []int) {
  1608. return fileDescriptor_252557cfdd89a31a, []int{22}
  1609. }
  1610. func (m *ResponseBeginBlock) XXX_Unmarshal(b []byte) error {
  1611. return m.Unmarshal(b)
  1612. }
  1613. func (m *ResponseBeginBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1614. if deterministic {
  1615. return xxx_messageInfo_ResponseBeginBlock.Marshal(b, m, deterministic)
  1616. } else {
  1617. b = b[:cap(b)]
  1618. n, err := m.MarshalToSizedBuffer(b)
  1619. if err != nil {
  1620. return nil, err
  1621. }
  1622. return b[:n], nil
  1623. }
  1624. }
  1625. func (m *ResponseBeginBlock) XXX_Merge(src proto.Message) {
  1626. xxx_messageInfo_ResponseBeginBlock.Merge(m, src)
  1627. }
  1628. func (m *ResponseBeginBlock) XXX_Size() int {
  1629. return m.Size()
  1630. }
  1631. func (m *ResponseBeginBlock) XXX_DiscardUnknown() {
  1632. xxx_messageInfo_ResponseBeginBlock.DiscardUnknown(m)
  1633. }
  1634. var xxx_messageInfo_ResponseBeginBlock proto.InternalMessageInfo
  1635. func (m *ResponseBeginBlock) GetEvents() []Event {
  1636. if m != nil {
  1637. return m.Events
  1638. }
  1639. return nil
  1640. }
  1641. type ResponseCheckTx struct {
  1642. Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
  1643. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  1644. Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
  1645. Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
  1646. GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,proto3" json:"gas_wanted,omitempty"`
  1647. GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,proto3" json:"gas_used,omitempty"`
  1648. Events []Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"`
  1649. Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"`
  1650. Sender string `protobuf:"bytes,9,opt,name=sender,proto3" json:"sender,omitempty"`
  1651. Priority int64 `protobuf:"varint,10,opt,name=priority,proto3" json:"priority,omitempty"`
  1652. // mempool_error is set by Tendermint.
  1653. // ABCI applications creating a ResponseCheckTX should not set mempool_error.
  1654. MempoolError string `protobuf:"bytes,11,opt,name=mempool_error,json=mempoolError,proto3" json:"mempool_error,omitempty"`
  1655. }
  1656. func (m *ResponseCheckTx) Reset() { *m = ResponseCheckTx{} }
  1657. func (m *ResponseCheckTx) String() string { return proto.CompactTextString(m) }
  1658. func (*ResponseCheckTx) ProtoMessage() {}
  1659. func (*ResponseCheckTx) Descriptor() ([]byte, []int) {
  1660. return fileDescriptor_252557cfdd89a31a, []int{23}
  1661. }
  1662. func (m *ResponseCheckTx) XXX_Unmarshal(b []byte) error {
  1663. return m.Unmarshal(b)
  1664. }
  1665. func (m *ResponseCheckTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1666. if deterministic {
  1667. return xxx_messageInfo_ResponseCheckTx.Marshal(b, m, deterministic)
  1668. } else {
  1669. b = b[:cap(b)]
  1670. n, err := m.MarshalToSizedBuffer(b)
  1671. if err != nil {
  1672. return nil, err
  1673. }
  1674. return b[:n], nil
  1675. }
  1676. }
  1677. func (m *ResponseCheckTx) XXX_Merge(src proto.Message) {
  1678. xxx_messageInfo_ResponseCheckTx.Merge(m, src)
  1679. }
  1680. func (m *ResponseCheckTx) XXX_Size() int {
  1681. return m.Size()
  1682. }
  1683. func (m *ResponseCheckTx) XXX_DiscardUnknown() {
  1684. xxx_messageInfo_ResponseCheckTx.DiscardUnknown(m)
  1685. }
  1686. var xxx_messageInfo_ResponseCheckTx proto.InternalMessageInfo
  1687. func (m *ResponseCheckTx) GetCode() uint32 {
  1688. if m != nil {
  1689. return m.Code
  1690. }
  1691. return 0
  1692. }
  1693. func (m *ResponseCheckTx) GetData() []byte {
  1694. if m != nil {
  1695. return m.Data
  1696. }
  1697. return nil
  1698. }
  1699. func (m *ResponseCheckTx) GetLog() string {
  1700. if m != nil {
  1701. return m.Log
  1702. }
  1703. return ""
  1704. }
  1705. func (m *ResponseCheckTx) GetInfo() string {
  1706. if m != nil {
  1707. return m.Info
  1708. }
  1709. return ""
  1710. }
  1711. func (m *ResponseCheckTx) GetGasWanted() int64 {
  1712. if m != nil {
  1713. return m.GasWanted
  1714. }
  1715. return 0
  1716. }
  1717. func (m *ResponseCheckTx) GetGasUsed() int64 {
  1718. if m != nil {
  1719. return m.GasUsed
  1720. }
  1721. return 0
  1722. }
  1723. func (m *ResponseCheckTx) GetEvents() []Event {
  1724. if m != nil {
  1725. return m.Events
  1726. }
  1727. return nil
  1728. }
  1729. func (m *ResponseCheckTx) GetCodespace() string {
  1730. if m != nil {
  1731. return m.Codespace
  1732. }
  1733. return ""
  1734. }
  1735. func (m *ResponseCheckTx) GetSender() string {
  1736. if m != nil {
  1737. return m.Sender
  1738. }
  1739. return ""
  1740. }
  1741. func (m *ResponseCheckTx) GetPriority() int64 {
  1742. if m != nil {
  1743. return m.Priority
  1744. }
  1745. return 0
  1746. }
  1747. func (m *ResponseCheckTx) GetMempoolError() string {
  1748. if m != nil {
  1749. return m.MempoolError
  1750. }
  1751. return ""
  1752. }
  1753. type ResponseDeliverTx struct {
  1754. Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
  1755. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  1756. Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
  1757. Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
  1758. GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,proto3" json:"gas_wanted,omitempty"`
  1759. GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,proto3" json:"gas_used,omitempty"`
  1760. Events []Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"`
  1761. Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"`
  1762. }
  1763. func (m *ResponseDeliverTx) Reset() { *m = ResponseDeliverTx{} }
  1764. func (m *ResponseDeliverTx) String() string { return proto.CompactTextString(m) }
  1765. func (*ResponseDeliverTx) ProtoMessage() {}
  1766. func (*ResponseDeliverTx) Descriptor() ([]byte, []int) {
  1767. return fileDescriptor_252557cfdd89a31a, []int{24}
  1768. }
  1769. func (m *ResponseDeliverTx) XXX_Unmarshal(b []byte) error {
  1770. return m.Unmarshal(b)
  1771. }
  1772. func (m *ResponseDeliverTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1773. if deterministic {
  1774. return xxx_messageInfo_ResponseDeliverTx.Marshal(b, m, deterministic)
  1775. } else {
  1776. b = b[:cap(b)]
  1777. n, err := m.MarshalToSizedBuffer(b)
  1778. if err != nil {
  1779. return nil, err
  1780. }
  1781. return b[:n], nil
  1782. }
  1783. }
  1784. func (m *ResponseDeliverTx) XXX_Merge(src proto.Message) {
  1785. xxx_messageInfo_ResponseDeliverTx.Merge(m, src)
  1786. }
  1787. func (m *ResponseDeliverTx) XXX_Size() int {
  1788. return m.Size()
  1789. }
  1790. func (m *ResponseDeliverTx) XXX_DiscardUnknown() {
  1791. xxx_messageInfo_ResponseDeliverTx.DiscardUnknown(m)
  1792. }
  1793. var xxx_messageInfo_ResponseDeliverTx proto.InternalMessageInfo
  1794. func (m *ResponseDeliverTx) GetCode() uint32 {
  1795. if m != nil {
  1796. return m.Code
  1797. }
  1798. return 0
  1799. }
  1800. func (m *ResponseDeliverTx) GetData() []byte {
  1801. if m != nil {
  1802. return m.Data
  1803. }
  1804. return nil
  1805. }
  1806. func (m *ResponseDeliverTx) GetLog() string {
  1807. if m != nil {
  1808. return m.Log
  1809. }
  1810. return ""
  1811. }
  1812. func (m *ResponseDeliverTx) GetInfo() string {
  1813. if m != nil {
  1814. return m.Info
  1815. }
  1816. return ""
  1817. }
  1818. func (m *ResponseDeliverTx) GetGasWanted() int64 {
  1819. if m != nil {
  1820. return m.GasWanted
  1821. }
  1822. return 0
  1823. }
  1824. func (m *ResponseDeliverTx) GetGasUsed() int64 {
  1825. if m != nil {
  1826. return m.GasUsed
  1827. }
  1828. return 0
  1829. }
  1830. func (m *ResponseDeliverTx) GetEvents() []Event {
  1831. if m != nil {
  1832. return m.Events
  1833. }
  1834. return nil
  1835. }
  1836. func (m *ResponseDeliverTx) GetCodespace() string {
  1837. if m != nil {
  1838. return m.Codespace
  1839. }
  1840. return ""
  1841. }
  1842. type ResponseEndBlock struct {
  1843. ValidatorUpdates []ValidatorUpdate `protobuf:"bytes,1,rep,name=validator_updates,json=validatorUpdates,proto3" json:"validator_updates"`
  1844. ConsensusParamUpdates *types1.ConsensusParams `protobuf:"bytes,2,opt,name=consensus_param_updates,json=consensusParamUpdates,proto3" json:"consensus_param_updates,omitempty"`
  1845. Events []Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"`
  1846. }
  1847. func (m *ResponseEndBlock) Reset() { *m = ResponseEndBlock{} }
  1848. func (m *ResponseEndBlock) String() string { return proto.CompactTextString(m) }
  1849. func (*ResponseEndBlock) ProtoMessage() {}
  1850. func (*ResponseEndBlock) Descriptor() ([]byte, []int) {
  1851. return fileDescriptor_252557cfdd89a31a, []int{25}
  1852. }
  1853. func (m *ResponseEndBlock) XXX_Unmarshal(b []byte) error {
  1854. return m.Unmarshal(b)
  1855. }
  1856. func (m *ResponseEndBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1857. if deterministic {
  1858. return xxx_messageInfo_ResponseEndBlock.Marshal(b, m, deterministic)
  1859. } else {
  1860. b = b[:cap(b)]
  1861. n, err := m.MarshalToSizedBuffer(b)
  1862. if err != nil {
  1863. return nil, err
  1864. }
  1865. return b[:n], nil
  1866. }
  1867. }
  1868. func (m *ResponseEndBlock) XXX_Merge(src proto.Message) {
  1869. xxx_messageInfo_ResponseEndBlock.Merge(m, src)
  1870. }
  1871. func (m *ResponseEndBlock) XXX_Size() int {
  1872. return m.Size()
  1873. }
  1874. func (m *ResponseEndBlock) XXX_DiscardUnknown() {
  1875. xxx_messageInfo_ResponseEndBlock.DiscardUnknown(m)
  1876. }
  1877. var xxx_messageInfo_ResponseEndBlock proto.InternalMessageInfo
  1878. func (m *ResponseEndBlock) GetValidatorUpdates() []ValidatorUpdate {
  1879. if m != nil {
  1880. return m.ValidatorUpdates
  1881. }
  1882. return nil
  1883. }
  1884. func (m *ResponseEndBlock) GetConsensusParamUpdates() *types1.ConsensusParams {
  1885. if m != nil {
  1886. return m.ConsensusParamUpdates
  1887. }
  1888. return nil
  1889. }
  1890. func (m *ResponseEndBlock) GetEvents() []Event {
  1891. if m != nil {
  1892. return m.Events
  1893. }
  1894. return nil
  1895. }
  1896. type ResponseCommit struct {
  1897. // reserve 1
  1898. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  1899. RetainHeight int64 `protobuf:"varint,3,opt,name=retain_height,json=retainHeight,proto3" json:"retain_height,omitempty"`
  1900. }
  1901. func (m *ResponseCommit) Reset() { *m = ResponseCommit{} }
  1902. func (m *ResponseCommit) String() string { return proto.CompactTextString(m) }
  1903. func (*ResponseCommit) ProtoMessage() {}
  1904. func (*ResponseCommit) Descriptor() ([]byte, []int) {
  1905. return fileDescriptor_252557cfdd89a31a, []int{26}
  1906. }
  1907. func (m *ResponseCommit) XXX_Unmarshal(b []byte) error {
  1908. return m.Unmarshal(b)
  1909. }
  1910. func (m *ResponseCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1911. if deterministic {
  1912. return xxx_messageInfo_ResponseCommit.Marshal(b, m, deterministic)
  1913. } else {
  1914. b = b[:cap(b)]
  1915. n, err := m.MarshalToSizedBuffer(b)
  1916. if err != nil {
  1917. return nil, err
  1918. }
  1919. return b[:n], nil
  1920. }
  1921. }
  1922. func (m *ResponseCommit) XXX_Merge(src proto.Message) {
  1923. xxx_messageInfo_ResponseCommit.Merge(m, src)
  1924. }
  1925. func (m *ResponseCommit) XXX_Size() int {
  1926. return m.Size()
  1927. }
  1928. func (m *ResponseCommit) XXX_DiscardUnknown() {
  1929. xxx_messageInfo_ResponseCommit.DiscardUnknown(m)
  1930. }
  1931. var xxx_messageInfo_ResponseCommit proto.InternalMessageInfo
  1932. func (m *ResponseCommit) GetData() []byte {
  1933. if m != nil {
  1934. return m.Data
  1935. }
  1936. return nil
  1937. }
  1938. func (m *ResponseCommit) GetRetainHeight() int64 {
  1939. if m != nil {
  1940. return m.RetainHeight
  1941. }
  1942. return 0
  1943. }
  1944. type ResponseListSnapshots struct {
  1945. Snapshots []*Snapshot `protobuf:"bytes,1,rep,name=snapshots,proto3" json:"snapshots,omitempty"`
  1946. }
  1947. func (m *ResponseListSnapshots) Reset() { *m = ResponseListSnapshots{} }
  1948. func (m *ResponseListSnapshots) String() string { return proto.CompactTextString(m) }
  1949. func (*ResponseListSnapshots) ProtoMessage() {}
  1950. func (*ResponseListSnapshots) Descriptor() ([]byte, []int) {
  1951. return fileDescriptor_252557cfdd89a31a, []int{27}
  1952. }
  1953. func (m *ResponseListSnapshots) XXX_Unmarshal(b []byte) error {
  1954. return m.Unmarshal(b)
  1955. }
  1956. func (m *ResponseListSnapshots) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1957. if deterministic {
  1958. return xxx_messageInfo_ResponseListSnapshots.Marshal(b, m, deterministic)
  1959. } else {
  1960. b = b[:cap(b)]
  1961. n, err := m.MarshalToSizedBuffer(b)
  1962. if err != nil {
  1963. return nil, err
  1964. }
  1965. return b[:n], nil
  1966. }
  1967. }
  1968. func (m *ResponseListSnapshots) XXX_Merge(src proto.Message) {
  1969. xxx_messageInfo_ResponseListSnapshots.Merge(m, src)
  1970. }
  1971. func (m *ResponseListSnapshots) XXX_Size() int {
  1972. return m.Size()
  1973. }
  1974. func (m *ResponseListSnapshots) XXX_DiscardUnknown() {
  1975. xxx_messageInfo_ResponseListSnapshots.DiscardUnknown(m)
  1976. }
  1977. var xxx_messageInfo_ResponseListSnapshots proto.InternalMessageInfo
  1978. func (m *ResponseListSnapshots) GetSnapshots() []*Snapshot {
  1979. if m != nil {
  1980. return m.Snapshots
  1981. }
  1982. return nil
  1983. }
  1984. type ResponseOfferSnapshot struct {
  1985. Result ResponseOfferSnapshot_Result `protobuf:"varint,1,opt,name=result,proto3,enum=tendermint.abci.ResponseOfferSnapshot_Result" json:"result,omitempty"`
  1986. }
  1987. func (m *ResponseOfferSnapshot) Reset() { *m = ResponseOfferSnapshot{} }
  1988. func (m *ResponseOfferSnapshot) String() string { return proto.CompactTextString(m) }
  1989. func (*ResponseOfferSnapshot) ProtoMessage() {}
  1990. func (*ResponseOfferSnapshot) Descriptor() ([]byte, []int) {
  1991. return fileDescriptor_252557cfdd89a31a, []int{28}
  1992. }
  1993. func (m *ResponseOfferSnapshot) XXX_Unmarshal(b []byte) error {
  1994. return m.Unmarshal(b)
  1995. }
  1996. func (m *ResponseOfferSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1997. if deterministic {
  1998. return xxx_messageInfo_ResponseOfferSnapshot.Marshal(b, m, deterministic)
  1999. } else {
  2000. b = b[:cap(b)]
  2001. n, err := m.MarshalToSizedBuffer(b)
  2002. if err != nil {
  2003. return nil, err
  2004. }
  2005. return b[:n], nil
  2006. }
  2007. }
  2008. func (m *ResponseOfferSnapshot) XXX_Merge(src proto.Message) {
  2009. xxx_messageInfo_ResponseOfferSnapshot.Merge(m, src)
  2010. }
  2011. func (m *ResponseOfferSnapshot) XXX_Size() int {
  2012. return m.Size()
  2013. }
  2014. func (m *ResponseOfferSnapshot) XXX_DiscardUnknown() {
  2015. xxx_messageInfo_ResponseOfferSnapshot.DiscardUnknown(m)
  2016. }
  2017. var xxx_messageInfo_ResponseOfferSnapshot proto.InternalMessageInfo
  2018. func (m *ResponseOfferSnapshot) GetResult() ResponseOfferSnapshot_Result {
  2019. if m != nil {
  2020. return m.Result
  2021. }
  2022. return ResponseOfferSnapshot_UNKNOWN
  2023. }
  2024. type ResponseLoadSnapshotChunk struct {
  2025. Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"`
  2026. }
  2027. func (m *ResponseLoadSnapshotChunk) Reset() { *m = ResponseLoadSnapshotChunk{} }
  2028. func (m *ResponseLoadSnapshotChunk) String() string { return proto.CompactTextString(m) }
  2029. func (*ResponseLoadSnapshotChunk) ProtoMessage() {}
  2030. func (*ResponseLoadSnapshotChunk) Descriptor() ([]byte, []int) {
  2031. return fileDescriptor_252557cfdd89a31a, []int{29}
  2032. }
  2033. func (m *ResponseLoadSnapshotChunk) XXX_Unmarshal(b []byte) error {
  2034. return m.Unmarshal(b)
  2035. }
  2036. func (m *ResponseLoadSnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2037. if deterministic {
  2038. return xxx_messageInfo_ResponseLoadSnapshotChunk.Marshal(b, m, deterministic)
  2039. } else {
  2040. b = b[:cap(b)]
  2041. n, err := m.MarshalToSizedBuffer(b)
  2042. if err != nil {
  2043. return nil, err
  2044. }
  2045. return b[:n], nil
  2046. }
  2047. }
  2048. func (m *ResponseLoadSnapshotChunk) XXX_Merge(src proto.Message) {
  2049. xxx_messageInfo_ResponseLoadSnapshotChunk.Merge(m, src)
  2050. }
  2051. func (m *ResponseLoadSnapshotChunk) XXX_Size() int {
  2052. return m.Size()
  2053. }
  2054. func (m *ResponseLoadSnapshotChunk) XXX_DiscardUnknown() {
  2055. xxx_messageInfo_ResponseLoadSnapshotChunk.DiscardUnknown(m)
  2056. }
  2057. var xxx_messageInfo_ResponseLoadSnapshotChunk proto.InternalMessageInfo
  2058. func (m *ResponseLoadSnapshotChunk) GetChunk() []byte {
  2059. if m != nil {
  2060. return m.Chunk
  2061. }
  2062. return nil
  2063. }
  2064. type ResponseApplySnapshotChunk struct {
  2065. Result ResponseApplySnapshotChunk_Result `protobuf:"varint,1,opt,name=result,proto3,enum=tendermint.abci.ResponseApplySnapshotChunk_Result" json:"result,omitempty"`
  2066. RefetchChunks []uint32 `protobuf:"varint,2,rep,packed,name=refetch_chunks,json=refetchChunks,proto3" json:"refetch_chunks,omitempty"`
  2067. RejectSenders []string `protobuf:"bytes,3,rep,name=reject_senders,json=rejectSenders,proto3" json:"reject_senders,omitempty"`
  2068. }
  2069. func (m *ResponseApplySnapshotChunk) Reset() { *m = ResponseApplySnapshotChunk{} }
  2070. func (m *ResponseApplySnapshotChunk) String() string { return proto.CompactTextString(m) }
  2071. func (*ResponseApplySnapshotChunk) ProtoMessage() {}
  2072. func (*ResponseApplySnapshotChunk) Descriptor() ([]byte, []int) {
  2073. return fileDescriptor_252557cfdd89a31a, []int{30}
  2074. }
  2075. func (m *ResponseApplySnapshotChunk) XXX_Unmarshal(b []byte) error {
  2076. return m.Unmarshal(b)
  2077. }
  2078. func (m *ResponseApplySnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2079. if deterministic {
  2080. return xxx_messageInfo_ResponseApplySnapshotChunk.Marshal(b, m, deterministic)
  2081. } else {
  2082. b = b[:cap(b)]
  2083. n, err := m.MarshalToSizedBuffer(b)
  2084. if err != nil {
  2085. return nil, err
  2086. }
  2087. return b[:n], nil
  2088. }
  2089. }
  2090. func (m *ResponseApplySnapshotChunk) XXX_Merge(src proto.Message) {
  2091. xxx_messageInfo_ResponseApplySnapshotChunk.Merge(m, src)
  2092. }
  2093. func (m *ResponseApplySnapshotChunk) XXX_Size() int {
  2094. return m.Size()
  2095. }
  2096. func (m *ResponseApplySnapshotChunk) XXX_DiscardUnknown() {
  2097. xxx_messageInfo_ResponseApplySnapshotChunk.DiscardUnknown(m)
  2098. }
  2099. var xxx_messageInfo_ResponseApplySnapshotChunk proto.InternalMessageInfo
  2100. func (m *ResponseApplySnapshotChunk) GetResult() ResponseApplySnapshotChunk_Result {
  2101. if m != nil {
  2102. return m.Result
  2103. }
  2104. return ResponseApplySnapshotChunk_UNKNOWN
  2105. }
  2106. func (m *ResponseApplySnapshotChunk) GetRefetchChunks() []uint32 {
  2107. if m != nil {
  2108. return m.RefetchChunks
  2109. }
  2110. return nil
  2111. }
  2112. func (m *ResponseApplySnapshotChunk) GetRejectSenders() []string {
  2113. if m != nil {
  2114. return m.RejectSenders
  2115. }
  2116. return nil
  2117. }
  2118. type LastCommitInfo struct {
  2119. Round int32 `protobuf:"varint,1,opt,name=round,proto3" json:"round,omitempty"`
  2120. Votes []VoteInfo `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes"`
  2121. }
  2122. func (m *LastCommitInfo) Reset() { *m = LastCommitInfo{} }
  2123. func (m *LastCommitInfo) String() string { return proto.CompactTextString(m) }
  2124. func (*LastCommitInfo) ProtoMessage() {}
  2125. func (*LastCommitInfo) Descriptor() ([]byte, []int) {
  2126. return fileDescriptor_252557cfdd89a31a, []int{31}
  2127. }
  2128. func (m *LastCommitInfo) XXX_Unmarshal(b []byte) error {
  2129. return m.Unmarshal(b)
  2130. }
  2131. func (m *LastCommitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2132. if deterministic {
  2133. return xxx_messageInfo_LastCommitInfo.Marshal(b, m, deterministic)
  2134. } else {
  2135. b = b[:cap(b)]
  2136. n, err := m.MarshalToSizedBuffer(b)
  2137. if err != nil {
  2138. return nil, err
  2139. }
  2140. return b[:n], nil
  2141. }
  2142. }
  2143. func (m *LastCommitInfo) XXX_Merge(src proto.Message) {
  2144. xxx_messageInfo_LastCommitInfo.Merge(m, src)
  2145. }
  2146. func (m *LastCommitInfo) XXX_Size() int {
  2147. return m.Size()
  2148. }
  2149. func (m *LastCommitInfo) XXX_DiscardUnknown() {
  2150. xxx_messageInfo_LastCommitInfo.DiscardUnknown(m)
  2151. }
  2152. var xxx_messageInfo_LastCommitInfo proto.InternalMessageInfo
  2153. func (m *LastCommitInfo) GetRound() int32 {
  2154. if m != nil {
  2155. return m.Round
  2156. }
  2157. return 0
  2158. }
  2159. func (m *LastCommitInfo) GetVotes() []VoteInfo {
  2160. if m != nil {
  2161. return m.Votes
  2162. }
  2163. return nil
  2164. }
  2165. // Event allows application developers to attach additional information to
  2166. // ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx.
  2167. // Later, transactions may be queried using these events.
  2168. type Event struct {
  2169. Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
  2170. Attributes []EventAttribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"`
  2171. }
  2172. func (m *Event) Reset() { *m = Event{} }
  2173. func (m *Event) String() string { return proto.CompactTextString(m) }
  2174. func (*Event) ProtoMessage() {}
  2175. func (*Event) Descriptor() ([]byte, []int) {
  2176. return fileDescriptor_252557cfdd89a31a, []int{32}
  2177. }
  2178. func (m *Event) XXX_Unmarshal(b []byte) error {
  2179. return m.Unmarshal(b)
  2180. }
  2181. func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2182. if deterministic {
  2183. return xxx_messageInfo_Event.Marshal(b, m, deterministic)
  2184. } else {
  2185. b = b[:cap(b)]
  2186. n, err := m.MarshalToSizedBuffer(b)
  2187. if err != nil {
  2188. return nil, err
  2189. }
  2190. return b[:n], nil
  2191. }
  2192. }
  2193. func (m *Event) XXX_Merge(src proto.Message) {
  2194. xxx_messageInfo_Event.Merge(m, src)
  2195. }
  2196. func (m *Event) XXX_Size() int {
  2197. return m.Size()
  2198. }
  2199. func (m *Event) XXX_DiscardUnknown() {
  2200. xxx_messageInfo_Event.DiscardUnknown(m)
  2201. }
  2202. var xxx_messageInfo_Event proto.InternalMessageInfo
  2203. func (m *Event) GetType() string {
  2204. if m != nil {
  2205. return m.Type
  2206. }
  2207. return ""
  2208. }
  2209. func (m *Event) GetAttributes() []EventAttribute {
  2210. if m != nil {
  2211. return m.Attributes
  2212. }
  2213. return nil
  2214. }
  2215. // EventAttribute is a single key-value pair, associated with an event.
  2216. type EventAttribute struct {
  2217. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  2218. Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
  2219. Index bool `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
  2220. }
  2221. func (m *EventAttribute) Reset() { *m = EventAttribute{} }
  2222. func (m *EventAttribute) String() string { return proto.CompactTextString(m) }
  2223. func (*EventAttribute) ProtoMessage() {}
  2224. func (*EventAttribute) Descriptor() ([]byte, []int) {
  2225. return fileDescriptor_252557cfdd89a31a, []int{33}
  2226. }
  2227. func (m *EventAttribute) XXX_Unmarshal(b []byte) error {
  2228. return m.Unmarshal(b)
  2229. }
  2230. func (m *EventAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2231. if deterministic {
  2232. return xxx_messageInfo_EventAttribute.Marshal(b, m, deterministic)
  2233. } else {
  2234. b = b[:cap(b)]
  2235. n, err := m.MarshalToSizedBuffer(b)
  2236. if err != nil {
  2237. return nil, err
  2238. }
  2239. return b[:n], nil
  2240. }
  2241. }
  2242. func (m *EventAttribute) XXX_Merge(src proto.Message) {
  2243. xxx_messageInfo_EventAttribute.Merge(m, src)
  2244. }
  2245. func (m *EventAttribute) XXX_Size() int {
  2246. return m.Size()
  2247. }
  2248. func (m *EventAttribute) XXX_DiscardUnknown() {
  2249. xxx_messageInfo_EventAttribute.DiscardUnknown(m)
  2250. }
  2251. var xxx_messageInfo_EventAttribute proto.InternalMessageInfo
  2252. func (m *EventAttribute) GetKey() string {
  2253. if m != nil {
  2254. return m.Key
  2255. }
  2256. return ""
  2257. }
  2258. func (m *EventAttribute) GetValue() string {
  2259. if m != nil {
  2260. return m.Value
  2261. }
  2262. return ""
  2263. }
  2264. func (m *EventAttribute) GetIndex() bool {
  2265. if m != nil {
  2266. return m.Index
  2267. }
  2268. return false
  2269. }
  2270. // TxResult contains results of executing the transaction.
  2271. //
  2272. // One usage is indexing transaction results.
  2273. type TxResult struct {
  2274. Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  2275. Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
  2276. Tx []byte `protobuf:"bytes,3,opt,name=tx,proto3" json:"tx,omitempty"`
  2277. Result ResponseDeliverTx `protobuf:"bytes,4,opt,name=result,proto3" json:"result"`
  2278. }
  2279. func (m *TxResult) Reset() { *m = TxResult{} }
  2280. func (m *TxResult) String() string { return proto.CompactTextString(m) }
  2281. func (*TxResult) ProtoMessage() {}
  2282. func (*TxResult) Descriptor() ([]byte, []int) {
  2283. return fileDescriptor_252557cfdd89a31a, []int{34}
  2284. }
  2285. func (m *TxResult) XXX_Unmarshal(b []byte) error {
  2286. return m.Unmarshal(b)
  2287. }
  2288. func (m *TxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2289. if deterministic {
  2290. return xxx_messageInfo_TxResult.Marshal(b, m, deterministic)
  2291. } else {
  2292. b = b[:cap(b)]
  2293. n, err := m.MarshalToSizedBuffer(b)
  2294. if err != nil {
  2295. return nil, err
  2296. }
  2297. return b[:n], nil
  2298. }
  2299. }
  2300. func (m *TxResult) XXX_Merge(src proto.Message) {
  2301. xxx_messageInfo_TxResult.Merge(m, src)
  2302. }
  2303. func (m *TxResult) XXX_Size() int {
  2304. return m.Size()
  2305. }
  2306. func (m *TxResult) XXX_DiscardUnknown() {
  2307. xxx_messageInfo_TxResult.DiscardUnknown(m)
  2308. }
  2309. var xxx_messageInfo_TxResult proto.InternalMessageInfo
  2310. func (m *TxResult) GetHeight() int64 {
  2311. if m != nil {
  2312. return m.Height
  2313. }
  2314. return 0
  2315. }
  2316. func (m *TxResult) GetIndex() uint32 {
  2317. if m != nil {
  2318. return m.Index
  2319. }
  2320. return 0
  2321. }
  2322. func (m *TxResult) GetTx() []byte {
  2323. if m != nil {
  2324. return m.Tx
  2325. }
  2326. return nil
  2327. }
  2328. func (m *TxResult) GetResult() ResponseDeliverTx {
  2329. if m != nil {
  2330. return m.Result
  2331. }
  2332. return ResponseDeliverTx{}
  2333. }
  2334. // Validator
  2335. type Validator struct {
  2336. Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
  2337. // PubKey pub_key = 2 [(gogoproto.nullable)=false];
  2338. Power int64 `protobuf:"varint,3,opt,name=power,proto3" json:"power,omitempty"`
  2339. }
  2340. func (m *Validator) Reset() { *m = Validator{} }
  2341. func (m *Validator) String() string { return proto.CompactTextString(m) }
  2342. func (*Validator) ProtoMessage() {}
  2343. func (*Validator) Descriptor() ([]byte, []int) {
  2344. return fileDescriptor_252557cfdd89a31a, []int{35}
  2345. }
  2346. func (m *Validator) XXX_Unmarshal(b []byte) error {
  2347. return m.Unmarshal(b)
  2348. }
  2349. func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2350. if deterministic {
  2351. return xxx_messageInfo_Validator.Marshal(b, m, deterministic)
  2352. } else {
  2353. b = b[:cap(b)]
  2354. n, err := m.MarshalToSizedBuffer(b)
  2355. if err != nil {
  2356. return nil, err
  2357. }
  2358. return b[:n], nil
  2359. }
  2360. }
  2361. func (m *Validator) XXX_Merge(src proto.Message) {
  2362. xxx_messageInfo_Validator.Merge(m, src)
  2363. }
  2364. func (m *Validator) XXX_Size() int {
  2365. return m.Size()
  2366. }
  2367. func (m *Validator) XXX_DiscardUnknown() {
  2368. xxx_messageInfo_Validator.DiscardUnknown(m)
  2369. }
  2370. var xxx_messageInfo_Validator proto.InternalMessageInfo
  2371. func (m *Validator) GetAddress() []byte {
  2372. if m != nil {
  2373. return m.Address
  2374. }
  2375. return nil
  2376. }
  2377. func (m *Validator) GetPower() int64 {
  2378. if m != nil {
  2379. return m.Power
  2380. }
  2381. return 0
  2382. }
  2383. // ValidatorUpdate
  2384. type ValidatorUpdate struct {
  2385. PubKey crypto.PublicKey `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key"`
  2386. Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"`
  2387. }
  2388. func (m *ValidatorUpdate) Reset() { *m = ValidatorUpdate{} }
  2389. func (m *ValidatorUpdate) String() string { return proto.CompactTextString(m) }
  2390. func (*ValidatorUpdate) ProtoMessage() {}
  2391. func (*ValidatorUpdate) Descriptor() ([]byte, []int) {
  2392. return fileDescriptor_252557cfdd89a31a, []int{36}
  2393. }
  2394. func (m *ValidatorUpdate) XXX_Unmarshal(b []byte) error {
  2395. return m.Unmarshal(b)
  2396. }
  2397. func (m *ValidatorUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2398. if deterministic {
  2399. return xxx_messageInfo_ValidatorUpdate.Marshal(b, m, deterministic)
  2400. } else {
  2401. b = b[:cap(b)]
  2402. n, err := m.MarshalToSizedBuffer(b)
  2403. if err != nil {
  2404. return nil, err
  2405. }
  2406. return b[:n], nil
  2407. }
  2408. }
  2409. func (m *ValidatorUpdate) XXX_Merge(src proto.Message) {
  2410. xxx_messageInfo_ValidatorUpdate.Merge(m, src)
  2411. }
  2412. func (m *ValidatorUpdate) XXX_Size() int {
  2413. return m.Size()
  2414. }
  2415. func (m *ValidatorUpdate) XXX_DiscardUnknown() {
  2416. xxx_messageInfo_ValidatorUpdate.DiscardUnknown(m)
  2417. }
  2418. var xxx_messageInfo_ValidatorUpdate proto.InternalMessageInfo
  2419. func (m *ValidatorUpdate) GetPubKey() crypto.PublicKey {
  2420. if m != nil {
  2421. return m.PubKey
  2422. }
  2423. return crypto.PublicKey{}
  2424. }
  2425. func (m *ValidatorUpdate) GetPower() int64 {
  2426. if m != nil {
  2427. return m.Power
  2428. }
  2429. return 0
  2430. }
  2431. // VoteInfo
  2432. type VoteInfo struct {
  2433. Validator Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"`
  2434. SignedLastBlock bool `protobuf:"varint,2,opt,name=signed_last_block,json=signedLastBlock,proto3" json:"signed_last_block,omitempty"`
  2435. }
  2436. func (m *VoteInfo) Reset() { *m = VoteInfo{} }
  2437. func (m *VoteInfo) String() string { return proto.CompactTextString(m) }
  2438. func (*VoteInfo) ProtoMessage() {}
  2439. func (*VoteInfo) Descriptor() ([]byte, []int) {
  2440. return fileDescriptor_252557cfdd89a31a, []int{37}
  2441. }
  2442. func (m *VoteInfo) XXX_Unmarshal(b []byte) error {
  2443. return m.Unmarshal(b)
  2444. }
  2445. func (m *VoteInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2446. if deterministic {
  2447. return xxx_messageInfo_VoteInfo.Marshal(b, m, deterministic)
  2448. } else {
  2449. b = b[:cap(b)]
  2450. n, err := m.MarshalToSizedBuffer(b)
  2451. if err != nil {
  2452. return nil, err
  2453. }
  2454. return b[:n], nil
  2455. }
  2456. }
  2457. func (m *VoteInfo) XXX_Merge(src proto.Message) {
  2458. xxx_messageInfo_VoteInfo.Merge(m, src)
  2459. }
  2460. func (m *VoteInfo) XXX_Size() int {
  2461. return m.Size()
  2462. }
  2463. func (m *VoteInfo) XXX_DiscardUnknown() {
  2464. xxx_messageInfo_VoteInfo.DiscardUnknown(m)
  2465. }
  2466. var xxx_messageInfo_VoteInfo proto.InternalMessageInfo
  2467. func (m *VoteInfo) GetValidator() Validator {
  2468. if m != nil {
  2469. return m.Validator
  2470. }
  2471. return Validator{}
  2472. }
  2473. func (m *VoteInfo) GetSignedLastBlock() bool {
  2474. if m != nil {
  2475. return m.SignedLastBlock
  2476. }
  2477. return false
  2478. }
  2479. type Evidence struct {
  2480. Type EvidenceType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.abci.EvidenceType" json:"type,omitempty"`
  2481. // The offending validator
  2482. Validator Validator `protobuf:"bytes,2,opt,name=validator,proto3" json:"validator"`
  2483. // The height when the offense occurred
  2484. Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
  2485. // The corresponding time where the offense occurred
  2486. Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"`
  2487. // Total voting power of the validator set in case the ABCI application does
  2488. // not store historical validators.
  2489. // https://github.com/tendermint/tendermint/issues/4581
  2490. TotalVotingPower int64 `protobuf:"varint,5,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"`
  2491. }
  2492. func (m *Evidence) Reset() { *m = Evidence{} }
  2493. func (m *Evidence) String() string { return proto.CompactTextString(m) }
  2494. func (*Evidence) ProtoMessage() {}
  2495. func (*Evidence) Descriptor() ([]byte, []int) {
  2496. return fileDescriptor_252557cfdd89a31a, []int{38}
  2497. }
  2498. func (m *Evidence) XXX_Unmarshal(b []byte) error {
  2499. return m.Unmarshal(b)
  2500. }
  2501. func (m *Evidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2502. if deterministic {
  2503. return xxx_messageInfo_Evidence.Marshal(b, m, deterministic)
  2504. } else {
  2505. b = b[:cap(b)]
  2506. n, err := m.MarshalToSizedBuffer(b)
  2507. if err != nil {
  2508. return nil, err
  2509. }
  2510. return b[:n], nil
  2511. }
  2512. }
  2513. func (m *Evidence) XXX_Merge(src proto.Message) {
  2514. xxx_messageInfo_Evidence.Merge(m, src)
  2515. }
  2516. func (m *Evidence) XXX_Size() int {
  2517. return m.Size()
  2518. }
  2519. func (m *Evidence) XXX_DiscardUnknown() {
  2520. xxx_messageInfo_Evidence.DiscardUnknown(m)
  2521. }
  2522. var xxx_messageInfo_Evidence proto.InternalMessageInfo
  2523. func (m *Evidence) GetType() EvidenceType {
  2524. if m != nil {
  2525. return m.Type
  2526. }
  2527. return EvidenceType_UNKNOWN
  2528. }
  2529. func (m *Evidence) GetValidator() Validator {
  2530. if m != nil {
  2531. return m.Validator
  2532. }
  2533. return Validator{}
  2534. }
  2535. func (m *Evidence) GetHeight() int64 {
  2536. if m != nil {
  2537. return m.Height
  2538. }
  2539. return 0
  2540. }
  2541. func (m *Evidence) GetTime() time.Time {
  2542. if m != nil {
  2543. return m.Time
  2544. }
  2545. return time.Time{}
  2546. }
  2547. func (m *Evidence) GetTotalVotingPower() int64 {
  2548. if m != nil {
  2549. return m.TotalVotingPower
  2550. }
  2551. return 0
  2552. }
  2553. type Snapshot struct {
  2554. Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  2555. Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"`
  2556. Chunks uint32 `protobuf:"varint,3,opt,name=chunks,proto3" json:"chunks,omitempty"`
  2557. Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"`
  2558. Metadata []byte `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
  2559. }
  2560. func (m *Snapshot) Reset() { *m = Snapshot{} }
  2561. func (m *Snapshot) String() string { return proto.CompactTextString(m) }
  2562. func (*Snapshot) ProtoMessage() {}
  2563. func (*Snapshot) Descriptor() ([]byte, []int) {
  2564. return fileDescriptor_252557cfdd89a31a, []int{39}
  2565. }
  2566. func (m *Snapshot) XXX_Unmarshal(b []byte) error {
  2567. return m.Unmarshal(b)
  2568. }
  2569. func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  2570. if deterministic {
  2571. return xxx_messageInfo_Snapshot.Marshal(b, m, deterministic)
  2572. } else {
  2573. b = b[:cap(b)]
  2574. n, err := m.MarshalToSizedBuffer(b)
  2575. if err != nil {
  2576. return nil, err
  2577. }
  2578. return b[:n], nil
  2579. }
  2580. }
  2581. func (m *Snapshot) XXX_Merge(src proto.Message) {
  2582. xxx_messageInfo_Snapshot.Merge(m, src)
  2583. }
  2584. func (m *Snapshot) XXX_Size() int {
  2585. return m.Size()
  2586. }
  2587. func (m *Snapshot) XXX_DiscardUnknown() {
  2588. xxx_messageInfo_Snapshot.DiscardUnknown(m)
  2589. }
  2590. var xxx_messageInfo_Snapshot proto.InternalMessageInfo
  2591. func (m *Snapshot) GetHeight() uint64 {
  2592. if m != nil {
  2593. return m.Height
  2594. }
  2595. return 0
  2596. }
  2597. func (m *Snapshot) GetFormat() uint32 {
  2598. if m != nil {
  2599. return m.Format
  2600. }
  2601. return 0
  2602. }
  2603. func (m *Snapshot) GetChunks() uint32 {
  2604. if m != nil {
  2605. return m.Chunks
  2606. }
  2607. return 0
  2608. }
  2609. func (m *Snapshot) GetHash() []byte {
  2610. if m != nil {
  2611. return m.Hash
  2612. }
  2613. return nil
  2614. }
  2615. func (m *Snapshot) GetMetadata() []byte {
  2616. if m != nil {
  2617. return m.Metadata
  2618. }
  2619. return nil
  2620. }
  2621. func init() {
  2622. proto.RegisterEnum("tendermint.abci.CheckTxType", CheckTxType_name, CheckTxType_value)
  2623. proto.RegisterEnum("tendermint.abci.EvidenceType", EvidenceType_name, EvidenceType_value)
  2624. proto.RegisterEnum("tendermint.abci.ResponseOfferSnapshot_Result", ResponseOfferSnapshot_Result_name, ResponseOfferSnapshot_Result_value)
  2625. proto.RegisterEnum("tendermint.abci.ResponseApplySnapshotChunk_Result", ResponseApplySnapshotChunk_Result_name, ResponseApplySnapshotChunk_Result_value)
  2626. proto.RegisterType((*Request)(nil), "tendermint.abci.Request")
  2627. proto.RegisterType((*RequestEcho)(nil), "tendermint.abci.RequestEcho")
  2628. proto.RegisterType((*RequestFlush)(nil), "tendermint.abci.RequestFlush")
  2629. proto.RegisterType((*RequestInfo)(nil), "tendermint.abci.RequestInfo")
  2630. proto.RegisterType((*RequestInitChain)(nil), "tendermint.abci.RequestInitChain")
  2631. proto.RegisterType((*RequestQuery)(nil), "tendermint.abci.RequestQuery")
  2632. proto.RegisterType((*RequestBeginBlock)(nil), "tendermint.abci.RequestBeginBlock")
  2633. proto.RegisterType((*RequestCheckTx)(nil), "tendermint.abci.RequestCheckTx")
  2634. proto.RegisterType((*RequestDeliverTx)(nil), "tendermint.abci.RequestDeliverTx")
  2635. proto.RegisterType((*RequestEndBlock)(nil), "tendermint.abci.RequestEndBlock")
  2636. proto.RegisterType((*RequestCommit)(nil), "tendermint.abci.RequestCommit")
  2637. proto.RegisterType((*RequestListSnapshots)(nil), "tendermint.abci.RequestListSnapshots")
  2638. proto.RegisterType((*RequestOfferSnapshot)(nil), "tendermint.abci.RequestOfferSnapshot")
  2639. proto.RegisterType((*RequestLoadSnapshotChunk)(nil), "tendermint.abci.RequestLoadSnapshotChunk")
  2640. proto.RegisterType((*RequestApplySnapshotChunk)(nil), "tendermint.abci.RequestApplySnapshotChunk")
  2641. proto.RegisterType((*Response)(nil), "tendermint.abci.Response")
  2642. proto.RegisterType((*ResponseException)(nil), "tendermint.abci.ResponseException")
  2643. proto.RegisterType((*ResponseEcho)(nil), "tendermint.abci.ResponseEcho")
  2644. proto.RegisterType((*ResponseFlush)(nil), "tendermint.abci.ResponseFlush")
  2645. proto.RegisterType((*ResponseInfo)(nil), "tendermint.abci.ResponseInfo")
  2646. proto.RegisterType((*ResponseInitChain)(nil), "tendermint.abci.ResponseInitChain")
  2647. proto.RegisterType((*ResponseQuery)(nil), "tendermint.abci.ResponseQuery")
  2648. proto.RegisterType((*ResponseBeginBlock)(nil), "tendermint.abci.ResponseBeginBlock")
  2649. proto.RegisterType((*ResponseCheckTx)(nil), "tendermint.abci.ResponseCheckTx")
  2650. proto.RegisterType((*ResponseDeliverTx)(nil), "tendermint.abci.ResponseDeliverTx")
  2651. proto.RegisterType((*ResponseEndBlock)(nil), "tendermint.abci.ResponseEndBlock")
  2652. proto.RegisterType((*ResponseCommit)(nil), "tendermint.abci.ResponseCommit")
  2653. proto.RegisterType((*ResponseListSnapshots)(nil), "tendermint.abci.ResponseListSnapshots")
  2654. proto.RegisterType((*ResponseOfferSnapshot)(nil), "tendermint.abci.ResponseOfferSnapshot")
  2655. proto.RegisterType((*ResponseLoadSnapshotChunk)(nil), "tendermint.abci.ResponseLoadSnapshotChunk")
  2656. proto.RegisterType((*ResponseApplySnapshotChunk)(nil), "tendermint.abci.ResponseApplySnapshotChunk")
  2657. proto.RegisterType((*LastCommitInfo)(nil), "tendermint.abci.LastCommitInfo")
  2658. proto.RegisterType((*Event)(nil), "tendermint.abci.Event")
  2659. proto.RegisterType((*EventAttribute)(nil), "tendermint.abci.EventAttribute")
  2660. proto.RegisterType((*TxResult)(nil), "tendermint.abci.TxResult")
  2661. proto.RegisterType((*Validator)(nil), "tendermint.abci.Validator")
  2662. proto.RegisterType((*ValidatorUpdate)(nil), "tendermint.abci.ValidatorUpdate")
  2663. proto.RegisterType((*VoteInfo)(nil), "tendermint.abci.VoteInfo")
  2664. proto.RegisterType((*Evidence)(nil), "tendermint.abci.Evidence")
  2665. proto.RegisterType((*Snapshot)(nil), "tendermint.abci.Snapshot")
  2666. }
  2667. func init() { proto.RegisterFile("tendermint/abci/types.proto", fileDescriptor_252557cfdd89a31a) }
  2668. var fileDescriptor_252557cfdd89a31a = []byte{
  2669. // 2627 bytes of a gzipped FileDescriptorProto
  2670. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5a, 0xcd, 0x73, 0xdb, 0xc6,
  2671. 0x15, 0xe7, 0x37, 0x89, 0x47, 0x91, 0xa2, 0xd6, 0x8a, 0x43, 0x33, 0xb6, 0xe4, 0xc0, 0xe3, 0x34,
  2672. 0x76, 0x12, 0xa9, 0x91, 0xc7, 0xae, 0x33, 0xe9, 0x47, 0x44, 0x9a, 0x2e, 0x15, 0xab, 0x92, 0xba,
  2673. 0xa2, 0x9d, 0x49, 0xdb, 0x18, 0x01, 0x89, 0x15, 0x89, 0x98, 0x04, 0x10, 0x60, 0x29, 0x4b, 0x39,
  2674. 0x76, 0xda, 0x8b, 0xa7, 0x07, 0x1f, 0x7b, 0xc9, 0x4c, 0xff, 0x83, 0x5e, 0x7b, 0xea, 0xa9, 0x87,
  2675. 0x1c, 0xda, 0x99, 0x1c, 0x7b, 0xe8, 0xa4, 0x1d, 0xfb, 0xd6, 0x7f, 0xa0, 0xa7, 0xce, 0x74, 0xf6,
  2676. 0x03, 0x20, 0x40, 0x12, 0x22, 0xd5, 0xf4, 0xd6, 0xdb, 0xee, 0xc3, 0x7b, 0x8f, 0xbb, 0x6f, 0xf7,
  2677. 0xfd, 0xf6, 0xb7, 0x6f, 0x09, 0xaf, 0x51, 0x62, 0x19, 0xc4, 0x1d, 0x9a, 0x16, 0xdd, 0xd4, 0x3b,
  2678. 0x5d, 0x73, 0x93, 0x9e, 0x3a, 0xc4, 0xdb, 0x70, 0x5c, 0x9b, 0xda, 0x68, 0x79, 0xfc, 0x71, 0x83,
  2679. 0x7d, 0xac, 0x5d, 0x09, 0x69, 0x77, 0xdd, 0x53, 0x87, 0xda, 0x9b, 0x8e, 0x6b, 0xdb, 0x47, 0x42,
  2680. 0xbf, 0x76, 0x39, 0xf4, 0x99, 0xfb, 0x09, 0x7b, 0x8b, 0x7c, 0x95, 0xc6, 0x4f, 0xc8, 0xa9, 0xff,
  2681. 0xf5, 0xca, 0x94, 0xad, 0xa3, 0xbb, 0xfa, 0xd0, 0xff, 0xbc, 0xde, 0xb3, 0xed, 0xde, 0x80, 0x6c,
  2682. 0xf2, 0x5e, 0x67, 0x74, 0xb4, 0x49, 0xcd, 0x21, 0xf1, 0xa8, 0x3e, 0x74, 0xa4, 0xc2, 0x6a, 0xcf,
  2683. 0xee, 0xd9, 0xbc, 0xb9, 0xc9, 0x5a, 0x42, 0xaa, 0xfe, 0x25, 0x0f, 0x79, 0x4c, 0x3e, 0x1f, 0x11,
  2684. 0x8f, 0xa2, 0x2d, 0xc8, 0x90, 0x6e, 0xdf, 0xae, 0x26, 0xaf, 0x26, 0xdf, 0x2c, 0x6e, 0x5d, 0xde,
  2685. 0x98, 0x98, 0xdc, 0x86, 0xd4, 0x6b, 0x76, 0xfb, 0x76, 0x2b, 0x81, 0xb9, 0x2e, 0xba, 0x0d, 0xd9,
  2686. 0xa3, 0xc1, 0xc8, 0xeb, 0x57, 0x53, 0xdc, 0xe8, 0x4a, 0x9c, 0xd1, 0x7d, 0xa6, 0xd4, 0x4a, 0x60,
  2687. 0xa1, 0xcd, 0x7e, 0xca, 0xb4, 0x8e, 0xec, 0x6a, 0xfa, 0xec, 0x9f, 0xda, 0xb1, 0x8e, 0xf8, 0x4f,
  2688. 0x31, 0x5d, 0x54, 0x07, 0x30, 0x2d, 0x93, 0x6a, 0xdd, 0xbe, 0x6e, 0x5a, 0xd5, 0x0c, 0xb7, 0x7c,
  2689. 0x3d, 0xde, 0xd2, 0xa4, 0x0d, 0xa6, 0xd8, 0x4a, 0x60, 0xc5, 0xf4, 0x3b, 0x6c, 0xb8, 0x9f, 0x8f,
  2690. 0x88, 0x7b, 0x5a, 0xcd, 0x9e, 0x3d, 0xdc, 0x9f, 0x32, 0x25, 0x36, 0x5c, 0xae, 0x8d, 0x9a, 0x50,
  2691. 0xec, 0x90, 0x9e, 0x69, 0x69, 0x9d, 0x81, 0xdd, 0x7d, 0x52, 0xcd, 0x71, 0x63, 0x35, 0xce, 0xb8,
  2692. 0xce, 0x54, 0xeb, 0x4c, 0xb3, 0x95, 0xc0, 0xd0, 0x09, 0x7a, 0xe8, 0xfb, 0x50, 0xe8, 0xf6, 0x49,
  2693. 0xf7, 0x89, 0x46, 0x4f, 0xaa, 0x79, 0xee, 0x63, 0x3d, 0xce, 0x47, 0x83, 0xe9, 0xb5, 0x4f, 0x5a,
  2694. 0x09, 0x9c, 0xef, 0x8a, 0x26, 0x9b, 0xbf, 0x41, 0x06, 0xe6, 0x31, 0x71, 0x99, 0x7d, 0xe1, 0xec,
  2695. 0xf9, 0xdf, 0x13, 0x9a, 0xdc, 0x83, 0x62, 0xf8, 0x1d, 0xf4, 0x23, 0x50, 0x88, 0x65, 0xc8, 0x69,
  2696. 0x28, 0xdc, 0xc5, 0xd5, 0xd8, 0x75, 0xb6, 0x0c, 0x7f, 0x12, 0x05, 0x22, 0xdb, 0xe8, 0x2e, 0xe4,
  2697. 0xba, 0xf6, 0x70, 0x68, 0xd2, 0x2a, 0x70, 0xeb, 0xb5, 0xd8, 0x09, 0x70, 0xad, 0x56, 0x02, 0x4b,
  2698. 0x7d, 0xb4, 0x07, 0xe5, 0x81, 0xe9, 0x51, 0xcd, 0xb3, 0x74, 0xc7, 0xeb, 0xdb, 0xd4, 0xab, 0x16,
  2699. 0xb9, 0x87, 0xeb, 0x71, 0x1e, 0x76, 0x4d, 0x8f, 0x1e, 0xfa, 0xca, 0xad, 0x04, 0x2e, 0x0d, 0xc2,
  2700. 0x02, 0xe6, 0xcf, 0x3e, 0x3a, 0x22, 0x6e, 0xe0, 0xb0, 0xba, 0x74, 0xb6, 0xbf, 0x7d, 0xa6, 0xed,
  2701. 0xdb, 0x33, 0x7f, 0x76, 0x58, 0x80, 0x7e, 0x0e, 0x17, 0x06, 0xb6, 0x6e, 0x04, 0xee, 0xb4, 0x6e,
  2702. 0x7f, 0x64, 0x3d, 0xa9, 0x96, 0xb8, 0xd3, 0x1b, 0xb1, 0x83, 0xb4, 0x75, 0xc3, 0x77, 0xd1, 0x60,
  2703. 0x06, 0xad, 0x04, 0x5e, 0x19, 0x4c, 0x0a, 0xd1, 0x63, 0x58, 0xd5, 0x1d, 0x67, 0x70, 0x3a, 0xe9,
  2704. 0xbd, 0xcc, 0xbd, 0xdf, 0x8c, 0xf3, 0xbe, 0xcd, 0x6c, 0x26, 0xdd, 0x23, 0x7d, 0x4a, 0x5a, 0xcf,
  2705. 0x43, 0xf6, 0x58, 0x1f, 0x8c, 0x88, 0xfa, 0x1d, 0x28, 0x86, 0xd2, 0x14, 0x55, 0x21, 0x3f, 0x24,
  2706. 0x9e, 0xa7, 0xf7, 0x08, 0xcf, 0x6a, 0x05, 0xfb, 0x5d, 0xb5, 0x0c, 0x4b, 0xe1, 0xd4, 0x54, 0x9f,
  2707. 0x27, 0x03, 0x4b, 0x96, 0x75, 0xcc, 0xf2, 0x98, 0xb8, 0x9e, 0x69, 0x5b, 0xbe, 0xa5, 0xec, 0xa2,
  2708. 0x6b, 0x50, 0xe2, 0xfb, 0x47, 0xf3, 0xbf, 0xb3, 0xd4, 0xcf, 0xe0, 0x25, 0x2e, 0x7c, 0x24, 0x95,
  2709. 0xd6, 0xa1, 0xe8, 0x6c, 0x39, 0x81, 0x4a, 0x9a, 0xab, 0x80, 0xb3, 0xe5, 0xf8, 0x0a, 0xaf, 0xc3,
  2710. 0x12, 0x9b, 0x69, 0xa0, 0x91, 0xe1, 0x3f, 0x52, 0x64, 0x32, 0xa9, 0xa2, 0xfe, 0x39, 0x05, 0x95,
  2711. 0xc9, 0x74, 0x46, 0x77, 0x21, 0xc3, 0x90, 0x4d, 0x82, 0x54, 0x6d, 0x43, 0xc0, 0xde, 0x86, 0x0f,
  2712. 0x7b, 0x1b, 0x6d, 0x1f, 0xf6, 0xea, 0x85, 0xaf, 0xbe, 0x59, 0x4f, 0x3c, 0xff, 0xfb, 0x7a, 0x12,
  2713. 0x73, 0x0b, 0x74, 0x89, 0x65, 0x9f, 0x6e, 0x5a, 0x9a, 0x69, 0xf0, 0x21, 0x2b, 0x2c, 0xb5, 0x74,
  2714. 0xd3, 0xda, 0x31, 0xd0, 0x2e, 0x54, 0xba, 0xb6, 0xe5, 0x11, 0xcb, 0x1b, 0x79, 0x9a, 0x80, 0x55,
  2715. 0x09, 0x4d, 0x91, 0x04, 0x13, 0x60, 0xdd, 0xf0, 0x35, 0x0f, 0xb8, 0x22, 0x5e, 0xee, 0x46, 0x05,
  2716. 0xe8, 0x3e, 0xc0, 0xb1, 0x3e, 0x30, 0x0d, 0x9d, 0xda, 0xae, 0x57, 0xcd, 0x5c, 0x4d, 0xcf, 0xcc,
  2717. 0xb2, 0x47, 0xbe, 0xca, 0x43, 0xc7, 0xd0, 0x29, 0xa9, 0x67, 0xd8, 0x70, 0x71, 0xc8, 0x12, 0xbd,
  2718. 0x01, 0xcb, 0xba, 0xe3, 0x68, 0x1e, 0xd5, 0x29, 0xd1, 0x3a, 0xa7, 0x94, 0x78, 0x1c, 0xb6, 0x96,
  2719. 0x70, 0x49, 0x77, 0x9c, 0x43, 0x26, 0xad, 0x33, 0x21, 0xba, 0x0e, 0x65, 0x86, 0x70, 0xa6, 0x3e,
  2720. 0xd0, 0xfa, 0xc4, 0xec, 0xf5, 0x29, 0x07, 0xa8, 0x34, 0x2e, 0x49, 0x69, 0x8b, 0x0b, 0x55, 0x23,
  2721. 0x58, 0x71, 0x8e, 0x6e, 0x08, 0x41, 0xc6, 0xd0, 0xa9, 0xce, 0x23, 0xb9, 0x84, 0x79, 0x9b, 0xc9,
  2722. 0x1c, 0x9d, 0xf6, 0x65, 0x7c, 0x78, 0x1b, 0x5d, 0x84, 0x9c, 0x74, 0x9b, 0xe6, 0x6e, 0x65, 0x0f,
  2723. 0xad, 0x42, 0xd6, 0x71, 0xed, 0x63, 0xc2, 0x97, 0xae, 0x80, 0x45, 0x47, 0xfd, 0x55, 0x0a, 0x56,
  2724. 0xa6, 0x70, 0x90, 0xf9, 0xed, 0xeb, 0x5e, 0xdf, 0xff, 0x2d, 0xd6, 0x46, 0x77, 0x98, 0x5f, 0xdd,
  2725. 0x20, 0xae, 0x3c, 0x3b, 0xaa, 0xd3, 0xa1, 0x6e, 0xf1, 0xef, 0x32, 0x34, 0x52, 0x1b, 0xed, 0x43,
  2726. 0x65, 0xa0, 0x7b, 0x54, 0x13, 0xb8, 0xa2, 0x85, 0xce, 0x91, 0x69, 0x34, 0xdd, 0xd5, 0x7d, 0x24,
  2727. 0x62, 0x9b, 0x5a, 0x3a, 0x2a, 0x0f, 0x22, 0x52, 0x84, 0x61, 0xb5, 0x73, 0xfa, 0x85, 0x6e, 0x51,
  2728. 0xd3, 0x22, 0xda, 0xd4, 0xca, 0x5d, 0x9a, 0x72, 0xda, 0x3c, 0x36, 0x0d, 0x62, 0x75, 0xfd, 0x25,
  2729. 0xbb, 0x10, 0x18, 0x07, 0x4b, 0xea, 0xa9, 0x18, 0xca, 0x51, 0x24, 0x47, 0x65, 0x48, 0xd1, 0x13,
  2730. 0x19, 0x80, 0x14, 0x3d, 0x41, 0xdf, 0x85, 0x0c, 0x9b, 0x24, 0x9f, 0x7c, 0x79, 0xc6, 0x11, 0x28,
  2731. 0xed, 0xda, 0xa7, 0x0e, 0xc1, 0x5c, 0x53, 0x55, 0x83, 0x74, 0x08, 0xd0, 0x7d, 0xd2, 0xab, 0x7a,
  2732. 0x03, 0x96, 0x27, 0xe0, 0x3b, 0xb4, 0x7e, 0xc9, 0xf0, 0xfa, 0xa9, 0xcb, 0x50, 0x8a, 0x60, 0xb5,
  2733. 0x7a, 0x11, 0x56, 0x67, 0x41, 0xaf, 0xda, 0x0f, 0xe4, 0x11, 0x08, 0x45, 0xb7, 0xa1, 0x10, 0x60,
  2734. 0xaf, 0x48, 0xc7, 0xe9, 0x58, 0xf9, 0xca, 0x38, 0x50, 0x65, 0x79, 0xc8, 0xb6, 0x35, 0xdf, 0x0f,
  2735. 0x29, 0x3e, 0xf0, 0xbc, 0xee, 0x38, 0x2d, 0xdd, 0xeb, 0xab, 0x9f, 0x42, 0x35, 0x0e, 0x57, 0x27,
  2736. 0xa6, 0x91, 0x09, 0xb6, 0xe1, 0x45, 0xc8, 0x1d, 0xd9, 0xee, 0x50, 0xa7, 0xdc, 0x59, 0x09, 0xcb,
  2737. 0x1e, 0xdb, 0x9e, 0x02, 0x63, 0xd3, 0x5c, 0x2c, 0x3a, 0xaa, 0x06, 0x97, 0x62, 0xb1, 0x95, 0x99,
  2738. 0x98, 0x96, 0x41, 0x44, 0x3c, 0x4b, 0x58, 0x74, 0xc6, 0x8e, 0xc4, 0x60, 0x45, 0x87, 0xfd, 0xac,
  2739. 0xc7, 0xe7, 0xca, 0xfd, 0x2b, 0x58, 0xf6, 0xd4, 0xdf, 0x15, 0xa0, 0x80, 0x89, 0xe7, 0x30, 0x4c,
  2740. 0x40, 0x75, 0x50, 0xc8, 0x49, 0x97, 0x38, 0xd4, 0x87, 0xd1, 0xd9, 0xac, 0x41, 0x68, 0x37, 0x7d,
  2741. 0x4d, 0x76, 0x64, 0x07, 0x66, 0xe8, 0x96, 0x64, 0x65, 0xf1, 0x04, 0x4b, 0x9a, 0x87, 0x69, 0xd9,
  2742. 0x1d, 0x9f, 0x96, 0xa5, 0x63, 0x4f, 0x69, 0x61, 0x35, 0xc1, 0xcb, 0x6e, 0x49, 0x5e, 0x96, 0x99,
  2743. 0xf3, 0x63, 0x11, 0x62, 0xd6, 0x88, 0x10, 0xb3, 0xec, 0x9c, 0x69, 0xc6, 0x30, 0xb3, 0x3b, 0x3e,
  2744. 0x33, 0xcb, 0xcd, 0x19, 0xf1, 0x04, 0x35, 0xbb, 0x1f, 0xa5, 0x66, 0x82, 0x56, 0x5d, 0x8b, 0xb5,
  2745. 0x8e, 0xe5, 0x66, 0x3f, 0x08, 0x71, 0xb3, 0x42, 0x2c, 0x31, 0x12, 0x4e, 0x66, 0x90, 0xb3, 0x46,
  2746. 0x84, 0x9c, 0x29, 0x73, 0x62, 0x10, 0xc3, 0xce, 0x3e, 0x08, 0xb3, 0x33, 0x88, 0x25, 0x78, 0x72,
  2747. 0xbd, 0x67, 0xd1, 0xb3, 0xf7, 0x02, 0x7a, 0x56, 0x8c, 0xe5, 0x97, 0x72, 0x0e, 0x93, 0xfc, 0x6c,
  2748. 0x7f, 0x8a, 0x9f, 0x09, 0x3e, 0xf5, 0x46, 0xac, 0x8b, 0x39, 0x04, 0x6d, 0x7f, 0x8a, 0xa0, 0x95,
  2749. 0xe6, 0x38, 0x9c, 0xc3, 0xd0, 0x7e, 0x31, 0x9b, 0xa1, 0xc5, 0x73, 0x28, 0x39, 0xcc, 0xc5, 0x28,
  2750. 0x9a, 0x16, 0x43, 0xd1, 0x96, 0xb9, 0xfb, 0xb7, 0x62, 0xdd, 0x9f, 0x9f, 0xa3, 0xdd, 0x60, 0x27,
  2751. 0xe4, 0x44, 0xce, 0x33, 0x94, 0x21, 0xae, 0x6b, 0xbb, 0x92, 0x6d, 0x89, 0x8e, 0xfa, 0x26, 0x3b,
  2752. 0xb3, 0xc7, 0xf9, 0x7d, 0x06, 0x9f, 0xe3, 0x68, 0x1e, 0xca, 0x69, 0xf5, 0x0f, 0xc9, 0xb1, 0x2d,
  2753. 0x3f, 0xe6, 0xc2, 0xe7, 0xbd, 0x22, 0xcf, 0xfb, 0x10, 0xcb, 0x4b, 0x45, 0x59, 0xde, 0x3a, 0x14,
  2754. 0x19, 0x4a, 0x4f, 0x10, 0x38, 0xdd, 0x09, 0x08, 0xdc, 0x4d, 0x58, 0xe1, 0xc7, 0xb0, 0xe0, 0x82,
  2755. 0x12, 0x9a, 0x33, 0xfc, 0x84, 0x59, 0x66, 0x1f, 0xc4, 0xe6, 0x14, 0x18, 0xfd, 0x0e, 0x5c, 0x08,
  2756. 0xe9, 0x06, 0xe8, 0x2f, 0xd8, 0x4c, 0x25, 0xd0, 0xde, 0x96, 0xc7, 0xc0, 0x9f, 0x92, 0xe3, 0x08,
  2757. 0x8d, 0x99, 0xdf, 0x2c, 0x92, 0x96, 0xfc, 0x1f, 0x91, 0xb4, 0xd4, 0x7f, 0x4d, 0xd2, 0xc2, 0xa7,
  2758. 0x59, 0x3a, 0x7a, 0x9a, 0xfd, 0x2b, 0x39, 0x5e, 0x93, 0x80, 0x72, 0x75, 0x6d, 0x83, 0xc8, 0xf3,
  2759. 0x85, 0xb7, 0x51, 0x05, 0xd2, 0x03, 0xbb, 0x27, 0x4f, 0x11, 0xd6, 0x64, 0x5a, 0x01, 0x08, 0x2b,
  2760. 0x12, 0x63, 0x83, 0xa3, 0x29, 0xcb, 0x23, 0x2c, 0x8f, 0xa6, 0x0a, 0xa4, 0x9f, 0x10, 0x01, 0x99,
  2761. 0x4b, 0x98, 0x35, 0x99, 0x1e, 0xdf, 0x64, 0x1c, 0x08, 0x97, 0xb0, 0xe8, 0xa0, 0xbb, 0xa0, 0xf0,
  2762. 0x32, 0x84, 0x66, 0x3b, 0x9e, 0x44, 0xb7, 0xd7, 0xc2, 0x73, 0x15, 0xd5, 0x86, 0x8d, 0x03, 0xa6,
  2763. 0xb3, 0xef, 0x78, 0xb8, 0xe0, 0xc8, 0x56, 0xe8, 0xd4, 0x55, 0x22, 0xe4, 0xef, 0x32, 0x28, 0x6c,
  2764. 0xf4, 0x9e, 0xa3, 0x77, 0x09, 0x87, 0x2a, 0x05, 0x8f, 0x05, 0xea, 0x63, 0x40, 0xd3, 0x80, 0x8b,
  2765. 0x5a, 0x90, 0x23, 0xc7, 0xc4, 0xa2, 0x6c, 0xd9, 0x58, 0xb8, 0x2f, 0xce, 0x60, 0x56, 0xc4, 0xa2,
  2766. 0xf5, 0x2a, 0x0b, 0xf2, 0x3f, 0xbf, 0x59, 0xaf, 0x08, 0xed, 0xb7, 0xed, 0xa1, 0x49, 0xc9, 0xd0,
  2767. 0xa1, 0xa7, 0x58, 0xda, 0xab, 0x7f, 0x4b, 0x31, 0x9a, 0x13, 0x01, 0xe3, 0x99, 0xb1, 0xf5, 0xb7,
  2768. 0x7c, 0x2a, 0x44, 0x71, 0x17, 0x8b, 0xf7, 0x1a, 0x40, 0x4f, 0xf7, 0xb4, 0xa7, 0xba, 0x45, 0x89,
  2769. 0x21, 0x83, 0x1e, 0x92, 0xa0, 0x1a, 0x14, 0x58, 0x6f, 0xe4, 0x11, 0x43, 0xb2, 0xed, 0xa0, 0x1f,
  2770. 0x9a, 0x67, 0xfe, 0xdb, 0xcd, 0x33, 0x1a, 0xe5, 0xc2, 0x44, 0x94, 0x43, 0x14, 0x44, 0x09, 0x53,
  2771. 0x10, 0x36, 0x36, 0xc7, 0x35, 0x6d, 0xd7, 0xa4, 0xa7, 0x7c, 0x69, 0xd2, 0x38, 0xe8, 0xb3, 0xcb,
  2772. 0xdb, 0x90, 0x0c, 0x1d, 0xdb, 0x1e, 0x68, 0x02, 0x6e, 0x8a, 0xdc, 0x74, 0x49, 0x0a, 0x9b, 0x1c,
  2773. 0x75, 0x7e, 0x9d, 0x1a, 0xe7, 0xdf, 0x98, 0x6a, 0xfe, 0xdf, 0x05, 0x58, 0xfd, 0x0d, 0xbf, 0x80,
  2774. 0x46, 0x8f, 0x5b, 0x74, 0x08, 0x2b, 0x41, 0xfa, 0x6b, 0x23, 0x0e, 0x0b, 0xfe, 0x86, 0x5e, 0x14,
  2775. 0x3f, 0x2a, 0xc7, 0x51, 0xb1, 0x87, 0x3e, 0x86, 0x57, 0x27, 0xb0, 0x2d, 0x70, 0x9d, 0x5a, 0x14,
  2776. 0xe2, 0x5e, 0x89, 0x42, 0x9c, 0xef, 0x7a, 0x1c, 0xac, 0xf4, 0xb7, 0xcc, 0xba, 0x1d, 0x76, 0xa7,
  2777. 0x09, 0xb3, 0x87, 0x99, 0xcb, 0x7f, 0x0d, 0x4a, 0x2e, 0xa1, 0xec, 0x9e, 0x1d, 0xb9, 0x35, 0x2e,
  2778. 0x09, 0xa1, 0xbc, 0x8b, 0x1e, 0xc0, 0x2b, 0x33, 0x59, 0x04, 0xfa, 0x1e, 0x28, 0x63, 0x02, 0x92,
  2779. 0x8c, 0xb9, 0x80, 0x05, 0x97, 0x8a, 0xb1, 0xae, 0xfa, 0xc7, 0xe4, 0xd8, 0x65, 0xf4, 0x9a, 0xd2,
  2780. 0x84, 0x9c, 0x4b, 0xbc, 0xd1, 0x40, 0x5c, 0x1c, 0xca, 0x5b, 0xef, 0x2c, 0xc6, 0x3f, 0x98, 0x74,
  2781. 0x34, 0xa0, 0x58, 0x1a, 0xab, 0x8f, 0x21, 0x27, 0x24, 0xa8, 0x08, 0xf9, 0x87, 0x7b, 0x0f, 0xf6,
  2782. 0xf6, 0x3f, 0xda, 0xab, 0x24, 0x10, 0x40, 0x6e, 0xbb, 0xd1, 0x68, 0x1e, 0xb4, 0x2b, 0x49, 0xa4,
  2783. 0x40, 0x76, 0xbb, 0xbe, 0x8f, 0xdb, 0x95, 0x14, 0x13, 0xe3, 0xe6, 0x87, 0xcd, 0x46, 0xbb, 0x92,
  2784. 0x46, 0x2b, 0x50, 0x12, 0x6d, 0xed, 0xfe, 0x3e, 0xfe, 0xc9, 0x76, 0xbb, 0x92, 0x09, 0x89, 0x0e,
  2785. 0x9b, 0x7b, 0xf7, 0x9a, 0xb8, 0x92, 0x55, 0xdf, 0x65, 0x37, 0x93, 0x18, 0xc6, 0x32, 0xbe, 0x83,
  2786. 0x24, 0x43, 0x77, 0x10, 0xf5, 0xb7, 0x29, 0xa8, 0xc5, 0xd3, 0x10, 0xf4, 0xe1, 0xc4, 0xc4, 0xb7,
  2787. 0xce, 0xc1, 0x61, 0x26, 0x66, 0x8f, 0xae, 0x43, 0xd9, 0x25, 0x47, 0x84, 0x76, 0xfb, 0x82, 0x16,
  2788. 0x89, 0x23, 0xb3, 0x84, 0x4b, 0x52, 0xca, 0x8d, 0x3c, 0xa1, 0xf6, 0x19, 0xe9, 0x52, 0x4d, 0x60,
  2789. 0x91, 0xd8, 0x74, 0x0a, 0x53, 0x63, 0xd2, 0x43, 0x21, 0x54, 0x3f, 0x3d, 0x57, 0x2c, 0x15, 0xc8,
  2790. 0xe2, 0x66, 0x1b, 0x7f, 0x5c, 0x49, 0x23, 0x04, 0x65, 0xde, 0xd4, 0x0e, 0xf7, 0xb6, 0x0f, 0x0e,
  2791. 0x5b, 0xfb, 0x2c, 0x96, 0x17, 0x60, 0xd9, 0x8f, 0xa5, 0x2f, 0xcc, 0xaa, 0x9f, 0x40, 0x39, 0x7a,
  2792. 0xf7, 0x67, 0x21, 0x74, 0xed, 0x91, 0x65, 0xf0, 0x60, 0x64, 0xb1, 0xe8, 0xa0, 0xdb, 0x90, 0x3d,
  2793. 0xb6, 0x45, 0x9a, 0xcd, 0xde, 0x6b, 0x8f, 0x6c, 0x4a, 0x42, 0xb5, 0x03, 0xa1, 0xad, 0x7e, 0x01,
  2794. 0x59, 0x9e, 0x35, 0x2c, 0x03, 0xf8, 0x2d, 0x5e, 0x92, 0x2a, 0xd6, 0x46, 0x9f, 0x00, 0xe8, 0x94,
  2795. 0xba, 0x66, 0x67, 0x34, 0x76, 0xbc, 0x3e, 0x3b, 0xeb, 0xb6, 0x7d, 0xbd, 0xfa, 0x65, 0x99, 0x7e,
  2796. 0xab, 0x63, 0xd3, 0x50, 0x0a, 0x86, 0x1c, 0xaa, 0x7b, 0x50, 0x8e, 0xda, 0xfa, 0x34, 0x40, 0x8c,
  2797. 0x21, 0x4a, 0x03, 0x04, 0xab, 0x93, 0x34, 0x20, 0x20, 0x11, 0x69, 0x51, 0xb1, 0xe1, 0x1d, 0xf5,
  2798. 0x59, 0x12, 0x0a, 0xed, 0x13, 0xb9, 0x1e, 0x31, 0xc5, 0x82, 0xb1, 0x69, 0x2a, 0x7c, 0x35, 0x16,
  2799. 0xd5, 0x87, 0x74, 0x50, 0xd3, 0xf8, 0x20, 0xd8, 0x71, 0x99, 0x45, 0x6f, 0x40, 0x7e, 0x71, 0x47,
  2800. 0x66, 0xd9, 0xfb, 0xa0, 0x04, 0x98, 0xc9, 0xd8, 0xa9, 0x6e, 0x18, 0x2e, 0xf1, 0x3c, 0xb9, 0xef,
  2801. 0xfd, 0x2e, 0xaf, 0x3d, 0xd9, 0x4f, 0xe5, 0xe5, 0x3b, 0x8d, 0x45, 0x47, 0x35, 0x60, 0x79, 0x02,
  2802. 0x70, 0xd1, 0xfb, 0x90, 0x77, 0x46, 0x1d, 0xcd, 0x0f, 0xcf, 0xc4, 0x5b, 0x83, 0xcf, 0x7b, 0x46,
  2803. 0x9d, 0x81, 0xd9, 0x7d, 0x40, 0x4e, 0xfd, 0xc1, 0x38, 0xa3, 0xce, 0x03, 0x11, 0x45, 0xf1, 0x2b,
  2804. 0xa9, 0xf0, 0xaf, 0x1c, 0x43, 0xc1, 0xdf, 0x14, 0xe8, 0x87, 0xa0, 0x04, 0x58, 0x1e, 0x94, 0x24,
  2805. 0x63, 0x0f, 0x01, 0xe9, 0x7e, 0x6c, 0xc2, 0x48, 0xb4, 0x67, 0xf6, 0x2c, 0x62, 0x68, 0x63, 0x7e,
  2806. 0xcc, 0x7f, 0xad, 0x80, 0x97, 0xc5, 0x87, 0x5d, 0x9f, 0x1c, 0xab, 0xff, 0x4e, 0x42, 0xc1, 0x2f,
  2807. 0x3d, 0xa1, 0x77, 0x43, 0xfb, 0xae, 0x3c, 0xe3, 0xa2, 0xee, 0x2b, 0x8e, 0xcb, 0x47, 0xd1, 0xb1,
  2808. 0xa6, 0xce, 0x3f, 0xd6, 0xb8, 0x3a, 0xa0, 0x5f, 0x91, 0xcd, 0x9c, 0xbb, 0x22, 0xfb, 0x36, 0x20,
  2809. 0x6a, 0x53, 0x7d, 0xa0, 0x1d, 0xdb, 0xd4, 0xb4, 0x7a, 0x9a, 0x08, 0xb6, 0xe0, 0x02, 0x15, 0xfe,
  2810. 0xe5, 0x11, 0xff, 0x70, 0xc0, 0xe3, 0xfe, 0xcb, 0x24, 0x14, 0x02, 0x50, 0x3f, 0x6f, 0x35, 0xe8,
  2811. 0x22, 0xe4, 0x24, 0x6e, 0x89, 0x72, 0x90, 0xec, 0x05, 0x85, 0xc9, 0x4c, 0xa8, 0x30, 0x59, 0x83,
  2812. 0xc2, 0x90, 0x50, 0x9d, 0x9f, 0x6c, 0xe2, 0x8a, 0x12, 0xf4, 0x6f, 0xbe, 0x07, 0xc5, 0x50, 0x61,
  2813. 0x8e, 0x65, 0xde, 0x5e, 0xf3, 0xa3, 0x4a, 0xa2, 0x96, 0x7f, 0xf6, 0xe5, 0xd5, 0xf4, 0x1e, 0x79,
  2814. 0xca, 0xf6, 0x2c, 0x6e, 0x36, 0x5a, 0xcd, 0xc6, 0x83, 0x4a, 0xb2, 0x56, 0x7c, 0xf6, 0xe5, 0xd5,
  2815. 0x3c, 0x26, 0xbc, 0x48, 0x70, 0xb3, 0x05, 0x4b, 0xe1, 0x55, 0x89, 0x42, 0x1f, 0x82, 0xf2, 0xbd,
  2816. 0x87, 0x07, 0xbb, 0x3b, 0x8d, 0xed, 0x76, 0x53, 0x7b, 0xb4, 0xdf, 0x6e, 0x56, 0x92, 0xe8, 0x55,
  2817. 0xb8, 0xb0, 0xbb, 0xf3, 0xe3, 0x56, 0x5b, 0x6b, 0xec, 0xee, 0x34, 0xf7, 0xda, 0xda, 0x76, 0xbb,
  2818. 0xbd, 0xdd, 0x78, 0x50, 0x49, 0x6d, 0xfd, 0x5e, 0x81, 0xe5, 0xed, 0x7a, 0x63, 0x87, 0xc1, 0xb6,
  2819. 0xd9, 0xd5, 0xf9, 0xfd, 0xb1, 0x01, 0x19, 0x7e, 0x43, 0x3c, 0xf3, 0xd9, 0xae, 0x76, 0x76, 0xf9,
  2820. 0x08, 0xdd, 0x87, 0x2c, 0xbf, 0x3c, 0xa2, 0xb3, 0xdf, 0xf1, 0x6a, 0x73, 0xea, 0x49, 0x6c, 0x30,
  2821. 0x3c, 0x3d, 0xce, 0x7c, 0xd8, 0xab, 0x9d, 0x5d, 0x5e, 0x42, 0x18, 0x94, 0x31, 0xf9, 0x9c, 0xff,
  2822. 0xd0, 0x55, 0x5b, 0x00, 0x6c, 0xd0, 0x2e, 0xe4, 0xfd, 0xfb, 0xc2, 0xbc, 0xa7, 0xb7, 0xda, 0xdc,
  2823. 0xfa, 0x0f, 0x0b, 0x97, 0xb8, 0xd7, 0x9d, 0xfd, 0x8e, 0x58, 0x9b, 0x53, 0xcc, 0x42, 0x3b, 0x90,
  2824. 0x93, 0x84, 0x6a, 0xce, 0x73, 0x5a, 0x6d, 0x5e, 0x3d, 0x87, 0x05, 0x6d, 0x7c, 0x63, 0x9e, 0xff,
  2825. 0x3a, 0x5a, 0x5b, 0xa0, 0x4e, 0x87, 0x1e, 0x02, 0x84, 0x6e, 0x71, 0x0b, 0x3c, 0x7b, 0xd6, 0x16,
  2826. 0xa9, 0xbf, 0xa1, 0x7d, 0x28, 0x04, 0xa4, 0x7a, 0xee, 0x23, 0x64, 0x6d, 0x7e, 0x21, 0x0c, 0x3d,
  2827. 0x86, 0x52, 0x94, 0x4c, 0x2e, 0xf6, 0xb4, 0x58, 0x5b, 0xb0, 0xc2, 0xc5, 0xfc, 0x47, 0x99, 0xe5,
  2828. 0x62, 0x4f, 0x8d, 0xb5, 0x05, 0x0b, 0x5e, 0xe8, 0x33, 0x58, 0x99, 0x66, 0x7e, 0x8b, 0xbf, 0x3c,
  2829. 0xd6, 0xce, 0x51, 0x02, 0x43, 0x43, 0x40, 0x33, 0x18, 0xe3, 0x39, 0x1e, 0x22, 0x6b, 0xe7, 0xa9,
  2830. 0x88, 0xd5, 0x9b, 0x5f, 0xbd, 0x58, 0x4b, 0x7e, 0xfd, 0x62, 0x2d, 0xf9, 0x8f, 0x17, 0x6b, 0xc9,
  2831. 0xe7, 0x2f, 0xd7, 0x12, 0x5f, 0xbf, 0x5c, 0x4b, 0xfc, 0xf5, 0xe5, 0x5a, 0xe2, 0x67, 0x6f, 0xf5,
  2832. 0x4c, 0xda, 0x1f, 0x75, 0x36, 0xba, 0xf6, 0x70, 0x33, 0xfc, 0x0f, 0x87, 0x59, 0xff, 0xba, 0xe8,
  2833. 0xe4, 0xf8, 0xa1, 0x72, 0xeb, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x92, 0xa5, 0x39, 0xcc, 0x95,
  2834. 0x21, 0x00, 0x00,
  2835. }
  2836. // Reference imports to suppress errors if they are not otherwise used.
  2837. var _ context.Context
  2838. var _ grpc.ClientConn
  2839. // This is a compile-time assertion to ensure that this generated file
  2840. // is compatible with the grpc package it is being compiled against.
  2841. const _ = grpc.SupportPackageIsVersion4
  2842. // ABCIApplicationClient is the client API for ABCIApplication service.
  2843. //
  2844. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  2845. type ABCIApplicationClient interface {
  2846. Echo(ctx context.Context, in *RequestEcho, opts ...grpc.CallOption) (*ResponseEcho, error)
  2847. Flush(ctx context.Context, in *RequestFlush, opts ...grpc.CallOption) (*ResponseFlush, error)
  2848. Info(ctx context.Context, in *RequestInfo, opts ...grpc.CallOption) (*ResponseInfo, error)
  2849. DeliverTx(ctx context.Context, in *RequestDeliverTx, opts ...grpc.CallOption) (*ResponseDeliverTx, error)
  2850. CheckTx(ctx context.Context, in *RequestCheckTx, opts ...grpc.CallOption) (*ResponseCheckTx, error)
  2851. Query(ctx context.Context, in *RequestQuery, opts ...grpc.CallOption) (*ResponseQuery, error)
  2852. Commit(ctx context.Context, in *RequestCommit, opts ...grpc.CallOption) (*ResponseCommit, error)
  2853. InitChain(ctx context.Context, in *RequestInitChain, opts ...grpc.CallOption) (*ResponseInitChain, error)
  2854. BeginBlock(ctx context.Context, in *RequestBeginBlock, opts ...grpc.CallOption) (*ResponseBeginBlock, error)
  2855. EndBlock(ctx context.Context, in *RequestEndBlock, opts ...grpc.CallOption) (*ResponseEndBlock, error)
  2856. ListSnapshots(ctx context.Context, in *RequestListSnapshots, opts ...grpc.CallOption) (*ResponseListSnapshots, error)
  2857. OfferSnapshot(ctx context.Context, in *RequestOfferSnapshot, opts ...grpc.CallOption) (*ResponseOfferSnapshot, error)
  2858. LoadSnapshotChunk(ctx context.Context, in *RequestLoadSnapshotChunk, opts ...grpc.CallOption) (*ResponseLoadSnapshotChunk, error)
  2859. ApplySnapshotChunk(ctx context.Context, in *RequestApplySnapshotChunk, opts ...grpc.CallOption) (*ResponseApplySnapshotChunk, error)
  2860. }
  2861. type aBCIApplicationClient struct {
  2862. cc *grpc.ClientConn
  2863. }
  2864. func NewABCIApplicationClient(cc *grpc.ClientConn) ABCIApplicationClient {
  2865. return &aBCIApplicationClient{cc}
  2866. }
  2867. func (c *aBCIApplicationClient) Echo(ctx context.Context, in *RequestEcho, opts ...grpc.CallOption) (*ResponseEcho, error) {
  2868. out := new(ResponseEcho)
  2869. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Echo", in, out, opts...)
  2870. if err != nil {
  2871. return nil, err
  2872. }
  2873. return out, nil
  2874. }
  2875. func (c *aBCIApplicationClient) Flush(ctx context.Context, in *RequestFlush, opts ...grpc.CallOption) (*ResponseFlush, error) {
  2876. out := new(ResponseFlush)
  2877. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Flush", in, out, opts...)
  2878. if err != nil {
  2879. return nil, err
  2880. }
  2881. return out, nil
  2882. }
  2883. func (c *aBCIApplicationClient) Info(ctx context.Context, in *RequestInfo, opts ...grpc.CallOption) (*ResponseInfo, error) {
  2884. out := new(ResponseInfo)
  2885. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Info", in, out, opts...)
  2886. if err != nil {
  2887. return nil, err
  2888. }
  2889. return out, nil
  2890. }
  2891. func (c *aBCIApplicationClient) DeliverTx(ctx context.Context, in *RequestDeliverTx, opts ...grpc.CallOption) (*ResponseDeliverTx, error) {
  2892. out := new(ResponseDeliverTx)
  2893. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/DeliverTx", in, out, opts...)
  2894. if err != nil {
  2895. return nil, err
  2896. }
  2897. return out, nil
  2898. }
  2899. func (c *aBCIApplicationClient) CheckTx(ctx context.Context, in *RequestCheckTx, opts ...grpc.CallOption) (*ResponseCheckTx, error) {
  2900. out := new(ResponseCheckTx)
  2901. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/CheckTx", in, out, opts...)
  2902. if err != nil {
  2903. return nil, err
  2904. }
  2905. return out, nil
  2906. }
  2907. func (c *aBCIApplicationClient) Query(ctx context.Context, in *RequestQuery, opts ...grpc.CallOption) (*ResponseQuery, error) {
  2908. out := new(ResponseQuery)
  2909. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Query", in, out, opts...)
  2910. if err != nil {
  2911. return nil, err
  2912. }
  2913. return out, nil
  2914. }
  2915. func (c *aBCIApplicationClient) Commit(ctx context.Context, in *RequestCommit, opts ...grpc.CallOption) (*ResponseCommit, error) {
  2916. out := new(ResponseCommit)
  2917. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/Commit", in, out, opts...)
  2918. if err != nil {
  2919. return nil, err
  2920. }
  2921. return out, nil
  2922. }
  2923. func (c *aBCIApplicationClient) InitChain(ctx context.Context, in *RequestInitChain, opts ...grpc.CallOption) (*ResponseInitChain, error) {
  2924. out := new(ResponseInitChain)
  2925. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/InitChain", in, out, opts...)
  2926. if err != nil {
  2927. return nil, err
  2928. }
  2929. return out, nil
  2930. }
  2931. func (c *aBCIApplicationClient) BeginBlock(ctx context.Context, in *RequestBeginBlock, opts ...grpc.CallOption) (*ResponseBeginBlock, error) {
  2932. out := new(ResponseBeginBlock)
  2933. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/BeginBlock", in, out, opts...)
  2934. if err != nil {
  2935. return nil, err
  2936. }
  2937. return out, nil
  2938. }
  2939. func (c *aBCIApplicationClient) EndBlock(ctx context.Context, in *RequestEndBlock, opts ...grpc.CallOption) (*ResponseEndBlock, error) {
  2940. out := new(ResponseEndBlock)
  2941. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/EndBlock", in, out, opts...)
  2942. if err != nil {
  2943. return nil, err
  2944. }
  2945. return out, nil
  2946. }
  2947. func (c *aBCIApplicationClient) ListSnapshots(ctx context.Context, in *RequestListSnapshots, opts ...grpc.CallOption) (*ResponseListSnapshots, error) {
  2948. out := new(ResponseListSnapshots)
  2949. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/ListSnapshots", in, out, opts...)
  2950. if err != nil {
  2951. return nil, err
  2952. }
  2953. return out, nil
  2954. }
  2955. func (c *aBCIApplicationClient) OfferSnapshot(ctx context.Context, in *RequestOfferSnapshot, opts ...grpc.CallOption) (*ResponseOfferSnapshot, error) {
  2956. out := new(ResponseOfferSnapshot)
  2957. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/OfferSnapshot", in, out, opts...)
  2958. if err != nil {
  2959. return nil, err
  2960. }
  2961. return out, nil
  2962. }
  2963. func (c *aBCIApplicationClient) LoadSnapshotChunk(ctx context.Context, in *RequestLoadSnapshotChunk, opts ...grpc.CallOption) (*ResponseLoadSnapshotChunk, error) {
  2964. out := new(ResponseLoadSnapshotChunk)
  2965. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/LoadSnapshotChunk", in, out, opts...)
  2966. if err != nil {
  2967. return nil, err
  2968. }
  2969. return out, nil
  2970. }
  2971. func (c *aBCIApplicationClient) ApplySnapshotChunk(ctx context.Context, in *RequestApplySnapshotChunk, opts ...grpc.CallOption) (*ResponseApplySnapshotChunk, error) {
  2972. out := new(ResponseApplySnapshotChunk)
  2973. err := c.cc.Invoke(ctx, "/tendermint.abci.ABCIApplication/ApplySnapshotChunk", in, out, opts...)
  2974. if err != nil {
  2975. return nil, err
  2976. }
  2977. return out, nil
  2978. }
  2979. // ABCIApplicationServer is the server API for ABCIApplication service.
  2980. type ABCIApplicationServer interface {
  2981. Echo(context.Context, *RequestEcho) (*ResponseEcho, error)
  2982. Flush(context.Context, *RequestFlush) (*ResponseFlush, error)
  2983. Info(context.Context, *RequestInfo) (*ResponseInfo, error)
  2984. DeliverTx(context.Context, *RequestDeliverTx) (*ResponseDeliverTx, error)
  2985. CheckTx(context.Context, *RequestCheckTx) (*ResponseCheckTx, error)
  2986. Query(context.Context, *RequestQuery) (*ResponseQuery, error)
  2987. Commit(context.Context, *RequestCommit) (*ResponseCommit, error)
  2988. InitChain(context.Context, *RequestInitChain) (*ResponseInitChain, error)
  2989. BeginBlock(context.Context, *RequestBeginBlock) (*ResponseBeginBlock, error)
  2990. EndBlock(context.Context, *RequestEndBlock) (*ResponseEndBlock, error)
  2991. ListSnapshots(context.Context, *RequestListSnapshots) (*ResponseListSnapshots, error)
  2992. OfferSnapshot(context.Context, *RequestOfferSnapshot) (*ResponseOfferSnapshot, error)
  2993. LoadSnapshotChunk(context.Context, *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error)
  2994. ApplySnapshotChunk(context.Context, *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error)
  2995. }
  2996. // UnimplementedABCIApplicationServer can be embedded to have forward compatible implementations.
  2997. type UnimplementedABCIApplicationServer struct {
  2998. }
  2999. func (*UnimplementedABCIApplicationServer) Echo(ctx context.Context, req *RequestEcho) (*ResponseEcho, error) {
  3000. return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented")
  3001. }
  3002. func (*UnimplementedABCIApplicationServer) Flush(ctx context.Context, req *RequestFlush) (*ResponseFlush, error) {
  3003. return nil, status.Errorf(codes.Unimplemented, "method Flush not implemented")
  3004. }
  3005. func (*UnimplementedABCIApplicationServer) Info(ctx context.Context, req *RequestInfo) (*ResponseInfo, error) {
  3006. return nil, status.Errorf(codes.Unimplemented, "method Info not implemented")
  3007. }
  3008. func (*UnimplementedABCIApplicationServer) DeliverTx(ctx context.Context, req *RequestDeliverTx) (*ResponseDeliverTx, error) {
  3009. return nil, status.Errorf(codes.Unimplemented, "method DeliverTx not implemented")
  3010. }
  3011. func (*UnimplementedABCIApplicationServer) CheckTx(ctx context.Context, req *RequestCheckTx) (*ResponseCheckTx, error) {
  3012. return nil, status.Errorf(codes.Unimplemented, "method CheckTx not implemented")
  3013. }
  3014. func (*UnimplementedABCIApplicationServer) Query(ctx context.Context, req *RequestQuery) (*ResponseQuery, error) {
  3015. return nil, status.Errorf(codes.Unimplemented, "method Query not implemented")
  3016. }
  3017. func (*UnimplementedABCIApplicationServer) Commit(ctx context.Context, req *RequestCommit) (*ResponseCommit, error) {
  3018. return nil, status.Errorf(codes.Unimplemented, "method Commit not implemented")
  3019. }
  3020. func (*UnimplementedABCIApplicationServer) InitChain(ctx context.Context, req *RequestInitChain) (*ResponseInitChain, error) {
  3021. return nil, status.Errorf(codes.Unimplemented, "method InitChain not implemented")
  3022. }
  3023. func (*UnimplementedABCIApplicationServer) BeginBlock(ctx context.Context, req *RequestBeginBlock) (*ResponseBeginBlock, error) {
  3024. return nil, status.Errorf(codes.Unimplemented, "method BeginBlock not implemented")
  3025. }
  3026. func (*UnimplementedABCIApplicationServer) EndBlock(ctx context.Context, req *RequestEndBlock) (*ResponseEndBlock, error) {
  3027. return nil, status.Errorf(codes.Unimplemented, "method EndBlock not implemented")
  3028. }
  3029. func (*UnimplementedABCIApplicationServer) ListSnapshots(ctx context.Context, req *RequestListSnapshots) (*ResponseListSnapshots, error) {
  3030. return nil, status.Errorf(codes.Unimplemented, "method ListSnapshots not implemented")
  3031. }
  3032. func (*UnimplementedABCIApplicationServer) OfferSnapshot(ctx context.Context, req *RequestOfferSnapshot) (*ResponseOfferSnapshot, error) {
  3033. return nil, status.Errorf(codes.Unimplemented, "method OfferSnapshot not implemented")
  3034. }
  3035. func (*UnimplementedABCIApplicationServer) LoadSnapshotChunk(ctx context.Context, req *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error) {
  3036. return nil, status.Errorf(codes.Unimplemented, "method LoadSnapshotChunk not implemented")
  3037. }
  3038. func (*UnimplementedABCIApplicationServer) ApplySnapshotChunk(ctx context.Context, req *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error) {
  3039. return nil, status.Errorf(codes.Unimplemented, "method ApplySnapshotChunk not implemented")
  3040. }
  3041. func RegisterABCIApplicationServer(s *grpc.Server, srv ABCIApplicationServer) {
  3042. s.RegisterService(&_ABCIApplication_serviceDesc, srv)
  3043. }
  3044. func _ABCIApplication_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3045. in := new(RequestEcho)
  3046. if err := dec(in); err != nil {
  3047. return nil, err
  3048. }
  3049. if interceptor == nil {
  3050. return srv.(ABCIApplicationServer).Echo(ctx, in)
  3051. }
  3052. info := &grpc.UnaryServerInfo{
  3053. Server: srv,
  3054. FullMethod: "/tendermint.abci.ABCIApplication/Echo",
  3055. }
  3056. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3057. return srv.(ABCIApplicationServer).Echo(ctx, req.(*RequestEcho))
  3058. }
  3059. return interceptor(ctx, in, info, handler)
  3060. }
  3061. func _ABCIApplication_Flush_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3062. in := new(RequestFlush)
  3063. if err := dec(in); err != nil {
  3064. return nil, err
  3065. }
  3066. if interceptor == nil {
  3067. return srv.(ABCIApplicationServer).Flush(ctx, in)
  3068. }
  3069. info := &grpc.UnaryServerInfo{
  3070. Server: srv,
  3071. FullMethod: "/tendermint.abci.ABCIApplication/Flush",
  3072. }
  3073. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3074. return srv.(ABCIApplicationServer).Flush(ctx, req.(*RequestFlush))
  3075. }
  3076. return interceptor(ctx, in, info, handler)
  3077. }
  3078. func _ABCIApplication_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3079. in := new(RequestInfo)
  3080. if err := dec(in); err != nil {
  3081. return nil, err
  3082. }
  3083. if interceptor == nil {
  3084. return srv.(ABCIApplicationServer).Info(ctx, in)
  3085. }
  3086. info := &grpc.UnaryServerInfo{
  3087. Server: srv,
  3088. FullMethod: "/tendermint.abci.ABCIApplication/Info",
  3089. }
  3090. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3091. return srv.(ABCIApplicationServer).Info(ctx, req.(*RequestInfo))
  3092. }
  3093. return interceptor(ctx, in, info, handler)
  3094. }
  3095. func _ABCIApplication_DeliverTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3096. in := new(RequestDeliverTx)
  3097. if err := dec(in); err != nil {
  3098. return nil, err
  3099. }
  3100. if interceptor == nil {
  3101. return srv.(ABCIApplicationServer).DeliverTx(ctx, in)
  3102. }
  3103. info := &grpc.UnaryServerInfo{
  3104. Server: srv,
  3105. FullMethod: "/tendermint.abci.ABCIApplication/DeliverTx",
  3106. }
  3107. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3108. return srv.(ABCIApplicationServer).DeliverTx(ctx, req.(*RequestDeliverTx))
  3109. }
  3110. return interceptor(ctx, in, info, handler)
  3111. }
  3112. func _ABCIApplication_CheckTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3113. in := new(RequestCheckTx)
  3114. if err := dec(in); err != nil {
  3115. return nil, err
  3116. }
  3117. if interceptor == nil {
  3118. return srv.(ABCIApplicationServer).CheckTx(ctx, in)
  3119. }
  3120. info := &grpc.UnaryServerInfo{
  3121. Server: srv,
  3122. FullMethod: "/tendermint.abci.ABCIApplication/CheckTx",
  3123. }
  3124. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3125. return srv.(ABCIApplicationServer).CheckTx(ctx, req.(*RequestCheckTx))
  3126. }
  3127. return interceptor(ctx, in, info, handler)
  3128. }
  3129. func _ABCIApplication_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3130. in := new(RequestQuery)
  3131. if err := dec(in); err != nil {
  3132. return nil, err
  3133. }
  3134. if interceptor == nil {
  3135. return srv.(ABCIApplicationServer).Query(ctx, in)
  3136. }
  3137. info := &grpc.UnaryServerInfo{
  3138. Server: srv,
  3139. FullMethod: "/tendermint.abci.ABCIApplication/Query",
  3140. }
  3141. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3142. return srv.(ABCIApplicationServer).Query(ctx, req.(*RequestQuery))
  3143. }
  3144. return interceptor(ctx, in, info, handler)
  3145. }
  3146. func _ABCIApplication_Commit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3147. in := new(RequestCommit)
  3148. if err := dec(in); err != nil {
  3149. return nil, err
  3150. }
  3151. if interceptor == nil {
  3152. return srv.(ABCIApplicationServer).Commit(ctx, in)
  3153. }
  3154. info := &grpc.UnaryServerInfo{
  3155. Server: srv,
  3156. FullMethod: "/tendermint.abci.ABCIApplication/Commit",
  3157. }
  3158. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3159. return srv.(ABCIApplicationServer).Commit(ctx, req.(*RequestCommit))
  3160. }
  3161. return interceptor(ctx, in, info, handler)
  3162. }
  3163. func _ABCIApplication_InitChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3164. in := new(RequestInitChain)
  3165. if err := dec(in); err != nil {
  3166. return nil, err
  3167. }
  3168. if interceptor == nil {
  3169. return srv.(ABCIApplicationServer).InitChain(ctx, in)
  3170. }
  3171. info := &grpc.UnaryServerInfo{
  3172. Server: srv,
  3173. FullMethod: "/tendermint.abci.ABCIApplication/InitChain",
  3174. }
  3175. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3176. return srv.(ABCIApplicationServer).InitChain(ctx, req.(*RequestInitChain))
  3177. }
  3178. return interceptor(ctx, in, info, handler)
  3179. }
  3180. func _ABCIApplication_BeginBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3181. in := new(RequestBeginBlock)
  3182. if err := dec(in); err != nil {
  3183. return nil, err
  3184. }
  3185. if interceptor == nil {
  3186. return srv.(ABCIApplicationServer).BeginBlock(ctx, in)
  3187. }
  3188. info := &grpc.UnaryServerInfo{
  3189. Server: srv,
  3190. FullMethod: "/tendermint.abci.ABCIApplication/BeginBlock",
  3191. }
  3192. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3193. return srv.(ABCIApplicationServer).BeginBlock(ctx, req.(*RequestBeginBlock))
  3194. }
  3195. return interceptor(ctx, in, info, handler)
  3196. }
  3197. func _ABCIApplication_EndBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3198. in := new(RequestEndBlock)
  3199. if err := dec(in); err != nil {
  3200. return nil, err
  3201. }
  3202. if interceptor == nil {
  3203. return srv.(ABCIApplicationServer).EndBlock(ctx, in)
  3204. }
  3205. info := &grpc.UnaryServerInfo{
  3206. Server: srv,
  3207. FullMethod: "/tendermint.abci.ABCIApplication/EndBlock",
  3208. }
  3209. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3210. return srv.(ABCIApplicationServer).EndBlock(ctx, req.(*RequestEndBlock))
  3211. }
  3212. return interceptor(ctx, in, info, handler)
  3213. }
  3214. func _ABCIApplication_ListSnapshots_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3215. in := new(RequestListSnapshots)
  3216. if err := dec(in); err != nil {
  3217. return nil, err
  3218. }
  3219. if interceptor == nil {
  3220. return srv.(ABCIApplicationServer).ListSnapshots(ctx, in)
  3221. }
  3222. info := &grpc.UnaryServerInfo{
  3223. Server: srv,
  3224. FullMethod: "/tendermint.abci.ABCIApplication/ListSnapshots",
  3225. }
  3226. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3227. return srv.(ABCIApplicationServer).ListSnapshots(ctx, req.(*RequestListSnapshots))
  3228. }
  3229. return interceptor(ctx, in, info, handler)
  3230. }
  3231. func _ABCIApplication_OfferSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3232. in := new(RequestOfferSnapshot)
  3233. if err := dec(in); err != nil {
  3234. return nil, err
  3235. }
  3236. if interceptor == nil {
  3237. return srv.(ABCIApplicationServer).OfferSnapshot(ctx, in)
  3238. }
  3239. info := &grpc.UnaryServerInfo{
  3240. Server: srv,
  3241. FullMethod: "/tendermint.abci.ABCIApplication/OfferSnapshot",
  3242. }
  3243. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3244. return srv.(ABCIApplicationServer).OfferSnapshot(ctx, req.(*RequestOfferSnapshot))
  3245. }
  3246. return interceptor(ctx, in, info, handler)
  3247. }
  3248. func _ABCIApplication_LoadSnapshotChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3249. in := new(RequestLoadSnapshotChunk)
  3250. if err := dec(in); err != nil {
  3251. return nil, err
  3252. }
  3253. if interceptor == nil {
  3254. return srv.(ABCIApplicationServer).LoadSnapshotChunk(ctx, in)
  3255. }
  3256. info := &grpc.UnaryServerInfo{
  3257. Server: srv,
  3258. FullMethod: "/tendermint.abci.ABCIApplication/LoadSnapshotChunk",
  3259. }
  3260. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3261. return srv.(ABCIApplicationServer).LoadSnapshotChunk(ctx, req.(*RequestLoadSnapshotChunk))
  3262. }
  3263. return interceptor(ctx, in, info, handler)
  3264. }
  3265. func _ABCIApplication_ApplySnapshotChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  3266. in := new(RequestApplySnapshotChunk)
  3267. if err := dec(in); err != nil {
  3268. return nil, err
  3269. }
  3270. if interceptor == nil {
  3271. return srv.(ABCIApplicationServer).ApplySnapshotChunk(ctx, in)
  3272. }
  3273. info := &grpc.UnaryServerInfo{
  3274. Server: srv,
  3275. FullMethod: "/tendermint.abci.ABCIApplication/ApplySnapshotChunk",
  3276. }
  3277. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  3278. return srv.(ABCIApplicationServer).ApplySnapshotChunk(ctx, req.(*RequestApplySnapshotChunk))
  3279. }
  3280. return interceptor(ctx, in, info, handler)
  3281. }
  3282. var _ABCIApplication_serviceDesc = grpc.ServiceDesc{
  3283. ServiceName: "tendermint.abci.ABCIApplication",
  3284. HandlerType: (*ABCIApplicationServer)(nil),
  3285. Methods: []grpc.MethodDesc{
  3286. {
  3287. MethodName: "Echo",
  3288. Handler: _ABCIApplication_Echo_Handler,
  3289. },
  3290. {
  3291. MethodName: "Flush",
  3292. Handler: _ABCIApplication_Flush_Handler,
  3293. },
  3294. {
  3295. MethodName: "Info",
  3296. Handler: _ABCIApplication_Info_Handler,
  3297. },
  3298. {
  3299. MethodName: "DeliverTx",
  3300. Handler: _ABCIApplication_DeliverTx_Handler,
  3301. },
  3302. {
  3303. MethodName: "CheckTx",
  3304. Handler: _ABCIApplication_CheckTx_Handler,
  3305. },
  3306. {
  3307. MethodName: "Query",
  3308. Handler: _ABCIApplication_Query_Handler,
  3309. },
  3310. {
  3311. MethodName: "Commit",
  3312. Handler: _ABCIApplication_Commit_Handler,
  3313. },
  3314. {
  3315. MethodName: "InitChain",
  3316. Handler: _ABCIApplication_InitChain_Handler,
  3317. },
  3318. {
  3319. MethodName: "BeginBlock",
  3320. Handler: _ABCIApplication_BeginBlock_Handler,
  3321. },
  3322. {
  3323. MethodName: "EndBlock",
  3324. Handler: _ABCIApplication_EndBlock_Handler,
  3325. },
  3326. {
  3327. MethodName: "ListSnapshots",
  3328. Handler: _ABCIApplication_ListSnapshots_Handler,
  3329. },
  3330. {
  3331. MethodName: "OfferSnapshot",
  3332. Handler: _ABCIApplication_OfferSnapshot_Handler,
  3333. },
  3334. {
  3335. MethodName: "LoadSnapshotChunk",
  3336. Handler: _ABCIApplication_LoadSnapshotChunk_Handler,
  3337. },
  3338. {
  3339. MethodName: "ApplySnapshotChunk",
  3340. Handler: _ABCIApplication_ApplySnapshotChunk_Handler,
  3341. },
  3342. },
  3343. Streams: []grpc.StreamDesc{},
  3344. Metadata: "tendermint/abci/types.proto",
  3345. }
  3346. func (m *Request) Marshal() (dAtA []byte, err error) {
  3347. size := m.Size()
  3348. dAtA = make([]byte, size)
  3349. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3350. if err != nil {
  3351. return nil, err
  3352. }
  3353. return dAtA[:n], nil
  3354. }
  3355. func (m *Request) MarshalTo(dAtA []byte) (int, error) {
  3356. size := m.Size()
  3357. return m.MarshalToSizedBuffer(dAtA[:size])
  3358. }
  3359. func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3360. i := len(dAtA)
  3361. _ = i
  3362. var l int
  3363. _ = l
  3364. if m.Value != nil {
  3365. {
  3366. size := m.Value.Size()
  3367. i -= size
  3368. if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil {
  3369. return 0, err
  3370. }
  3371. }
  3372. }
  3373. return len(dAtA) - i, nil
  3374. }
  3375. func (m *Request_Echo) MarshalTo(dAtA []byte) (int, error) {
  3376. size := m.Size()
  3377. return m.MarshalToSizedBuffer(dAtA[:size])
  3378. }
  3379. func (m *Request_Echo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3380. i := len(dAtA)
  3381. if m.Echo != nil {
  3382. {
  3383. size, err := m.Echo.MarshalToSizedBuffer(dAtA[:i])
  3384. if err != nil {
  3385. return 0, err
  3386. }
  3387. i -= size
  3388. i = encodeVarintTypes(dAtA, i, uint64(size))
  3389. }
  3390. i--
  3391. dAtA[i] = 0xa
  3392. }
  3393. return len(dAtA) - i, nil
  3394. }
  3395. func (m *Request_Flush) MarshalTo(dAtA []byte) (int, error) {
  3396. size := m.Size()
  3397. return m.MarshalToSizedBuffer(dAtA[:size])
  3398. }
  3399. func (m *Request_Flush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3400. i := len(dAtA)
  3401. if m.Flush != nil {
  3402. {
  3403. size, err := m.Flush.MarshalToSizedBuffer(dAtA[:i])
  3404. if err != nil {
  3405. return 0, err
  3406. }
  3407. i -= size
  3408. i = encodeVarintTypes(dAtA, i, uint64(size))
  3409. }
  3410. i--
  3411. dAtA[i] = 0x12
  3412. }
  3413. return len(dAtA) - i, nil
  3414. }
  3415. func (m *Request_Info) MarshalTo(dAtA []byte) (int, error) {
  3416. size := m.Size()
  3417. return m.MarshalToSizedBuffer(dAtA[:size])
  3418. }
  3419. func (m *Request_Info) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3420. i := len(dAtA)
  3421. if m.Info != nil {
  3422. {
  3423. size, err := m.Info.MarshalToSizedBuffer(dAtA[:i])
  3424. if err != nil {
  3425. return 0, err
  3426. }
  3427. i -= size
  3428. i = encodeVarintTypes(dAtA, i, uint64(size))
  3429. }
  3430. i--
  3431. dAtA[i] = 0x1a
  3432. }
  3433. return len(dAtA) - i, nil
  3434. }
  3435. func (m *Request_InitChain) MarshalTo(dAtA []byte) (int, error) {
  3436. size := m.Size()
  3437. return m.MarshalToSizedBuffer(dAtA[:size])
  3438. }
  3439. func (m *Request_InitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3440. i := len(dAtA)
  3441. if m.InitChain != nil {
  3442. {
  3443. size, err := m.InitChain.MarshalToSizedBuffer(dAtA[:i])
  3444. if err != nil {
  3445. return 0, err
  3446. }
  3447. i -= size
  3448. i = encodeVarintTypes(dAtA, i, uint64(size))
  3449. }
  3450. i--
  3451. dAtA[i] = 0x22
  3452. }
  3453. return len(dAtA) - i, nil
  3454. }
  3455. func (m *Request_Query) MarshalTo(dAtA []byte) (int, error) {
  3456. size := m.Size()
  3457. return m.MarshalToSizedBuffer(dAtA[:size])
  3458. }
  3459. func (m *Request_Query) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3460. i := len(dAtA)
  3461. if m.Query != nil {
  3462. {
  3463. size, err := m.Query.MarshalToSizedBuffer(dAtA[:i])
  3464. if err != nil {
  3465. return 0, err
  3466. }
  3467. i -= size
  3468. i = encodeVarintTypes(dAtA, i, uint64(size))
  3469. }
  3470. i--
  3471. dAtA[i] = 0x2a
  3472. }
  3473. return len(dAtA) - i, nil
  3474. }
  3475. func (m *Request_BeginBlock) MarshalTo(dAtA []byte) (int, error) {
  3476. size := m.Size()
  3477. return m.MarshalToSizedBuffer(dAtA[:size])
  3478. }
  3479. func (m *Request_BeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3480. i := len(dAtA)
  3481. if m.BeginBlock != nil {
  3482. {
  3483. size, err := m.BeginBlock.MarshalToSizedBuffer(dAtA[:i])
  3484. if err != nil {
  3485. return 0, err
  3486. }
  3487. i -= size
  3488. i = encodeVarintTypes(dAtA, i, uint64(size))
  3489. }
  3490. i--
  3491. dAtA[i] = 0x32
  3492. }
  3493. return len(dAtA) - i, nil
  3494. }
  3495. func (m *Request_CheckTx) MarshalTo(dAtA []byte) (int, error) {
  3496. size := m.Size()
  3497. return m.MarshalToSizedBuffer(dAtA[:size])
  3498. }
  3499. func (m *Request_CheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3500. i := len(dAtA)
  3501. if m.CheckTx != nil {
  3502. {
  3503. size, err := m.CheckTx.MarshalToSizedBuffer(dAtA[:i])
  3504. if err != nil {
  3505. return 0, err
  3506. }
  3507. i -= size
  3508. i = encodeVarintTypes(dAtA, i, uint64(size))
  3509. }
  3510. i--
  3511. dAtA[i] = 0x3a
  3512. }
  3513. return len(dAtA) - i, nil
  3514. }
  3515. func (m *Request_DeliverTx) MarshalTo(dAtA []byte) (int, error) {
  3516. size := m.Size()
  3517. return m.MarshalToSizedBuffer(dAtA[:size])
  3518. }
  3519. func (m *Request_DeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3520. i := len(dAtA)
  3521. if m.DeliverTx != nil {
  3522. {
  3523. size, err := m.DeliverTx.MarshalToSizedBuffer(dAtA[:i])
  3524. if err != nil {
  3525. return 0, err
  3526. }
  3527. i -= size
  3528. i = encodeVarintTypes(dAtA, i, uint64(size))
  3529. }
  3530. i--
  3531. dAtA[i] = 0x42
  3532. }
  3533. return len(dAtA) - i, nil
  3534. }
  3535. func (m *Request_EndBlock) MarshalTo(dAtA []byte) (int, error) {
  3536. size := m.Size()
  3537. return m.MarshalToSizedBuffer(dAtA[:size])
  3538. }
  3539. func (m *Request_EndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3540. i := len(dAtA)
  3541. if m.EndBlock != nil {
  3542. {
  3543. size, err := m.EndBlock.MarshalToSizedBuffer(dAtA[:i])
  3544. if err != nil {
  3545. return 0, err
  3546. }
  3547. i -= size
  3548. i = encodeVarintTypes(dAtA, i, uint64(size))
  3549. }
  3550. i--
  3551. dAtA[i] = 0x4a
  3552. }
  3553. return len(dAtA) - i, nil
  3554. }
  3555. func (m *Request_Commit) MarshalTo(dAtA []byte) (int, error) {
  3556. size := m.Size()
  3557. return m.MarshalToSizedBuffer(dAtA[:size])
  3558. }
  3559. func (m *Request_Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3560. i := len(dAtA)
  3561. if m.Commit != nil {
  3562. {
  3563. size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i])
  3564. if err != nil {
  3565. return 0, err
  3566. }
  3567. i -= size
  3568. i = encodeVarintTypes(dAtA, i, uint64(size))
  3569. }
  3570. i--
  3571. dAtA[i] = 0x52
  3572. }
  3573. return len(dAtA) - i, nil
  3574. }
  3575. func (m *Request_ListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  3576. size := m.Size()
  3577. return m.MarshalToSizedBuffer(dAtA[:size])
  3578. }
  3579. func (m *Request_ListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3580. i := len(dAtA)
  3581. if m.ListSnapshots != nil {
  3582. {
  3583. size, err := m.ListSnapshots.MarshalToSizedBuffer(dAtA[:i])
  3584. if err != nil {
  3585. return 0, err
  3586. }
  3587. i -= size
  3588. i = encodeVarintTypes(dAtA, i, uint64(size))
  3589. }
  3590. i--
  3591. dAtA[i] = 0x5a
  3592. }
  3593. return len(dAtA) - i, nil
  3594. }
  3595. func (m *Request_OfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  3596. size := m.Size()
  3597. return m.MarshalToSizedBuffer(dAtA[:size])
  3598. }
  3599. func (m *Request_OfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3600. i := len(dAtA)
  3601. if m.OfferSnapshot != nil {
  3602. {
  3603. size, err := m.OfferSnapshot.MarshalToSizedBuffer(dAtA[:i])
  3604. if err != nil {
  3605. return 0, err
  3606. }
  3607. i -= size
  3608. i = encodeVarintTypes(dAtA, i, uint64(size))
  3609. }
  3610. i--
  3611. dAtA[i] = 0x62
  3612. }
  3613. return len(dAtA) - i, nil
  3614. }
  3615. func (m *Request_LoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  3616. size := m.Size()
  3617. return m.MarshalToSizedBuffer(dAtA[:size])
  3618. }
  3619. func (m *Request_LoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3620. i := len(dAtA)
  3621. if m.LoadSnapshotChunk != nil {
  3622. {
  3623. size, err := m.LoadSnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  3624. if err != nil {
  3625. return 0, err
  3626. }
  3627. i -= size
  3628. i = encodeVarintTypes(dAtA, i, uint64(size))
  3629. }
  3630. i--
  3631. dAtA[i] = 0x6a
  3632. }
  3633. return len(dAtA) - i, nil
  3634. }
  3635. func (m *Request_ApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  3636. size := m.Size()
  3637. return m.MarshalToSizedBuffer(dAtA[:size])
  3638. }
  3639. func (m *Request_ApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3640. i := len(dAtA)
  3641. if m.ApplySnapshotChunk != nil {
  3642. {
  3643. size, err := m.ApplySnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  3644. if err != nil {
  3645. return 0, err
  3646. }
  3647. i -= size
  3648. i = encodeVarintTypes(dAtA, i, uint64(size))
  3649. }
  3650. i--
  3651. dAtA[i] = 0x72
  3652. }
  3653. return len(dAtA) - i, nil
  3654. }
  3655. func (m *RequestEcho) Marshal() (dAtA []byte, err error) {
  3656. size := m.Size()
  3657. dAtA = make([]byte, size)
  3658. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3659. if err != nil {
  3660. return nil, err
  3661. }
  3662. return dAtA[:n], nil
  3663. }
  3664. func (m *RequestEcho) MarshalTo(dAtA []byte) (int, error) {
  3665. size := m.Size()
  3666. return m.MarshalToSizedBuffer(dAtA[:size])
  3667. }
  3668. func (m *RequestEcho) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3669. i := len(dAtA)
  3670. _ = i
  3671. var l int
  3672. _ = l
  3673. if len(m.Message) > 0 {
  3674. i -= len(m.Message)
  3675. copy(dAtA[i:], m.Message)
  3676. i = encodeVarintTypes(dAtA, i, uint64(len(m.Message)))
  3677. i--
  3678. dAtA[i] = 0xa
  3679. }
  3680. return len(dAtA) - i, nil
  3681. }
  3682. func (m *RequestFlush) Marshal() (dAtA []byte, err error) {
  3683. size := m.Size()
  3684. dAtA = make([]byte, size)
  3685. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3686. if err != nil {
  3687. return nil, err
  3688. }
  3689. return dAtA[:n], nil
  3690. }
  3691. func (m *RequestFlush) MarshalTo(dAtA []byte) (int, error) {
  3692. size := m.Size()
  3693. return m.MarshalToSizedBuffer(dAtA[:size])
  3694. }
  3695. func (m *RequestFlush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3696. i := len(dAtA)
  3697. _ = i
  3698. var l int
  3699. _ = l
  3700. return len(dAtA) - i, nil
  3701. }
  3702. func (m *RequestInfo) Marshal() (dAtA []byte, err error) {
  3703. size := m.Size()
  3704. dAtA = make([]byte, size)
  3705. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3706. if err != nil {
  3707. return nil, err
  3708. }
  3709. return dAtA[:n], nil
  3710. }
  3711. func (m *RequestInfo) MarshalTo(dAtA []byte) (int, error) {
  3712. size := m.Size()
  3713. return m.MarshalToSizedBuffer(dAtA[:size])
  3714. }
  3715. func (m *RequestInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3716. i := len(dAtA)
  3717. _ = i
  3718. var l int
  3719. _ = l
  3720. if len(m.AbciVersion) > 0 {
  3721. i -= len(m.AbciVersion)
  3722. copy(dAtA[i:], m.AbciVersion)
  3723. i = encodeVarintTypes(dAtA, i, uint64(len(m.AbciVersion)))
  3724. i--
  3725. dAtA[i] = 0x22
  3726. }
  3727. if m.P2PVersion != 0 {
  3728. i = encodeVarintTypes(dAtA, i, uint64(m.P2PVersion))
  3729. i--
  3730. dAtA[i] = 0x18
  3731. }
  3732. if m.BlockVersion != 0 {
  3733. i = encodeVarintTypes(dAtA, i, uint64(m.BlockVersion))
  3734. i--
  3735. dAtA[i] = 0x10
  3736. }
  3737. if len(m.Version) > 0 {
  3738. i -= len(m.Version)
  3739. copy(dAtA[i:], m.Version)
  3740. i = encodeVarintTypes(dAtA, i, uint64(len(m.Version)))
  3741. i--
  3742. dAtA[i] = 0xa
  3743. }
  3744. return len(dAtA) - i, nil
  3745. }
  3746. func (m *RequestInitChain) Marshal() (dAtA []byte, err error) {
  3747. size := m.Size()
  3748. dAtA = make([]byte, size)
  3749. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3750. if err != nil {
  3751. return nil, err
  3752. }
  3753. return dAtA[:n], nil
  3754. }
  3755. func (m *RequestInitChain) MarshalTo(dAtA []byte) (int, error) {
  3756. size := m.Size()
  3757. return m.MarshalToSizedBuffer(dAtA[:size])
  3758. }
  3759. func (m *RequestInitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3760. i := len(dAtA)
  3761. _ = i
  3762. var l int
  3763. _ = l
  3764. if m.InitialHeight != 0 {
  3765. i = encodeVarintTypes(dAtA, i, uint64(m.InitialHeight))
  3766. i--
  3767. dAtA[i] = 0x30
  3768. }
  3769. if len(m.AppStateBytes) > 0 {
  3770. i -= len(m.AppStateBytes)
  3771. copy(dAtA[i:], m.AppStateBytes)
  3772. i = encodeVarintTypes(dAtA, i, uint64(len(m.AppStateBytes)))
  3773. i--
  3774. dAtA[i] = 0x2a
  3775. }
  3776. if len(m.Validators) > 0 {
  3777. for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- {
  3778. {
  3779. size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  3780. if err != nil {
  3781. return 0, err
  3782. }
  3783. i -= size
  3784. i = encodeVarintTypes(dAtA, i, uint64(size))
  3785. }
  3786. i--
  3787. dAtA[i] = 0x22
  3788. }
  3789. }
  3790. if m.ConsensusParams != nil {
  3791. {
  3792. size, err := m.ConsensusParams.MarshalToSizedBuffer(dAtA[:i])
  3793. if err != nil {
  3794. return 0, err
  3795. }
  3796. i -= size
  3797. i = encodeVarintTypes(dAtA, i, uint64(size))
  3798. }
  3799. i--
  3800. dAtA[i] = 0x1a
  3801. }
  3802. if len(m.ChainId) > 0 {
  3803. i -= len(m.ChainId)
  3804. copy(dAtA[i:], m.ChainId)
  3805. i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId)))
  3806. i--
  3807. dAtA[i] = 0x12
  3808. }
  3809. n16, err16 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):])
  3810. if err16 != nil {
  3811. return 0, err16
  3812. }
  3813. i -= n16
  3814. i = encodeVarintTypes(dAtA, i, uint64(n16))
  3815. i--
  3816. dAtA[i] = 0xa
  3817. return len(dAtA) - i, nil
  3818. }
  3819. func (m *RequestQuery) Marshal() (dAtA []byte, err error) {
  3820. size := m.Size()
  3821. dAtA = make([]byte, size)
  3822. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3823. if err != nil {
  3824. return nil, err
  3825. }
  3826. return dAtA[:n], nil
  3827. }
  3828. func (m *RequestQuery) MarshalTo(dAtA []byte) (int, error) {
  3829. size := m.Size()
  3830. return m.MarshalToSizedBuffer(dAtA[:size])
  3831. }
  3832. func (m *RequestQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3833. i := len(dAtA)
  3834. _ = i
  3835. var l int
  3836. _ = l
  3837. if m.Prove {
  3838. i--
  3839. if m.Prove {
  3840. dAtA[i] = 1
  3841. } else {
  3842. dAtA[i] = 0
  3843. }
  3844. i--
  3845. dAtA[i] = 0x20
  3846. }
  3847. if m.Height != 0 {
  3848. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  3849. i--
  3850. dAtA[i] = 0x18
  3851. }
  3852. if len(m.Path) > 0 {
  3853. i -= len(m.Path)
  3854. copy(dAtA[i:], m.Path)
  3855. i = encodeVarintTypes(dAtA, i, uint64(len(m.Path)))
  3856. i--
  3857. dAtA[i] = 0x12
  3858. }
  3859. if len(m.Data) > 0 {
  3860. i -= len(m.Data)
  3861. copy(dAtA[i:], m.Data)
  3862. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  3863. i--
  3864. dAtA[i] = 0xa
  3865. }
  3866. return len(dAtA) - i, nil
  3867. }
  3868. func (m *RequestBeginBlock) Marshal() (dAtA []byte, err error) {
  3869. size := m.Size()
  3870. dAtA = make([]byte, size)
  3871. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3872. if err != nil {
  3873. return nil, err
  3874. }
  3875. return dAtA[:n], nil
  3876. }
  3877. func (m *RequestBeginBlock) MarshalTo(dAtA []byte) (int, error) {
  3878. size := m.Size()
  3879. return m.MarshalToSizedBuffer(dAtA[:size])
  3880. }
  3881. func (m *RequestBeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3882. i := len(dAtA)
  3883. _ = i
  3884. var l int
  3885. _ = l
  3886. if len(m.ByzantineValidators) > 0 {
  3887. for iNdEx := len(m.ByzantineValidators) - 1; iNdEx >= 0; iNdEx-- {
  3888. {
  3889. size, err := m.ByzantineValidators[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  3890. if err != nil {
  3891. return 0, err
  3892. }
  3893. i -= size
  3894. i = encodeVarintTypes(dAtA, i, uint64(size))
  3895. }
  3896. i--
  3897. dAtA[i] = 0x22
  3898. }
  3899. }
  3900. {
  3901. size, err := m.LastCommitInfo.MarshalToSizedBuffer(dAtA[:i])
  3902. if err != nil {
  3903. return 0, err
  3904. }
  3905. i -= size
  3906. i = encodeVarintTypes(dAtA, i, uint64(size))
  3907. }
  3908. i--
  3909. dAtA[i] = 0x1a
  3910. {
  3911. size, err := m.Header.MarshalToSizedBuffer(dAtA[:i])
  3912. if err != nil {
  3913. return 0, err
  3914. }
  3915. i -= size
  3916. i = encodeVarintTypes(dAtA, i, uint64(size))
  3917. }
  3918. i--
  3919. dAtA[i] = 0x12
  3920. if len(m.Hash) > 0 {
  3921. i -= len(m.Hash)
  3922. copy(dAtA[i:], m.Hash)
  3923. i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash)))
  3924. i--
  3925. dAtA[i] = 0xa
  3926. }
  3927. return len(dAtA) - i, nil
  3928. }
  3929. func (m *RequestCheckTx) Marshal() (dAtA []byte, err error) {
  3930. size := m.Size()
  3931. dAtA = make([]byte, size)
  3932. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3933. if err != nil {
  3934. return nil, err
  3935. }
  3936. return dAtA[:n], nil
  3937. }
  3938. func (m *RequestCheckTx) MarshalTo(dAtA []byte) (int, error) {
  3939. size := m.Size()
  3940. return m.MarshalToSizedBuffer(dAtA[:size])
  3941. }
  3942. func (m *RequestCheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3943. i := len(dAtA)
  3944. _ = i
  3945. var l int
  3946. _ = l
  3947. if m.Type != 0 {
  3948. i = encodeVarintTypes(dAtA, i, uint64(m.Type))
  3949. i--
  3950. dAtA[i] = 0x10
  3951. }
  3952. if len(m.Tx) > 0 {
  3953. i -= len(m.Tx)
  3954. copy(dAtA[i:], m.Tx)
  3955. i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx)))
  3956. i--
  3957. dAtA[i] = 0xa
  3958. }
  3959. return len(dAtA) - i, nil
  3960. }
  3961. func (m *RequestDeliverTx) Marshal() (dAtA []byte, err error) {
  3962. size := m.Size()
  3963. dAtA = make([]byte, size)
  3964. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3965. if err != nil {
  3966. return nil, err
  3967. }
  3968. return dAtA[:n], nil
  3969. }
  3970. func (m *RequestDeliverTx) MarshalTo(dAtA []byte) (int, error) {
  3971. size := m.Size()
  3972. return m.MarshalToSizedBuffer(dAtA[:size])
  3973. }
  3974. func (m *RequestDeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3975. i := len(dAtA)
  3976. _ = i
  3977. var l int
  3978. _ = l
  3979. if len(m.Tx) > 0 {
  3980. i -= len(m.Tx)
  3981. copy(dAtA[i:], m.Tx)
  3982. i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx)))
  3983. i--
  3984. dAtA[i] = 0xa
  3985. }
  3986. return len(dAtA) - i, nil
  3987. }
  3988. func (m *RequestEndBlock) Marshal() (dAtA []byte, err error) {
  3989. size := m.Size()
  3990. dAtA = make([]byte, size)
  3991. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3992. if err != nil {
  3993. return nil, err
  3994. }
  3995. return dAtA[:n], nil
  3996. }
  3997. func (m *RequestEndBlock) MarshalTo(dAtA []byte) (int, error) {
  3998. size := m.Size()
  3999. return m.MarshalToSizedBuffer(dAtA[:size])
  4000. }
  4001. func (m *RequestEndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4002. i := len(dAtA)
  4003. _ = i
  4004. var l int
  4005. _ = l
  4006. if m.Height != 0 {
  4007. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  4008. i--
  4009. dAtA[i] = 0x8
  4010. }
  4011. return len(dAtA) - i, nil
  4012. }
  4013. func (m *RequestCommit) Marshal() (dAtA []byte, err error) {
  4014. size := m.Size()
  4015. dAtA = make([]byte, size)
  4016. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4017. if err != nil {
  4018. return nil, err
  4019. }
  4020. return dAtA[:n], nil
  4021. }
  4022. func (m *RequestCommit) MarshalTo(dAtA []byte) (int, error) {
  4023. size := m.Size()
  4024. return m.MarshalToSizedBuffer(dAtA[:size])
  4025. }
  4026. func (m *RequestCommit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4027. i := len(dAtA)
  4028. _ = i
  4029. var l int
  4030. _ = l
  4031. return len(dAtA) - i, nil
  4032. }
  4033. func (m *RequestListSnapshots) Marshal() (dAtA []byte, err error) {
  4034. size := m.Size()
  4035. dAtA = make([]byte, size)
  4036. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4037. if err != nil {
  4038. return nil, err
  4039. }
  4040. return dAtA[:n], nil
  4041. }
  4042. func (m *RequestListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  4043. size := m.Size()
  4044. return m.MarshalToSizedBuffer(dAtA[:size])
  4045. }
  4046. func (m *RequestListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4047. i := len(dAtA)
  4048. _ = i
  4049. var l int
  4050. _ = l
  4051. return len(dAtA) - i, nil
  4052. }
  4053. func (m *RequestOfferSnapshot) Marshal() (dAtA []byte, err error) {
  4054. size := m.Size()
  4055. dAtA = make([]byte, size)
  4056. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4057. if err != nil {
  4058. return nil, err
  4059. }
  4060. return dAtA[:n], nil
  4061. }
  4062. func (m *RequestOfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  4063. size := m.Size()
  4064. return m.MarshalToSizedBuffer(dAtA[:size])
  4065. }
  4066. func (m *RequestOfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4067. i := len(dAtA)
  4068. _ = i
  4069. var l int
  4070. _ = l
  4071. if len(m.AppHash) > 0 {
  4072. i -= len(m.AppHash)
  4073. copy(dAtA[i:], m.AppHash)
  4074. i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash)))
  4075. i--
  4076. dAtA[i] = 0x12
  4077. }
  4078. if m.Snapshot != nil {
  4079. {
  4080. size, err := m.Snapshot.MarshalToSizedBuffer(dAtA[:i])
  4081. if err != nil {
  4082. return 0, err
  4083. }
  4084. i -= size
  4085. i = encodeVarintTypes(dAtA, i, uint64(size))
  4086. }
  4087. i--
  4088. dAtA[i] = 0xa
  4089. }
  4090. return len(dAtA) - i, nil
  4091. }
  4092. func (m *RequestLoadSnapshotChunk) Marshal() (dAtA []byte, err error) {
  4093. size := m.Size()
  4094. dAtA = make([]byte, size)
  4095. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4096. if err != nil {
  4097. return nil, err
  4098. }
  4099. return dAtA[:n], nil
  4100. }
  4101. func (m *RequestLoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4102. size := m.Size()
  4103. return m.MarshalToSizedBuffer(dAtA[:size])
  4104. }
  4105. func (m *RequestLoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4106. i := len(dAtA)
  4107. _ = i
  4108. var l int
  4109. _ = l
  4110. if m.Chunk != 0 {
  4111. i = encodeVarintTypes(dAtA, i, uint64(m.Chunk))
  4112. i--
  4113. dAtA[i] = 0x18
  4114. }
  4115. if m.Format != 0 {
  4116. i = encodeVarintTypes(dAtA, i, uint64(m.Format))
  4117. i--
  4118. dAtA[i] = 0x10
  4119. }
  4120. if m.Height != 0 {
  4121. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  4122. i--
  4123. dAtA[i] = 0x8
  4124. }
  4125. return len(dAtA) - i, nil
  4126. }
  4127. func (m *RequestApplySnapshotChunk) Marshal() (dAtA []byte, err error) {
  4128. size := m.Size()
  4129. dAtA = make([]byte, size)
  4130. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4131. if err != nil {
  4132. return nil, err
  4133. }
  4134. return dAtA[:n], nil
  4135. }
  4136. func (m *RequestApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4137. size := m.Size()
  4138. return m.MarshalToSizedBuffer(dAtA[:size])
  4139. }
  4140. func (m *RequestApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4141. i := len(dAtA)
  4142. _ = i
  4143. var l int
  4144. _ = l
  4145. if len(m.Sender) > 0 {
  4146. i -= len(m.Sender)
  4147. copy(dAtA[i:], m.Sender)
  4148. i = encodeVarintTypes(dAtA, i, uint64(len(m.Sender)))
  4149. i--
  4150. dAtA[i] = 0x1a
  4151. }
  4152. if len(m.Chunk) > 0 {
  4153. i -= len(m.Chunk)
  4154. copy(dAtA[i:], m.Chunk)
  4155. i = encodeVarintTypes(dAtA, i, uint64(len(m.Chunk)))
  4156. i--
  4157. dAtA[i] = 0x12
  4158. }
  4159. if m.Index != 0 {
  4160. i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  4161. i--
  4162. dAtA[i] = 0x8
  4163. }
  4164. return len(dAtA) - i, nil
  4165. }
  4166. func (m *Response) Marshal() (dAtA []byte, err error) {
  4167. size := m.Size()
  4168. dAtA = make([]byte, size)
  4169. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4170. if err != nil {
  4171. return nil, err
  4172. }
  4173. return dAtA[:n], nil
  4174. }
  4175. func (m *Response) MarshalTo(dAtA []byte) (int, error) {
  4176. size := m.Size()
  4177. return m.MarshalToSizedBuffer(dAtA[:size])
  4178. }
  4179. func (m *Response) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4180. i := len(dAtA)
  4181. _ = i
  4182. var l int
  4183. _ = l
  4184. if m.Value != nil {
  4185. {
  4186. size := m.Value.Size()
  4187. i -= size
  4188. if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil {
  4189. return 0, err
  4190. }
  4191. }
  4192. }
  4193. return len(dAtA) - i, nil
  4194. }
  4195. func (m *Response_Exception) MarshalTo(dAtA []byte) (int, error) {
  4196. size := m.Size()
  4197. return m.MarshalToSizedBuffer(dAtA[:size])
  4198. }
  4199. func (m *Response_Exception) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4200. i := len(dAtA)
  4201. if m.Exception != nil {
  4202. {
  4203. size, err := m.Exception.MarshalToSizedBuffer(dAtA[:i])
  4204. if err != nil {
  4205. return 0, err
  4206. }
  4207. i -= size
  4208. i = encodeVarintTypes(dAtA, i, uint64(size))
  4209. }
  4210. i--
  4211. dAtA[i] = 0xa
  4212. }
  4213. return len(dAtA) - i, nil
  4214. }
  4215. func (m *Response_Echo) MarshalTo(dAtA []byte) (int, error) {
  4216. size := m.Size()
  4217. return m.MarshalToSizedBuffer(dAtA[:size])
  4218. }
  4219. func (m *Response_Echo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4220. i := len(dAtA)
  4221. if m.Echo != nil {
  4222. {
  4223. size, err := m.Echo.MarshalToSizedBuffer(dAtA[:i])
  4224. if err != nil {
  4225. return 0, err
  4226. }
  4227. i -= size
  4228. i = encodeVarintTypes(dAtA, i, uint64(size))
  4229. }
  4230. i--
  4231. dAtA[i] = 0x12
  4232. }
  4233. return len(dAtA) - i, nil
  4234. }
  4235. func (m *Response_Flush) MarshalTo(dAtA []byte) (int, error) {
  4236. size := m.Size()
  4237. return m.MarshalToSizedBuffer(dAtA[:size])
  4238. }
  4239. func (m *Response_Flush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4240. i := len(dAtA)
  4241. if m.Flush != nil {
  4242. {
  4243. size, err := m.Flush.MarshalToSizedBuffer(dAtA[:i])
  4244. if err != nil {
  4245. return 0, err
  4246. }
  4247. i -= size
  4248. i = encodeVarintTypes(dAtA, i, uint64(size))
  4249. }
  4250. i--
  4251. dAtA[i] = 0x1a
  4252. }
  4253. return len(dAtA) - i, nil
  4254. }
  4255. func (m *Response_Info) MarshalTo(dAtA []byte) (int, error) {
  4256. size := m.Size()
  4257. return m.MarshalToSizedBuffer(dAtA[:size])
  4258. }
  4259. func (m *Response_Info) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4260. i := len(dAtA)
  4261. if m.Info != nil {
  4262. {
  4263. size, err := m.Info.MarshalToSizedBuffer(dAtA[:i])
  4264. if err != nil {
  4265. return 0, err
  4266. }
  4267. i -= size
  4268. i = encodeVarintTypes(dAtA, i, uint64(size))
  4269. }
  4270. i--
  4271. dAtA[i] = 0x22
  4272. }
  4273. return len(dAtA) - i, nil
  4274. }
  4275. func (m *Response_InitChain) MarshalTo(dAtA []byte) (int, error) {
  4276. size := m.Size()
  4277. return m.MarshalToSizedBuffer(dAtA[:size])
  4278. }
  4279. func (m *Response_InitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4280. i := len(dAtA)
  4281. if m.InitChain != nil {
  4282. {
  4283. size, err := m.InitChain.MarshalToSizedBuffer(dAtA[:i])
  4284. if err != nil {
  4285. return 0, err
  4286. }
  4287. i -= size
  4288. i = encodeVarintTypes(dAtA, i, uint64(size))
  4289. }
  4290. i--
  4291. dAtA[i] = 0x2a
  4292. }
  4293. return len(dAtA) - i, nil
  4294. }
  4295. func (m *Response_Query) MarshalTo(dAtA []byte) (int, error) {
  4296. size := m.Size()
  4297. return m.MarshalToSizedBuffer(dAtA[:size])
  4298. }
  4299. func (m *Response_Query) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4300. i := len(dAtA)
  4301. if m.Query != nil {
  4302. {
  4303. size, err := m.Query.MarshalToSizedBuffer(dAtA[:i])
  4304. if err != nil {
  4305. return 0, err
  4306. }
  4307. i -= size
  4308. i = encodeVarintTypes(dAtA, i, uint64(size))
  4309. }
  4310. i--
  4311. dAtA[i] = 0x32
  4312. }
  4313. return len(dAtA) - i, nil
  4314. }
  4315. func (m *Response_BeginBlock) MarshalTo(dAtA []byte) (int, error) {
  4316. size := m.Size()
  4317. return m.MarshalToSizedBuffer(dAtA[:size])
  4318. }
  4319. func (m *Response_BeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4320. i := len(dAtA)
  4321. if m.BeginBlock != nil {
  4322. {
  4323. size, err := m.BeginBlock.MarshalToSizedBuffer(dAtA[:i])
  4324. if err != nil {
  4325. return 0, err
  4326. }
  4327. i -= size
  4328. i = encodeVarintTypes(dAtA, i, uint64(size))
  4329. }
  4330. i--
  4331. dAtA[i] = 0x3a
  4332. }
  4333. return len(dAtA) - i, nil
  4334. }
  4335. func (m *Response_CheckTx) MarshalTo(dAtA []byte) (int, error) {
  4336. size := m.Size()
  4337. return m.MarshalToSizedBuffer(dAtA[:size])
  4338. }
  4339. func (m *Response_CheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4340. i := len(dAtA)
  4341. if m.CheckTx != nil {
  4342. {
  4343. size, err := m.CheckTx.MarshalToSizedBuffer(dAtA[:i])
  4344. if err != nil {
  4345. return 0, err
  4346. }
  4347. i -= size
  4348. i = encodeVarintTypes(dAtA, i, uint64(size))
  4349. }
  4350. i--
  4351. dAtA[i] = 0x42
  4352. }
  4353. return len(dAtA) - i, nil
  4354. }
  4355. func (m *Response_DeliverTx) MarshalTo(dAtA []byte) (int, error) {
  4356. size := m.Size()
  4357. return m.MarshalToSizedBuffer(dAtA[:size])
  4358. }
  4359. func (m *Response_DeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4360. i := len(dAtA)
  4361. if m.DeliverTx != nil {
  4362. {
  4363. size, err := m.DeliverTx.MarshalToSizedBuffer(dAtA[:i])
  4364. if err != nil {
  4365. return 0, err
  4366. }
  4367. i -= size
  4368. i = encodeVarintTypes(dAtA, i, uint64(size))
  4369. }
  4370. i--
  4371. dAtA[i] = 0x4a
  4372. }
  4373. return len(dAtA) - i, nil
  4374. }
  4375. func (m *Response_EndBlock) MarshalTo(dAtA []byte) (int, error) {
  4376. size := m.Size()
  4377. return m.MarshalToSizedBuffer(dAtA[:size])
  4378. }
  4379. func (m *Response_EndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4380. i := len(dAtA)
  4381. if m.EndBlock != nil {
  4382. {
  4383. size, err := m.EndBlock.MarshalToSizedBuffer(dAtA[:i])
  4384. if err != nil {
  4385. return 0, err
  4386. }
  4387. i -= size
  4388. i = encodeVarintTypes(dAtA, i, uint64(size))
  4389. }
  4390. i--
  4391. dAtA[i] = 0x52
  4392. }
  4393. return len(dAtA) - i, nil
  4394. }
  4395. func (m *Response_Commit) MarshalTo(dAtA []byte) (int, error) {
  4396. size := m.Size()
  4397. return m.MarshalToSizedBuffer(dAtA[:size])
  4398. }
  4399. func (m *Response_Commit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4400. i := len(dAtA)
  4401. if m.Commit != nil {
  4402. {
  4403. size, err := m.Commit.MarshalToSizedBuffer(dAtA[:i])
  4404. if err != nil {
  4405. return 0, err
  4406. }
  4407. i -= size
  4408. i = encodeVarintTypes(dAtA, i, uint64(size))
  4409. }
  4410. i--
  4411. dAtA[i] = 0x5a
  4412. }
  4413. return len(dAtA) - i, nil
  4414. }
  4415. func (m *Response_ListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  4416. size := m.Size()
  4417. return m.MarshalToSizedBuffer(dAtA[:size])
  4418. }
  4419. func (m *Response_ListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4420. i := len(dAtA)
  4421. if m.ListSnapshots != nil {
  4422. {
  4423. size, err := m.ListSnapshots.MarshalToSizedBuffer(dAtA[:i])
  4424. if err != nil {
  4425. return 0, err
  4426. }
  4427. i -= size
  4428. i = encodeVarintTypes(dAtA, i, uint64(size))
  4429. }
  4430. i--
  4431. dAtA[i] = 0x62
  4432. }
  4433. return len(dAtA) - i, nil
  4434. }
  4435. func (m *Response_OfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  4436. size := m.Size()
  4437. return m.MarshalToSizedBuffer(dAtA[:size])
  4438. }
  4439. func (m *Response_OfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4440. i := len(dAtA)
  4441. if m.OfferSnapshot != nil {
  4442. {
  4443. size, err := m.OfferSnapshot.MarshalToSizedBuffer(dAtA[:i])
  4444. if err != nil {
  4445. return 0, err
  4446. }
  4447. i -= size
  4448. i = encodeVarintTypes(dAtA, i, uint64(size))
  4449. }
  4450. i--
  4451. dAtA[i] = 0x6a
  4452. }
  4453. return len(dAtA) - i, nil
  4454. }
  4455. func (m *Response_LoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4456. size := m.Size()
  4457. return m.MarshalToSizedBuffer(dAtA[:size])
  4458. }
  4459. func (m *Response_LoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4460. i := len(dAtA)
  4461. if m.LoadSnapshotChunk != nil {
  4462. {
  4463. size, err := m.LoadSnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  4464. if err != nil {
  4465. return 0, err
  4466. }
  4467. i -= size
  4468. i = encodeVarintTypes(dAtA, i, uint64(size))
  4469. }
  4470. i--
  4471. dAtA[i] = 0x72
  4472. }
  4473. return len(dAtA) - i, nil
  4474. }
  4475. func (m *Response_ApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  4476. size := m.Size()
  4477. return m.MarshalToSizedBuffer(dAtA[:size])
  4478. }
  4479. func (m *Response_ApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4480. i := len(dAtA)
  4481. if m.ApplySnapshotChunk != nil {
  4482. {
  4483. size, err := m.ApplySnapshotChunk.MarshalToSizedBuffer(dAtA[:i])
  4484. if err != nil {
  4485. return 0, err
  4486. }
  4487. i -= size
  4488. i = encodeVarintTypes(dAtA, i, uint64(size))
  4489. }
  4490. i--
  4491. dAtA[i] = 0x7a
  4492. }
  4493. return len(dAtA) - i, nil
  4494. }
  4495. func (m *ResponseException) Marshal() (dAtA []byte, err error) {
  4496. size := m.Size()
  4497. dAtA = make([]byte, size)
  4498. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4499. if err != nil {
  4500. return nil, err
  4501. }
  4502. return dAtA[:n], nil
  4503. }
  4504. func (m *ResponseException) MarshalTo(dAtA []byte) (int, error) {
  4505. size := m.Size()
  4506. return m.MarshalToSizedBuffer(dAtA[:size])
  4507. }
  4508. func (m *ResponseException) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4509. i := len(dAtA)
  4510. _ = i
  4511. var l int
  4512. _ = l
  4513. if len(m.Error) > 0 {
  4514. i -= len(m.Error)
  4515. copy(dAtA[i:], m.Error)
  4516. i = encodeVarintTypes(dAtA, i, uint64(len(m.Error)))
  4517. i--
  4518. dAtA[i] = 0xa
  4519. }
  4520. return len(dAtA) - i, nil
  4521. }
  4522. func (m *ResponseEcho) Marshal() (dAtA []byte, err error) {
  4523. size := m.Size()
  4524. dAtA = make([]byte, size)
  4525. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4526. if err != nil {
  4527. return nil, err
  4528. }
  4529. return dAtA[:n], nil
  4530. }
  4531. func (m *ResponseEcho) MarshalTo(dAtA []byte) (int, error) {
  4532. size := m.Size()
  4533. return m.MarshalToSizedBuffer(dAtA[:size])
  4534. }
  4535. func (m *ResponseEcho) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4536. i := len(dAtA)
  4537. _ = i
  4538. var l int
  4539. _ = l
  4540. if len(m.Message) > 0 {
  4541. i -= len(m.Message)
  4542. copy(dAtA[i:], m.Message)
  4543. i = encodeVarintTypes(dAtA, i, uint64(len(m.Message)))
  4544. i--
  4545. dAtA[i] = 0xa
  4546. }
  4547. return len(dAtA) - i, nil
  4548. }
  4549. func (m *ResponseFlush) Marshal() (dAtA []byte, err error) {
  4550. size := m.Size()
  4551. dAtA = make([]byte, size)
  4552. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4553. if err != nil {
  4554. return nil, err
  4555. }
  4556. return dAtA[:n], nil
  4557. }
  4558. func (m *ResponseFlush) MarshalTo(dAtA []byte) (int, error) {
  4559. size := m.Size()
  4560. return m.MarshalToSizedBuffer(dAtA[:size])
  4561. }
  4562. func (m *ResponseFlush) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4563. i := len(dAtA)
  4564. _ = i
  4565. var l int
  4566. _ = l
  4567. return len(dAtA) - i, nil
  4568. }
  4569. func (m *ResponseInfo) Marshal() (dAtA []byte, err error) {
  4570. size := m.Size()
  4571. dAtA = make([]byte, size)
  4572. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4573. if err != nil {
  4574. return nil, err
  4575. }
  4576. return dAtA[:n], nil
  4577. }
  4578. func (m *ResponseInfo) MarshalTo(dAtA []byte) (int, error) {
  4579. size := m.Size()
  4580. return m.MarshalToSizedBuffer(dAtA[:size])
  4581. }
  4582. func (m *ResponseInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4583. i := len(dAtA)
  4584. _ = i
  4585. var l int
  4586. _ = l
  4587. if len(m.LastBlockAppHash) > 0 {
  4588. i -= len(m.LastBlockAppHash)
  4589. copy(dAtA[i:], m.LastBlockAppHash)
  4590. i = encodeVarintTypes(dAtA, i, uint64(len(m.LastBlockAppHash)))
  4591. i--
  4592. dAtA[i] = 0x2a
  4593. }
  4594. if m.LastBlockHeight != 0 {
  4595. i = encodeVarintTypes(dAtA, i, uint64(m.LastBlockHeight))
  4596. i--
  4597. dAtA[i] = 0x20
  4598. }
  4599. if m.AppVersion != 0 {
  4600. i = encodeVarintTypes(dAtA, i, uint64(m.AppVersion))
  4601. i--
  4602. dAtA[i] = 0x18
  4603. }
  4604. if len(m.Version) > 0 {
  4605. i -= len(m.Version)
  4606. copy(dAtA[i:], m.Version)
  4607. i = encodeVarintTypes(dAtA, i, uint64(len(m.Version)))
  4608. i--
  4609. dAtA[i] = 0x12
  4610. }
  4611. if len(m.Data) > 0 {
  4612. i -= len(m.Data)
  4613. copy(dAtA[i:], m.Data)
  4614. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  4615. i--
  4616. dAtA[i] = 0xa
  4617. }
  4618. return len(dAtA) - i, nil
  4619. }
  4620. func (m *ResponseInitChain) Marshal() (dAtA []byte, err error) {
  4621. size := m.Size()
  4622. dAtA = make([]byte, size)
  4623. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4624. if err != nil {
  4625. return nil, err
  4626. }
  4627. return dAtA[:n], nil
  4628. }
  4629. func (m *ResponseInitChain) MarshalTo(dAtA []byte) (int, error) {
  4630. size := m.Size()
  4631. return m.MarshalToSizedBuffer(dAtA[:size])
  4632. }
  4633. func (m *ResponseInitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4634. i := len(dAtA)
  4635. _ = i
  4636. var l int
  4637. _ = l
  4638. if len(m.AppHash) > 0 {
  4639. i -= len(m.AppHash)
  4640. copy(dAtA[i:], m.AppHash)
  4641. i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash)))
  4642. i--
  4643. dAtA[i] = 0x1a
  4644. }
  4645. if len(m.Validators) > 0 {
  4646. for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- {
  4647. {
  4648. size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4649. if err != nil {
  4650. return 0, err
  4651. }
  4652. i -= size
  4653. i = encodeVarintTypes(dAtA, i, uint64(size))
  4654. }
  4655. i--
  4656. dAtA[i] = 0x12
  4657. }
  4658. }
  4659. if m.ConsensusParams != nil {
  4660. {
  4661. size, err := m.ConsensusParams.MarshalToSizedBuffer(dAtA[:i])
  4662. if err != nil {
  4663. return 0, err
  4664. }
  4665. i -= size
  4666. i = encodeVarintTypes(dAtA, i, uint64(size))
  4667. }
  4668. i--
  4669. dAtA[i] = 0xa
  4670. }
  4671. return len(dAtA) - i, nil
  4672. }
  4673. func (m *ResponseQuery) Marshal() (dAtA []byte, err error) {
  4674. size := m.Size()
  4675. dAtA = make([]byte, size)
  4676. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4677. if err != nil {
  4678. return nil, err
  4679. }
  4680. return dAtA[:n], nil
  4681. }
  4682. func (m *ResponseQuery) MarshalTo(dAtA []byte) (int, error) {
  4683. size := m.Size()
  4684. return m.MarshalToSizedBuffer(dAtA[:size])
  4685. }
  4686. func (m *ResponseQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4687. i := len(dAtA)
  4688. _ = i
  4689. var l int
  4690. _ = l
  4691. if len(m.Codespace) > 0 {
  4692. i -= len(m.Codespace)
  4693. copy(dAtA[i:], m.Codespace)
  4694. i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace)))
  4695. i--
  4696. dAtA[i] = 0x52
  4697. }
  4698. if m.Height != 0 {
  4699. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  4700. i--
  4701. dAtA[i] = 0x48
  4702. }
  4703. if m.ProofOps != nil {
  4704. {
  4705. size, err := m.ProofOps.MarshalToSizedBuffer(dAtA[:i])
  4706. if err != nil {
  4707. return 0, err
  4708. }
  4709. i -= size
  4710. i = encodeVarintTypes(dAtA, i, uint64(size))
  4711. }
  4712. i--
  4713. dAtA[i] = 0x42
  4714. }
  4715. if len(m.Value) > 0 {
  4716. i -= len(m.Value)
  4717. copy(dAtA[i:], m.Value)
  4718. i = encodeVarintTypes(dAtA, i, uint64(len(m.Value)))
  4719. i--
  4720. dAtA[i] = 0x3a
  4721. }
  4722. if len(m.Key) > 0 {
  4723. i -= len(m.Key)
  4724. copy(dAtA[i:], m.Key)
  4725. i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
  4726. i--
  4727. dAtA[i] = 0x32
  4728. }
  4729. if m.Index != 0 {
  4730. i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  4731. i--
  4732. dAtA[i] = 0x28
  4733. }
  4734. if len(m.Info) > 0 {
  4735. i -= len(m.Info)
  4736. copy(dAtA[i:], m.Info)
  4737. i = encodeVarintTypes(dAtA, i, uint64(len(m.Info)))
  4738. i--
  4739. dAtA[i] = 0x22
  4740. }
  4741. if len(m.Log) > 0 {
  4742. i -= len(m.Log)
  4743. copy(dAtA[i:], m.Log)
  4744. i = encodeVarintTypes(dAtA, i, uint64(len(m.Log)))
  4745. i--
  4746. dAtA[i] = 0x1a
  4747. }
  4748. if m.Code != 0 {
  4749. i = encodeVarintTypes(dAtA, i, uint64(m.Code))
  4750. i--
  4751. dAtA[i] = 0x8
  4752. }
  4753. return len(dAtA) - i, nil
  4754. }
  4755. func (m *ResponseBeginBlock) Marshal() (dAtA []byte, err error) {
  4756. size := m.Size()
  4757. dAtA = make([]byte, size)
  4758. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4759. if err != nil {
  4760. return nil, err
  4761. }
  4762. return dAtA[:n], nil
  4763. }
  4764. func (m *ResponseBeginBlock) MarshalTo(dAtA []byte) (int, error) {
  4765. size := m.Size()
  4766. return m.MarshalToSizedBuffer(dAtA[:size])
  4767. }
  4768. func (m *ResponseBeginBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4769. i := len(dAtA)
  4770. _ = i
  4771. var l int
  4772. _ = l
  4773. if len(m.Events) > 0 {
  4774. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  4775. {
  4776. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4777. if err != nil {
  4778. return 0, err
  4779. }
  4780. i -= size
  4781. i = encodeVarintTypes(dAtA, i, uint64(size))
  4782. }
  4783. i--
  4784. dAtA[i] = 0xa
  4785. }
  4786. }
  4787. return len(dAtA) - i, nil
  4788. }
  4789. func (m *ResponseCheckTx) Marshal() (dAtA []byte, err error) {
  4790. size := m.Size()
  4791. dAtA = make([]byte, size)
  4792. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4793. if err != nil {
  4794. return nil, err
  4795. }
  4796. return dAtA[:n], nil
  4797. }
  4798. func (m *ResponseCheckTx) MarshalTo(dAtA []byte) (int, error) {
  4799. size := m.Size()
  4800. return m.MarshalToSizedBuffer(dAtA[:size])
  4801. }
  4802. func (m *ResponseCheckTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4803. i := len(dAtA)
  4804. _ = i
  4805. var l int
  4806. _ = l
  4807. if len(m.MempoolError) > 0 {
  4808. i -= len(m.MempoolError)
  4809. copy(dAtA[i:], m.MempoolError)
  4810. i = encodeVarintTypes(dAtA, i, uint64(len(m.MempoolError)))
  4811. i--
  4812. dAtA[i] = 0x5a
  4813. }
  4814. if m.Priority != 0 {
  4815. i = encodeVarintTypes(dAtA, i, uint64(m.Priority))
  4816. i--
  4817. dAtA[i] = 0x50
  4818. }
  4819. if len(m.Sender) > 0 {
  4820. i -= len(m.Sender)
  4821. copy(dAtA[i:], m.Sender)
  4822. i = encodeVarintTypes(dAtA, i, uint64(len(m.Sender)))
  4823. i--
  4824. dAtA[i] = 0x4a
  4825. }
  4826. if len(m.Codespace) > 0 {
  4827. i -= len(m.Codespace)
  4828. copy(dAtA[i:], m.Codespace)
  4829. i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace)))
  4830. i--
  4831. dAtA[i] = 0x42
  4832. }
  4833. if len(m.Events) > 0 {
  4834. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  4835. {
  4836. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4837. if err != nil {
  4838. return 0, err
  4839. }
  4840. i -= size
  4841. i = encodeVarintTypes(dAtA, i, uint64(size))
  4842. }
  4843. i--
  4844. dAtA[i] = 0x3a
  4845. }
  4846. }
  4847. if m.GasUsed != 0 {
  4848. i = encodeVarintTypes(dAtA, i, uint64(m.GasUsed))
  4849. i--
  4850. dAtA[i] = 0x30
  4851. }
  4852. if m.GasWanted != 0 {
  4853. i = encodeVarintTypes(dAtA, i, uint64(m.GasWanted))
  4854. i--
  4855. dAtA[i] = 0x28
  4856. }
  4857. if len(m.Info) > 0 {
  4858. i -= len(m.Info)
  4859. copy(dAtA[i:], m.Info)
  4860. i = encodeVarintTypes(dAtA, i, uint64(len(m.Info)))
  4861. i--
  4862. dAtA[i] = 0x22
  4863. }
  4864. if len(m.Log) > 0 {
  4865. i -= len(m.Log)
  4866. copy(dAtA[i:], m.Log)
  4867. i = encodeVarintTypes(dAtA, i, uint64(len(m.Log)))
  4868. i--
  4869. dAtA[i] = 0x1a
  4870. }
  4871. if len(m.Data) > 0 {
  4872. i -= len(m.Data)
  4873. copy(dAtA[i:], m.Data)
  4874. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  4875. i--
  4876. dAtA[i] = 0x12
  4877. }
  4878. if m.Code != 0 {
  4879. i = encodeVarintTypes(dAtA, i, uint64(m.Code))
  4880. i--
  4881. dAtA[i] = 0x8
  4882. }
  4883. return len(dAtA) - i, nil
  4884. }
  4885. func (m *ResponseDeliverTx) Marshal() (dAtA []byte, err error) {
  4886. size := m.Size()
  4887. dAtA = make([]byte, size)
  4888. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4889. if err != nil {
  4890. return nil, err
  4891. }
  4892. return dAtA[:n], nil
  4893. }
  4894. func (m *ResponseDeliverTx) MarshalTo(dAtA []byte) (int, error) {
  4895. size := m.Size()
  4896. return m.MarshalToSizedBuffer(dAtA[:size])
  4897. }
  4898. func (m *ResponseDeliverTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4899. i := len(dAtA)
  4900. _ = i
  4901. var l int
  4902. _ = l
  4903. if len(m.Codespace) > 0 {
  4904. i -= len(m.Codespace)
  4905. copy(dAtA[i:], m.Codespace)
  4906. i = encodeVarintTypes(dAtA, i, uint64(len(m.Codespace)))
  4907. i--
  4908. dAtA[i] = 0x42
  4909. }
  4910. if len(m.Events) > 0 {
  4911. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  4912. {
  4913. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4914. if err != nil {
  4915. return 0, err
  4916. }
  4917. i -= size
  4918. i = encodeVarintTypes(dAtA, i, uint64(size))
  4919. }
  4920. i--
  4921. dAtA[i] = 0x3a
  4922. }
  4923. }
  4924. if m.GasUsed != 0 {
  4925. i = encodeVarintTypes(dAtA, i, uint64(m.GasUsed))
  4926. i--
  4927. dAtA[i] = 0x30
  4928. }
  4929. if m.GasWanted != 0 {
  4930. i = encodeVarintTypes(dAtA, i, uint64(m.GasWanted))
  4931. i--
  4932. dAtA[i] = 0x28
  4933. }
  4934. if len(m.Info) > 0 {
  4935. i -= len(m.Info)
  4936. copy(dAtA[i:], m.Info)
  4937. i = encodeVarintTypes(dAtA, i, uint64(len(m.Info)))
  4938. i--
  4939. dAtA[i] = 0x22
  4940. }
  4941. if len(m.Log) > 0 {
  4942. i -= len(m.Log)
  4943. copy(dAtA[i:], m.Log)
  4944. i = encodeVarintTypes(dAtA, i, uint64(len(m.Log)))
  4945. i--
  4946. dAtA[i] = 0x1a
  4947. }
  4948. if len(m.Data) > 0 {
  4949. i -= len(m.Data)
  4950. copy(dAtA[i:], m.Data)
  4951. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  4952. i--
  4953. dAtA[i] = 0x12
  4954. }
  4955. if m.Code != 0 {
  4956. i = encodeVarintTypes(dAtA, i, uint64(m.Code))
  4957. i--
  4958. dAtA[i] = 0x8
  4959. }
  4960. return len(dAtA) - i, nil
  4961. }
  4962. func (m *ResponseEndBlock) Marshal() (dAtA []byte, err error) {
  4963. size := m.Size()
  4964. dAtA = make([]byte, size)
  4965. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  4966. if err != nil {
  4967. return nil, err
  4968. }
  4969. return dAtA[:n], nil
  4970. }
  4971. func (m *ResponseEndBlock) MarshalTo(dAtA []byte) (int, error) {
  4972. size := m.Size()
  4973. return m.MarshalToSizedBuffer(dAtA[:size])
  4974. }
  4975. func (m *ResponseEndBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  4976. i := len(dAtA)
  4977. _ = i
  4978. var l int
  4979. _ = l
  4980. if len(m.Events) > 0 {
  4981. for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
  4982. {
  4983. size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  4984. if err != nil {
  4985. return 0, err
  4986. }
  4987. i -= size
  4988. i = encodeVarintTypes(dAtA, i, uint64(size))
  4989. }
  4990. i--
  4991. dAtA[i] = 0x1a
  4992. }
  4993. }
  4994. if m.ConsensusParamUpdates != nil {
  4995. {
  4996. size, err := m.ConsensusParamUpdates.MarshalToSizedBuffer(dAtA[:i])
  4997. if err != nil {
  4998. return 0, err
  4999. }
  5000. i -= size
  5001. i = encodeVarintTypes(dAtA, i, uint64(size))
  5002. }
  5003. i--
  5004. dAtA[i] = 0x12
  5005. }
  5006. if len(m.ValidatorUpdates) > 0 {
  5007. for iNdEx := len(m.ValidatorUpdates) - 1; iNdEx >= 0; iNdEx-- {
  5008. {
  5009. size, err := m.ValidatorUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5010. if err != nil {
  5011. return 0, err
  5012. }
  5013. i -= size
  5014. i = encodeVarintTypes(dAtA, i, uint64(size))
  5015. }
  5016. i--
  5017. dAtA[i] = 0xa
  5018. }
  5019. }
  5020. return len(dAtA) - i, nil
  5021. }
  5022. func (m *ResponseCommit) Marshal() (dAtA []byte, err error) {
  5023. size := m.Size()
  5024. dAtA = make([]byte, size)
  5025. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5026. if err != nil {
  5027. return nil, err
  5028. }
  5029. return dAtA[:n], nil
  5030. }
  5031. func (m *ResponseCommit) MarshalTo(dAtA []byte) (int, error) {
  5032. size := m.Size()
  5033. return m.MarshalToSizedBuffer(dAtA[:size])
  5034. }
  5035. func (m *ResponseCommit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5036. i := len(dAtA)
  5037. _ = i
  5038. var l int
  5039. _ = l
  5040. if m.RetainHeight != 0 {
  5041. i = encodeVarintTypes(dAtA, i, uint64(m.RetainHeight))
  5042. i--
  5043. dAtA[i] = 0x18
  5044. }
  5045. if len(m.Data) > 0 {
  5046. i -= len(m.Data)
  5047. copy(dAtA[i:], m.Data)
  5048. i = encodeVarintTypes(dAtA, i, uint64(len(m.Data)))
  5049. i--
  5050. dAtA[i] = 0x12
  5051. }
  5052. return len(dAtA) - i, nil
  5053. }
  5054. func (m *ResponseListSnapshots) Marshal() (dAtA []byte, err error) {
  5055. size := m.Size()
  5056. dAtA = make([]byte, size)
  5057. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5058. if err != nil {
  5059. return nil, err
  5060. }
  5061. return dAtA[:n], nil
  5062. }
  5063. func (m *ResponseListSnapshots) MarshalTo(dAtA []byte) (int, error) {
  5064. size := m.Size()
  5065. return m.MarshalToSizedBuffer(dAtA[:size])
  5066. }
  5067. func (m *ResponseListSnapshots) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5068. i := len(dAtA)
  5069. _ = i
  5070. var l int
  5071. _ = l
  5072. if len(m.Snapshots) > 0 {
  5073. for iNdEx := len(m.Snapshots) - 1; iNdEx >= 0; iNdEx-- {
  5074. {
  5075. size, err := m.Snapshots[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5076. if err != nil {
  5077. return 0, err
  5078. }
  5079. i -= size
  5080. i = encodeVarintTypes(dAtA, i, uint64(size))
  5081. }
  5082. i--
  5083. dAtA[i] = 0xa
  5084. }
  5085. }
  5086. return len(dAtA) - i, nil
  5087. }
  5088. func (m *ResponseOfferSnapshot) Marshal() (dAtA []byte, err error) {
  5089. size := m.Size()
  5090. dAtA = make([]byte, size)
  5091. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5092. if err != nil {
  5093. return nil, err
  5094. }
  5095. return dAtA[:n], nil
  5096. }
  5097. func (m *ResponseOfferSnapshot) MarshalTo(dAtA []byte) (int, error) {
  5098. size := m.Size()
  5099. return m.MarshalToSizedBuffer(dAtA[:size])
  5100. }
  5101. func (m *ResponseOfferSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5102. i := len(dAtA)
  5103. _ = i
  5104. var l int
  5105. _ = l
  5106. if m.Result != 0 {
  5107. i = encodeVarintTypes(dAtA, i, uint64(m.Result))
  5108. i--
  5109. dAtA[i] = 0x8
  5110. }
  5111. return len(dAtA) - i, nil
  5112. }
  5113. func (m *ResponseLoadSnapshotChunk) Marshal() (dAtA []byte, err error) {
  5114. size := m.Size()
  5115. dAtA = make([]byte, size)
  5116. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5117. if err != nil {
  5118. return nil, err
  5119. }
  5120. return dAtA[:n], nil
  5121. }
  5122. func (m *ResponseLoadSnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  5123. size := m.Size()
  5124. return m.MarshalToSizedBuffer(dAtA[:size])
  5125. }
  5126. func (m *ResponseLoadSnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5127. i := len(dAtA)
  5128. _ = i
  5129. var l int
  5130. _ = l
  5131. if len(m.Chunk) > 0 {
  5132. i -= len(m.Chunk)
  5133. copy(dAtA[i:], m.Chunk)
  5134. i = encodeVarintTypes(dAtA, i, uint64(len(m.Chunk)))
  5135. i--
  5136. dAtA[i] = 0xa
  5137. }
  5138. return len(dAtA) - i, nil
  5139. }
  5140. func (m *ResponseApplySnapshotChunk) Marshal() (dAtA []byte, err error) {
  5141. size := m.Size()
  5142. dAtA = make([]byte, size)
  5143. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5144. if err != nil {
  5145. return nil, err
  5146. }
  5147. return dAtA[:n], nil
  5148. }
  5149. func (m *ResponseApplySnapshotChunk) MarshalTo(dAtA []byte) (int, error) {
  5150. size := m.Size()
  5151. return m.MarshalToSizedBuffer(dAtA[:size])
  5152. }
  5153. func (m *ResponseApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5154. i := len(dAtA)
  5155. _ = i
  5156. var l int
  5157. _ = l
  5158. if len(m.RejectSenders) > 0 {
  5159. for iNdEx := len(m.RejectSenders) - 1; iNdEx >= 0; iNdEx-- {
  5160. i -= len(m.RejectSenders[iNdEx])
  5161. copy(dAtA[i:], m.RejectSenders[iNdEx])
  5162. i = encodeVarintTypes(dAtA, i, uint64(len(m.RejectSenders[iNdEx])))
  5163. i--
  5164. dAtA[i] = 0x1a
  5165. }
  5166. }
  5167. if len(m.RefetchChunks) > 0 {
  5168. dAtA39 := make([]byte, len(m.RefetchChunks)*10)
  5169. var j38 int
  5170. for _, num := range m.RefetchChunks {
  5171. for num >= 1<<7 {
  5172. dAtA39[j38] = uint8(uint64(num)&0x7f | 0x80)
  5173. num >>= 7
  5174. j38++
  5175. }
  5176. dAtA39[j38] = uint8(num)
  5177. j38++
  5178. }
  5179. i -= j38
  5180. copy(dAtA[i:], dAtA39[:j38])
  5181. i = encodeVarintTypes(dAtA, i, uint64(j38))
  5182. i--
  5183. dAtA[i] = 0x12
  5184. }
  5185. if m.Result != 0 {
  5186. i = encodeVarintTypes(dAtA, i, uint64(m.Result))
  5187. i--
  5188. dAtA[i] = 0x8
  5189. }
  5190. return len(dAtA) - i, nil
  5191. }
  5192. func (m *LastCommitInfo) Marshal() (dAtA []byte, err error) {
  5193. size := m.Size()
  5194. dAtA = make([]byte, size)
  5195. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5196. if err != nil {
  5197. return nil, err
  5198. }
  5199. return dAtA[:n], nil
  5200. }
  5201. func (m *LastCommitInfo) MarshalTo(dAtA []byte) (int, error) {
  5202. size := m.Size()
  5203. return m.MarshalToSizedBuffer(dAtA[:size])
  5204. }
  5205. func (m *LastCommitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5206. i := len(dAtA)
  5207. _ = i
  5208. var l int
  5209. _ = l
  5210. if len(m.Votes) > 0 {
  5211. for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- {
  5212. {
  5213. size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5214. if err != nil {
  5215. return 0, err
  5216. }
  5217. i -= size
  5218. i = encodeVarintTypes(dAtA, i, uint64(size))
  5219. }
  5220. i--
  5221. dAtA[i] = 0x12
  5222. }
  5223. }
  5224. if m.Round != 0 {
  5225. i = encodeVarintTypes(dAtA, i, uint64(m.Round))
  5226. i--
  5227. dAtA[i] = 0x8
  5228. }
  5229. return len(dAtA) - i, nil
  5230. }
  5231. func (m *Event) Marshal() (dAtA []byte, err error) {
  5232. size := m.Size()
  5233. dAtA = make([]byte, size)
  5234. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5235. if err != nil {
  5236. return nil, err
  5237. }
  5238. return dAtA[:n], nil
  5239. }
  5240. func (m *Event) MarshalTo(dAtA []byte) (int, error) {
  5241. size := m.Size()
  5242. return m.MarshalToSizedBuffer(dAtA[:size])
  5243. }
  5244. func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5245. i := len(dAtA)
  5246. _ = i
  5247. var l int
  5248. _ = l
  5249. if len(m.Attributes) > 0 {
  5250. for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- {
  5251. {
  5252. size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  5253. if err != nil {
  5254. return 0, err
  5255. }
  5256. i -= size
  5257. i = encodeVarintTypes(dAtA, i, uint64(size))
  5258. }
  5259. i--
  5260. dAtA[i] = 0x12
  5261. }
  5262. }
  5263. if len(m.Type) > 0 {
  5264. i -= len(m.Type)
  5265. copy(dAtA[i:], m.Type)
  5266. i = encodeVarintTypes(dAtA, i, uint64(len(m.Type)))
  5267. i--
  5268. dAtA[i] = 0xa
  5269. }
  5270. return len(dAtA) - i, nil
  5271. }
  5272. func (m *EventAttribute) Marshal() (dAtA []byte, err error) {
  5273. size := m.Size()
  5274. dAtA = make([]byte, size)
  5275. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5276. if err != nil {
  5277. return nil, err
  5278. }
  5279. return dAtA[:n], nil
  5280. }
  5281. func (m *EventAttribute) MarshalTo(dAtA []byte) (int, error) {
  5282. size := m.Size()
  5283. return m.MarshalToSizedBuffer(dAtA[:size])
  5284. }
  5285. func (m *EventAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5286. i := len(dAtA)
  5287. _ = i
  5288. var l int
  5289. _ = l
  5290. if m.Index {
  5291. i--
  5292. if m.Index {
  5293. dAtA[i] = 1
  5294. } else {
  5295. dAtA[i] = 0
  5296. }
  5297. i--
  5298. dAtA[i] = 0x18
  5299. }
  5300. if len(m.Value) > 0 {
  5301. i -= len(m.Value)
  5302. copy(dAtA[i:], m.Value)
  5303. i = encodeVarintTypes(dAtA, i, uint64(len(m.Value)))
  5304. i--
  5305. dAtA[i] = 0x12
  5306. }
  5307. if len(m.Key) > 0 {
  5308. i -= len(m.Key)
  5309. copy(dAtA[i:], m.Key)
  5310. i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
  5311. i--
  5312. dAtA[i] = 0xa
  5313. }
  5314. return len(dAtA) - i, nil
  5315. }
  5316. func (m *TxResult) Marshal() (dAtA []byte, err error) {
  5317. size := m.Size()
  5318. dAtA = make([]byte, size)
  5319. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5320. if err != nil {
  5321. return nil, err
  5322. }
  5323. return dAtA[:n], nil
  5324. }
  5325. func (m *TxResult) MarshalTo(dAtA []byte) (int, error) {
  5326. size := m.Size()
  5327. return m.MarshalToSizedBuffer(dAtA[:size])
  5328. }
  5329. func (m *TxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5330. i := len(dAtA)
  5331. _ = i
  5332. var l int
  5333. _ = l
  5334. {
  5335. size, err := m.Result.MarshalToSizedBuffer(dAtA[:i])
  5336. if err != nil {
  5337. return 0, err
  5338. }
  5339. i -= size
  5340. i = encodeVarintTypes(dAtA, i, uint64(size))
  5341. }
  5342. i--
  5343. dAtA[i] = 0x22
  5344. if len(m.Tx) > 0 {
  5345. i -= len(m.Tx)
  5346. copy(dAtA[i:], m.Tx)
  5347. i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx)))
  5348. i--
  5349. dAtA[i] = 0x1a
  5350. }
  5351. if m.Index != 0 {
  5352. i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  5353. i--
  5354. dAtA[i] = 0x10
  5355. }
  5356. if m.Height != 0 {
  5357. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  5358. i--
  5359. dAtA[i] = 0x8
  5360. }
  5361. return len(dAtA) - i, nil
  5362. }
  5363. func (m *Validator) Marshal() (dAtA []byte, err error) {
  5364. size := m.Size()
  5365. dAtA = make([]byte, size)
  5366. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5367. if err != nil {
  5368. return nil, err
  5369. }
  5370. return dAtA[:n], nil
  5371. }
  5372. func (m *Validator) MarshalTo(dAtA []byte) (int, error) {
  5373. size := m.Size()
  5374. return m.MarshalToSizedBuffer(dAtA[:size])
  5375. }
  5376. func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5377. i := len(dAtA)
  5378. _ = i
  5379. var l int
  5380. _ = l
  5381. if m.Power != 0 {
  5382. i = encodeVarintTypes(dAtA, i, uint64(m.Power))
  5383. i--
  5384. dAtA[i] = 0x18
  5385. }
  5386. if len(m.Address) > 0 {
  5387. i -= len(m.Address)
  5388. copy(dAtA[i:], m.Address)
  5389. i = encodeVarintTypes(dAtA, i, uint64(len(m.Address)))
  5390. i--
  5391. dAtA[i] = 0xa
  5392. }
  5393. return len(dAtA) - i, nil
  5394. }
  5395. func (m *ValidatorUpdate) Marshal() (dAtA []byte, err error) {
  5396. size := m.Size()
  5397. dAtA = make([]byte, size)
  5398. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5399. if err != nil {
  5400. return nil, err
  5401. }
  5402. return dAtA[:n], nil
  5403. }
  5404. func (m *ValidatorUpdate) MarshalTo(dAtA []byte) (int, error) {
  5405. size := m.Size()
  5406. return m.MarshalToSizedBuffer(dAtA[:size])
  5407. }
  5408. func (m *ValidatorUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5409. i := len(dAtA)
  5410. _ = i
  5411. var l int
  5412. _ = l
  5413. if m.Power != 0 {
  5414. i = encodeVarintTypes(dAtA, i, uint64(m.Power))
  5415. i--
  5416. dAtA[i] = 0x10
  5417. }
  5418. {
  5419. size, err := m.PubKey.MarshalToSizedBuffer(dAtA[:i])
  5420. if err != nil {
  5421. return 0, err
  5422. }
  5423. i -= size
  5424. i = encodeVarintTypes(dAtA, i, uint64(size))
  5425. }
  5426. i--
  5427. dAtA[i] = 0xa
  5428. return len(dAtA) - i, nil
  5429. }
  5430. func (m *VoteInfo) Marshal() (dAtA []byte, err error) {
  5431. size := m.Size()
  5432. dAtA = make([]byte, size)
  5433. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5434. if err != nil {
  5435. return nil, err
  5436. }
  5437. return dAtA[:n], nil
  5438. }
  5439. func (m *VoteInfo) MarshalTo(dAtA []byte) (int, error) {
  5440. size := m.Size()
  5441. return m.MarshalToSizedBuffer(dAtA[:size])
  5442. }
  5443. func (m *VoteInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5444. i := len(dAtA)
  5445. _ = i
  5446. var l int
  5447. _ = l
  5448. if m.SignedLastBlock {
  5449. i--
  5450. if m.SignedLastBlock {
  5451. dAtA[i] = 1
  5452. } else {
  5453. dAtA[i] = 0
  5454. }
  5455. i--
  5456. dAtA[i] = 0x10
  5457. }
  5458. {
  5459. size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i])
  5460. if err != nil {
  5461. return 0, err
  5462. }
  5463. i -= size
  5464. i = encodeVarintTypes(dAtA, i, uint64(size))
  5465. }
  5466. i--
  5467. dAtA[i] = 0xa
  5468. return len(dAtA) - i, nil
  5469. }
  5470. func (m *Evidence) Marshal() (dAtA []byte, err error) {
  5471. size := m.Size()
  5472. dAtA = make([]byte, size)
  5473. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5474. if err != nil {
  5475. return nil, err
  5476. }
  5477. return dAtA[:n], nil
  5478. }
  5479. func (m *Evidence) MarshalTo(dAtA []byte) (int, error) {
  5480. size := m.Size()
  5481. return m.MarshalToSizedBuffer(dAtA[:size])
  5482. }
  5483. func (m *Evidence) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5484. i := len(dAtA)
  5485. _ = i
  5486. var l int
  5487. _ = l
  5488. if m.TotalVotingPower != 0 {
  5489. i = encodeVarintTypes(dAtA, i, uint64(m.TotalVotingPower))
  5490. i--
  5491. dAtA[i] = 0x28
  5492. }
  5493. n43, err43 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):])
  5494. if err43 != nil {
  5495. return 0, err43
  5496. }
  5497. i -= n43
  5498. i = encodeVarintTypes(dAtA, i, uint64(n43))
  5499. i--
  5500. dAtA[i] = 0x22
  5501. if m.Height != 0 {
  5502. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  5503. i--
  5504. dAtA[i] = 0x18
  5505. }
  5506. {
  5507. size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i])
  5508. if err != nil {
  5509. return 0, err
  5510. }
  5511. i -= size
  5512. i = encodeVarintTypes(dAtA, i, uint64(size))
  5513. }
  5514. i--
  5515. dAtA[i] = 0x12
  5516. if m.Type != 0 {
  5517. i = encodeVarintTypes(dAtA, i, uint64(m.Type))
  5518. i--
  5519. dAtA[i] = 0x8
  5520. }
  5521. return len(dAtA) - i, nil
  5522. }
  5523. func (m *Snapshot) Marshal() (dAtA []byte, err error) {
  5524. size := m.Size()
  5525. dAtA = make([]byte, size)
  5526. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  5527. if err != nil {
  5528. return nil, err
  5529. }
  5530. return dAtA[:n], nil
  5531. }
  5532. func (m *Snapshot) MarshalTo(dAtA []byte) (int, error) {
  5533. size := m.Size()
  5534. return m.MarshalToSizedBuffer(dAtA[:size])
  5535. }
  5536. func (m *Snapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  5537. i := len(dAtA)
  5538. _ = i
  5539. var l int
  5540. _ = l
  5541. if len(m.Metadata) > 0 {
  5542. i -= len(m.Metadata)
  5543. copy(dAtA[i:], m.Metadata)
  5544. i = encodeVarintTypes(dAtA, i, uint64(len(m.Metadata)))
  5545. i--
  5546. dAtA[i] = 0x2a
  5547. }
  5548. if len(m.Hash) > 0 {
  5549. i -= len(m.Hash)
  5550. copy(dAtA[i:], m.Hash)
  5551. i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash)))
  5552. i--
  5553. dAtA[i] = 0x22
  5554. }
  5555. if m.Chunks != 0 {
  5556. i = encodeVarintTypes(dAtA, i, uint64(m.Chunks))
  5557. i--
  5558. dAtA[i] = 0x18
  5559. }
  5560. if m.Format != 0 {
  5561. i = encodeVarintTypes(dAtA, i, uint64(m.Format))
  5562. i--
  5563. dAtA[i] = 0x10
  5564. }
  5565. if m.Height != 0 {
  5566. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  5567. i--
  5568. dAtA[i] = 0x8
  5569. }
  5570. return len(dAtA) - i, nil
  5571. }
  5572. func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
  5573. offset -= sovTypes(v)
  5574. base := offset
  5575. for v >= 1<<7 {
  5576. dAtA[offset] = uint8(v&0x7f | 0x80)
  5577. v >>= 7
  5578. offset++
  5579. }
  5580. dAtA[offset] = uint8(v)
  5581. return base
  5582. }
  5583. func (m *Request) Size() (n int) {
  5584. if m == nil {
  5585. return 0
  5586. }
  5587. var l int
  5588. _ = l
  5589. if m.Value != nil {
  5590. n += m.Value.Size()
  5591. }
  5592. return n
  5593. }
  5594. func (m *Request_Echo) Size() (n int) {
  5595. if m == nil {
  5596. return 0
  5597. }
  5598. var l int
  5599. _ = l
  5600. if m.Echo != nil {
  5601. l = m.Echo.Size()
  5602. n += 1 + l + sovTypes(uint64(l))
  5603. }
  5604. return n
  5605. }
  5606. func (m *Request_Flush) Size() (n int) {
  5607. if m == nil {
  5608. return 0
  5609. }
  5610. var l int
  5611. _ = l
  5612. if m.Flush != nil {
  5613. l = m.Flush.Size()
  5614. n += 1 + l + sovTypes(uint64(l))
  5615. }
  5616. return n
  5617. }
  5618. func (m *Request_Info) Size() (n int) {
  5619. if m == nil {
  5620. return 0
  5621. }
  5622. var l int
  5623. _ = l
  5624. if m.Info != nil {
  5625. l = m.Info.Size()
  5626. n += 1 + l + sovTypes(uint64(l))
  5627. }
  5628. return n
  5629. }
  5630. func (m *Request_InitChain) Size() (n int) {
  5631. if m == nil {
  5632. return 0
  5633. }
  5634. var l int
  5635. _ = l
  5636. if m.InitChain != nil {
  5637. l = m.InitChain.Size()
  5638. n += 1 + l + sovTypes(uint64(l))
  5639. }
  5640. return n
  5641. }
  5642. func (m *Request_Query) Size() (n int) {
  5643. if m == nil {
  5644. return 0
  5645. }
  5646. var l int
  5647. _ = l
  5648. if m.Query != nil {
  5649. l = m.Query.Size()
  5650. n += 1 + l + sovTypes(uint64(l))
  5651. }
  5652. return n
  5653. }
  5654. func (m *Request_BeginBlock) Size() (n int) {
  5655. if m == nil {
  5656. return 0
  5657. }
  5658. var l int
  5659. _ = l
  5660. if m.BeginBlock != nil {
  5661. l = m.BeginBlock.Size()
  5662. n += 1 + l + sovTypes(uint64(l))
  5663. }
  5664. return n
  5665. }
  5666. func (m *Request_CheckTx) Size() (n int) {
  5667. if m == nil {
  5668. return 0
  5669. }
  5670. var l int
  5671. _ = l
  5672. if m.CheckTx != nil {
  5673. l = m.CheckTx.Size()
  5674. n += 1 + l + sovTypes(uint64(l))
  5675. }
  5676. return n
  5677. }
  5678. func (m *Request_DeliverTx) Size() (n int) {
  5679. if m == nil {
  5680. return 0
  5681. }
  5682. var l int
  5683. _ = l
  5684. if m.DeliverTx != nil {
  5685. l = m.DeliverTx.Size()
  5686. n += 1 + l + sovTypes(uint64(l))
  5687. }
  5688. return n
  5689. }
  5690. func (m *Request_EndBlock) Size() (n int) {
  5691. if m == nil {
  5692. return 0
  5693. }
  5694. var l int
  5695. _ = l
  5696. if m.EndBlock != nil {
  5697. l = m.EndBlock.Size()
  5698. n += 1 + l + sovTypes(uint64(l))
  5699. }
  5700. return n
  5701. }
  5702. func (m *Request_Commit) Size() (n int) {
  5703. if m == nil {
  5704. return 0
  5705. }
  5706. var l int
  5707. _ = l
  5708. if m.Commit != nil {
  5709. l = m.Commit.Size()
  5710. n += 1 + l + sovTypes(uint64(l))
  5711. }
  5712. return n
  5713. }
  5714. func (m *Request_ListSnapshots) Size() (n int) {
  5715. if m == nil {
  5716. return 0
  5717. }
  5718. var l int
  5719. _ = l
  5720. if m.ListSnapshots != nil {
  5721. l = m.ListSnapshots.Size()
  5722. n += 1 + l + sovTypes(uint64(l))
  5723. }
  5724. return n
  5725. }
  5726. func (m *Request_OfferSnapshot) Size() (n int) {
  5727. if m == nil {
  5728. return 0
  5729. }
  5730. var l int
  5731. _ = l
  5732. if m.OfferSnapshot != nil {
  5733. l = m.OfferSnapshot.Size()
  5734. n += 1 + l + sovTypes(uint64(l))
  5735. }
  5736. return n
  5737. }
  5738. func (m *Request_LoadSnapshotChunk) Size() (n int) {
  5739. if m == nil {
  5740. return 0
  5741. }
  5742. var l int
  5743. _ = l
  5744. if m.LoadSnapshotChunk != nil {
  5745. l = m.LoadSnapshotChunk.Size()
  5746. n += 1 + l + sovTypes(uint64(l))
  5747. }
  5748. return n
  5749. }
  5750. func (m *Request_ApplySnapshotChunk) Size() (n int) {
  5751. if m == nil {
  5752. return 0
  5753. }
  5754. var l int
  5755. _ = l
  5756. if m.ApplySnapshotChunk != nil {
  5757. l = m.ApplySnapshotChunk.Size()
  5758. n += 1 + l + sovTypes(uint64(l))
  5759. }
  5760. return n
  5761. }
  5762. func (m *RequestEcho) Size() (n int) {
  5763. if m == nil {
  5764. return 0
  5765. }
  5766. var l int
  5767. _ = l
  5768. l = len(m.Message)
  5769. if l > 0 {
  5770. n += 1 + l + sovTypes(uint64(l))
  5771. }
  5772. return n
  5773. }
  5774. func (m *RequestFlush) Size() (n int) {
  5775. if m == nil {
  5776. return 0
  5777. }
  5778. var l int
  5779. _ = l
  5780. return n
  5781. }
  5782. func (m *RequestInfo) Size() (n int) {
  5783. if m == nil {
  5784. return 0
  5785. }
  5786. var l int
  5787. _ = l
  5788. l = len(m.Version)
  5789. if l > 0 {
  5790. n += 1 + l + sovTypes(uint64(l))
  5791. }
  5792. if m.BlockVersion != 0 {
  5793. n += 1 + sovTypes(uint64(m.BlockVersion))
  5794. }
  5795. if m.P2PVersion != 0 {
  5796. n += 1 + sovTypes(uint64(m.P2PVersion))
  5797. }
  5798. l = len(m.AbciVersion)
  5799. if l > 0 {
  5800. n += 1 + l + sovTypes(uint64(l))
  5801. }
  5802. return n
  5803. }
  5804. func (m *RequestInitChain) Size() (n int) {
  5805. if m == nil {
  5806. return 0
  5807. }
  5808. var l int
  5809. _ = l
  5810. l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time)
  5811. n += 1 + l + sovTypes(uint64(l))
  5812. l = len(m.ChainId)
  5813. if l > 0 {
  5814. n += 1 + l + sovTypes(uint64(l))
  5815. }
  5816. if m.ConsensusParams != nil {
  5817. l = m.ConsensusParams.Size()
  5818. n += 1 + l + sovTypes(uint64(l))
  5819. }
  5820. if len(m.Validators) > 0 {
  5821. for _, e := range m.Validators {
  5822. l = e.Size()
  5823. n += 1 + l + sovTypes(uint64(l))
  5824. }
  5825. }
  5826. l = len(m.AppStateBytes)
  5827. if l > 0 {
  5828. n += 1 + l + sovTypes(uint64(l))
  5829. }
  5830. if m.InitialHeight != 0 {
  5831. n += 1 + sovTypes(uint64(m.InitialHeight))
  5832. }
  5833. return n
  5834. }
  5835. func (m *RequestQuery) Size() (n int) {
  5836. if m == nil {
  5837. return 0
  5838. }
  5839. var l int
  5840. _ = l
  5841. l = len(m.Data)
  5842. if l > 0 {
  5843. n += 1 + l + sovTypes(uint64(l))
  5844. }
  5845. l = len(m.Path)
  5846. if l > 0 {
  5847. n += 1 + l + sovTypes(uint64(l))
  5848. }
  5849. if m.Height != 0 {
  5850. n += 1 + sovTypes(uint64(m.Height))
  5851. }
  5852. if m.Prove {
  5853. n += 2
  5854. }
  5855. return n
  5856. }
  5857. func (m *RequestBeginBlock) Size() (n int) {
  5858. if m == nil {
  5859. return 0
  5860. }
  5861. var l int
  5862. _ = l
  5863. l = len(m.Hash)
  5864. if l > 0 {
  5865. n += 1 + l + sovTypes(uint64(l))
  5866. }
  5867. l = m.Header.Size()
  5868. n += 1 + l + sovTypes(uint64(l))
  5869. l = m.LastCommitInfo.Size()
  5870. n += 1 + l + sovTypes(uint64(l))
  5871. if len(m.ByzantineValidators) > 0 {
  5872. for _, e := range m.ByzantineValidators {
  5873. l = e.Size()
  5874. n += 1 + l + sovTypes(uint64(l))
  5875. }
  5876. }
  5877. return n
  5878. }
  5879. func (m *RequestCheckTx) Size() (n int) {
  5880. if m == nil {
  5881. return 0
  5882. }
  5883. var l int
  5884. _ = l
  5885. l = len(m.Tx)
  5886. if l > 0 {
  5887. n += 1 + l + sovTypes(uint64(l))
  5888. }
  5889. if m.Type != 0 {
  5890. n += 1 + sovTypes(uint64(m.Type))
  5891. }
  5892. return n
  5893. }
  5894. func (m *RequestDeliverTx) Size() (n int) {
  5895. if m == nil {
  5896. return 0
  5897. }
  5898. var l int
  5899. _ = l
  5900. l = len(m.Tx)
  5901. if l > 0 {
  5902. n += 1 + l + sovTypes(uint64(l))
  5903. }
  5904. return n
  5905. }
  5906. func (m *RequestEndBlock) Size() (n int) {
  5907. if m == nil {
  5908. return 0
  5909. }
  5910. var l int
  5911. _ = l
  5912. if m.Height != 0 {
  5913. n += 1 + sovTypes(uint64(m.Height))
  5914. }
  5915. return n
  5916. }
  5917. func (m *RequestCommit) Size() (n int) {
  5918. if m == nil {
  5919. return 0
  5920. }
  5921. var l int
  5922. _ = l
  5923. return n
  5924. }
  5925. func (m *RequestListSnapshots) Size() (n int) {
  5926. if m == nil {
  5927. return 0
  5928. }
  5929. var l int
  5930. _ = l
  5931. return n
  5932. }
  5933. func (m *RequestOfferSnapshot) Size() (n int) {
  5934. if m == nil {
  5935. return 0
  5936. }
  5937. var l int
  5938. _ = l
  5939. if m.Snapshot != nil {
  5940. l = m.Snapshot.Size()
  5941. n += 1 + l + sovTypes(uint64(l))
  5942. }
  5943. l = len(m.AppHash)
  5944. if l > 0 {
  5945. n += 1 + l + sovTypes(uint64(l))
  5946. }
  5947. return n
  5948. }
  5949. func (m *RequestLoadSnapshotChunk) Size() (n int) {
  5950. if m == nil {
  5951. return 0
  5952. }
  5953. var l int
  5954. _ = l
  5955. if m.Height != 0 {
  5956. n += 1 + sovTypes(uint64(m.Height))
  5957. }
  5958. if m.Format != 0 {
  5959. n += 1 + sovTypes(uint64(m.Format))
  5960. }
  5961. if m.Chunk != 0 {
  5962. n += 1 + sovTypes(uint64(m.Chunk))
  5963. }
  5964. return n
  5965. }
  5966. func (m *RequestApplySnapshotChunk) Size() (n int) {
  5967. if m == nil {
  5968. return 0
  5969. }
  5970. var l int
  5971. _ = l
  5972. if m.Index != 0 {
  5973. n += 1 + sovTypes(uint64(m.Index))
  5974. }
  5975. l = len(m.Chunk)
  5976. if l > 0 {
  5977. n += 1 + l + sovTypes(uint64(l))
  5978. }
  5979. l = len(m.Sender)
  5980. if l > 0 {
  5981. n += 1 + l + sovTypes(uint64(l))
  5982. }
  5983. return n
  5984. }
  5985. func (m *Response) Size() (n int) {
  5986. if m == nil {
  5987. return 0
  5988. }
  5989. var l int
  5990. _ = l
  5991. if m.Value != nil {
  5992. n += m.Value.Size()
  5993. }
  5994. return n
  5995. }
  5996. func (m *Response_Exception) Size() (n int) {
  5997. if m == nil {
  5998. return 0
  5999. }
  6000. var l int
  6001. _ = l
  6002. if m.Exception != nil {
  6003. l = m.Exception.Size()
  6004. n += 1 + l + sovTypes(uint64(l))
  6005. }
  6006. return n
  6007. }
  6008. func (m *Response_Echo) Size() (n int) {
  6009. if m == nil {
  6010. return 0
  6011. }
  6012. var l int
  6013. _ = l
  6014. if m.Echo != nil {
  6015. l = m.Echo.Size()
  6016. n += 1 + l + sovTypes(uint64(l))
  6017. }
  6018. return n
  6019. }
  6020. func (m *Response_Flush) Size() (n int) {
  6021. if m == nil {
  6022. return 0
  6023. }
  6024. var l int
  6025. _ = l
  6026. if m.Flush != nil {
  6027. l = m.Flush.Size()
  6028. n += 1 + l + sovTypes(uint64(l))
  6029. }
  6030. return n
  6031. }
  6032. func (m *Response_Info) Size() (n int) {
  6033. if m == nil {
  6034. return 0
  6035. }
  6036. var l int
  6037. _ = l
  6038. if m.Info != nil {
  6039. l = m.Info.Size()
  6040. n += 1 + l + sovTypes(uint64(l))
  6041. }
  6042. return n
  6043. }
  6044. func (m *Response_InitChain) Size() (n int) {
  6045. if m == nil {
  6046. return 0
  6047. }
  6048. var l int
  6049. _ = l
  6050. if m.InitChain != nil {
  6051. l = m.InitChain.Size()
  6052. n += 1 + l + sovTypes(uint64(l))
  6053. }
  6054. return n
  6055. }
  6056. func (m *Response_Query) Size() (n int) {
  6057. if m == nil {
  6058. return 0
  6059. }
  6060. var l int
  6061. _ = l
  6062. if m.Query != nil {
  6063. l = m.Query.Size()
  6064. n += 1 + l + sovTypes(uint64(l))
  6065. }
  6066. return n
  6067. }
  6068. func (m *Response_BeginBlock) Size() (n int) {
  6069. if m == nil {
  6070. return 0
  6071. }
  6072. var l int
  6073. _ = l
  6074. if m.BeginBlock != nil {
  6075. l = m.BeginBlock.Size()
  6076. n += 1 + l + sovTypes(uint64(l))
  6077. }
  6078. return n
  6079. }
  6080. func (m *Response_CheckTx) Size() (n int) {
  6081. if m == nil {
  6082. return 0
  6083. }
  6084. var l int
  6085. _ = l
  6086. if m.CheckTx != nil {
  6087. l = m.CheckTx.Size()
  6088. n += 1 + l + sovTypes(uint64(l))
  6089. }
  6090. return n
  6091. }
  6092. func (m *Response_DeliverTx) Size() (n int) {
  6093. if m == nil {
  6094. return 0
  6095. }
  6096. var l int
  6097. _ = l
  6098. if m.DeliverTx != nil {
  6099. l = m.DeliverTx.Size()
  6100. n += 1 + l + sovTypes(uint64(l))
  6101. }
  6102. return n
  6103. }
  6104. func (m *Response_EndBlock) Size() (n int) {
  6105. if m == nil {
  6106. return 0
  6107. }
  6108. var l int
  6109. _ = l
  6110. if m.EndBlock != nil {
  6111. l = m.EndBlock.Size()
  6112. n += 1 + l + sovTypes(uint64(l))
  6113. }
  6114. return n
  6115. }
  6116. func (m *Response_Commit) Size() (n int) {
  6117. if m == nil {
  6118. return 0
  6119. }
  6120. var l int
  6121. _ = l
  6122. if m.Commit != nil {
  6123. l = m.Commit.Size()
  6124. n += 1 + l + sovTypes(uint64(l))
  6125. }
  6126. return n
  6127. }
  6128. func (m *Response_ListSnapshots) Size() (n int) {
  6129. if m == nil {
  6130. return 0
  6131. }
  6132. var l int
  6133. _ = l
  6134. if m.ListSnapshots != nil {
  6135. l = m.ListSnapshots.Size()
  6136. n += 1 + l + sovTypes(uint64(l))
  6137. }
  6138. return n
  6139. }
  6140. func (m *Response_OfferSnapshot) Size() (n int) {
  6141. if m == nil {
  6142. return 0
  6143. }
  6144. var l int
  6145. _ = l
  6146. if m.OfferSnapshot != nil {
  6147. l = m.OfferSnapshot.Size()
  6148. n += 1 + l + sovTypes(uint64(l))
  6149. }
  6150. return n
  6151. }
  6152. func (m *Response_LoadSnapshotChunk) Size() (n int) {
  6153. if m == nil {
  6154. return 0
  6155. }
  6156. var l int
  6157. _ = l
  6158. if m.LoadSnapshotChunk != nil {
  6159. l = m.LoadSnapshotChunk.Size()
  6160. n += 1 + l + sovTypes(uint64(l))
  6161. }
  6162. return n
  6163. }
  6164. func (m *Response_ApplySnapshotChunk) Size() (n int) {
  6165. if m == nil {
  6166. return 0
  6167. }
  6168. var l int
  6169. _ = l
  6170. if m.ApplySnapshotChunk != nil {
  6171. l = m.ApplySnapshotChunk.Size()
  6172. n += 1 + l + sovTypes(uint64(l))
  6173. }
  6174. return n
  6175. }
  6176. func (m *ResponseException) Size() (n int) {
  6177. if m == nil {
  6178. return 0
  6179. }
  6180. var l int
  6181. _ = l
  6182. l = len(m.Error)
  6183. if l > 0 {
  6184. n += 1 + l + sovTypes(uint64(l))
  6185. }
  6186. return n
  6187. }
  6188. func (m *ResponseEcho) Size() (n int) {
  6189. if m == nil {
  6190. return 0
  6191. }
  6192. var l int
  6193. _ = l
  6194. l = len(m.Message)
  6195. if l > 0 {
  6196. n += 1 + l + sovTypes(uint64(l))
  6197. }
  6198. return n
  6199. }
  6200. func (m *ResponseFlush) Size() (n int) {
  6201. if m == nil {
  6202. return 0
  6203. }
  6204. var l int
  6205. _ = l
  6206. return n
  6207. }
  6208. func (m *ResponseInfo) Size() (n int) {
  6209. if m == nil {
  6210. return 0
  6211. }
  6212. var l int
  6213. _ = l
  6214. l = len(m.Data)
  6215. if l > 0 {
  6216. n += 1 + l + sovTypes(uint64(l))
  6217. }
  6218. l = len(m.Version)
  6219. if l > 0 {
  6220. n += 1 + l + sovTypes(uint64(l))
  6221. }
  6222. if m.AppVersion != 0 {
  6223. n += 1 + sovTypes(uint64(m.AppVersion))
  6224. }
  6225. if m.LastBlockHeight != 0 {
  6226. n += 1 + sovTypes(uint64(m.LastBlockHeight))
  6227. }
  6228. l = len(m.LastBlockAppHash)
  6229. if l > 0 {
  6230. n += 1 + l + sovTypes(uint64(l))
  6231. }
  6232. return n
  6233. }
  6234. func (m *ResponseInitChain) Size() (n int) {
  6235. if m == nil {
  6236. return 0
  6237. }
  6238. var l int
  6239. _ = l
  6240. if m.ConsensusParams != nil {
  6241. l = m.ConsensusParams.Size()
  6242. n += 1 + l + sovTypes(uint64(l))
  6243. }
  6244. if len(m.Validators) > 0 {
  6245. for _, e := range m.Validators {
  6246. l = e.Size()
  6247. n += 1 + l + sovTypes(uint64(l))
  6248. }
  6249. }
  6250. l = len(m.AppHash)
  6251. if l > 0 {
  6252. n += 1 + l + sovTypes(uint64(l))
  6253. }
  6254. return n
  6255. }
  6256. func (m *ResponseQuery) Size() (n int) {
  6257. if m == nil {
  6258. return 0
  6259. }
  6260. var l int
  6261. _ = l
  6262. if m.Code != 0 {
  6263. n += 1 + sovTypes(uint64(m.Code))
  6264. }
  6265. l = len(m.Log)
  6266. if l > 0 {
  6267. n += 1 + l + sovTypes(uint64(l))
  6268. }
  6269. l = len(m.Info)
  6270. if l > 0 {
  6271. n += 1 + l + sovTypes(uint64(l))
  6272. }
  6273. if m.Index != 0 {
  6274. n += 1 + sovTypes(uint64(m.Index))
  6275. }
  6276. l = len(m.Key)
  6277. if l > 0 {
  6278. n += 1 + l + sovTypes(uint64(l))
  6279. }
  6280. l = len(m.Value)
  6281. if l > 0 {
  6282. n += 1 + l + sovTypes(uint64(l))
  6283. }
  6284. if m.ProofOps != nil {
  6285. l = m.ProofOps.Size()
  6286. n += 1 + l + sovTypes(uint64(l))
  6287. }
  6288. if m.Height != 0 {
  6289. n += 1 + sovTypes(uint64(m.Height))
  6290. }
  6291. l = len(m.Codespace)
  6292. if l > 0 {
  6293. n += 1 + l + sovTypes(uint64(l))
  6294. }
  6295. return n
  6296. }
  6297. func (m *ResponseBeginBlock) Size() (n int) {
  6298. if m == nil {
  6299. return 0
  6300. }
  6301. var l int
  6302. _ = l
  6303. if len(m.Events) > 0 {
  6304. for _, e := range m.Events {
  6305. l = e.Size()
  6306. n += 1 + l + sovTypes(uint64(l))
  6307. }
  6308. }
  6309. return n
  6310. }
  6311. func (m *ResponseCheckTx) Size() (n int) {
  6312. if m == nil {
  6313. return 0
  6314. }
  6315. var l int
  6316. _ = l
  6317. if m.Code != 0 {
  6318. n += 1 + sovTypes(uint64(m.Code))
  6319. }
  6320. l = len(m.Data)
  6321. if l > 0 {
  6322. n += 1 + l + sovTypes(uint64(l))
  6323. }
  6324. l = len(m.Log)
  6325. if l > 0 {
  6326. n += 1 + l + sovTypes(uint64(l))
  6327. }
  6328. l = len(m.Info)
  6329. if l > 0 {
  6330. n += 1 + l + sovTypes(uint64(l))
  6331. }
  6332. if m.GasWanted != 0 {
  6333. n += 1 + sovTypes(uint64(m.GasWanted))
  6334. }
  6335. if m.GasUsed != 0 {
  6336. n += 1 + sovTypes(uint64(m.GasUsed))
  6337. }
  6338. if len(m.Events) > 0 {
  6339. for _, e := range m.Events {
  6340. l = e.Size()
  6341. n += 1 + l + sovTypes(uint64(l))
  6342. }
  6343. }
  6344. l = len(m.Codespace)
  6345. if l > 0 {
  6346. n += 1 + l + sovTypes(uint64(l))
  6347. }
  6348. l = len(m.Sender)
  6349. if l > 0 {
  6350. n += 1 + l + sovTypes(uint64(l))
  6351. }
  6352. if m.Priority != 0 {
  6353. n += 1 + sovTypes(uint64(m.Priority))
  6354. }
  6355. l = len(m.MempoolError)
  6356. if l > 0 {
  6357. n += 1 + l + sovTypes(uint64(l))
  6358. }
  6359. return n
  6360. }
  6361. func (m *ResponseDeliverTx) Size() (n int) {
  6362. if m == nil {
  6363. return 0
  6364. }
  6365. var l int
  6366. _ = l
  6367. if m.Code != 0 {
  6368. n += 1 + sovTypes(uint64(m.Code))
  6369. }
  6370. l = len(m.Data)
  6371. if l > 0 {
  6372. n += 1 + l + sovTypes(uint64(l))
  6373. }
  6374. l = len(m.Log)
  6375. if l > 0 {
  6376. n += 1 + l + sovTypes(uint64(l))
  6377. }
  6378. l = len(m.Info)
  6379. if l > 0 {
  6380. n += 1 + l + sovTypes(uint64(l))
  6381. }
  6382. if m.GasWanted != 0 {
  6383. n += 1 + sovTypes(uint64(m.GasWanted))
  6384. }
  6385. if m.GasUsed != 0 {
  6386. n += 1 + sovTypes(uint64(m.GasUsed))
  6387. }
  6388. if len(m.Events) > 0 {
  6389. for _, e := range m.Events {
  6390. l = e.Size()
  6391. n += 1 + l + sovTypes(uint64(l))
  6392. }
  6393. }
  6394. l = len(m.Codespace)
  6395. if l > 0 {
  6396. n += 1 + l + sovTypes(uint64(l))
  6397. }
  6398. return n
  6399. }
  6400. func (m *ResponseEndBlock) Size() (n int) {
  6401. if m == nil {
  6402. return 0
  6403. }
  6404. var l int
  6405. _ = l
  6406. if len(m.ValidatorUpdates) > 0 {
  6407. for _, e := range m.ValidatorUpdates {
  6408. l = e.Size()
  6409. n += 1 + l + sovTypes(uint64(l))
  6410. }
  6411. }
  6412. if m.ConsensusParamUpdates != nil {
  6413. l = m.ConsensusParamUpdates.Size()
  6414. n += 1 + l + sovTypes(uint64(l))
  6415. }
  6416. if len(m.Events) > 0 {
  6417. for _, e := range m.Events {
  6418. l = e.Size()
  6419. n += 1 + l + sovTypes(uint64(l))
  6420. }
  6421. }
  6422. return n
  6423. }
  6424. func (m *ResponseCommit) Size() (n int) {
  6425. if m == nil {
  6426. return 0
  6427. }
  6428. var l int
  6429. _ = l
  6430. l = len(m.Data)
  6431. if l > 0 {
  6432. n += 1 + l + sovTypes(uint64(l))
  6433. }
  6434. if m.RetainHeight != 0 {
  6435. n += 1 + sovTypes(uint64(m.RetainHeight))
  6436. }
  6437. return n
  6438. }
  6439. func (m *ResponseListSnapshots) Size() (n int) {
  6440. if m == nil {
  6441. return 0
  6442. }
  6443. var l int
  6444. _ = l
  6445. if len(m.Snapshots) > 0 {
  6446. for _, e := range m.Snapshots {
  6447. l = e.Size()
  6448. n += 1 + l + sovTypes(uint64(l))
  6449. }
  6450. }
  6451. return n
  6452. }
  6453. func (m *ResponseOfferSnapshot) Size() (n int) {
  6454. if m == nil {
  6455. return 0
  6456. }
  6457. var l int
  6458. _ = l
  6459. if m.Result != 0 {
  6460. n += 1 + sovTypes(uint64(m.Result))
  6461. }
  6462. return n
  6463. }
  6464. func (m *ResponseLoadSnapshotChunk) Size() (n int) {
  6465. if m == nil {
  6466. return 0
  6467. }
  6468. var l int
  6469. _ = l
  6470. l = len(m.Chunk)
  6471. if l > 0 {
  6472. n += 1 + l + sovTypes(uint64(l))
  6473. }
  6474. return n
  6475. }
  6476. func (m *ResponseApplySnapshotChunk) Size() (n int) {
  6477. if m == nil {
  6478. return 0
  6479. }
  6480. var l int
  6481. _ = l
  6482. if m.Result != 0 {
  6483. n += 1 + sovTypes(uint64(m.Result))
  6484. }
  6485. if len(m.RefetchChunks) > 0 {
  6486. l = 0
  6487. for _, e := range m.RefetchChunks {
  6488. l += sovTypes(uint64(e))
  6489. }
  6490. n += 1 + sovTypes(uint64(l)) + l
  6491. }
  6492. if len(m.RejectSenders) > 0 {
  6493. for _, s := range m.RejectSenders {
  6494. l = len(s)
  6495. n += 1 + l + sovTypes(uint64(l))
  6496. }
  6497. }
  6498. return n
  6499. }
  6500. func (m *LastCommitInfo) Size() (n int) {
  6501. if m == nil {
  6502. return 0
  6503. }
  6504. var l int
  6505. _ = l
  6506. if m.Round != 0 {
  6507. n += 1 + sovTypes(uint64(m.Round))
  6508. }
  6509. if len(m.Votes) > 0 {
  6510. for _, e := range m.Votes {
  6511. l = e.Size()
  6512. n += 1 + l + sovTypes(uint64(l))
  6513. }
  6514. }
  6515. return n
  6516. }
  6517. func (m *Event) Size() (n int) {
  6518. if m == nil {
  6519. return 0
  6520. }
  6521. var l int
  6522. _ = l
  6523. l = len(m.Type)
  6524. if l > 0 {
  6525. n += 1 + l + sovTypes(uint64(l))
  6526. }
  6527. if len(m.Attributes) > 0 {
  6528. for _, e := range m.Attributes {
  6529. l = e.Size()
  6530. n += 1 + l + sovTypes(uint64(l))
  6531. }
  6532. }
  6533. return n
  6534. }
  6535. func (m *EventAttribute) Size() (n int) {
  6536. if m == nil {
  6537. return 0
  6538. }
  6539. var l int
  6540. _ = l
  6541. l = len(m.Key)
  6542. if l > 0 {
  6543. n += 1 + l + sovTypes(uint64(l))
  6544. }
  6545. l = len(m.Value)
  6546. if l > 0 {
  6547. n += 1 + l + sovTypes(uint64(l))
  6548. }
  6549. if m.Index {
  6550. n += 2
  6551. }
  6552. return n
  6553. }
  6554. func (m *TxResult) Size() (n int) {
  6555. if m == nil {
  6556. return 0
  6557. }
  6558. var l int
  6559. _ = l
  6560. if m.Height != 0 {
  6561. n += 1 + sovTypes(uint64(m.Height))
  6562. }
  6563. if m.Index != 0 {
  6564. n += 1 + sovTypes(uint64(m.Index))
  6565. }
  6566. l = len(m.Tx)
  6567. if l > 0 {
  6568. n += 1 + l + sovTypes(uint64(l))
  6569. }
  6570. l = m.Result.Size()
  6571. n += 1 + l + sovTypes(uint64(l))
  6572. return n
  6573. }
  6574. func (m *Validator) Size() (n int) {
  6575. if m == nil {
  6576. return 0
  6577. }
  6578. var l int
  6579. _ = l
  6580. l = len(m.Address)
  6581. if l > 0 {
  6582. n += 1 + l + sovTypes(uint64(l))
  6583. }
  6584. if m.Power != 0 {
  6585. n += 1 + sovTypes(uint64(m.Power))
  6586. }
  6587. return n
  6588. }
  6589. func (m *ValidatorUpdate) Size() (n int) {
  6590. if m == nil {
  6591. return 0
  6592. }
  6593. var l int
  6594. _ = l
  6595. l = m.PubKey.Size()
  6596. n += 1 + l + sovTypes(uint64(l))
  6597. if m.Power != 0 {
  6598. n += 1 + sovTypes(uint64(m.Power))
  6599. }
  6600. return n
  6601. }
  6602. func (m *VoteInfo) Size() (n int) {
  6603. if m == nil {
  6604. return 0
  6605. }
  6606. var l int
  6607. _ = l
  6608. l = m.Validator.Size()
  6609. n += 1 + l + sovTypes(uint64(l))
  6610. if m.SignedLastBlock {
  6611. n += 2
  6612. }
  6613. return n
  6614. }
  6615. func (m *Evidence) Size() (n int) {
  6616. if m == nil {
  6617. return 0
  6618. }
  6619. var l int
  6620. _ = l
  6621. if m.Type != 0 {
  6622. n += 1 + sovTypes(uint64(m.Type))
  6623. }
  6624. l = m.Validator.Size()
  6625. n += 1 + l + sovTypes(uint64(l))
  6626. if m.Height != 0 {
  6627. n += 1 + sovTypes(uint64(m.Height))
  6628. }
  6629. l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time)
  6630. n += 1 + l + sovTypes(uint64(l))
  6631. if m.TotalVotingPower != 0 {
  6632. n += 1 + sovTypes(uint64(m.TotalVotingPower))
  6633. }
  6634. return n
  6635. }
  6636. func (m *Snapshot) Size() (n int) {
  6637. if m == nil {
  6638. return 0
  6639. }
  6640. var l int
  6641. _ = l
  6642. if m.Height != 0 {
  6643. n += 1 + sovTypes(uint64(m.Height))
  6644. }
  6645. if m.Format != 0 {
  6646. n += 1 + sovTypes(uint64(m.Format))
  6647. }
  6648. if m.Chunks != 0 {
  6649. n += 1 + sovTypes(uint64(m.Chunks))
  6650. }
  6651. l = len(m.Hash)
  6652. if l > 0 {
  6653. n += 1 + l + sovTypes(uint64(l))
  6654. }
  6655. l = len(m.Metadata)
  6656. if l > 0 {
  6657. n += 1 + l + sovTypes(uint64(l))
  6658. }
  6659. return n
  6660. }
  6661. func sovTypes(x uint64) (n int) {
  6662. return (math_bits.Len64(x|1) + 6) / 7
  6663. }
  6664. func sozTypes(x uint64) (n int) {
  6665. return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  6666. }
  6667. func (m *Request) Unmarshal(dAtA []byte) error {
  6668. l := len(dAtA)
  6669. iNdEx := 0
  6670. for iNdEx < l {
  6671. preIndex := iNdEx
  6672. var wire uint64
  6673. for shift := uint(0); ; shift += 7 {
  6674. if shift >= 64 {
  6675. return ErrIntOverflowTypes
  6676. }
  6677. if iNdEx >= l {
  6678. return io.ErrUnexpectedEOF
  6679. }
  6680. b := dAtA[iNdEx]
  6681. iNdEx++
  6682. wire |= uint64(b&0x7F) << shift
  6683. if b < 0x80 {
  6684. break
  6685. }
  6686. }
  6687. fieldNum := int32(wire >> 3)
  6688. wireType := int(wire & 0x7)
  6689. if wireType == 4 {
  6690. return fmt.Errorf("proto: Request: wiretype end group for non-group")
  6691. }
  6692. if fieldNum <= 0 {
  6693. return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire)
  6694. }
  6695. switch fieldNum {
  6696. case 1:
  6697. if wireType != 2 {
  6698. return fmt.Errorf("proto: wrong wireType = %d for field Echo", wireType)
  6699. }
  6700. var msglen int
  6701. for shift := uint(0); ; shift += 7 {
  6702. if shift >= 64 {
  6703. return ErrIntOverflowTypes
  6704. }
  6705. if iNdEx >= l {
  6706. return io.ErrUnexpectedEOF
  6707. }
  6708. b := dAtA[iNdEx]
  6709. iNdEx++
  6710. msglen |= int(b&0x7F) << shift
  6711. if b < 0x80 {
  6712. break
  6713. }
  6714. }
  6715. if msglen < 0 {
  6716. return ErrInvalidLengthTypes
  6717. }
  6718. postIndex := iNdEx + msglen
  6719. if postIndex < 0 {
  6720. return ErrInvalidLengthTypes
  6721. }
  6722. if postIndex > l {
  6723. return io.ErrUnexpectedEOF
  6724. }
  6725. v := &RequestEcho{}
  6726. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6727. return err
  6728. }
  6729. m.Value = &Request_Echo{v}
  6730. iNdEx = postIndex
  6731. case 2:
  6732. if wireType != 2 {
  6733. return fmt.Errorf("proto: wrong wireType = %d for field Flush", wireType)
  6734. }
  6735. var msglen int
  6736. for shift := uint(0); ; shift += 7 {
  6737. if shift >= 64 {
  6738. return ErrIntOverflowTypes
  6739. }
  6740. if iNdEx >= l {
  6741. return io.ErrUnexpectedEOF
  6742. }
  6743. b := dAtA[iNdEx]
  6744. iNdEx++
  6745. msglen |= int(b&0x7F) << shift
  6746. if b < 0x80 {
  6747. break
  6748. }
  6749. }
  6750. if msglen < 0 {
  6751. return ErrInvalidLengthTypes
  6752. }
  6753. postIndex := iNdEx + msglen
  6754. if postIndex < 0 {
  6755. return ErrInvalidLengthTypes
  6756. }
  6757. if postIndex > l {
  6758. return io.ErrUnexpectedEOF
  6759. }
  6760. v := &RequestFlush{}
  6761. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6762. return err
  6763. }
  6764. m.Value = &Request_Flush{v}
  6765. iNdEx = postIndex
  6766. case 3:
  6767. if wireType != 2 {
  6768. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  6769. }
  6770. var msglen int
  6771. for shift := uint(0); ; shift += 7 {
  6772. if shift >= 64 {
  6773. return ErrIntOverflowTypes
  6774. }
  6775. if iNdEx >= l {
  6776. return io.ErrUnexpectedEOF
  6777. }
  6778. b := dAtA[iNdEx]
  6779. iNdEx++
  6780. msglen |= int(b&0x7F) << shift
  6781. if b < 0x80 {
  6782. break
  6783. }
  6784. }
  6785. if msglen < 0 {
  6786. return ErrInvalidLengthTypes
  6787. }
  6788. postIndex := iNdEx + msglen
  6789. if postIndex < 0 {
  6790. return ErrInvalidLengthTypes
  6791. }
  6792. if postIndex > l {
  6793. return io.ErrUnexpectedEOF
  6794. }
  6795. v := &RequestInfo{}
  6796. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6797. return err
  6798. }
  6799. m.Value = &Request_Info{v}
  6800. iNdEx = postIndex
  6801. case 4:
  6802. if wireType != 2 {
  6803. return fmt.Errorf("proto: wrong wireType = %d for field InitChain", wireType)
  6804. }
  6805. var msglen int
  6806. for shift := uint(0); ; shift += 7 {
  6807. if shift >= 64 {
  6808. return ErrIntOverflowTypes
  6809. }
  6810. if iNdEx >= l {
  6811. return io.ErrUnexpectedEOF
  6812. }
  6813. b := dAtA[iNdEx]
  6814. iNdEx++
  6815. msglen |= int(b&0x7F) << shift
  6816. if b < 0x80 {
  6817. break
  6818. }
  6819. }
  6820. if msglen < 0 {
  6821. return ErrInvalidLengthTypes
  6822. }
  6823. postIndex := iNdEx + msglen
  6824. if postIndex < 0 {
  6825. return ErrInvalidLengthTypes
  6826. }
  6827. if postIndex > l {
  6828. return io.ErrUnexpectedEOF
  6829. }
  6830. v := &RequestInitChain{}
  6831. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6832. return err
  6833. }
  6834. m.Value = &Request_InitChain{v}
  6835. iNdEx = postIndex
  6836. case 5:
  6837. if wireType != 2 {
  6838. return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType)
  6839. }
  6840. var msglen int
  6841. for shift := uint(0); ; shift += 7 {
  6842. if shift >= 64 {
  6843. return ErrIntOverflowTypes
  6844. }
  6845. if iNdEx >= l {
  6846. return io.ErrUnexpectedEOF
  6847. }
  6848. b := dAtA[iNdEx]
  6849. iNdEx++
  6850. msglen |= int(b&0x7F) << shift
  6851. if b < 0x80 {
  6852. break
  6853. }
  6854. }
  6855. if msglen < 0 {
  6856. return ErrInvalidLengthTypes
  6857. }
  6858. postIndex := iNdEx + msglen
  6859. if postIndex < 0 {
  6860. return ErrInvalidLengthTypes
  6861. }
  6862. if postIndex > l {
  6863. return io.ErrUnexpectedEOF
  6864. }
  6865. v := &RequestQuery{}
  6866. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6867. return err
  6868. }
  6869. m.Value = &Request_Query{v}
  6870. iNdEx = postIndex
  6871. case 6:
  6872. if wireType != 2 {
  6873. return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", wireType)
  6874. }
  6875. var msglen int
  6876. for shift := uint(0); ; shift += 7 {
  6877. if shift >= 64 {
  6878. return ErrIntOverflowTypes
  6879. }
  6880. if iNdEx >= l {
  6881. return io.ErrUnexpectedEOF
  6882. }
  6883. b := dAtA[iNdEx]
  6884. iNdEx++
  6885. msglen |= int(b&0x7F) << shift
  6886. if b < 0x80 {
  6887. break
  6888. }
  6889. }
  6890. if msglen < 0 {
  6891. return ErrInvalidLengthTypes
  6892. }
  6893. postIndex := iNdEx + msglen
  6894. if postIndex < 0 {
  6895. return ErrInvalidLengthTypes
  6896. }
  6897. if postIndex > l {
  6898. return io.ErrUnexpectedEOF
  6899. }
  6900. v := &RequestBeginBlock{}
  6901. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6902. return err
  6903. }
  6904. m.Value = &Request_BeginBlock{v}
  6905. iNdEx = postIndex
  6906. case 7:
  6907. if wireType != 2 {
  6908. return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType)
  6909. }
  6910. var msglen int
  6911. for shift := uint(0); ; shift += 7 {
  6912. if shift >= 64 {
  6913. return ErrIntOverflowTypes
  6914. }
  6915. if iNdEx >= l {
  6916. return io.ErrUnexpectedEOF
  6917. }
  6918. b := dAtA[iNdEx]
  6919. iNdEx++
  6920. msglen |= int(b&0x7F) << shift
  6921. if b < 0x80 {
  6922. break
  6923. }
  6924. }
  6925. if msglen < 0 {
  6926. return ErrInvalidLengthTypes
  6927. }
  6928. postIndex := iNdEx + msglen
  6929. if postIndex < 0 {
  6930. return ErrInvalidLengthTypes
  6931. }
  6932. if postIndex > l {
  6933. return io.ErrUnexpectedEOF
  6934. }
  6935. v := &RequestCheckTx{}
  6936. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6937. return err
  6938. }
  6939. m.Value = &Request_CheckTx{v}
  6940. iNdEx = postIndex
  6941. case 8:
  6942. if wireType != 2 {
  6943. return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", wireType)
  6944. }
  6945. var msglen int
  6946. for shift := uint(0); ; shift += 7 {
  6947. if shift >= 64 {
  6948. return ErrIntOverflowTypes
  6949. }
  6950. if iNdEx >= l {
  6951. return io.ErrUnexpectedEOF
  6952. }
  6953. b := dAtA[iNdEx]
  6954. iNdEx++
  6955. msglen |= int(b&0x7F) << shift
  6956. if b < 0x80 {
  6957. break
  6958. }
  6959. }
  6960. if msglen < 0 {
  6961. return ErrInvalidLengthTypes
  6962. }
  6963. postIndex := iNdEx + msglen
  6964. if postIndex < 0 {
  6965. return ErrInvalidLengthTypes
  6966. }
  6967. if postIndex > l {
  6968. return io.ErrUnexpectedEOF
  6969. }
  6970. v := &RequestDeliverTx{}
  6971. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6972. return err
  6973. }
  6974. m.Value = &Request_DeliverTx{v}
  6975. iNdEx = postIndex
  6976. case 9:
  6977. if wireType != 2 {
  6978. return fmt.Errorf("proto: wrong wireType = %d for field EndBlock", wireType)
  6979. }
  6980. var msglen int
  6981. for shift := uint(0); ; shift += 7 {
  6982. if shift >= 64 {
  6983. return ErrIntOverflowTypes
  6984. }
  6985. if iNdEx >= l {
  6986. return io.ErrUnexpectedEOF
  6987. }
  6988. b := dAtA[iNdEx]
  6989. iNdEx++
  6990. msglen |= int(b&0x7F) << shift
  6991. if b < 0x80 {
  6992. break
  6993. }
  6994. }
  6995. if msglen < 0 {
  6996. return ErrInvalidLengthTypes
  6997. }
  6998. postIndex := iNdEx + msglen
  6999. if postIndex < 0 {
  7000. return ErrInvalidLengthTypes
  7001. }
  7002. if postIndex > l {
  7003. return io.ErrUnexpectedEOF
  7004. }
  7005. v := &RequestEndBlock{}
  7006. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7007. return err
  7008. }
  7009. m.Value = &Request_EndBlock{v}
  7010. iNdEx = postIndex
  7011. case 10:
  7012. if wireType != 2 {
  7013. return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType)
  7014. }
  7015. var msglen int
  7016. for shift := uint(0); ; shift += 7 {
  7017. if shift >= 64 {
  7018. return ErrIntOverflowTypes
  7019. }
  7020. if iNdEx >= l {
  7021. return io.ErrUnexpectedEOF
  7022. }
  7023. b := dAtA[iNdEx]
  7024. iNdEx++
  7025. msglen |= int(b&0x7F) << shift
  7026. if b < 0x80 {
  7027. break
  7028. }
  7029. }
  7030. if msglen < 0 {
  7031. return ErrInvalidLengthTypes
  7032. }
  7033. postIndex := iNdEx + msglen
  7034. if postIndex < 0 {
  7035. return ErrInvalidLengthTypes
  7036. }
  7037. if postIndex > l {
  7038. return io.ErrUnexpectedEOF
  7039. }
  7040. v := &RequestCommit{}
  7041. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7042. return err
  7043. }
  7044. m.Value = &Request_Commit{v}
  7045. iNdEx = postIndex
  7046. case 11:
  7047. if wireType != 2 {
  7048. return fmt.Errorf("proto: wrong wireType = %d for field ListSnapshots", wireType)
  7049. }
  7050. var msglen int
  7051. for shift := uint(0); ; shift += 7 {
  7052. if shift >= 64 {
  7053. return ErrIntOverflowTypes
  7054. }
  7055. if iNdEx >= l {
  7056. return io.ErrUnexpectedEOF
  7057. }
  7058. b := dAtA[iNdEx]
  7059. iNdEx++
  7060. msglen |= int(b&0x7F) << shift
  7061. if b < 0x80 {
  7062. break
  7063. }
  7064. }
  7065. if msglen < 0 {
  7066. return ErrInvalidLengthTypes
  7067. }
  7068. postIndex := iNdEx + msglen
  7069. if postIndex < 0 {
  7070. return ErrInvalidLengthTypes
  7071. }
  7072. if postIndex > l {
  7073. return io.ErrUnexpectedEOF
  7074. }
  7075. v := &RequestListSnapshots{}
  7076. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7077. return err
  7078. }
  7079. m.Value = &Request_ListSnapshots{v}
  7080. iNdEx = postIndex
  7081. case 12:
  7082. if wireType != 2 {
  7083. return fmt.Errorf("proto: wrong wireType = %d for field OfferSnapshot", wireType)
  7084. }
  7085. var msglen int
  7086. for shift := uint(0); ; shift += 7 {
  7087. if shift >= 64 {
  7088. return ErrIntOverflowTypes
  7089. }
  7090. if iNdEx >= l {
  7091. return io.ErrUnexpectedEOF
  7092. }
  7093. b := dAtA[iNdEx]
  7094. iNdEx++
  7095. msglen |= int(b&0x7F) << shift
  7096. if b < 0x80 {
  7097. break
  7098. }
  7099. }
  7100. if msglen < 0 {
  7101. return ErrInvalidLengthTypes
  7102. }
  7103. postIndex := iNdEx + msglen
  7104. if postIndex < 0 {
  7105. return ErrInvalidLengthTypes
  7106. }
  7107. if postIndex > l {
  7108. return io.ErrUnexpectedEOF
  7109. }
  7110. v := &RequestOfferSnapshot{}
  7111. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7112. return err
  7113. }
  7114. m.Value = &Request_OfferSnapshot{v}
  7115. iNdEx = postIndex
  7116. case 13:
  7117. if wireType != 2 {
  7118. return fmt.Errorf("proto: wrong wireType = %d for field LoadSnapshotChunk", wireType)
  7119. }
  7120. var msglen int
  7121. for shift := uint(0); ; shift += 7 {
  7122. if shift >= 64 {
  7123. return ErrIntOverflowTypes
  7124. }
  7125. if iNdEx >= l {
  7126. return io.ErrUnexpectedEOF
  7127. }
  7128. b := dAtA[iNdEx]
  7129. iNdEx++
  7130. msglen |= int(b&0x7F) << shift
  7131. if b < 0x80 {
  7132. break
  7133. }
  7134. }
  7135. if msglen < 0 {
  7136. return ErrInvalidLengthTypes
  7137. }
  7138. postIndex := iNdEx + msglen
  7139. if postIndex < 0 {
  7140. return ErrInvalidLengthTypes
  7141. }
  7142. if postIndex > l {
  7143. return io.ErrUnexpectedEOF
  7144. }
  7145. v := &RequestLoadSnapshotChunk{}
  7146. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7147. return err
  7148. }
  7149. m.Value = &Request_LoadSnapshotChunk{v}
  7150. iNdEx = postIndex
  7151. case 14:
  7152. if wireType != 2 {
  7153. return fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", wireType)
  7154. }
  7155. var msglen int
  7156. for shift := uint(0); ; shift += 7 {
  7157. if shift >= 64 {
  7158. return ErrIntOverflowTypes
  7159. }
  7160. if iNdEx >= l {
  7161. return io.ErrUnexpectedEOF
  7162. }
  7163. b := dAtA[iNdEx]
  7164. iNdEx++
  7165. msglen |= int(b&0x7F) << shift
  7166. if b < 0x80 {
  7167. break
  7168. }
  7169. }
  7170. if msglen < 0 {
  7171. return ErrInvalidLengthTypes
  7172. }
  7173. postIndex := iNdEx + msglen
  7174. if postIndex < 0 {
  7175. return ErrInvalidLengthTypes
  7176. }
  7177. if postIndex > l {
  7178. return io.ErrUnexpectedEOF
  7179. }
  7180. v := &RequestApplySnapshotChunk{}
  7181. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7182. return err
  7183. }
  7184. m.Value = &Request_ApplySnapshotChunk{v}
  7185. iNdEx = postIndex
  7186. default:
  7187. iNdEx = preIndex
  7188. skippy, err := skipTypes(dAtA[iNdEx:])
  7189. if err != nil {
  7190. return err
  7191. }
  7192. if skippy < 0 {
  7193. return ErrInvalidLengthTypes
  7194. }
  7195. if (iNdEx + skippy) < 0 {
  7196. return ErrInvalidLengthTypes
  7197. }
  7198. if (iNdEx + skippy) > l {
  7199. return io.ErrUnexpectedEOF
  7200. }
  7201. iNdEx += skippy
  7202. }
  7203. }
  7204. if iNdEx > l {
  7205. return io.ErrUnexpectedEOF
  7206. }
  7207. return nil
  7208. }
  7209. func (m *RequestEcho) Unmarshal(dAtA []byte) error {
  7210. l := len(dAtA)
  7211. iNdEx := 0
  7212. for iNdEx < l {
  7213. preIndex := iNdEx
  7214. var wire uint64
  7215. for shift := uint(0); ; shift += 7 {
  7216. if shift >= 64 {
  7217. return ErrIntOverflowTypes
  7218. }
  7219. if iNdEx >= l {
  7220. return io.ErrUnexpectedEOF
  7221. }
  7222. b := dAtA[iNdEx]
  7223. iNdEx++
  7224. wire |= uint64(b&0x7F) << shift
  7225. if b < 0x80 {
  7226. break
  7227. }
  7228. }
  7229. fieldNum := int32(wire >> 3)
  7230. wireType := int(wire & 0x7)
  7231. if wireType == 4 {
  7232. return fmt.Errorf("proto: RequestEcho: wiretype end group for non-group")
  7233. }
  7234. if fieldNum <= 0 {
  7235. return fmt.Errorf("proto: RequestEcho: illegal tag %d (wire type %d)", fieldNum, wire)
  7236. }
  7237. switch fieldNum {
  7238. case 1:
  7239. if wireType != 2 {
  7240. return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
  7241. }
  7242. var stringLen uint64
  7243. for shift := uint(0); ; shift += 7 {
  7244. if shift >= 64 {
  7245. return ErrIntOverflowTypes
  7246. }
  7247. if iNdEx >= l {
  7248. return io.ErrUnexpectedEOF
  7249. }
  7250. b := dAtA[iNdEx]
  7251. iNdEx++
  7252. stringLen |= uint64(b&0x7F) << shift
  7253. if b < 0x80 {
  7254. break
  7255. }
  7256. }
  7257. intStringLen := int(stringLen)
  7258. if intStringLen < 0 {
  7259. return ErrInvalidLengthTypes
  7260. }
  7261. postIndex := iNdEx + intStringLen
  7262. if postIndex < 0 {
  7263. return ErrInvalidLengthTypes
  7264. }
  7265. if postIndex > l {
  7266. return io.ErrUnexpectedEOF
  7267. }
  7268. m.Message = string(dAtA[iNdEx:postIndex])
  7269. iNdEx = postIndex
  7270. default:
  7271. iNdEx = preIndex
  7272. skippy, err := skipTypes(dAtA[iNdEx:])
  7273. if err != nil {
  7274. return err
  7275. }
  7276. if skippy < 0 {
  7277. return ErrInvalidLengthTypes
  7278. }
  7279. if (iNdEx + skippy) < 0 {
  7280. return ErrInvalidLengthTypes
  7281. }
  7282. if (iNdEx + skippy) > l {
  7283. return io.ErrUnexpectedEOF
  7284. }
  7285. iNdEx += skippy
  7286. }
  7287. }
  7288. if iNdEx > l {
  7289. return io.ErrUnexpectedEOF
  7290. }
  7291. return nil
  7292. }
  7293. func (m *RequestFlush) Unmarshal(dAtA []byte) error {
  7294. l := len(dAtA)
  7295. iNdEx := 0
  7296. for iNdEx < l {
  7297. preIndex := iNdEx
  7298. var wire uint64
  7299. for shift := uint(0); ; shift += 7 {
  7300. if shift >= 64 {
  7301. return ErrIntOverflowTypes
  7302. }
  7303. if iNdEx >= l {
  7304. return io.ErrUnexpectedEOF
  7305. }
  7306. b := dAtA[iNdEx]
  7307. iNdEx++
  7308. wire |= uint64(b&0x7F) << shift
  7309. if b < 0x80 {
  7310. break
  7311. }
  7312. }
  7313. fieldNum := int32(wire >> 3)
  7314. wireType := int(wire & 0x7)
  7315. if wireType == 4 {
  7316. return fmt.Errorf("proto: RequestFlush: wiretype end group for non-group")
  7317. }
  7318. if fieldNum <= 0 {
  7319. return fmt.Errorf("proto: RequestFlush: illegal tag %d (wire type %d)", fieldNum, wire)
  7320. }
  7321. switch fieldNum {
  7322. default:
  7323. iNdEx = preIndex
  7324. skippy, err := skipTypes(dAtA[iNdEx:])
  7325. if err != nil {
  7326. return err
  7327. }
  7328. if skippy < 0 {
  7329. return ErrInvalidLengthTypes
  7330. }
  7331. if (iNdEx + skippy) < 0 {
  7332. return ErrInvalidLengthTypes
  7333. }
  7334. if (iNdEx + skippy) > l {
  7335. return io.ErrUnexpectedEOF
  7336. }
  7337. iNdEx += skippy
  7338. }
  7339. }
  7340. if iNdEx > l {
  7341. return io.ErrUnexpectedEOF
  7342. }
  7343. return nil
  7344. }
  7345. func (m *RequestInfo) Unmarshal(dAtA []byte) error {
  7346. l := len(dAtA)
  7347. iNdEx := 0
  7348. for iNdEx < l {
  7349. preIndex := iNdEx
  7350. var wire uint64
  7351. for shift := uint(0); ; shift += 7 {
  7352. if shift >= 64 {
  7353. return ErrIntOverflowTypes
  7354. }
  7355. if iNdEx >= l {
  7356. return io.ErrUnexpectedEOF
  7357. }
  7358. b := dAtA[iNdEx]
  7359. iNdEx++
  7360. wire |= uint64(b&0x7F) << shift
  7361. if b < 0x80 {
  7362. break
  7363. }
  7364. }
  7365. fieldNum := int32(wire >> 3)
  7366. wireType := int(wire & 0x7)
  7367. if wireType == 4 {
  7368. return fmt.Errorf("proto: RequestInfo: wiretype end group for non-group")
  7369. }
  7370. if fieldNum <= 0 {
  7371. return fmt.Errorf("proto: RequestInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  7372. }
  7373. switch fieldNum {
  7374. case 1:
  7375. if wireType != 2 {
  7376. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  7377. }
  7378. var stringLen uint64
  7379. for shift := uint(0); ; shift += 7 {
  7380. if shift >= 64 {
  7381. return ErrIntOverflowTypes
  7382. }
  7383. if iNdEx >= l {
  7384. return io.ErrUnexpectedEOF
  7385. }
  7386. b := dAtA[iNdEx]
  7387. iNdEx++
  7388. stringLen |= uint64(b&0x7F) << shift
  7389. if b < 0x80 {
  7390. break
  7391. }
  7392. }
  7393. intStringLen := int(stringLen)
  7394. if intStringLen < 0 {
  7395. return ErrInvalidLengthTypes
  7396. }
  7397. postIndex := iNdEx + intStringLen
  7398. if postIndex < 0 {
  7399. return ErrInvalidLengthTypes
  7400. }
  7401. if postIndex > l {
  7402. return io.ErrUnexpectedEOF
  7403. }
  7404. m.Version = string(dAtA[iNdEx:postIndex])
  7405. iNdEx = postIndex
  7406. case 2:
  7407. if wireType != 0 {
  7408. return fmt.Errorf("proto: wrong wireType = %d for field BlockVersion", wireType)
  7409. }
  7410. m.BlockVersion = 0
  7411. for shift := uint(0); ; shift += 7 {
  7412. if shift >= 64 {
  7413. return ErrIntOverflowTypes
  7414. }
  7415. if iNdEx >= l {
  7416. return io.ErrUnexpectedEOF
  7417. }
  7418. b := dAtA[iNdEx]
  7419. iNdEx++
  7420. m.BlockVersion |= uint64(b&0x7F) << shift
  7421. if b < 0x80 {
  7422. break
  7423. }
  7424. }
  7425. case 3:
  7426. if wireType != 0 {
  7427. return fmt.Errorf("proto: wrong wireType = %d for field P2PVersion", wireType)
  7428. }
  7429. m.P2PVersion = 0
  7430. for shift := uint(0); ; shift += 7 {
  7431. if shift >= 64 {
  7432. return ErrIntOverflowTypes
  7433. }
  7434. if iNdEx >= l {
  7435. return io.ErrUnexpectedEOF
  7436. }
  7437. b := dAtA[iNdEx]
  7438. iNdEx++
  7439. m.P2PVersion |= uint64(b&0x7F) << shift
  7440. if b < 0x80 {
  7441. break
  7442. }
  7443. }
  7444. case 4:
  7445. if wireType != 2 {
  7446. return fmt.Errorf("proto: wrong wireType = %d for field AbciVersion", wireType)
  7447. }
  7448. var stringLen uint64
  7449. for shift := uint(0); ; shift += 7 {
  7450. if shift >= 64 {
  7451. return ErrIntOverflowTypes
  7452. }
  7453. if iNdEx >= l {
  7454. return io.ErrUnexpectedEOF
  7455. }
  7456. b := dAtA[iNdEx]
  7457. iNdEx++
  7458. stringLen |= uint64(b&0x7F) << shift
  7459. if b < 0x80 {
  7460. break
  7461. }
  7462. }
  7463. intStringLen := int(stringLen)
  7464. if intStringLen < 0 {
  7465. return ErrInvalidLengthTypes
  7466. }
  7467. postIndex := iNdEx + intStringLen
  7468. if postIndex < 0 {
  7469. return ErrInvalidLengthTypes
  7470. }
  7471. if postIndex > l {
  7472. return io.ErrUnexpectedEOF
  7473. }
  7474. m.AbciVersion = string(dAtA[iNdEx:postIndex])
  7475. iNdEx = postIndex
  7476. default:
  7477. iNdEx = preIndex
  7478. skippy, err := skipTypes(dAtA[iNdEx:])
  7479. if err != nil {
  7480. return err
  7481. }
  7482. if skippy < 0 {
  7483. return ErrInvalidLengthTypes
  7484. }
  7485. if (iNdEx + skippy) < 0 {
  7486. return ErrInvalidLengthTypes
  7487. }
  7488. if (iNdEx + skippy) > l {
  7489. return io.ErrUnexpectedEOF
  7490. }
  7491. iNdEx += skippy
  7492. }
  7493. }
  7494. if iNdEx > l {
  7495. return io.ErrUnexpectedEOF
  7496. }
  7497. return nil
  7498. }
  7499. func (m *RequestInitChain) Unmarshal(dAtA []byte) error {
  7500. l := len(dAtA)
  7501. iNdEx := 0
  7502. for iNdEx < l {
  7503. preIndex := iNdEx
  7504. var wire uint64
  7505. for shift := uint(0); ; shift += 7 {
  7506. if shift >= 64 {
  7507. return ErrIntOverflowTypes
  7508. }
  7509. if iNdEx >= l {
  7510. return io.ErrUnexpectedEOF
  7511. }
  7512. b := dAtA[iNdEx]
  7513. iNdEx++
  7514. wire |= uint64(b&0x7F) << shift
  7515. if b < 0x80 {
  7516. break
  7517. }
  7518. }
  7519. fieldNum := int32(wire >> 3)
  7520. wireType := int(wire & 0x7)
  7521. if wireType == 4 {
  7522. return fmt.Errorf("proto: RequestInitChain: wiretype end group for non-group")
  7523. }
  7524. if fieldNum <= 0 {
  7525. return fmt.Errorf("proto: RequestInitChain: illegal tag %d (wire type %d)", fieldNum, wire)
  7526. }
  7527. switch fieldNum {
  7528. case 1:
  7529. if wireType != 2 {
  7530. return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
  7531. }
  7532. var msglen int
  7533. for shift := uint(0); ; shift += 7 {
  7534. if shift >= 64 {
  7535. return ErrIntOverflowTypes
  7536. }
  7537. if iNdEx >= l {
  7538. return io.ErrUnexpectedEOF
  7539. }
  7540. b := dAtA[iNdEx]
  7541. iNdEx++
  7542. msglen |= int(b&0x7F) << shift
  7543. if b < 0x80 {
  7544. break
  7545. }
  7546. }
  7547. if msglen < 0 {
  7548. return ErrInvalidLengthTypes
  7549. }
  7550. postIndex := iNdEx + msglen
  7551. if postIndex < 0 {
  7552. return ErrInvalidLengthTypes
  7553. }
  7554. if postIndex > l {
  7555. return io.ErrUnexpectedEOF
  7556. }
  7557. if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil {
  7558. return err
  7559. }
  7560. iNdEx = postIndex
  7561. case 2:
  7562. if wireType != 2 {
  7563. return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType)
  7564. }
  7565. var stringLen uint64
  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. stringLen |= uint64(b&0x7F) << shift
  7576. if b < 0x80 {
  7577. break
  7578. }
  7579. }
  7580. intStringLen := int(stringLen)
  7581. if intStringLen < 0 {
  7582. return ErrInvalidLengthTypes
  7583. }
  7584. postIndex := iNdEx + intStringLen
  7585. if postIndex < 0 {
  7586. return ErrInvalidLengthTypes
  7587. }
  7588. if postIndex > l {
  7589. return io.ErrUnexpectedEOF
  7590. }
  7591. m.ChainId = string(dAtA[iNdEx:postIndex])
  7592. iNdEx = postIndex
  7593. case 3:
  7594. if wireType != 2 {
  7595. return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", wireType)
  7596. }
  7597. var msglen int
  7598. for shift := uint(0); ; shift += 7 {
  7599. if shift >= 64 {
  7600. return ErrIntOverflowTypes
  7601. }
  7602. if iNdEx >= l {
  7603. return io.ErrUnexpectedEOF
  7604. }
  7605. b := dAtA[iNdEx]
  7606. iNdEx++
  7607. msglen |= int(b&0x7F) << shift
  7608. if b < 0x80 {
  7609. break
  7610. }
  7611. }
  7612. if msglen < 0 {
  7613. return ErrInvalidLengthTypes
  7614. }
  7615. postIndex := iNdEx + msglen
  7616. if postIndex < 0 {
  7617. return ErrInvalidLengthTypes
  7618. }
  7619. if postIndex > l {
  7620. return io.ErrUnexpectedEOF
  7621. }
  7622. if m.ConsensusParams == nil {
  7623. m.ConsensusParams = &types1.ConsensusParams{}
  7624. }
  7625. if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7626. return err
  7627. }
  7628. iNdEx = postIndex
  7629. case 4:
  7630. if wireType != 2 {
  7631. return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType)
  7632. }
  7633. var msglen int
  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. msglen |= int(b&0x7F) << shift
  7644. if b < 0x80 {
  7645. break
  7646. }
  7647. }
  7648. if msglen < 0 {
  7649. return ErrInvalidLengthTypes
  7650. }
  7651. postIndex := iNdEx + msglen
  7652. if postIndex < 0 {
  7653. return ErrInvalidLengthTypes
  7654. }
  7655. if postIndex > l {
  7656. return io.ErrUnexpectedEOF
  7657. }
  7658. m.Validators = append(m.Validators, ValidatorUpdate{})
  7659. if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7660. return err
  7661. }
  7662. iNdEx = postIndex
  7663. case 5:
  7664. if wireType != 2 {
  7665. return fmt.Errorf("proto: wrong wireType = %d for field AppStateBytes", wireType)
  7666. }
  7667. var byteLen int
  7668. for shift := uint(0); ; shift += 7 {
  7669. if shift >= 64 {
  7670. return ErrIntOverflowTypes
  7671. }
  7672. if iNdEx >= l {
  7673. return io.ErrUnexpectedEOF
  7674. }
  7675. b := dAtA[iNdEx]
  7676. iNdEx++
  7677. byteLen |= int(b&0x7F) << shift
  7678. if b < 0x80 {
  7679. break
  7680. }
  7681. }
  7682. if byteLen < 0 {
  7683. return ErrInvalidLengthTypes
  7684. }
  7685. postIndex := iNdEx + byteLen
  7686. if postIndex < 0 {
  7687. return ErrInvalidLengthTypes
  7688. }
  7689. if postIndex > l {
  7690. return io.ErrUnexpectedEOF
  7691. }
  7692. m.AppStateBytes = append(m.AppStateBytes[:0], dAtA[iNdEx:postIndex]...)
  7693. if m.AppStateBytes == nil {
  7694. m.AppStateBytes = []byte{}
  7695. }
  7696. iNdEx = postIndex
  7697. case 6:
  7698. if wireType != 0 {
  7699. return fmt.Errorf("proto: wrong wireType = %d for field InitialHeight", wireType)
  7700. }
  7701. m.InitialHeight = 0
  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. m.InitialHeight |= int64(b&0x7F) << shift
  7712. if b < 0x80 {
  7713. break
  7714. }
  7715. }
  7716. default:
  7717. iNdEx = preIndex
  7718. skippy, err := skipTypes(dAtA[iNdEx:])
  7719. if err != nil {
  7720. return err
  7721. }
  7722. if skippy < 0 {
  7723. return ErrInvalidLengthTypes
  7724. }
  7725. if (iNdEx + skippy) < 0 {
  7726. return ErrInvalidLengthTypes
  7727. }
  7728. if (iNdEx + skippy) > l {
  7729. return io.ErrUnexpectedEOF
  7730. }
  7731. iNdEx += skippy
  7732. }
  7733. }
  7734. if iNdEx > l {
  7735. return io.ErrUnexpectedEOF
  7736. }
  7737. return nil
  7738. }
  7739. func (m *RequestQuery) Unmarshal(dAtA []byte) error {
  7740. l := len(dAtA)
  7741. iNdEx := 0
  7742. for iNdEx < l {
  7743. preIndex := iNdEx
  7744. var wire uint64
  7745. for shift := uint(0); ; shift += 7 {
  7746. if shift >= 64 {
  7747. return ErrIntOverflowTypes
  7748. }
  7749. if iNdEx >= l {
  7750. return io.ErrUnexpectedEOF
  7751. }
  7752. b := dAtA[iNdEx]
  7753. iNdEx++
  7754. wire |= uint64(b&0x7F) << shift
  7755. if b < 0x80 {
  7756. break
  7757. }
  7758. }
  7759. fieldNum := int32(wire >> 3)
  7760. wireType := int(wire & 0x7)
  7761. if wireType == 4 {
  7762. return fmt.Errorf("proto: RequestQuery: wiretype end group for non-group")
  7763. }
  7764. if fieldNum <= 0 {
  7765. return fmt.Errorf("proto: RequestQuery: illegal tag %d (wire type %d)", fieldNum, wire)
  7766. }
  7767. switch fieldNum {
  7768. case 1:
  7769. if wireType != 2 {
  7770. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  7771. }
  7772. var byteLen int
  7773. for shift := uint(0); ; shift += 7 {
  7774. if shift >= 64 {
  7775. return ErrIntOverflowTypes
  7776. }
  7777. if iNdEx >= l {
  7778. return io.ErrUnexpectedEOF
  7779. }
  7780. b := dAtA[iNdEx]
  7781. iNdEx++
  7782. byteLen |= int(b&0x7F) << shift
  7783. if b < 0x80 {
  7784. break
  7785. }
  7786. }
  7787. if byteLen < 0 {
  7788. return ErrInvalidLengthTypes
  7789. }
  7790. postIndex := iNdEx + byteLen
  7791. if postIndex < 0 {
  7792. return ErrInvalidLengthTypes
  7793. }
  7794. if postIndex > l {
  7795. return io.ErrUnexpectedEOF
  7796. }
  7797. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  7798. if m.Data == nil {
  7799. m.Data = []byte{}
  7800. }
  7801. iNdEx = postIndex
  7802. case 2:
  7803. if wireType != 2 {
  7804. return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
  7805. }
  7806. var stringLen uint64
  7807. for shift := uint(0); ; shift += 7 {
  7808. if shift >= 64 {
  7809. return ErrIntOverflowTypes
  7810. }
  7811. if iNdEx >= l {
  7812. return io.ErrUnexpectedEOF
  7813. }
  7814. b := dAtA[iNdEx]
  7815. iNdEx++
  7816. stringLen |= uint64(b&0x7F) << shift
  7817. if b < 0x80 {
  7818. break
  7819. }
  7820. }
  7821. intStringLen := int(stringLen)
  7822. if intStringLen < 0 {
  7823. return ErrInvalidLengthTypes
  7824. }
  7825. postIndex := iNdEx + intStringLen
  7826. if postIndex < 0 {
  7827. return ErrInvalidLengthTypes
  7828. }
  7829. if postIndex > l {
  7830. return io.ErrUnexpectedEOF
  7831. }
  7832. m.Path = string(dAtA[iNdEx:postIndex])
  7833. iNdEx = postIndex
  7834. case 3:
  7835. if wireType != 0 {
  7836. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  7837. }
  7838. m.Height = 0
  7839. for shift := uint(0); ; shift += 7 {
  7840. if shift >= 64 {
  7841. return ErrIntOverflowTypes
  7842. }
  7843. if iNdEx >= l {
  7844. return io.ErrUnexpectedEOF
  7845. }
  7846. b := dAtA[iNdEx]
  7847. iNdEx++
  7848. m.Height |= int64(b&0x7F) << shift
  7849. if b < 0x80 {
  7850. break
  7851. }
  7852. }
  7853. case 4:
  7854. if wireType != 0 {
  7855. return fmt.Errorf("proto: wrong wireType = %d for field Prove", wireType)
  7856. }
  7857. var v int
  7858. for shift := uint(0); ; shift += 7 {
  7859. if shift >= 64 {
  7860. return ErrIntOverflowTypes
  7861. }
  7862. if iNdEx >= l {
  7863. return io.ErrUnexpectedEOF
  7864. }
  7865. b := dAtA[iNdEx]
  7866. iNdEx++
  7867. v |= int(b&0x7F) << shift
  7868. if b < 0x80 {
  7869. break
  7870. }
  7871. }
  7872. m.Prove = bool(v != 0)
  7873. default:
  7874. iNdEx = preIndex
  7875. skippy, err := skipTypes(dAtA[iNdEx:])
  7876. if err != nil {
  7877. return err
  7878. }
  7879. if skippy < 0 {
  7880. return ErrInvalidLengthTypes
  7881. }
  7882. if (iNdEx + skippy) < 0 {
  7883. return ErrInvalidLengthTypes
  7884. }
  7885. if (iNdEx + skippy) > l {
  7886. return io.ErrUnexpectedEOF
  7887. }
  7888. iNdEx += skippy
  7889. }
  7890. }
  7891. if iNdEx > l {
  7892. return io.ErrUnexpectedEOF
  7893. }
  7894. return nil
  7895. }
  7896. func (m *RequestBeginBlock) Unmarshal(dAtA []byte) error {
  7897. l := len(dAtA)
  7898. iNdEx := 0
  7899. for iNdEx < l {
  7900. preIndex := iNdEx
  7901. var wire uint64
  7902. for shift := uint(0); ; shift += 7 {
  7903. if shift >= 64 {
  7904. return ErrIntOverflowTypes
  7905. }
  7906. if iNdEx >= l {
  7907. return io.ErrUnexpectedEOF
  7908. }
  7909. b := dAtA[iNdEx]
  7910. iNdEx++
  7911. wire |= uint64(b&0x7F) << shift
  7912. if b < 0x80 {
  7913. break
  7914. }
  7915. }
  7916. fieldNum := int32(wire >> 3)
  7917. wireType := int(wire & 0x7)
  7918. if wireType == 4 {
  7919. return fmt.Errorf("proto: RequestBeginBlock: wiretype end group for non-group")
  7920. }
  7921. if fieldNum <= 0 {
  7922. return fmt.Errorf("proto: RequestBeginBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  7923. }
  7924. switch fieldNum {
  7925. case 1:
  7926. if wireType != 2 {
  7927. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  7928. }
  7929. var byteLen int
  7930. for shift := uint(0); ; shift += 7 {
  7931. if shift >= 64 {
  7932. return ErrIntOverflowTypes
  7933. }
  7934. if iNdEx >= l {
  7935. return io.ErrUnexpectedEOF
  7936. }
  7937. b := dAtA[iNdEx]
  7938. iNdEx++
  7939. byteLen |= int(b&0x7F) << shift
  7940. if b < 0x80 {
  7941. break
  7942. }
  7943. }
  7944. if byteLen < 0 {
  7945. return ErrInvalidLengthTypes
  7946. }
  7947. postIndex := iNdEx + byteLen
  7948. if postIndex < 0 {
  7949. return ErrInvalidLengthTypes
  7950. }
  7951. if postIndex > l {
  7952. return io.ErrUnexpectedEOF
  7953. }
  7954. m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  7955. if m.Hash == nil {
  7956. m.Hash = []byte{}
  7957. }
  7958. iNdEx = postIndex
  7959. case 2:
  7960. if wireType != 2 {
  7961. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  7962. }
  7963. var msglen int
  7964. for shift := uint(0); ; shift += 7 {
  7965. if shift >= 64 {
  7966. return ErrIntOverflowTypes
  7967. }
  7968. if iNdEx >= l {
  7969. return io.ErrUnexpectedEOF
  7970. }
  7971. b := dAtA[iNdEx]
  7972. iNdEx++
  7973. msglen |= int(b&0x7F) << shift
  7974. if b < 0x80 {
  7975. break
  7976. }
  7977. }
  7978. if msglen < 0 {
  7979. return ErrInvalidLengthTypes
  7980. }
  7981. postIndex := iNdEx + msglen
  7982. if postIndex < 0 {
  7983. return ErrInvalidLengthTypes
  7984. }
  7985. if postIndex > l {
  7986. return io.ErrUnexpectedEOF
  7987. }
  7988. if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7989. return err
  7990. }
  7991. iNdEx = postIndex
  7992. case 3:
  7993. if wireType != 2 {
  7994. return fmt.Errorf("proto: wrong wireType = %d for field LastCommitInfo", wireType)
  7995. }
  7996. var msglen int
  7997. for shift := uint(0); ; shift += 7 {
  7998. if shift >= 64 {
  7999. return ErrIntOverflowTypes
  8000. }
  8001. if iNdEx >= l {
  8002. return io.ErrUnexpectedEOF
  8003. }
  8004. b := dAtA[iNdEx]
  8005. iNdEx++
  8006. msglen |= int(b&0x7F) << shift
  8007. if b < 0x80 {
  8008. break
  8009. }
  8010. }
  8011. if msglen < 0 {
  8012. return ErrInvalidLengthTypes
  8013. }
  8014. postIndex := iNdEx + msglen
  8015. if postIndex < 0 {
  8016. return ErrInvalidLengthTypes
  8017. }
  8018. if postIndex > l {
  8019. return io.ErrUnexpectedEOF
  8020. }
  8021. if err := m.LastCommitInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8022. return err
  8023. }
  8024. iNdEx = postIndex
  8025. case 4:
  8026. if wireType != 2 {
  8027. return fmt.Errorf("proto: wrong wireType = %d for field ByzantineValidators", wireType)
  8028. }
  8029. var msglen int
  8030. for shift := uint(0); ; shift += 7 {
  8031. if shift >= 64 {
  8032. return ErrIntOverflowTypes
  8033. }
  8034. if iNdEx >= l {
  8035. return io.ErrUnexpectedEOF
  8036. }
  8037. b := dAtA[iNdEx]
  8038. iNdEx++
  8039. msglen |= int(b&0x7F) << shift
  8040. if b < 0x80 {
  8041. break
  8042. }
  8043. }
  8044. if msglen < 0 {
  8045. return ErrInvalidLengthTypes
  8046. }
  8047. postIndex := iNdEx + msglen
  8048. if postIndex < 0 {
  8049. return ErrInvalidLengthTypes
  8050. }
  8051. if postIndex > l {
  8052. return io.ErrUnexpectedEOF
  8053. }
  8054. m.ByzantineValidators = append(m.ByzantineValidators, Evidence{})
  8055. if err := m.ByzantineValidators[len(m.ByzantineValidators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8056. return err
  8057. }
  8058. iNdEx = postIndex
  8059. default:
  8060. iNdEx = preIndex
  8061. skippy, err := skipTypes(dAtA[iNdEx:])
  8062. if err != nil {
  8063. return err
  8064. }
  8065. if skippy < 0 {
  8066. return ErrInvalidLengthTypes
  8067. }
  8068. if (iNdEx + skippy) < 0 {
  8069. return ErrInvalidLengthTypes
  8070. }
  8071. if (iNdEx + skippy) > l {
  8072. return io.ErrUnexpectedEOF
  8073. }
  8074. iNdEx += skippy
  8075. }
  8076. }
  8077. if iNdEx > l {
  8078. return io.ErrUnexpectedEOF
  8079. }
  8080. return nil
  8081. }
  8082. func (m *RequestCheckTx) Unmarshal(dAtA []byte) error {
  8083. l := len(dAtA)
  8084. iNdEx := 0
  8085. for iNdEx < l {
  8086. preIndex := iNdEx
  8087. var wire uint64
  8088. for shift := uint(0); ; shift += 7 {
  8089. if shift >= 64 {
  8090. return ErrIntOverflowTypes
  8091. }
  8092. if iNdEx >= l {
  8093. return io.ErrUnexpectedEOF
  8094. }
  8095. b := dAtA[iNdEx]
  8096. iNdEx++
  8097. wire |= uint64(b&0x7F) << shift
  8098. if b < 0x80 {
  8099. break
  8100. }
  8101. }
  8102. fieldNum := int32(wire >> 3)
  8103. wireType := int(wire & 0x7)
  8104. if wireType == 4 {
  8105. return fmt.Errorf("proto: RequestCheckTx: wiretype end group for non-group")
  8106. }
  8107. if fieldNum <= 0 {
  8108. return fmt.Errorf("proto: RequestCheckTx: illegal tag %d (wire type %d)", fieldNum, wire)
  8109. }
  8110. switch fieldNum {
  8111. case 1:
  8112. if wireType != 2 {
  8113. return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
  8114. }
  8115. var byteLen int
  8116. for shift := uint(0); ; shift += 7 {
  8117. if shift >= 64 {
  8118. return ErrIntOverflowTypes
  8119. }
  8120. if iNdEx >= l {
  8121. return io.ErrUnexpectedEOF
  8122. }
  8123. b := dAtA[iNdEx]
  8124. iNdEx++
  8125. byteLen |= int(b&0x7F) << shift
  8126. if b < 0x80 {
  8127. break
  8128. }
  8129. }
  8130. if byteLen < 0 {
  8131. return ErrInvalidLengthTypes
  8132. }
  8133. postIndex := iNdEx + byteLen
  8134. if postIndex < 0 {
  8135. return ErrInvalidLengthTypes
  8136. }
  8137. if postIndex > l {
  8138. return io.ErrUnexpectedEOF
  8139. }
  8140. m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...)
  8141. if m.Tx == nil {
  8142. m.Tx = []byte{}
  8143. }
  8144. iNdEx = postIndex
  8145. case 2:
  8146. if wireType != 0 {
  8147. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  8148. }
  8149. m.Type = 0
  8150. for shift := uint(0); ; shift += 7 {
  8151. if shift >= 64 {
  8152. return ErrIntOverflowTypes
  8153. }
  8154. if iNdEx >= l {
  8155. return io.ErrUnexpectedEOF
  8156. }
  8157. b := dAtA[iNdEx]
  8158. iNdEx++
  8159. m.Type |= CheckTxType(b&0x7F) << shift
  8160. if b < 0x80 {
  8161. break
  8162. }
  8163. }
  8164. default:
  8165. iNdEx = preIndex
  8166. skippy, err := skipTypes(dAtA[iNdEx:])
  8167. if err != nil {
  8168. return err
  8169. }
  8170. if skippy < 0 {
  8171. return ErrInvalidLengthTypes
  8172. }
  8173. if (iNdEx + skippy) < 0 {
  8174. return ErrInvalidLengthTypes
  8175. }
  8176. if (iNdEx + skippy) > l {
  8177. return io.ErrUnexpectedEOF
  8178. }
  8179. iNdEx += skippy
  8180. }
  8181. }
  8182. if iNdEx > l {
  8183. return io.ErrUnexpectedEOF
  8184. }
  8185. return nil
  8186. }
  8187. func (m *RequestDeliverTx) Unmarshal(dAtA []byte) error {
  8188. l := len(dAtA)
  8189. iNdEx := 0
  8190. for iNdEx < l {
  8191. preIndex := iNdEx
  8192. var wire uint64
  8193. for shift := uint(0); ; shift += 7 {
  8194. if shift >= 64 {
  8195. return ErrIntOverflowTypes
  8196. }
  8197. if iNdEx >= l {
  8198. return io.ErrUnexpectedEOF
  8199. }
  8200. b := dAtA[iNdEx]
  8201. iNdEx++
  8202. wire |= uint64(b&0x7F) << shift
  8203. if b < 0x80 {
  8204. break
  8205. }
  8206. }
  8207. fieldNum := int32(wire >> 3)
  8208. wireType := int(wire & 0x7)
  8209. if wireType == 4 {
  8210. return fmt.Errorf("proto: RequestDeliverTx: wiretype end group for non-group")
  8211. }
  8212. if fieldNum <= 0 {
  8213. return fmt.Errorf("proto: RequestDeliverTx: illegal tag %d (wire type %d)", fieldNum, wire)
  8214. }
  8215. switch fieldNum {
  8216. case 1:
  8217. if wireType != 2 {
  8218. return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
  8219. }
  8220. var byteLen int
  8221. for shift := uint(0); ; shift += 7 {
  8222. if shift >= 64 {
  8223. return ErrIntOverflowTypes
  8224. }
  8225. if iNdEx >= l {
  8226. return io.ErrUnexpectedEOF
  8227. }
  8228. b := dAtA[iNdEx]
  8229. iNdEx++
  8230. byteLen |= int(b&0x7F) << shift
  8231. if b < 0x80 {
  8232. break
  8233. }
  8234. }
  8235. if byteLen < 0 {
  8236. return ErrInvalidLengthTypes
  8237. }
  8238. postIndex := iNdEx + byteLen
  8239. if postIndex < 0 {
  8240. return ErrInvalidLengthTypes
  8241. }
  8242. if postIndex > l {
  8243. return io.ErrUnexpectedEOF
  8244. }
  8245. m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...)
  8246. if m.Tx == nil {
  8247. m.Tx = []byte{}
  8248. }
  8249. iNdEx = postIndex
  8250. default:
  8251. iNdEx = preIndex
  8252. skippy, err := skipTypes(dAtA[iNdEx:])
  8253. if err != nil {
  8254. return err
  8255. }
  8256. if skippy < 0 {
  8257. return ErrInvalidLengthTypes
  8258. }
  8259. if (iNdEx + skippy) < 0 {
  8260. return ErrInvalidLengthTypes
  8261. }
  8262. if (iNdEx + skippy) > l {
  8263. return io.ErrUnexpectedEOF
  8264. }
  8265. iNdEx += skippy
  8266. }
  8267. }
  8268. if iNdEx > l {
  8269. return io.ErrUnexpectedEOF
  8270. }
  8271. return nil
  8272. }
  8273. func (m *RequestEndBlock) Unmarshal(dAtA []byte) error {
  8274. l := len(dAtA)
  8275. iNdEx := 0
  8276. for iNdEx < l {
  8277. preIndex := iNdEx
  8278. var wire uint64
  8279. for shift := uint(0); ; shift += 7 {
  8280. if shift >= 64 {
  8281. return ErrIntOverflowTypes
  8282. }
  8283. if iNdEx >= l {
  8284. return io.ErrUnexpectedEOF
  8285. }
  8286. b := dAtA[iNdEx]
  8287. iNdEx++
  8288. wire |= uint64(b&0x7F) << shift
  8289. if b < 0x80 {
  8290. break
  8291. }
  8292. }
  8293. fieldNum := int32(wire >> 3)
  8294. wireType := int(wire & 0x7)
  8295. if wireType == 4 {
  8296. return fmt.Errorf("proto: RequestEndBlock: wiretype end group for non-group")
  8297. }
  8298. if fieldNum <= 0 {
  8299. return fmt.Errorf("proto: RequestEndBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  8300. }
  8301. switch fieldNum {
  8302. case 1:
  8303. if wireType != 0 {
  8304. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  8305. }
  8306. m.Height = 0
  8307. for shift := uint(0); ; shift += 7 {
  8308. if shift >= 64 {
  8309. return ErrIntOverflowTypes
  8310. }
  8311. if iNdEx >= l {
  8312. return io.ErrUnexpectedEOF
  8313. }
  8314. b := dAtA[iNdEx]
  8315. iNdEx++
  8316. m.Height |= int64(b&0x7F) << shift
  8317. if b < 0x80 {
  8318. break
  8319. }
  8320. }
  8321. default:
  8322. iNdEx = preIndex
  8323. skippy, err := skipTypes(dAtA[iNdEx:])
  8324. if err != nil {
  8325. return err
  8326. }
  8327. if skippy < 0 {
  8328. return ErrInvalidLengthTypes
  8329. }
  8330. if (iNdEx + skippy) < 0 {
  8331. return ErrInvalidLengthTypes
  8332. }
  8333. if (iNdEx + skippy) > l {
  8334. return io.ErrUnexpectedEOF
  8335. }
  8336. iNdEx += skippy
  8337. }
  8338. }
  8339. if iNdEx > l {
  8340. return io.ErrUnexpectedEOF
  8341. }
  8342. return nil
  8343. }
  8344. func (m *RequestCommit) Unmarshal(dAtA []byte) error {
  8345. l := len(dAtA)
  8346. iNdEx := 0
  8347. for iNdEx < l {
  8348. preIndex := iNdEx
  8349. var wire uint64
  8350. for shift := uint(0); ; shift += 7 {
  8351. if shift >= 64 {
  8352. return ErrIntOverflowTypes
  8353. }
  8354. if iNdEx >= l {
  8355. return io.ErrUnexpectedEOF
  8356. }
  8357. b := dAtA[iNdEx]
  8358. iNdEx++
  8359. wire |= uint64(b&0x7F) << shift
  8360. if b < 0x80 {
  8361. break
  8362. }
  8363. }
  8364. fieldNum := int32(wire >> 3)
  8365. wireType := int(wire & 0x7)
  8366. if wireType == 4 {
  8367. return fmt.Errorf("proto: RequestCommit: wiretype end group for non-group")
  8368. }
  8369. if fieldNum <= 0 {
  8370. return fmt.Errorf("proto: RequestCommit: illegal tag %d (wire type %d)", fieldNum, wire)
  8371. }
  8372. switch fieldNum {
  8373. default:
  8374. iNdEx = preIndex
  8375. skippy, err := skipTypes(dAtA[iNdEx:])
  8376. if err != nil {
  8377. return err
  8378. }
  8379. if skippy < 0 {
  8380. return ErrInvalidLengthTypes
  8381. }
  8382. if (iNdEx + skippy) < 0 {
  8383. return ErrInvalidLengthTypes
  8384. }
  8385. if (iNdEx + skippy) > l {
  8386. return io.ErrUnexpectedEOF
  8387. }
  8388. iNdEx += skippy
  8389. }
  8390. }
  8391. if iNdEx > l {
  8392. return io.ErrUnexpectedEOF
  8393. }
  8394. return nil
  8395. }
  8396. func (m *RequestListSnapshots) Unmarshal(dAtA []byte) error {
  8397. l := len(dAtA)
  8398. iNdEx := 0
  8399. for iNdEx < l {
  8400. preIndex := iNdEx
  8401. var wire uint64
  8402. for shift := uint(0); ; shift += 7 {
  8403. if shift >= 64 {
  8404. return ErrIntOverflowTypes
  8405. }
  8406. if iNdEx >= l {
  8407. return io.ErrUnexpectedEOF
  8408. }
  8409. b := dAtA[iNdEx]
  8410. iNdEx++
  8411. wire |= uint64(b&0x7F) << shift
  8412. if b < 0x80 {
  8413. break
  8414. }
  8415. }
  8416. fieldNum := int32(wire >> 3)
  8417. wireType := int(wire & 0x7)
  8418. if wireType == 4 {
  8419. return fmt.Errorf("proto: RequestListSnapshots: wiretype end group for non-group")
  8420. }
  8421. if fieldNum <= 0 {
  8422. return fmt.Errorf("proto: RequestListSnapshots: illegal tag %d (wire type %d)", fieldNum, wire)
  8423. }
  8424. switch fieldNum {
  8425. default:
  8426. iNdEx = preIndex
  8427. skippy, err := skipTypes(dAtA[iNdEx:])
  8428. if err != nil {
  8429. return err
  8430. }
  8431. if skippy < 0 {
  8432. return ErrInvalidLengthTypes
  8433. }
  8434. if (iNdEx + skippy) < 0 {
  8435. return ErrInvalidLengthTypes
  8436. }
  8437. if (iNdEx + skippy) > l {
  8438. return io.ErrUnexpectedEOF
  8439. }
  8440. iNdEx += skippy
  8441. }
  8442. }
  8443. if iNdEx > l {
  8444. return io.ErrUnexpectedEOF
  8445. }
  8446. return nil
  8447. }
  8448. func (m *RequestOfferSnapshot) Unmarshal(dAtA []byte) error {
  8449. l := len(dAtA)
  8450. iNdEx := 0
  8451. for iNdEx < l {
  8452. preIndex := iNdEx
  8453. var wire uint64
  8454. for shift := uint(0); ; shift += 7 {
  8455. if shift >= 64 {
  8456. return ErrIntOverflowTypes
  8457. }
  8458. if iNdEx >= l {
  8459. return io.ErrUnexpectedEOF
  8460. }
  8461. b := dAtA[iNdEx]
  8462. iNdEx++
  8463. wire |= uint64(b&0x7F) << shift
  8464. if b < 0x80 {
  8465. break
  8466. }
  8467. }
  8468. fieldNum := int32(wire >> 3)
  8469. wireType := int(wire & 0x7)
  8470. if wireType == 4 {
  8471. return fmt.Errorf("proto: RequestOfferSnapshot: wiretype end group for non-group")
  8472. }
  8473. if fieldNum <= 0 {
  8474. return fmt.Errorf("proto: RequestOfferSnapshot: illegal tag %d (wire type %d)", fieldNum, wire)
  8475. }
  8476. switch fieldNum {
  8477. case 1:
  8478. if wireType != 2 {
  8479. return fmt.Errorf("proto: wrong wireType = %d for field Snapshot", wireType)
  8480. }
  8481. var msglen int
  8482. for shift := uint(0); ; shift += 7 {
  8483. if shift >= 64 {
  8484. return ErrIntOverflowTypes
  8485. }
  8486. if iNdEx >= l {
  8487. return io.ErrUnexpectedEOF
  8488. }
  8489. b := dAtA[iNdEx]
  8490. iNdEx++
  8491. msglen |= int(b&0x7F) << shift
  8492. if b < 0x80 {
  8493. break
  8494. }
  8495. }
  8496. if msglen < 0 {
  8497. return ErrInvalidLengthTypes
  8498. }
  8499. postIndex := iNdEx + msglen
  8500. if postIndex < 0 {
  8501. return ErrInvalidLengthTypes
  8502. }
  8503. if postIndex > l {
  8504. return io.ErrUnexpectedEOF
  8505. }
  8506. if m.Snapshot == nil {
  8507. m.Snapshot = &Snapshot{}
  8508. }
  8509. if err := m.Snapshot.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8510. return err
  8511. }
  8512. iNdEx = postIndex
  8513. case 2:
  8514. if wireType != 2 {
  8515. return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType)
  8516. }
  8517. var byteLen int
  8518. for shift := uint(0); ; shift += 7 {
  8519. if shift >= 64 {
  8520. return ErrIntOverflowTypes
  8521. }
  8522. if iNdEx >= l {
  8523. return io.ErrUnexpectedEOF
  8524. }
  8525. b := dAtA[iNdEx]
  8526. iNdEx++
  8527. byteLen |= int(b&0x7F) << shift
  8528. if b < 0x80 {
  8529. break
  8530. }
  8531. }
  8532. if byteLen < 0 {
  8533. return ErrInvalidLengthTypes
  8534. }
  8535. postIndex := iNdEx + byteLen
  8536. if postIndex < 0 {
  8537. return ErrInvalidLengthTypes
  8538. }
  8539. if postIndex > l {
  8540. return io.ErrUnexpectedEOF
  8541. }
  8542. m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...)
  8543. if m.AppHash == nil {
  8544. m.AppHash = []byte{}
  8545. }
  8546. iNdEx = postIndex
  8547. default:
  8548. iNdEx = preIndex
  8549. skippy, err := skipTypes(dAtA[iNdEx:])
  8550. if err != nil {
  8551. return err
  8552. }
  8553. if skippy < 0 {
  8554. return ErrInvalidLengthTypes
  8555. }
  8556. if (iNdEx + skippy) < 0 {
  8557. return ErrInvalidLengthTypes
  8558. }
  8559. if (iNdEx + skippy) > l {
  8560. return io.ErrUnexpectedEOF
  8561. }
  8562. iNdEx += skippy
  8563. }
  8564. }
  8565. if iNdEx > l {
  8566. return io.ErrUnexpectedEOF
  8567. }
  8568. return nil
  8569. }
  8570. func (m *RequestLoadSnapshotChunk) Unmarshal(dAtA []byte) error {
  8571. l := len(dAtA)
  8572. iNdEx := 0
  8573. for iNdEx < l {
  8574. preIndex := iNdEx
  8575. var wire uint64
  8576. for shift := uint(0); ; shift += 7 {
  8577. if shift >= 64 {
  8578. return ErrIntOverflowTypes
  8579. }
  8580. if iNdEx >= l {
  8581. return io.ErrUnexpectedEOF
  8582. }
  8583. b := dAtA[iNdEx]
  8584. iNdEx++
  8585. wire |= uint64(b&0x7F) << shift
  8586. if b < 0x80 {
  8587. break
  8588. }
  8589. }
  8590. fieldNum := int32(wire >> 3)
  8591. wireType := int(wire & 0x7)
  8592. if wireType == 4 {
  8593. return fmt.Errorf("proto: RequestLoadSnapshotChunk: wiretype end group for non-group")
  8594. }
  8595. if fieldNum <= 0 {
  8596. return fmt.Errorf("proto: RequestLoadSnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  8597. }
  8598. switch fieldNum {
  8599. case 1:
  8600. if wireType != 0 {
  8601. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  8602. }
  8603. m.Height = 0
  8604. for shift := uint(0); ; shift += 7 {
  8605. if shift >= 64 {
  8606. return ErrIntOverflowTypes
  8607. }
  8608. if iNdEx >= l {
  8609. return io.ErrUnexpectedEOF
  8610. }
  8611. b := dAtA[iNdEx]
  8612. iNdEx++
  8613. m.Height |= uint64(b&0x7F) << shift
  8614. if b < 0x80 {
  8615. break
  8616. }
  8617. }
  8618. case 2:
  8619. if wireType != 0 {
  8620. return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType)
  8621. }
  8622. m.Format = 0
  8623. for shift := uint(0); ; shift += 7 {
  8624. if shift >= 64 {
  8625. return ErrIntOverflowTypes
  8626. }
  8627. if iNdEx >= l {
  8628. return io.ErrUnexpectedEOF
  8629. }
  8630. b := dAtA[iNdEx]
  8631. iNdEx++
  8632. m.Format |= uint32(b&0x7F) << shift
  8633. if b < 0x80 {
  8634. break
  8635. }
  8636. }
  8637. case 3:
  8638. if wireType != 0 {
  8639. return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType)
  8640. }
  8641. m.Chunk = 0
  8642. for shift := uint(0); ; shift += 7 {
  8643. if shift >= 64 {
  8644. return ErrIntOverflowTypes
  8645. }
  8646. if iNdEx >= l {
  8647. return io.ErrUnexpectedEOF
  8648. }
  8649. b := dAtA[iNdEx]
  8650. iNdEx++
  8651. m.Chunk |= uint32(b&0x7F) << shift
  8652. if b < 0x80 {
  8653. break
  8654. }
  8655. }
  8656. default:
  8657. iNdEx = preIndex
  8658. skippy, err := skipTypes(dAtA[iNdEx:])
  8659. if err != nil {
  8660. return err
  8661. }
  8662. if skippy < 0 {
  8663. return ErrInvalidLengthTypes
  8664. }
  8665. if (iNdEx + skippy) < 0 {
  8666. return ErrInvalidLengthTypes
  8667. }
  8668. if (iNdEx + skippy) > l {
  8669. return io.ErrUnexpectedEOF
  8670. }
  8671. iNdEx += skippy
  8672. }
  8673. }
  8674. if iNdEx > l {
  8675. return io.ErrUnexpectedEOF
  8676. }
  8677. return nil
  8678. }
  8679. func (m *RequestApplySnapshotChunk) Unmarshal(dAtA []byte) error {
  8680. l := len(dAtA)
  8681. iNdEx := 0
  8682. for iNdEx < l {
  8683. preIndex := iNdEx
  8684. var wire uint64
  8685. for shift := uint(0); ; shift += 7 {
  8686. if shift >= 64 {
  8687. return ErrIntOverflowTypes
  8688. }
  8689. if iNdEx >= l {
  8690. return io.ErrUnexpectedEOF
  8691. }
  8692. b := dAtA[iNdEx]
  8693. iNdEx++
  8694. wire |= uint64(b&0x7F) << shift
  8695. if b < 0x80 {
  8696. break
  8697. }
  8698. }
  8699. fieldNum := int32(wire >> 3)
  8700. wireType := int(wire & 0x7)
  8701. if wireType == 4 {
  8702. return fmt.Errorf("proto: RequestApplySnapshotChunk: wiretype end group for non-group")
  8703. }
  8704. if fieldNum <= 0 {
  8705. return fmt.Errorf("proto: RequestApplySnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  8706. }
  8707. switch fieldNum {
  8708. case 1:
  8709. if wireType != 0 {
  8710. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  8711. }
  8712. m.Index = 0
  8713. for shift := uint(0); ; shift += 7 {
  8714. if shift >= 64 {
  8715. return ErrIntOverflowTypes
  8716. }
  8717. if iNdEx >= l {
  8718. return io.ErrUnexpectedEOF
  8719. }
  8720. b := dAtA[iNdEx]
  8721. iNdEx++
  8722. m.Index |= uint32(b&0x7F) << shift
  8723. if b < 0x80 {
  8724. break
  8725. }
  8726. }
  8727. case 2:
  8728. if wireType != 2 {
  8729. return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType)
  8730. }
  8731. var byteLen int
  8732. for shift := uint(0); ; shift += 7 {
  8733. if shift >= 64 {
  8734. return ErrIntOverflowTypes
  8735. }
  8736. if iNdEx >= l {
  8737. return io.ErrUnexpectedEOF
  8738. }
  8739. b := dAtA[iNdEx]
  8740. iNdEx++
  8741. byteLen |= int(b&0x7F) << shift
  8742. if b < 0x80 {
  8743. break
  8744. }
  8745. }
  8746. if byteLen < 0 {
  8747. return ErrInvalidLengthTypes
  8748. }
  8749. postIndex := iNdEx + byteLen
  8750. if postIndex < 0 {
  8751. return ErrInvalidLengthTypes
  8752. }
  8753. if postIndex > l {
  8754. return io.ErrUnexpectedEOF
  8755. }
  8756. m.Chunk = append(m.Chunk[:0], dAtA[iNdEx:postIndex]...)
  8757. if m.Chunk == nil {
  8758. m.Chunk = []byte{}
  8759. }
  8760. iNdEx = postIndex
  8761. case 3:
  8762. if wireType != 2 {
  8763. return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType)
  8764. }
  8765. var stringLen uint64
  8766. for shift := uint(0); ; shift += 7 {
  8767. if shift >= 64 {
  8768. return ErrIntOverflowTypes
  8769. }
  8770. if iNdEx >= l {
  8771. return io.ErrUnexpectedEOF
  8772. }
  8773. b := dAtA[iNdEx]
  8774. iNdEx++
  8775. stringLen |= uint64(b&0x7F) << shift
  8776. if b < 0x80 {
  8777. break
  8778. }
  8779. }
  8780. intStringLen := int(stringLen)
  8781. if intStringLen < 0 {
  8782. return ErrInvalidLengthTypes
  8783. }
  8784. postIndex := iNdEx + intStringLen
  8785. if postIndex < 0 {
  8786. return ErrInvalidLengthTypes
  8787. }
  8788. if postIndex > l {
  8789. return io.ErrUnexpectedEOF
  8790. }
  8791. m.Sender = string(dAtA[iNdEx:postIndex])
  8792. iNdEx = postIndex
  8793. default:
  8794. iNdEx = preIndex
  8795. skippy, err := skipTypes(dAtA[iNdEx:])
  8796. if err != nil {
  8797. return err
  8798. }
  8799. if skippy < 0 {
  8800. return ErrInvalidLengthTypes
  8801. }
  8802. if (iNdEx + skippy) < 0 {
  8803. return ErrInvalidLengthTypes
  8804. }
  8805. if (iNdEx + skippy) > l {
  8806. return io.ErrUnexpectedEOF
  8807. }
  8808. iNdEx += skippy
  8809. }
  8810. }
  8811. if iNdEx > l {
  8812. return io.ErrUnexpectedEOF
  8813. }
  8814. return nil
  8815. }
  8816. func (m *Response) Unmarshal(dAtA []byte) error {
  8817. l := len(dAtA)
  8818. iNdEx := 0
  8819. for iNdEx < l {
  8820. preIndex := iNdEx
  8821. var wire uint64
  8822. for shift := uint(0); ; shift += 7 {
  8823. if shift >= 64 {
  8824. return ErrIntOverflowTypes
  8825. }
  8826. if iNdEx >= l {
  8827. return io.ErrUnexpectedEOF
  8828. }
  8829. b := dAtA[iNdEx]
  8830. iNdEx++
  8831. wire |= uint64(b&0x7F) << shift
  8832. if b < 0x80 {
  8833. break
  8834. }
  8835. }
  8836. fieldNum := int32(wire >> 3)
  8837. wireType := int(wire & 0x7)
  8838. if wireType == 4 {
  8839. return fmt.Errorf("proto: Response: wiretype end group for non-group")
  8840. }
  8841. if fieldNum <= 0 {
  8842. return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire)
  8843. }
  8844. switch fieldNum {
  8845. case 1:
  8846. if wireType != 2 {
  8847. return fmt.Errorf("proto: wrong wireType = %d for field Exception", wireType)
  8848. }
  8849. var msglen int
  8850. for shift := uint(0); ; shift += 7 {
  8851. if shift >= 64 {
  8852. return ErrIntOverflowTypes
  8853. }
  8854. if iNdEx >= l {
  8855. return io.ErrUnexpectedEOF
  8856. }
  8857. b := dAtA[iNdEx]
  8858. iNdEx++
  8859. msglen |= int(b&0x7F) << shift
  8860. if b < 0x80 {
  8861. break
  8862. }
  8863. }
  8864. if msglen < 0 {
  8865. return ErrInvalidLengthTypes
  8866. }
  8867. postIndex := iNdEx + msglen
  8868. if postIndex < 0 {
  8869. return ErrInvalidLengthTypes
  8870. }
  8871. if postIndex > l {
  8872. return io.ErrUnexpectedEOF
  8873. }
  8874. v := &ResponseException{}
  8875. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8876. return err
  8877. }
  8878. m.Value = &Response_Exception{v}
  8879. iNdEx = postIndex
  8880. case 2:
  8881. if wireType != 2 {
  8882. return fmt.Errorf("proto: wrong wireType = %d for field Echo", wireType)
  8883. }
  8884. var msglen int
  8885. for shift := uint(0); ; shift += 7 {
  8886. if shift >= 64 {
  8887. return ErrIntOverflowTypes
  8888. }
  8889. if iNdEx >= l {
  8890. return io.ErrUnexpectedEOF
  8891. }
  8892. b := dAtA[iNdEx]
  8893. iNdEx++
  8894. msglen |= int(b&0x7F) << shift
  8895. if b < 0x80 {
  8896. break
  8897. }
  8898. }
  8899. if msglen < 0 {
  8900. return ErrInvalidLengthTypes
  8901. }
  8902. postIndex := iNdEx + msglen
  8903. if postIndex < 0 {
  8904. return ErrInvalidLengthTypes
  8905. }
  8906. if postIndex > l {
  8907. return io.ErrUnexpectedEOF
  8908. }
  8909. v := &ResponseEcho{}
  8910. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8911. return err
  8912. }
  8913. m.Value = &Response_Echo{v}
  8914. iNdEx = postIndex
  8915. case 3:
  8916. if wireType != 2 {
  8917. return fmt.Errorf("proto: wrong wireType = %d for field Flush", wireType)
  8918. }
  8919. var msglen int
  8920. for shift := uint(0); ; shift += 7 {
  8921. if shift >= 64 {
  8922. return ErrIntOverflowTypes
  8923. }
  8924. if iNdEx >= l {
  8925. return io.ErrUnexpectedEOF
  8926. }
  8927. b := dAtA[iNdEx]
  8928. iNdEx++
  8929. msglen |= int(b&0x7F) << shift
  8930. if b < 0x80 {
  8931. break
  8932. }
  8933. }
  8934. if msglen < 0 {
  8935. return ErrInvalidLengthTypes
  8936. }
  8937. postIndex := iNdEx + msglen
  8938. if postIndex < 0 {
  8939. return ErrInvalidLengthTypes
  8940. }
  8941. if postIndex > l {
  8942. return io.ErrUnexpectedEOF
  8943. }
  8944. v := &ResponseFlush{}
  8945. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8946. return err
  8947. }
  8948. m.Value = &Response_Flush{v}
  8949. iNdEx = postIndex
  8950. case 4:
  8951. if wireType != 2 {
  8952. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  8953. }
  8954. var msglen int
  8955. for shift := uint(0); ; shift += 7 {
  8956. if shift >= 64 {
  8957. return ErrIntOverflowTypes
  8958. }
  8959. if iNdEx >= l {
  8960. return io.ErrUnexpectedEOF
  8961. }
  8962. b := dAtA[iNdEx]
  8963. iNdEx++
  8964. msglen |= int(b&0x7F) << shift
  8965. if b < 0x80 {
  8966. break
  8967. }
  8968. }
  8969. if msglen < 0 {
  8970. return ErrInvalidLengthTypes
  8971. }
  8972. postIndex := iNdEx + msglen
  8973. if postIndex < 0 {
  8974. return ErrInvalidLengthTypes
  8975. }
  8976. if postIndex > l {
  8977. return io.ErrUnexpectedEOF
  8978. }
  8979. v := &ResponseInfo{}
  8980. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8981. return err
  8982. }
  8983. m.Value = &Response_Info{v}
  8984. iNdEx = postIndex
  8985. case 5:
  8986. if wireType != 2 {
  8987. return fmt.Errorf("proto: wrong wireType = %d for field InitChain", wireType)
  8988. }
  8989. var msglen int
  8990. for shift := uint(0); ; shift += 7 {
  8991. if shift >= 64 {
  8992. return ErrIntOverflowTypes
  8993. }
  8994. if iNdEx >= l {
  8995. return io.ErrUnexpectedEOF
  8996. }
  8997. b := dAtA[iNdEx]
  8998. iNdEx++
  8999. msglen |= int(b&0x7F) << shift
  9000. if b < 0x80 {
  9001. break
  9002. }
  9003. }
  9004. if msglen < 0 {
  9005. return ErrInvalidLengthTypes
  9006. }
  9007. postIndex := iNdEx + msglen
  9008. if postIndex < 0 {
  9009. return ErrInvalidLengthTypes
  9010. }
  9011. if postIndex > l {
  9012. return io.ErrUnexpectedEOF
  9013. }
  9014. v := &ResponseInitChain{}
  9015. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9016. return err
  9017. }
  9018. m.Value = &Response_InitChain{v}
  9019. iNdEx = postIndex
  9020. case 6:
  9021. if wireType != 2 {
  9022. return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType)
  9023. }
  9024. var msglen int
  9025. for shift := uint(0); ; shift += 7 {
  9026. if shift >= 64 {
  9027. return ErrIntOverflowTypes
  9028. }
  9029. if iNdEx >= l {
  9030. return io.ErrUnexpectedEOF
  9031. }
  9032. b := dAtA[iNdEx]
  9033. iNdEx++
  9034. msglen |= int(b&0x7F) << shift
  9035. if b < 0x80 {
  9036. break
  9037. }
  9038. }
  9039. if msglen < 0 {
  9040. return ErrInvalidLengthTypes
  9041. }
  9042. postIndex := iNdEx + msglen
  9043. if postIndex < 0 {
  9044. return ErrInvalidLengthTypes
  9045. }
  9046. if postIndex > l {
  9047. return io.ErrUnexpectedEOF
  9048. }
  9049. v := &ResponseQuery{}
  9050. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9051. return err
  9052. }
  9053. m.Value = &Response_Query{v}
  9054. iNdEx = postIndex
  9055. case 7:
  9056. if wireType != 2 {
  9057. return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", wireType)
  9058. }
  9059. var msglen int
  9060. for shift := uint(0); ; shift += 7 {
  9061. if shift >= 64 {
  9062. return ErrIntOverflowTypes
  9063. }
  9064. if iNdEx >= l {
  9065. return io.ErrUnexpectedEOF
  9066. }
  9067. b := dAtA[iNdEx]
  9068. iNdEx++
  9069. msglen |= int(b&0x7F) << shift
  9070. if b < 0x80 {
  9071. break
  9072. }
  9073. }
  9074. if msglen < 0 {
  9075. return ErrInvalidLengthTypes
  9076. }
  9077. postIndex := iNdEx + msglen
  9078. if postIndex < 0 {
  9079. return ErrInvalidLengthTypes
  9080. }
  9081. if postIndex > l {
  9082. return io.ErrUnexpectedEOF
  9083. }
  9084. v := &ResponseBeginBlock{}
  9085. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9086. return err
  9087. }
  9088. m.Value = &Response_BeginBlock{v}
  9089. iNdEx = postIndex
  9090. case 8:
  9091. if wireType != 2 {
  9092. return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType)
  9093. }
  9094. var msglen int
  9095. for shift := uint(0); ; shift += 7 {
  9096. if shift >= 64 {
  9097. return ErrIntOverflowTypes
  9098. }
  9099. if iNdEx >= l {
  9100. return io.ErrUnexpectedEOF
  9101. }
  9102. b := dAtA[iNdEx]
  9103. iNdEx++
  9104. msglen |= int(b&0x7F) << shift
  9105. if b < 0x80 {
  9106. break
  9107. }
  9108. }
  9109. if msglen < 0 {
  9110. return ErrInvalidLengthTypes
  9111. }
  9112. postIndex := iNdEx + msglen
  9113. if postIndex < 0 {
  9114. return ErrInvalidLengthTypes
  9115. }
  9116. if postIndex > l {
  9117. return io.ErrUnexpectedEOF
  9118. }
  9119. v := &ResponseCheckTx{}
  9120. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9121. return err
  9122. }
  9123. m.Value = &Response_CheckTx{v}
  9124. iNdEx = postIndex
  9125. case 9:
  9126. if wireType != 2 {
  9127. return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", wireType)
  9128. }
  9129. var msglen int
  9130. for shift := uint(0); ; shift += 7 {
  9131. if shift >= 64 {
  9132. return ErrIntOverflowTypes
  9133. }
  9134. if iNdEx >= l {
  9135. return io.ErrUnexpectedEOF
  9136. }
  9137. b := dAtA[iNdEx]
  9138. iNdEx++
  9139. msglen |= int(b&0x7F) << shift
  9140. if b < 0x80 {
  9141. break
  9142. }
  9143. }
  9144. if msglen < 0 {
  9145. return ErrInvalidLengthTypes
  9146. }
  9147. postIndex := iNdEx + msglen
  9148. if postIndex < 0 {
  9149. return ErrInvalidLengthTypes
  9150. }
  9151. if postIndex > l {
  9152. return io.ErrUnexpectedEOF
  9153. }
  9154. v := &ResponseDeliverTx{}
  9155. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9156. return err
  9157. }
  9158. m.Value = &Response_DeliverTx{v}
  9159. iNdEx = postIndex
  9160. case 10:
  9161. if wireType != 2 {
  9162. return fmt.Errorf("proto: wrong wireType = %d for field EndBlock", wireType)
  9163. }
  9164. var msglen int
  9165. for shift := uint(0); ; shift += 7 {
  9166. if shift >= 64 {
  9167. return ErrIntOverflowTypes
  9168. }
  9169. if iNdEx >= l {
  9170. return io.ErrUnexpectedEOF
  9171. }
  9172. b := dAtA[iNdEx]
  9173. iNdEx++
  9174. msglen |= int(b&0x7F) << shift
  9175. if b < 0x80 {
  9176. break
  9177. }
  9178. }
  9179. if msglen < 0 {
  9180. return ErrInvalidLengthTypes
  9181. }
  9182. postIndex := iNdEx + msglen
  9183. if postIndex < 0 {
  9184. return ErrInvalidLengthTypes
  9185. }
  9186. if postIndex > l {
  9187. return io.ErrUnexpectedEOF
  9188. }
  9189. v := &ResponseEndBlock{}
  9190. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9191. return err
  9192. }
  9193. m.Value = &Response_EndBlock{v}
  9194. iNdEx = postIndex
  9195. case 11:
  9196. if wireType != 2 {
  9197. return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType)
  9198. }
  9199. var msglen int
  9200. for shift := uint(0); ; shift += 7 {
  9201. if shift >= 64 {
  9202. return ErrIntOverflowTypes
  9203. }
  9204. if iNdEx >= l {
  9205. return io.ErrUnexpectedEOF
  9206. }
  9207. b := dAtA[iNdEx]
  9208. iNdEx++
  9209. msglen |= int(b&0x7F) << shift
  9210. if b < 0x80 {
  9211. break
  9212. }
  9213. }
  9214. if msglen < 0 {
  9215. return ErrInvalidLengthTypes
  9216. }
  9217. postIndex := iNdEx + msglen
  9218. if postIndex < 0 {
  9219. return ErrInvalidLengthTypes
  9220. }
  9221. if postIndex > l {
  9222. return io.ErrUnexpectedEOF
  9223. }
  9224. v := &ResponseCommit{}
  9225. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9226. return err
  9227. }
  9228. m.Value = &Response_Commit{v}
  9229. iNdEx = postIndex
  9230. case 12:
  9231. if wireType != 2 {
  9232. return fmt.Errorf("proto: wrong wireType = %d for field ListSnapshots", wireType)
  9233. }
  9234. var msglen int
  9235. for shift := uint(0); ; shift += 7 {
  9236. if shift >= 64 {
  9237. return ErrIntOverflowTypes
  9238. }
  9239. if iNdEx >= l {
  9240. return io.ErrUnexpectedEOF
  9241. }
  9242. b := dAtA[iNdEx]
  9243. iNdEx++
  9244. msglen |= int(b&0x7F) << shift
  9245. if b < 0x80 {
  9246. break
  9247. }
  9248. }
  9249. if msglen < 0 {
  9250. return ErrInvalidLengthTypes
  9251. }
  9252. postIndex := iNdEx + msglen
  9253. if postIndex < 0 {
  9254. return ErrInvalidLengthTypes
  9255. }
  9256. if postIndex > l {
  9257. return io.ErrUnexpectedEOF
  9258. }
  9259. v := &ResponseListSnapshots{}
  9260. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9261. return err
  9262. }
  9263. m.Value = &Response_ListSnapshots{v}
  9264. iNdEx = postIndex
  9265. case 13:
  9266. if wireType != 2 {
  9267. return fmt.Errorf("proto: wrong wireType = %d for field OfferSnapshot", wireType)
  9268. }
  9269. var msglen int
  9270. for shift := uint(0); ; shift += 7 {
  9271. if shift >= 64 {
  9272. return ErrIntOverflowTypes
  9273. }
  9274. if iNdEx >= l {
  9275. return io.ErrUnexpectedEOF
  9276. }
  9277. b := dAtA[iNdEx]
  9278. iNdEx++
  9279. msglen |= int(b&0x7F) << shift
  9280. if b < 0x80 {
  9281. break
  9282. }
  9283. }
  9284. if msglen < 0 {
  9285. return ErrInvalidLengthTypes
  9286. }
  9287. postIndex := iNdEx + msglen
  9288. if postIndex < 0 {
  9289. return ErrInvalidLengthTypes
  9290. }
  9291. if postIndex > l {
  9292. return io.ErrUnexpectedEOF
  9293. }
  9294. v := &ResponseOfferSnapshot{}
  9295. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9296. return err
  9297. }
  9298. m.Value = &Response_OfferSnapshot{v}
  9299. iNdEx = postIndex
  9300. case 14:
  9301. if wireType != 2 {
  9302. return fmt.Errorf("proto: wrong wireType = %d for field LoadSnapshotChunk", wireType)
  9303. }
  9304. var msglen int
  9305. for shift := uint(0); ; shift += 7 {
  9306. if shift >= 64 {
  9307. return ErrIntOverflowTypes
  9308. }
  9309. if iNdEx >= l {
  9310. return io.ErrUnexpectedEOF
  9311. }
  9312. b := dAtA[iNdEx]
  9313. iNdEx++
  9314. msglen |= int(b&0x7F) << shift
  9315. if b < 0x80 {
  9316. break
  9317. }
  9318. }
  9319. if msglen < 0 {
  9320. return ErrInvalidLengthTypes
  9321. }
  9322. postIndex := iNdEx + msglen
  9323. if postIndex < 0 {
  9324. return ErrInvalidLengthTypes
  9325. }
  9326. if postIndex > l {
  9327. return io.ErrUnexpectedEOF
  9328. }
  9329. v := &ResponseLoadSnapshotChunk{}
  9330. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9331. return err
  9332. }
  9333. m.Value = &Response_LoadSnapshotChunk{v}
  9334. iNdEx = postIndex
  9335. case 15:
  9336. if wireType != 2 {
  9337. return fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", wireType)
  9338. }
  9339. var msglen int
  9340. for shift := uint(0); ; shift += 7 {
  9341. if shift >= 64 {
  9342. return ErrIntOverflowTypes
  9343. }
  9344. if iNdEx >= l {
  9345. return io.ErrUnexpectedEOF
  9346. }
  9347. b := dAtA[iNdEx]
  9348. iNdEx++
  9349. msglen |= int(b&0x7F) << shift
  9350. if b < 0x80 {
  9351. break
  9352. }
  9353. }
  9354. if msglen < 0 {
  9355. return ErrInvalidLengthTypes
  9356. }
  9357. postIndex := iNdEx + msglen
  9358. if postIndex < 0 {
  9359. return ErrInvalidLengthTypes
  9360. }
  9361. if postIndex > l {
  9362. return io.ErrUnexpectedEOF
  9363. }
  9364. v := &ResponseApplySnapshotChunk{}
  9365. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9366. return err
  9367. }
  9368. m.Value = &Response_ApplySnapshotChunk{v}
  9369. iNdEx = postIndex
  9370. default:
  9371. iNdEx = preIndex
  9372. skippy, err := skipTypes(dAtA[iNdEx:])
  9373. if err != nil {
  9374. return err
  9375. }
  9376. if skippy < 0 {
  9377. return ErrInvalidLengthTypes
  9378. }
  9379. if (iNdEx + skippy) < 0 {
  9380. return ErrInvalidLengthTypes
  9381. }
  9382. if (iNdEx + skippy) > l {
  9383. return io.ErrUnexpectedEOF
  9384. }
  9385. iNdEx += skippy
  9386. }
  9387. }
  9388. if iNdEx > l {
  9389. return io.ErrUnexpectedEOF
  9390. }
  9391. return nil
  9392. }
  9393. func (m *ResponseException) Unmarshal(dAtA []byte) error {
  9394. l := len(dAtA)
  9395. iNdEx := 0
  9396. for iNdEx < l {
  9397. preIndex := iNdEx
  9398. var wire uint64
  9399. for shift := uint(0); ; shift += 7 {
  9400. if shift >= 64 {
  9401. return ErrIntOverflowTypes
  9402. }
  9403. if iNdEx >= l {
  9404. return io.ErrUnexpectedEOF
  9405. }
  9406. b := dAtA[iNdEx]
  9407. iNdEx++
  9408. wire |= uint64(b&0x7F) << shift
  9409. if b < 0x80 {
  9410. break
  9411. }
  9412. }
  9413. fieldNum := int32(wire >> 3)
  9414. wireType := int(wire & 0x7)
  9415. if wireType == 4 {
  9416. return fmt.Errorf("proto: ResponseException: wiretype end group for non-group")
  9417. }
  9418. if fieldNum <= 0 {
  9419. return fmt.Errorf("proto: ResponseException: illegal tag %d (wire type %d)", fieldNum, wire)
  9420. }
  9421. switch fieldNum {
  9422. case 1:
  9423. if wireType != 2 {
  9424. return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
  9425. }
  9426. var stringLen uint64
  9427. for shift := uint(0); ; shift += 7 {
  9428. if shift >= 64 {
  9429. return ErrIntOverflowTypes
  9430. }
  9431. if iNdEx >= l {
  9432. return io.ErrUnexpectedEOF
  9433. }
  9434. b := dAtA[iNdEx]
  9435. iNdEx++
  9436. stringLen |= uint64(b&0x7F) << shift
  9437. if b < 0x80 {
  9438. break
  9439. }
  9440. }
  9441. intStringLen := int(stringLen)
  9442. if intStringLen < 0 {
  9443. return ErrInvalidLengthTypes
  9444. }
  9445. postIndex := iNdEx + intStringLen
  9446. if postIndex < 0 {
  9447. return ErrInvalidLengthTypes
  9448. }
  9449. if postIndex > l {
  9450. return io.ErrUnexpectedEOF
  9451. }
  9452. m.Error = string(dAtA[iNdEx:postIndex])
  9453. iNdEx = postIndex
  9454. default:
  9455. iNdEx = preIndex
  9456. skippy, err := skipTypes(dAtA[iNdEx:])
  9457. if err != nil {
  9458. return err
  9459. }
  9460. if skippy < 0 {
  9461. return ErrInvalidLengthTypes
  9462. }
  9463. if (iNdEx + skippy) < 0 {
  9464. return ErrInvalidLengthTypes
  9465. }
  9466. if (iNdEx + skippy) > l {
  9467. return io.ErrUnexpectedEOF
  9468. }
  9469. iNdEx += skippy
  9470. }
  9471. }
  9472. if iNdEx > l {
  9473. return io.ErrUnexpectedEOF
  9474. }
  9475. return nil
  9476. }
  9477. func (m *ResponseEcho) Unmarshal(dAtA []byte) error {
  9478. l := len(dAtA)
  9479. iNdEx := 0
  9480. for iNdEx < l {
  9481. preIndex := iNdEx
  9482. var wire uint64
  9483. for shift := uint(0); ; shift += 7 {
  9484. if shift >= 64 {
  9485. return ErrIntOverflowTypes
  9486. }
  9487. if iNdEx >= l {
  9488. return io.ErrUnexpectedEOF
  9489. }
  9490. b := dAtA[iNdEx]
  9491. iNdEx++
  9492. wire |= uint64(b&0x7F) << shift
  9493. if b < 0x80 {
  9494. break
  9495. }
  9496. }
  9497. fieldNum := int32(wire >> 3)
  9498. wireType := int(wire & 0x7)
  9499. if wireType == 4 {
  9500. return fmt.Errorf("proto: ResponseEcho: wiretype end group for non-group")
  9501. }
  9502. if fieldNum <= 0 {
  9503. return fmt.Errorf("proto: ResponseEcho: illegal tag %d (wire type %d)", fieldNum, wire)
  9504. }
  9505. switch fieldNum {
  9506. case 1:
  9507. if wireType != 2 {
  9508. return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
  9509. }
  9510. var stringLen uint64
  9511. for shift := uint(0); ; shift += 7 {
  9512. if shift >= 64 {
  9513. return ErrIntOverflowTypes
  9514. }
  9515. if iNdEx >= l {
  9516. return io.ErrUnexpectedEOF
  9517. }
  9518. b := dAtA[iNdEx]
  9519. iNdEx++
  9520. stringLen |= uint64(b&0x7F) << shift
  9521. if b < 0x80 {
  9522. break
  9523. }
  9524. }
  9525. intStringLen := int(stringLen)
  9526. if intStringLen < 0 {
  9527. return ErrInvalidLengthTypes
  9528. }
  9529. postIndex := iNdEx + intStringLen
  9530. if postIndex < 0 {
  9531. return ErrInvalidLengthTypes
  9532. }
  9533. if postIndex > l {
  9534. return io.ErrUnexpectedEOF
  9535. }
  9536. m.Message = string(dAtA[iNdEx:postIndex])
  9537. iNdEx = postIndex
  9538. default:
  9539. iNdEx = preIndex
  9540. skippy, err := skipTypes(dAtA[iNdEx:])
  9541. if err != nil {
  9542. return err
  9543. }
  9544. if skippy < 0 {
  9545. return ErrInvalidLengthTypes
  9546. }
  9547. if (iNdEx + skippy) < 0 {
  9548. return ErrInvalidLengthTypes
  9549. }
  9550. if (iNdEx + skippy) > l {
  9551. return io.ErrUnexpectedEOF
  9552. }
  9553. iNdEx += skippy
  9554. }
  9555. }
  9556. if iNdEx > l {
  9557. return io.ErrUnexpectedEOF
  9558. }
  9559. return nil
  9560. }
  9561. func (m *ResponseFlush) Unmarshal(dAtA []byte) error {
  9562. l := len(dAtA)
  9563. iNdEx := 0
  9564. for iNdEx < l {
  9565. preIndex := iNdEx
  9566. var wire uint64
  9567. for shift := uint(0); ; shift += 7 {
  9568. if shift >= 64 {
  9569. return ErrIntOverflowTypes
  9570. }
  9571. if iNdEx >= l {
  9572. return io.ErrUnexpectedEOF
  9573. }
  9574. b := dAtA[iNdEx]
  9575. iNdEx++
  9576. wire |= uint64(b&0x7F) << shift
  9577. if b < 0x80 {
  9578. break
  9579. }
  9580. }
  9581. fieldNum := int32(wire >> 3)
  9582. wireType := int(wire & 0x7)
  9583. if wireType == 4 {
  9584. return fmt.Errorf("proto: ResponseFlush: wiretype end group for non-group")
  9585. }
  9586. if fieldNum <= 0 {
  9587. return fmt.Errorf("proto: ResponseFlush: illegal tag %d (wire type %d)", fieldNum, wire)
  9588. }
  9589. switch fieldNum {
  9590. default:
  9591. iNdEx = preIndex
  9592. skippy, err := skipTypes(dAtA[iNdEx:])
  9593. if err != nil {
  9594. return err
  9595. }
  9596. if skippy < 0 {
  9597. return ErrInvalidLengthTypes
  9598. }
  9599. if (iNdEx + skippy) < 0 {
  9600. return ErrInvalidLengthTypes
  9601. }
  9602. if (iNdEx + skippy) > l {
  9603. return io.ErrUnexpectedEOF
  9604. }
  9605. iNdEx += skippy
  9606. }
  9607. }
  9608. if iNdEx > l {
  9609. return io.ErrUnexpectedEOF
  9610. }
  9611. return nil
  9612. }
  9613. func (m *ResponseInfo) Unmarshal(dAtA []byte) error {
  9614. l := len(dAtA)
  9615. iNdEx := 0
  9616. for iNdEx < l {
  9617. preIndex := iNdEx
  9618. var wire uint64
  9619. for shift := uint(0); ; shift += 7 {
  9620. if shift >= 64 {
  9621. return ErrIntOverflowTypes
  9622. }
  9623. if iNdEx >= l {
  9624. return io.ErrUnexpectedEOF
  9625. }
  9626. b := dAtA[iNdEx]
  9627. iNdEx++
  9628. wire |= uint64(b&0x7F) << shift
  9629. if b < 0x80 {
  9630. break
  9631. }
  9632. }
  9633. fieldNum := int32(wire >> 3)
  9634. wireType := int(wire & 0x7)
  9635. if wireType == 4 {
  9636. return fmt.Errorf("proto: ResponseInfo: wiretype end group for non-group")
  9637. }
  9638. if fieldNum <= 0 {
  9639. return fmt.Errorf("proto: ResponseInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  9640. }
  9641. switch fieldNum {
  9642. case 1:
  9643. if wireType != 2 {
  9644. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  9645. }
  9646. var stringLen uint64
  9647. for shift := uint(0); ; shift += 7 {
  9648. if shift >= 64 {
  9649. return ErrIntOverflowTypes
  9650. }
  9651. if iNdEx >= l {
  9652. return io.ErrUnexpectedEOF
  9653. }
  9654. b := dAtA[iNdEx]
  9655. iNdEx++
  9656. stringLen |= uint64(b&0x7F) << shift
  9657. if b < 0x80 {
  9658. break
  9659. }
  9660. }
  9661. intStringLen := int(stringLen)
  9662. if intStringLen < 0 {
  9663. return ErrInvalidLengthTypes
  9664. }
  9665. postIndex := iNdEx + intStringLen
  9666. if postIndex < 0 {
  9667. return ErrInvalidLengthTypes
  9668. }
  9669. if postIndex > l {
  9670. return io.ErrUnexpectedEOF
  9671. }
  9672. m.Data = string(dAtA[iNdEx:postIndex])
  9673. iNdEx = postIndex
  9674. case 2:
  9675. if wireType != 2 {
  9676. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  9677. }
  9678. var stringLen uint64
  9679. for shift := uint(0); ; shift += 7 {
  9680. if shift >= 64 {
  9681. return ErrIntOverflowTypes
  9682. }
  9683. if iNdEx >= l {
  9684. return io.ErrUnexpectedEOF
  9685. }
  9686. b := dAtA[iNdEx]
  9687. iNdEx++
  9688. stringLen |= uint64(b&0x7F) << shift
  9689. if b < 0x80 {
  9690. break
  9691. }
  9692. }
  9693. intStringLen := int(stringLen)
  9694. if intStringLen < 0 {
  9695. return ErrInvalidLengthTypes
  9696. }
  9697. postIndex := iNdEx + intStringLen
  9698. if postIndex < 0 {
  9699. return ErrInvalidLengthTypes
  9700. }
  9701. if postIndex > l {
  9702. return io.ErrUnexpectedEOF
  9703. }
  9704. m.Version = string(dAtA[iNdEx:postIndex])
  9705. iNdEx = postIndex
  9706. case 3:
  9707. if wireType != 0 {
  9708. return fmt.Errorf("proto: wrong wireType = %d for field AppVersion", wireType)
  9709. }
  9710. m.AppVersion = 0
  9711. for shift := uint(0); ; shift += 7 {
  9712. if shift >= 64 {
  9713. return ErrIntOverflowTypes
  9714. }
  9715. if iNdEx >= l {
  9716. return io.ErrUnexpectedEOF
  9717. }
  9718. b := dAtA[iNdEx]
  9719. iNdEx++
  9720. m.AppVersion |= uint64(b&0x7F) << shift
  9721. if b < 0x80 {
  9722. break
  9723. }
  9724. }
  9725. case 4:
  9726. if wireType != 0 {
  9727. return fmt.Errorf("proto: wrong wireType = %d for field LastBlockHeight", wireType)
  9728. }
  9729. m.LastBlockHeight = 0
  9730. for shift := uint(0); ; shift += 7 {
  9731. if shift >= 64 {
  9732. return ErrIntOverflowTypes
  9733. }
  9734. if iNdEx >= l {
  9735. return io.ErrUnexpectedEOF
  9736. }
  9737. b := dAtA[iNdEx]
  9738. iNdEx++
  9739. m.LastBlockHeight |= int64(b&0x7F) << shift
  9740. if b < 0x80 {
  9741. break
  9742. }
  9743. }
  9744. case 5:
  9745. if wireType != 2 {
  9746. return fmt.Errorf("proto: wrong wireType = %d for field LastBlockAppHash", wireType)
  9747. }
  9748. var byteLen int
  9749. for shift := uint(0); ; shift += 7 {
  9750. if shift >= 64 {
  9751. return ErrIntOverflowTypes
  9752. }
  9753. if iNdEx >= l {
  9754. return io.ErrUnexpectedEOF
  9755. }
  9756. b := dAtA[iNdEx]
  9757. iNdEx++
  9758. byteLen |= int(b&0x7F) << shift
  9759. if b < 0x80 {
  9760. break
  9761. }
  9762. }
  9763. if byteLen < 0 {
  9764. return ErrInvalidLengthTypes
  9765. }
  9766. postIndex := iNdEx + byteLen
  9767. if postIndex < 0 {
  9768. return ErrInvalidLengthTypes
  9769. }
  9770. if postIndex > l {
  9771. return io.ErrUnexpectedEOF
  9772. }
  9773. m.LastBlockAppHash = append(m.LastBlockAppHash[:0], dAtA[iNdEx:postIndex]...)
  9774. if m.LastBlockAppHash == nil {
  9775. m.LastBlockAppHash = []byte{}
  9776. }
  9777. iNdEx = postIndex
  9778. default:
  9779. iNdEx = preIndex
  9780. skippy, err := skipTypes(dAtA[iNdEx:])
  9781. if err != nil {
  9782. return err
  9783. }
  9784. if skippy < 0 {
  9785. return ErrInvalidLengthTypes
  9786. }
  9787. if (iNdEx + skippy) < 0 {
  9788. return ErrInvalidLengthTypes
  9789. }
  9790. if (iNdEx + skippy) > l {
  9791. return io.ErrUnexpectedEOF
  9792. }
  9793. iNdEx += skippy
  9794. }
  9795. }
  9796. if iNdEx > l {
  9797. return io.ErrUnexpectedEOF
  9798. }
  9799. return nil
  9800. }
  9801. func (m *ResponseInitChain) Unmarshal(dAtA []byte) error {
  9802. l := len(dAtA)
  9803. iNdEx := 0
  9804. for iNdEx < l {
  9805. preIndex := iNdEx
  9806. var wire uint64
  9807. for shift := uint(0); ; shift += 7 {
  9808. if shift >= 64 {
  9809. return ErrIntOverflowTypes
  9810. }
  9811. if iNdEx >= l {
  9812. return io.ErrUnexpectedEOF
  9813. }
  9814. b := dAtA[iNdEx]
  9815. iNdEx++
  9816. wire |= uint64(b&0x7F) << shift
  9817. if b < 0x80 {
  9818. break
  9819. }
  9820. }
  9821. fieldNum := int32(wire >> 3)
  9822. wireType := int(wire & 0x7)
  9823. if wireType == 4 {
  9824. return fmt.Errorf("proto: ResponseInitChain: wiretype end group for non-group")
  9825. }
  9826. if fieldNum <= 0 {
  9827. return fmt.Errorf("proto: ResponseInitChain: illegal tag %d (wire type %d)", fieldNum, wire)
  9828. }
  9829. switch fieldNum {
  9830. case 1:
  9831. if wireType != 2 {
  9832. return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", wireType)
  9833. }
  9834. var msglen int
  9835. for shift := uint(0); ; shift += 7 {
  9836. if shift >= 64 {
  9837. return ErrIntOverflowTypes
  9838. }
  9839. if iNdEx >= l {
  9840. return io.ErrUnexpectedEOF
  9841. }
  9842. b := dAtA[iNdEx]
  9843. iNdEx++
  9844. msglen |= int(b&0x7F) << shift
  9845. if b < 0x80 {
  9846. break
  9847. }
  9848. }
  9849. if msglen < 0 {
  9850. return ErrInvalidLengthTypes
  9851. }
  9852. postIndex := iNdEx + msglen
  9853. if postIndex < 0 {
  9854. return ErrInvalidLengthTypes
  9855. }
  9856. if postIndex > l {
  9857. return io.ErrUnexpectedEOF
  9858. }
  9859. if m.ConsensusParams == nil {
  9860. m.ConsensusParams = &types1.ConsensusParams{}
  9861. }
  9862. if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9863. return err
  9864. }
  9865. iNdEx = postIndex
  9866. case 2:
  9867. if wireType != 2 {
  9868. return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType)
  9869. }
  9870. var msglen int
  9871. for shift := uint(0); ; shift += 7 {
  9872. if shift >= 64 {
  9873. return ErrIntOverflowTypes
  9874. }
  9875. if iNdEx >= l {
  9876. return io.ErrUnexpectedEOF
  9877. }
  9878. b := dAtA[iNdEx]
  9879. iNdEx++
  9880. msglen |= int(b&0x7F) << shift
  9881. if b < 0x80 {
  9882. break
  9883. }
  9884. }
  9885. if msglen < 0 {
  9886. return ErrInvalidLengthTypes
  9887. }
  9888. postIndex := iNdEx + msglen
  9889. if postIndex < 0 {
  9890. return ErrInvalidLengthTypes
  9891. }
  9892. if postIndex > l {
  9893. return io.ErrUnexpectedEOF
  9894. }
  9895. m.Validators = append(m.Validators, ValidatorUpdate{})
  9896. if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  9897. return err
  9898. }
  9899. iNdEx = postIndex
  9900. case 3:
  9901. if wireType != 2 {
  9902. return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType)
  9903. }
  9904. var byteLen int
  9905. for shift := uint(0); ; shift += 7 {
  9906. if shift >= 64 {
  9907. return ErrIntOverflowTypes
  9908. }
  9909. if iNdEx >= l {
  9910. return io.ErrUnexpectedEOF
  9911. }
  9912. b := dAtA[iNdEx]
  9913. iNdEx++
  9914. byteLen |= int(b&0x7F) << shift
  9915. if b < 0x80 {
  9916. break
  9917. }
  9918. }
  9919. if byteLen < 0 {
  9920. return ErrInvalidLengthTypes
  9921. }
  9922. postIndex := iNdEx + byteLen
  9923. if postIndex < 0 {
  9924. return ErrInvalidLengthTypes
  9925. }
  9926. if postIndex > l {
  9927. return io.ErrUnexpectedEOF
  9928. }
  9929. m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...)
  9930. if m.AppHash == nil {
  9931. m.AppHash = []byte{}
  9932. }
  9933. iNdEx = postIndex
  9934. default:
  9935. iNdEx = preIndex
  9936. skippy, err := skipTypes(dAtA[iNdEx:])
  9937. if err != nil {
  9938. return err
  9939. }
  9940. if skippy < 0 {
  9941. return ErrInvalidLengthTypes
  9942. }
  9943. if (iNdEx + skippy) < 0 {
  9944. return ErrInvalidLengthTypes
  9945. }
  9946. if (iNdEx + skippy) > l {
  9947. return io.ErrUnexpectedEOF
  9948. }
  9949. iNdEx += skippy
  9950. }
  9951. }
  9952. if iNdEx > l {
  9953. return io.ErrUnexpectedEOF
  9954. }
  9955. return nil
  9956. }
  9957. func (m *ResponseQuery) Unmarshal(dAtA []byte) error {
  9958. l := len(dAtA)
  9959. iNdEx := 0
  9960. for iNdEx < l {
  9961. preIndex := iNdEx
  9962. var wire uint64
  9963. for shift := uint(0); ; shift += 7 {
  9964. if shift >= 64 {
  9965. return ErrIntOverflowTypes
  9966. }
  9967. if iNdEx >= l {
  9968. return io.ErrUnexpectedEOF
  9969. }
  9970. b := dAtA[iNdEx]
  9971. iNdEx++
  9972. wire |= uint64(b&0x7F) << shift
  9973. if b < 0x80 {
  9974. break
  9975. }
  9976. }
  9977. fieldNum := int32(wire >> 3)
  9978. wireType := int(wire & 0x7)
  9979. if wireType == 4 {
  9980. return fmt.Errorf("proto: ResponseQuery: wiretype end group for non-group")
  9981. }
  9982. if fieldNum <= 0 {
  9983. return fmt.Errorf("proto: ResponseQuery: illegal tag %d (wire type %d)", fieldNum, wire)
  9984. }
  9985. switch fieldNum {
  9986. case 1:
  9987. if wireType != 0 {
  9988. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  9989. }
  9990. m.Code = 0
  9991. for shift := uint(0); ; shift += 7 {
  9992. if shift >= 64 {
  9993. return ErrIntOverflowTypes
  9994. }
  9995. if iNdEx >= l {
  9996. return io.ErrUnexpectedEOF
  9997. }
  9998. b := dAtA[iNdEx]
  9999. iNdEx++
  10000. m.Code |= uint32(b&0x7F) << shift
  10001. if b < 0x80 {
  10002. break
  10003. }
  10004. }
  10005. case 3:
  10006. if wireType != 2 {
  10007. return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType)
  10008. }
  10009. var stringLen uint64
  10010. for shift := uint(0); ; shift += 7 {
  10011. if shift >= 64 {
  10012. return ErrIntOverflowTypes
  10013. }
  10014. if iNdEx >= l {
  10015. return io.ErrUnexpectedEOF
  10016. }
  10017. b := dAtA[iNdEx]
  10018. iNdEx++
  10019. stringLen |= uint64(b&0x7F) << shift
  10020. if b < 0x80 {
  10021. break
  10022. }
  10023. }
  10024. intStringLen := int(stringLen)
  10025. if intStringLen < 0 {
  10026. return ErrInvalidLengthTypes
  10027. }
  10028. postIndex := iNdEx + intStringLen
  10029. if postIndex < 0 {
  10030. return ErrInvalidLengthTypes
  10031. }
  10032. if postIndex > l {
  10033. return io.ErrUnexpectedEOF
  10034. }
  10035. m.Log = string(dAtA[iNdEx:postIndex])
  10036. iNdEx = postIndex
  10037. case 4:
  10038. if wireType != 2 {
  10039. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  10040. }
  10041. var stringLen uint64
  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. stringLen |= uint64(b&0x7F) << shift
  10052. if b < 0x80 {
  10053. break
  10054. }
  10055. }
  10056. intStringLen := int(stringLen)
  10057. if intStringLen < 0 {
  10058. return ErrInvalidLengthTypes
  10059. }
  10060. postIndex := iNdEx + intStringLen
  10061. if postIndex < 0 {
  10062. return ErrInvalidLengthTypes
  10063. }
  10064. if postIndex > l {
  10065. return io.ErrUnexpectedEOF
  10066. }
  10067. m.Info = string(dAtA[iNdEx:postIndex])
  10068. iNdEx = postIndex
  10069. case 5:
  10070. if wireType != 0 {
  10071. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  10072. }
  10073. m.Index = 0
  10074. for shift := uint(0); ; shift += 7 {
  10075. if shift >= 64 {
  10076. return ErrIntOverflowTypes
  10077. }
  10078. if iNdEx >= l {
  10079. return io.ErrUnexpectedEOF
  10080. }
  10081. b := dAtA[iNdEx]
  10082. iNdEx++
  10083. m.Index |= int64(b&0x7F) << shift
  10084. if b < 0x80 {
  10085. break
  10086. }
  10087. }
  10088. case 6:
  10089. if wireType != 2 {
  10090. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  10091. }
  10092. var byteLen int
  10093. for shift := uint(0); ; shift += 7 {
  10094. if shift >= 64 {
  10095. return ErrIntOverflowTypes
  10096. }
  10097. if iNdEx >= l {
  10098. return io.ErrUnexpectedEOF
  10099. }
  10100. b := dAtA[iNdEx]
  10101. iNdEx++
  10102. byteLen |= int(b&0x7F) << shift
  10103. if b < 0x80 {
  10104. break
  10105. }
  10106. }
  10107. if byteLen < 0 {
  10108. return ErrInvalidLengthTypes
  10109. }
  10110. postIndex := iNdEx + byteLen
  10111. if postIndex < 0 {
  10112. return ErrInvalidLengthTypes
  10113. }
  10114. if postIndex > l {
  10115. return io.ErrUnexpectedEOF
  10116. }
  10117. m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
  10118. if m.Key == nil {
  10119. m.Key = []byte{}
  10120. }
  10121. iNdEx = postIndex
  10122. case 7:
  10123. if wireType != 2 {
  10124. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  10125. }
  10126. var byteLen int
  10127. for shift := uint(0); ; shift += 7 {
  10128. if shift >= 64 {
  10129. return ErrIntOverflowTypes
  10130. }
  10131. if iNdEx >= l {
  10132. return io.ErrUnexpectedEOF
  10133. }
  10134. b := dAtA[iNdEx]
  10135. iNdEx++
  10136. byteLen |= int(b&0x7F) << shift
  10137. if b < 0x80 {
  10138. break
  10139. }
  10140. }
  10141. if byteLen < 0 {
  10142. return ErrInvalidLengthTypes
  10143. }
  10144. postIndex := iNdEx + byteLen
  10145. if postIndex < 0 {
  10146. return ErrInvalidLengthTypes
  10147. }
  10148. if postIndex > l {
  10149. return io.ErrUnexpectedEOF
  10150. }
  10151. m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...)
  10152. if m.Value == nil {
  10153. m.Value = []byte{}
  10154. }
  10155. iNdEx = postIndex
  10156. case 8:
  10157. if wireType != 2 {
  10158. return fmt.Errorf("proto: wrong wireType = %d for field ProofOps", wireType)
  10159. }
  10160. var msglen int
  10161. for shift := uint(0); ; shift += 7 {
  10162. if shift >= 64 {
  10163. return ErrIntOverflowTypes
  10164. }
  10165. if iNdEx >= l {
  10166. return io.ErrUnexpectedEOF
  10167. }
  10168. b := dAtA[iNdEx]
  10169. iNdEx++
  10170. msglen |= int(b&0x7F) << shift
  10171. if b < 0x80 {
  10172. break
  10173. }
  10174. }
  10175. if msglen < 0 {
  10176. return ErrInvalidLengthTypes
  10177. }
  10178. postIndex := iNdEx + msglen
  10179. if postIndex < 0 {
  10180. return ErrInvalidLengthTypes
  10181. }
  10182. if postIndex > l {
  10183. return io.ErrUnexpectedEOF
  10184. }
  10185. if m.ProofOps == nil {
  10186. m.ProofOps = &crypto.ProofOps{}
  10187. }
  10188. if err := m.ProofOps.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10189. return err
  10190. }
  10191. iNdEx = postIndex
  10192. case 9:
  10193. if wireType != 0 {
  10194. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  10195. }
  10196. m.Height = 0
  10197. for shift := uint(0); ; shift += 7 {
  10198. if shift >= 64 {
  10199. return ErrIntOverflowTypes
  10200. }
  10201. if iNdEx >= l {
  10202. return io.ErrUnexpectedEOF
  10203. }
  10204. b := dAtA[iNdEx]
  10205. iNdEx++
  10206. m.Height |= int64(b&0x7F) << shift
  10207. if b < 0x80 {
  10208. break
  10209. }
  10210. }
  10211. case 10:
  10212. if wireType != 2 {
  10213. return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType)
  10214. }
  10215. var stringLen uint64
  10216. for shift := uint(0); ; shift += 7 {
  10217. if shift >= 64 {
  10218. return ErrIntOverflowTypes
  10219. }
  10220. if iNdEx >= l {
  10221. return io.ErrUnexpectedEOF
  10222. }
  10223. b := dAtA[iNdEx]
  10224. iNdEx++
  10225. stringLen |= uint64(b&0x7F) << shift
  10226. if b < 0x80 {
  10227. break
  10228. }
  10229. }
  10230. intStringLen := int(stringLen)
  10231. if intStringLen < 0 {
  10232. return ErrInvalidLengthTypes
  10233. }
  10234. postIndex := iNdEx + intStringLen
  10235. if postIndex < 0 {
  10236. return ErrInvalidLengthTypes
  10237. }
  10238. if postIndex > l {
  10239. return io.ErrUnexpectedEOF
  10240. }
  10241. m.Codespace = string(dAtA[iNdEx:postIndex])
  10242. iNdEx = postIndex
  10243. default:
  10244. iNdEx = preIndex
  10245. skippy, err := skipTypes(dAtA[iNdEx:])
  10246. if err != nil {
  10247. return err
  10248. }
  10249. if skippy < 0 {
  10250. return ErrInvalidLengthTypes
  10251. }
  10252. if (iNdEx + skippy) < 0 {
  10253. return ErrInvalidLengthTypes
  10254. }
  10255. if (iNdEx + skippy) > l {
  10256. return io.ErrUnexpectedEOF
  10257. }
  10258. iNdEx += skippy
  10259. }
  10260. }
  10261. if iNdEx > l {
  10262. return io.ErrUnexpectedEOF
  10263. }
  10264. return nil
  10265. }
  10266. func (m *ResponseBeginBlock) Unmarshal(dAtA []byte) error {
  10267. l := len(dAtA)
  10268. iNdEx := 0
  10269. for iNdEx < l {
  10270. preIndex := iNdEx
  10271. var wire uint64
  10272. for shift := uint(0); ; shift += 7 {
  10273. if shift >= 64 {
  10274. return ErrIntOverflowTypes
  10275. }
  10276. if iNdEx >= l {
  10277. return io.ErrUnexpectedEOF
  10278. }
  10279. b := dAtA[iNdEx]
  10280. iNdEx++
  10281. wire |= uint64(b&0x7F) << shift
  10282. if b < 0x80 {
  10283. break
  10284. }
  10285. }
  10286. fieldNum := int32(wire >> 3)
  10287. wireType := int(wire & 0x7)
  10288. if wireType == 4 {
  10289. return fmt.Errorf("proto: ResponseBeginBlock: wiretype end group for non-group")
  10290. }
  10291. if fieldNum <= 0 {
  10292. return fmt.Errorf("proto: ResponseBeginBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  10293. }
  10294. switch fieldNum {
  10295. case 1:
  10296. if wireType != 2 {
  10297. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  10298. }
  10299. var msglen int
  10300. for shift := uint(0); ; shift += 7 {
  10301. if shift >= 64 {
  10302. return ErrIntOverflowTypes
  10303. }
  10304. if iNdEx >= l {
  10305. return io.ErrUnexpectedEOF
  10306. }
  10307. b := dAtA[iNdEx]
  10308. iNdEx++
  10309. msglen |= int(b&0x7F) << shift
  10310. if b < 0x80 {
  10311. break
  10312. }
  10313. }
  10314. if msglen < 0 {
  10315. return ErrInvalidLengthTypes
  10316. }
  10317. postIndex := iNdEx + msglen
  10318. if postIndex < 0 {
  10319. return ErrInvalidLengthTypes
  10320. }
  10321. if postIndex > l {
  10322. return io.ErrUnexpectedEOF
  10323. }
  10324. m.Events = append(m.Events, Event{})
  10325. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10326. return err
  10327. }
  10328. iNdEx = postIndex
  10329. default:
  10330. iNdEx = preIndex
  10331. skippy, err := skipTypes(dAtA[iNdEx:])
  10332. if err != nil {
  10333. return err
  10334. }
  10335. if skippy < 0 {
  10336. return ErrInvalidLengthTypes
  10337. }
  10338. if (iNdEx + skippy) < 0 {
  10339. return ErrInvalidLengthTypes
  10340. }
  10341. if (iNdEx + skippy) > l {
  10342. return io.ErrUnexpectedEOF
  10343. }
  10344. iNdEx += skippy
  10345. }
  10346. }
  10347. if iNdEx > l {
  10348. return io.ErrUnexpectedEOF
  10349. }
  10350. return nil
  10351. }
  10352. func (m *ResponseCheckTx) Unmarshal(dAtA []byte) error {
  10353. l := len(dAtA)
  10354. iNdEx := 0
  10355. for iNdEx < l {
  10356. preIndex := iNdEx
  10357. var wire uint64
  10358. for shift := uint(0); ; shift += 7 {
  10359. if shift >= 64 {
  10360. return ErrIntOverflowTypes
  10361. }
  10362. if iNdEx >= l {
  10363. return io.ErrUnexpectedEOF
  10364. }
  10365. b := dAtA[iNdEx]
  10366. iNdEx++
  10367. wire |= uint64(b&0x7F) << shift
  10368. if b < 0x80 {
  10369. break
  10370. }
  10371. }
  10372. fieldNum := int32(wire >> 3)
  10373. wireType := int(wire & 0x7)
  10374. if wireType == 4 {
  10375. return fmt.Errorf("proto: ResponseCheckTx: wiretype end group for non-group")
  10376. }
  10377. if fieldNum <= 0 {
  10378. return fmt.Errorf("proto: ResponseCheckTx: illegal tag %d (wire type %d)", fieldNum, wire)
  10379. }
  10380. switch fieldNum {
  10381. case 1:
  10382. if wireType != 0 {
  10383. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  10384. }
  10385. m.Code = 0
  10386. for shift := uint(0); ; shift += 7 {
  10387. if shift >= 64 {
  10388. return ErrIntOverflowTypes
  10389. }
  10390. if iNdEx >= l {
  10391. return io.ErrUnexpectedEOF
  10392. }
  10393. b := dAtA[iNdEx]
  10394. iNdEx++
  10395. m.Code |= uint32(b&0x7F) << shift
  10396. if b < 0x80 {
  10397. break
  10398. }
  10399. }
  10400. case 2:
  10401. if wireType != 2 {
  10402. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  10403. }
  10404. var byteLen int
  10405. for shift := uint(0); ; shift += 7 {
  10406. if shift >= 64 {
  10407. return ErrIntOverflowTypes
  10408. }
  10409. if iNdEx >= l {
  10410. return io.ErrUnexpectedEOF
  10411. }
  10412. b := dAtA[iNdEx]
  10413. iNdEx++
  10414. byteLen |= int(b&0x7F) << shift
  10415. if b < 0x80 {
  10416. break
  10417. }
  10418. }
  10419. if byteLen < 0 {
  10420. return ErrInvalidLengthTypes
  10421. }
  10422. postIndex := iNdEx + byteLen
  10423. if postIndex < 0 {
  10424. return ErrInvalidLengthTypes
  10425. }
  10426. if postIndex > l {
  10427. return io.ErrUnexpectedEOF
  10428. }
  10429. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  10430. if m.Data == nil {
  10431. m.Data = []byte{}
  10432. }
  10433. iNdEx = postIndex
  10434. case 3:
  10435. if wireType != 2 {
  10436. return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType)
  10437. }
  10438. var stringLen uint64
  10439. for shift := uint(0); ; shift += 7 {
  10440. if shift >= 64 {
  10441. return ErrIntOverflowTypes
  10442. }
  10443. if iNdEx >= l {
  10444. return io.ErrUnexpectedEOF
  10445. }
  10446. b := dAtA[iNdEx]
  10447. iNdEx++
  10448. stringLen |= uint64(b&0x7F) << shift
  10449. if b < 0x80 {
  10450. break
  10451. }
  10452. }
  10453. intStringLen := int(stringLen)
  10454. if intStringLen < 0 {
  10455. return ErrInvalidLengthTypes
  10456. }
  10457. postIndex := iNdEx + intStringLen
  10458. if postIndex < 0 {
  10459. return ErrInvalidLengthTypes
  10460. }
  10461. if postIndex > l {
  10462. return io.ErrUnexpectedEOF
  10463. }
  10464. m.Log = string(dAtA[iNdEx:postIndex])
  10465. iNdEx = postIndex
  10466. case 4:
  10467. if wireType != 2 {
  10468. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  10469. }
  10470. var stringLen uint64
  10471. for shift := uint(0); ; shift += 7 {
  10472. if shift >= 64 {
  10473. return ErrIntOverflowTypes
  10474. }
  10475. if iNdEx >= l {
  10476. return io.ErrUnexpectedEOF
  10477. }
  10478. b := dAtA[iNdEx]
  10479. iNdEx++
  10480. stringLen |= uint64(b&0x7F) << shift
  10481. if b < 0x80 {
  10482. break
  10483. }
  10484. }
  10485. intStringLen := int(stringLen)
  10486. if intStringLen < 0 {
  10487. return ErrInvalidLengthTypes
  10488. }
  10489. postIndex := iNdEx + intStringLen
  10490. if postIndex < 0 {
  10491. return ErrInvalidLengthTypes
  10492. }
  10493. if postIndex > l {
  10494. return io.ErrUnexpectedEOF
  10495. }
  10496. m.Info = string(dAtA[iNdEx:postIndex])
  10497. iNdEx = postIndex
  10498. case 5:
  10499. if wireType != 0 {
  10500. return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType)
  10501. }
  10502. m.GasWanted = 0
  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. m.GasWanted |= int64(b&0x7F) << shift
  10513. if b < 0x80 {
  10514. break
  10515. }
  10516. }
  10517. case 6:
  10518. if wireType != 0 {
  10519. return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType)
  10520. }
  10521. m.GasUsed = 0
  10522. for shift := uint(0); ; shift += 7 {
  10523. if shift >= 64 {
  10524. return ErrIntOverflowTypes
  10525. }
  10526. if iNdEx >= l {
  10527. return io.ErrUnexpectedEOF
  10528. }
  10529. b := dAtA[iNdEx]
  10530. iNdEx++
  10531. m.GasUsed |= int64(b&0x7F) << shift
  10532. if b < 0x80 {
  10533. break
  10534. }
  10535. }
  10536. case 7:
  10537. if wireType != 2 {
  10538. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  10539. }
  10540. var msglen int
  10541. for shift := uint(0); ; shift += 7 {
  10542. if shift >= 64 {
  10543. return ErrIntOverflowTypes
  10544. }
  10545. if iNdEx >= l {
  10546. return io.ErrUnexpectedEOF
  10547. }
  10548. b := dAtA[iNdEx]
  10549. iNdEx++
  10550. msglen |= int(b&0x7F) << shift
  10551. if b < 0x80 {
  10552. break
  10553. }
  10554. }
  10555. if msglen < 0 {
  10556. return ErrInvalidLengthTypes
  10557. }
  10558. postIndex := iNdEx + msglen
  10559. if postIndex < 0 {
  10560. return ErrInvalidLengthTypes
  10561. }
  10562. if postIndex > l {
  10563. return io.ErrUnexpectedEOF
  10564. }
  10565. m.Events = append(m.Events, Event{})
  10566. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10567. return err
  10568. }
  10569. iNdEx = postIndex
  10570. case 8:
  10571. if wireType != 2 {
  10572. return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType)
  10573. }
  10574. var stringLen uint64
  10575. for shift := uint(0); ; shift += 7 {
  10576. if shift >= 64 {
  10577. return ErrIntOverflowTypes
  10578. }
  10579. if iNdEx >= l {
  10580. return io.ErrUnexpectedEOF
  10581. }
  10582. b := dAtA[iNdEx]
  10583. iNdEx++
  10584. stringLen |= uint64(b&0x7F) << shift
  10585. if b < 0x80 {
  10586. break
  10587. }
  10588. }
  10589. intStringLen := int(stringLen)
  10590. if intStringLen < 0 {
  10591. return ErrInvalidLengthTypes
  10592. }
  10593. postIndex := iNdEx + intStringLen
  10594. if postIndex < 0 {
  10595. return ErrInvalidLengthTypes
  10596. }
  10597. if postIndex > l {
  10598. return io.ErrUnexpectedEOF
  10599. }
  10600. m.Codespace = string(dAtA[iNdEx:postIndex])
  10601. iNdEx = postIndex
  10602. case 9:
  10603. if wireType != 2 {
  10604. return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType)
  10605. }
  10606. var stringLen uint64
  10607. for shift := uint(0); ; shift += 7 {
  10608. if shift >= 64 {
  10609. return ErrIntOverflowTypes
  10610. }
  10611. if iNdEx >= l {
  10612. return io.ErrUnexpectedEOF
  10613. }
  10614. b := dAtA[iNdEx]
  10615. iNdEx++
  10616. stringLen |= uint64(b&0x7F) << shift
  10617. if b < 0x80 {
  10618. break
  10619. }
  10620. }
  10621. intStringLen := int(stringLen)
  10622. if intStringLen < 0 {
  10623. return ErrInvalidLengthTypes
  10624. }
  10625. postIndex := iNdEx + intStringLen
  10626. if postIndex < 0 {
  10627. return ErrInvalidLengthTypes
  10628. }
  10629. if postIndex > l {
  10630. return io.ErrUnexpectedEOF
  10631. }
  10632. m.Sender = string(dAtA[iNdEx:postIndex])
  10633. iNdEx = postIndex
  10634. case 10:
  10635. if wireType != 0 {
  10636. return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType)
  10637. }
  10638. m.Priority = 0
  10639. for shift := uint(0); ; shift += 7 {
  10640. if shift >= 64 {
  10641. return ErrIntOverflowTypes
  10642. }
  10643. if iNdEx >= l {
  10644. return io.ErrUnexpectedEOF
  10645. }
  10646. b := dAtA[iNdEx]
  10647. iNdEx++
  10648. m.Priority |= int64(b&0x7F) << shift
  10649. if b < 0x80 {
  10650. break
  10651. }
  10652. }
  10653. case 11:
  10654. if wireType != 2 {
  10655. return fmt.Errorf("proto: wrong wireType = %d for field MempoolError", wireType)
  10656. }
  10657. var stringLen uint64
  10658. for shift := uint(0); ; shift += 7 {
  10659. if shift >= 64 {
  10660. return ErrIntOverflowTypes
  10661. }
  10662. if iNdEx >= l {
  10663. return io.ErrUnexpectedEOF
  10664. }
  10665. b := dAtA[iNdEx]
  10666. iNdEx++
  10667. stringLen |= uint64(b&0x7F) << shift
  10668. if b < 0x80 {
  10669. break
  10670. }
  10671. }
  10672. intStringLen := int(stringLen)
  10673. if intStringLen < 0 {
  10674. return ErrInvalidLengthTypes
  10675. }
  10676. postIndex := iNdEx + intStringLen
  10677. if postIndex < 0 {
  10678. return ErrInvalidLengthTypes
  10679. }
  10680. if postIndex > l {
  10681. return io.ErrUnexpectedEOF
  10682. }
  10683. m.MempoolError = string(dAtA[iNdEx:postIndex])
  10684. iNdEx = postIndex
  10685. default:
  10686. iNdEx = preIndex
  10687. skippy, err := skipTypes(dAtA[iNdEx:])
  10688. if err != nil {
  10689. return err
  10690. }
  10691. if skippy < 0 {
  10692. return ErrInvalidLengthTypes
  10693. }
  10694. if (iNdEx + skippy) < 0 {
  10695. return ErrInvalidLengthTypes
  10696. }
  10697. if (iNdEx + skippy) > l {
  10698. return io.ErrUnexpectedEOF
  10699. }
  10700. iNdEx += skippy
  10701. }
  10702. }
  10703. if iNdEx > l {
  10704. return io.ErrUnexpectedEOF
  10705. }
  10706. return nil
  10707. }
  10708. func (m *ResponseDeliverTx) Unmarshal(dAtA []byte) error {
  10709. l := len(dAtA)
  10710. iNdEx := 0
  10711. for iNdEx < l {
  10712. preIndex := iNdEx
  10713. var wire uint64
  10714. for shift := uint(0); ; shift += 7 {
  10715. if shift >= 64 {
  10716. return ErrIntOverflowTypes
  10717. }
  10718. if iNdEx >= l {
  10719. return io.ErrUnexpectedEOF
  10720. }
  10721. b := dAtA[iNdEx]
  10722. iNdEx++
  10723. wire |= uint64(b&0x7F) << shift
  10724. if b < 0x80 {
  10725. break
  10726. }
  10727. }
  10728. fieldNum := int32(wire >> 3)
  10729. wireType := int(wire & 0x7)
  10730. if wireType == 4 {
  10731. return fmt.Errorf("proto: ResponseDeliverTx: wiretype end group for non-group")
  10732. }
  10733. if fieldNum <= 0 {
  10734. return fmt.Errorf("proto: ResponseDeliverTx: illegal tag %d (wire type %d)", fieldNum, wire)
  10735. }
  10736. switch fieldNum {
  10737. case 1:
  10738. if wireType != 0 {
  10739. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  10740. }
  10741. m.Code = 0
  10742. for shift := uint(0); ; shift += 7 {
  10743. if shift >= 64 {
  10744. return ErrIntOverflowTypes
  10745. }
  10746. if iNdEx >= l {
  10747. return io.ErrUnexpectedEOF
  10748. }
  10749. b := dAtA[iNdEx]
  10750. iNdEx++
  10751. m.Code |= uint32(b&0x7F) << shift
  10752. if b < 0x80 {
  10753. break
  10754. }
  10755. }
  10756. case 2:
  10757. if wireType != 2 {
  10758. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  10759. }
  10760. var byteLen int
  10761. for shift := uint(0); ; shift += 7 {
  10762. if shift >= 64 {
  10763. return ErrIntOverflowTypes
  10764. }
  10765. if iNdEx >= l {
  10766. return io.ErrUnexpectedEOF
  10767. }
  10768. b := dAtA[iNdEx]
  10769. iNdEx++
  10770. byteLen |= int(b&0x7F) << shift
  10771. if b < 0x80 {
  10772. break
  10773. }
  10774. }
  10775. if byteLen < 0 {
  10776. return ErrInvalidLengthTypes
  10777. }
  10778. postIndex := iNdEx + byteLen
  10779. if postIndex < 0 {
  10780. return ErrInvalidLengthTypes
  10781. }
  10782. if postIndex > l {
  10783. return io.ErrUnexpectedEOF
  10784. }
  10785. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  10786. if m.Data == nil {
  10787. m.Data = []byte{}
  10788. }
  10789. iNdEx = postIndex
  10790. case 3:
  10791. if wireType != 2 {
  10792. return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType)
  10793. }
  10794. var stringLen uint64
  10795. for shift := uint(0); ; shift += 7 {
  10796. if shift >= 64 {
  10797. return ErrIntOverflowTypes
  10798. }
  10799. if iNdEx >= l {
  10800. return io.ErrUnexpectedEOF
  10801. }
  10802. b := dAtA[iNdEx]
  10803. iNdEx++
  10804. stringLen |= uint64(b&0x7F) << shift
  10805. if b < 0x80 {
  10806. break
  10807. }
  10808. }
  10809. intStringLen := int(stringLen)
  10810. if intStringLen < 0 {
  10811. return ErrInvalidLengthTypes
  10812. }
  10813. postIndex := iNdEx + intStringLen
  10814. if postIndex < 0 {
  10815. return ErrInvalidLengthTypes
  10816. }
  10817. if postIndex > l {
  10818. return io.ErrUnexpectedEOF
  10819. }
  10820. m.Log = string(dAtA[iNdEx:postIndex])
  10821. iNdEx = postIndex
  10822. case 4:
  10823. if wireType != 2 {
  10824. return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
  10825. }
  10826. var stringLen uint64
  10827. for shift := uint(0); ; shift += 7 {
  10828. if shift >= 64 {
  10829. return ErrIntOverflowTypes
  10830. }
  10831. if iNdEx >= l {
  10832. return io.ErrUnexpectedEOF
  10833. }
  10834. b := dAtA[iNdEx]
  10835. iNdEx++
  10836. stringLen |= uint64(b&0x7F) << shift
  10837. if b < 0x80 {
  10838. break
  10839. }
  10840. }
  10841. intStringLen := int(stringLen)
  10842. if intStringLen < 0 {
  10843. return ErrInvalidLengthTypes
  10844. }
  10845. postIndex := iNdEx + intStringLen
  10846. if postIndex < 0 {
  10847. return ErrInvalidLengthTypes
  10848. }
  10849. if postIndex > l {
  10850. return io.ErrUnexpectedEOF
  10851. }
  10852. m.Info = string(dAtA[iNdEx:postIndex])
  10853. iNdEx = postIndex
  10854. case 5:
  10855. if wireType != 0 {
  10856. return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType)
  10857. }
  10858. m.GasWanted = 0
  10859. for shift := uint(0); ; shift += 7 {
  10860. if shift >= 64 {
  10861. return ErrIntOverflowTypes
  10862. }
  10863. if iNdEx >= l {
  10864. return io.ErrUnexpectedEOF
  10865. }
  10866. b := dAtA[iNdEx]
  10867. iNdEx++
  10868. m.GasWanted |= int64(b&0x7F) << shift
  10869. if b < 0x80 {
  10870. break
  10871. }
  10872. }
  10873. case 6:
  10874. if wireType != 0 {
  10875. return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType)
  10876. }
  10877. m.GasUsed = 0
  10878. for shift := uint(0); ; shift += 7 {
  10879. if shift >= 64 {
  10880. return ErrIntOverflowTypes
  10881. }
  10882. if iNdEx >= l {
  10883. return io.ErrUnexpectedEOF
  10884. }
  10885. b := dAtA[iNdEx]
  10886. iNdEx++
  10887. m.GasUsed |= int64(b&0x7F) << shift
  10888. if b < 0x80 {
  10889. break
  10890. }
  10891. }
  10892. case 7:
  10893. if wireType != 2 {
  10894. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  10895. }
  10896. var msglen int
  10897. for shift := uint(0); ; shift += 7 {
  10898. if shift >= 64 {
  10899. return ErrIntOverflowTypes
  10900. }
  10901. if iNdEx >= l {
  10902. return io.ErrUnexpectedEOF
  10903. }
  10904. b := dAtA[iNdEx]
  10905. iNdEx++
  10906. msglen |= int(b&0x7F) << shift
  10907. if b < 0x80 {
  10908. break
  10909. }
  10910. }
  10911. if msglen < 0 {
  10912. return ErrInvalidLengthTypes
  10913. }
  10914. postIndex := iNdEx + msglen
  10915. if postIndex < 0 {
  10916. return ErrInvalidLengthTypes
  10917. }
  10918. if postIndex > l {
  10919. return io.ErrUnexpectedEOF
  10920. }
  10921. m.Events = append(m.Events, Event{})
  10922. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  10923. return err
  10924. }
  10925. iNdEx = postIndex
  10926. case 8:
  10927. if wireType != 2 {
  10928. return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType)
  10929. }
  10930. var stringLen uint64
  10931. for shift := uint(0); ; shift += 7 {
  10932. if shift >= 64 {
  10933. return ErrIntOverflowTypes
  10934. }
  10935. if iNdEx >= l {
  10936. return io.ErrUnexpectedEOF
  10937. }
  10938. b := dAtA[iNdEx]
  10939. iNdEx++
  10940. stringLen |= uint64(b&0x7F) << shift
  10941. if b < 0x80 {
  10942. break
  10943. }
  10944. }
  10945. intStringLen := int(stringLen)
  10946. if intStringLen < 0 {
  10947. return ErrInvalidLengthTypes
  10948. }
  10949. postIndex := iNdEx + intStringLen
  10950. if postIndex < 0 {
  10951. return ErrInvalidLengthTypes
  10952. }
  10953. if postIndex > l {
  10954. return io.ErrUnexpectedEOF
  10955. }
  10956. m.Codespace = string(dAtA[iNdEx:postIndex])
  10957. iNdEx = postIndex
  10958. default:
  10959. iNdEx = preIndex
  10960. skippy, err := skipTypes(dAtA[iNdEx:])
  10961. if err != nil {
  10962. return err
  10963. }
  10964. if skippy < 0 {
  10965. return ErrInvalidLengthTypes
  10966. }
  10967. if (iNdEx + skippy) < 0 {
  10968. return ErrInvalidLengthTypes
  10969. }
  10970. if (iNdEx + skippy) > l {
  10971. return io.ErrUnexpectedEOF
  10972. }
  10973. iNdEx += skippy
  10974. }
  10975. }
  10976. if iNdEx > l {
  10977. return io.ErrUnexpectedEOF
  10978. }
  10979. return nil
  10980. }
  10981. func (m *ResponseEndBlock) Unmarshal(dAtA []byte) error {
  10982. l := len(dAtA)
  10983. iNdEx := 0
  10984. for iNdEx < l {
  10985. preIndex := iNdEx
  10986. var wire uint64
  10987. for shift := uint(0); ; shift += 7 {
  10988. if shift >= 64 {
  10989. return ErrIntOverflowTypes
  10990. }
  10991. if iNdEx >= l {
  10992. return io.ErrUnexpectedEOF
  10993. }
  10994. b := dAtA[iNdEx]
  10995. iNdEx++
  10996. wire |= uint64(b&0x7F) << shift
  10997. if b < 0x80 {
  10998. break
  10999. }
  11000. }
  11001. fieldNum := int32(wire >> 3)
  11002. wireType := int(wire & 0x7)
  11003. if wireType == 4 {
  11004. return fmt.Errorf("proto: ResponseEndBlock: wiretype end group for non-group")
  11005. }
  11006. if fieldNum <= 0 {
  11007. return fmt.Errorf("proto: ResponseEndBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  11008. }
  11009. switch fieldNum {
  11010. case 1:
  11011. if wireType != 2 {
  11012. return fmt.Errorf("proto: wrong wireType = %d for field ValidatorUpdates", wireType)
  11013. }
  11014. var msglen int
  11015. for shift := uint(0); ; shift += 7 {
  11016. if shift >= 64 {
  11017. return ErrIntOverflowTypes
  11018. }
  11019. if iNdEx >= l {
  11020. return io.ErrUnexpectedEOF
  11021. }
  11022. b := dAtA[iNdEx]
  11023. iNdEx++
  11024. msglen |= int(b&0x7F) << shift
  11025. if b < 0x80 {
  11026. break
  11027. }
  11028. }
  11029. if msglen < 0 {
  11030. return ErrInvalidLengthTypes
  11031. }
  11032. postIndex := iNdEx + msglen
  11033. if postIndex < 0 {
  11034. return ErrInvalidLengthTypes
  11035. }
  11036. if postIndex > l {
  11037. return io.ErrUnexpectedEOF
  11038. }
  11039. m.ValidatorUpdates = append(m.ValidatorUpdates, ValidatorUpdate{})
  11040. if err := m.ValidatorUpdates[len(m.ValidatorUpdates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11041. return err
  11042. }
  11043. iNdEx = postIndex
  11044. case 2:
  11045. if wireType != 2 {
  11046. return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParamUpdates", wireType)
  11047. }
  11048. var msglen int
  11049. for shift := uint(0); ; shift += 7 {
  11050. if shift >= 64 {
  11051. return ErrIntOverflowTypes
  11052. }
  11053. if iNdEx >= l {
  11054. return io.ErrUnexpectedEOF
  11055. }
  11056. b := dAtA[iNdEx]
  11057. iNdEx++
  11058. msglen |= int(b&0x7F) << shift
  11059. if b < 0x80 {
  11060. break
  11061. }
  11062. }
  11063. if msglen < 0 {
  11064. return ErrInvalidLengthTypes
  11065. }
  11066. postIndex := iNdEx + msglen
  11067. if postIndex < 0 {
  11068. return ErrInvalidLengthTypes
  11069. }
  11070. if postIndex > l {
  11071. return io.ErrUnexpectedEOF
  11072. }
  11073. if m.ConsensusParamUpdates == nil {
  11074. m.ConsensusParamUpdates = &types1.ConsensusParams{}
  11075. }
  11076. if err := m.ConsensusParamUpdates.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11077. return err
  11078. }
  11079. iNdEx = postIndex
  11080. case 3:
  11081. if wireType != 2 {
  11082. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  11083. }
  11084. var msglen int
  11085. for shift := uint(0); ; shift += 7 {
  11086. if shift >= 64 {
  11087. return ErrIntOverflowTypes
  11088. }
  11089. if iNdEx >= l {
  11090. return io.ErrUnexpectedEOF
  11091. }
  11092. b := dAtA[iNdEx]
  11093. iNdEx++
  11094. msglen |= int(b&0x7F) << shift
  11095. if b < 0x80 {
  11096. break
  11097. }
  11098. }
  11099. if msglen < 0 {
  11100. return ErrInvalidLengthTypes
  11101. }
  11102. postIndex := iNdEx + msglen
  11103. if postIndex < 0 {
  11104. return ErrInvalidLengthTypes
  11105. }
  11106. if postIndex > l {
  11107. return io.ErrUnexpectedEOF
  11108. }
  11109. m.Events = append(m.Events, Event{})
  11110. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11111. return err
  11112. }
  11113. iNdEx = postIndex
  11114. default:
  11115. iNdEx = preIndex
  11116. skippy, err := skipTypes(dAtA[iNdEx:])
  11117. if err != nil {
  11118. return err
  11119. }
  11120. if skippy < 0 {
  11121. return ErrInvalidLengthTypes
  11122. }
  11123. if (iNdEx + skippy) < 0 {
  11124. return ErrInvalidLengthTypes
  11125. }
  11126. if (iNdEx + skippy) > l {
  11127. return io.ErrUnexpectedEOF
  11128. }
  11129. iNdEx += skippy
  11130. }
  11131. }
  11132. if iNdEx > l {
  11133. return io.ErrUnexpectedEOF
  11134. }
  11135. return nil
  11136. }
  11137. func (m *ResponseCommit) Unmarshal(dAtA []byte) error {
  11138. l := len(dAtA)
  11139. iNdEx := 0
  11140. for iNdEx < l {
  11141. preIndex := iNdEx
  11142. var wire uint64
  11143. for shift := uint(0); ; shift += 7 {
  11144. if shift >= 64 {
  11145. return ErrIntOverflowTypes
  11146. }
  11147. if iNdEx >= l {
  11148. return io.ErrUnexpectedEOF
  11149. }
  11150. b := dAtA[iNdEx]
  11151. iNdEx++
  11152. wire |= uint64(b&0x7F) << shift
  11153. if b < 0x80 {
  11154. break
  11155. }
  11156. }
  11157. fieldNum := int32(wire >> 3)
  11158. wireType := int(wire & 0x7)
  11159. if wireType == 4 {
  11160. return fmt.Errorf("proto: ResponseCommit: wiretype end group for non-group")
  11161. }
  11162. if fieldNum <= 0 {
  11163. return fmt.Errorf("proto: ResponseCommit: illegal tag %d (wire type %d)", fieldNum, wire)
  11164. }
  11165. switch fieldNum {
  11166. case 2:
  11167. if wireType != 2 {
  11168. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  11169. }
  11170. var byteLen int
  11171. for shift := uint(0); ; shift += 7 {
  11172. if shift >= 64 {
  11173. return ErrIntOverflowTypes
  11174. }
  11175. if iNdEx >= l {
  11176. return io.ErrUnexpectedEOF
  11177. }
  11178. b := dAtA[iNdEx]
  11179. iNdEx++
  11180. byteLen |= int(b&0x7F) << shift
  11181. if b < 0x80 {
  11182. break
  11183. }
  11184. }
  11185. if byteLen < 0 {
  11186. return ErrInvalidLengthTypes
  11187. }
  11188. postIndex := iNdEx + byteLen
  11189. if postIndex < 0 {
  11190. return ErrInvalidLengthTypes
  11191. }
  11192. if postIndex > l {
  11193. return io.ErrUnexpectedEOF
  11194. }
  11195. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  11196. if m.Data == nil {
  11197. m.Data = []byte{}
  11198. }
  11199. iNdEx = postIndex
  11200. case 3:
  11201. if wireType != 0 {
  11202. return fmt.Errorf("proto: wrong wireType = %d for field RetainHeight", wireType)
  11203. }
  11204. m.RetainHeight = 0
  11205. for shift := uint(0); ; shift += 7 {
  11206. if shift >= 64 {
  11207. return ErrIntOverflowTypes
  11208. }
  11209. if iNdEx >= l {
  11210. return io.ErrUnexpectedEOF
  11211. }
  11212. b := dAtA[iNdEx]
  11213. iNdEx++
  11214. m.RetainHeight |= int64(b&0x7F) << shift
  11215. if b < 0x80 {
  11216. break
  11217. }
  11218. }
  11219. default:
  11220. iNdEx = preIndex
  11221. skippy, err := skipTypes(dAtA[iNdEx:])
  11222. if err != nil {
  11223. return err
  11224. }
  11225. if skippy < 0 {
  11226. return ErrInvalidLengthTypes
  11227. }
  11228. if (iNdEx + skippy) < 0 {
  11229. return ErrInvalidLengthTypes
  11230. }
  11231. if (iNdEx + skippy) > l {
  11232. return io.ErrUnexpectedEOF
  11233. }
  11234. iNdEx += skippy
  11235. }
  11236. }
  11237. if iNdEx > l {
  11238. return io.ErrUnexpectedEOF
  11239. }
  11240. return nil
  11241. }
  11242. func (m *ResponseListSnapshots) Unmarshal(dAtA []byte) error {
  11243. l := len(dAtA)
  11244. iNdEx := 0
  11245. for iNdEx < l {
  11246. preIndex := iNdEx
  11247. var wire uint64
  11248. for shift := uint(0); ; shift += 7 {
  11249. if shift >= 64 {
  11250. return ErrIntOverflowTypes
  11251. }
  11252. if iNdEx >= l {
  11253. return io.ErrUnexpectedEOF
  11254. }
  11255. b := dAtA[iNdEx]
  11256. iNdEx++
  11257. wire |= uint64(b&0x7F) << shift
  11258. if b < 0x80 {
  11259. break
  11260. }
  11261. }
  11262. fieldNum := int32(wire >> 3)
  11263. wireType := int(wire & 0x7)
  11264. if wireType == 4 {
  11265. return fmt.Errorf("proto: ResponseListSnapshots: wiretype end group for non-group")
  11266. }
  11267. if fieldNum <= 0 {
  11268. return fmt.Errorf("proto: ResponseListSnapshots: illegal tag %d (wire type %d)", fieldNum, wire)
  11269. }
  11270. switch fieldNum {
  11271. case 1:
  11272. if wireType != 2 {
  11273. return fmt.Errorf("proto: wrong wireType = %d for field Snapshots", wireType)
  11274. }
  11275. var msglen int
  11276. for shift := uint(0); ; shift += 7 {
  11277. if shift >= 64 {
  11278. return ErrIntOverflowTypes
  11279. }
  11280. if iNdEx >= l {
  11281. return io.ErrUnexpectedEOF
  11282. }
  11283. b := dAtA[iNdEx]
  11284. iNdEx++
  11285. msglen |= int(b&0x7F) << shift
  11286. if b < 0x80 {
  11287. break
  11288. }
  11289. }
  11290. if msglen < 0 {
  11291. return ErrInvalidLengthTypes
  11292. }
  11293. postIndex := iNdEx + msglen
  11294. if postIndex < 0 {
  11295. return ErrInvalidLengthTypes
  11296. }
  11297. if postIndex > l {
  11298. return io.ErrUnexpectedEOF
  11299. }
  11300. m.Snapshots = append(m.Snapshots, &Snapshot{})
  11301. if err := m.Snapshots[len(m.Snapshots)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11302. return err
  11303. }
  11304. iNdEx = postIndex
  11305. default:
  11306. iNdEx = preIndex
  11307. skippy, err := skipTypes(dAtA[iNdEx:])
  11308. if err != nil {
  11309. return err
  11310. }
  11311. if skippy < 0 {
  11312. return ErrInvalidLengthTypes
  11313. }
  11314. if (iNdEx + skippy) < 0 {
  11315. return ErrInvalidLengthTypes
  11316. }
  11317. if (iNdEx + skippy) > l {
  11318. return io.ErrUnexpectedEOF
  11319. }
  11320. iNdEx += skippy
  11321. }
  11322. }
  11323. if iNdEx > l {
  11324. return io.ErrUnexpectedEOF
  11325. }
  11326. return nil
  11327. }
  11328. func (m *ResponseOfferSnapshot) Unmarshal(dAtA []byte) error {
  11329. l := len(dAtA)
  11330. iNdEx := 0
  11331. for iNdEx < l {
  11332. preIndex := iNdEx
  11333. var wire uint64
  11334. for shift := uint(0); ; shift += 7 {
  11335. if shift >= 64 {
  11336. return ErrIntOverflowTypes
  11337. }
  11338. if iNdEx >= l {
  11339. return io.ErrUnexpectedEOF
  11340. }
  11341. b := dAtA[iNdEx]
  11342. iNdEx++
  11343. wire |= uint64(b&0x7F) << shift
  11344. if b < 0x80 {
  11345. break
  11346. }
  11347. }
  11348. fieldNum := int32(wire >> 3)
  11349. wireType := int(wire & 0x7)
  11350. if wireType == 4 {
  11351. return fmt.Errorf("proto: ResponseOfferSnapshot: wiretype end group for non-group")
  11352. }
  11353. if fieldNum <= 0 {
  11354. return fmt.Errorf("proto: ResponseOfferSnapshot: illegal tag %d (wire type %d)", fieldNum, wire)
  11355. }
  11356. switch fieldNum {
  11357. case 1:
  11358. if wireType != 0 {
  11359. return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
  11360. }
  11361. m.Result = 0
  11362. for shift := uint(0); ; shift += 7 {
  11363. if shift >= 64 {
  11364. return ErrIntOverflowTypes
  11365. }
  11366. if iNdEx >= l {
  11367. return io.ErrUnexpectedEOF
  11368. }
  11369. b := dAtA[iNdEx]
  11370. iNdEx++
  11371. m.Result |= ResponseOfferSnapshot_Result(b&0x7F) << shift
  11372. if b < 0x80 {
  11373. break
  11374. }
  11375. }
  11376. default:
  11377. iNdEx = preIndex
  11378. skippy, err := skipTypes(dAtA[iNdEx:])
  11379. if err != nil {
  11380. return err
  11381. }
  11382. if skippy < 0 {
  11383. return ErrInvalidLengthTypes
  11384. }
  11385. if (iNdEx + skippy) < 0 {
  11386. return ErrInvalidLengthTypes
  11387. }
  11388. if (iNdEx + skippy) > l {
  11389. return io.ErrUnexpectedEOF
  11390. }
  11391. iNdEx += skippy
  11392. }
  11393. }
  11394. if iNdEx > l {
  11395. return io.ErrUnexpectedEOF
  11396. }
  11397. return nil
  11398. }
  11399. func (m *ResponseLoadSnapshotChunk) Unmarshal(dAtA []byte) error {
  11400. l := len(dAtA)
  11401. iNdEx := 0
  11402. for iNdEx < l {
  11403. preIndex := iNdEx
  11404. var wire uint64
  11405. for shift := uint(0); ; shift += 7 {
  11406. if shift >= 64 {
  11407. return ErrIntOverflowTypes
  11408. }
  11409. if iNdEx >= l {
  11410. return io.ErrUnexpectedEOF
  11411. }
  11412. b := dAtA[iNdEx]
  11413. iNdEx++
  11414. wire |= uint64(b&0x7F) << shift
  11415. if b < 0x80 {
  11416. break
  11417. }
  11418. }
  11419. fieldNum := int32(wire >> 3)
  11420. wireType := int(wire & 0x7)
  11421. if wireType == 4 {
  11422. return fmt.Errorf("proto: ResponseLoadSnapshotChunk: wiretype end group for non-group")
  11423. }
  11424. if fieldNum <= 0 {
  11425. return fmt.Errorf("proto: ResponseLoadSnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  11426. }
  11427. switch fieldNum {
  11428. case 1:
  11429. if wireType != 2 {
  11430. return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType)
  11431. }
  11432. var byteLen int
  11433. for shift := uint(0); ; shift += 7 {
  11434. if shift >= 64 {
  11435. return ErrIntOverflowTypes
  11436. }
  11437. if iNdEx >= l {
  11438. return io.ErrUnexpectedEOF
  11439. }
  11440. b := dAtA[iNdEx]
  11441. iNdEx++
  11442. byteLen |= int(b&0x7F) << shift
  11443. if b < 0x80 {
  11444. break
  11445. }
  11446. }
  11447. if byteLen < 0 {
  11448. return ErrInvalidLengthTypes
  11449. }
  11450. postIndex := iNdEx + byteLen
  11451. if postIndex < 0 {
  11452. return ErrInvalidLengthTypes
  11453. }
  11454. if postIndex > l {
  11455. return io.ErrUnexpectedEOF
  11456. }
  11457. m.Chunk = append(m.Chunk[:0], dAtA[iNdEx:postIndex]...)
  11458. if m.Chunk == nil {
  11459. m.Chunk = []byte{}
  11460. }
  11461. iNdEx = postIndex
  11462. default:
  11463. iNdEx = preIndex
  11464. skippy, err := skipTypes(dAtA[iNdEx:])
  11465. if err != nil {
  11466. return err
  11467. }
  11468. if skippy < 0 {
  11469. return ErrInvalidLengthTypes
  11470. }
  11471. if (iNdEx + skippy) < 0 {
  11472. return ErrInvalidLengthTypes
  11473. }
  11474. if (iNdEx + skippy) > l {
  11475. return io.ErrUnexpectedEOF
  11476. }
  11477. iNdEx += skippy
  11478. }
  11479. }
  11480. if iNdEx > l {
  11481. return io.ErrUnexpectedEOF
  11482. }
  11483. return nil
  11484. }
  11485. func (m *ResponseApplySnapshotChunk) Unmarshal(dAtA []byte) error {
  11486. l := len(dAtA)
  11487. iNdEx := 0
  11488. for iNdEx < l {
  11489. preIndex := iNdEx
  11490. var wire uint64
  11491. for shift := uint(0); ; shift += 7 {
  11492. if shift >= 64 {
  11493. return ErrIntOverflowTypes
  11494. }
  11495. if iNdEx >= l {
  11496. return io.ErrUnexpectedEOF
  11497. }
  11498. b := dAtA[iNdEx]
  11499. iNdEx++
  11500. wire |= uint64(b&0x7F) << shift
  11501. if b < 0x80 {
  11502. break
  11503. }
  11504. }
  11505. fieldNum := int32(wire >> 3)
  11506. wireType := int(wire & 0x7)
  11507. if wireType == 4 {
  11508. return fmt.Errorf("proto: ResponseApplySnapshotChunk: wiretype end group for non-group")
  11509. }
  11510. if fieldNum <= 0 {
  11511. return fmt.Errorf("proto: ResponseApplySnapshotChunk: illegal tag %d (wire type %d)", fieldNum, wire)
  11512. }
  11513. switch fieldNum {
  11514. case 1:
  11515. if wireType != 0 {
  11516. return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
  11517. }
  11518. m.Result = 0
  11519. for shift := uint(0); ; shift += 7 {
  11520. if shift >= 64 {
  11521. return ErrIntOverflowTypes
  11522. }
  11523. if iNdEx >= l {
  11524. return io.ErrUnexpectedEOF
  11525. }
  11526. b := dAtA[iNdEx]
  11527. iNdEx++
  11528. m.Result |= ResponseApplySnapshotChunk_Result(b&0x7F) << shift
  11529. if b < 0x80 {
  11530. break
  11531. }
  11532. }
  11533. case 2:
  11534. if wireType == 0 {
  11535. var v uint32
  11536. for shift := uint(0); ; shift += 7 {
  11537. if shift >= 64 {
  11538. return ErrIntOverflowTypes
  11539. }
  11540. if iNdEx >= l {
  11541. return io.ErrUnexpectedEOF
  11542. }
  11543. b := dAtA[iNdEx]
  11544. iNdEx++
  11545. v |= uint32(b&0x7F) << shift
  11546. if b < 0x80 {
  11547. break
  11548. }
  11549. }
  11550. m.RefetchChunks = append(m.RefetchChunks, v)
  11551. } else if wireType == 2 {
  11552. var packedLen int
  11553. for shift := uint(0); ; shift += 7 {
  11554. if shift >= 64 {
  11555. return ErrIntOverflowTypes
  11556. }
  11557. if iNdEx >= l {
  11558. return io.ErrUnexpectedEOF
  11559. }
  11560. b := dAtA[iNdEx]
  11561. iNdEx++
  11562. packedLen |= int(b&0x7F) << shift
  11563. if b < 0x80 {
  11564. break
  11565. }
  11566. }
  11567. if packedLen < 0 {
  11568. return ErrInvalidLengthTypes
  11569. }
  11570. postIndex := iNdEx + packedLen
  11571. if postIndex < 0 {
  11572. return ErrInvalidLengthTypes
  11573. }
  11574. if postIndex > l {
  11575. return io.ErrUnexpectedEOF
  11576. }
  11577. var elementCount int
  11578. var count int
  11579. for _, integer := range dAtA[iNdEx:postIndex] {
  11580. if integer < 128 {
  11581. count++
  11582. }
  11583. }
  11584. elementCount = count
  11585. if elementCount != 0 && len(m.RefetchChunks) == 0 {
  11586. m.RefetchChunks = make([]uint32, 0, elementCount)
  11587. }
  11588. for iNdEx < postIndex {
  11589. var v uint32
  11590. for shift := uint(0); ; shift += 7 {
  11591. if shift >= 64 {
  11592. return ErrIntOverflowTypes
  11593. }
  11594. if iNdEx >= l {
  11595. return io.ErrUnexpectedEOF
  11596. }
  11597. b := dAtA[iNdEx]
  11598. iNdEx++
  11599. v |= uint32(b&0x7F) << shift
  11600. if b < 0x80 {
  11601. break
  11602. }
  11603. }
  11604. m.RefetchChunks = append(m.RefetchChunks, v)
  11605. }
  11606. } else {
  11607. return fmt.Errorf("proto: wrong wireType = %d for field RefetchChunks", wireType)
  11608. }
  11609. case 3:
  11610. if wireType != 2 {
  11611. return fmt.Errorf("proto: wrong wireType = %d for field RejectSenders", wireType)
  11612. }
  11613. var stringLen uint64
  11614. for shift := uint(0); ; shift += 7 {
  11615. if shift >= 64 {
  11616. return ErrIntOverflowTypes
  11617. }
  11618. if iNdEx >= l {
  11619. return io.ErrUnexpectedEOF
  11620. }
  11621. b := dAtA[iNdEx]
  11622. iNdEx++
  11623. stringLen |= uint64(b&0x7F) << shift
  11624. if b < 0x80 {
  11625. break
  11626. }
  11627. }
  11628. intStringLen := int(stringLen)
  11629. if intStringLen < 0 {
  11630. return ErrInvalidLengthTypes
  11631. }
  11632. postIndex := iNdEx + intStringLen
  11633. if postIndex < 0 {
  11634. return ErrInvalidLengthTypes
  11635. }
  11636. if postIndex > l {
  11637. return io.ErrUnexpectedEOF
  11638. }
  11639. m.RejectSenders = append(m.RejectSenders, string(dAtA[iNdEx:postIndex]))
  11640. iNdEx = postIndex
  11641. default:
  11642. iNdEx = preIndex
  11643. skippy, err := skipTypes(dAtA[iNdEx:])
  11644. if err != nil {
  11645. return err
  11646. }
  11647. if skippy < 0 {
  11648. return ErrInvalidLengthTypes
  11649. }
  11650. if (iNdEx + skippy) < 0 {
  11651. return ErrInvalidLengthTypes
  11652. }
  11653. if (iNdEx + skippy) > l {
  11654. return io.ErrUnexpectedEOF
  11655. }
  11656. iNdEx += skippy
  11657. }
  11658. }
  11659. if iNdEx > l {
  11660. return io.ErrUnexpectedEOF
  11661. }
  11662. return nil
  11663. }
  11664. func (m *LastCommitInfo) Unmarshal(dAtA []byte) error {
  11665. l := len(dAtA)
  11666. iNdEx := 0
  11667. for iNdEx < l {
  11668. preIndex := iNdEx
  11669. var wire uint64
  11670. for shift := uint(0); ; shift += 7 {
  11671. if shift >= 64 {
  11672. return ErrIntOverflowTypes
  11673. }
  11674. if iNdEx >= l {
  11675. return io.ErrUnexpectedEOF
  11676. }
  11677. b := dAtA[iNdEx]
  11678. iNdEx++
  11679. wire |= uint64(b&0x7F) << shift
  11680. if b < 0x80 {
  11681. break
  11682. }
  11683. }
  11684. fieldNum := int32(wire >> 3)
  11685. wireType := int(wire & 0x7)
  11686. if wireType == 4 {
  11687. return fmt.Errorf("proto: LastCommitInfo: wiretype end group for non-group")
  11688. }
  11689. if fieldNum <= 0 {
  11690. return fmt.Errorf("proto: LastCommitInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  11691. }
  11692. switch fieldNum {
  11693. case 1:
  11694. if wireType != 0 {
  11695. return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType)
  11696. }
  11697. m.Round = 0
  11698. for shift := uint(0); ; shift += 7 {
  11699. if shift >= 64 {
  11700. return ErrIntOverflowTypes
  11701. }
  11702. if iNdEx >= l {
  11703. return io.ErrUnexpectedEOF
  11704. }
  11705. b := dAtA[iNdEx]
  11706. iNdEx++
  11707. m.Round |= int32(b&0x7F) << shift
  11708. if b < 0x80 {
  11709. break
  11710. }
  11711. }
  11712. case 2:
  11713. if wireType != 2 {
  11714. return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType)
  11715. }
  11716. var msglen 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. msglen |= int(b&0x7F) << shift
  11727. if b < 0x80 {
  11728. break
  11729. }
  11730. }
  11731. if msglen < 0 {
  11732. return ErrInvalidLengthTypes
  11733. }
  11734. postIndex := iNdEx + msglen
  11735. if postIndex < 0 {
  11736. return ErrInvalidLengthTypes
  11737. }
  11738. if postIndex > l {
  11739. return io.ErrUnexpectedEOF
  11740. }
  11741. m.Votes = append(m.Votes, VoteInfo{})
  11742. if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11743. return err
  11744. }
  11745. iNdEx = postIndex
  11746. default:
  11747. iNdEx = preIndex
  11748. skippy, err := skipTypes(dAtA[iNdEx:])
  11749. if err != nil {
  11750. return err
  11751. }
  11752. if skippy < 0 {
  11753. return ErrInvalidLengthTypes
  11754. }
  11755. if (iNdEx + skippy) < 0 {
  11756. return ErrInvalidLengthTypes
  11757. }
  11758. if (iNdEx + skippy) > l {
  11759. return io.ErrUnexpectedEOF
  11760. }
  11761. iNdEx += skippy
  11762. }
  11763. }
  11764. if iNdEx > l {
  11765. return io.ErrUnexpectedEOF
  11766. }
  11767. return nil
  11768. }
  11769. func (m *Event) Unmarshal(dAtA []byte) error {
  11770. l := len(dAtA)
  11771. iNdEx := 0
  11772. for iNdEx < l {
  11773. preIndex := iNdEx
  11774. var wire uint64
  11775. for shift := uint(0); ; shift += 7 {
  11776. if shift >= 64 {
  11777. return ErrIntOverflowTypes
  11778. }
  11779. if iNdEx >= l {
  11780. return io.ErrUnexpectedEOF
  11781. }
  11782. b := dAtA[iNdEx]
  11783. iNdEx++
  11784. wire |= uint64(b&0x7F) << shift
  11785. if b < 0x80 {
  11786. break
  11787. }
  11788. }
  11789. fieldNum := int32(wire >> 3)
  11790. wireType := int(wire & 0x7)
  11791. if wireType == 4 {
  11792. return fmt.Errorf("proto: Event: wiretype end group for non-group")
  11793. }
  11794. if fieldNum <= 0 {
  11795. return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire)
  11796. }
  11797. switch fieldNum {
  11798. case 1:
  11799. if wireType != 2 {
  11800. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  11801. }
  11802. var stringLen uint64
  11803. for shift := uint(0); ; shift += 7 {
  11804. if shift >= 64 {
  11805. return ErrIntOverflowTypes
  11806. }
  11807. if iNdEx >= l {
  11808. return io.ErrUnexpectedEOF
  11809. }
  11810. b := dAtA[iNdEx]
  11811. iNdEx++
  11812. stringLen |= uint64(b&0x7F) << shift
  11813. if b < 0x80 {
  11814. break
  11815. }
  11816. }
  11817. intStringLen := int(stringLen)
  11818. if intStringLen < 0 {
  11819. return ErrInvalidLengthTypes
  11820. }
  11821. postIndex := iNdEx + intStringLen
  11822. if postIndex < 0 {
  11823. return ErrInvalidLengthTypes
  11824. }
  11825. if postIndex > l {
  11826. return io.ErrUnexpectedEOF
  11827. }
  11828. m.Type = string(dAtA[iNdEx:postIndex])
  11829. iNdEx = postIndex
  11830. case 2:
  11831. if wireType != 2 {
  11832. return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType)
  11833. }
  11834. var msglen int
  11835. for shift := uint(0); ; shift += 7 {
  11836. if shift >= 64 {
  11837. return ErrIntOverflowTypes
  11838. }
  11839. if iNdEx >= l {
  11840. return io.ErrUnexpectedEOF
  11841. }
  11842. b := dAtA[iNdEx]
  11843. iNdEx++
  11844. msglen |= int(b&0x7F) << shift
  11845. if b < 0x80 {
  11846. break
  11847. }
  11848. }
  11849. if msglen < 0 {
  11850. return ErrInvalidLengthTypes
  11851. }
  11852. postIndex := iNdEx + msglen
  11853. if postIndex < 0 {
  11854. return ErrInvalidLengthTypes
  11855. }
  11856. if postIndex > l {
  11857. return io.ErrUnexpectedEOF
  11858. }
  11859. m.Attributes = append(m.Attributes, EventAttribute{})
  11860. if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  11861. return err
  11862. }
  11863. iNdEx = postIndex
  11864. default:
  11865. iNdEx = preIndex
  11866. skippy, err := skipTypes(dAtA[iNdEx:])
  11867. if err != nil {
  11868. return err
  11869. }
  11870. if skippy < 0 {
  11871. return ErrInvalidLengthTypes
  11872. }
  11873. if (iNdEx + skippy) < 0 {
  11874. return ErrInvalidLengthTypes
  11875. }
  11876. if (iNdEx + skippy) > l {
  11877. return io.ErrUnexpectedEOF
  11878. }
  11879. iNdEx += skippy
  11880. }
  11881. }
  11882. if iNdEx > l {
  11883. return io.ErrUnexpectedEOF
  11884. }
  11885. return nil
  11886. }
  11887. func (m *EventAttribute) Unmarshal(dAtA []byte) error {
  11888. l := len(dAtA)
  11889. iNdEx := 0
  11890. for iNdEx < l {
  11891. preIndex := iNdEx
  11892. var wire uint64
  11893. for shift := uint(0); ; shift += 7 {
  11894. if shift >= 64 {
  11895. return ErrIntOverflowTypes
  11896. }
  11897. if iNdEx >= l {
  11898. return io.ErrUnexpectedEOF
  11899. }
  11900. b := dAtA[iNdEx]
  11901. iNdEx++
  11902. wire |= uint64(b&0x7F) << shift
  11903. if b < 0x80 {
  11904. break
  11905. }
  11906. }
  11907. fieldNum := int32(wire >> 3)
  11908. wireType := int(wire & 0x7)
  11909. if wireType == 4 {
  11910. return fmt.Errorf("proto: EventAttribute: wiretype end group for non-group")
  11911. }
  11912. if fieldNum <= 0 {
  11913. return fmt.Errorf("proto: EventAttribute: illegal tag %d (wire type %d)", fieldNum, wire)
  11914. }
  11915. switch fieldNum {
  11916. case 1:
  11917. if wireType != 2 {
  11918. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  11919. }
  11920. var stringLen uint64
  11921. for shift := uint(0); ; shift += 7 {
  11922. if shift >= 64 {
  11923. return ErrIntOverflowTypes
  11924. }
  11925. if iNdEx >= l {
  11926. return io.ErrUnexpectedEOF
  11927. }
  11928. b := dAtA[iNdEx]
  11929. iNdEx++
  11930. stringLen |= uint64(b&0x7F) << shift
  11931. if b < 0x80 {
  11932. break
  11933. }
  11934. }
  11935. intStringLen := int(stringLen)
  11936. if intStringLen < 0 {
  11937. return ErrInvalidLengthTypes
  11938. }
  11939. postIndex := iNdEx + intStringLen
  11940. if postIndex < 0 {
  11941. return ErrInvalidLengthTypes
  11942. }
  11943. if postIndex > l {
  11944. return io.ErrUnexpectedEOF
  11945. }
  11946. m.Key = string(dAtA[iNdEx:postIndex])
  11947. iNdEx = postIndex
  11948. case 2:
  11949. if wireType != 2 {
  11950. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  11951. }
  11952. var stringLen uint64
  11953. for shift := uint(0); ; shift += 7 {
  11954. if shift >= 64 {
  11955. return ErrIntOverflowTypes
  11956. }
  11957. if iNdEx >= l {
  11958. return io.ErrUnexpectedEOF
  11959. }
  11960. b := dAtA[iNdEx]
  11961. iNdEx++
  11962. stringLen |= uint64(b&0x7F) << shift
  11963. if b < 0x80 {
  11964. break
  11965. }
  11966. }
  11967. intStringLen := int(stringLen)
  11968. if intStringLen < 0 {
  11969. return ErrInvalidLengthTypes
  11970. }
  11971. postIndex := iNdEx + intStringLen
  11972. if postIndex < 0 {
  11973. return ErrInvalidLengthTypes
  11974. }
  11975. if postIndex > l {
  11976. return io.ErrUnexpectedEOF
  11977. }
  11978. m.Value = string(dAtA[iNdEx:postIndex])
  11979. iNdEx = postIndex
  11980. case 3:
  11981. if wireType != 0 {
  11982. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  11983. }
  11984. var v int
  11985. for shift := uint(0); ; shift += 7 {
  11986. if shift >= 64 {
  11987. return ErrIntOverflowTypes
  11988. }
  11989. if iNdEx >= l {
  11990. return io.ErrUnexpectedEOF
  11991. }
  11992. b := dAtA[iNdEx]
  11993. iNdEx++
  11994. v |= int(b&0x7F) << shift
  11995. if b < 0x80 {
  11996. break
  11997. }
  11998. }
  11999. m.Index = bool(v != 0)
  12000. default:
  12001. iNdEx = preIndex
  12002. skippy, err := skipTypes(dAtA[iNdEx:])
  12003. if err != nil {
  12004. return err
  12005. }
  12006. if skippy < 0 {
  12007. return ErrInvalidLengthTypes
  12008. }
  12009. if (iNdEx + skippy) < 0 {
  12010. return ErrInvalidLengthTypes
  12011. }
  12012. if (iNdEx + skippy) > l {
  12013. return io.ErrUnexpectedEOF
  12014. }
  12015. iNdEx += skippy
  12016. }
  12017. }
  12018. if iNdEx > l {
  12019. return io.ErrUnexpectedEOF
  12020. }
  12021. return nil
  12022. }
  12023. func (m *TxResult) Unmarshal(dAtA []byte) error {
  12024. l := len(dAtA)
  12025. iNdEx := 0
  12026. for iNdEx < l {
  12027. preIndex := iNdEx
  12028. var wire uint64
  12029. for shift := uint(0); ; shift += 7 {
  12030. if shift >= 64 {
  12031. return ErrIntOverflowTypes
  12032. }
  12033. if iNdEx >= l {
  12034. return io.ErrUnexpectedEOF
  12035. }
  12036. b := dAtA[iNdEx]
  12037. iNdEx++
  12038. wire |= uint64(b&0x7F) << shift
  12039. if b < 0x80 {
  12040. break
  12041. }
  12042. }
  12043. fieldNum := int32(wire >> 3)
  12044. wireType := int(wire & 0x7)
  12045. if wireType == 4 {
  12046. return fmt.Errorf("proto: TxResult: wiretype end group for non-group")
  12047. }
  12048. if fieldNum <= 0 {
  12049. return fmt.Errorf("proto: TxResult: illegal tag %d (wire type %d)", fieldNum, wire)
  12050. }
  12051. switch fieldNum {
  12052. case 1:
  12053. if wireType != 0 {
  12054. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  12055. }
  12056. m.Height = 0
  12057. for shift := uint(0); ; shift += 7 {
  12058. if shift >= 64 {
  12059. return ErrIntOverflowTypes
  12060. }
  12061. if iNdEx >= l {
  12062. return io.ErrUnexpectedEOF
  12063. }
  12064. b := dAtA[iNdEx]
  12065. iNdEx++
  12066. m.Height |= int64(b&0x7F) << shift
  12067. if b < 0x80 {
  12068. break
  12069. }
  12070. }
  12071. case 2:
  12072. if wireType != 0 {
  12073. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  12074. }
  12075. m.Index = 0
  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. m.Index |= uint32(b&0x7F) << shift
  12086. if b < 0x80 {
  12087. break
  12088. }
  12089. }
  12090. case 3:
  12091. if wireType != 2 {
  12092. return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
  12093. }
  12094. var byteLen int
  12095. for shift := uint(0); ; shift += 7 {
  12096. if shift >= 64 {
  12097. return ErrIntOverflowTypes
  12098. }
  12099. if iNdEx >= l {
  12100. return io.ErrUnexpectedEOF
  12101. }
  12102. b := dAtA[iNdEx]
  12103. iNdEx++
  12104. byteLen |= int(b&0x7F) << shift
  12105. if b < 0x80 {
  12106. break
  12107. }
  12108. }
  12109. if byteLen < 0 {
  12110. return ErrInvalidLengthTypes
  12111. }
  12112. postIndex := iNdEx + byteLen
  12113. if postIndex < 0 {
  12114. return ErrInvalidLengthTypes
  12115. }
  12116. if postIndex > l {
  12117. return io.ErrUnexpectedEOF
  12118. }
  12119. m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...)
  12120. if m.Tx == nil {
  12121. m.Tx = []byte{}
  12122. }
  12123. iNdEx = postIndex
  12124. case 4:
  12125. if wireType != 2 {
  12126. return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
  12127. }
  12128. var msglen int
  12129. for shift := uint(0); ; shift += 7 {
  12130. if shift >= 64 {
  12131. return ErrIntOverflowTypes
  12132. }
  12133. if iNdEx >= l {
  12134. return io.ErrUnexpectedEOF
  12135. }
  12136. b := dAtA[iNdEx]
  12137. iNdEx++
  12138. msglen |= int(b&0x7F) << shift
  12139. if b < 0x80 {
  12140. break
  12141. }
  12142. }
  12143. if msglen < 0 {
  12144. return ErrInvalidLengthTypes
  12145. }
  12146. postIndex := iNdEx + msglen
  12147. if postIndex < 0 {
  12148. return ErrInvalidLengthTypes
  12149. }
  12150. if postIndex > l {
  12151. return io.ErrUnexpectedEOF
  12152. }
  12153. if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12154. return err
  12155. }
  12156. iNdEx = postIndex
  12157. default:
  12158. iNdEx = preIndex
  12159. skippy, err := skipTypes(dAtA[iNdEx:])
  12160. if err != nil {
  12161. return err
  12162. }
  12163. if skippy < 0 {
  12164. return ErrInvalidLengthTypes
  12165. }
  12166. if (iNdEx + skippy) < 0 {
  12167. return ErrInvalidLengthTypes
  12168. }
  12169. if (iNdEx + skippy) > l {
  12170. return io.ErrUnexpectedEOF
  12171. }
  12172. iNdEx += skippy
  12173. }
  12174. }
  12175. if iNdEx > l {
  12176. return io.ErrUnexpectedEOF
  12177. }
  12178. return nil
  12179. }
  12180. func (m *Validator) Unmarshal(dAtA []byte) error {
  12181. l := len(dAtA)
  12182. iNdEx := 0
  12183. for iNdEx < l {
  12184. preIndex := iNdEx
  12185. var wire uint64
  12186. for shift := uint(0); ; shift += 7 {
  12187. if shift >= 64 {
  12188. return ErrIntOverflowTypes
  12189. }
  12190. if iNdEx >= l {
  12191. return io.ErrUnexpectedEOF
  12192. }
  12193. b := dAtA[iNdEx]
  12194. iNdEx++
  12195. wire |= uint64(b&0x7F) << shift
  12196. if b < 0x80 {
  12197. break
  12198. }
  12199. }
  12200. fieldNum := int32(wire >> 3)
  12201. wireType := int(wire & 0x7)
  12202. if wireType == 4 {
  12203. return fmt.Errorf("proto: Validator: wiretype end group for non-group")
  12204. }
  12205. if fieldNum <= 0 {
  12206. return fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire)
  12207. }
  12208. switch fieldNum {
  12209. case 1:
  12210. if wireType != 2 {
  12211. return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
  12212. }
  12213. var byteLen int
  12214. for shift := uint(0); ; shift += 7 {
  12215. if shift >= 64 {
  12216. return ErrIntOverflowTypes
  12217. }
  12218. if iNdEx >= l {
  12219. return io.ErrUnexpectedEOF
  12220. }
  12221. b := dAtA[iNdEx]
  12222. iNdEx++
  12223. byteLen |= int(b&0x7F) << shift
  12224. if b < 0x80 {
  12225. break
  12226. }
  12227. }
  12228. if byteLen < 0 {
  12229. return ErrInvalidLengthTypes
  12230. }
  12231. postIndex := iNdEx + byteLen
  12232. if postIndex < 0 {
  12233. return ErrInvalidLengthTypes
  12234. }
  12235. if postIndex > l {
  12236. return io.ErrUnexpectedEOF
  12237. }
  12238. m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...)
  12239. if m.Address == nil {
  12240. m.Address = []byte{}
  12241. }
  12242. iNdEx = postIndex
  12243. case 3:
  12244. if wireType != 0 {
  12245. return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType)
  12246. }
  12247. m.Power = 0
  12248. for shift := uint(0); ; shift += 7 {
  12249. if shift >= 64 {
  12250. return ErrIntOverflowTypes
  12251. }
  12252. if iNdEx >= l {
  12253. return io.ErrUnexpectedEOF
  12254. }
  12255. b := dAtA[iNdEx]
  12256. iNdEx++
  12257. m.Power |= int64(b&0x7F) << shift
  12258. if b < 0x80 {
  12259. break
  12260. }
  12261. }
  12262. default:
  12263. iNdEx = preIndex
  12264. skippy, err := skipTypes(dAtA[iNdEx:])
  12265. if err != nil {
  12266. return err
  12267. }
  12268. if skippy < 0 {
  12269. return ErrInvalidLengthTypes
  12270. }
  12271. if (iNdEx + skippy) < 0 {
  12272. return ErrInvalidLengthTypes
  12273. }
  12274. if (iNdEx + skippy) > l {
  12275. return io.ErrUnexpectedEOF
  12276. }
  12277. iNdEx += skippy
  12278. }
  12279. }
  12280. if iNdEx > l {
  12281. return io.ErrUnexpectedEOF
  12282. }
  12283. return nil
  12284. }
  12285. func (m *ValidatorUpdate) Unmarshal(dAtA []byte) error {
  12286. l := len(dAtA)
  12287. iNdEx := 0
  12288. for iNdEx < l {
  12289. preIndex := iNdEx
  12290. var wire uint64
  12291. for shift := uint(0); ; shift += 7 {
  12292. if shift >= 64 {
  12293. return ErrIntOverflowTypes
  12294. }
  12295. if iNdEx >= l {
  12296. return io.ErrUnexpectedEOF
  12297. }
  12298. b := dAtA[iNdEx]
  12299. iNdEx++
  12300. wire |= uint64(b&0x7F) << shift
  12301. if b < 0x80 {
  12302. break
  12303. }
  12304. }
  12305. fieldNum := int32(wire >> 3)
  12306. wireType := int(wire & 0x7)
  12307. if wireType == 4 {
  12308. return fmt.Errorf("proto: ValidatorUpdate: wiretype end group for non-group")
  12309. }
  12310. if fieldNum <= 0 {
  12311. return fmt.Errorf("proto: ValidatorUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
  12312. }
  12313. switch fieldNum {
  12314. case 1:
  12315. if wireType != 2 {
  12316. return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType)
  12317. }
  12318. var msglen int
  12319. for shift := uint(0); ; shift += 7 {
  12320. if shift >= 64 {
  12321. return ErrIntOverflowTypes
  12322. }
  12323. if iNdEx >= l {
  12324. return io.ErrUnexpectedEOF
  12325. }
  12326. b := dAtA[iNdEx]
  12327. iNdEx++
  12328. msglen |= int(b&0x7F) << shift
  12329. if b < 0x80 {
  12330. break
  12331. }
  12332. }
  12333. if msglen < 0 {
  12334. return ErrInvalidLengthTypes
  12335. }
  12336. postIndex := iNdEx + msglen
  12337. if postIndex < 0 {
  12338. return ErrInvalidLengthTypes
  12339. }
  12340. if postIndex > l {
  12341. return io.ErrUnexpectedEOF
  12342. }
  12343. if err := m.PubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12344. return err
  12345. }
  12346. iNdEx = postIndex
  12347. case 2:
  12348. if wireType != 0 {
  12349. return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType)
  12350. }
  12351. m.Power = 0
  12352. for shift := uint(0); ; shift += 7 {
  12353. if shift >= 64 {
  12354. return ErrIntOverflowTypes
  12355. }
  12356. if iNdEx >= l {
  12357. return io.ErrUnexpectedEOF
  12358. }
  12359. b := dAtA[iNdEx]
  12360. iNdEx++
  12361. m.Power |= int64(b&0x7F) << shift
  12362. if b < 0x80 {
  12363. break
  12364. }
  12365. }
  12366. default:
  12367. iNdEx = preIndex
  12368. skippy, err := skipTypes(dAtA[iNdEx:])
  12369. if err != nil {
  12370. return err
  12371. }
  12372. if skippy < 0 {
  12373. return ErrInvalidLengthTypes
  12374. }
  12375. if (iNdEx + skippy) < 0 {
  12376. return ErrInvalidLengthTypes
  12377. }
  12378. if (iNdEx + skippy) > l {
  12379. return io.ErrUnexpectedEOF
  12380. }
  12381. iNdEx += skippy
  12382. }
  12383. }
  12384. if iNdEx > l {
  12385. return io.ErrUnexpectedEOF
  12386. }
  12387. return nil
  12388. }
  12389. func (m *VoteInfo) Unmarshal(dAtA []byte) error {
  12390. l := len(dAtA)
  12391. iNdEx := 0
  12392. for iNdEx < l {
  12393. preIndex := iNdEx
  12394. var wire uint64
  12395. for shift := uint(0); ; shift += 7 {
  12396. if shift >= 64 {
  12397. return ErrIntOverflowTypes
  12398. }
  12399. if iNdEx >= l {
  12400. return io.ErrUnexpectedEOF
  12401. }
  12402. b := dAtA[iNdEx]
  12403. iNdEx++
  12404. wire |= uint64(b&0x7F) << shift
  12405. if b < 0x80 {
  12406. break
  12407. }
  12408. }
  12409. fieldNum := int32(wire >> 3)
  12410. wireType := int(wire & 0x7)
  12411. if wireType == 4 {
  12412. return fmt.Errorf("proto: VoteInfo: wiretype end group for non-group")
  12413. }
  12414. if fieldNum <= 0 {
  12415. return fmt.Errorf("proto: VoteInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  12416. }
  12417. switch fieldNum {
  12418. case 1:
  12419. if wireType != 2 {
  12420. return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType)
  12421. }
  12422. var msglen int
  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. msglen |= int(b&0x7F) << shift
  12433. if b < 0x80 {
  12434. break
  12435. }
  12436. }
  12437. if msglen < 0 {
  12438. return ErrInvalidLengthTypes
  12439. }
  12440. postIndex := iNdEx + msglen
  12441. if postIndex < 0 {
  12442. return ErrInvalidLengthTypes
  12443. }
  12444. if postIndex > l {
  12445. return io.ErrUnexpectedEOF
  12446. }
  12447. if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12448. return err
  12449. }
  12450. iNdEx = postIndex
  12451. case 2:
  12452. if wireType != 0 {
  12453. return fmt.Errorf("proto: wrong wireType = %d for field SignedLastBlock", wireType)
  12454. }
  12455. var v int
  12456. for shift := uint(0); ; shift += 7 {
  12457. if shift >= 64 {
  12458. return ErrIntOverflowTypes
  12459. }
  12460. if iNdEx >= l {
  12461. return io.ErrUnexpectedEOF
  12462. }
  12463. b := dAtA[iNdEx]
  12464. iNdEx++
  12465. v |= int(b&0x7F) << shift
  12466. if b < 0x80 {
  12467. break
  12468. }
  12469. }
  12470. m.SignedLastBlock = bool(v != 0)
  12471. default:
  12472. iNdEx = preIndex
  12473. skippy, err := skipTypes(dAtA[iNdEx:])
  12474. if err != nil {
  12475. return err
  12476. }
  12477. if skippy < 0 {
  12478. return ErrInvalidLengthTypes
  12479. }
  12480. if (iNdEx + skippy) < 0 {
  12481. return ErrInvalidLengthTypes
  12482. }
  12483. if (iNdEx + skippy) > l {
  12484. return io.ErrUnexpectedEOF
  12485. }
  12486. iNdEx += skippy
  12487. }
  12488. }
  12489. if iNdEx > l {
  12490. return io.ErrUnexpectedEOF
  12491. }
  12492. return nil
  12493. }
  12494. func (m *Evidence) Unmarshal(dAtA []byte) error {
  12495. l := len(dAtA)
  12496. iNdEx := 0
  12497. for iNdEx < l {
  12498. preIndex := iNdEx
  12499. var wire uint64
  12500. for shift := uint(0); ; shift += 7 {
  12501. if shift >= 64 {
  12502. return ErrIntOverflowTypes
  12503. }
  12504. if iNdEx >= l {
  12505. return io.ErrUnexpectedEOF
  12506. }
  12507. b := dAtA[iNdEx]
  12508. iNdEx++
  12509. wire |= uint64(b&0x7F) << shift
  12510. if b < 0x80 {
  12511. break
  12512. }
  12513. }
  12514. fieldNum := int32(wire >> 3)
  12515. wireType := int(wire & 0x7)
  12516. if wireType == 4 {
  12517. return fmt.Errorf("proto: Evidence: wiretype end group for non-group")
  12518. }
  12519. if fieldNum <= 0 {
  12520. return fmt.Errorf("proto: Evidence: illegal tag %d (wire type %d)", fieldNum, wire)
  12521. }
  12522. switch fieldNum {
  12523. case 1:
  12524. if wireType != 0 {
  12525. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  12526. }
  12527. m.Type = 0
  12528. for shift := uint(0); ; shift += 7 {
  12529. if shift >= 64 {
  12530. return ErrIntOverflowTypes
  12531. }
  12532. if iNdEx >= l {
  12533. return io.ErrUnexpectedEOF
  12534. }
  12535. b := dAtA[iNdEx]
  12536. iNdEx++
  12537. m.Type |= EvidenceType(b&0x7F) << shift
  12538. if b < 0x80 {
  12539. break
  12540. }
  12541. }
  12542. case 2:
  12543. if wireType != 2 {
  12544. return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType)
  12545. }
  12546. var msglen int
  12547. for shift := uint(0); ; shift += 7 {
  12548. if shift >= 64 {
  12549. return ErrIntOverflowTypes
  12550. }
  12551. if iNdEx >= l {
  12552. return io.ErrUnexpectedEOF
  12553. }
  12554. b := dAtA[iNdEx]
  12555. iNdEx++
  12556. msglen |= int(b&0x7F) << shift
  12557. if b < 0x80 {
  12558. break
  12559. }
  12560. }
  12561. if msglen < 0 {
  12562. return ErrInvalidLengthTypes
  12563. }
  12564. postIndex := iNdEx + msglen
  12565. if postIndex < 0 {
  12566. return ErrInvalidLengthTypes
  12567. }
  12568. if postIndex > l {
  12569. return io.ErrUnexpectedEOF
  12570. }
  12571. if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  12572. return err
  12573. }
  12574. iNdEx = postIndex
  12575. case 3:
  12576. if wireType != 0 {
  12577. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  12578. }
  12579. m.Height = 0
  12580. for shift := uint(0); ; shift += 7 {
  12581. if shift >= 64 {
  12582. return ErrIntOverflowTypes
  12583. }
  12584. if iNdEx >= l {
  12585. return io.ErrUnexpectedEOF
  12586. }
  12587. b := dAtA[iNdEx]
  12588. iNdEx++
  12589. m.Height |= int64(b&0x7F) << shift
  12590. if b < 0x80 {
  12591. break
  12592. }
  12593. }
  12594. case 4:
  12595. if wireType != 2 {
  12596. return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
  12597. }
  12598. var msglen int
  12599. for shift := uint(0); ; shift += 7 {
  12600. if shift >= 64 {
  12601. return ErrIntOverflowTypes
  12602. }
  12603. if iNdEx >= l {
  12604. return io.ErrUnexpectedEOF
  12605. }
  12606. b := dAtA[iNdEx]
  12607. iNdEx++
  12608. msglen |= int(b&0x7F) << shift
  12609. if b < 0x80 {
  12610. break
  12611. }
  12612. }
  12613. if msglen < 0 {
  12614. return ErrInvalidLengthTypes
  12615. }
  12616. postIndex := iNdEx + msglen
  12617. if postIndex < 0 {
  12618. return ErrInvalidLengthTypes
  12619. }
  12620. if postIndex > l {
  12621. return io.ErrUnexpectedEOF
  12622. }
  12623. if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil {
  12624. return err
  12625. }
  12626. iNdEx = postIndex
  12627. case 5:
  12628. if wireType != 0 {
  12629. return fmt.Errorf("proto: wrong wireType = %d for field TotalVotingPower", wireType)
  12630. }
  12631. m.TotalVotingPower = 0
  12632. for shift := uint(0); ; shift += 7 {
  12633. if shift >= 64 {
  12634. return ErrIntOverflowTypes
  12635. }
  12636. if iNdEx >= l {
  12637. return io.ErrUnexpectedEOF
  12638. }
  12639. b := dAtA[iNdEx]
  12640. iNdEx++
  12641. m.TotalVotingPower |= int64(b&0x7F) << shift
  12642. if b < 0x80 {
  12643. break
  12644. }
  12645. }
  12646. default:
  12647. iNdEx = preIndex
  12648. skippy, err := skipTypes(dAtA[iNdEx:])
  12649. if err != nil {
  12650. return err
  12651. }
  12652. if skippy < 0 {
  12653. return ErrInvalidLengthTypes
  12654. }
  12655. if (iNdEx + skippy) < 0 {
  12656. return ErrInvalidLengthTypes
  12657. }
  12658. if (iNdEx + skippy) > l {
  12659. return io.ErrUnexpectedEOF
  12660. }
  12661. iNdEx += skippy
  12662. }
  12663. }
  12664. if iNdEx > l {
  12665. return io.ErrUnexpectedEOF
  12666. }
  12667. return nil
  12668. }
  12669. func (m *Snapshot) Unmarshal(dAtA []byte) error {
  12670. l := len(dAtA)
  12671. iNdEx := 0
  12672. for iNdEx < l {
  12673. preIndex := iNdEx
  12674. var wire uint64
  12675. for shift := uint(0); ; shift += 7 {
  12676. if shift >= 64 {
  12677. return ErrIntOverflowTypes
  12678. }
  12679. if iNdEx >= l {
  12680. return io.ErrUnexpectedEOF
  12681. }
  12682. b := dAtA[iNdEx]
  12683. iNdEx++
  12684. wire |= uint64(b&0x7F) << shift
  12685. if b < 0x80 {
  12686. break
  12687. }
  12688. }
  12689. fieldNum := int32(wire >> 3)
  12690. wireType := int(wire & 0x7)
  12691. if wireType == 4 {
  12692. return fmt.Errorf("proto: Snapshot: wiretype end group for non-group")
  12693. }
  12694. if fieldNum <= 0 {
  12695. return fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire)
  12696. }
  12697. switch fieldNum {
  12698. case 1:
  12699. if wireType != 0 {
  12700. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  12701. }
  12702. m.Height = 0
  12703. for shift := uint(0); ; shift += 7 {
  12704. if shift >= 64 {
  12705. return ErrIntOverflowTypes
  12706. }
  12707. if iNdEx >= l {
  12708. return io.ErrUnexpectedEOF
  12709. }
  12710. b := dAtA[iNdEx]
  12711. iNdEx++
  12712. m.Height |= uint64(b&0x7F) << shift
  12713. if b < 0x80 {
  12714. break
  12715. }
  12716. }
  12717. case 2:
  12718. if wireType != 0 {
  12719. return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType)
  12720. }
  12721. m.Format = 0
  12722. for shift := uint(0); ; shift += 7 {
  12723. if shift >= 64 {
  12724. return ErrIntOverflowTypes
  12725. }
  12726. if iNdEx >= l {
  12727. return io.ErrUnexpectedEOF
  12728. }
  12729. b := dAtA[iNdEx]
  12730. iNdEx++
  12731. m.Format |= uint32(b&0x7F) << shift
  12732. if b < 0x80 {
  12733. break
  12734. }
  12735. }
  12736. case 3:
  12737. if wireType != 0 {
  12738. return fmt.Errorf("proto: wrong wireType = %d for field Chunks", wireType)
  12739. }
  12740. m.Chunks = 0
  12741. for shift := uint(0); ; shift += 7 {
  12742. if shift >= 64 {
  12743. return ErrIntOverflowTypes
  12744. }
  12745. if iNdEx >= l {
  12746. return io.ErrUnexpectedEOF
  12747. }
  12748. b := dAtA[iNdEx]
  12749. iNdEx++
  12750. m.Chunks |= uint32(b&0x7F) << shift
  12751. if b < 0x80 {
  12752. break
  12753. }
  12754. }
  12755. case 4:
  12756. if wireType != 2 {
  12757. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  12758. }
  12759. var byteLen int
  12760. for shift := uint(0); ; shift += 7 {
  12761. if shift >= 64 {
  12762. return ErrIntOverflowTypes
  12763. }
  12764. if iNdEx >= l {
  12765. return io.ErrUnexpectedEOF
  12766. }
  12767. b := dAtA[iNdEx]
  12768. iNdEx++
  12769. byteLen |= int(b&0x7F) << shift
  12770. if b < 0x80 {
  12771. break
  12772. }
  12773. }
  12774. if byteLen < 0 {
  12775. return ErrInvalidLengthTypes
  12776. }
  12777. postIndex := iNdEx + byteLen
  12778. if postIndex < 0 {
  12779. return ErrInvalidLengthTypes
  12780. }
  12781. if postIndex > l {
  12782. return io.ErrUnexpectedEOF
  12783. }
  12784. m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  12785. if m.Hash == nil {
  12786. m.Hash = []byte{}
  12787. }
  12788. iNdEx = postIndex
  12789. case 5:
  12790. if wireType != 2 {
  12791. return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
  12792. }
  12793. var byteLen int
  12794. for shift := uint(0); ; shift += 7 {
  12795. if shift >= 64 {
  12796. return ErrIntOverflowTypes
  12797. }
  12798. if iNdEx >= l {
  12799. return io.ErrUnexpectedEOF
  12800. }
  12801. b := dAtA[iNdEx]
  12802. iNdEx++
  12803. byteLen |= int(b&0x7F) << shift
  12804. if b < 0x80 {
  12805. break
  12806. }
  12807. }
  12808. if byteLen < 0 {
  12809. return ErrInvalidLengthTypes
  12810. }
  12811. postIndex := iNdEx + byteLen
  12812. if postIndex < 0 {
  12813. return ErrInvalidLengthTypes
  12814. }
  12815. if postIndex > l {
  12816. return io.ErrUnexpectedEOF
  12817. }
  12818. m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...)
  12819. if m.Metadata == nil {
  12820. m.Metadata = []byte{}
  12821. }
  12822. iNdEx = postIndex
  12823. default:
  12824. iNdEx = preIndex
  12825. skippy, err := skipTypes(dAtA[iNdEx:])
  12826. if err != nil {
  12827. return err
  12828. }
  12829. if skippy < 0 {
  12830. return ErrInvalidLengthTypes
  12831. }
  12832. if (iNdEx + skippy) < 0 {
  12833. return ErrInvalidLengthTypes
  12834. }
  12835. if (iNdEx + skippy) > l {
  12836. return io.ErrUnexpectedEOF
  12837. }
  12838. iNdEx += skippy
  12839. }
  12840. }
  12841. if iNdEx > l {
  12842. return io.ErrUnexpectedEOF
  12843. }
  12844. return nil
  12845. }
  12846. func skipTypes(dAtA []byte) (n int, err error) {
  12847. l := len(dAtA)
  12848. iNdEx := 0
  12849. depth := 0
  12850. for iNdEx < l {
  12851. var wire uint64
  12852. for shift := uint(0); ; shift += 7 {
  12853. if shift >= 64 {
  12854. return 0, ErrIntOverflowTypes
  12855. }
  12856. if iNdEx >= l {
  12857. return 0, io.ErrUnexpectedEOF
  12858. }
  12859. b := dAtA[iNdEx]
  12860. iNdEx++
  12861. wire |= (uint64(b) & 0x7F) << shift
  12862. if b < 0x80 {
  12863. break
  12864. }
  12865. }
  12866. wireType := int(wire & 0x7)
  12867. switch wireType {
  12868. case 0:
  12869. for shift := uint(0); ; shift += 7 {
  12870. if shift >= 64 {
  12871. return 0, ErrIntOverflowTypes
  12872. }
  12873. if iNdEx >= l {
  12874. return 0, io.ErrUnexpectedEOF
  12875. }
  12876. iNdEx++
  12877. if dAtA[iNdEx-1] < 0x80 {
  12878. break
  12879. }
  12880. }
  12881. case 1:
  12882. iNdEx += 8
  12883. case 2:
  12884. var length int
  12885. for shift := uint(0); ; shift += 7 {
  12886. if shift >= 64 {
  12887. return 0, ErrIntOverflowTypes
  12888. }
  12889. if iNdEx >= l {
  12890. return 0, io.ErrUnexpectedEOF
  12891. }
  12892. b := dAtA[iNdEx]
  12893. iNdEx++
  12894. length |= (int(b) & 0x7F) << shift
  12895. if b < 0x80 {
  12896. break
  12897. }
  12898. }
  12899. if length < 0 {
  12900. return 0, ErrInvalidLengthTypes
  12901. }
  12902. iNdEx += length
  12903. case 3:
  12904. depth++
  12905. case 4:
  12906. if depth == 0 {
  12907. return 0, ErrUnexpectedEndOfGroupTypes
  12908. }
  12909. depth--
  12910. case 5:
  12911. iNdEx += 4
  12912. default:
  12913. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  12914. }
  12915. if iNdEx < 0 {
  12916. return 0, ErrInvalidLengthTypes
  12917. }
  12918. if depth == 0 {
  12919. return iNdEx, nil
  12920. }
  12921. }
  12922. return 0, io.ErrUnexpectedEOF
  12923. }
  12924. var (
  12925. ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
  12926. ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
  12927. ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
  12928. )